@inkeep/open-knowledge 0.87.0 → 0.87.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/constants-CQjhNt5p.mjs +1 -0
  3. package/dist/{dist-Nf304EbD.mjs → dist-PmCem0Y1.mjs} +340 -340
  4. package/dist/{dist-WUkQ-0NU.mjs → dist-cFe3RAar.mjs} +1 -1
  5. package/dist/index.mjs +1 -1
  6. package/dist/init-BiNq854u.mjs +1 -0
  7. package/dist/{init-CWqD3Nng.mjs → init-Dq2XMpFs.mjs} +2 -2
  8. package/dist/{launch-json-removal-Cvp1hwA9.mjs → launch-json-removal-DQKdy_1j.mjs} +1 -1
  9. package/dist/{loader-BL7IJyg2.mjs → loader-5TqYKC_Z.mjs} +1 -1
  10. package/dist/loader-DTfuwXTE.mjs +1 -0
  11. package/dist/native/native-config.win32-arm64-msvc.node +0 -0
  12. package/dist/native/native-config.win32-x64-msvc.node +0 -0
  13. package/dist/{open-browser-DpCYxQUn.mjs → open-browser-kPiLSvpr.mjs} +1 -1
  14. package/dist/preview-Cf253pgH.mjs +1 -0
  15. package/dist/{preview-CL-0QvdL.mjs → preview-Dix_d-fE.mjs} +1 -1
  16. package/dist/public/assets/{AccountSection-NLWrDrTZ.js → AccountSection-p8r76pkV.js} +1 -1
  17. package/dist/public/assets/{ActivityModeContent-DjiZ89QW.js → ActivityModeContent-rQttmYF6.js} +1 -1
  18. package/dist/public/assets/{ActivityPanelDiffView-BTB4On_E.js → ActivityPanelDiffView-CCS0Nkum.js} +1 -1
  19. package/dist/public/assets/{AddPropertiesButton-_DUD6qEa.js → AddPropertiesButton-B6IejxrR.js} +2 -2
  20. package/dist/public/assets/{AgentConnectionsSection-BBrTu_Hd.js → AgentConnectionsSection-CFTMQXUz.js} +1 -1
  21. package/dist/public/assets/{AgentDiffPane-BIMJvOUm.js → AgentDiffPane-Dn8WRsV7.js} +2 -2
  22. package/dist/public/assets/{AgentThreadClientBinder-BKZL1FEK.js → AgentThreadClientBinder-BoMnnONc.js} +1 -1
  23. package/dist/public/assets/{AppMenubar-vPHVy2jk.js → AppMenubar-Lz_2ECvw.js} +1 -1
  24. package/dist/public/assets/{AttachmentsSection-Cpp7GpDE.js → AttachmentsSection-Bn4i2rg9.js} +1 -1
  25. package/dist/public/assets/{BugReportHistory-DCPpzbO5.js → BugReportHistory-Cn1uopFw.js} +1 -1
  26. package/dist/public/assets/{BugReportHistoryDialog-D-QZYqdF.js → BugReportHistoryDialog-DOJthShd.js} +1 -1
  27. package/dist/public/assets/{CodeMirrorEditor-UCMRAMCV-gMzc3glM.js → CodeMirrorEditor-UCMRAMCV-NL0u-orr.js} +1 -1
  28. package/dist/public/assets/{CodeMirrorPropInput-Be-YNVIO.js → CodeMirrorPropInput-DfQjpQ6M.js} +3 -3
  29. package/dist/public/assets/{ConsentDialogBody-k0k7metW.js → ConsentDialogBody-XNb2G3na.js} +1 -1
  30. package/dist/public/assets/{ContentRulesSection-CDpY39im.js → ContentRulesSection-ztnerbWq.js} +1 -1
  31. package/dist/public/assets/{DiffViewBoundary-DFNHnF7f.js → DiffViewBoundary-DS5sFg8l.js} +1 -1
  32. package/dist/public/assets/DocumentContext-CNfg18DN.js +108 -0
  33. package/dist/public/assets/{EditorModeToggle-RJLxrqRC.js → EditorModeToggle-CG9VKfp6.js} +1 -1
  34. package/dist/public/assets/{ExcalidrawDocEditor-Be8glSX0.js → ExcalidrawDocEditor-CS03_ezh.js} +1 -1
  35. package/dist/public/assets/FeedbackForm-Dzkwb1qz.js +1 -0
  36. package/dist/public/assets/{GraphPanel-4ARXQVWm.js → GraphPanel-BqNuC1PH.js} +1 -1
  37. package/dist/public/assets/{ImageAttachments-BDh-av0V.js → ImageAttachments-oSzqgO9z.js} +1 -1
  38. package/dist/public/assets/ImportSkillDialog-DXS48eBS.js +1 -0
  39. package/dist/public/assets/{LinkPreviewsSection-CQxSugpT.js → LinkPreviewsSection-CrHtYJHg.js} +1 -1
  40. package/dist/public/assets/{LintConfigEditor-Dfj-raaq.js → LintConfigEditor-DfETBpq_.js} +1 -1
  41. package/dist/public/assets/{LintingSection-DCp5jEfC.js → LintingSection-Dj3F40Wj.js} +1 -1
  42. package/dist/public/assets/ManagedArtifactProperties-BI7Cva8l.js +1 -0
  43. package/dist/public/assets/{ManagedArtifactProperties-BlSJv3bc.js → ManagedArtifactProperties-ClDANUAS.js} +1 -1
  44. package/dist/public/assets/{McpConsentDialogBody-9u-ImAfw.js → McpConsentDialogBody-xbsziJ8M.js} +1 -1
  45. package/dist/public/assets/{Mermaid-DqNhHNi1.js → Mermaid-CSQrzsa-.js} +2 -2
  46. package/dist/public/assets/{MermaidDocEditor-BQ5tabVr.js → MermaidDocEditor-hcPAqtoP.js} +1 -1
  47. package/dist/public/assets/{MultiFileDiff-BFbTHRMN.js → MultiFileDiff-BPqKFglt.js} +1 -1
  48. package/dist/public/assets/{NetworkAccessSection-CL-B_Em0.js → NetworkAccessSection-Dk3E-qFj.js} +1 -1
  49. package/dist/public/assets/{OkCliPathRow-CIrEL7IY.js → OkCliPathRow-qha7ViCN.js} +1 -1
  50. package/dist/public/assets/{OkignoreSection-DplnnxQb.js → OkignoreSection-CQywQkmc.js} +1 -1
  51. package/dist/public/assets/{PageListContext-CbzXXblg.js → PageListContext-Bsok6Dkc.js} +1 -1
  52. package/dist/public/assets/{ProjectTemplatesSection-DYj1MFJG.js → ProjectTemplatesSection-BtUwaSYs.js} +1 -1
  53. package/dist/public/assets/{PropertyDisplayRow-uxOCpvVq.js → PropertyDisplayRow-DPnCmRdn.js} +1 -1
  54. package/dist/public/assets/{PublishToGitHubDialog-DHySPhwT.js → PublishToGitHubDialog-k4d9YYO1.js} +1 -1
  55. package/dist/public/assets/{ReportBugDialogBody-Bbd3DGIB.js → ReportBugDialogBody-Dx_LVm22.js} +1 -1
  56. package/dist/public/assets/{ReportBugMenuTrigger-DFg5tOG8.js → ReportBugMenuTrigger-xHppTUcT.js} +1 -1
  57. package/dist/public/assets/{SchemaConfigEditor-D0OhDRSd.js → SchemaConfigEditor-B10WDSYc.js} +1 -1
  58. package/dist/public/assets/{SearchSection-BqNe04Xq.js → SearchSection-f6pxVs7u.js} +1 -1
  59. package/dist/public/assets/{SessionsHost-BVCT64hl.js → SessionsHost-aXPKDTc7.js} +2 -2
  60. package/dist/public/assets/{SettingsDialogBody-C6pglolb.js → SettingsDialogBody-BoAYqRNM.js} +2 -2
  61. package/dist/public/assets/{ShareReceiveMissDialog-DbuuZJ3v.js → ShareReceiveMissDialog-CBqhVGzP.js} +1 -1
  62. package/dist/public/assets/{SharingSection-C-9tTPow.js → SharingSection-HnLTw3fT.js} +1 -1
  63. package/dist/public/assets/{SkillEditBanner-FV1XZks2.js → SkillEditBanner-BYQhRIjd.js} +1 -1
  64. package/dist/public/assets/{SkillForkDialog-BHqkO5bK.js → SkillForkDialog-Cp2VfBKT.js} +1 -1
  65. package/dist/public/assets/{SkillInstallMenu-DtXyIqB8.js → SkillInstallMenu-CsSIF4d7.js} +1 -1
  66. package/dist/public/assets/{SkillOriginInline-Z5JCe0T2.js → SkillOriginInline-DXmcEqEw.js} +2 -2
  67. package/dist/public/assets/{SkillPluginBundleDialog-XB1fO90e.js → SkillPluginBundleDialog-D8f_Pygy.js} +1 -1
  68. package/dist/public/assets/{SkillToolbarControls-CtMQu5eE.js → SkillToolbarControls-C00zbRZ2.js} +1 -1
  69. package/dist/public/assets/{SkillUpdateConflictDialog-D_oqmK3K.js → SkillUpdateConflictDialog-BbujrDOD.js} +1 -1
  70. package/dist/public/assets/{SkillsManagerSection-DCJlhnvy.js → SkillsManagerSection-BQ6eCTsP.js} +1 -1
  71. package/dist/public/assets/{SlidesPluginSection-BhUKklqb.js → SlidesPluginSection-dXy1hGNp.js} +1 -1
  72. package/dist/public/assets/{SourceEditor-oi1pt8ea.js → SourceEditor-gV7Bls1A.js} +1 -1
  73. package/dist/public/assets/{SpellingSettings-DhyHqpT4.js → SpellingSettings-Bqz9pslj.js} +1 -1
  74. package/dist/public/assets/{SyncSection-OKBw_muU.js → SyncSection-DfwhmSry.js} +1 -1
  75. package/dist/public/assets/{SyncStatusBadge-DbUkQxgG.js → SyncStatusBadge-DUEDaFmV.js} +1 -1
  76. package/dist/public/assets/{TerminalPanel-Bj0ZrCsM.js → TerminalPanel-DYxs61YB.js} +1 -1
  77. package/dist/public/assets/{TerminalSection-BwGMcQAQ.js → TerminalSection-CInwerxa.js} +1 -1
  78. package/dist/public/assets/{TerminalWindowApp-DIDY_b56.js → TerminalWindowApp-Bxxz83X5.js} +1 -1
  79. package/dist/public/assets/{TextDocEditor-CwI36fQd.js → TextDocEditor-BJXYfTuz.js} +1 -1
  80. package/dist/public/assets/{ThemePluginSection-DvtPYcRy.js → ThemePluginSection-DyuaEmFe.js} +1 -1
  81. package/dist/public/assets/{ThreadView-BrLxoU3W.js → ThreadView-Be19MXtY.js} +10 -10
  82. package/dist/public/assets/{TimelineDiffPane-CjaKEAtW.js → TimelineDiffPane-B785hYRA.js} +2 -2
  83. package/dist/public/assets/{abnfDiagram-N423BO3Z-DxZ-Koze.js → abnfDiagram-N423BO3Z-DtxRG9UX.js} +1 -1
  84. package/dist/public/assets/{architectureDiagram-T3A2C74G-kC-V7IMi.js → architectureDiagram-T3A2C74G-wLxYdHFB.js} +1 -1
  85. package/dist/public/assets/{blockDiagram-VBNYF7ZC-BKEhT33t.js → blockDiagram-VBNYF7ZC-Pjeu3MNP.js} +1 -1
  86. package/dist/public/assets/{bug-report-send-manager-DWzqdFH7.js → bug-report-send-manager-BAnvVPby.js} +1 -1
  87. package/dist/public/assets/{c4Diagram-5PPSVZJV-Do2HOyes.js → c4Diagram-5PPSVZJV-DE3wsCgr.js} +1 -1
  88. package/dist/public/assets/channel-C3dKvFV5.js +1 -0
  89. package/dist/public/assets/{chunk-2GRJ4B5K-S_oJ0t4y.js → chunk-2GRJ4B5K-ClzGKqzp.js} +1 -1
  90. package/dist/public/assets/{chunk-3NCLNEKW-D5wa2WAP.js → chunk-3NCLNEKW-jfRpWNZt.js} +1 -1
  91. package/dist/public/assets/{chunk-4I5QYGJK-Dp669PmE.js → chunk-4I5QYGJK-BvE0r05N.js} +1 -1
  92. package/dist/public/assets/{chunk-5RXB4S5H-DRiK0ixI.js → chunk-5RXB4S5H-gTApSFEx.js} +1 -1
  93. package/dist/public/assets/{chunk-6Q2QTUOP-CDDzU8ni.js → chunk-6Q2QTUOP-qvPNNDVk.js} +1 -1
  94. package/dist/public/assets/{chunk-7Z6QIM7H-riu23jJK.js → chunk-7Z6QIM7H-rwCNkfVu.js} +1 -1
  95. package/dist/public/assets/{chunk-BO2N2NFS-D_QMFEED.js → chunk-BO2N2NFS-De4FWds-.js} +4 -4
  96. package/dist/public/assets/{chunk-GF5L2VYU-CcvARaXd.js → chunk-GF5L2VYU-BBflv717.js} +1 -1
  97. package/dist/public/assets/{chunk-I66GZJ75-Mkx0wAj8.js → chunk-I66GZJ75-CJhve8_m.js} +1 -1
  98. package/dist/public/assets/{chunk-J7OUQ5F2-B_dGIV0c.js → chunk-J7OUQ5F2-DS7HkZLi.js} +2 -2
  99. package/dist/public/assets/{chunk-JQJVKLGR-DzOLtgmE.js → chunk-JQJVKLGR-CHVgYkog.js} +1 -1
  100. package/dist/public/assets/{chunk-KBJHAD2P-ByDw6A4K.js → chunk-KBJHAD2P-DK3QrMpY.js} +1 -1
  101. package/dist/public/assets/{chunk-NSK5VX7P-BytRcAia.js → chunk-NSK5VX7P-CcEZtfre.js} +1 -1
  102. package/dist/public/assets/{chunk-QR6OTTB3-D8za8qsa.js → chunk-QR6OTTB3-qF4HoiE9.js} +1 -1
  103. package/dist/public/assets/{chunk-UBXNYLIW-BikKpxC2.js → chunk-UBXNYLIW-CGvZjPjz.js} +1 -1
  104. package/dist/public/assets/{chunk-W5SLKNZC-D_CrJ8tI.js → chunk-W5SLKNZC-Dw_hS9zr.js} +1 -1
  105. package/dist/public/assets/{chunk-WRU74C26-D5Y_Dzwm.js → chunk-WRU74C26-Ct6yd0-T.js} +1 -1
  106. package/dist/public/assets/classDiagram-JCYQIIEL-BuTWccfh.js +1 -0
  107. package/dist/public/assets/classDiagram-v2-OCEON4UE-xIsJuttE.js +1 -0
  108. package/dist/public/assets/{client-version-IVnobfG2.js → client-version-C7rXQUY5.js} +1 -1
  109. package/dist/public/assets/{cm-theme-Dml6DrPs.js → cm-theme-DY245iRg.js} +1 -1
  110. package/dist/public/assets/{code-highlighter-impl-y1C6ECDp.js → code-highlighter-impl-CrzNiVvD.js} +1 -1
  111. package/dist/public/assets/{comment-chips-pQYREZn3.js → comment-chips-CavfMhix.js} +1 -1
  112. package/dist/public/assets/{config-provider-II5j7cr0.js → config-provider-NNwyrQWj.js} +1 -1
  113. package/dist/public/assets/{cynefinDiagram-MW4NZA55-C5F835a_.js → cynefinDiagram-MW4NZA55-BlRVUElT.js} +1 -1
  114. package/dist/public/assets/{dagre-VZM6K2ZE-Bhk3ecW_.js → dagre-VZM6K2ZE-DFuv-cK6.js} +1 -1
  115. package/dist/public/assets/{diagram-7IWD3JNH-DvWl2aZ9.js → diagram-7IWD3JNH-BM0WTGbx.js} +1 -1
  116. package/dist/public/assets/{diagram-B4RE2ZJO-DvkMsKBc.js → diagram-B4RE2ZJO-CKPW7n8V.js} +1 -1
  117. package/dist/public/assets/{diagram-LBJQPF4R-BU8SmhWa.js → diagram-LBJQPF4R-BGJO2kEk.js} +1 -1
  118. package/dist/public/assets/{diagram-Q27KOJAE-BLJoDpTp.js → diagram-Q27KOJAE-s8QuJeNx.js} +1 -1
  119. package/dist/public/assets/{diagram-UB23O5K3-BEJov894.js → diagram-UB23O5K3-B0i1xg24.js} +1 -1
  120. package/dist/public/assets/{dist-Bw3EnfRK.js → dist-8cadZTcN.js} +1 -1
  121. package/dist/public/assets/{dist-CRnJUJYV.js → dist-B1oPuPz8.js} +1 -1
  122. package/dist/public/assets/{dist-DL4JUOn7.js → dist-B3DJFAAc.js} +1 -1
  123. package/dist/public/assets/{dist-DxN51Ana2.js → dist-BIq0_yiu2.js} +1 -1
  124. package/dist/public/assets/{dist-BxVTbkVl.js → dist-C3P7yzPg.js} +1 -1
  125. package/dist/public/assets/{dist-urhiDaCp.js → dist-CwnKas8E.js} +1 -1
  126. package/dist/public/assets/{dist-nSDmHl8c.js → dist-D0egXYuQ.js} +1 -1
  127. package/dist/public/assets/{dist-CtBRIMC4.js → dist-DNUUqdDe.js} +1 -1
  128. package/dist/public/assets/{dist-Jw9rDwKW.js → dist-DchonWFB.js} +1 -1
  129. package/dist/public/assets/{dist-LjMlqXYz.js → dist-DhRS7v2X.js} +1 -1
  130. package/dist/public/assets/{dist-CBBf5U_8.js → dist-Dn7hbatR.js} +1 -1
  131. package/dist/public/assets/{dist-D2c3re7d.js → dist-MW_4cYgC.js} +1 -1
  132. package/dist/public/assets/dist-ei2QQdZM.js +1 -0
  133. package/dist/public/assets/{dist-DTvyxWzB.js → dist-pOXH7Izb.js} +1 -1
  134. package/dist/public/assets/{dist-BjL32yBS.js → dist-rrfJUNqT.js} +1 -1
  135. package/dist/public/assets/{doc-undo-manager-BD2hz9pU.js → doc-undo-manager-DWGpl3I6.js} +1 -1
  136. package/dist/public/assets/{ebnfDiagram-BXEA7PRR-CCNI1OBw.js → ebnfDiagram-BXEA7PRR-BMJ-QLYi.js} +1 -1
  137. package/dist/public/assets/{engine-compile-DCFDOxYT.js → engine-compile-D75sBEQx.js} +1 -1
  138. package/dist/public/assets/{erDiagram-JOGREHBK-s9FPNXy0.js → erDiagram-JOGREHBK-B7RLRxay.js} +1 -1
  139. package/dist/public/assets/field-controls-BpWrodXJ.js +1 -0
  140. package/dist/public/assets/{field-controls-DtQ6Aw_j.js → field-controls-D31F23S8.js} +1 -1
  141. package/dist/public/assets/{file-tree-adapter-DC-yGI9s.js → file-tree-adapter-B_KOESNY.js} +1 -1
  142. package/dist/public/assets/flowDiagram-UKHOOZJN-DATdWVJi.js +1 -0
  143. package/dist/public/assets/{ganttDiagram-PKOTCBZU-tQng7xZg.js → ganttDiagram-PKOTCBZU-CmzX9pwR.js} +1 -1
  144. package/dist/public/assets/{gitGraphDiagram-DS77QQ5N-0oGaI7oi.js → gitGraphDiagram-DS77QQ5N-Dkk025kT.js} +1 -1
  145. package/dist/public/assets/{highlighted-body-OFNGDK62-BwM9yU73.js → highlighted-body-OFNGDK62-CNZlBSJb.js} +1 -1
  146. package/dist/public/assets/{image-attachment-CkuQ83TY.js → image-attachment-BPChXLGL.js} +1 -1
  147. package/dist/public/assets/{ime-composition-DSJh5ynW.js → ime-composition-B56Lnl92.js} +1 -1
  148. package/dist/public/assets/index-BrnHs8Jv.js +2209 -0
  149. package/dist/public/assets/{infoDiagram-6WML65LV-DQIEucLv.js → infoDiagram-6WML65LV-Ba5SAnnJ.js} +1 -1
  150. package/dist/public/assets/{ishikawaDiagram-WSZJBQD7-Qb2IAMef.js → ishikawaDiagram-WSZJBQD7-DPN71z8-.js} +1 -1
  151. package/dist/public/assets/{journeyDiagram-NVQOT4AX-8_jX-C8a.js → journeyDiagram-NVQOT4AX-DqPWIdSs.js} +1 -1
  152. package/dist/public/assets/{kanban-definition-27J2QSJJ-CEEYwllg.js → kanban-definition-27J2QSJJ-Yb-w6MLu.js} +1 -1
  153. package/dist/public/assets/{lib-CHTgVmKZ.js → lib-B4aE3tlX.js} +1 -1
  154. package/dist/public/assets/{lib-BiDTxxNs.js → lib-BZo-U1ex.js} +1 -1
  155. package/dist/public/assets/{lib-DggJrklf.js → lib-CUUpVIaO.js} +1 -1
  156. package/dist/public/assets/{line-BsarArEL.js → line-DSgqlaou.js} +1 -1
  157. package/dist/public/assets/{lint-config-client-DZxh6x0d.js → lint-config-client-CLttd-hM.js} +1 -1
  158. package/dist/public/assets/{lint-plugins-BaAMIQ2r.js → lint-plugins-DwONZI4d.js} +1 -1
  159. package/dist/public/assets/{markdown-lint-CYB8LZHY.js → markdown-lint-wCP_bSbs.js} +3 -3
  160. package/dist/public/assets/{markdownlint-rule-browser-BHLBJ88w.js → markdownlint-rule-browser-nIryvJXe.js} +1 -1
  161. package/dist/public/assets/mermaid-GHXKKRXX-BmxFNCbl.js +1 -0
  162. package/dist/public/assets/{mermaid.core-CyLGJzps.js → mermaid.core-kyxAVtOe.js} +3 -3
  163. package/dist/public/assets/mermaid.core-vijUbFeL.js +1 -0
  164. package/dist/public/assets/{mindmap-definition-FAOFIHXS-CtH6yYX-.js → mindmap-definition-FAOFIHXS-WaeBxEI3.js} +1 -1
  165. package/dist/public/assets/{navigation-targets-DSSJ_2xi.js → navigation-targets-wIVrXum1.js} +1 -1
  166. package/dist/public/assets/{page-list-cache-p7dO1d0k.js → page-list-cache-DjTjuoEq.js} +1 -1
  167. package/dist/public/assets/{pegDiagram-VL7TDLO6-DlYnsUKl.js → pegDiagram-VL7TDLO6-CtHls9u3.js} +1 -1
  168. package/dist/public/assets/{pending-receive-nav-store-BccGEUAv.js → pending-receive-nav-store-o9oBHRA1.js} +1 -1
  169. package/dist/public/assets/{pieDiagram-7S7Q4E2Y-BDatfRsc.js → pieDiagram-7S7Q4E2Y-DExDDy1k.js} +1 -1
  170. package/dist/public/assets/{pierre-theme-DzTcpkj5.js → pierre-theme-BcjBYmHp.js} +1 -1
  171. package/dist/public/assets/{preferred-session-events-nJ74kYez.js → preferred-session-events-BeUx9aAA.js} +1 -1
  172. package/dist/public/assets/{prod-CN58f7_5.js → prod-TDqup_vF.js} +5 -5
  173. package/dist/public/assets/{progress-CfEGUAqV.js → progress-DnuamsWL.js} +1 -1
  174. package/dist/public/assets/{project-paths-BFzGZn4G.js → project-paths-DtCPeXsO.js} +1 -1
  175. package/dist/public/assets/{quadrantDiagram-CIZ2JOQS-DqK8f_ul.js → quadrantDiagram-CIZ2JOQS-jtaC898v.js} +1 -1
  176. package/dist/public/assets/{railroadDiagram-AXF67PYL-BRhbMHP6.js → railroadDiagram-AXF67PYL-Cu9VIEoH.js} +1 -1
  177. package/dist/public/assets/{requirementDiagram-LRYGKXZP-vdezDb9X.js → requirementDiagram-LRYGKXZP-Ai-HpF_c.js} +1 -1
  178. package/dist/public/assets/{restart-collab-server-D_8KLQoA.js → restart-collab-server-CHlRP7RK.js} +1 -1
  179. package/dist/public/assets/{sankeyDiagram-W5VNT64P-C57JgB9L.js → sankeyDiagram-W5VNT64P-CMNt1Rab.js} +1 -1
  180. package/dist/public/assets/{schema-section-DUv4SBzP.js → schema-section-Ceiv9_HZ.js} +1 -1
  181. package/dist/public/assets/{selection-context-D_Q1HTZu.js → selection-context-CM8zoRrp.js} +1 -1
  182. package/dist/public/assets/{sequenceDiagram-SI44F4Z6-BuLkAztr.js → sequenceDiagram-SI44F4Z6-CBkryIPb.js} +1 -1
  183. package/dist/public/assets/{sign-in-terminal-events-BjvOWBuh.js → sign-in-terminal-events-D1Wi4Xw6.js} +1 -1
  184. package/dist/public/assets/{single-file-mode-_W9sHrBm.js → single-file-mode-BxiPl4Ah.js} +1 -1
  185. package/dist/public/assets/{skeleton-CrbF9ppq.js → skeleton-izVZCkjV.js} +1 -1
  186. package/dist/public/assets/{src-DJ0d8PUP.js → src-3-CgLA8R.js} +1 -1
  187. package/dist/public/assets/{stateDiagram-OKZ733FA-DXk5EfyR.js → stateDiagram-OKZ733FA-DEf6Fks3.js} +1 -1
  188. package/dist/public/assets/stateDiagram-v2-UEYNNEHI-ZjpHqFIy.js +1 -0
  189. package/dist/public/assets/{swimlanes-SLNWSIFB-CMmm9y1W.js → swimlanes-SLNWSIFB-BgtzsnGU.js} +1 -1
  190. package/dist/public/assets/swimlanesDiagram-ULZ7WXOC-BvPT90kO.js +8 -0
  191. package/dist/public/assets/{syntax-YjkwC8Y2.js → syntax-DSW4pYwe.js} +1 -1
  192. package/dist/public/assets/{tag-pill-input-qgfgpKpV.js → tag-pill-input-D_fe_Zbo.js} +1 -1
  193. package/dist/public/assets/{target-navigation-intent-D1w61eVY.js → target-navigation-intent-Bh2lFZbu.js} +1 -1
  194. package/dist/public/assets/{telemetry-impl-DDndUbqK.js → telemetry-impl-D-xNqlfu.js} +1 -1
  195. package/dist/public/assets/{telemetry-startup-C4QjWfB9.js → telemetry-startup-BYTRgwU0.js} +1 -1
  196. package/dist/public/assets/{text-viewer-languages-BpNCtJFb.js → text-viewer-languages-CKtwqOI2.js} +2 -2
  197. package/dist/public/assets/{thread-client-CySNJ-9g.js → thread-client-BCtL-FWj.js} +1 -1
  198. package/dist/public/assets/{timeline-definition-Z64GVDOM-Bu9qjWc1.js → timeline-definition-Z64GVDOM-fW0Ws4bU.js} +1 -1
  199. package/dist/public/assets/{trim-lines-6NHDbF9s.js → trim-lines-BXDvYbHZ.js} +1 -1
  200. package/dist/public/assets/{typing-burst-detector-Dsn4t9pr.js → typing-burst-detector-C8qaRSO1.js} +3 -3
  201. package/dist/public/assets/{use-activity-panel-DW4GiJdo.js → use-activity-panel-CdUGR8wh.js} +1 -1
  202. package/dist/public/assets/{use-collab-url-BWFGjvvU.js → use-collab-url-BDpItMkY.js} +1 -1
  203. package/dist/public/assets/{use-installed-clis-IB8iDaEn.js → use-installed-clis-D3LjLTuG.js} +2 -2
  204. package/dist/public/assets/{use-open-skill-DjwybMn5.js → use-open-skill-BD54g27L.js} +1 -1
  205. package/dist/public/assets/{use-skill-origin-B9YRoKsz.js → use-skill-origin-CiJpOXFq.js} +1 -1
  206. package/dist/public/assets/{use-skill-targets-DZmqRDS7.js → use-skill-targets-EVebu2kh.js} +1 -1
  207. package/dist/public/assets/{use-skills-CkvdjORj.js → use-skills-BWAh3dDS.js} +1 -1
  208. package/dist/public/assets/{use-terminal-enabled-CO-A9RQH.js → use-terminal-enabled-BqHj6whV.js} +1 -1
  209. package/dist/public/assets/{use-timeline-entry-diff-Btl6EPW0.js → use-timeline-entry-diff-Chx7xZis.js} +1 -1
  210. package/dist/public/assets/{vennDiagram-T6HMQDX7-DZCyigDG.js → vennDiagram-T6HMQDX7-Q3FtvMIj.js} +1 -1
  211. package/dist/public/assets/{wardleyDiagram-T6FBY63Y-BabyWrgB.js → wardleyDiagram-T6FBY63Y-C5C7LOLR.js} +1 -1
  212. package/dist/public/assets/{xychartDiagram-ELKLHX3M-8objR63x.js → xychartDiagram-ELKLHX3M-WBJDnI7r.js} +1 -1
  213. package/dist/public/index.html +96 -96
  214. package/dist/{registry-probes-B5AbO9dv.mjs → registry-probes-DGVzxRUC.mjs} +1 -1
  215. package/dist/{removal-file-path-Drxec99x.mjs → removal-file-path-ZM6ikP2y.mjs} +1 -1
  216. package/dist/{repair-launch-json-C3xSiYWH.mjs → repair-launch-json-B_XVzJJ8.mjs} +1 -1
  217. package/dist/{repair-mcp-configs-BVULGX9S.mjs → repair-mcp-configs-Dfa48u98.mjs} +1 -1
  218. package/dist/{src-D-fal9Xw.mjs → src-DxKawoUP.mjs} +1 -1
  219. package/dist/src-bM7-nplq.mjs +1 -0
  220. package/dist/start-BTuScXni.mjs +1 -0
  221. package/dist/{start-CdJRw07Z.mjs → start-B_rwfMzz.mjs} +3 -3
  222. package/package.json +4 -4
  223. package/dist/constants-DPLBP140.mjs +0 -1
  224. package/dist/init-C-xUyMcK.mjs +0 -1
  225. package/dist/loader-blXESFeK.mjs +0 -1
  226. package/dist/preview-BDLj9KVh.mjs +0 -1
  227. package/dist/public/assets/DocumentContext-DQjJD30Y.js +0 -108
  228. package/dist/public/assets/FeedbackForm-CTSpZpFW.js +0 -1
  229. package/dist/public/assets/ImportSkillDialog-CwmJPncl.js +0 -1
  230. package/dist/public/assets/ManagedArtifactProperties-CMGJ-sJ9.js +0 -1
  231. package/dist/public/assets/channel-pAazZ6IO.js +0 -1
  232. package/dist/public/assets/classDiagram-JCYQIIEL-DkFvSY54.js +0 -1
  233. package/dist/public/assets/classDiagram-v2-OCEON4UE-CDzbe5RX.js +0 -1
  234. package/dist/public/assets/dist-B5Lgn--k.js +0 -1
  235. package/dist/public/assets/field-controls-DShsojhy.js +0 -1
  236. package/dist/public/assets/flowDiagram-UKHOOZJN-B24oe-HH.js +0 -1
  237. package/dist/public/assets/index-Br5DLdXt.js +0 -2209
  238. package/dist/public/assets/mermaid-GHXKKRXX-C2B7_ENC.js +0 -1
  239. package/dist/public/assets/mermaid.core-B351QNJ8.js +0 -1
  240. package/dist/public/assets/stateDiagram-v2-UEYNNEHI-DbQ9-zRG.js +0 -1
  241. package/dist/public/assets/swimlanesDiagram-ULZ7WXOC-p2VXN9vA.js +0 -8
  242. package/dist/src-JyYMt7dw.mjs +0 -1
  243. package/dist/start-yK5eiuo0.mjs +0 -1
  244. /package/dist/public/assets/{AuthModal-YZGpNH__.js → AuthModal-CDv9Ka9d.js} +0 -0
  245. /package/dist/public/assets/{ConfigSharingInfoTooltip-DSloJmkE.js → ConfigSharingInfoTooltip-DySl2X4f.js} +0 -0
  246. /package/dist/public/assets/{CopyButton-BTy3joJd.js → CopyButton-BQkeo9bl.js} +0 -0
  247. /package/dist/public/assets/{RowDisclosure-Bj2sD4-N.js → RowDisclosure-BIxlyswE.js} +0 -0
  248. /package/dist/public/assets/{TemplateRow-B04s7sdl.js → TemplateRow-CQTK4uJX.js} +0 -0
  249. /package/dist/public/assets/{acp-thread-protocol-DEJR583g.js → acp-thread-protocol-CWbl02Jp.js} +0 -0
  250. /package/dist/public/assets/{agent-diff-store-Bxx1cLWW.js → agent-diff-store-B_PHpjoM.js} +0 -0
  251. /package/dist/public/assets/{agent-launcher-labels-CKZLww6j.js → agent-launcher-labels-WHKiZE2H.js} +0 -0
  252. /package/dist/public/assets/{agent-presence-BB8MLPTF.js → agent-presence-DttIZzMw.js} +0 -0
  253. /package/dist/public/assets/{api-config-BeqD_2Y2.js → api-config-DY0IQM13.js} +0 -0
  254. /package/dist/public/assets/{ccount-DGTHxXcy.js → ccount-D2axTgHX.js} +0 -0
  255. /package/dist/public/assets/{channel-cli-copy-DOAEiMde.js → channel-cli-copy-BySq87hR.js} +0 -0
  256. /package/dist/public/assets/{clipboard-adapter-C8gKg_7K.js → clipboard-adapter-BzEuR0hT.js} +0 -0
  257. /package/dist/public/assets/{contact-email-store-Cr7VN6uy.js → contact-email-store-K5cpIvvi.js} +0 -0
  258. /package/dist/public/assets/{context-menu-B5MxEep2.js → context-menu-DSlq1GYo.js} +0 -0
  259. /package/dist/public/assets/{desktop-bridge-p6CFXLIz.js → desktop-bridge-BJzXwZwD.js} +0 -0
  260. /package/dist/public/assets/{dist-BosZaL03.js → dist-B8KZUrr_.js} +0 -0
  261. /package/dist/public/assets/{doc-paths-DiEZR__C.js → doc-paths-5ibOUcTo.js} +0 -0
  262. /package/dist/public/assets/{documents-fetch-BPNWNaEf.js → documents-fetch-C22H7c-g.js} +0 -0
  263. /package/dist/public/assets/{excalidraw-scene-7qRUVF00.js → excalidraw-scene-DKlZeb8o.js} +0 -0
  264. /package/dist/public/assets/{file-tree-rename-validation-DAMy4Ak1.js → file-tree-rename-validation-Cpa_Vek-.js} +0 -0
  265. /package/dist/public/assets/{katex-Diqujmde.js → katex-DUOilEXW.js} +0 -0
  266. /package/dist/public/assets/{known-skill-dirs-WpNGuhvr.js → known-skill-dirs-DNpdjBsx.js} +0 -0
  267. /package/dist/public/assets/{lazy-with-preload-D9fROG5C.js → lazy-with-preload-Ct49YkMK.js} +0 -0
  268. /package/dist/public/assets/{lib-DjmHwbg0.js → lib-CYXogIvt.js} +0 -0
  269. /package/dist/public/assets/{lib-qLdVx2Nx.js → lib-DlCf5-vZ.js} +0 -0
  270. /package/dist/public/assets/{markdownit-BNu6K0Lc.js → markdownit-Ck6NoOTM.js} +0 -0
  271. /package/dist/public/assets/{open-managed-artifact-tab-Bgndx1BG.js → open-managed-artifact-tab-Bt4fZblC.js} +0 -0
  272. /package/dist/public/assets/{panel-4D0jDR6z.js → panel-dxdTyKXc.js} +0 -0
  273. /package/dist/public/assets/{skill-scope-DOTLd4gL.js → skill-scope-DlzReYLC.js} +0 -0
  274. /package/dist/public/assets/{skills-api-CCijBzjo.js → skills-api-DjykKWn7.js} +0 -0
  275. /package/dist/public/assets/{space-separated-tokens-BMeAno6f.js → space-separated-tokens-DnBNyEmh.js} +0 -0
  276. /package/dist/public/assets/{startup-marks-Cb3e8PuI.js → startup-marks-DLk8fGL-.js} +0 -0
  277. /package/dist/public/assets/{stex-BAMK64Qm.js → stex-C0vEAtfn.js} +0 -0
  278. /package/dist/public/assets/{terminal-cli-display-Irv_lU4O.js → terminal-cli-display-nVuidfOl.js} +0 -0
  279. /package/dist/public/assets/{use-semantic-search-status-7_z6UOU1.js → use-semantic-search-status-D9HCPCCa.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{t}from"./src-CP90en3s.js";import{$ as n,G as r,H as i,K as a,U as o,a as s,d as c,it as l,k as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-I66GZJ75-Mkx0wAj8.js";import{t as g}from"./channel-pAazZ6IO.js";import{C as _}from"./src-BCu1z_qw.js";import{c as v,g as ee}from"./chunk-NSK5VX7P-BytRcAia.js";import{n as te,t as ne}from"./chunk-ZIRB5QZD-BC43nZIY.js";import{o as y}from"./chunk-QR6OTTB3-D8za8qsa.js";import{r as b,t as x}from"./chunk-J7OUQ5F2-B_dGIV0c.js";import{t as S}from"./chunk-5VM5RSS4-BpXg4Z_W.js";import{t as C}from"./chunk-2GRJ4B5K-S_oJ0t4y.js";import{t as w}from"./chunk-XXDRQBXY-TtItiY2c.js";import{t as T}from"./chunk-KBJHAD2P-ByDw6A4K.js";var E=`flowchart-`,D=class{constructor(){this.vertexCounter=0,this.config=m(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=o,this.setAccDescription=i,this.setDiagramTitle=a,this.getAccTitle=h,this.getAccDescription=f,this.getDiagramTitle=p,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{e(this,`FlowDB`)}sanitizeText(e){return d.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,n,r,i,a,o,s={},c){if(!e||e.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(`
1
+ import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{t}from"./src-CP90en3s.js";import{$ as n,G as r,H as i,K as a,U as o,a as s,d as c,it as l,k as u,s as d,v as f,w as p,x as m,y as h}from"./chunk-I66GZJ75-CJhve8_m.js";import{t as g}from"./channel-C3dKvFV5.js";import{C as _}from"./src-BCu1z_qw.js";import{c as v,g as ee}from"./chunk-NSK5VX7P-CcEZtfre.js";import{n as te,t as ne}from"./chunk-ZIRB5QZD-BC43nZIY.js";import{o as y}from"./chunk-QR6OTTB3-qF4HoiE9.js";import{r as b,t as x}from"./chunk-J7OUQ5F2-DS7HkZLi.js";import{t as S}from"./chunk-5VM5RSS4-BpXg4Z_W.js";import{t as C}from"./chunk-2GRJ4B5K-ClzGKqzp.js";import{t as w}from"./chunk-XXDRQBXY-TtItiY2c.js";import{t as T}from"./chunk-KBJHAD2P-DK3QrMpY.js";var E=`flowchart-`,D=class{constructor(){this.vertexCounter=0,this.config=m(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=o,this.setAccDescription=i,this.setDiagramTitle=a,this.getAccTitle=h,this.getAccDescription=f,this.getDiagramTitle=p,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{e(this,`FlowDB`)}sanitizeText(e){return d.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,n,r,i,a,o,s={},c){if(!e||e.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(`
2
2
  `)?c+`
3
3
  `:`{
4
4
  `+c+`
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{t}from"./src-CP90en3s.js";import{c as n}from"./chunk-I66GZJ75-Mkx0wAj8.js";var r=e((e,r,o,s)=>{e.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(e,r);n(e,l,c,s);let f=a(u,d,c,l,r);e.attr(`viewBox`,f),t.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=e((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=e((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{t}from"./src-CP90en3s.js";import{c as n}from"./chunk-I66GZJ75-CJhve8_m.js";var r=e((e,r,o,s)=>{e.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(e,r);n(e,l,c,s);let f=a(u,d,c,l,r);e.attr(`viewBox`,f),t.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=e((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=e((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t};
@@ -1,2 +1,2 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{t}from"./src-CP90en3s.js";import{R as n,h as r,p as i,r as a,s as o}from"./chunk-I66GZJ75-Mkx0wAj8.js";import{C as s}from"./src-BCu1z_qw.js";import{t as c}from"./dist-CM2pf1Me.js";function l(e){this._context=e}l.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 u(e){return new l(e)}var d=class{constructor(e,t){this._context=e,this._x=t}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(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function f(e){return new d(e,!0)}function ee(e){return new d(e,!1)}function p(){}function m(e,t,n){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+n)/6)}function h(e){this._context=e}h.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:m(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:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function te(e){return new h(e)}function ne(e){this._context=e}ne.prototype={areaStart:p,areaEnd:p,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:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function re(e){return new ne(e)}function ie(e){this._context=e}ie.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ae(e){return new ie(e)}function oe(e,t){this._basis=new h(e),this._beta=t}oe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var se=(function e(t){function n(e){return t===1?new h(e):new oe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function g(e,t,n){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-n),e._x2,e._y2)}function _(e,t){this._context=e,this._k=(1-t)/6}_.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:g(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:g(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}};var ce=(function e(t){function n(e){return new _(e,t)}return n.tension=function(t){return e(+t)},n})(0);function v(e,t){this._context=e,this._k=(1-t)/6}v.prototype={areaStart:p,areaEnd:p,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:g(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}};var le=(function e(t){function n(e){return new v(e,t)}return n.tension=function(t){return e(+t)},n})(0);function y(e,t){this._context=e,this._k=(1-t)/6}y.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:g(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}};var ue=(function e(t){function n(e){return new y(e,t)}return n.tension=function(t){return e(+t)},n})(0);function b(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function de(e,t){this._context=e,this._alpha=t}de.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 n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+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:b(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}};var fe=(function e(t){function n(e){return t?new de(e,t):new _(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function pe(e,t){this._context=e,this._alpha=t}pe.prototype={areaStart:p,areaEnd:p,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 n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+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:b(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}};var me=(function e(t){function n(e){return t?new pe(e,t):new v(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function he(e,t){this._context=e,this._alpha=t}he.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 n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+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:b(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}};var ge=(function e(t){function n(e){return t?new he(e,t):new y(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function _e(e){this._context=e}_e.prototype={areaStart:p,areaEnd:p,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 ve(e){return new _e(e)}function ye(e){return e<0?-1:1}function be(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ye(a)+ye(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function x(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function S(e){this._context=e}S.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:x(this,this._t0,xe(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 n=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,x(this,xe(this,n=be(this,e,t)),n);break;default:x(this,this._t0,n=be(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Se(e){this._context=new Ce(e)}(Se.prototype=Object.create(S.prototype)).point=function(e,t){S.prototype.point.call(this,t,e)};function Ce(e){this._context=e}Ce.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,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function we(e){return new S(e)}function Te(e){return new Se(e)}function Ee(e){this._context=e}Ee.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,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=De(e),i=De(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===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 De(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Oe(e){return new Ee(e)}function C(e,t){this._context=e,this._t=t}C.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 n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function w(e){return new C(e,.5)}function T(e){return new C(e,0)}function ke(e){return new C(e,1)}function E(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ae(){}function je(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function D(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Me=`[object RegExp]`,O=`[object String]`,k=`[object Number]`,A=`[object Boolean]`,j=`[object Arguments]`,Ne=`[object Symbol]`,Pe=`[object Date]`,Fe=`[object Map]`,Ie=`[object Set]`,Le=`[object Array]`,Re=`[object ArrayBuffer]`,ze=`[object Object]`,M=`[object DataView]`,Be=`[object Uint8Array]`,Ve=`[object Uint8ClampedArray]`,He=`[object Uint16Array]`,Ue=`[object Uint32Array]`,We=`[object Int8Array]`,Ge=`[object Int16Array]`,Ke=`[object Int32Array]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function N(e){return Ye.Buffer!==void 0&&Ye.Buffer.isBuffer(e)}function Xe(e){return Number.isSafeInteger(e)&&e>=0}function Ze(e){return e!=null&&typeof e!=`function`&&Xe(e.length)}function Qe(e){return e===`__proto__`}function P(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function F(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $e(e,t){return I(e,void 0,e,new Map,t)}function I(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(P(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,I(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(I(a,void 0,n,r,i));return t}if(N(e))return e.subarray();if(F(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),L(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,L(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(typeof e==`object`&&et(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),L(t,e,n,r,i),t}return e}function L(e,t,n=e,r,i){let a=[...Object.keys(t),...je(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=I(t[s],s,n,r,i))}}function et(e){switch(D(e)){case j:case Le:case Re:case M:case A:case Pe:case qe:case Je:case We:case Ge:case Ke:case Fe:case k:case ze:case Me:case Ie:case O:case Ne:case Be:case Ve:case He:case Ue:return!0;default:return!1}}function tt(e,t){return $e(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(D(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),L(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case k:case O:case A:{let t=new e.constructor(e?.valueOf());return L(t,e),t}case j:{let t={};return L(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function nt(e){return tt(e)}function R(e){return typeof e==`object`&&!!e&&D(e)===`[object Arguments]`}function z(e){return typeof e==`object`&&!!e}function rt(e){return z(e)&&Ze(e)}function B(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(B.Cache||Map),n}B.Cache=Map;function V(e){return F(e)}function it(e){if(P(e))return e;if(Array.isArray(e)||F(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function at(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=H(i,t,r,new Map)}return i}function H(e,t,n,r){if(P(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return it(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...je(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Qe(o))continue;let s=t[o],c=e[o];if(R(s)&&(s={...s}),R(c)&&(c={...c}),N(s)&&(s=nt(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(rt(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||z(c)&&z(s)&&(E(c)||E(s)||V(c)||V(s))?e[o]=H(c,s,n,r):c==null&&E(s)?e[o]=H({},s,n,r):c==null&&V(s)?e[o]=nt(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function ot(e,...t){return at(e,...t,Ae)}var st=c(),ct={curveBasis:te,curveBasisClosed:re,curveBasisOpen:ae,curveBumpX:f,curveBumpY:ee,curveBundle:se,curveCardinalClosed:le,curveCardinalOpen:ue,curveCardinal:ce,curveCatmullRomClosed:me,curveCatmullRomOpen:ge,curveCatmullRom:fe,curveLinear:u,curveLinearClosed:ve,curveMonotoneX:we,curveMonotoneY:Te,curveNatural:Oe,curveStep:w,curveStepAfter:ke,curveStepBefore:T},lt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ut=e(function(e,t){let r=dt(e,/(?:init\b)|(?:initialize\b)/),o={};if(Array.isArray(r)){let e=r.map(e=>e.args);n(e),o=a(o,[...e])}else o=r.args;if(!o)return;let s=i(e,t),c=`config`;return o[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),o[s]=o[c],delete o[c]),o},`detectInit`),dt=e(function(e,n=null){try{let i=RegExp(`[%]{2}(?![{]${lt.source})(?=[}][%]{2}).*
1
+ import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{t}from"./src-CP90en3s.js";import{R as n,h as r,p as i,r as a,s as o}from"./chunk-I66GZJ75-CJhve8_m.js";import{C as s}from"./src-BCu1z_qw.js";import{t as c}from"./dist-CM2pf1Me.js";function l(e){this._context=e}l.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 u(e){return new l(e)}var d=class{constructor(e,t){this._context=e,this._x=t}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(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function f(e){return new d(e,!0)}function ee(e){return new d(e,!1)}function p(){}function m(e,t,n){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+n)/6)}function h(e){this._context=e}h.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:m(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:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function te(e){return new h(e)}function ne(e){this._context=e}ne.prototype={areaStart:p,areaEnd:p,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:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function re(e){return new ne(e)}function ie(e){this._context=e}ie.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ae(e){return new ie(e)}function oe(e,t){this._basis=new h(e),this._beta=t}oe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var se=(function e(t){function n(e){return t===1?new h(e):new oe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function g(e,t,n){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-n),e._x2,e._y2)}function _(e,t){this._context=e,this._k=(1-t)/6}_.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:g(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:g(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}};var ce=(function e(t){function n(e){return new _(e,t)}return n.tension=function(t){return e(+t)},n})(0);function v(e,t){this._context=e,this._k=(1-t)/6}v.prototype={areaStart:p,areaEnd:p,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:g(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}};var le=(function e(t){function n(e){return new v(e,t)}return n.tension=function(t){return e(+t)},n})(0);function y(e,t){this._context=e,this._k=(1-t)/6}y.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:g(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}};var ue=(function e(t){function n(e){return new y(e,t)}return n.tension=function(t){return e(+t)},n})(0);function b(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function de(e,t){this._context=e,this._alpha=t}de.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 n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+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:b(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}};var fe=(function e(t){function n(e){return t?new de(e,t):new _(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function pe(e,t){this._context=e,this._alpha=t}pe.prototype={areaStart:p,areaEnd:p,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 n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+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:b(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}};var me=(function e(t){function n(e){return t?new pe(e,t):new v(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function he(e,t){this._context=e,this._alpha=t}he.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 n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+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:b(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}};var ge=(function e(t){function n(e){return t?new he(e,t):new y(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function _e(e){this._context=e}_e.prototype={areaStart:p,areaEnd:p,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 ve(e){return new _e(e)}function ye(e){return e<0?-1:1}function be(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ye(a)+ye(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function x(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function S(e){this._context=e}S.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:x(this,this._t0,xe(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 n=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,x(this,xe(this,n=be(this,e,t)),n);break;default:x(this,this._t0,n=be(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Se(e){this._context=new Ce(e)}(Se.prototype=Object.create(S.prototype)).point=function(e,t){S.prototype.point.call(this,t,e)};function Ce(e){this._context=e}Ce.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,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function we(e){return new S(e)}function Te(e){return new Se(e)}function Ee(e){this._context=e}Ee.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,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=De(e),i=De(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===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 De(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Oe(e){return new Ee(e)}function C(e,t){this._context=e,this._t=t}C.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 n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function w(e){return new C(e,.5)}function T(e){return new C(e,0)}function ke(e){return new C(e,1)}function E(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ae(){}function je(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function D(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Me=`[object RegExp]`,O=`[object String]`,k=`[object Number]`,A=`[object Boolean]`,j=`[object Arguments]`,Ne=`[object Symbol]`,Pe=`[object Date]`,Fe=`[object Map]`,Ie=`[object Set]`,Le=`[object Array]`,Re=`[object ArrayBuffer]`,ze=`[object Object]`,M=`[object DataView]`,Be=`[object Uint8Array]`,Ve=`[object Uint8ClampedArray]`,He=`[object Uint16Array]`,Ue=`[object Uint32Array]`,We=`[object Int8Array]`,Ge=`[object Int16Array]`,Ke=`[object Int32Array]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function N(e){return Ye.Buffer!==void 0&&Ye.Buffer.isBuffer(e)}function Xe(e){return Number.isSafeInteger(e)&&e>=0}function Ze(e){return e!=null&&typeof e!=`function`&&Xe(e.length)}function Qe(e){return e===`__proto__`}function P(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function F(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $e(e,t){return I(e,void 0,e,new Map,t)}function I(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(P(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,I(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(I(a,void 0,n,r,i));return t}if(N(e))return e.subarray();if(F(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),L(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,L(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(typeof e==`object`&&et(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),L(t,e,n,r,i),t}return e}function L(e,t,n=e,r,i){let a=[...Object.keys(t),...je(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=I(t[s],s,n,r,i))}}function et(e){switch(D(e)){case j:case Le:case Re:case M:case A:case Pe:case qe:case Je:case We:case Ge:case Ke:case Fe:case k:case ze:case Me:case Ie:case O:case Ne:case Be:case Ve:case He:case Ue:return!0;default:return!1}}function tt(e,t){return $e(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(D(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),L(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case k:case O:case A:{let t=new e.constructor(e?.valueOf());return L(t,e),t}case j:{let t={};return L(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function nt(e){return tt(e)}function R(e){return typeof e==`object`&&!!e&&D(e)===`[object Arguments]`}function z(e){return typeof e==`object`&&!!e}function rt(e){return z(e)&&Ze(e)}function B(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(B.Cache||Map),n}B.Cache=Map;function V(e){return F(e)}function it(e){if(P(e))return e;if(Array.isArray(e)||F(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function at(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=H(i,t,r,new Map)}return i}function H(e,t,n,r){if(P(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return it(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...je(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Qe(o))continue;let s=t[o],c=e[o];if(R(s)&&(s={...s}),R(c)&&(c={...c}),N(s)&&(s=nt(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(rt(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||z(c)&&z(s)&&(E(c)||E(s)||V(c)||V(s))?e[o]=H(c,s,n,r):c==null&&E(s)?e[o]=H({},s,n,r):c==null&&V(s)?e[o]=nt(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function ot(e,...t){return at(e,...t,Ae)}var st=c(),ct={curveBasis:te,curveBasisClosed:re,curveBasisOpen:ae,curveBumpX:f,curveBumpY:ee,curveBundle:se,curveCardinalClosed:le,curveCardinalOpen:ue,curveCardinal:ce,curveCatmullRomClosed:me,curveCatmullRomOpen:ge,curveCatmullRom:fe,curveLinear:u,curveLinearClosed:ve,curveMonotoneX:we,curveMonotoneY:Te,curveNatural:Oe,curveStep:w,curveStepAfter:ke,curveStepBefore:T},lt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ut=e(function(e,t){let r=dt(e,/(?:init\b)|(?:initialize\b)/),o={};if(Array.isArray(r)){let e=r.map(e=>e.args);n(e),o=a(o,[...e])}else o=r.args;if(!o)return;let s=i(e,t),c=`config`;return o[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),o[s]=o[c],delete o[c]),o},`detectInit`),dt=e(function(e,n=null){try{let i=RegExp(`[%]{2}(?![{]${lt.source})(?=[}][%]{2}).*
2
2
  `,`ig`);e=e.trim().replace(i,``).replace(/'/gm,`"`),t.debug(`Detecting diagram directive${n===null?``:` type:`+n} based on the text:${e}`);let a,o=[];for(;(a=r.exec(e))!==null;)if(a.index===r.lastIndex&&r.lastIndex++,a&&!n||n&&a[1]?.match(n)||n&&a[2]?.match(n)){let e=a[1]?a[1]:a[2],t=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:e,args:t})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return t.error(`ERROR: ${r.message} - Unable to parse directive type: '${n}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),ft=e(function(e){return e.replace(r,``)},`removeDirectives`),pt=e(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function U(e,t){return e?ct[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}e(U,`interpolateToCurve`);function mt(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,st.sanitizeUrl)(n)}e(mt,`formatUrl`);var ht=e((e,...n)=>{let r=e.split(`.`),i=r.length-1,a=r[i],o=window;for(let n=0;n<i;n++)if(o=o[r[n]],!o){t.error(`Function name: ${e} not found in window`);return}o[a](...n)},`runFunc`);function W(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}e(W,`distance`);function gt(e){let t,n=0;return e.forEach(e=>{n+=W(e,t),t=e}),G(e,n/2)}e(gt,`traverseEdge`);function _t(e){return e.length===1?e[0]:gt(e)}e(_t,`calcLabelPosition`);var vt=e((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),G=e((e,t)=>{let n,r=t;for(let t of e){if(n){let e=W(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:vt((1-i)*n.x+i*t.x,5),y:vt((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),yt=e((e,n,r)=>{t.info(`our points ${JSON.stringify(n)}`),n[0]!==r&&(n=n.reverse());let i=G(n,25),a=e?10:5,o=Math.atan2(n[0].y-i.y,n[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(n[0].x+i.x)/2,s.y=-Math.cos(o)*a+(n[0].y+i.y)/2,s},`calcCardinalityPosition`);function bt(e,n,r){let i=structuredClone(r);t.info(`our points`,i),n!==`start_left`&&n!==`start_right`&&i.reverse();let a=G(i,25+e),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return n===`start_left`?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):n===`end_right`?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):n===`end_left`?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}e(bt,`calcTerminalLabelPosition`);function K(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}e(K,`getStylesFromArray`);var xt=0,St=e(()=>(xt++,`id-`+Math.random().toString(36).substr(2,12)+`-`+xt),`generateId`);function Ct(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}e(Ct,`makeRandomHex`);var wt=e(e=>Ct(e.length),`random`),Tt=e(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`),Et=e(function(e,t){let n=t.text.replace(o.lineBreakRegex,` `),[,r]=Z(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),Dt=B((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),o.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=J(`${e} `,n),c=J(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Ot(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Ot=B((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(J(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function q(e,t){return Y(e,t).height}e(q,`calculateTextHeight`);function J(e,t){return Y(e,t).width}e(J,`calculateTextWidth`);var Y=B((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=Z(n),c=[`sans-serif`,r],l=e.split(o.lineBreakRegex),u=[],d=s(`body`);if(!d.remove)return{width:0,height:0,lineHeight:0};let f=d.append(`svg`);for(let e of c){let t=0,n={width:0,height:0,lineHeight:0};for(let r of l){let o=Tt();o.text=r||`​`;let s=Et(f,o).style(`font-size`,a).style(`font-weight`,i).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}u.push(n)}return f.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),kt=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{e(this,`InitIDGenerator`)}},X,At=e(function(e){return X||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),X.innerHTML=e,unescape(X.textContent)},`entityDecode`);function jt(e){return`str`in e}e(jt,`isDetailedError`);var Mt=e((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Z=e(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function Q(e,t){return ot({},e,t)}e(Q,`cleanAndMerge`);var Nt={assignWithDepth:a,wrapLabel:Dt,calculateTextHeight:q,calculateTextWidth:J,calculateTextDimensions:Y,cleanAndMerge:Q,detectInit:ut,detectDirective:dt,isSubstringInArray:pt,interpolateToCurve:U,calcLabelPosition:_t,calcCardinalityPosition:yt,calcTerminalLabelPosition:bt,formatUrl:mt,getStylesFromArray:K,generateId:St,random:wt,runFunc:ht,entityDecode:At,insertTitle:Mt,isLabelCoordinateInPath:$,parseFontSize:Z,InitIDGenerator:kt},Pt=e(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),Ft=e(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),It=e((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function Lt(e){return e??null}e(Lt,`handleUndefinedAttr`);function $(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}e($,`isLabelCoordinateInPath`);export{ce as $,Je as A,Ne as B,j as C,M as D,A as E,k as F,D as G,Ue as H,ze as I,w as J,ke as K,Me as L,Ke as M,We as N,Pe as O,Fe as P,fe as Q,Ie as R,N as S,Le as T,Be as U,He as V,Ve as W,we as X,Oe as Y,Te as Z,Dt as _,Ft as a,P as b,It as c,U as d,te as et,jt as f,Nt as g,ft as h,Q as i,Ge as j,qe as k,K as l,wt as m,q as n,ee as nt,Pt as o,Z as p,T as q,J as r,u as rt,St as s,Y as t,f as tt,Lt as u,V as v,Re as w,Ze as x,R as y,O as z};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{t}from"./src-CP90en3s.js";import{A as n,B as r,M as i,T as a,b as o,g as s,x as c,z as l}from"./chunk-I66GZJ75-Mkx0wAj8.js";import{C as u}from"./src-BCu1z_qw.js";import{a as d,r as f,u as p}from"./chunk-NSK5VX7P-BytRcAia.js";import{a as m,i as h,r as g,t as _}from"./chunk-W5SLKNZC-D_CrJ8tI.js";import{n as v,t as y}from"./chunk-UBXNYLIW-BikKpxC2.js";import{t as b}from"./chunk-4I5QYGJK-Dp669PmE.js";import{n as x}from"./chunk-WRU74C26-D5Y_Dzwm.js";import{t as S}from"./rough.esm-cBAxAxzT.js";var C=e(async(e,t,n)=>{let r,i=t.useHtmlLabels||s(c()?.htmlLabels);r=n||`node default`;let a=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,p(t.labelStyle)),f;f=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let m=!!t.icon||!!t.img,h=t.labelType===`markdown`,g=await x(o,l(d(f),c()),{useHtmlLabels:i,width:t.width||c().flowchart?.wrappingWidth,classes:h?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:m,markdown:h},c()),_=g.getBBox(),v=(t?.padding??0)/2;if(i){let e=g.children[0],t=u(g);await y(e,f),_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}return i?o.attr(`transform`,`translate(`+-_.width/2+`, `+-_.height/2+`)`):o.attr(`transform`,`translate(0, `+-_.height/2+`)`),t.centerLabel&&o.attr(`transform`,`translate(`+-_.width/2+`, `+-_.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:a,bbox:_,halfPadding:v,label:o}},`labelHelper`),w=e(async(e,t,n)=>{let r=n.useHtmlLabels??a(c()),i=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),o=await x(i,l(d(t),c()),{useHtmlLabels:r,width:n.width||c()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),s=o.getBBox(),f=n.padding/2;if(a(c())){let e=o.children[0],t=u(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}return r?i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`):i.attr(`transform`,`translate(0, `+-s.height/2+`)`),n.centerLabel&&i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`),i.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:s,halfPadding:f,label:i}},`insertLabel`),T=e((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),E=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function D(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(D,`createPathFromPoints`);function O(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e(O,`generateFullSineWavePoints`);function k(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(k,`generateCirclePoints`);function A(t){let n=Array.from(t.childNodes).filter(e=>e.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(A,`mergePaths`);var j=e((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),M=e(async(e,t,n,r=!1,i=!1)=>{let o=t||``;typeof o==`object`&&(o=o[0]);let s=c(),l=a(s);return await x(e,o,{style:n,isTitle:r,useHtmlLabels:l,markdown:!1,isNode:i,width:1/0},s)},`createLabel`),N=e((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),P=e(async(e,n)=>{let r=c(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:l}=i,d=l,{labelStyles:f,nodeStyles:p,borderStyles:g,backgroundStyles:_}=h(n),v=e.insert(`g`).attr(`class`,`cluster swimlane `+(n.cssClasses||``)).attr(`id`,n.id).attr(`data-id`,n.id).attr(`data-et`,`cluster`).attr(`data-look`,n.look),y=s(r.flowchart.htmlLabels),b=n.direction===`LR`,C=v.insert(`g`).attr(`class`,`cluster-label swimlane-label`),w=await x(C,n.label,{style:n.labelStyle,useHtmlLabels:y,isNode:!0,width:n.width}),T=w.getBBox();if(y){let e=w.children[0],t=u(w);T=e.getBoundingClientRect(),t.attr(`width`,T.width),t.attr(`height`,T.height)}let E=n.padding??0,D=n.width<=T.width+E?T.width+E:n.width;n.width<=T.width+E?n.diff=(D-n.width)/2-E:n.diff=-E;let O=n.height,k=n.y-O/2,A=n.y+O/2,M=n.x-D/2,N=n.swimlaneContentTop===void 0?k+O/3:n.swimlaneContentTop,P=b?4:0,F=T.height+2*P,I,L;if(b){let e=Math.max(F,T.height+2*P),t=M+e,r=Math.max(0,D-e);if(n.look===`handDrawn`){let i=S.svg(v),s=m(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),c=m(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),l=i.rectangle(M,k,e,O,s);I=v.insert(()=>l,`:first-child`);let u=i.rectangle(t,k,r,O,c);L=v.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,g.join(`;`)),I.select(`path`).attr(`style`,_.join(`;`).replace(`fill`,`stroke`))}else I=v.insert(`rect`,`:first-child`),L=v.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,M).attr(`y`,k).attr(`width`,e).attr(`height`,O).attr(`fill`,o).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,t).attr(`y`,k).attr(`width`,r).attr(`height`,O).attr(`fill`,`none`).attr(`stroke`,d);let i=M+e/2,s=n.y;C.attr(`transform`,`translate(${i}, ${s}) rotate(-90) translate(${-T.width/2}, ${-T.height/2})`)}else{let e=Math.max(0,N-k),t=Math.min(F,e),r=k+t,i=Math.max(0,A-r),s=n.x-D/2;if(n.look===`handDrawn`){let e=S.svg(v),c=m(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),l=m(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),u=e.rectangle(s,k,D,t,c);I=v.insert(()=>u,`:first-child`);let f=e.rectangle(s,r,D,i,l);L=v.insert(()=>f,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,g.join(`;`)),I.select(`path`).attr(`style`,_.join(`;`).replace(`fill`,`stroke`))}else I=v.insert(`rect`,`:first-child`),L=v.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,s).attr(`y`,k).attr(`width`,D).attr(`height`,t).attr(`fill`,o).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,s).attr(`y`,r).attr(`width`,D).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,d);let c=n.x-T.width/2,l=k+(t-T.height)/2;C.attr(`transform`,`translate(${c}, ${l})`)}if(t.trace(`Swimlane data `,n,JSON.stringify(n)),f){let e=C.select(`span`);e&&e.attr(`style`,f)}return n.offsetX=0,n.width=D,n.height=O,n.offsetY=T.height-E/2,n.intersect=function(e){return j(n,e)},{cluster:v,labelBBox:T}},`swimlane`),F=e(async(e,n)=>{t.info(`Creating subgraph rect for `,n.id,n);let r=c(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:g}=h(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),y=a(r),b=_.insert(`g`).attr(`class`,`cluster-label `),C;C=n.labelType===`markdown`?await x(b,n.label,{style:n.labelStyle,useHtmlLabels:y,isNode:!0,width:n.width}):await M(b,n.label,n.labelStyle||``,!1,!0);let w=C.getBBox();if(a(r)){let e=C.children[0],t=u(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=n.width<=w.width+n.padding?w.width+n.padding:n.width;n.width<=w.width+n.padding?n.diff=(T-n.width)/2-n.padding:n.diff=-n.padding;let E=n.height,D=n.x-T/2,O=n.y-E/2;t.trace(`Data `,n,JSON.stringify(n));let k;if(n.look===`handDrawn`){let e=S.svg(_),r=m(n,{roughness:.7,fill:s,stroke:l,fillWeight:3,seed:o}),i=e.path(N(D,O,T,E,0),r);k=_.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=v(r);if(b.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=b.select(`span`);e&&e.attr(`style`,d)}let P=k.node().getBBox();return n.offsetX=0,n.width=P.width,n.height=P.height,n.offsetY=w.height-n.padding/2,n.intersect=function(e){return j(n,e)},{cluster:_,labelBBox:w}},`rect`),I={rect:F,squareRect:F,roundedWithTitle:e(async(e,t)=>{let n=c(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:o,compositeBackground:s,compositeTitleBackground:l,nodeBorder:d}=r,f=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),p=f.insert(`g`,`:first-child`),m=f.insert(`g`).attr(`class`,`cluster-label`),h=f.append(`rect`),g=await M(m,t.label,t.labelStyle,void 0,!0),_=g.getBBox();if(a(n)){let e=g.children[0],t=u(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}let v=0*t.padding,y=v/2,b=(t.width<=_.width+t.padding?_.width+t.padding:t.width)+v;t.width<=_.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+v,C=t.height+v-_.height-6,w=t.x-b/2,T=t.y-x/2;t.width=b;let E=t.y-t.height/2-y+_.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=S.svg(f),r=t.rx||t.ry?n.path(N(w,T,b,x,10),{roughness:.7,fill:l,fillStyle:`solid`,stroke:d,seed:i}):n.rectangle(w,T,b,x,{seed:i});D=f.insert(()=>r,`:first-child`);let a=n.rectangle(w,E,b,C,{fill:e?o:s,fillStyle:e?`hachure`:`solid`,stroke:d,seed:i});D=f.insert(()=>r,`:first-child`),h=f.insert(()=>a)}else D=p.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,w).attr(`y`,T).attr(`width`,b).attr(`height`,x).attr(`data-look`,t.look),h.attr(`class`,`inner`).attr(`x`,w).attr(`y`,E).attr(`width`,b).attr(`height`,C);return m.attr(`transform`,`translate(${t.x-_.width/2}, ${T+1-(a(n)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=_.height-t.padding/2,t.labelBBox=_,t.intersect=function(e){return j(t,e)},{cluster:f,labelBBox:_}},`roundedWithTitle`),noteGroup:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return j(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=c(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,l=t.width+s;t.diff=-t.padding;let u=t.height+s,d=t.x-l/2,f=t.y-u/2;t.width=l;let p;if(t.look===`handDrawn`){let e=S.svg(a).rectangle(d,f,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else{p=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return j(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:e(async(e,n)=>{t.info(`Creating subgraph rect for `,n.id,n);let r=c(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:g}=h(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),y=a(r),b=_.insert(`g`).attr(`class`,`cluster-label `),C=await x(b,n.label,{style:n.labelStyle,useHtmlLabels:y,isNode:!0,width:n.width}),w=C.getBBox();if(a(r)){let e=C.children[0],t=u(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=n.width<=w.width+n.padding?w.width+n.padding:n.width;n.width<=w.width+n.padding?n.diff=(T-n.width)/2-n.padding:n.diff=-n.padding;let E=n.height,D=n.x-T/2,O=n.y-E/2;t.trace(`Data `,n,JSON.stringify(n));let k;if(n.look===`handDrawn`){let e=S.svg(_),r=m(n,{roughness:.7,fill:s,stroke:l,fillWeight:4,seed:o}),i=e.path(N(D,O,T,E,n.rx),r);k=_.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=v(r);if(b.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=b.select(`span`);e&&e.attr(`style`,d)}let M=k.node().getBBox();return n.offsetX=0,n.width=M.width,n.height=M.height,n.offsetY=w.height-n.padding/2,n.intersect=function(e){return j(n,e)},{cluster:_,labelBBox:w}},`kanbanSection`),swimlane:P},L=new Map,ee=e(async(e,t)=>{let n=await I[t.shape||`rect`](e,t);return L.set(t.id,n),n},`insertCluster`),R=e(()=>{L=new Map},`clear`);function z(e,t){return e.intersect(t)}e(z,`intersectNode`);var te=z;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}e(B,`intersectEllipse`);var V=B;function H(e,t,n){return V(e,t,t,n)}e(H,`intersectCircle`);var U=H;function ne(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&re(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&re(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}e(ne,`intersectLine`);function re(e,t){return e*t>0}e(re,`sameSign`);var ie=ne;function W(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=ie(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}e(W,`intersectPolygon`);var G={node:te,circle:U,ellipse:V,polygon:W,rect:j};function K(e,n){let{labelStyles:r}=h(n);n.labelStyle=r;let i=E(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=S.svg(o),l=m(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,p(s)),T(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),G.circle(n,1,e)},o}e(K,`anchor`);function ae(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e(ae,`generateArcPoints`);function oe(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(oe,`calculateArcSagitta`);async function se(t,n){let{labelStyles:r,nodeStyles:i}=h(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await C(t,n,E(n)),f=c(n?.height?n?.height:d.height),[p,g]=l(f),_=oe(f,p,g),v=(n?.width?n?.width:d.width)+o*2+_-_,y=f,{cssStyles:b}=n,x=[{x:v/2,y:-y/2},{x:-v/2,y:-y/2},...ae(-v/2,-y/2,-v/2,y/2,p,g,!1),{x:v/2,y:y/2},...ae(v/2,y/2,v/2,-y/2,p,g,!0)],w=S.svg(u),O=m(n,{});n.look!==`handDrawn`&&(O.roughness=0,O.fillStyle=`solid`);let k=D(x),A=w.path(k,O),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),b&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,b),i&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,i),j.attr(`transform`,`translate(${p/2}, 0)`),T(n,j),n.intersect=function(e){return G.polygon(n,x,e)},u}e(se,`bowTieRect`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e(q,`insertPolygonShape`);var ce=12;async function le(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+ce),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+ce,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+ce},{x:0+ce,y:f}],g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=m(t,{}),r=D(p),i=e.path(r,n);g=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),_&&g.attr(`style`,_)}else g=q(s,l,u,p);return r&&g.attr(`style`,r),T(t,g),t.intersect=function(e){return G.polygon(t,p,e)},s}e(le,`card`);function ue(e,t){let{nodeStyles:n}=h(t);t.label=``;let r=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=S.svg(r),c=m(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=D(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return G.polygon(t,o,e)},r}e(ue,`choice`);async function de(e,n,r){let{labelStyles:i,nodeStyles:a}=h(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await C(e,n,E(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=S.svg(o),t=m(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,p(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return T(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return G.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,u,e),G.circle(n,u,e)},o}e(de,`circle`);function fe(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
1
+ import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{t}from"./src-CP90en3s.js";import{A as n,B as r,M as i,T as a,b as o,g as s,x as c,z as l}from"./chunk-I66GZJ75-CJhve8_m.js";import{C as u}from"./src-BCu1z_qw.js";import{a as d,r as f,u as p}from"./chunk-NSK5VX7P-CcEZtfre.js";import{a as m,i as h,r as g,t as _}from"./chunk-W5SLKNZC-Dw_hS9zr.js";import{n as v,t as y}from"./chunk-UBXNYLIW-CGvZjPjz.js";import{t as b}from"./chunk-4I5QYGJK-BvE0r05N.js";import{n as x}from"./chunk-WRU74C26-Ct6yd0-T.js";import{t as S}from"./rough.esm-cBAxAxzT.js";var C=e(async(e,t,n)=>{let r,i=t.useHtmlLabels||s(c()?.htmlLabels);r=n||`node default`;let a=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,p(t.labelStyle)),f;f=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let m=!!t.icon||!!t.img,h=t.labelType===`markdown`,g=await x(o,l(d(f),c()),{useHtmlLabels:i,width:t.width||c().flowchart?.wrappingWidth,classes:h?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:m,markdown:h},c()),_=g.getBBox(),v=(t?.padding??0)/2;if(i){let e=g.children[0],t=u(g);await y(e,f),_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}return i?o.attr(`transform`,`translate(`+-_.width/2+`, `+-_.height/2+`)`):o.attr(`transform`,`translate(0, `+-_.height/2+`)`),t.centerLabel&&o.attr(`transform`,`translate(`+-_.width/2+`, `+-_.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:a,bbox:_,halfPadding:v,label:o}},`labelHelper`),w=e(async(e,t,n)=>{let r=n.useHtmlLabels??a(c()),i=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),o=await x(i,l(d(t),c()),{useHtmlLabels:r,width:n.width||c()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),s=o.getBBox(),f=n.padding/2;if(a(c())){let e=o.children[0],t=u(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}return r?i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`):i.attr(`transform`,`translate(0, `+-s.height/2+`)`),n.centerLabel&&i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`),i.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:s,halfPadding:f,label:i}},`insertLabel`),T=e((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),E=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function D(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(D,`createPathFromPoints`);function O(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e(O,`generateFullSineWavePoints`);function k(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(k,`generateCirclePoints`);function A(t){let n=Array.from(t.childNodes).filter(e=>e.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(A,`mergePaths`);var j=e((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),M=e(async(e,t,n,r=!1,i=!1)=>{let o=t||``;typeof o==`object`&&(o=o[0]);let s=c(),l=a(s);return await x(e,o,{style:n,isTitle:r,useHtmlLabels:l,markdown:!1,isNode:i,width:1/0},s)},`createLabel`),N=e((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),P=e(async(e,n)=>{let r=c(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:l}=i,d=l,{labelStyles:f,nodeStyles:p,borderStyles:g,backgroundStyles:_}=h(n),v=e.insert(`g`).attr(`class`,`cluster swimlane `+(n.cssClasses||``)).attr(`id`,n.id).attr(`data-id`,n.id).attr(`data-et`,`cluster`).attr(`data-look`,n.look),y=s(r.flowchart.htmlLabels),b=n.direction===`LR`,C=v.insert(`g`).attr(`class`,`cluster-label swimlane-label`),w=await x(C,n.label,{style:n.labelStyle,useHtmlLabels:y,isNode:!0,width:n.width}),T=w.getBBox();if(y){let e=w.children[0],t=u(w);T=e.getBoundingClientRect(),t.attr(`width`,T.width),t.attr(`height`,T.height)}let E=n.padding??0,D=n.width<=T.width+E?T.width+E:n.width;n.width<=T.width+E?n.diff=(D-n.width)/2-E:n.diff=-E;let O=n.height,k=n.y-O/2,A=n.y+O/2,M=n.x-D/2,N=n.swimlaneContentTop===void 0?k+O/3:n.swimlaneContentTop,P=b?4:0,F=T.height+2*P,I,L;if(b){let e=Math.max(F,T.height+2*P),t=M+e,r=Math.max(0,D-e);if(n.look===`handDrawn`){let i=S.svg(v),s=m(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),c=m(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),l=i.rectangle(M,k,e,O,s);I=v.insert(()=>l,`:first-child`);let u=i.rectangle(t,k,r,O,c);L=v.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,g.join(`;`)),I.select(`path`).attr(`style`,_.join(`;`).replace(`fill`,`stroke`))}else I=v.insert(`rect`,`:first-child`),L=v.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,M).attr(`y`,k).attr(`width`,e).attr(`height`,O).attr(`fill`,o).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,t).attr(`y`,k).attr(`width`,r).attr(`height`,O).attr(`fill`,`none`).attr(`stroke`,d);let i=M+e/2,s=n.y;C.attr(`transform`,`translate(${i}, ${s}) rotate(-90) translate(${-T.width/2}, ${-T.height/2})`)}else{let e=Math.max(0,N-k),t=Math.min(F,e),r=k+t,i=Math.max(0,A-r),s=n.x-D/2;if(n.look===`handDrawn`){let e=S.svg(v),c=m(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),l=m(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),u=e.rectangle(s,k,D,t,c);I=v.insert(()=>u,`:first-child`);let f=e.rectangle(s,r,D,i,l);L=v.insert(()=>f,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,g.join(`;`)),I.select(`path`).attr(`style`,_.join(`;`).replace(`fill`,`stroke`))}else I=v.insert(`rect`,`:first-child`),L=v.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,s).attr(`y`,k).attr(`width`,D).attr(`height`,t).attr(`fill`,o).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,s).attr(`y`,r).attr(`width`,D).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,d);let c=n.x-T.width/2,l=k+(t-T.height)/2;C.attr(`transform`,`translate(${c}, ${l})`)}if(t.trace(`Swimlane data `,n,JSON.stringify(n)),f){let e=C.select(`span`);e&&e.attr(`style`,f)}return n.offsetX=0,n.width=D,n.height=O,n.offsetY=T.height-E/2,n.intersect=function(e){return j(n,e)},{cluster:v,labelBBox:T}},`swimlane`),F=e(async(e,n)=>{t.info(`Creating subgraph rect for `,n.id,n);let r=c(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:g}=h(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),y=a(r),b=_.insert(`g`).attr(`class`,`cluster-label `),C;C=n.labelType===`markdown`?await x(b,n.label,{style:n.labelStyle,useHtmlLabels:y,isNode:!0,width:n.width}):await M(b,n.label,n.labelStyle||``,!1,!0);let w=C.getBBox();if(a(r)){let e=C.children[0],t=u(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=n.width<=w.width+n.padding?w.width+n.padding:n.width;n.width<=w.width+n.padding?n.diff=(T-n.width)/2-n.padding:n.diff=-n.padding;let E=n.height,D=n.x-T/2,O=n.y-E/2;t.trace(`Data `,n,JSON.stringify(n));let k;if(n.look===`handDrawn`){let e=S.svg(_),r=m(n,{roughness:.7,fill:s,stroke:l,fillWeight:3,seed:o}),i=e.path(N(D,O,T,E,0),r);k=_.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=v(r);if(b.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=b.select(`span`);e&&e.attr(`style`,d)}let P=k.node().getBBox();return n.offsetX=0,n.width=P.width,n.height=P.height,n.offsetY=w.height-n.padding/2,n.intersect=function(e){return j(n,e)},{cluster:_,labelBBox:w}},`rect`),I={rect:F,squareRect:F,roundedWithTitle:e(async(e,t)=>{let n=c(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:o,compositeBackground:s,compositeTitleBackground:l,nodeBorder:d}=r,f=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),p=f.insert(`g`,`:first-child`),m=f.insert(`g`).attr(`class`,`cluster-label`),h=f.append(`rect`),g=await M(m,t.label,t.labelStyle,void 0,!0),_=g.getBBox();if(a(n)){let e=g.children[0],t=u(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}let v=0*t.padding,y=v/2,b=(t.width<=_.width+t.padding?_.width+t.padding:t.width)+v;t.width<=_.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+v,C=t.height+v-_.height-6,w=t.x-b/2,T=t.y-x/2;t.width=b;let E=t.y-t.height/2-y+_.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=S.svg(f),r=t.rx||t.ry?n.path(N(w,T,b,x,10),{roughness:.7,fill:l,fillStyle:`solid`,stroke:d,seed:i}):n.rectangle(w,T,b,x,{seed:i});D=f.insert(()=>r,`:first-child`);let a=n.rectangle(w,E,b,C,{fill:e?o:s,fillStyle:e?`hachure`:`solid`,stroke:d,seed:i});D=f.insert(()=>r,`:first-child`),h=f.insert(()=>a)}else D=p.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,w).attr(`y`,T).attr(`width`,b).attr(`height`,x).attr(`data-look`,t.look),h.attr(`class`,`inner`).attr(`x`,w).attr(`y`,E).attr(`width`,b).attr(`height`,C);return m.attr(`transform`,`translate(${t.x-_.width/2}, ${T+1-(a(n)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=_.height-t.padding/2,t.labelBBox=_,t.intersect=function(e){return j(t,e)},{cluster:f,labelBBox:_}},`roundedWithTitle`),noteGroup:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return j(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=c(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,l=t.width+s;t.diff=-t.padding;let u=t.height+s,d=t.x-l/2,f=t.y-u/2;t.width=l;let p;if(t.look===`handDrawn`){let e=S.svg(a).rectangle(d,f,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else{p=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return j(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:e(async(e,n)=>{t.info(`Creating subgraph rect for `,n.id,n);let r=c(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:s,clusterBorder:l}=i,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:g}=h(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),y=a(r),b=_.insert(`g`).attr(`class`,`cluster-label `),C=await x(b,n.label,{style:n.labelStyle,useHtmlLabels:y,isNode:!0,width:n.width}),w=C.getBBox();if(a(r)){let e=C.children[0],t=u(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=n.width<=w.width+n.padding?w.width+n.padding:n.width;n.width<=w.width+n.padding?n.diff=(T-n.width)/2-n.padding:n.diff=-n.padding;let E=n.height,D=n.x-T/2,O=n.y-E/2;t.trace(`Data `,n,JSON.stringify(n));let k;if(n.look===`handDrawn`){let e=S.svg(_),r=m(n,{roughness:.7,fill:s,stroke:l,fillWeight:4,seed:o}),i=e.path(N(D,O,T,E,n.rx),r);k=_.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=v(r);if(b.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=b.select(`span`);e&&e.attr(`style`,d)}let M=k.node().getBBox();return n.offsetX=0,n.width=M.width,n.height=M.height,n.offsetY=w.height-n.padding/2,n.intersect=function(e){return j(n,e)},{cluster:_,labelBBox:w}},`kanbanSection`),swimlane:P},L=new Map,ee=e(async(e,t)=>{let n=await I[t.shape||`rect`](e,t);return L.set(t.id,n),n},`insertCluster`),R=e(()=>{L=new Map},`clear`);function z(e,t){return e.intersect(t)}e(z,`intersectNode`);var te=z;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}e(B,`intersectEllipse`);var V=B;function H(e,t,n){return V(e,t,t,n)}e(H,`intersectCircle`);var U=H;function ne(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&re(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&re(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}e(ne,`intersectLine`);function re(e,t){return e*t>0}e(re,`sameSign`);var ie=ne;function W(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=ie(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}e(W,`intersectPolygon`);var G={node:te,circle:U,ellipse:V,polygon:W,rect:j};function K(e,n){let{labelStyles:r}=h(n);n.labelStyle=r;let i=E(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=S.svg(o),l=m(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,p(s)),T(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),G.circle(n,1,e)},o}e(K,`anchor`);function ae(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e(ae,`generateArcPoints`);function oe(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(oe,`calculateArcSagitta`);async function se(t,n){let{labelStyles:r,nodeStyles:i}=h(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await C(t,n,E(n)),f=c(n?.height?n?.height:d.height),[p,g]=l(f),_=oe(f,p,g),v=(n?.width?n?.width:d.width)+o*2+_-_,y=f,{cssStyles:b}=n,x=[{x:v/2,y:-y/2},{x:-v/2,y:-y/2},...ae(-v/2,-y/2,-v/2,y/2,p,g,!1),{x:v/2,y:y/2},...ae(v/2,y/2,v/2,-y/2,p,g,!0)],w=S.svg(u),O=m(n,{});n.look!==`handDrawn`&&(O.roughness=0,O.fillStyle=`solid`);let k=D(x),A=w.path(k,O),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),b&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,b),i&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,i),j.attr(`transform`,`translate(${p/2}, 0)`),T(n,j),n.intersect=function(e){return G.polygon(n,x,e)},u}e(se,`bowTieRect`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e(q,`insertPolygonShape`);var ce=12;async function le(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+ce),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+ce,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+ce},{x:0+ce,y:f}],g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=m(t,{}),r=D(p),i=e.path(r,n);g=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),_&&g.attr(`style`,_)}else g=q(s,l,u,p);return r&&g.attr(`style`,r),T(t,g),t.intersect=function(e){return G.polygon(t,p,e)},s}e(le,`card`);function ue(e,t){let{nodeStyles:n}=h(t);t.label=``;let r=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=S.svg(r),c=m(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=D(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return G.polygon(t,o,e)},r}e(ue,`choice`);async function de(e,n,r){let{labelStyles:i,nodeStyles:a}=h(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await C(e,n,E(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=S.svg(o),t=m(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,p(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return T(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return G.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,u,e),G.circle(n,u,e)},o}e(de,`circle`);function fe(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
2
2
  M ${i.x},${i.y} L ${o.x},${o.y}`}e(fe,`createLine`);function pe(e,n){let{labelStyles:r,nodeStyles:i}=h(n);n.labelStyle=r,n.label=``;let a=e.insert(`g`).attr(`class`,E(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=S.svg(a),l=m(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=fe(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),T(n,p),n.intersect=function(e){return t.info(`crossedCircle intersect`,n,{radius:o,point:e}),G.circle(n,o,e)},a}e(pe,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(J,`generateCirclePoints`);async function me(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...J(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...J(l/2+d*2,-d,d,20,-180,-270),...J(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...J(l/2,u/2,d,20,0,90)],g=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...J(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...J(l/2+l*.1,-d,d,20,-180,-270),...J(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...J(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],_=S.svg(i),v=m(t,{fill:`none`});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=D(p).replace(`Z`,``),b=_.path(y,v),x=D(g),w=_.path(x,{...v}),O=i.insert(`g`,`:first-child`);return O.insert(()=>w,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>b,`:first-child`),O.attr(`class`,`text`),f&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,g,e)},i}e(me,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}e(Y,`generateCirclePoints`);async function he(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90)],g=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],_=S.svg(i),v=m(t,{fill:`none`});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=D(p).replace(`Z`,``),b=_.path(y,v),x=D(g),w=_.path(x,{...v}),O=i.insert(`g`,`:first-child`);return O.insert(()=>w,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>b,`:first-child`),O.attr(`class`,`text`),f&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,g,e)},i}e(he,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(X,`generateCirclePoints`);async function ge(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...X(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...X(l/2,u/2,d,20,0,90)],g=[...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],_=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...X(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...X(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],v=S.svg(i),y=m(t,{fill:`none`});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=D(p).replace(`Z`,``),x=v.path(b,y),w=D(g).replace(`Z`,``),O=v.path(w,y),k=D(_),A=v.path(k,{...y}),j=i.insert(`g`,`:first-child`);return j.insert(()=>A,`:first-child`).attr(`stroke-opacity`,0),j.insert(()=>x,`:first-child`),j.insert(()=>O,`:first-child`),j.attr(`class`,`text`),f&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,j),t.intersect=function(e){return G.polygon(t,_,e)},i}e(ge,`curlyBraces`);async function _e(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=S.svg(s),g=m(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=l,v=u,y=_-d,b=v/4,x=[{x:y,y:0},{x:b,y:0},{x:0,y:v/2},{x:b,y:v},{x:y,y:v},...k(-y,-v/2,d,50,270,90)],w=D(x),O=p.path(w,g),A=s.insert(()=>O,`:first-child`);return A.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,r),A.attr(`transform`,`translate(${-l/2}, ${-u/2})`),T(t,A),t.intersect=function(e){return G.polygon(t,x,e)},s}e(_e,`curvedTrapezoid`);var ve=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),ye=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),be=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),xe=8,Se=8;async function Ce(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.width<Se&&(t.width=Se);let n=e/2/(2.5+e/50);t.height=(t.height??0)-a-n*3,t.height<xe&&(t.height=xe)}let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t.width?t.width:c.width)+o,d=u/2,f=d/(2.5+u/50),g=(t.height?t.height:c.height)+a+f,_,{cssStyles:v}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=ye(0,0,u,g,d,f),r=be(0,f,u,g,d,f),i=m(t,{}),a=e.path(n,i),o=e.path(r,m(t,{fill:`none`}));_=s.insert(()=>o,`:first-child`),_=s.insert(()=>a,`:first-child`),_.attr(`class`,`basic label-container`),v&&_.attr(`style`,v)}else{let e=ve(0,0,u,g,d,f);_=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,p(v)).attr(`style`,r)}return _.attr(`label-offset-y`,f),_.attr(`transform`,`translate(${-u/2}, ${-(g/2+f)})`),T(t,_),l.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(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(Ce,`cylinder`);async function we(e,t,n){let{labelStyles:r,nodeStyles:i}=h(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await C(e,t,E(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:g}=t,{cssStyles:_}=t;if(n?.rx&&n.ry&&(f=n.rx,g=n.ry),t.look===`handDrawn`){let e=S.svg(a),n=m(t,{}),r=f||g?e.path(N(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,p(_))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,p(f)).attr(`ry`,p(g)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return T(t,d),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return G.rect(t,e)},a}e(we,`drawRect`);async function Te(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await we(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=S.svg(c),n=m(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}e(Te,`datastore`);async function Ee(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:g}=t,_=S.svg(o),v=m(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],b=_.polygon(y.map(e=>[e.x,e.y]),v),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),T(t,x),t.intersect=function(e){return G.rect(t,e)},o}e(Ee,`dividedRectangle`);async function De(e,n){let{labelStyles:r,nodeStyles:i}=h(n),a=n.look===`neo`?12:5;n.labelStyle=r;let o=n.padding??0,s=n.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await C(e,n,E(n)),u=(n?.width?n?.width/2:l.width/2)+(s??0),d=u-a,f,{cssStyles:g}=n;if(n.look===`handDrawn`){let e=S.svg(c),t=m(n,{roughness:.2,strokeWidth:2.5}),r=m(n,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,t),a=e.circle(0,0,d*2,r);f=c.insert(`g`,`:first-child`),f.attr(`class`,p(n.cssClasses)).attr(`style`,p(g)),f.node()?.appendChild(i),f.node()?.appendChild(a)}else{f=c.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return T(n,f),n.intersect=function(e){return t.info(`DoubleCircle intersect`,n,u,e),G.circle(n,u,e)},c}e(De,`doublecircle`);function Oe(e,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=h(n);n.label=``,n.labelStyle=i;let o=e.insert(`g`).attr(`class`,E(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=S.svg(o),{nodeBorder:l}=r,u=m(n,{fillStyle:`solid`});n.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),T(n,f),n.intersect=function(e){return t.info(`filledCircle intersect`,n,{radius:7,point:e}),G.circle(n,7,e)},o}e(Oe,`filledCircle`);var ke=10,Ae=10;async function je(e,n){let{labelStyles:r,nodeStyles:i}=h(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.height=n?.height??0,n.height<ke&&(n.height=ke),n.width=(n?.width??0)-o-o/2,n.width<Ae&&(n.width=Ae));let{shapeSvg:s,bbox:c,label:l}=await C(e,n,E(n)),u=(n?.width?n?.width:c.width)+(o??0),d=n?.height?n?.height:u+c.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:g}=n,_=S.svg(s),v=m(n,{});n.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=D(p),b=_.path(y,v),x=s.insert(()=>b,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return g&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,g),i&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),n.width=u,n.height=d,T(n,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(n.padding??0)/2+(c.y-(c.top??0))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,p,e),G.polygon(n,p,e)},s}e(je,`flippedTriangle`);function Me(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=h(t);t.label=``;let o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=S.svg(o),p=m(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let g=f.rectangle(u,d,c,l,p),_=o.insert(()=>g,`:first-child`);s&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,a),T(t,_);let v=r?.padding??0;return t.width&&t.height&&(t.width+=v/2||0,t.height+=v/2||0),t.intersect=function(e){return G.rect(t,e)},o}e(Me,`forkJoin`);async function Ne(e,n){let{labelStyles:r,nodeStyles:i}=h(n);n.labelStyle=r;let a=n.look===`neo`?16:n.padding??0,o=n.look===`neo`?12:n.padding??0;(n.width||n.height)&&(n.height=(n?.height??0)-o*2,n.height<10&&(n.height=10),n.width=(n?.width??0)-a*2,n.width<15&&(n.width=15));let{shapeSvg:s,bbox:c}=await C(e,n,E(n)),l=(n?.width?n?.width:Math.max(15,c.width))+a*2,u=(n?.height?n?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=n,p=S.svg(s),g=m(n,{});n.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...k(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],v=D(_),y=p.path(v,g),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&n.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),i&&n.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,i),T(n,b),n.intersect=function(e){return t.info(`Pill intersect`,n,{radius:d,point:e}),G.polygon(n,_,e)},s}e(Ne,`halfRoundedRectangle`);var Pe=e((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function Fe(e,t){let{labelStyles:n,nodeStyles:r}=h(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await C(e,t,E(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=S.svg(c),n=m(t,{}),r=Pe(0,0,f,u,d),i=e.path(r,n);g=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),_&&g.attr(`style`,_)}else g=q(c,f,u,p);return r&&g.attr(`style`,r),t.width=f,t.height=u,T(t,g),t.intersect=function(e){return G.polygon(t,p,e)},c}e(Fe,`hexagon`);async function Ie(e,n){let{labelStyles:r,nodeStyles:i}=h(n);n.label=``,n.labelStyle=r;let{shapeSvg:a}=await C(e,n,E(n)),o=Math.max(30,n?.width??0),s=Math.max(30,n?.height??0),{cssStyles:c}=n,l=S.svg(a),u=m(n,{});n.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=D(d),p=l.path(f,u),g=a.insert(()=>p,`:first-child`);return g.attr(`class`,`basic label-container outer-path`),c&&n.look!==`handDrawn`&&g.selectChildren(`path`).attr(`style`,c),i&&n.look!==`handDrawn`&&g.selectChildren(`path`).attr(`style`,i),g.attr(`transform`,`translate(${-o/2}, ${-s/2})`),T(n,g),n.intersect=function(e){return t.info(`Pill intersect`,n,{points:d}),G.polygon(n,d,e)},a}e(Ie,`hourglass`);async function Le(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=h(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await C(e,n,`icon-shape default`),p=n.pos===`t`,g=c,v=c,{nodeBorder:y}=r,{stylesMap:x}=_(n),w=-v/2,E=-g/2,D=n.label?8:0,O=S.svg(u),k=m(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`);let A=O.rectangle(w,E,v,g,k),j=Math.max(v,d.width),M=g+d.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),P=u.insert(()=>A,`:first-child`),F=u.insert(()=>N);if(n.icon){let e=u.append(`g`);e.html(`<g>${await b(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${x.get(`stroke`)??y};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-M/2:M/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+D/2:-d.height/2-D/2})`),T(n,F),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=p?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+v/2,y:i-a/2+d.height+D},{x:r+v/2,y:i+a/2},{x:r-v/2,y:i+a/2},{x:r-v/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-v/2,y:i-a/2},{x:r+v/2,y:i-a/2},{x:r+v/2,y:i-a/2+g},{x:r+d.width/2,y:i-a/2+g},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+g},{x:r-v/2,y:i-a/2+g}],G.polygon(n,o,e)},u}e(Le,`icon`);async function Re(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=h(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await C(e,n,`icon-shape default`),p=n.label?8:0,g=n.pos===`t`,{nodeBorder:v,mainBkg:y}=r,{stylesMap:x}=_(n),w=S.svg(u),E=m(n,{});n.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`),E.stroke=x.get(`fill`)??y;let D=u.append(`g`);n.icon&&D.html(`<g>${await b(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let O=D.node().getBBox(),k=O.width,A=O.height,j=O.x,M=O.y,N=Math.max(k,A)*Math.SQRT2+40,P=w.circle(0,0,N,E),F=Math.max(N,d.width),I=N+d.height+p,L=w.rectangle(-F/2,-I/2,F,I,{...E,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>P,`:first-child`),R=u.insert(()=>L);return D.attr(`transform`,`translate(${-k/2-j},${g?d.height/2+p/2-A/2-M:-d.height/2-p/2-A/2-M})`),D.attr(`style`,`color: ${x.get(`stroke`)??v};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${g?-I/2:I/2-d.height})`),ee.attr(`transform`,`translate(0,${g?d.height/2+p/2:-d.height/2-p/2})`),T(n,R),n.intersect=function(e){return t.info(`iconSquare intersect`,n,e),G.rect(n,e)},u}e(Re,`iconCircle`);async function ze(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=h(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await C(e,n,`icon-shape default`),g=n.pos===`t`,v=c+f*2,y=c+f*2,{nodeBorder:x,mainBkg:w}=r,{stylesMap:E}=_(n),D=-y/2,O=-v/2,k=n.label?8:0,A=S.svg(u),j=m(n,{});n.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,y,v,5),j),P=Math.max(y,d.width),F=v+d.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>M,`:first-child`).attr(`class`,`icon-shape2`),ee=u.insert(()=>I);if(n.icon){let e=u.append(`g`);e.html(`<g>${await b(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${g?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??x};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${g?-F/2:F/2-d.height})`),L.attr(`transform`,`translate(0,${g?d.height/2+k/2:-d.height/2-k/2})`),T(n,ee),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=g?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+y/2,y:i-a/2+d.height+k},{x:r+y/2,y:i+a/2},{x:r-y/2,y:i+a/2},{x:r-y/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-y/2,y:i-a/2},{x:r+y/2,y:i-a/2},{x:r+y/2,y:i-a/2+v},{x:r+d.width/2,y:i-a/2+v},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+v},{x:r-y/2,y:i-a/2+v}],G.polygon(n,o,e)},u}e(ze,`iconRounded`);async function Be(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=h(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await C(e,n,`icon-shape default`),g=n.pos===`t`,v=c+f*2,y=c+f*2,{nodeBorder:x,mainBkg:w}=r,{stylesMap:E}=_(n),D=-y/2,O=-v/2,k=n.label?8:0,A=S.svg(u),j=m(n,{});n.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,y,v,.1),j),P=Math.max(y,d.width),F=v+d.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>M,`:first-child`),ee=u.insert(()=>I);if(n.icon){let e=u.append(`g`);e.html(`<g>${await b(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${g?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??x};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${g?-F/2:F/2-d.height})`),L.attr(`transform`,`translate(0,${g?d.height/2+k/2:-d.height/2-k/2})`),T(n,ee),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=g?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+y/2,y:i-a/2+d.height+k},{x:r+y/2,y:i+a/2},{x:r-y/2,y:i+a/2},{x:r-y/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-y/2,y:i-a/2},{x:r+y/2,y:i-a/2},{x:r+y/2,y:i-a/2+v},{x:r+d.width/2,y:i-a/2+v},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+v},{x:r-y/2,y:i-a/2+v}],G.polygon(n,o,e)},u}e(Be,`iconSquare`);async function Ve(e,n,{config:{flowchart:r}}){let i=new Image;i.src=n?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));n.imageAspectRatio=a/o;let{labelStyles:s}=h(n);n.labelStyle=s;let c=r?.wrappingWidth;n.defaultWidth=r?.wrappingWidth;let l=Math.max(n.label?c??0:0,n?.assetWidth??a),u=n.constraint===`on`&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:l,d=n.constraint===`on`?u/n.imageAspectRatio:n?.assetHeight??o;n.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:g}=await C(e,n,`image-shape default`),_=n.pos===`t`,v=-u/2,y=-d/2,b=n.label?8:0,x=S.svg(f),w=m(n,{});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let E=x.rectangle(v,y,u,d,w),D=Math.max(u,p.width),O=d+p.height+b,k=x.rectangle(-D/2,-O/2,D,O,{...w,fill:`none`,stroke:`none`}),A=f.insert(()=>E,`:first-child`),j=f.insert(()=>k);if(n.img){let e=f.append(`image`);e.attr(`href`,n.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${_?O/2-d:-O/2})`)}return g.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${_?-d/2-p.height/2-b/2:d/2-p.height/2+b/2})`),A.attr(`transform`,`translate(0,${_?p.height/2+b/2:-p.height/2-b/2})`),T(n,j),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=_?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+b},{x:r+u/2,y:i-a/2+p.height+b},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+p.height+b},{x:r-p.width/2,y:i-a/2+p.height+b}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+p.width/2,y:i-a/2+d},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],G.polygon(n,o,e)},f}e(Ve,`imageSquare`);async function He(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(c.width+(o??0)*2,t?.width??0),u=Math.max(c.height+(a??0)*2,t?.height??0),d=[{x:0,y:0},{x:l,y:0},{x:l+3*u/6,y:-u},{x:-3*u/6,y:-u}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=m(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),p&&f.attr(`style`,p)}else f=q(s,l,u,d);return r&&f.attr(`style`,r),t.width=l,t.height=u,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(He,`inv_trapezoid`);async function Ue(e,t){let{shapeSvg:n,bbox:r,label:i}=await C(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),T(t,a),t.intersect=function(e){return G.rect(t,e)},n}e(Ue,`labelRect`);async function We(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=m(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(We,`lean_left`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=m(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(Ge,`lean_right`);function Ke(e,n){let{labelStyles:r,nodeStyles:i}=h(n);n.label=``,n.labelStyle=r;let a=e.insert(`g`).attr(`class`,E(n)).attr(`id`,n.domId??n.id),{cssStyles:o}=n,s=Math.max(35,n?.width??0),c=Math.max(35,n?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=S.svg(a),d=m(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=D(l),p=u.path(f,d),g=a.insert(()=>p,`:first-child`);return g.attr(`class`,`outer-path`),o&&n.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,o),i&&n.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,i),g.attr(`transform`,`translate(-${s/2},${-c})`),T(n,g),n.intersect=function(e){return t.info(`lightningBolt intersect`,n,e),G.polygon(n,l,e)},a}e(Ke,`lightningBolt`);var qe=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),Je=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),Ye=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Xe=10,Ze=10;async function Qe(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<Ze&&(t.width=Ze);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<Xe&&(t.height=Xe)}let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,f=d/(2.5+u/50),g=(t?.height?t?.height:c.height)+f+o*2,_=g*.1,v,{cssStyles:y}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=Je(0,0,u,g,d,f,_),r=Ye(0,f,u,g,d,f),i=m(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),v=s.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`),y&&v.attr(`style`,y)}else{let e=qe(0,0,u,g,d,f,_);v=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,p(y)).attr(`style`,r)}return v.attr(`label-offset-y`,f),v.attr(`transform`,`translate(${-u/2}, ${-(g/2+f)})`),T(t,v),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(Qe,`linedCylinder`);async function $e(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:g}=t,_=S.svg(s),v=m(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...O(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],b=_.polygon(y.map(e=>[e.x,e.y]),v),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),T(t,x),t.intersect=function(e){return G.polygon(t,y,e)},s}e($e,`linedWaveEdgedRect`);async function et(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await C(e,t,E(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,g=f-2*s,_=-p/2,v=-g/2,{cssStyles:y}=t,b=S.svg(c),x=m(t,{}),w=[{x:_-s,y:v+s},{x:_-s,y:v+g+s},{x:_+p-s,y:v+g+s},{x:_+p-s,y:v+g},{x:_+p,y:v+g},{x:_+p,y:v+g-s},{x:_+p+s,y:v+g-s},{x:_+p+s,y:v-s},{x:_+s,y:v-s},{x:_+s,y:v},{x:_,y:v},{x:_,y:v+s}],O=[{x:_,y:v+s},{x:_+p-s,y:v+s},{x:_+p-s,y:v+g},{x:_+p,y:v+g},{x:_+p,y:v},{x:_,y:v}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let k=D(w),j=b.path(k,x),M=D(O),N=b.path(M,x);t.look!==`handDrawn`&&(j=A(j),N=A(N));let P=c.insert(`g`,`:first-child`);return P.insert(()=>j),P.insert(()=>N),P.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),T(t,P),t.intersect=function(e){return G.polygon(t,w,e)},c}e(et,`multiRect`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,g=f+(u?p/2:-p/2),_=-d/2,v=-g/2,{cssStyles:y}=t,b=O(_-10,v+g+10,_+d-10,v+g+10,p,.8),x=b?.[b.length-1],w=[{x:_-10,y:v+10},{x:_-10,y:v+g+10},...b,{x:_+d-10,y:x.y-10},{x:_+d,y:x.y-10},{x:_+d,y:x.y-20},{x:_+d+10,y:x.y-20},{x:_+d+10,y:v-10},{x:_+10,y:v-10},{x:_+10,y:v},{x:_,y:v},{x:_,y:v+10}],k=[{x:_,y:v+10},{x:_+d-10,y:v+10},{x:_+d-10,y:x.y-10},{x:_+d,y:x.y-10},{x:_+d,y:v},{x:_,y:v}],A=S.svg(i),j=m(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`);let M=D(w),N=A.path(M,j),P=D(k),F=A.path(P,j),I=i.insert(()=>N,`:first-child`);return I.insert(()=>F),I.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,r),I.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),T(t,I),t.intersect=function(e){return G.polygon(t,w,e)},i}e(tt,`multiWaveEdgedRectangle`);async function nt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=h(t);t.labelStyle=r,t.useHtmlLabels||a(o())||(t.centerLabel=!0);let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=Math.max(c.width+(t.padding??0)*2,t?.width??0),d=Math.max(c.height+(t.padding??0)*2,t?.height??0),f=-u/2,p=-d/2,{cssStyles:g}=t,_=S.svg(s),v=m(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=_.rectangle(f,p,u,d,v),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),g&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,g),i&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),T(t,b),t.intersect=function(e){return G.rect(t,e)},s}e(nt,`note`);var rt=e((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function it(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=S.svg(i),n=m(t,{}),r=rt(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),T(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=G.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}e(it,`question`);async function at(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width??c.width)+(t.look===`neo`?a*2:a),d=(t?.height??c.height)+(t.look===`neo`?o*2:o),f=-u/2,p=-d/2,g=p/2,_=[{x:f+g,y:p},{x:f,y:0},{x:f+g,y:-p},{x:-f,y:-p},{x:-f,y:p}],{cssStyles:v}=t,y=S.svg(s),b=m(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=D(_),w=y.path(x,b),O=s.insert(()=>w,`:first-child`);return O.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-g/2},0)`),l.attr(`transform`,`translate(${-g/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,_,e)},s}e(at,`rect_left_inv_arrow`);async function ot(e,n){let{labelStyles:r,nodeStyles:i}=h(n);n.labelStyle=r;let o;o=n.cssClasses?`node `+n.cssClasses:`node default`;let s=e.insert(`g`).attr(`class`,o).attr(`id`,n.domId||n.id),l=s.insert(`g`),d=s.insert(`g`).attr(`class`,`label`).attr(`style`,i),f=n.description,p=n.label,g=await M(d,p,n.labelStyle,!0,!0),_={width:0,height:0};if(a(c())){let e=g.children[0],t=u(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}t.info(`Text 2`,f);let v=f||[],y=g.getBBox(),b=await M(d,Array.isArray(v)?v.join(`<br/>`):v,n.labelStyle,!0,!0),x=b.children[0],C=u(b);_=x.getBoundingClientRect(),C.attr(`width`,_.width),C.attr(`height`,_.height);let w=(n.padding||0)/2;u(b).attr(`transform`,`translate( `+(_.width>y.width?0:(y.width-_.width)/2)+`, `+(y.height+w+5)+`)`),u(g).attr(`transform`,`translate( `+(_.width<y.width?0:-(y.width-_.width)/2)+`, 0)`),_=d.node().getBBox(),d.attr(`transform`,`translate(`+-_.width/2+`, `+(-_.height/2-w+3)+`)`);let E=_.width+(n.padding||0),D=_.height+(n.padding||0),O=-_.width/2-w,k=-_.height/2-w,A,j;if(n.look===`handDrawn`){let e=S.svg(s),r=m(n,{}),i=e.path(N(O,k,E,D,n.rx||0),r),a=e.line(-_.width/2-w,-_.height/2-w+y.height+w,_.width/2+w,-_.height/2-w+y.height+w,r);j=s.insert(()=>(t.debug(`Rough node insert CXC`,i),a),`:first-child`),A=s.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`)}else A=l.insert(`rect`,`:first-child`),j=l.insert(`line`),A.attr(`class`,`outer title-state`).attr(`style`,i).attr(`x`,-_.width/2-w).attr(`y`,-_.height/2-w).attr(`width`,_.width+(n.padding||0)).attr(`height`,_.height+(n.padding||0)),j.attr(`class`,`divider`).attr(`x1`,-_.width/2-w).attr(`x2`,_.width/2+w).attr(`y1`,-_.height/2-w+y.height+w).attr(`y2`,-_.height/2-w+y.height+w);return T(n,A),n.intersect=function(e){return G.rect(n,e)},s}e(ot,`rectWithTitle`);async function st(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return we(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}e(st,`roundedRect`);var Z=8;async function ct(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?Z:Z*2),u=(t?.height??s.height)+a*2,d=l-Z,f=u,g=Z-l/2,_=-u/2,{cssStyles:v}=t,y=S.svg(o),b=m(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:g,y:_},{x:g+d,y:_},{x:g+d,y:_+f},{x:g-Z,y:_+f},{x:g-Z,y:_},{x:g,y:_},{x:g,y:_+f}],w=y.polygon(x.map(e=>[e.x,e.y]),b),D=o.insert(()=>w,`:first-child`);return D.attr(`class`,`basic label-container outer-path`).attr(`style`,p(v)),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),v&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${Z/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,D),t.intersect=function(e){return G.rect(t,e)},o}e(ct,`shadedProcess`);async function lt(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,g=-f/2,_=-p/2,{cssStyles:v}=t,y=S.svg(s),b=m(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:g,y:_},{x:g,y:_+p},{x:g+f,y:_+p},{x:g+f,y:_-p/2}],w=D(x),O=y.path(w,b),k=s.insert(()=>O,`:first-child`);return k.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,r),k.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),T(t,k),t.intersect=function(e){return G.polygon(t,x,e)},s}e(lt,`slopedRect`);async function ut(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return we(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}e(ut,`squareRect`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=S.svg(s),g=m(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...k(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...k(u/2-d,0,d,50,270,450)],v=D(_),y=p.path(v,g),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),T(t,b),t.intersect=function(e){return G.polygon(t,_,e)},s}e(dt,`stadium`);async function ft(e,t){return we(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}e(ft,`state`);function pt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=h(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=S.svg(u),f=m(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),g=s??c,_=(t.width??0)*5/14,v=d.circle(0,0,_,{...f,fill:g,stroke:g,strokeWidth:2,fillStyle:`solid`}),y=u.insert(()=>p,`:first-child`);if(y.insert(()=>v),t.look!==`handDrawn`&&y.attr(`class`,`outer-path`),a&&y.selectAll(`path`).attr(`style`,a),i&&y.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;y.attr(`style`,`filter:url(#${n})`)}return T(t,y),t.intersect=function(e){return G.circle(t,(t.width??0)/2,e)},u}e(pt,`stateEnd`);function mt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=S.svg(a).circle(0,0,t.width,g(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return T(t,o),t.intersect=function(e){return G.circle(t,(t.width??7)/2,e)},a}e(mt,`stateStart`);var ht=8;async function gt(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+2*ht+a,u=(t?.height??c.height)+o,d=l-2*ht,f=u,g=-l/2,_=-u/2,v=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=S.svg(s),n=m(t,{}),r=e.rectangle(g,_,d+16,f,n),i=e.line(g+ht,_,g+ht,_+f,n),a=e.line(g+ht+d,_,g+ht+d,_+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,p(c)),T(t,o)}else{let e=q(s,d,f,v);r&&e.attr(`style`,r),T(t,e)}return t.intersect=function(e){return G.polygon(t,v,e)},s}e(gt,`subroutine`);var _t=.2;async function vt(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-_t*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height?t?.height:c.height)+o*2,u=_t*l,d=_t*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,g=-f/2,_=-p/2,{cssStyles:v}=t,y=S.svg(s),b=m(t,{}),x=[{x:g-u/2,y:_},{x:g+f+u/2,y:_},{x:g+f+u/2,y:_+p},{x:g-u/2,y:_+p}],w=[{x:g+f-u/2,y:_+p},{x:g+f+u/2,y:_+p},{x:g+f+u/2,y:_+p-d}];t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let O=D(x),k=y.path(O,b),A=D(w),j=y.path(A,{...b,fillStyle:`solid`}),M=s.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),T(t,M),t.intersect=function(e){return G.polygon(t,x,e)},s}e(vt,`taggedRect`);async function yt(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,g=S.svg(i),_=m(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:-s/2-s/2*.1,y:f/2},...O(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],y=-s/2+s/2*.1,b=-f/2-d*.4,x=[{x:y+s-u,y:(b+c)*1.3},{x:y+s,y:b+c-d},{x:y+s,y:(b+c)*.9},...O(y+s,(b+c)*1.25,y+s-u,(b+c)*1.3,-c*.02,.5)],w=D(v),k=g.path(w,_),A=D(x),j=g.path(A,{..._,fillStyle:`solid`}),M=i.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),T(t,M),t.intersect=function(e){return G.polygon(t,v,e)},i}e(yt,`taggedWaveEdgedRectangle`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=h(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),T(t,u),t.intersect=function(e){return G.rect(t,e)},i}e(bt,`text`);var xt=e((e,t,n,r,i,a)=>`M${e},${t}
3
3
  a${i},${a} 0,0,1 0,${-r}
4
4
  l${n},0
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{f as t,x as n}from"./chunk-I66GZJ75-Mkx0wAj8.js";import{p as r}from"./chunk-NSK5VX7P-BytRcAia.js";var i=e(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`);async function a(i,a){let o=i.getElementsByTagName(`img`);if(!o||o.length===0)return;let s=a.replace(/<img[^>]*>/g,``).trim()===``;await Promise.all([...o].map(i=>new Promise(a=>{function o(){if(i.style.display=`flex`,i.style.flexDirection=`column`,s){let[e=t.fontSize]=r(n().fontSize?n().fontSize:window.getComputedStyle(document.body).fontSize),a=e*5+`px`;i.style.minWidth=a,i.style.maxWidth=a}else i.style.width=`100%`;a(i)}e(o,`setupImage`),setTimeout(()=>{i.complete&&o()}),i.addEventListener(`error`,o),i.addEventListener(`load`,o)})))}e(a,`configureLabelImages`);export{i as n,a as t};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{f as t,x as n}from"./chunk-I66GZJ75-CJhve8_m.js";import{p as r}from"./chunk-NSK5VX7P-CcEZtfre.js";var i=e(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`);async function a(i,a){let o=i.getElementsByTagName(`img`);if(!o||o.length===0)return;let s=a.replace(/<img[^>]*>/g,``).trim()===``;await Promise.all([...o].map(i=>new Promise(a=>{function o(){if(i.style.display=`flex`,i.style.flexDirection=`column`,s){let[e=t.fontSize]=r(n().fontSize?n().fontSize:window.getComputedStyle(document.body).fontSize),a=e*5+`px`;i.style.minWidth=a,i.style.maxWidth=a}else i.style.width=`100%`;a(i)}e(o,`setupImage`),setTimeout(()=>{i.complete&&o()}),i.addEventListener(`error`,o),i.addEventListener(`load`,o)})))}e(a,`configureLabelImages`);export{i as n,a as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{x as t}from"./chunk-I66GZJ75-Mkx0wAj8.js";var n=e(e=>{let{handDrawnSeed:n}=t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:n}},`solidStateFill`),r=e(e=>{let t=i([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),i=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),a=e(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`),o=e(e=>{let{stylesArray:t}=r(e),n=[],i=[],o=[],s=[];return t.forEach(e=>{let t=e[0];a(t)?n.push(e.join(`:`)+` !important`):(i.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&o.push(e.join(`:`)+` !important`),t===`fill`&&s.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:i.join(`;`),stylesArray:t,borderStyles:o,backgroundStyles:s}},`styles2String`),s=e((e,n)=>{let{themeVariables:i,handDrawnSeed:a}=t(),{nodeBorder:o,mainBkg:s}=i,{stylesMap:l}=r(e);return Object.assign({roughness:.7,fill:l.get(`fill`)||s,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:l.get(`stroke`)||o,seed:a,strokeWidth:l.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:c(l.get(`stroke-dasharray`))},n)},`userNodeOverrides`),c=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);export{s as a,o as i,a as n,n as r,r as t};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{x as t}from"./chunk-I66GZJ75-CJhve8_m.js";var n=e(e=>{let{handDrawnSeed:n}=t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:n}},`solidStateFill`),r=e(e=>{let t=i([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),i=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),a=e(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`),o=e(e=>{let{stylesArray:t}=r(e),n=[],i=[],o=[],s=[];return t.forEach(e=>{let t=e[0];a(t)?n.push(e.join(`:`)+` !important`):(i.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&o.push(e.join(`:`)+` !important`),t===`fill`&&s.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:i.join(`;`),stylesArray:t,borderStyles:o,backgroundStyles:s}},`styles2String`),s=e((e,n)=>{let{themeVariables:i,handDrawnSeed:a}=t(),{nodeBorder:o,mainBkg:s}=i,{stylesMap:l}=r(e);return Object.assign({roughness:.7,fill:l.get(`fill`)||s,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:l.get(`stroke`)||o,seed:a,strokeWidth:l.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:c(l.get(`stroke-dasharray`))},n)},`userNodeOverrides`),c=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);export{s as a,o as i,a as n,n as r,r as t};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{t}from"./src-CP90en3s.js";import{A as n,F as r,b as i,s as a,z as o}from"./chunk-I66GZJ75-Mkx0wAj8.js";import{C as s}from"./src-BCu1z_qw.js";import{a as c}from"./chunk-NSK5VX7P-BytRcAia.js";import{n as l,t as u}from"./chunk-4I5QYGJK-Dp669PmE.js";function d(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var f=d();function p(e){f=e}var m={exec:()=>null};function h(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(_.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var g=(()=>{try{return!0}catch{return!1}})(),_={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+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},ee=/^(?:[ \t]*(?:\n|$))+/,te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ne=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,re=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,y=/(?:[*+-]|\d{1,9}[.)])/,ie=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ae=h(ie).replace(/bull/g,y).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(),oe=h(ie).replace(/bull/g,y).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(),b=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,se=/^[^\n]+/,x=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ce=h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,x).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),le=h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,y).getRegex(),S=`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`,C=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ue=h(`^ {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`,C).replace(`tag`,S).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de=h(b).replace(`hr`,v).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`,S).getRegex(),w={blockquote:h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,de).getRegex(),code:te,def:ce,fences:ne,heading:re,hr:v,html:ue,lheading:ae,list:le,newline:ee,paragraph:de,table:m,text:se},fe=h(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,v).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`,S).getRegex(),pe={...w,lheading:oe,table:fe,paragraph:h(b).replace(`hr`,v).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,fe).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`,S).getRegex()},me={...w,html:h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,C).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:m,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:h(b).replace(`hr`,v).replace(`heading`,` *#{1,6} *[^
1
+ import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import{t}from"./src-CP90en3s.js";import{A as n,F as r,b as i,s as a,z as o}from"./chunk-I66GZJ75-CJhve8_m.js";import{C as s}from"./src-BCu1z_qw.js";import{a as c}from"./chunk-NSK5VX7P-CcEZtfre.js";import{n as l,t as u}from"./chunk-4I5QYGJK-BvE0r05N.js";function d(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var f=d();function p(e){f=e}var m={exec:()=>null};function h(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(_.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var g=(()=>{try{return!0}catch{return!1}})(),_={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+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},ee=/^(?:[ \t]*(?:\n|$))+/,te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ne=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,re=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,y=/(?:[*+-]|\d{1,9}[.)])/,ie=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ae=h(ie).replace(/bull/g,y).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(),oe=h(ie).replace(/bull/g,y).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(),b=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,se=/^[^\n]+/,x=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ce=h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,x).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),le=h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,y).getRegex(),S=`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`,C=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ue=h(`^ {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`,C).replace(`tag`,S).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de=h(b).replace(`hr`,v).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`,S).getRegex(),w={blockquote:h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,de).getRegex(),code:te,def:ce,fences:ne,heading:re,hr:v,html:ue,lheading:ae,list:le,newline:ee,paragraph:de,table:m,text:se},fe=h(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,v).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`,S).getRegex(),pe={...w,lheading:oe,table:fe,paragraph:h(b).replace(`hr`,v).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,fe).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`,S).getRegex()},me={...w,html:h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,C).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:m,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:h(b).replace(`hr`,v).replace(`heading`,` *#{1,6} *[^
2
2
  ]`).replace(`lheading`,ae).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},he=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ge=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_e=/^( {2,}|\\)\n(?!\s*$)/,ve=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,T=/[\p{P}\p{S}]/u,E=/[\s\p{P}\p{S}]/u,ye=/[^\s\p{P}\p{S}]/u,be=h(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,E).getRegex(),xe=/(?!~)[\p{P}\p{S}]/u,Se=/(?!~)[\s\p{P}\p{S}]/u,Ce=/(?:[^\s\p{P}\p{S}]|~)/u,we=h(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,g?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),D=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Te=h(D,`u`).replace(/punct/g,T).getRegex(),Ee=h(D,`u`).replace(/punct/g,xe).getRegex(),O=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,De=h(O,`gu`).replace(/notPunctSpace/g,ye).replace(/punctSpace/g,E).replace(/punct/g,T).getRegex(),Oe=h(O,`gu`).replace(/notPunctSpace/g,Ce).replace(/punctSpace/g,Se).replace(/punct/g,xe).getRegex(),ke=h(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ye).replace(/punctSpace/g,E).replace(/punct/g,T).getRegex(),Ae=h(/\\(punct)/,`gu`).replace(/punct/g,T).getRegex(),je=h(/^<(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(),Me=h(C).replace(`(?:-->|$)`,`-->`).getRegex(),Ne=h(`^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`,Me).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),k=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Pe=h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,k).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),A=h(/^!?\[(label)\]\[(ref)\]/).replace(`label`,k).replace(`ref`,x).getRegex(),j=h(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,x).getRegex(),Fe=h(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,A).replace(`nolink`,j).getRegex(),Ie=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,M={_backpedal:m,anyPunctuation:Ae,autolink:je,blockSkip:we,br:_e,code:ge,del:m,emStrongLDelim:Te,emStrongRDelimAst:De,emStrongRDelimUnd:ke,escape:he,link:Pe,nolink:j,punctuation:be,reflink:A,reflinkSearch:Fe,tag:Ne,text:ve,url:m},Le={...M,link:h(/^!?\[(label)\]\((.*?)\)/).replace(`label`,k).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,k).getRegex()},N={...M,emStrongRDelimAst:Oe,emStrongLDelim:Ee,url:h(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Ie).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:h(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Ie).getRegex()},Re={...N,br:h(_e).replace(`{2,}`,`*`).getRegex(),text:h(N.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},P={normal:w,gfm:pe,pedantic:me},F={normal:M,gfm:N,breaks:Re,pedantic:Le},ze={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Be=e=>ze[e];function I(e,t){if(t){if(_.escapeTest.test(e))return e.replace(_.escapeReplace,Be)}else if(_.escapeTestNoEncode.test(e))return e.replace(_.escapeReplaceNoEncode,Be);return e}function Ve(e){try{e=encodeURI(e).replace(_.percentDecode,`%`)}catch{return null}return e}function He(e,t){let n=e.replace(_.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(_.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(_.slashPipe,`|`);return n}function L(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Ue(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function We(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Ge(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
3
3
  `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
4
4
  `)}var R=class{options;rules;lexer;constructor(e){this.options=e||f}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:L(e,`
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import"./src-CP90en3s.js";import"./chunk-I66GZJ75-CJhve8_m.js";import"./chunk-NSK5VX7P-CcEZtfre.js";import"./chunk-W5SLKNZC-Dw_hS9zr.js";import"./chunk-UBXNYLIW-CGvZjPjz.js";import"./chunk-4I5QYGJK-BvE0r05N.js";import"./chunk-WRU74C26-Ct6yd0-T.js";import"./chunk-QR6OTTB3-qF4HoiE9.js";import"./chunk-7BUUIJ7U-2u7V-5wt.js";import"./chunk-7Z6QIM7H-rwCNkfVu.js";import"./chunk-J7OUQ5F2-DS7HkZLi.js";import"./chunk-2GRJ4B5K-ClzGKqzp.js";import"./chunk-XXDRQBXY-TtItiY2c.js";import"./chunk-KBJHAD2P-DK3QrMpY.js";import{i as t,n,r,t as i}from"./chunk-GF5L2VYU-BBflv717.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-DouB_olA.js";import"./src-CP90en3s.js";import"./chunk-I66GZJ75-CJhve8_m.js";import"./chunk-NSK5VX7P-CcEZtfre.js";import"./chunk-W5SLKNZC-Dw_hS9zr.js";import"./chunk-UBXNYLIW-CGvZjPjz.js";import"./chunk-4I5QYGJK-BvE0r05N.js";import"./chunk-WRU74C26-Ct6yd0-T.js";import"./chunk-QR6OTTB3-qF4HoiE9.js";import"./chunk-7BUUIJ7U-2u7V-5wt.js";import"./chunk-7Z6QIM7H-rwCNkfVu.js";import"./chunk-J7OUQ5F2-DS7HkZLi.js";import"./chunk-2GRJ4B5K-ClzGKqzp.js";import"./chunk-XXDRQBXY-TtItiY2c.js";import"./chunk-KBJHAD2P-DK3QrMpY.js";import{i as t,n,r,t as i}from"./chunk-GF5L2VYU-BBflv717.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -1 +1 @@
1
- var e=`ok.client.surface`,t={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function n({hasDesktopBridge:e,embeddedHost:t}){return e?`desktop`:t===null?`browser`:`embedded:${t}`}function r({kind:e,runtimeVersion:n}){return{[t.protocol]:`2`,[t.runtime]:n,[t.kind]:e}}function i({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var a={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/};function o(){if(typeof navigator>`u`)return null;let e=navigator.userAgent;for(let[t,n]of Object.entries(a))if(n.test(e))return t;return null}var s={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.87.0`}?.VITE_APP_VERSION??`0.0.0-unknown`,c=n({hasDesktopBridge:typeof window<`u`&&window.okDesktop!==void 0,embeddedHost:o()});function l(){return r({kind:c,runtimeVersion:s})}function u(){return i({kind:c,runtimeVersion:s})}export{o as a,u as i,c as n,e as o,l as r,s as t};
1
+ var e=`ok.client.surface`,t={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function n({hasDesktopBridge:e,embeddedHost:t}){return e?`desktop`:t===null?`browser`:`embedded:${t}`}function r({kind:e,runtimeVersion:n}){return{[t.protocol]:`2`,[t.runtime]:n,[t.kind]:e}}function i({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var a={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/};function o(){if(typeof navigator>`u`)return null;let e=navigator.userAgent;for(let[t,n]of Object.entries(a))if(n.test(e))return t;return null}var s={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.87.2-beta.0`}?.VITE_APP_VERSION??`0.0.0-unknown`,c=n({hasDesktopBridge:typeof window<`u`&&window.okDesktop!==void 0,embeddedHost:o()});function l(){return r({kind:c,runtimeVersion:s})}function u(){return i({kind:c,runtimeVersion:s})}export{o as a,u as i,c as n,e as o,l as r,s as t};
@@ -1,3 +1,3 @@
1
- import{I as e,J as t,M as n,t as r}from"./dist-BosZaL03.js";import{r as i}from"./desktop-bridge-p6CFXLIz.js";function a(e){if(typeof e!=`object`||!e||!Object.hasOwn(e,`escapedChars`))return{kind:`absent`};let t=e.escapedChars;return Array.isArray(t)&&t.every(e=>{if(typeof e!=`object`||!e)return!1;let t=e.offset;return typeof t==`number`&&Number.isInteger(t)&&t>=0&&typeof e.char==`string`})?{kind:`valid`,data:{escapedChars:t}}:{kind:`malformed`}}function o(e){return a(e).kind===`valid`}function s(e,t,n){return e[t]===`\\`&&t+1<e.length&&e[t+1]===n}function c(e,t,n,r){let i=t,a=0;for(;a<r&&i<e.length;){let t=a>0&&n[a-1]===`
1
+ import{I as e,J as t,M as n,t as r}from"./dist-B8KZUrr_.js";import{r as i}from"./desktop-bridge-BJzXwZwD.js";function a(e){if(typeof e!=`object`||!e||!Object.hasOwn(e,`escapedChars`))return{kind:`absent`};let t=e.escapedChars;return Array.isArray(t)&&t.every(e=>{if(typeof e!=`object`||!e)return!1;let t=e.offset;return typeof t==`number`&&Number.isInteger(t)&&t>=0&&typeof e.char==`string`})?{kind:`valid`,data:{escapedChars:t}}:{kind:`malformed`}}function o(e){return a(e).kind===`valid`}function s(e,t,n){return e[t]===`\\`&&t+1<e.length&&e[t+1]===n}function c(e,t,n,r){let i=t,a=0;for(;a<r&&i<e.length;){let t=a>0&&n[a-1]===`
2
2
  `?u(e,i,n[a]):null;t!==null&&(i=t),i+=s(e,i,n[a])?2:1,a+=1}return i}function l(e,t,n){return e[t]===n||s(e,t,n)}function u(e,t,n){let r=t,i=!1;for(;;){let t=r;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r+=1;if(e[r]===`>`){r+=1,(e[r]===` `||e[r]===` `)&&(r+=1),i=!0;continue}r>t&&(i=!0);break}return i&&l(e,r,n)?r:null}function d(e){return o(e.data)?new Set(e.data.escapedChars.map(e=>e.offset)):null}function f(e,t,n){return e.filter(e=>e.offset>=t&&e.offset<n).map(e=>({...e,offset:e.offset-t}))}function p(e,t,n){return e.filter(e=>e.offset>=t&&e.offset+e.length<=n).map(e=>({...e,offset:e.offset-t}))}function m(e,t,n,r){let i={type:`text`,value:t.value.slice(n,r)},a=v(e,t,n,r);a&&(i.position=a);let s;if(o(t.data)&&(s={escapedChars:f(t.data.escapedChars,n,r)}),t.data?.entityRefSpans?.length){let e=p(t.data.entityRefSpans,n,r);e.length>0&&(s={...s,entityRefSpans:e})}return s&&(i.data=s),i}function h(e,t,n){if(e===null||e.size===0)return!1;for(let r=0;r<n;r++)if(e.has(t+r))return!0;return!1}function g(e,t){let n=1,r=1;for(let i=0;i<t&&i<e.length;i++)e[i]===`
3
3
  `?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function _(e,t,n){return{start:g(e,t),end:g(e,n)}}function v(e,t,n,r){if(!e||!t.position||typeof t.position.start?.offset!=`number`)return;let i=t.position.start.offset;return _(e,c(e,i,t.value,n),c(e,i,t.value,r))}var y=`[\\p{L}\\p{M}\\p{N}_/-]`,b=`(?:(?!\\p{DI})${y})`,x=`(?!\\p{DI})\\p{L}${b}*`,S=`(^|\\s)#(${x})(?!\\p{DI}*${y})`;function C(){return new RegExp(S,`gu`)}var w=C(),T=RegExp(`^${x}$`,`u`);function E(e,t=``){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value,a=d(i);w.lastIndex=0;let o=[],s=0;for(;;){let n=w.exec(e);if(n===null)break;let c=n[1]??``,l=n[2]??``,u=n.index+c.length;if(h(a,u,1))continue;u>s&&o.push(m(t,i,s,u));let d={type:`tag`,value:l},f=v(t,i,u,u+1+l.length);f&&(d.position=f),o.push(d),s=u+1+l.length,r=!0}o.length===0?n.push(i):(s<e.length&&o.push(m(t,i,s,e.length)),n.push(...o))}r&&(e.children=n)}function D(e){if(typeof e!=`string`||!e.startsWith(`/`))return e;let t=globalThis.window?.okDesktop?.config?.apiOrigin;return typeof t==`string`&&t?t+e:e}var O=new class{byExt=new Map;viewerUnregisterFns=new WeakMap;register(e){let t=this.viewerUnregisterFns.get(e);if(t)return t;for(let t of e.exts){let n=t.toLowerCase(),r=this.byExt.get(n);r&&r!==e&&console.warn(JSON.stringify({event:`asset-viewer-collision`,ext:n,priorExts:r.exts,newExts:e.exts})),this.byExt.set(n,e)}let n=!1,r=()=>{if(!n){n=!0;for(let t of e.exts){let n=t.toLowerCase();this.byExt.get(n)===e&&this.byExt.delete(n)}this.viewerUnregisterFns.delete(e)}};return this.viewerUnregisterFns.set(e,r),r}lookup(e){let t=this.byExt.get(e.toLowerCase());return t?{ok:!0,viewer:t}:{ok:!1}}clearForTests(){this.byExt.clear(),this.viewerUnregisterFns=new WeakMap}get size(){return this.byExt.size}};function k(e){globalThis.window?.open(e,`_blank`,`noopener,noreferrer`)}async function A(e,t={}){let n=t.registry??O,r=`desktopBridge`in t?t.desktopBridge:globalThis.window?.okDesktop,a=t.openUrl??k;if(!e.forceOsDelegation){let t=n.lookup(e.ext);if(t.ok){t.viewer.render(e);return}}if(r){let t=await r.shell.openAsset(e.projectRelPath);if(!t.ok){if(i(t.reason)){let t=await r.shell.revealAsset(e.projectRelPath);t.ok||console.warn(`[asset-dispatch] revealAsset failed:`,t.reason,{projectRelPath:e.projectRelPath,ext:e.ext});return}console.warn(`[asset-dispatch] openAsset refused:`,t.reason,{projectRelPath:e.projectRelPath,ext:e.ext})}return}a(e.url)}var j=r.define([{tag:[e.heading,e.heading1,e.heading2,e.heading3],color:`var(--syntax-func)`,fontWeight:`bold`},{tag:[e.heading4,e.heading5,e.heading6],color:`var(--syntax-func)`},{tag:e.strong,fontWeight:`bold`,color:`var(--foreground)`},{tag:e.emphasis,fontStyle:`italic`,color:`var(--foreground)`},{tag:e.strikethrough,textDecoration:`line-through`},{tag:e.link,color:`var(--link-color)`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:e.url,color:`var(--syntax-attr)`},{tag:e.monospace,color:`var(--syntax-string)`},{tag:e.quote,color:`var(--syntax-comment)`,fontStyle:`italic`},{tag:e.list,color:`var(--syntax-keyword)`},{tag:e.contentSeparator,color:`var(--syntax-comment)`},{tag:e.processingInstruction,color:`var(--muted-foreground)`},{tag:[e.comment,e.lineComment,e.blockComment],color:`var(--syntax-comment)`,fontStyle:`italic`},{tag:[e.meta,e.annotation,e.namespace],color:`var(--syntax-meta)`},{tag:e.docComment,color:`var(--syntax-comment)`,fontStyle:`italic`},{tag:[e.keyword,e.controlKeyword,e.moduleKeyword,e.operatorKeyword],color:`var(--syntax-keyword)`,fontWeight:`600`},{tag:[e.modifier,e.self],color:`var(--syntax-keyword)`},{tag:e.tagName,color:`var(--syntax-tag)`},{tag:[e.typeName,e.className],color:`var(--syntax-type)`},{tag:[e.attributeName,e.propertyName],color:`var(--syntax-attr)`},{tag:[e.variableName,e.macroName],color:`var(--syntax-var)`},{tag:[e.function(e.variableName),e.definition(e.name),e.labelName],color:`var(--syntax-func)`},{tag:[e.string,e.character,e.special(e.string)],color:`var(--syntax-string)`},{tag:[e.number,e.integer,e.float,e.literal],color:`var(--syntax-number)`},{tag:[e.bool,e.null,e.atom,e.constant(e.name),e.standard(e.name)],color:`var(--syntax-atom)`},{tag:[e.regexp,e.escape],color:`var(--syntax-atom)`},{tag:e.color,color:`var(--syntax-atom)`},{tag:[e.operator,e.punctuation,e.separator,e.bracket,e.brace,e.paren,e.squareBracket,e.angleBracket],color:`var(--syntax-operator)`},{tag:e.inserted,color:`var(--diff-added)`},{tag:e.deleted,color:`var(--diff-removed)`},{tag:e.changed,color:`var(--syntax-number)`},{tag:e.invalid,color:`var(--destructive)`}]);function M(e){let n=e.background??`transparent`,r=e.gutterBackground??`transparent`;return t.theme({"&":{color:`var(--foreground)`,backgroundColor:n},".cm-content":{caretColor:`var(--foreground)`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--foreground)`},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:`var(--selection-soft)`},".cm-selectionMatch":{backgroundColor:`color-mix(in oklab, var(--syntax-type) 30%, transparent)`},".cm-gutters":{backgroundColor:r,color:`var(--muted-foreground)`,border:`none`},".cm-activeLine":{backgroundColor:`color-mix(in oklab, var(--foreground) 4%, transparent)`},".cm-activeLineGutter":{backgroundColor:`transparent`,color:`var(--foreground)`},".cm-foldPlaceholder":{backgroundColor:`var(--muted)`,color:`var(--muted-foreground)`,border:`none`},".cm-panels":{backgroundColor:`var(--popover)`,color:`var(--popover-foreground)`},".cm-searchMatch":{backgroundColor:`color-mix(in oklab, var(--syntax-type) 30%, transparent)`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`color-mix(in oklab, var(--primary) 40%, transparent)`}},{dark:e.dark})}function N(e){return[M(e),n(j,{fallback:!0})]}export{x as a,E as c,o as d,h as f,D as i,v as l,a as m,j as n,T as o,m as p,A as r,b as s,N as t,d as u};
@@ -1 +1 @@
1
- import{t as e}from"./javascript-Peyxd-Xr.js";import{t}from"./css-lVmy5xUg.js";import{t as n}from"./html-jUJ1RMm5.js";import{t as r}from"./json-BIKojxCg.js";import{t as i}from"./tsx-JVJ-Gvlv.js";import{t as a}from"./sql-C5hncRmt.js";import o from"./python-B_JRsip8.js";import{t as s}from"./shellscript-Bq6gkkQI.js";import c from"./diff-CgsjanCm.js";import{t as l}from"./docker-DggXrXCI.js";import{t as u}from"./yaml-3C9msPL-.js";import d from"./markdown-CPuGaFoM.js";import f from"./go-Dj_EBwpC.js";import p from"./rust-83LzNzFg.js";import m from"./toml-B4QGPm05.js";import{r as h,t as g}from"./engine-compile-DCFDOxYT.js";import{n as _,t as v}from"./ok-syntax-theme-DvmmMFpb.js";var y=null;function b(){return y??=h({themes:[_],langs:[t,c,l,f,n,e,r,d,o,p,s,a,m,i,u],engine:g({forgiving:!0})}).catch(e=>{throw y=null,e}),y}async function x(e,t){let n=await b(),r=n.getLoadedLanguages().includes(t)?t:`text`;return n.codeToTokens(e,{lang:r,theme:v})}export{x as tokenize};
1
+ import{t as e}from"./javascript-Peyxd-Xr.js";import{t}from"./css-lVmy5xUg.js";import{t as n}from"./html-jUJ1RMm5.js";import{t as r}from"./json-BIKojxCg.js";import{t as i}from"./tsx-JVJ-Gvlv.js";import{t as a}from"./sql-C5hncRmt.js";import o from"./python-B_JRsip8.js";import{t as s}from"./shellscript-Bq6gkkQI.js";import c from"./diff-CgsjanCm.js";import{t as l}from"./docker-DggXrXCI.js";import{t as u}from"./yaml-3C9msPL-.js";import d from"./markdown-CPuGaFoM.js";import f from"./go-Dj_EBwpC.js";import p from"./rust-83LzNzFg.js";import m from"./toml-B4QGPm05.js";import{r as h,t as g}from"./engine-compile-D75sBEQx.js";import{n as _,t as v}from"./ok-syntax-theme-DvmmMFpb.js";var y=null;function b(){return y??=h({themes:[_],langs:[t,c,l,f,n,e,r,d,o,p,s,a,m,i,u],engine:g({forgiving:!0})}).catch(e=>{throw y=null,e}),y}async function x(e,t){let n=await b(),r=n.getLoadedLanguages().includes(t)?t:`text`;return n.codeToTokens(e,{lang:r,theme:v})}export{x as tokenize};
@@ -1,4 +1,4 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{$n as n,$r as r,Qr as i,Si as a,Ti as o,_r as s,ai as c,br as l,fr as u,hr as d,ki as f,pr as p,yr as m}from"./DocumentContext-DQjJD30Y.js";import{t as h}from"./react-f2sANaYj.js";import{n as g,r as _}from"./dist-Nvb76hAm.js";import{t as v}from"./compiler-runtime-BfE3aGVn.js";import{t as ee}from"./utils-CPqDy6Hr.js";import{i as te,n as ne,t as re}from"./tooltip-Bz6z4_se.js";import{t as ie}from"./button-DzgjsZzC.js";import{n as y}from"./dist-BGzUo_18.js";import{t as b}from"./dist-C_FzPxEX2.js";import{t as ae}from"./createLucideIcon-DdBzwsHe.js";import{gr as x,hr as oe}from"./CodeMirrorPropInput-Be-YNVIO.js";import{t as se}from"./x-DM2drskU.js";import{l as S}from"./doc-hash-BJkweiX9.js";var C=ae(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),w=v(),ce=e(h(),1),T=`ok-properties-collapsed-v1`,E=!1;function D(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}var O=null,k=new Set;function le(){let e=D();if(!e)return E;try{let t=e.getItem(T);return t===`true`?!0:t===`false`?!1:E}catch{return E}}function A(){return O===null&&(O=le()),O}function ue(e){let t=D();if(t)try{t.setItem(T,e?`true`:`false`)}catch{}}function de(){for(let e of k)e()}function fe(){return A()}function pe(e){A()!==e&&(O=e,ue(e),de())}function me(e){return k.add(e),()=>{k.delete(e)}}function he(){let e=(0,w.c)(2),t=(0,ce.useSyncExternalStore)(me,fe,ge),n;return e[0]===t?n=e[1]:(n=[t,pe],e[0]=t,e[1]=n),n}function ge(){return E}var _e=`var(--ok-comment-hue, rgb(37 99 235))`,ve={fill:.22,line:.7},ye={fill:.45,line:1},be=.45;function j(e){return`color-mix(in srgb,${_e} ${e*100}%,transparent)`}function xe(e,t){let{fill:n,line:r}=t?ye:ve;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:${j(n)}`,`box-shadow:inset 0 -2px 0 ${j(r)}`,``].join(`;`)}function Se(e){return e.map(e=>e.id??`·`).join(`|`)}function Ce(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function we(e,t){return e.id===null||e.id===t}function Te(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>we(e,t));i.push({from:a.from,to:a.to,style:xe(e??a.covering[0],e!==void 0),threadId:Ce(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&Se(a.covering)===Se(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var Ee=`data-comment-reveal`;function De(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function M(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${De(e)}"]`)}function Oe(e){let t=M(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function ke(e){M(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function N(e){if(e.quote===``)return null;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${De(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=P(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),Ae(n),n}return null}function P(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function Ae(e){e.style.setProperty(`--comment-reveal-fill`,j(be)),e.setAttribute(Ee,`true`);let t=()=>{e.removeAttribute(Ee),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}var je=new Set([`*`,`_`,"`",`~`,`\\`,`$`]),Me=/^={2,}/,F=/^<(?:[A-Za-z][A-Za-z0-9+.-]*:[^<>\s]*|[^\s<>@]+@[^\s<>]+)>/,I=512;function Ne(e,t){return F.test(e.slice(t,t+I))}function Pe(e,t){let n=e.lastIndexOf(`<`,t);return n<0||t-n>I?!1:F.exec(e.slice(n,t+1))?.[0].length===t+1-n}var Fe=/^<\/?[A-Za-z][A-Za-z0-9-]*(?:\s[^>]*?)?\/?>/,Ie=512,Le=/^!(?=\[)/,Re=/^\[\^/,ze=/^\]\[[^\]]*\]/,Be=/^\[\[[^\][|]*\|/,Ve=/^#[^\][|]*(?=\]\])/,L=512,He=/^\]\([^)]*\)/,Ue=512,We=/^(?:#{1,6}[ \t]+|>[ \t]?|(?:[-*+]|\d{1,9}[.)])[ \t]+(?:\[[ xX]\][ \t]+)?)/,Ge=32,Ke=`|`,qe=/^(?:`{3,}[^`\n]*|~{3,}[^\n]*)$/,Je=/^(?:(?:[-*_][ \t]*){3,}|=+[ \t]*|[|\-: \t]*-[|\-: \t]*)$/,Ye=1024;function Xe(e,t){let n=e.indexOf(`
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{$n as n,$r as r,Qr as i,Si as a,Ti as o,_r as s,ai as c,br as l,fr as u,hr as d,ki as f,pr as p,yr as m}from"./DocumentContext-CNfg18DN.js";import{t as h}from"./react-f2sANaYj.js";import{n as g,r as _}from"./dist-Nvb76hAm.js";import{t as v}from"./compiler-runtime-BfE3aGVn.js";import{t as ee}from"./utils-CPqDy6Hr.js";import{i as te,n as ne,t as re}from"./tooltip-Bz6z4_se.js";import{t as ie}from"./button-DzgjsZzC.js";import{n as y}from"./dist-BGzUo_18.js";import{t as b}from"./dist-C_FzPxEX2.js";import{t as ae}from"./createLucideIcon-DdBzwsHe.js";import{gr as x,hr as oe}from"./CodeMirrorPropInput-DfQjpQ6M.js";import{t as se}from"./x-DM2drskU.js";import{l as S}from"./doc-hash-BJkweiX9.js";var C=ae(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),w=v(),ce=e(h(),1),T=`ok-properties-collapsed-v1`,E=!1;function D(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}var O=null,k=new Set;function le(){let e=D();if(!e)return E;try{let t=e.getItem(T);return t===`true`?!0:t===`false`?!1:E}catch{return E}}function A(){return O===null&&(O=le()),O}function ue(e){let t=D();if(t)try{t.setItem(T,e?`true`:`false`)}catch{}}function de(){for(let e of k)e()}function fe(){return A()}function pe(e){A()!==e&&(O=e,ue(e),de())}function me(e){return k.add(e),()=>{k.delete(e)}}function he(){let e=(0,w.c)(2),t=(0,ce.useSyncExternalStore)(me,fe,ge),n;return e[0]===t?n=e[1]:(n=[t,pe],e[0]=t,e[1]=n),n}function ge(){return E}var _e=`var(--ok-comment-hue, rgb(37 99 235))`,ve={fill:.22,line:.7},ye={fill:.45,line:1},be=.45;function j(e){return`color-mix(in srgb,${_e} ${e*100}%,transparent)`}function xe(e,t){let{fill:n,line:r}=t?ye:ve;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:${j(n)}`,`box-shadow:inset 0 -2px 0 ${j(r)}`,``].join(`;`)}function Se(e){return e.map(e=>e.id??`·`).join(`|`)}function Ce(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function we(e,t){return e.id===null||e.id===t}function Te(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>we(e,t));i.push({from:a.from,to:a.to,style:xe(e??a.covering[0],e!==void 0),threadId:Ce(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&Se(a.covering)===Se(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var Ee=`data-comment-reveal`;function De(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function M(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${De(e)}"]`)}function Oe(e){let t=M(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function ke(e){M(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function N(e){if(e.quote===``)return null;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${De(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=P(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),Ae(n),n}return null}function P(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function Ae(e){e.style.setProperty(`--comment-reveal-fill`,j(be)),e.setAttribute(Ee,`true`);let t=()=>{e.removeAttribute(Ee),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}var je=new Set([`*`,`_`,"`",`~`,`\\`,`$`]),Me=/^={2,}/,F=/^<(?:[A-Za-z][A-Za-z0-9+.-]*:[^<>\s]*|[^\s<>@]+@[^\s<>]+)>/,I=512;function Ne(e,t){return F.test(e.slice(t,t+I))}function Pe(e,t){let n=e.lastIndexOf(`<`,t);return n<0||t-n>I?!1:F.exec(e.slice(n,t+1))?.[0].length===t+1-n}var Fe=/^<\/?[A-Za-z][A-Za-z0-9-]*(?:\s[^>]*?)?\/?>/,Ie=512,Le=/^!(?=\[)/,Re=/^\[\^/,ze=/^\]\[[^\]]*\]/,Be=/^\[\[[^\][|]*\|/,Ve=/^#[^\][|]*(?=\]\])/,L=512,He=/^\]\([^)]*\)/,Ue=512,We=/^(?:#{1,6}[ \t]+|>[ \t]?|(?:[-*+]|\d{1,9}[.)])[ \t]+(?:\[[ xX]\][ \t]+)?)/,Ge=32,Ke=`|`,qe=/^(?:`{3,}[^`\n]*|~{3,}[^\n]*)$/,Je=/^(?:(?:[-*_][ \t]*){3,}|=+[ \t]*|[|\-: \t]*-[|\-: \t]*)$/,Ye=1024;function Xe(e,t){let n=e.indexOf(`
2
2
  `,t),r=n===-1?e.length:n;if(r>t&&e[r-1]===`\r`&&--r,r-t>Ye)return 0;let i=e.slice(t,r);return i.length===0||!qe.test(i)&&!Je.test(i)?0:i.length}var R=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/y;function z(e,t){if(e[t]!==`&`)return null;let n=t,r=``;for(;;){R.lastIndex=n;let t=R.exec(e)?.[0];if(t===void 0)break;let i=oe(t);if(i===null)break;r+=i,n+=t.length}return n===t?null:{length:n-t,rendered:r}}function B(e){return e===` `||e===` `||e===`
3
3
  `||e===`\r`||e===`\f`||e===`\v`}function V(e,t){for(let n=t-1;n>=0;--n){let t=e[n];if(t===`
4
4
  `)return!0;if(t!==` `&&t!==` `)return!1}return!0}function H(e,t){let n=e[t];if(n===void 0)return 0;if(V(e,t)){let n=Xe(e,t);if(n>0)return n}if(n===Ke)return 1;if(n===`<`){let n=Fe.exec(e.slice(t,t+Ie))?.[0].length;return n===void 0?+!!Ne(e,t):n}if(n===`>`&&Pe(e,t))return 1;if(n===`=`){let n=Me.exec(e.slice(t,t+3))?.[0].length;if(n!==void 0)return n}if(n===`!`)return+!!Le.test(e.slice(t,t+2));if(je.has(n))return 1;if(n===`[`){let n=e.slice(t,t+L),r=Be.exec(n)?.[0].length;return r===void 0?Re.test(n)?2:1:r}if(n===`#`){let n=Ve.exec(e.slice(t,t+L))?.[0].length;if(n!==void 0)return n}if(n===`]`){if(e[t+1]===`]`)return 2;let n=e.slice(t,t+Math.max(Ue,L)),r=He.exec(n)?.[0].length;if(r!==void 0)return r;let i=ze.exec(n)?.[0].length;return i===void 0?1:i}return V(e,t)?We.exec(e.slice(t,t+Ge))?.[0].length??0:0}function U(e,t,{syntaxIn:n}){let r=[];if(t.length===0)return r;let i=n===`haystack`;for(let n=0;n<e.length;n+=1){let a=e[n];if(a===void 0||B(a)||i&&a!==t[0]&&(H(e,n)>0||z(e,n)!==null))continue;let o=n,s=0;for(;o<e.length&&s<t.length;){let n=e[o],r=t[s];if(n===r){o+=1,s+=1;continue}if(B(r)){s+=1;continue}if(B(n)){o+=1;continue}let a=i?H(e,o):H(t,s);if(a>0){i?o+=a:s+=a;continue}let c=i?z(e,o):z(t,s);if(c!==null){let n=i?t:e,r=i?s:o,a=!0;for(let e of c.rendered)if(!B(e)){for(;r<n.length&&B(n[r]);)r+=1;if(n[r]!==e){a=!1;break}r+=1}if(!a)break;i?(o+=c.length,s=r):(s+=c.length,o=r);continue}break}for(;s<t.length&&B(t[s]);)s+=1;s===t.length&&r.push({start:n,end:o})}return r}var W=8,G=64;function K(e,t,n,r){let i=``,a=Math.max(0,t),o=Math.min(e.length,n);for(;a<o;){let t=e[a];if(B(t)){a+=1;continue}if(r){let t=H(e,a);if(t>0){a+=t;continue}let n=z(e,a);if(n!==null){for(let e of n.rendered)B(e)||(i+=e);a+=n.length;continue}}i+=t,a+=1}return i}function Ze(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[e.length-1-r]===t[t.length-1-r];)r+=1;return r}function Qe(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;return r}function q(e,t,n,{syntaxIn:r,syntaxInContext:i=!1}){let a=n.prefix??``,o=n.suffix??``,s=r===`haystack`,c=0;if(a.length>0){let n=a.length*W+G;c+=Ze(K(a,0,a.length,i),K(e,t.start-n,t.start,s))}if(o.length>0){let n=o.length*W+G;c+=Qe(K(o,0,o.length,i),K(e,t.end,t.end+n,s))}return c}function $e(e,{syntaxInContext:t=!1}={}){let n=K(e.prefix??``,0,1/0,t).length+K(e.suffix??``,0,1/0,t).length;return Math.min(8,n)}function et(e){return Math.max(e*4,e+64)}function J(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let a=u(e);if(a.length>0){let t=i+e.nodeSize-1;for(let e=0;e<a.length;e++)n+=a[e],r.push(e===a.length-1?t:i)}return!0}),{text:n,positions:r}}function tt(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function Y(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:U(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:U(e,i,{syntaxIn:`needle`}).map(e=>e.start);if(a.length!==1||o.length!==1)return null;let s=a[0],c=o[0];for(;s<c&&/\s/.test(e[s]??``);)s+=1;for(;c>s&&/\s/.test(e[c-1]??``);)--c;if(c<=s)return null;let l=et(t.length);return c-s>l?null:{start:s,end:c}}function X(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function nt(e,t,n){if(t.length===0)return null;let r=tt(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=U(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=Y(e.text,t,n);return r===null?null:X(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||U(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=$e({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||q(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=Y(e.text,t,n);return r===null?null:X(e,r)}return X(e,r[0])}let l=[],u=-1;for(let t of r){let n=q(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0});n>u?(u=n,l=[t]):n===u&&l.push(t)}if(!c(l[0])){let r=Y(e.text,t,n);return r===null?null:X(e,r)}return X(e,l[0])}var rt=64;function it(e,t,n){return{prefix:p(e,Math.max(0,t-rt),t),suffix:p(e,n,Math.min(e.content.size,n+rt))}}function at(e,t,n){return ot(e)(t,n)}function ot(e){let t=J(e),n=null;return(r,i)=>{let a=nt(t,r,i);return a===null?(n??=J(e,{includeBlockComponents:!0}),nt(n,r,i)):a}}var st=220,ct=24;function lt(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-st;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+ct)}function Z(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function ut(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function dt(e,t,r,i){let a=x(e);if(!a)return!1;let o=Z(a.dom);if(!o)return n(r,`comment-reveal`,()=>e.commands.scrollIntoView());let s,c;try{s=a.coordsAtPos(t.from),c=a.coordsAtPos(t.to)}catch{return!1}let l=o.getBoundingClientRect(),u=lt({anchorTop:s.top,anchorBottom:Math.max(s.bottom,c.bottom),viewTop:l.top,viewBottom:l.bottom,insetTop:ut(o)});if(u===0)return!0;let d=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return n(r,`comment-reveal`,()=>o.scrollTo({top:o.scrollTop+u,behavior:i?.instant||d?`auto`:`smooth`}))}var ft=1e4,pt=80,mt=1500,ht=[`wheel`,`touchstart`,`mousedown`,`keydown`];function gt(e){let t=!1,n=!1,a=null,o=null,c=-1,l=()=>{let s=d(e.docName);if(!s||s.isDestroyed)return!1;if(t||(t=!0,i(e.threadId)),e.quote===``){if(a!==null)return!0;let t=e.resolveTarget?e.resolveTarget():x(s)?.dom;return e.resolveTarget&&!t?!1:(a=Date.now(),r(e.threadId),t&&e.onDestinationComplete?.(t),!0)}let l=s.state.doc.content.size;if((o===null||l!==c)&&(o=at(s.state.doc,e.quote,e.context),c=l),n=o!==null,!o||!dt(s,o,e.docName,{instant:!0}))return!1;if(a===null){a=Date.now(),r(e.threadId);let t=x(s)?.dom;t&&e.onDestinationComplete?.(t)}return!0};f(`comments`),l(),d(e.docName)===null&&(e.resolveTarget||e.onDestinationComplete?window.location.hash=S(e.docName):window.location.assign(S(e.docName)));let u=!1,p=()=>{if(!u){u=!0,g(),window.clearInterval(_),window.clearTimeout(v);for(let e of ht)window.removeEventListener(e,m,!0)}},m=()=>p(),h=()=>{l()&&a!==null&&Date.now()-a>=mt&&p()},g=s(h),_=window.setInterval(h,pt),v=window.setTimeout(()=>{a===null&&y.error(t?n?b._({id:`VBtCdv`}):b._({id:`KeXgA-`}):b._({id:`JDQ5I5`})),p()},ft);for(let e of ht)window.addEventListener(e,m,!0);h()}var Q=t();function _t(){return a().length}function vt(){let e=(0,w.c)(4),t=a(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=c(e)?.docName;t!==void 0&&n.set(t,(n.get(t)??0)+1)}e[0]=t,e[1]=n}else n=e[1];let r;return e[2]===n?r=e[3]:(r=[...n].map(yt),e[2]=n,e[3]=r),r}function yt(e){let[t,n]=e;return{docName:t,count:n}}function bt(e){let t=(0,w.c)(26),{count:n,docs:r,onDismiss:i}=e,a;t[0]===r?a=t[1]:(a=r===void 0?[]:r,t[0]=r,t[1]=a);let o=a,{_:s}=_();if(n===0)return null;let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=ee(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[2]=c):c=t[2];let l;t[3]===s?l=t[4]:(l=s({id:`2zvUIK`}),t[3]=s,t[4]=l);let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(C,{className:`size-3`}),t[5]=u):u=t[5];let d;t[6]!==n||t[7]!==o.length?(d=o.length>1?(0,Q.jsx)(g,{id:`5TmrYN`,values:{0:o.length,count:n}}):(0,Q.jsx)(g,{id:`eiUA4k`,values:{count:n}}),t[6]=n,t[7]=o.length,t[8]=d):d=t[8];let f;t[9]!==l||t[10]!==d?(f=(0,Q.jsx)(te,{asChild:!0,children:(0,Q.jsxs)(ie,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":l,onClick:St,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[u,d]})}),t[9]=l,t[10]=d,t[11]=f):f=t[11];let p;t[12]===o?p=t[13]:(p=(0,Q.jsx)(ne,{className:`max-w-64`,children:o.length>1?(0,Q.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:o.map(xt)}):(0,Q.jsx)(g,{id:`2zvUIK`})}),t[12]=o,t[13]=p);let m;t[14]!==f||t[15]!==p?(m=(0,Q.jsxs)(re,{children:[f,p]}),t[14]=f,t[15]=p,t[16]=m):m=t[16];let h;t[17]===s?h=t[18]:(h=s({id:`pFRz_E`}),t[17]=s,t[18]=h);let v;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Q.jsx)(se,{className:`size-3`}),t[19]=v):v=t[19];let y;t[20]!==i||t[21]!==h?(y=(0,Q.jsx)(ie,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":h,onClick:i,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:v}),t[20]=i,t[21]=h,t[22]=y):y=t[22];let b;return t[23]!==y||t[24]!==m?(b=(0,Q.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:c,children:[m,y]}),t[23]=y,t[24]=m,t[25]=b):b=t[25],b}function xt(e){return(0,Q.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,Q.jsx)(`span`,{className:`truncate`,children:Ct(e.docName)})]},e.docName)}function St(){return o()}function Ct(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function wt(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function Tt(e,t){let{target:n,anchor:r}=e;n.kind===`property`&&pe(!1);let i=n.kind===`property`&&r!==null?()=>N({key:n.key,path:n.path,quote:r.quote,start:r.start,end:r.end}):void 0;gt({docName:e.docName,quote:n.kind===`property`?``:r?.quote??``,threadId:e.id,context:r??void 0,onDestinationComplete:t,resolveTarget:i})}function Et(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function Dt(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${l(t,$)}`:t}function Ot(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${m(t,$)}…`:t}function kt(e){if(!e.repeats)return null;let t=Dt(e.prefix),n=Ot(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function At(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`