@inkeep/open-knowledge 0.46.0-beta.13 → 0.46.0-beta.15

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 (461) hide show
  1. package/dist/{acp-harness-probe-BfbkLxMd.mjs → acp-harness-probe-DAX_xywv.mjs} +3 -3
  2. package/dist/cli.mjs +49 -49
  3. package/dist/constants-EdMPlb3h.mjs +2 -0
  4. package/dist/fs-traced-DB5c--Vd.mjs +1 -0
  5. package/dist/{fs-traced-B-x7hAhD.mjs → fs-traced-wfI5VoOz.mjs} +4 -4
  6. package/dist/git-handle-CMWGPj44.mjs +1 -0
  7. package/dist/{git-handle-M_t2H6C-.mjs → git-handle-TtCDd9Le.mjs} +2 -2
  8. package/dist/index.d.mts +17 -1
  9. package/dist/index.mjs +1 -1
  10. package/dist/init-BT0kDAbD.mjs +1 -0
  11. package/dist/{init-DJvgtKke.mjs → init-DIP7y9dQ.mjs} +37 -37
  12. package/dist/{launch-json-removal-1939Vm-0.mjs → launch-json-removal-BRxZbYKL.mjs} +2 -2
  13. package/dist/loader-D9iWusRx.mjs +1 -0
  14. package/dist/{loader-DZ3vC2N-.mjs → loader-cpIcgfcU.mjs} +3 -3
  15. package/dist/md-manager-wJEAbIvp.mjs +2 -0
  16. package/dist/{open-browser-BsKTF04c.mjs → open-browser-BiK9JzSf.mjs} +2 -2
  17. package/dist/parse-worker.mjs +1 -1
  18. package/dist/{preview-Bfh6RWYE.mjs → preview-2rjk4dI0.mjs} +2 -2
  19. package/dist/preview-LjFEzkiH.mjs +1 -0
  20. package/dist/public/assets/ActivityModeContent-BSGDxL9R.js +1 -0
  21. package/dist/public/assets/{AgentDiffPane-DM8oQapu.js → AgentDiffPane-D7bJvGdp.js} +2 -2
  22. package/dist/public/assets/{AgentThreadClientBinder-BE7sGGt4.js → AgentThreadClientBinder-CaTryHIE.js} +1 -1
  23. package/dist/public/assets/AppMenubar-rFZzqUIz.js +1 -0
  24. package/dist/public/assets/{BugReportHistory-CaAYnGNR.js → BugReportHistory-DJY_ATlh.js} +1 -1
  25. package/dist/public/assets/{BugReportHistoryDialog-DFfft492.js → BugReportHistoryDialog-BIDjQ_82.js} +1 -1
  26. package/dist/public/assets/ChangedOutsideBadge-C-Qu_Pl8.js +1 -0
  27. package/dist/public/assets/CodeMirrorPropInput-CRKAndsx.js +3 -0
  28. package/dist/public/assets/{ConfigSharingInfoTooltip-QTCODx7g.js → ConfigSharingInfoTooltip-OJruUI3H.js} +1 -1
  29. package/dist/public/assets/{ConsentDialogBody-U4UzjnaQ.js → ConsentDialogBody-DRrUivNs.js} +1 -1
  30. package/dist/public/assets/{CopyButton-O0Y9mXoH.js → CopyButton-Dk8yDsPs.js} +1 -1
  31. package/dist/public/assets/{DiffView-kKTjtgKq.js → DiffView-DITcPuOr.js} +1 -1
  32. package/dist/public/assets/DocumentContext-COt_qsrp.js +38 -0
  33. package/dist/public/assets/EditorModeToggle-N6JjLfr-.js +1 -0
  34. package/dist/public/assets/EnableSyncConfirmDialog-Bc_A_XCY.js +1 -0
  35. package/dist/public/assets/FeedbackForm-6V4HIjNZ.js +1 -0
  36. package/dist/public/assets/{GraphPanel-DZVUW5Ne.js → GraphPanel-aAVgqxld.js} +2 -2
  37. package/dist/public/assets/ImportSkillDialog-LkmkJ0YU.js +1 -0
  38. package/dist/public/assets/{LintConfigEditor-DZEV5zwj.js → LintConfigEditor-9eXwxoS2.js} +1 -1
  39. package/dist/public/assets/ManagedArtifactProperties-Bte_ppBh.js +2 -0
  40. package/dist/public/assets/ManagedArtifactProperties-TmTNhIv4.js +1 -0
  41. package/dist/public/assets/McpConsentDialogBody-090py53F.js +1 -0
  42. package/dist/public/assets/Mermaid-BQAWkx48.js +2 -0
  43. package/dist/public/assets/MermaidDocEditor-C_G_ovY8.js +1 -0
  44. package/dist/public/assets/RegisteredAgentIcon-UInuA1Ei.js +1 -0
  45. package/dist/public/assets/ReportBugDialogBody-5eJLreAy.js +3 -0
  46. package/dist/public/assets/SchemaConfigEditor-DcJSH6Kd.js +1 -0
  47. package/dist/public/assets/SessionsHost-WDNxt2rN.js +2 -0
  48. package/dist/public/assets/SettingsDialogBody-DYeGMO3E.js +7 -0
  49. package/dist/public/assets/{ShareBranchSwitchDialog-D54uq5Dv.js → ShareBranchSwitchDialog-Dm4ZdzUl.js} +1 -1
  50. package/dist/public/assets/{ShareReceiveDialog-CoskdBM6.js → ShareReceiveDialog-Cd240Jdo.js} +1 -1
  51. package/dist/public/assets/{ShareReceiveMissDialog-Byg3PSFa.js → ShareReceiveMissDialog--hmiMg2v.js} +1 -1
  52. package/dist/public/assets/{SkillEditBanner-Dtk_Dd6-.js → SkillEditBanner-DIJcGPhx.js} +1 -1
  53. package/dist/public/assets/SkillModeBanner-BPmqGiVe.js +1 -0
  54. package/dist/public/assets/SkillOriginInline-M3Vr6Vl3.js +1 -0
  55. package/dist/public/assets/SkillToolbarControls-CkezCxAG.js +1 -0
  56. package/dist/public/assets/{SourceEditor-8qossd7Q.js → SourceEditor-D3d3_XjY.js} +1 -1
  57. package/dist/public/assets/{TerminalPanel-C4TfiKjZ.js → TerminalPanel-DEwu_bZF.js} +1 -1
  58. package/dist/public/assets/{TerminalWindowApp-BV4Va3sn.js → TerminalWindowApp-DwRc5JuX.js} +1 -1
  59. package/dist/public/assets/TextDocEditor-4ayETwjy.js +1 -0
  60. package/dist/public/assets/{ThreadView-BZlK-XfA.js → ThreadView-DDsiP7tO.js} +3 -3
  61. package/dist/public/assets/TimelineDiffPane-EP2JbHka.js +2 -0
  62. package/dist/public/assets/{abnfDiagram-VRR7QNED-CYyOqigz.js → abnfDiagram-VRR7QNED-DHJtI87X.js} +1 -1
  63. package/dist/public/assets/{agent-diff-store-BptHmEsn.js → agent-diff-store-NxhFZCYu.js} +1 -1
  64. package/dist/public/assets/agent-visibility-BVTKArCQ.js +1 -0
  65. package/dist/public/assets/{arc-DpnwTjlg.js → arc-CcVRsw3e.js} +1 -1
  66. package/dist/public/assets/architecture-TIHT7OUA-B22-UzyM.js +1 -0
  67. package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-BArScuNA.js → architectureDiagram-ZJ3FMSHR-CiwaxO5n.js} +1 -1
  68. package/dist/public/assets/arrow-up-right-CinCNAo3.js +1 -0
  69. package/dist/public/assets/auth-state-cache-DeOaKoC3.js +11 -0
  70. package/dist/public/assets/badge-DwfQ2IQa.js +1 -0
  71. package/dist/public/assets/{blockDiagram-677ZJIJ3-BKdJnykw.js → blockDiagram-677ZJIJ3-0zO7n7Sf.js} +1 -1
  72. package/dist/public/assets/{braces-CqiL3TOP.js → braces-CsvuNjsR.js} +1 -1
  73. package/dist/public/assets/button-D3xSRfT4.js +1 -0
  74. package/dist/public/assets/{c4Diagram-LMCZKHZV-BGzHBzYq.js → c4Diagram-LMCZKHZV-C662qesx.js} +1 -1
  75. package/dist/public/assets/calendar-BRay90Yd.js +1 -0
  76. package/dist/public/assets/{case-sensitive-DcowXaLf.js → case-sensitive-OXVu8f1h.js} +1 -1
  77. package/dist/public/assets/channel-DfI0YSva.js +1 -0
  78. package/dist/public/assets/check-D1JmbeH0.js +1 -0
  79. package/dist/public/assets/checkbox-Cq1BnJ3x.js +1 -0
  80. package/dist/public/assets/{chevron-down-BJumc1E_.js → chevron-down-BH5tpfEN.js} +1 -1
  81. package/dist/public/assets/chevron-left-CbL-Ysx_.js +1 -0
  82. package/dist/public/assets/chevron-right-COaV_K3r.js +1 -0
  83. package/dist/public/assets/chevron-up-CSNoGrd3.js +1 -0
  84. package/dist/public/assets/chunk-2Q5K7J3B-BSFIGC1j.js +1 -0
  85. package/dist/public/assets/{chunk-32BRIVSS-DWFi-mYl.js → chunk-32BRIVSS-CydyM0Ml.js} +1 -1
  86. package/dist/public/assets/{chunk-52WLFC77-C3ewIu0v.js → chunk-52WLFC77-cG-DvO_j.js} +1 -1
  87. package/dist/public/assets/{chunk-5FCAYU7R-DH0H_TSt.js → chunk-5FCAYU7R-Bxw_oikr.js} +1 -1
  88. package/dist/public/assets/{chunk-5HE753X5-COZLeOUQ.js → chunk-5HE753X5-DKXmxfLW.js} +1 -1
  89. package/dist/public/assets/{chunk-5JV3BV7I-BtSn9e5l.js → chunk-5JV3BV7I-DvmJcvTR.js} +1 -1
  90. package/dist/public/assets/{chunk-5TONJI2A-CyVAUHQY.js → chunk-5TONJI2A-DzotvxWN.js} +1 -1
  91. package/dist/public/assets/{chunk-5VM5RSS4-DkfDxTnu.js → chunk-5VM5RSS4-BhXaeUUw.js} +1 -1
  92. package/dist/public/assets/{chunk-7BUUIJ7U-Bwj5weSU.js → chunk-7BUUIJ7U-nkQ2KUUq.js} +1 -1
  93. package/dist/public/assets/{chunk-BIQX33UG-WShnA3hi.js → chunk-BIQX33UG-dgZifYB8.js} +1 -1
  94. package/dist/public/assets/{chunk-BO2N2NFS-0fL-jnUT.js → chunk-BO2N2NFS-BgpjQQXT.js} +3 -3
  95. package/dist/public/assets/{chunk-C7G6YPKG-JOVwaeql.js → chunk-C7G6YPKG-DeJ7KSfD.js} +1 -1
  96. package/dist/public/assets/{chunk-CQNSW5MT-DmFd2LFl.js → chunk-CQNSW5MT-WJU8lHxD.js} +1 -1
  97. package/dist/public/assets/{chunk-CYSBUYHQ-BOCWcr_T.js → chunk-CYSBUYHQ-5BxfdOgL.js} +1 -1
  98. package/dist/public/assets/{chunk-EMLP6XTP-_039-Ubh.js → chunk-EMLP6XTP-mSjYkSCS.js} +1 -1
  99. package/dist/public/assets/{chunk-EX3LRPZG-CMgFCagr.js → chunk-EX3LRPZG-BNd6Cxwo.js} +1 -1
  100. package/dist/public/assets/{chunk-FWX5IMBZ-C4vKCoUv.js → chunk-FWX5IMBZ-CXQqiinv.js} +2 -2
  101. package/dist/public/assets/{chunk-HOUHSVGY-CZX004Ef.js → chunk-HOUHSVGY-FQeseOdw.js} +1 -1
  102. package/dist/public/assets/{chunk-ICXQ74PX-B_iuJAXS.js → chunk-ICXQ74PX-QBz75RJe.js} +1 -1
  103. package/dist/public/assets/{chunk-JG7HCLWE-CtDpq51e.js → chunk-JG7HCLWE-ClAPLVoN.js} +1 -1
  104. package/dist/public/assets/{chunk-JWPE2WC7-pDBBV-ex.js → chunk-JWPE2WC7-D00QuO4l.js} +1 -1
  105. package/dist/public/assets/{chunk-MOJQB5TN-BOLftHeO.js → chunk-MOJQB5TN-BHolK4Fc.js} +1 -1
  106. package/dist/public/assets/{chunk-MOZMSUNE-B90rFhRO.js → chunk-MOZMSUNE-B2zrwpvW.js} +1 -1
  107. package/dist/public/assets/{chunk-OGEWGWER-dIUHPavN.js → chunk-OGEWGWER-D9rNoxcC.js} +1 -1
  108. package/dist/public/assets/{chunk-OSBZ3O6U-C8f7zxUa.js → chunk-OSBZ3O6U-pMDQqwwa.js} +1 -1
  109. package/dist/public/assets/{chunk-PUDLZKDR-QPYzmUFw.js → chunk-PUDLZKDR-zvmgn7x_.js} +1 -1
  110. package/dist/public/assets/{chunk-Q4XR5HBZ--1adMSrR.js → chunk-Q4XR5HBZ-FwXZQ9hY.js} +1 -1
  111. package/dist/public/assets/{chunk-QBLGF6JB-q87mQ87z.js → chunk-QBLGF6JB-gQMNwA9k.js} +1 -1
  112. package/dist/public/assets/{chunk-R7FJI6CG-B5NnR0wG.js → chunk-R7FJI6CG-4qEQ9dBZ.js} +1 -1
  113. package/dist/public/assets/{chunk-RYQCIY6F-BnIBPlEn.js → chunk-RYQCIY6F-BV0ikdQB.js} +1 -1
  114. package/dist/public/assets/{chunk-U6XO7XAA-DuxWv8i1.js → chunk-U6XO7XAA-CaNmcaAV.js} +1 -1
  115. package/dist/public/assets/{chunk-V7JOEXUC-zQePb8W4.js → chunk-V7JOEXUC-CsJjje8x.js} +1 -1
  116. package/dist/public/assets/chunk-VAUOI2AC-B_byVmRb.js +1 -0
  117. package/dist/public/assets/{chunk-VR4S4FIN-DOfDyz67.js → chunk-VR4S4FIN-bcHVGPIL.js} +1 -1
  118. package/dist/public/assets/{chunk-WYO6CB5R-DAcO6KqN.js → chunk-WYO6CB5R-BMZjhy31.js} +1 -1
  119. package/dist/public/assets/chunk-XXDRQBXY-BW_2kVvu.js +1 -0
  120. package/dist/public/assets/{chunk-YOTPTUD7-DSjCnGGQ.js → chunk-YOTPTUD7-NNZ-Yv3s.js} +1 -1
  121. package/dist/public/assets/{chunk-ZGVPDNZ5-CnXHsnX3.js → chunk-ZGVPDNZ5-DN7h9evR.js} +1 -1
  122. package/dist/public/assets/{chunk-ZIRB5QZD-rA251rHW.js → chunk-ZIRB5QZD-BUzL4gtl.js} +1 -1
  123. package/dist/public/assets/classDiagram-OUVF2IWQ-D-ugBPkQ.js +1 -0
  124. package/dist/public/assets/classDiagram-v2-EOCWNBFH-Bn6YRP9I.js +1 -0
  125. package/dist/public/assets/{client-version-9mDVHFsH.js → client-version-BhYZd6K_.js} +1 -1
  126. package/dist/public/assets/{comment-chips-zzwDt2eW.js → comment-chips-qxdAVfqd.js} +2 -2
  127. package/dist/public/assets/{config-provider-CqysOmJk.js → config-provider-C5VnXykq.js} +2 -2
  128. package/dist/public/assets/{cose-bilkent-JH36ORCC-BO3tFb1k.js → cose-bilkent-JH36ORCC-C3tuxXMJ.js} +1 -1
  129. package/dist/public/assets/createLucideIcon-wbFLvDA-.js +1 -0
  130. package/dist/public/assets/cynefin-VYW2F7L2-g7Kr3o9e.js +1 -0
  131. package/dist/public/assets/{cynefinDiagram-TSTJHNR4-kMgUnu_c.js → cynefinDiagram-TSTJHNR4-gF8dJ8RL.js} +1 -1
  132. package/dist/public/assets/{dagre-DmGue-PX.js → dagre-DqpVUR-3.js} +1 -1
  133. package/dist/public/assets/{dagre-VKFMJZFB-CgYSDfeg.js → dagre-VKFMJZFB-Bdh7Hq5O.js} +1 -1
  134. package/dist/public/assets/{diagram-FQU43EPY-XRWiX7Im.js → diagram-FQU43EPY-BZ8uLueR.js} +1 -1
  135. package/dist/public/assets/{diagram-G47NLZAW-BzqAYczi.js → diagram-G47NLZAW-QyYub_Y-.js} +1 -1
  136. package/dist/public/assets/{diagram-NH7WQ7WH-CAOpGCwL.js → diagram-NH7WQ7WH-BZmKErWp.js} +1 -1
  137. package/dist/public/assets/{diagram-OA4YK3LP-CsYFi60N.js → diagram-OA4YK3LP-X4I0Ny_1.js} +1 -1
  138. package/dist/public/assets/{diagram-WEI45ONY-BPyyv8e3.js → diagram-WEI45ONY-Dvn-EcwS.js} +1 -1
  139. package/dist/public/assets/{dialog-CkjkuWLF.js → dialog-BRwYcDyc.js} +1 -1
  140. package/dist/public/assets/{dist-CTPwMRld.js → dist-1bY-7L2j.js} +1 -1
  141. package/dist/public/assets/{dist-DA8rIjtg.js → dist-4KAJEfHq.js} +1 -1
  142. package/dist/public/assets/{dist-MQd-Irtl.js → dist-9KHzlPis.js} +1 -1
  143. package/dist/public/assets/{dist-_8wb0R99.js → dist-B5YN73un.js} +1 -1
  144. package/dist/public/assets/{dist-Bdhn2jv42.js → dist-B_pBFyj72.js} +1 -1
  145. package/dist/public/assets/{dist-BkSGIgDv.js → dist-BawYG08a.js} +1 -1
  146. package/dist/public/assets/{dist-C2ZNHEgX.js → dist-BhBnufkS.js} +1 -1
  147. package/dist/public/assets/{dist-B4smVaZm2.js → dist-D8RKvolB2.js} +179 -179
  148. package/dist/public/assets/{dist-FPlC48Ke.js → dist-DhrsAcRJ.js} +1 -1
  149. package/dist/public/assets/{dist-CKHaw45-.js → dist-DmGGmoBk.js} +1 -1
  150. package/dist/public/assets/{dist-Dqtgp0QD2.js → dist-Dsr-OKxp2.js} +1 -1
  151. package/dist/public/assets/{dist-BK-fqCFD.js → dist-Dtdr1fU5.js} +1 -1
  152. package/dist/public/assets/{dist-D2AiGKcA.js → dist-ZmxLttHl.js} +1 -1
  153. package/dist/public/assets/{dist-CEBfbNax.js → dist-zNz6UTbN.js} +1 -1
  154. package/dist/public/assets/{doc-paths-DPN-3rhq.js → doc-paths-CBQZMJ5n.js} +1 -1
  155. package/dist/public/assets/{documents-events-DYwaAqwG.js → documents-events-CUD1Vtsd.js} +1 -1
  156. package/dist/public/assets/{download-D3RTVXwv.js → download-C_7Cu8X8.js} +1 -1
  157. package/dist/public/assets/dropdown-menu-BvpO8ueR.js +1 -0
  158. package/dist/public/assets/{ebnfDiagram-CCIWWBDH-CUTAjine.js → ebnfDiagram-CCIWWBDH-Bee-0Vsa.js} +1 -1
  159. package/dist/public/assets/{erDiagram-Q63AITRT-BSu96D8g.js → erDiagram-Q63AITRT-DxkcAaEh.js} +1 -1
  160. package/dist/public/assets/{esm-DbmiTy2g.js → esm-Dn0h--OG.js} +1 -1
  161. package/dist/public/assets/eventmodeling-45OFAUF4-DdR7ha8I.js +1 -0
  162. package/dist/public/assets/{eye-yERBaQWj.js → eye-DGKT_dXT.js} +1 -1
  163. package/dist/public/assets/field-mSLytCEk.js +1 -0
  164. package/dist/public/assets/file-tree-adapter-CRvIFP_w.js +1 -0
  165. package/dist/public/assets/{file-tree-utils-BYKXMiDK.js → file-tree-utils-Bz8x8io4.js} +1 -1
  166. package/dist/public/assets/flowDiagram-23GEKE2U-BAuyQn3U.js +1 -0
  167. package/dist/public/assets/{folder-8ceGqZIO.js → folder-CyL8AyXY.js} +1 -1
  168. package/dist/public/assets/{folder-config-api-CDok_aFN.js → folder-config-api-DI42D8Ib.js} +1 -1
  169. package/dist/public/assets/{folder-open-CvyyCBOn.js → folder-open-DxWbBr3T.js} +1 -1
  170. package/dist/public/assets/follow-file-DYsc20_7.js +1 -0
  171. package/dist/public/assets/form-DipRd6xO.js +1 -0
  172. package/dist/public/assets/{ganttDiagram-NO4QXBWP-Crrr-q7s.js → ganttDiagram-NO4QXBWP-CfKrR8t0.js} +1 -1
  173. package/dist/public/assets/{git-branch-oPfvsh1I.js → git-branch-v159JGOd.js} +1 -1
  174. package/dist/public/assets/gitGraph-TEB2WS4Q-B9_Hbzw_.js +1 -0
  175. package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-BdMHODo-.js → gitGraphDiagram-IHSO6WYX-l_eG9uKD.js} +1 -1
  176. package/dist/public/assets/globals-Ba8zXfL4.css +1 -0
  177. package/dist/public/assets/{globals-DpFuWoOb.js → globals-Wwv5HfuY.js} +2 -2
  178. package/dist/public/assets/{graphlib-DIVfLvlR.js → graphlib-2mbBufU8.js} +1 -1
  179. package/dist/public/assets/{hash-DP25l_li.js → hash-C-OUp5vU.js} +1 -1
  180. package/dist/public/assets/{highlighted-body-OFNGDK62-Cue0vPGT.js → highlighted-body-OFNGDK62-BIipOt-U.js} +1 -1
  181. package/dist/public/assets/index-BgOJcvk8.js +2092 -0
  182. package/dist/public/assets/info-DKCQHKI2-BQeDe2mR.js +1 -0
  183. package/dist/public/assets/{info-Bza7Xa6D.js → info-DybUB5k_.js} +1 -1
  184. package/dist/public/assets/{infoDiagram-FWYZ7A6U-_RNxdwPC.js → infoDiagram-FWYZ7A6U-DgvJ7Awn.js} +1 -1
  185. package/dist/public/assets/input-DcoGZoTQ.js +1 -0
  186. package/dist/public/assets/input-group-DpE_QejY.js +1 -0
  187. package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-BbXzN7UF.js → ishikawaDiagram-FXEZZL3T-DQ4Gskk4.js} +1 -1
  188. package/dist/public/assets/{journeyDiagram-5HDEW3XC-BqwkEnJh.js → journeyDiagram-5HDEW3XC-DPs0RcwQ.js} +1 -1
  189. package/dist/public/assets/{kanban-definition-HUTT4EX6-CX-ROP0U.js → kanban-definition-HUTT4EX6-Ck2HSfan.js} +1 -1
  190. package/dist/public/assets/label-CGqMAe0S.js +1 -0
  191. package/dist/public/assets/{line-D0lohJ6a.js → line-DWKLErsv.js} +1 -1
  192. package/dist/public/assets/{linear-By98wvuz.js → linear-dbIThZWJ.js} +1 -1
  193. package/dist/public/assets/{lint-config-client-CqIt6_m6.js → lint-config-client-B3CFuMcz.js} +1 -1
  194. package/dist/public/assets/loader-circle-C4uszcbe.js +1 -0
  195. package/dist/public/assets/{map-XagOZNs9.js → map-DCuMc749.js} +1 -1
  196. package/dist/public/assets/{markdownlint-rule-browser-B9Uf4v2H.js → markdownlint-rule-browser-taWXhAIu.js} +1 -1
  197. package/dist/public/assets/mermaid-GHXKKRXX-DE1vq5OK.js +1 -0
  198. package/dist/public/assets/{mermaid-parser.core-DtOR1aVt.js → mermaid-parser.core-B2uYfibA.js} +2 -2
  199. package/dist/public/assets/{mermaid.core-DFRkYHGF.js → mermaid.core-BUTR3k00.js} +3 -3
  200. package/dist/public/assets/{mindmap-definition-LN4V7U3C-BPq8CY-V.js → mindmap-definition-LN4V7U3C-CjuwnrRK.js} +1 -1
  201. package/dist/public/assets/minus-dDmjPbo4.js +1 -0
  202. package/dist/public/assets/{miss-dialog-store-DBqQ_Nyn.js → miss-dialog-store-DRsTysxn.js} +1 -1
  203. package/dist/public/assets/navigation-targets-Cqw8JcW2.js +1 -0
  204. package/dist/public/assets/{now-BJ6wHiq6.js → now-D9M3Ys6o.js} +1 -1
  205. package/dist/public/assets/{open-managed-artifact-tab-BRW0Boal.js → open-managed-artifact-tab-BJBa-17A.js} +1 -1
  206. package/dist/public/assets/{ordinal-BhGTF2Fp.js → ordinal-DdrNAXbu.js} +1 -1
  207. package/dist/public/assets/packet-7NZHBO7P-BW9abikZ.js +1 -0
  208. package/dist/public/assets/panel-Bjv8raTx.js +1 -0
  209. package/dist/public/assets/{panel-right-open-ChixO1pm.js → panel-right-open-EPKoGQBE.js} +1 -1
  210. package/dist/public/assets/{paperclip-CFZOhV8C.js → paperclip-DSaV3jTp.js} +1 -1
  211. package/dist/public/assets/{pegDiagram-2B236MQR-Bs6HaUdW.js → pegDiagram-2B236MQR-BbkSvB2I.js} +1 -1
  212. package/dist/public/assets/{pending-receive-nav-store-C5kqBBL2.js → pending-receive-nav-store-BZZR-nkd.js} +1 -1
  213. package/dist/public/assets/pie-RZYD4A2V-D86NaVqt.js +1 -0
  214. package/dist/public/assets/{pieDiagram-ENE6RG2P-BBo6EMS4.js → pieDiagram-ENE6RG2P-mC03ntFr.js} +1 -1
  215. package/dist/public/assets/project-paths-DZoifJi3.js +1 -0
  216. package/dist/public/assets/{prop-types-CwT5q2dg.js → prop-types-UV1Ku4nq.js} +1 -1
  217. package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-qmZeOoSr.js → quadrantDiagram-ABIIQ3AL-C5Wf9EzX.js} +1 -1
  218. package/dist/public/assets/radar-I7S5WNFK-DQAd0dLq.js +1 -0
  219. package/dist/public/assets/radio-group-DxMM4tU-.js +1 -0
  220. package/dist/public/assets/railroad-3IZDKUUU-BpjxCYYP.js +1 -0
  221. package/dist/public/assets/railroad-abnf-AHOZXSZD-BVzINhcN.js +1 -0
  222. package/dist/public/assets/railroad-ebnf-EBAXGLYW-FAz3aWnD.js +1 -0
  223. package/dist/public/assets/railroad-peg-LSFZ7HO6-Smtu6BYl.js +1 -0
  224. package/dist/public/assets/{railroadDiagram-RFXS5EU6-DE_EvwtV.js → railroadDiagram-RFXS5EU6-D5k_b8X2.js} +1 -1
  225. package/dist/public/assets/{receive-store-9n3T9AKo.js → receive-store-CqvpoBpo.js} +1 -1
  226. package/dist/public/assets/{refresh-cw-D3t5sdqM.js → refresh-cw-DaKSQ-xL.js} +1 -1
  227. package/dist/public/assets/{requirementDiagram-TGXJPOKE-BZ-rKt8B.js → requirementDiagram-TGXJPOKE-sZXA_y1K.js} +1 -1
  228. package/dist/public/assets/{sankeyDiagram-HTMAVEWB-B9AZEJIc.js → sankeyDiagram-HTMAVEWB-VaejSuXD.js} +1 -1
  229. package/dist/public/assets/schema-fields-view-intent-BMcQ1vbw.js +1 -0
  230. package/dist/public/assets/select-DnZ213p0.js +1 -0
  231. package/dist/public/assets/{selection-context-Ei6PWK1c.js → selection-context-SAJ9lGhe.js} +1 -1
  232. package/dist/public/assets/separator-BhGCtoZc.js +1 -0
  233. package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-DR0l3jeO.js → sequenceDiagram-DBY2YBRQ-nCH-USjy.js} +1 -1
  234. package/dist/public/assets/{sizeCapture-X5ZJPWSS-CK3vwB3X.js → sizeCapture-X5ZJPWSS-CyNe-U3Z.js} +1 -1
  235. package/dist/public/assets/skeleton-Zj40UZU5.js +1 -0
  236. package/dist/public/assets/skill-actions-bjJCqQ6r.js +2 -0
  237. package/dist/public/assets/{skill-scope-QSVdjA7g.js → skill-scope-CEk2zosm.js} +1 -1
  238. package/dist/public/assets/{skills-api-DPk4ScTz.js → skills-api-DqNFNsgd.js} +1 -1
  239. package/dist/public/assets/{square-pen-wqme9vlv.js → square-pen-BETfUJNH.js} +1 -1
  240. package/dist/public/assets/{src-rG3yqT5Z.js → src-D2I-MNPe.js} +1 -1
  241. package/dist/public/assets/{src-DsJU4LsJ.js → src-DFZupjZD.js} +1 -1
  242. package/dist/public/assets/{stateDiagram-2N3HPSRC-DEWfQHsO.js → stateDiagram-2N3HPSRC-uY9Mif8t.js} +1 -1
  243. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-BdS5vmc7.js +1 -0
  244. package/dist/public/assets/{swimlanes-5IMT3BWC-B6x4Ld9j.js → swimlanes-5IMT3BWC-cGipHfZ5.js} +2 -2
  245. package/dist/public/assets/swimlanesDiagram-G3AALYLV-Do_H-wCL.js +8 -0
  246. package/dist/public/assets/switch-BQ3qkbBx.js +1 -0
  247. package/dist/public/assets/tabs-C54rwljA.js +1 -0
  248. package/dist/public/assets/tag-pill-input-Dm-oHELs.js +1 -0
  249. package/dist/public/assets/{target-navigation-intent-Bo9uuBEh.js → target-navigation-intent-D4NuVWIm.js} +1 -1
  250. package/dist/public/assets/{telemetry-impl-D4kQ8pzt.js → telemetry-impl-wWahzeD4.js} +2 -2
  251. package/dist/public/assets/{telemetry-startup-B15S0fJ7.js → telemetry-startup-DqooJFoo.js} +1 -1
  252. package/dist/public/assets/terminal-input-events-D7rv6nZZ.js +1 -0
  253. package/dist/public/assets/terminal-launch-events-DPnh23jk.js +1 -0
  254. package/dist/public/assets/{terminal-telemetry-46cHbbgd.js → terminal-telemetry-C0iAhsN9.js} +1 -1
  255. package/dist/public/assets/text-viewer-languages-qm3MvP0J.js +2 -0
  256. package/dist/public/assets/textarea-Cl4IJ1LU.js +1 -0
  257. package/dist/public/assets/{thread-client-DpMjiK2J.js → thread-client-CylUCx4y.js} +1 -1
  258. package/dist/public/assets/{timeline-definition-FHXFAJF6-DB7l9JZO.js → timeline-definition-FHXFAJF6-BaWSHiEf.js} +1 -1
  259. package/dist/public/assets/toggle-group-DpvWeoN9.js +1 -0
  260. package/dist/public/assets/tooltip-CtvLp_YK.js +1 -0
  261. package/dist/public/assets/{trash-2-5vqPZUBk.js → trash-2-YBQNhePb.js} +1 -1
  262. package/dist/public/assets/treeView-QDETBFTQ-BgORrhQ0.js +1 -0
  263. package/dist/public/assets/treemap-6X3UGDF4-Zr5ZEdj0.js +1 -0
  264. package/dist/public/assets/{triangle-alert-BwCftF1V.js → triangle-alert-Dk8dL1G6.js} +1 -1
  265. package/dist/public/assets/{typing-burst-detector-CKkV0qHr.js → typing-burst-detector-aQ1X_8Fj.js} +1 -1
  266. package/dist/public/assets/{undo-2-BRIW1mxN.js → undo-2-1g5Fg6rD.js} +1 -1
  267. package/dist/public/assets/uninstall-CZ4_m9Qa.js +1 -0
  268. package/dist/public/assets/{use-activity-panel-BrntKM08.js → use-activity-panel-CrUZg0eD.js} +1 -1
  269. package/dist/public/assets/{use-apply-config-color-theme-BeVjXtPt.js → use-apply-config-color-theme-CFZIZmfZ.js} +2 -2
  270. package/dist/public/assets/{use-collab-url-DNKvlkVI.js → use-collab-url-DrWInPcY.js} +1 -1
  271. package/dist/public/assets/{use-live-xterm-theme-zW4nzNGd.js → use-live-xterm-theme-C7ahxcoU.js} +1 -1
  272. package/dist/public/assets/{use-open-skill-Bs2T3l_Z.js → use-open-skill-BQedNtMG.js} +1 -1
  273. package/dist/public/assets/{use-settings-route-Dw-Hb0ex.js → use-settings-route-DHvE2hA4.js} +1 -1
  274. package/dist/public/assets/{use-skill-directory-CB4briga.js → use-skill-directory-CVAgFkVK.js} +1 -1
  275. package/dist/public/assets/{use-skills-luzjx-1h.js → use-skills-LdaAjRrH.js} +1 -1
  276. package/dist/public/assets/{use-terminal-enabled-BmqysEmJ.js → use-terminal-enabled-DwK_rPTk.js} +1 -1
  277. package/dist/public/assets/{use-timeline-entry-diff-5XrGZxUG.js → use-timeline-entry-diff-B5KnaOaD.js} +2 -2
  278. package/dist/public/assets/{use-workspace-Bi_k2cyZ.js → use-workspace-Csf6sHD8.js} +1 -1
  279. package/dist/public/assets/utils-CPqDy6Hr.js +1 -0
  280. package/dist/public/assets/{vennDiagram-L72KCM5P-D6bPpaIm.js → vennDiagram-L72KCM5P-boRPAxOy.js} +1 -1
  281. package/dist/public/assets/wardley-OPB4EBWU-WeTAUrVk.js +1 -0
  282. package/dist/public/assets/{wardleyDiagram-EHGQE667-9U25ZM8P.js → wardleyDiagram-EHGQE667-vi90NC-5.js} +1 -1
  283. package/dist/public/assets/{wrench-CqOvU1qQ.js → wrench-86_Xzzag.js} +1 -1
  284. package/dist/public/assets/x-M_y7ybHr.js +1 -0
  285. package/dist/public/assets/{xychartDiagram-FW5EYKEG-WSgFIUEO.js → xychartDiagram-FW5EYKEG-Ckph0Tnv.js} +1 -1
  286. package/dist/public/index.html +133 -129
  287. package/dist/public/uninstall.html +18 -17
  288. package/dist/{repair-launch-json-BnuZxbzl.mjs → repair-launch-json-CarG9t5g.mjs} +2 -2
  289. package/dist/repair-mcp-configs-tqX3x1ff.mjs +2 -0
  290. package/dist/{repair-skills-dd5mv1UC.mjs → repair-skills-B5s_18d0.mjs} +2 -2
  291. package/dist/repair-skills-ByGIGa0z.mjs +1 -0
  292. package/dist/{server-lock-CiLY7g7M.mjs → server-lock-CCS3UzJQ.mjs} +2 -2
  293. package/dist/server-lock-CKTWPQax.mjs +1 -0
  294. package/dist/{sleep-IcuyYCzq.mjs → sleep-TXRFWg8x.mjs} +5 -5
  295. package/dist/{src-vPHpv2Pv.mjs → src-C9yhZBbO.mjs} +21 -21
  296. package/dist/src-CJQ7Tr0x.mjs +2030 -0
  297. package/dist/{src-BV_ssChu.mjs → src-CrCGhUc5.mjs} +4 -4
  298. package/dist/{src-FJfcW5Wa.mjs → src-Dmoupsem.mjs} +1 -1
  299. package/dist/{start-CrQRZ2iN.mjs → start-DLGlqNhM.mjs} +3 -3
  300. package/dist/start-DLutC_zQ.mjs +1 -0
  301. package/dist/{write-project-skill-9Bg5smOa.mjs → write-project-skill-BIBvYtT6.mjs} +3 -3
  302. package/package.json +4 -4
  303. package/dist/constants-Tj2BXHLz.mjs +0 -2
  304. package/dist/fs-traced-Bi88qem0.mjs +0 -1
  305. package/dist/git-handle-CIs--jPt.mjs +0 -1
  306. package/dist/init-DAEIZfnY.mjs +0 -1
  307. package/dist/loader-DjGgIOZB.mjs +0 -1
  308. package/dist/md-manager-BYBAWLMu.mjs +0 -2
  309. package/dist/preview-BRsYNNVp.mjs +0 -1
  310. package/dist/public/assets/ActivityModeContent-DBIuWjYz.js +0 -1
  311. package/dist/public/assets/AppMenubar-7eBxIB37.js +0 -1
  312. package/dist/public/assets/ChangedOutsideBadge-HeyxmqeX.js +0 -1
  313. package/dist/public/assets/CodeMirrorPropInput-ni9vC7Fz.js +0 -3
  314. package/dist/public/assets/DocumentContext-DOLytv_M.js +0 -38
  315. package/dist/public/assets/EditorModeToggle-CNorGTYw.js +0 -2
  316. package/dist/public/assets/EnableSyncConfirmDialog-BIggEySP.js +0 -1
  317. package/dist/public/assets/FeedbackForm-CxZ7wWPb.js +0 -1
  318. package/dist/public/assets/ImportSkillDialog-CDNt7ygs.js +0 -1
  319. package/dist/public/assets/ManagedArtifactProperties-AwlBn5fa.js +0 -1
  320. package/dist/public/assets/ManagedArtifactProperties-DUL9cmXF.js +0 -2
  321. package/dist/public/assets/McpConsentDialogBody-BMrE5RK5.js +0 -1
  322. package/dist/public/assets/MermaidDocEditor-DNa5Mst7.js +0 -1
  323. package/dist/public/assets/RegisteredAgentIcon-CHh3fima.js +0 -1
  324. package/dist/public/assets/ReportBugDialogBody-C3Dct-EA.js +0 -3
  325. package/dist/public/assets/SchemaConfigEditor-IN_XqunA.js +0 -1
  326. package/dist/public/assets/SessionsHost-CYxR-RCl.js +0 -2
  327. package/dist/public/assets/SettingsDialogBody-zEVCcY6i.js +0 -7
  328. package/dist/public/assets/SkillModeBanner-CsKHM-QY.js +0 -1
  329. package/dist/public/assets/SkillOriginInline-Bi8XGbK6.js +0 -1
  330. package/dist/public/assets/SkillToolbarControls-t4VQIap4.js +0 -1
  331. package/dist/public/assets/TimelineDiffPane-Ox3ktjmx.js +0 -2
  332. package/dist/public/assets/agent-visibility-Bt2OD_n5.js +0 -1
  333. package/dist/public/assets/architecture-TIHT7OUA-Bl7-zFAE.js +0 -1
  334. package/dist/public/assets/arrow-up-right-BZsQghvQ.js +0 -1
  335. package/dist/public/assets/auth-state-cache-DpJsYOVr.js +0 -11
  336. package/dist/public/assets/badge-DB5BJfSU.js +0 -1
  337. package/dist/public/assets/button-oSXzJYWO.js +0 -1
  338. package/dist/public/assets/calendar-C2lP75MI.js +0 -1
  339. package/dist/public/assets/channel-Bf_IZmsH.js +0 -1
  340. package/dist/public/assets/check-DA7_vRdO.js +0 -1
  341. package/dist/public/assets/checkbox-DYPwCq3O.js +0 -1
  342. package/dist/public/assets/chevron-left-D8z-buF6.js +0 -1
  343. package/dist/public/assets/chevron-right-CgsPV9lV.js +0 -1
  344. package/dist/public/assets/chunk-2Q5K7J3B-CBNXZghD.js +0 -1
  345. package/dist/public/assets/chunk-VAUOI2AC-K9aKY8La.js +0 -1
  346. package/dist/public/assets/chunk-XXDRQBXY-CRN6FsNM.js +0 -1
  347. package/dist/public/assets/classDiagram-OUVF2IWQ-B8NyhReL.js +0 -1
  348. package/dist/public/assets/classDiagram-v2-EOCWNBFH-To5zrK6k.js +0 -1
  349. package/dist/public/assets/createLucideIcon-BiRV80uZ.js +0 -1
  350. package/dist/public/assets/cynefin-VYW2F7L2-DjK3ZZKp.js +0 -1
  351. package/dist/public/assets/dropdown-menu-D2umi56L.js +0 -1
  352. package/dist/public/assets/eventmodeling-45OFAUF4-C3gCuhXd.js +0 -1
  353. package/dist/public/assets/field-i4kPdg1V.js +0 -1
  354. package/dist/public/assets/file-tree-adapter-B3YYQMKE.js +0 -1
  355. package/dist/public/assets/flowDiagram-23GEKE2U-V8thnmzy.js +0 -1
  356. package/dist/public/assets/follow-file-BpD8YozT.js +0 -1
  357. package/dist/public/assets/form-lIFpKMVU.js +0 -1
  358. package/dist/public/assets/gitGraph-TEB2WS4Q-BERn_Vnm.js +0 -1
  359. package/dist/public/assets/globals-GzZHGkrT.css +0 -1
  360. package/dist/public/assets/index-Bbf0BHeh.js +0 -2092
  361. package/dist/public/assets/info-DKCQHKI2-xuBgM0S3.js +0 -1
  362. package/dist/public/assets/input-C4n4n5Hc.js +0 -1
  363. package/dist/public/assets/input-group-C_H5NgPX.js +0 -1
  364. package/dist/public/assets/label-Ds0LTB-Z.js +0 -1
  365. package/dist/public/assets/loader-circle-Cn2Xr4cN.js +0 -1
  366. package/dist/public/assets/mermaid-GHXKKRXX-CFTslKYT.js +0 -1
  367. package/dist/public/assets/minus-CBRjUXY7.js +0 -1
  368. package/dist/public/assets/navigation-targets-CvdOYknS.js +0 -1
  369. package/dist/public/assets/packet-7NZHBO7P-DhQWKabl.js +0 -1
  370. package/dist/public/assets/panel-FwLLPu5s.js +0 -1
  371. package/dist/public/assets/pie-RZYD4A2V-DaewLp2Y.js +0 -1
  372. package/dist/public/assets/project-paths-Cgrv2qcw.js +0 -1
  373. package/dist/public/assets/radar-I7S5WNFK-DljmjJ2C.js +0 -1
  374. package/dist/public/assets/radio-group-DFFiLDEM.js +0 -1
  375. package/dist/public/assets/railroad-3IZDKUUU-6CgLOfBJ.js +0 -1
  376. package/dist/public/assets/railroad-abnf-AHOZXSZD-DQ60e1aW.js +0 -1
  377. package/dist/public/assets/railroad-ebnf-EBAXGLYW-Da8xQ_1N.js +0 -1
  378. package/dist/public/assets/railroad-peg-LSFZ7HO6-CDOeiUF5.js +0 -1
  379. package/dist/public/assets/schema-fields-view-intent-SQVE5W3s.js +0 -1
  380. package/dist/public/assets/select-DyVZCohx.js +0 -1
  381. package/dist/public/assets/separator-4_yBRx-q.js +0 -1
  382. package/dist/public/assets/skeleton-BlTc8h6X.js +0 -1
  383. package/dist/public/assets/skill-actions-6lbXpkx6.js +0 -2
  384. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-aJyvpelO.js +0 -1
  385. package/dist/public/assets/swimlanesDiagram-G3AALYLV-NoFAxBaw.js +0 -8
  386. package/dist/public/assets/switch-CsstPO-E.js +0 -1
  387. package/dist/public/assets/tabs-C8ykgpIi.js +0 -1
  388. package/dist/public/assets/tag-pill-input-Bi-VYc9q.js +0 -1
  389. package/dist/public/assets/terminal-input-events-B8xUcID4.js +0 -1
  390. package/dist/public/assets/terminal-launch-events-CCUJ6bvs.js +0 -1
  391. package/dist/public/assets/textarea-DKb-eo87.js +0 -1
  392. package/dist/public/assets/toggle-group-DMfnQ5Pd.js +0 -1
  393. package/dist/public/assets/tooltip-DkZ6fphS.js +0 -1
  394. package/dist/public/assets/treeView-QDETBFTQ-Ds4YBLMo.js +0 -1
  395. package/dist/public/assets/treemap-6X3UGDF4-D2ccHx16.js +0 -1
  396. package/dist/public/assets/uninstall-C2Z7mcqE.js +0 -1
  397. package/dist/public/assets/wardley-OPB4EBWU-JuWm1scq.js +0 -1
  398. package/dist/public/assets/x-C6kVbc_i.js +0 -1
  399. package/dist/repair-mcp-configs-Cbg7X3jU.mjs +0 -2
  400. package/dist/repair-skills-PgjKx2Kj.mjs +0 -1
  401. package/dist/server-lock-toF-I3k7.mjs +0 -1
  402. package/dist/src-BexdiJ2F.mjs +0 -2030
  403. package/dist/start-CBKXj6gj.mjs +0 -1
  404. /package/dist/public/assets/{ActivityPanelDiffView-ZX0cv7Dl.js → ActivityPanelDiffView-DzcGG-3T.js} +0 -0
  405. /package/dist/public/assets/{__vite-browser-external-DwydhYHF.js → __vite-browser-external-DRftbq1J.js} +0 -0
  406. /package/dist/public/assets/{agent-presence-BcWu61SE.js → agent-presence-DspgbUIJ.js} +0 -0
  407. /package/dist/public/assets/{array-DpLqdF3L.js → array-BlR6RSqS.js} +0 -0
  408. /package/dist/public/assets/{auth-prompt-store-CmyRhcKh.js → auth-prompt-store-2KB0Hew5.js} +0 -0
  409. /package/dist/public/assets/{chunk-KEIR6QF5-Bf0oDx3Z.js → chunk-KEIR6QF5-Cvu_RfZc.js} +0 -0
  410. /package/dist/public/assets/{chunk-Y2CYZVJY-PbmsUfAu.js → chunk-Y2CYZVJY-BavonG01.js} +0 -0
  411. /package/dist/public/assets/{clike-BrXLgO2o.js → clike-BTKURkAr.js} +0 -0
  412. /package/dist/public/assets/{clipboard-adapter-B3lKEXcw.js → clipboard-adapter-Brbch5VX.js} +0 -0
  413. /package/dist/public/assets/{colors-B-WRw0bG.js → colors-DThYSuj1.js} +0 -0
  414. /package/dist/public/assets/{copilot-BkvifxDd.js → copilot-_tsUyzgD.js} +0 -0
  415. /package/dist/public/assets/{cursor-D-FuCbK1.js → cursor-D_UKSHL6.js} +0 -0
  416. /package/dist/public/assets/{cytoscape.esm-BkIkmBTc.js → cytoscape.esm-CcKBPOPz.js} +0 -0
  417. /package/dist/public/assets/{defaultLocale-DoD61tXl.js → defaultLocale-Bj1aksfd.js} +0 -0
  418. /package/dist/public/assets/{desktop-bridge-types-5ScET3Cg.js → desktop-bridge-types-cNTLS5xb.js} +0 -0
  419. /package/dist/public/assets/{diff-DTEjW6Ec.js → diff-CC9Zbhye.js} +0 -0
  420. /package/dist/public/assets/{dist-D4eaXg-1.js → dist-BKO-SihH.js} +0 -0
  421. /package/dist/public/assets/{dist-BVbCw0G-.js → dist-BNVxnBBw.js} +0 -0
  422. /package/dist/public/assets/{dist-CA7QPULb.js → dist-CublDHOR.js} +0 -0
  423. /package/dist/public/assets/{dist-DuwTJb1j.js → dist-Du3GTGo5.js} +0 -0
  424. /package/dist/public/assets/{dist-6Q9yuoli.js → dist-pl6OT5yc.js} +0 -0
  425. /package/dist/public/assets/{documents-fetch-AfOPbdF_.js → documents-fetch-D4kwvrzo.js} +0 -0
  426. /package/dist/public/assets/{external-link-LAxhzgCI.js → external-link-CKZFgCFq.js} +0 -0
  427. /package/dist/public/assets/{file-tree-rename-validation-CkkVvtpx.js → file-tree-rename-validation-BH8L3cc3.js} +0 -0
  428. /package/dist/public/assets/{format-Bj7zR862.js → format-DAPkd5Gj.js} +0 -0
  429. /package/dist/public/assets/{go-D3-a1upg.js → go-BOoSlAXr.js} +0 -0
  430. /package/dist/public/assets/{init-D0AX7DDe.js → init-tTyHApSS.js} +0 -0
  431. /package/dist/public/assets/{isObject-Bs1dF4ay.js → isObject-CS6pZNNk.js} +0 -0
  432. /package/dist/public/assets/{libesm-D5Z2fjiR.js → libesm-COuF-Ycc.js} +0 -0
  433. /package/dist/public/assets/{lint-plugin-meta-DEfDN-Lf.js → lint-plugin-meta-BxfSlkph.js} +0 -0
  434. /package/dist/public/assets/{lru-string-cache-CHVwK1CS.js → lru-string-cache-DXyh0UqD.js} +0 -0
  435. /package/dist/public/assets/{lua-B71IklsF.js → lua-Dxo01oIG.js} +0 -0
  436. /package/dist/public/assets/{mcp-consent-store-B7QM8uoo.js → mcp-consent-store-BivjPpLe.js} +0 -0
  437. /package/dist/public/assets/{min-nSRrTGDE.js → min-B52VabRz.js} +0 -0
  438. /package/dist/public/assets/{overlay-layers-cTOQ-1PW.js → overlay-layers-DGwgwjHg.js} +0 -0
  439. /package/dist/public/assets/{panzoom.es-D_Inq3Bn.js → panzoom.es-JQqfaE6_.js} +0 -0
  440. /package/dist/public/assets/{parse-api-error-CqQte8A1.js → parse-api-error-CGRziNbI.js} +0 -0
  441. /package/dist/public/assets/{path-rUjnF-It.js → path-BTSnI4V0.js} +0 -0
  442. /package/dist/public/assets/{pdf-B6i840eQ.js → pdf-DDNlrbvd.js} +0 -0
  443. /package/dist/public/assets/{pdf.worker-BVtQmJKT.js → pdf.worker-MgQT7Lb-.js} +0 -0
  444. /package/dist/public/assets/{perl-B5Ul8OcV.js → perl-L_d0-K7D.js} +0 -0
  445. /package/dist/public/assets/{properties-CWbs0haa.js → properties-B1mL7FEj.js} +0 -0
  446. /package/dist/public/assets/{r-DcrAlDW2.js → r-D1HJ6WJD.js} +0 -0
  447. /package/dist/public/assets/{rough.esm-BfebUORF.js → rough.esm-FREjYXwx.js} +0 -0
  448. /package/dist/public/assets/{ruby-i1xYQ9jV.js → ruby-BWJ7ZkjF.js} +0 -0
  449. /package/dist/public/assets/{share-metadata-rows-D1HTNYwn.js → share-metadata-rows-c17l05D6.js} +0 -0
  450. /package/dist/public/assets/{shell-cUw_P8eQ.js → shell-ul8ysUs1.js} +0 -0
  451. /package/dist/public/assets/{sortable.esm-ByX1chKY.js → sortable.esm-BuA5-2It.js} +0 -0
  452. /package/dist/public/assets/{sql-xiwUJ94E.js → sql-BJVFbIWu.js} +0 -0
  453. /package/dist/public/assets/{src-DkpCd49O.js → src-CIOeKeVw.js} +0 -0
  454. /package/dist/public/assets/{startup-marks-BHZdrXwz.js → startup-marks-Bl-kvAXX.js} +0 -0
  455. /package/dist/public/assets/{stex-rJmw0eOd.js → stex-WCjgSIWy.js} +0 -0
  456. /package/dist/public/assets/{swift-Cl1DeyT6.js → swift-BmJYIPlb.js} +0 -0
  457. /package/dist/public/assets/{thread-draft-staging-CygDRDTa.js → thread-draft-staging-Df0IT4FR.js} +0 -0
  458. /package/dist/public/assets/{timeline-diff-store-C89mH-2r.js → timeline-diff-store-B-Ea84Rl.js} +0 -0
  459. /package/dist/public/assets/{toml-B2JpJCpy.js → toml-BOOm8Wvq.js} +0 -0
  460. /package/dist/public/assets/{use-installed-clis-BR1AXhaE.js → use-installed-clis-BpdGnrVu.js} +0 -0
  461. /package/dist/public/assets/{useLintConfigViewMode-eMibVVkV.js → useLintConfigViewMode-15VleUG7.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-PbmsUfAu.js";import{t}from"./src-DsJU4LsJ.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-WYO6CB5R-DAcO6KqN.js";import{C as u}from"./src-DkpCd49O.js";import{a as d,r as f,u as p}from"./chunk-ICXQ74PX-B_iuJAXS.js";import{t as m}from"./chunk-HOUHSVGY-CZX004Ef.js";import{n as h}from"./chunk-Q4XR5HBZ--1adMSrR.js";import{n as g,t as _}from"./chunk-OGEWGWER-dIUHPavN.js";import{a as v,i as y,r as b,t as x}from"./chunk-C7G6YPKG-JOVwaeql.js";import{t as S}from"./rough.esm-BfebUORF.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,g=t.labelType===`markdown`,v=await h(o,l(d(f),c()),{useHtmlLabels:i,width:t.width||c().flowchart?.wrappingWidth,classes:g?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:m,markdown:g},c()),y=v.getBBox(),b=(t?.padding??0)/2;if(i){let e=v.children[0],t=u(v);await _(e,f),y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}return i?o.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):o.attr(`transform`,`translate(0, `+-y.height/2+`)`),t.centerLabel&&o.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:a,bbox:y,halfPadding:b,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 h(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 h(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:m,backgroundStyles:g}=y(n),_=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),b=s(r.flowchart.htmlLabels),x=n.direction===`LR`,C=_.insert(`g`).attr(`class`,`cluster-label swimlane-label`),w=await h(C,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}),T=w.getBBox();if(b){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=x?4:0,F=T.height+2*P,I,L;if(x){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(_),s=v(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),c=v(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),l=i.rectangle(M,k,e,O,s);I=_.insert(()=>l,`:first-child`);let u=i.rectangle(t,k,r,O,c);L=_.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.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(_),c=v(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),l=v(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),u=e.rectangle(s,k,D,t,c);I=_.insert(()=>u,`:first-child`);let f=e.rectangle(s,r,D,i,l);L=_.insert(()=>f,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.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:_,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:m}=y(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),b=a(r),x=_.insert(`g`).attr(`class`,`cluster-label `),C;C=n.labelType===`markdown`?await h(x,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}):await M(x,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=v(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`,m.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}=g(r);if(x.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=x.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:m}=y(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),b=a(r),x=_.insert(`g`).attr(`class`,`cluster-label `),C=await h(x,n.label,{style:n.labelStyle,useHtmlLabels:b,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=v(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`,m.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}=g(r);if(x.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=x.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}=y(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=v(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}=y(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,m]=l(f),h=oe(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:b}=n,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...ae(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...ae(g/2,_/2,g/2,-_/2,p,m,!0)],w=S.svg(u),O=v(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}=y(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}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),T(t,m),t.intersect=function(e){return G.polygon(t,p,e)},s}e(le,`card`);function ue(e,t){let{nodeStyles:n}=y(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=v(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}=y(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=v(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-BavonG01.js";import{t}from"./src-DFZupjZD.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-WYO6CB5R-BMZjhy31.js";import{C as u}from"./src-CIOeKeVw.js";import{a as d,r as f,u as p}from"./chunk-ICXQ74PX-QBz75RJe.js";import{t as m}from"./chunk-HOUHSVGY-FQeseOdw.js";import{n as h}from"./chunk-Q4XR5HBZ-FwXZQ9hY.js";import{n as g,t as _}from"./chunk-OGEWGWER-D9rNoxcC.js";import{a as v,i as y,r as b,t as x}from"./chunk-C7G6YPKG-DeJ7KSfD.js";import{t as S}from"./rough.esm-FREjYXwx.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,g=t.labelType===`markdown`,v=await h(o,l(d(f),c()),{useHtmlLabels:i,width:t.width||c().flowchart?.wrappingWidth,classes:g?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:m,markdown:g},c()),y=v.getBBox(),b=(t?.padding??0)/2;if(i){let e=v.children[0],t=u(v);await _(e,f),y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}return i?o.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):o.attr(`transform`,`translate(0, `+-y.height/2+`)`),t.centerLabel&&o.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:a,bbox:y,halfPadding:b,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 h(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 h(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:m,backgroundStyles:g}=y(n),_=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),b=s(r.flowchart.htmlLabels),x=n.direction===`LR`,C=_.insert(`g`).attr(`class`,`cluster-label swimlane-label`),w=await h(C,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}),T=w.getBBox();if(b){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=x?4:0,F=T.height+2*P,I,L;if(x){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(_),s=v(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),c=v(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),l=i.rectangle(M,k,e,O,s);I=_.insert(()=>l,`:first-child`);let u=i.rectangle(t,k,r,O,c);L=_.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.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(_),c=v(n,{roughness:.7,fill:o,stroke:d,fillWeight:3,seed:a}),l=v(n,{roughness:.7,fill:`none`,stroke:d,seed:a}),u=e.rectangle(s,k,D,t,c);I=_.insert(()=>u,`:first-child`);let f=e.rectangle(s,r,D,i,l);L=_.insert(()=>f,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.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:_,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:m}=y(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),b=a(r),x=_.insert(`g`).attr(`class`,`cluster-label `),C;C=n.labelType===`markdown`?await h(x,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}):await M(x,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=v(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`,m.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}=g(r);if(x.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=x.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:m}=y(n),_=e.insert(`g`).attr(`class`,`cluster `+n.cssClasses).attr(`id`,n.domId).attr(`data-look`,n.look),b=a(r),x=_.insert(`g`).attr(`class`,`cluster-label `),C=await h(x,n.label,{style:n.labelStyle,useHtmlLabels:b,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=v(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`,m.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}=g(r);if(x.attr(`transform`,`translate(${n.x-w.width/2}, ${n.y-n.height/2+A})`),d){let e=x.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}=y(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=v(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}=y(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,m]=l(f),h=oe(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:b}=n,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...ae(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...ae(g/2,_/2,g/2,-_/2,p,m,!0)],w=S.svg(u),O=v(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}=y(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}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),T(t,m),t.intersect=function(e){return G.polygon(t,p,e)},s}e(le,`card`);function ue(e,t){let{nodeStyles:n}=y(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=v(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}=y(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=v(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}=y(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=v(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}=y(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)],m=[{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}],h=S.svg(i),g=v(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=D(p).replace(`Z`,``),b=h.path(_,g),x=D(m),w=h.path(x,{...g}),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,m,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}=y(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)],m=[{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}],h=S.svg(i),g=v(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=D(p).replace(`Z`,``),b=h.path(_,g),x=D(m),w=h.path(x,{...g}),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,m,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}=y(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)],m=[...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)],h=[{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)],g=S.svg(i),_=v(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let b=D(p).replace(`Z`,``),x=g.path(b,_),w=D(m).replace(`Z`,``),O=g.path(w,_),k=D(h),A=g.path(k,{..._}),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,h,e)},i}e(ge,`curlyBraces`);async function _e(e,t){let{labelStyles:n,nodeStyles:r}=y(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),m=v(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,b=g/4,x=[{x:_,y:0},{x:b,y:0},{x:0,y:g/2},{x:b,y:g},{x:_,y:g},...k(-_,-g/2,d,50,270,90)],w=D(x),O=p.path(w,m),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}=y(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),m=(t.height?t.height:c.height)+a+f,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=ye(0,0,u,m,d,f),r=be(0,f,u,m,d,f),i=v(t,{}),a=e.path(n,i),o=e.path(r,v(t,{fill:`none`}));h=s.insert(()=>o,`:first-child`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=ve(0,0,u,m,d,f);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,p(g)).attr(`style`,r)}return h.attr(`label-offset-y`,f),h.attr(`transform`,`translate(${-u/2}, ${-(m/2+f)})`),T(t,h),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}=y(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:m}=t,{cssStyles:h}=t;if(n?.rx&&n.ry&&(f=n.rx,m=n.ry),t.look===`handDrawn`){let e=S.svg(a),n=v(t,{}),r=f||m?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(h))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,p(f)).attr(`ry`,p(m)).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=v(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}=y(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:m}=t,h=S.svg(o),g=v(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{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=h.polygon(_.map(e=>[e.x,e.y]),g),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),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}=y(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:m}=n;if(n.look===`handDrawn`){let e=S.svg(c),t=v(n,{roughness:.2,strokeWidth:2.5}),r=v(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(m)),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}=y(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=v(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}=y(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:m}=n,h=S.svg(s),g=v(n,{});n.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=D(p),b=h.path(_,g),x=s.insert(()=>b,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),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}=y(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=v(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),T(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/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}=y(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),m=v(n,{});n.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{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}],g=D(h),_=p.path(g,m),b=s.insert(()=>_,`: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,h,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}=y(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}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=S.svg(c),n=v(t,{}),r=Pe(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,T(t,m),t.intersect=function(e){return G.polygon(t,p,e)},c}e(Fe,`hexagon`);async function Ie(e,n){let{labelStyles:r,nodeStyles:i}=y(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=v(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),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),T(n,m),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}=y(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`,h=c,g=c,{nodeBorder:_}=r,{stylesMap:b}=x(n),w=-g/2,E=-h/2,D=n.label?8:0,O=S.svg(u),k=v(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`);let A=O.rectangle(w,E,g,h,k),j=Math.max(g,d.width),M=h+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 m(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: ${b.get(`stroke`)??_};`)}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+g/2,y:i-a/2+d.height+D},{x:r+g/2,y:i+a/2},{x:r-g/2,y:i+a/2},{x:r-g/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-g/2,y:i-a/2},{x:r+g/2,y:i-a/2},{x:r+g/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{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+h},{x:r-g/2,y:i-a/2+h}],G.polygon(n,o,e)},u}e(Le,`icon`);async function Re(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=y(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,h=n.pos===`t`,{nodeBorder:g,mainBkg:_}=r,{stylesMap:b}=x(n),w=S.svg(u),E=v(n,{});n.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`),E.stroke=b.get(`fill`)??_;let D=u.append(`g`);n.icon&&D.html(`<g>${await m(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},${h?d.height/2+p/2-A/2-M:-d.height/2-p/2-A/2-M})`),D.attr(`style`,`color: ${b.get(`stroke`)??g};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-I/2:I/2-d.height})`),ee.attr(`transform`,`translate(0,${h?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}=y(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`),h=n.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:b,mainBkg:w}=r,{stylesMap:E}=x(n),D=-_/2,O=-g/2,k=n.label?8:0,A=S.svg(u),j=v(n,{});n.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,_,g,5),j),P=Math.max(_,d.width),F=g+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 m(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},${h?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??b};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-F/2:F/2-d.height})`),L.attr(`transform`,`translate(0,${h?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=h?[{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+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/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-_/2,y:i-a/2+g}],G.polygon(n,o,e)},u}e(ze,`iconRounded`);async function Be(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=y(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`),h=n.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:b,mainBkg:w}=r,{stylesMap:E}=x(n),D=-_/2,O=-g/2,k=n.label?8:0,A=S.svg(u),j=v(n,{});n.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,_,g,.1),j),P=Math.max(_,d.width),F=g+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 m(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},${h?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??b};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-F/2:F/2-d.height})`),L.attr(`transform`,`translate(0,${h?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=h?[{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+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/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-_/2,y:i-a/2+g}],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}=y(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:m}=await C(e,n,`image-shape default`),h=n.pos===`t`,g=-u/2,_=-d/2,b=n.label?8:0,x=S.svg(f),w=v(n,{});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let E=x.rectangle(g,_,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},${h?O/2-d:-O/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-b/2:d/2-p.height/2+b/2})`),A.attr(`transform`,`translate(0,${h?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=h?[{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}=y(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=v(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}=y(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=v(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}=y(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=v(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}=y(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=v(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=D(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),T(n,m),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}=y(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),m=(t?.height?t?.height:c.height)+f+o*2,h=m*.1,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=Je(0,0,u,m,d,f,h),r=Ye(0,f,u,m,d,f),i=v(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),g=s.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=qe(0,0,u,m,d,f,h);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,p(_)).attr(`style`,r)}return g.attr(`label-offset-y`,f),g.attr(`transform`,`translate(${-u/2}, ${-(m/2+f)})`),T(t,g),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}=y(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:m}=t,h=S.svg(s),g=v(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{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=h.polygon(_.map(e=>[e.x,e.y]),g),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),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,_,e)},s}e($e,`linedWaveEdgedRect`);async function et(e,t){let{labelStyles:n,nodeStyles:r}=y(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,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,b=S.svg(c),x=v(t,{}),w=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],O=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];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`),_&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,_),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}=y(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,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,b=O(h-10,g+m+10,h+d-10,g+m+10,p,.8),x=b?.[b.length-1],w=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...b,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],k=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:g},{x:h,y:g}],A=S.svg(i),j=v(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`),_&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,_),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}=y(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:m}=t,h=S.svg(s),g=v(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,u,d,g),b=s.insert(()=>_,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,m),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}=y(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=v(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}=y(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,m=p/2,h=[{x:f+m,y:p},{x:f,y:0},{x:f+m,y:-p},{x:-f,y:-p},{x:-f,y:p}],{cssStyles:g}=t,_=S.svg(s),b=v(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=D(h),w=_.path(x,b),O=s.insert(()=>w,`:first-child`);return O.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-m/2},0)`),l.attr(`transform`,`translate(${-m/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,h,e)},s}e(at,`rect_left_inv_arrow`);async function ot(e,n){let{labelStyles:r,nodeStyles:i}=y(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,m=await M(d,p,n.labelStyle,!0,!0),h={width:0,height:0};if(a(c())){let e=m.children[0],t=u(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}t.info(`Text 2`,f);let g=f||[],_=m.getBBox(),b=await M(d,Array.isArray(g)?g.join(`<br/>`):g,n.labelStyle,!0,!0),x=b.children[0],C=u(b);h=x.getBoundingClientRect(),C.attr(`width`,h.width),C.attr(`height`,h.height);let w=(n.padding||0)/2;u(b).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+w+5)+`)`),u(m).attr(`transform`,`translate( `+(h.width<_.width?0:-(_.width-h.width)/2)+`, 0)`),h=d.node().getBBox(),d.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-w+3)+`)`);let E=h.width+(n.padding||0),D=h.height+(n.padding||0),O=-h.width/2-w,k=-h.height/2-w,A,j;if(n.look===`handDrawn`){let e=S.svg(s),r=v(n,{}),i=e.path(N(O,k,E,D,n.rx||0),r),a=e.line(-h.width/2-w,-h.height/2-w+_.height+w,h.width/2+w,-h.height/2-w+_.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`,-h.width/2-w).attr(`y`,-h.height/2-w).attr(`width`,h.width+(n.padding||0)).attr(`height`,h.height+(n.padding||0)),j.attr(`class`,`divider`).attr(`x1`,-h.width/2-w).attr(`x2`,h.width/2+w).attr(`y1`,-h.height/2-w+_.height+w).attr(`y2`,-h.height/2-w+_.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}=y(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,m=Z-l/2,h=-u/2,{cssStyles:g}=t,_=S.svg(o),b=v(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m+d,y:h},{x:m+d,y:h+f},{x:m-Z,y:h+f},{x:m-Z,y:h},{x:m,y:h},{x:m,y:h+f}],w=_.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(g)),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),g&&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}=y(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,m=-f/2,h=-p/2,{cssStyles:g}=t,_=S.svg(s),b=v(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],w=D(x),O=_.path(w,b),k=s.insert(()=>O,`:first-child`);return k.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,g),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}=y(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),m=v(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{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)],g=D(h),_=p.path(g,m),b=s.insert(()=>_,`: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,h,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}=y(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=v(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.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`;_.attr(`style`,`filter:url(#${n})`)}return T(t,_),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,b(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}=y(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,m=-l/2,h=-u/2,g=[{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=v(t,{}),r=e.rectangle(m,h,d+16,f,n),i=e.line(m+ht,h,m+ht,h+f,n),a=e.line(m+ht+d,h,m+ht+d,h+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,g);r&&e.attr(`style`,r),T(t,e)}return t.intersect=function(e){return G.polygon(t,g,e)},s}e(gt,`subroutine`);var _t=.2;async function vt(e,t){let{labelStyles:n,nodeStyles:r}=y(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,m=-f/2,h=-p/2,{cssStyles:g}=t,_=S.svg(s),b=v(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],w=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let O=D(x),k=_.path(O,b),A=D(w),j=_.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`),g&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,g),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}=y(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,m=S.svg(i),h=v(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{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}],_=-s/2+s/2*.1,b=-f/2-d*.4,x=[{x:_+s-u,y:(b+c)*1.3},{x:_+s,y:b+c-d},{x:_+s,y:(b+c)*.9},...O(_+s,(b+c)*1.25,_+s-u,(b+c)*1.3,-c*.02,.5)],w=D(g),k=m.path(w,h),A=D(x),j=m.path(A,{...h,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,g,e)},i}e(yt,`taggedWaveEdgedRectangle`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=y(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,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-PbmsUfAu.js";function t(e){return e==null}e(t,`isNothing`);function n(e){return typeof e==`object`&&!!e}e(n,`isObject`);function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}e(r,`toArray`);function i(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}e(i,`extend`);function a(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}e(a,`repeat`);function o(e){return e===0&&1/e==-1/0}e(o,`isNegativeZero`);var s={isNothing:t,isObject:n,toArray:r,repeat:a,isNegativeZero:o,extend:i};function c(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
1
+ import{n as e}from"./chunk-Y2CYZVJY-BavonG01.js";function t(e){return e==null}e(t,`isNothing`);function n(e){return typeof e==`object`&&!!e}e(n,`isObject`);function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}e(r,`toArray`);function i(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}e(i,`extend`);function a(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}e(a,`repeat`);function o(e){return e===0&&1/e==-1/0}e(o,`isNegativeZero`);var s={isNothing:t,isObject:n,toArray:r,repeat:a,isNegativeZero:o,extend:i};function c(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
2
2
 
3
3
  `+e.mark.snippet),r+` `+n):r}e(c,`formatError`);function l(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=c(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}e(l,`YAMLException$1`),l.prototype=Object.create(Error.prototype),l.prototype.constructor=l,l.prototype.toString=e(function(e){return this.name+`: `+c(this,e)},`toString`);var u=l;function d(e,t,n,r,i){var a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}e(d,`getLine`);function f(e,t){return s.repeat(` `,t-e.length)+e}e(f,`padStart`);function p(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var c=``,l,u,p=Math.min(e.line+t.linesAfter,i.length).toString().length,m=t.maxLength-(t.indent+p+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)u=d(e.buffer,r[o-l],i[o-l],e.position-(r[o]-r[o-l]),m),c=s.repeat(` `,t.indent)+f((e.line-l+1).toString(),p)+` | `+u.str+`
4
4
  `+c;for(u=d(e.buffer,r[o],i[o],e.position,m),c+=s.repeat(` `,t.indent)+f((e.line+1).toString(),p)+` | `+u.str+`
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-BavonG01.js";import"./src-DFZupjZD.js";import"./chunk-WYO6CB5R-BMZjhy31.js";import"./chunk-ICXQ74PX-QBz75RJe.js";import"./chunk-HOUHSVGY-FQeseOdw.js";import"./chunk-Q4XR5HBZ-FwXZQ9hY.js";import"./chunk-7BUUIJ7U-nkQ2KUUq.js";import"./chunk-OGEWGWER-D9rNoxcC.js";import"./chunk-32BRIVSS-CydyM0Ml.js";import"./chunk-XXDRQBXY-BW_2kVvu.js";import"./chunk-VR4S4FIN-bcHVGPIL.js";import"./chunk-C7G6YPKG-DeJ7KSfD.js";import"./chunk-ZGVPDNZ5-DN7h9evR.js";import"./chunk-52WLFC77-cG-DvO_j.js";import"./chunk-FWX5IMBZ-CXQqiinv.js";import{i as t,n,r,t as i}from"./chunk-V7JOEXUC-CsJjje8x.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-BavonG01.js";import"./src-DFZupjZD.js";import"./chunk-WYO6CB5R-BMZjhy31.js";import"./chunk-ICXQ74PX-QBz75RJe.js";import"./chunk-HOUHSVGY-FQeseOdw.js";import"./chunk-Q4XR5HBZ-FwXZQ9hY.js";import"./chunk-7BUUIJ7U-nkQ2KUUq.js";import"./chunk-OGEWGWER-D9rNoxcC.js";import"./chunk-32BRIVSS-CydyM0Ml.js";import"./chunk-XXDRQBXY-BW_2kVvu.js";import"./chunk-VR4S4FIN-bcHVGPIL.js";import"./chunk-C7G6YPKG-DeJ7KSfD.js";import"./chunk-ZGVPDNZ5-DN7h9evR.js";import"./chunk-52WLFC77-cG-DvO_j.js";import"./chunk-FWX5IMBZ-CXQqiinv.js";import{i as t,n,r,t as i}from"./chunk-V7JOEXUC-CsJjje8x.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
- import{cn as e,sn as t}from"./dist-B4smVaZm2.js";var n={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.45.1`}?.VITE_APP_VERSION??`0.0.0-unknown`;function r(){return t({kind:`web`,runtimeVersion:n})}function i(){return e({kind:`web`,runtimeVersion:n})}export{r as n,i as r,n as t};
1
+ import{cn as e,sn as t}from"./dist-D8RKvolB2.js";var n={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.45.1`}?.VITE_APP_VERSION??`0.0.0-unknown`;function r(){return t({kind:`web`,runtimeVersion:n})}function i(){return e({kind:`web`,runtimeVersion:n})}export{r as n,i as r,n as t};
@@ -1,6 +1,6 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Ht as n,Wt as r}from"./DocumentContext-DOLytv_M.js";import{t as i}from"./react-f2sANaYj.js";import{n as a,r as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{u as c}from"./terminal-input-events-B8xUcID4.js";import{n as l,t as u}from"./createLucideIcon-BiRV80uZ.js";import{t as d}from"./button-oSXzJYWO.js";import{E as f,ut as p}from"./CodeMirrorPropInput-ni9vC7Fz.js";import{t as m}from"./checkbox-DYPwCq3O.js";import{O as h,Rn as g,S as _,ft as v,pt as y,ut as b,x}from"./dist-B4smVaZm2.js";import{t as ee}from"./chevron-down-BJumc1E_.js";import{t as te}from"./x-C6kVbc_i.js";import{n as S}from"./dist-BVbCw0G-.js";import{t as C}from"./dist-DuwTJb1j.js";import{f as w}from"./doc-paths-DPN-3rhq.js";import{d as T}from"./documents-events-DYwaAqwG.js";var ne=u(`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`}]]),re=u(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),E=s(),D=`open-knowledge:doc-panel-tab`,ie=null;function ae(){let e=ie;return ie=null,e}function O(e,t=typeof window>`u`?new EventTarget:window){ie=e,t.dispatchEvent(new CustomEvent(D,{detail:{tab:e}}))}function oe(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail?.tab:void 0;n&&e(n)};return t.addEventListener(D,n),()=>t.removeEventListener(D,n)}var se=`245,158,11`,ce=se,le={fill:.22,line:.7},ue={fill:.45,line:1},de=.45;function fe(e,t){let n=ce,{fill:r,line:i}=t?ue:le;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:rgba(${n},${r})`,`box-shadow:inset 0 -2px 0 rgba(${n},${i})`,``].join(`;`)}function pe(e){return e.map(e=>e.id??`·`).join(`|`)}function me(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 he(e,t){return e.id===null||e.id===t}function ge(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=>he(e,t));i.push({from:a.from,to:a.to,style:fe(e??a.covering[0],e!==void 0),threadId:me(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&&pe(a.covering)===pe(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var _e=`data-comment-reveal`;function ve(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function ye(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${ve(e)}"]`)}function be(e){let t=ye(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function xe(e){ye(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function Se(e){if(e.quote===``)return!1;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="${ve(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=Ce(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),we(n),!0}return!1}function Ce(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 we(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${se},${de})`),e.setAttribute(_e,`true`);let t=()=>{e.removeAttribute(_e),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function Te(e){let t=``,n=[];return e.descendants((e,r)=>{if(e.isText&&e.text)for(let i=0;i<e.text.length;i++)t+=e.text[i],n.push(r+i);return!0}),{text:t,positions:n}}function Ee(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 De(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 Oe(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;return r}var ke=4,Ae=64;function je(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:g(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:g(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=Math.max(t.length*ke,t.length+Ae);return c-s>l?null:{start:s,end:c}}function k(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 Me(e,t,n){if(t.length===0)return null;let r=Ee(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=g(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=je(e.text,t,n);return r===null?null:k(e,r)}if(r.length===1)return k(e,r[0]);let i=n?.prefix??``,a=n?.suffix??``,o=[],s=-1;for(let t of r){let n=De(i,e.text.slice(0,t.start))+Oe(a,e.text.slice(t.end));n>s?(s=n,o=[t]):n===s&&o.push(t)}if(o.length===1)return k(e,o[0]);let c=n?.start;if(c===void 0)return k(e,o[0]);let l=o[0],u=1/0;for(let e of o){let t=Math.abs(e.start-c);t<u&&(u=t,l=e)}return k(e,l)}var Ne=64;function Pe(e,t,n){return{prefix:e.textBetween(Math.max(0,t-Ne),t,`
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{Ht as n,Wt as r}from"./DocumentContext-COt_qsrp.js";import{t as i}from"./react-f2sANaYj.js";import{n as a,r as o}from"./dist-Nvb76hAm.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{u as c}from"./terminal-input-events-D7rv6nZZ.js";import{t as l}from"./utils-CPqDy6Hr.js";import{t as u}from"./button-D3xSRfT4.js";import{E as d,at as f}from"./CodeMirrorPropInput-CRKAndsx.js";import{t as p}from"./checkbox-Cq1BnJ3x.js";import{O as m,Rn as h,S as g,ft as _,pt as v,ut as y,x as b}from"./dist-D8RKvolB2.js";import{t as x}from"./createLucideIcon-wbFLvDA-.js";import{t as ee}from"./chevron-down-BH5tpfEN.js";import{t as te}from"./x-M_y7ybHr.js";import{n as S}from"./dist-BNVxnBBw.js";import{t as C}from"./dist-Du3GTGo5.js";import{f as w}from"./doc-paths-CBQZMJ5n.js";import{d as T}from"./documents-events-CUD1Vtsd.js";var ne=x(`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`}]]),re=x(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),E=s(),D=`open-knowledge:doc-panel-tab`,ie=null;function ae(){let e=ie;return ie=null,e}function O(e,t=typeof window>`u`?new EventTarget:window){ie=e,t.dispatchEvent(new CustomEvent(D,{detail:{tab:e}}))}function oe(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail?.tab:void 0;n&&e(n)};return t.addEventListener(D,n),()=>t.removeEventListener(D,n)}var se=`245,158,11`,ce=se,le={fill:.22,line:.7},ue={fill:.45,line:1},de=.45;function fe(e,t){let n=ce,{fill:r,line:i}=t?ue:le;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:rgba(${n},${r})`,`box-shadow:inset 0 -2px 0 rgba(${n},${i})`,``].join(`;`)}function pe(e){return e.map(e=>e.id??`·`).join(`|`)}function me(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 he(e,t){return e.id===null||e.id===t}function ge(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=>he(e,t));i.push({from:a.from,to:a.to,style:fe(e??a.covering[0],e!==void 0),threadId:me(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&&pe(a.covering)===pe(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var _e=`data-comment-reveal`;function ve(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function ye(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${ve(e)}"]`)}function be(e){let t=ye(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function xe(e){ye(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function Se(e){if(e.quote===``)return!1;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="${ve(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=Ce(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),we(n),!0}return!1}function Ce(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 we(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${se},${de})`),e.setAttribute(_e,`true`);let t=()=>{e.removeAttribute(_e),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function Te(e){let t=``,n=[];return e.descendants((e,r)=>{if(e.isText&&e.text)for(let i=0;i<e.text.length;i++)t+=e.text[i],n.push(r+i);return!0}),{text:t,positions:n}}function Ee(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 De(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 Oe(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;return r}var ke=4,Ae=64;function je(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:h(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:h(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=Math.max(t.length*ke,t.length+Ae);return c-s>l?null:{start:s,end:c}}function k(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 Me(e,t,n){if(t.length===0)return null;let r=Ee(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=h(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=je(e.text,t,n);return r===null?null:k(e,r)}if(r.length===1)return k(e,r[0]);let i=n?.prefix??``,a=n?.suffix??``,o=[],s=-1;for(let t of r){let n=De(i,e.text.slice(0,t.start))+Oe(a,e.text.slice(t.end));n>s?(s=n,o=[t]):n===s&&o.push(t)}if(o.length===1)return k(e,o[0]);let c=n?.start;if(c===void 0)return k(e,o[0]);let l=o[0],u=1/0;for(let e of o){let t=Math.abs(e.start-c);t<u&&(u=t,l=e)}return k(e,l)}var Ne=64;function Pe(e,t,n){return{prefix:e.textBetween(Math.max(0,t-Ne),t,`
2
2
  `),suffix:e.textBetween(n,Math.min(e.content.size,n+Ne),`
3
- `)}}function Fe(e,t,n){return Me(Te(e),t,n)}var Ie=220,Le=24;function Re(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-Ie;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+Le)}function ze(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 Be(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function Ve(e,t){let n=f(e);if(!n)return;let r=ze(n.dom);if(!r){e.commands.scrollIntoView();return}let i,a;try{i=n.coordsAtPos(t.from),a=n.coordsAtPos(t.to)}catch{return}let o=r.getBoundingClientRect(),s=Re({anchorTop:i.top,anchorBottom:Math.max(i.bottom,a.bottom),viewTop:o.top,viewBottom:o.bottom,insetTop:Be(r)});if(s===0)return;let c=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;r.scrollTo({top:r.scrollTop+s,behavior:c?`auto`:`smooth`})}var He=e(i(),1);async function A(e,t){let n=await fetch(e,{...t,headers:{"content-type":`application/json`,...t?.headers}}),r=await n.json().catch(()=>null);if(!n.ok){let e=v.safeParse(r);throw Error(e.success?e.data.title??e.data.detail:`comments request failed (${n.status})`)}return r}function j(e){return A(`/api/comment`,{method:`POST`,body:JSON.stringify(e)})}function M(e,t){let n=e.safeParse(t);if(!n.success)throw Error(`The server returned a response this build cannot read.`);return n.data}function N(e){let t=x.safeParse(e);if(!t.success)throw Error(`The server returned a comment thread this build cannot read.`);return t.data}function Ue(e){let t=[];for(let n of e){let e=x.safeParse(n);e.success?t.push(e.data):console.warn(`[comments] skipped a thread this build cannot read`,e.error.issues)}return t}async function We(e){let{threads:t}=await A(e===void 0?`/api/comments`:`/api/comments?doc=${encodeURIComponent(e)}`);return Ue(t)}function Ge(e){return A(`/api/comments`,{method:`POST`,body:JSON.stringify(e)}).then(N)}function Ke(e,t){return j({action:`edit`,id:e,body:t}).then(N)}function qe(e){return j({action:`resolve`,id:e}).then(N)}function Je(e){return j({action:`reopen`,id:e}).then(N)}function Ye(e,t){return j({action:`replace`,id:e,...t}).then(N)}function Xe(e){return j({action:`queue`,id:e}).then(e=>M(y,e))}function Ze(e){return j({action:`unqueue`,id:e}).then(N)}function Qe(e){return A(`/api/comment?id=${encodeURIComponent(e)}`,{method:`DELETE`}).then(e=>M(h,e))}function $e(e){return j({action:`dispatch-prepare-batch`,ids:e}).then(e=>M(b,e))}function et(e){return j({action:`dispatch-complete-batch`,ids:e}).then(e=>M(_,e))}var tt=`open-knowledge:comments-queue-scope`,nt=typeof window>`u`?new EventTarget:window,P=!1;function rt(){let e=P;return P=!1,e}function it(e){let t=()=>{P=!1,e()};return nt.addEventListener(tt,t),()=>nt.removeEventListener(tt,t)}function at(){P=!0,O(`comments`),nt.dispatchEvent(new Event(tt))}var ot=Object.freeze([]),F=Object.freeze([]),I=new Map,L=[],R=new Set,z=new Set,B=!1,V=new Set,H=0,st=0;function ct(){for(let e of R)e()}function lt(){H+=1,ct()}function U(){st+=1,ct()}function ut(e){return{id:e.threadId,docName:e.docName,target:e.target,anchor:e.anchor===null?null:{quote:e.anchor.exact,prefix:e.anchor.prefix,suffix:e.anchor.suffix,start:e.anchor.start,end:e.anchor.end},status:e.state===`anchored`?`open`:e.state,body:e.latestComment,createdAt:e.createdAt,queued:e.queued}}async function dt(){return(await We()).map(ut).sort((e,t)=>t.createdAt-e.createdAt)}async function W(e){e!==void 0&&z.add(e);let t=await dt();L=t,B=!0;for(let e of z)I.set(e,t.filter(t=>t.docName===e));lt()}var ft=!1;function pt(){ft||typeof window>`u`||(ft=!0,T(e=>{e.includes(`comments`)&&W().catch(()=>void 0)}))}function mt(e){pt(),!z.has(e)&&(z.add(e),W(e).catch(()=>{z.delete(e)}))}function ht(){pt(),!B&&(B=!0,W().catch(()=>{B=!1}))}function gt(e){return mt(e),I.get(e)??ot}function G(e){return R.add(e),()=>{R.delete(e)}}function _t(e){let t=(0,E.c)(2),n;return t[0]===e?n=t[1]:(n=()=>gt(e),t[0]=e,t[1]=n),(0,He.useSyncExternalStore)(G,n,vt)}function vt(){return ot}function K(e){for(let t of I.values()){let n=t.find(t=>t.id===e);if(n)return n}return L.find(t=>t.id===e)??null}function yt(e){Ge({docName:e.docName,quote:e.quote,prefix:e.prefix,suffix:e.suffix,body:e.body,queue:!0}).then(t=>{if(W(e.docName).catch(()=>void 0),e.onCreated!==void 0){e.onCreated(t.threadId);return}at(),cn()}).catch(e=>{S.error(e instanceof Error&&e.message?C._({id:`q3W2nd`,values:{0:e.message}}):C._({id:`SRBk2G`}))})}function bt(e){Ge({docName:e.docName,propertyKey:e.propertyKey,propertyPath:e.propertyPath,quote:e.quote,body:e.body,queue:!0}).then(()=>{W(e.docName).catch(()=>void 0),at(),cn()}).catch(e=>{S.error(e instanceof Error&&e.message?C._({id:`q3W2nd`,values:{0:e.message}}):C._({id:`SRBk2G`}))})}function q(e,t,n){e.then(()=>W(t)).catch(e=>{S.error(e instanceof Error&&e.message?`${n} ${e.message}`:n),W(t).catch(()=>void 0)})}function xt(e,t){let n=K(e)?.docName;q(Ke(e,t),n,C._({id:`kzpkcn`}))}function St(e){let t=K(e)?.docName;q(qe(e),t,C._({id:`eoEUI3`}))}function Ct(e){let t=K(e)?.docName;q(Je(e),t,C._({id:`lISYEX`}))}function wt(e){let t=K(e)?.docName;q(Qe(e),t,C._({id:`IxHMdF`}))}function Tt(e,t,n){let r=K(e)?.docName;q(Ye(e,{quote:t,prefix:n?.prefix,suffix:n?.suffix}),r,C._({id:`mlvM8g`}))}var Et=F,Dt=-1,Ot=F,kt=-1,At=-1;function J(){if(ht(),Dt!==H){let e=L.filter(e=>e.queued&&e.status!==`resolved`).sort((e,t)=>e.createdAt-t.createdAt).map(e=>e.id);Et=e.length===0?F:e,Dt=H}return Et}function jt(){return(0,He.useSyncExternalStore)(G,J,Mt)}function Mt(){return F}function Nt(){let e=J();if(kt!==H||At!==st){let t=e.filter(e=>!V.has(e));Ot=t.length===0?F:t,kt=H,At=st}return Ot}function Pt(){return(0,He.useSyncExternalStore)(G,Nt,Ft)}function Ft(){return F}function It(e){return J().includes(e)}function Lt(e){let t=K(e)?.docName;if(V.has(e)){let t=new Set(V);t.delete(e),V=t,U()}q(Xe(e),t,C._({id:`Hhe73G`}))}function Rt(e){let t=K(e)?.docName;q(Ze(e),t,C._({id:`os6dRM`}))}function zt(e){It(e)?Rt(e):Lt(e)}function Bt(){V.size!==0&&(V=new Set,U())}function Vt(e){let t=new Set(V);t.has(e)?t.delete(e):t.add(e),V=t,U()}function Ht(){let e=J();e.length!==0&&Promise.all(e.map(e=>Ze(e).then(()=>!0).catch(()=>!1))).then(t=>{let n=t.filter(e=>!e).length;n>0&&S.error(C._({id:`4_5_n5`,values:{0:e.length,failed:n}})),W().catch(()=>void 0)})}var Ut=!1;async function Wt({compose:e,threadIds:t,resolve:n=!0}){let r=t??Nt();if(r.length===0||Ut)return[];Ut=!0;try{return await Gt(r,e,n)}finally{Ut=!1}}async function Gt(e,t,n){let r;try{r=await $e(e)}catch(e){return S.error(e instanceof Error&&e.message?C._({id:`VIiaFH`,values:{0:e.message}}):C._({id:`LvoXJX`})),[]}lt();let i=r.results.flatMap(e=>e.ok?[{threadId:e.threadId,payload:e.payload}]:[]);if(i.length===0)return await W().catch(()=>void 0),[];let a=!1;try{a=await t(i)}catch{a=!1}let o=a?i.map(e=>e.threadId):[];return o.length>0&&n&&await et(o).catch(()=>{S.error(C._({id:`siXSpl`}))}),await W().catch(()=>void 0),o}var Kt=`ok:comment-focus-thread`,qt=`ok:comment-open-popover`,Y=`ok:comment-start`,Jt=`ok:comment-posted`,X=typeof window>`u`?new EventTarget:window;function Yt(e){X.dispatchEvent(new CustomEvent(Kt,{detail:e}))}function Xt(e){let t=t=>e(t.detail);return X.addEventListener(Kt,t),()=>X.removeEventListener(Kt,t)}var Zt=null,Z=null,Qt=null,$t=new Set;function en(){let e=Z??Zt;if(e!==Qt){Qt=e;for(let e of $t)e()}}function tn(){return Qt}function nn(e){Z=e,en()}function rn(e){Z===e&&(Z=null,en())}function an(e){return $t.add(e),()=>{$t.delete(e)}}function on(e){Zt=e,en(),X.dispatchEvent(new CustomEvent(qt,{detail:e}))}function sn(e){let t=t=>e(t.detail);return X.addEventListener(qt,t),()=>X.removeEventListener(qt,t)}function cn(){X.dispatchEvent(new CustomEvent(Jt))}function ln(e){let t=()=>e();return X.addEventListener(Jt,t),()=>X.removeEventListener(Jt,t)}function un(){X.dispatchEvent(new CustomEvent(Y))}function dn(e){let t=()=>e();return X.addEventListener(Y,t),()=>X.removeEventListener(Y,t)}var fn=1e4;function pn(e){let t=()=>{let t=n(e.docName);if(!t||t.isDestroyed)return!1;let r=Fe(t.state.doc,e.quote,e.context);return r&&(t.chain().focus().setTextSelection(r).run(),Ve(t,r)),Yt(e.threadId),!0};if(O(`comments`),t())return;window.location.assign(w(e.docName));let i=!1,a=()=>{i||(i=!0,o(),window.clearTimeout(s))},o=r(()=>{t()&&a()}),s=window.setTimeout(a,fn);t()&&a()}var Q=t();function mn(){let e=(0,E.c)(2),t=jt(),n;if(e[0]!==t){n=[];for(let e of t){let t=K(e);t!==null&&n.push(t)}e[0]=t,e[1]=n}else n=e[1];return n}function hn(){return Pt().length}function gn(e){let t=(0,E.c)(34),{count:n,attached:r,expanded:i,onAttach:s,onToggleExpanded:u,onDismiss:f}=e,{_:p}=o();if(n===0)return null;if(!r){let e;t[0]===p?e=t[1]:(e=p({id:`8ycqHY`}),t[0]=p,t[1]=e);let n,r,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=l(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,Q.jsx)(c,{className:`size-3`}),i=(0,Q.jsx)(a,{id:`b24kPi`}),t[2]=n,t[3]=r,t[4]=i):(n=t[2],r=t[3],i=t[4]);let o;return t[5]!==s||t[6]!==e?(o=(0,Q.jsxs)(d,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:s,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[5]=s,t[6]=e,t[7]=o):o=t[7],o}let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=l(`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[8]=m):m=t[8];let h;t[9]!==p||t[10]!==i?(h=p(i?{id:`HFqQui`}:{id:`qokN44`}),t[9]=p,t[10]=i,t[11]=h):h=t[11];let g;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Q.jsx)(ne,{className:`size-3`}),t[12]=g):g=t[12];let _;t[13]===n?_=t[14]:(_=(0,Q.jsx)(a,{id:`eiUA4k`,values:{count:n}}),t[13]=n,t[14]=_);let v=i&&`rotate-180`,y;t[15]===v?y=t[16]:(y=l(`size-3 transition-transform`,v),t[15]=v,t[16]=y);let b;t[17]===y?b=t[18]:(b=(0,Q.jsx)(ee,{className:y}),t[17]=y,t[18]=b);let x;t[19]!==i||t[20]!==u||t[21]!==h||t[22]!==_||t[23]!==b?(x=(0,Q.jsxs)(d,{type:`button`,size:`sm`,variant:`ghost`,"aria-expanded":i,"aria-label":h,onClick:u,"data-testid":`composer-comments-peek`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[g,_,b]}),t[19]=i,t[20]=u,t[21]=h,t[22]=_,t[23]=b,t[24]=x):x=t[24];let S;t[25]===p?S=t[26]:(S=p({id:`pFRz_E`}),t[25]=p,t[26]=S);let C;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(te,{className:`size-3`}),t[27]=C):C=t[27];let w;t[28]!==f||t[29]!==S?(w=(0,Q.jsx)(d,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":S,onClick:f,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:C}),t[28]=f,t[29]=S,t[30]=w):w=t[30];let T;return t[31]!==w||t[32]!==x?(T=(0,Q.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:m,children:[x,w]}),t[31]=w,t[32]=x,t[33]=T):T=t[33],T}function _n(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function vn(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function yn(e){let t=(0,E.c)(14),{thread:n,className:r}=e,i=n.anchor?.quote??``;if(n.target.kind===`property`){let e;t[0]!==n.target.key||t[1]!==n.target.path?(e=vn(n.target.key,n.target.path),t[0]=n.target.key,t[1]=n.target.path,t[2]=e):e=t[2];let a=e,o;t[3]===r?o=t[4]:(o=l(`w-full truncate font-mono text-[11px] text-muted-foreground`,r),t[3]=r,t[4]=o);let s=i===``?``:` “${i}”`,c;return t[5]!==a||t[6]!==o||t[7]!==s?(c=(0,Q.jsxs)(`span`,{className:o,children:[a,`:`,s]}),t[5]=a,t[6]=o,t[7]=s,t[8]=c):c=t[8],c}let a;t[9]===r?a=t[10]:(a=l(`w-full truncate font-mono text-[11px] text-muted-foreground`,r),t[9]=r,t[10]=a);let o;return t[11]!==i||t[12]!==a?(o=(0,Q.jsxs)(`span`,{className:a,children:[`“`,i,`”`]}),t[11]=i,t[12]=a,t[13]=o):o=t[13],o}function bn(e){pn({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{Se({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=xn)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var xn=30;function Sn(e){let t=(0,E.c)(9),{threads:n}=e,{_:r}=o(),i=Pt();if(n.length===0)return null;let s;if(t[0]!==r||t[1]!==i||t[2]!==n){let e;t[4]!==r||t[5]!==i?(e=e=>{let t=e.status===`orphaned`,n=i.includes(e.id);return(0,Q.jsxs)(`li`,{className:l(`flex items-start gap-2 rounded-md border bg-background/60 px-2 py-1.5`,!n&&`opacity-50`),children:[(0,Q.jsx)(m,{checked:n,onCheckedChange:()=>Vt(e.id),"aria-label":r({id:`Uoux8m`}),className:`mt-0.5`}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1 rounded border px-1 py-px text-[10px] text-muted-foreground`,title:e.docName,children:[(0,Q.jsx)(p,{className:`size-2.5 shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:_n(e.docName)})]}),t&&(0,Q.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-[10px] text-amber-600 dark:text-amber-500`,title:r({id:`MBe6TE`}),children:[(0,Q.jsx)(re,{className:`size-2.5`}),(0,Q.jsx)(a,{id:`2UgoBZ`})]})]}),(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,"aria-label":r({id:`rscgd_`,values:{0:_n(e.docName)}}),onClick:()=>bn(e),className:`h-auto min-h-0 w-full min-w-0 flex-col items-start gap-1 px-0 py-0 text-left font-normal hover:bg-transparent`,children:[(0,Q.jsx)(yn,{thread:e}),(0,Q.jsx)(`span`,{className:`line-clamp-2 w-full text-xs whitespace-normal text-foreground/90`,children:e.body})]})]}),(0,Q.jsx)(d,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":r({id:`YDX9lo`}),onClick:()=>Rt(e.id),className:`size-5 shrink-0 p-0 text-muted-foreground hover:text-foreground`,children:(0,Q.jsx)(te,{className:`size-3`})})]},e.id)},t[4]=r,t[5]=i,t[6]=e):e=t[6],s=n.map(e),t[0]=r,t[1]=i,t[2]=n,t[3]=s}else s=t[3];let c;return t[7]===s?c=t[8]:(c=(0,Q.jsx)(`ul`,{"data-testid":`composer-comments-list`,className:`mt-1 flex max-h-64 basis-full list-none flex-col gap-1 overflow-y-auto subtle-scrollbar`,children:s}),t[7]=s,t[8]=c),c}function Cn(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 wn(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function Tn(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function En(e){if(!e.repeats)return null;let t=wn(e.prefix),n=Tn(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 Dn(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(`
3
+ `)}}function Fe(e,t,n){return Me(Te(e),t,n)}var Ie=220,Le=24;function Re(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-Ie;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+Le)}function ze(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 Be(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function Ve(e,t){let n=d(e);if(!n)return;let r=ze(n.dom);if(!r){e.commands.scrollIntoView();return}let i,a;try{i=n.coordsAtPos(t.from),a=n.coordsAtPos(t.to)}catch{return}let o=r.getBoundingClientRect(),s=Re({anchorTop:i.top,anchorBottom:Math.max(i.bottom,a.bottom),viewTop:o.top,viewBottom:o.bottom,insetTop:Be(r)});if(s===0)return;let c=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;r.scrollTo({top:r.scrollTop+s,behavior:c?`auto`:`smooth`})}var He=e(i(),1);async function A(e,t){let n=await fetch(e,{...t,headers:{"content-type":`application/json`,...t?.headers}}),r=await n.json().catch(()=>null);if(!n.ok){let e=_.safeParse(r);throw Error(e.success?e.data.title??e.data.detail:`comments request failed (${n.status})`)}return r}function j(e){return A(`/api/comment`,{method:`POST`,body:JSON.stringify(e)})}function M(e,t){let n=e.safeParse(t);if(!n.success)throw Error(`The server returned a response this build cannot read.`);return n.data}function N(e){let t=b.safeParse(e);if(!t.success)throw Error(`The server returned a comment thread this build cannot read.`);return t.data}function Ue(e){let t=[];for(let n of e){let e=b.safeParse(n);e.success?t.push(e.data):console.warn(`[comments] skipped a thread this build cannot read`,e.error.issues)}return t}async function We(e){let{threads:t}=await A(e===void 0?`/api/comments`:`/api/comments?doc=${encodeURIComponent(e)}`);return Ue(t)}function Ge(e){return A(`/api/comments`,{method:`POST`,body:JSON.stringify(e)}).then(N)}function Ke(e,t){return j({action:`edit`,id:e,body:t}).then(N)}function qe(e){return j({action:`resolve`,id:e}).then(N)}function Je(e){return j({action:`reopen`,id:e}).then(N)}function Ye(e,t){return j({action:`replace`,id:e,...t}).then(N)}function Xe(e){return j({action:`queue`,id:e}).then(e=>M(v,e))}function Ze(e){return j({action:`unqueue`,id:e}).then(N)}function Qe(e){return A(`/api/comment?id=${encodeURIComponent(e)}`,{method:`DELETE`}).then(e=>M(m,e))}function $e(e){return j({action:`dispatch-prepare-batch`,ids:e}).then(e=>M(y,e))}function et(e){return j({action:`dispatch-complete-batch`,ids:e}).then(e=>M(g,e))}var tt=`open-knowledge:comments-queue-scope`,nt=typeof window>`u`?new EventTarget:window,P=!1;function rt(){let e=P;return P=!1,e}function it(e){let t=()=>{P=!1,e()};return nt.addEventListener(tt,t),()=>nt.removeEventListener(tt,t)}function at(){P=!0,O(`comments`),nt.dispatchEvent(new Event(tt))}var ot=Object.freeze([]),F=Object.freeze([]),I=new Map,L=[],R=new Set,z=new Set,B=!1,V=new Set,H=0,st=0;function ct(){for(let e of R)e()}function lt(){H+=1,ct()}function U(){st+=1,ct()}function ut(e){return{id:e.threadId,docName:e.docName,target:e.target,anchor:e.anchor===null?null:{quote:e.anchor.exact,prefix:e.anchor.prefix,suffix:e.anchor.suffix,start:e.anchor.start,end:e.anchor.end},status:e.state===`anchored`?`open`:e.state,body:e.latestComment,createdAt:e.createdAt,queued:e.queued}}async function dt(){return(await We()).map(ut).sort((e,t)=>t.createdAt-e.createdAt)}async function W(e){e!==void 0&&z.add(e);let t=await dt();L=t,B=!0;for(let e of z)I.set(e,t.filter(t=>t.docName===e));lt()}var ft=!1;function pt(){ft||typeof window>`u`||(ft=!0,T(e=>{e.includes(`comments`)&&W().catch(()=>void 0)}))}function mt(e){pt(),!z.has(e)&&(z.add(e),W(e).catch(()=>{z.delete(e)}))}function ht(){pt(),!B&&(B=!0,W().catch(()=>{B=!1}))}function gt(e){return mt(e),I.get(e)??ot}function G(e){return R.add(e),()=>{R.delete(e)}}function _t(e){let t=(0,E.c)(2),n;return t[0]===e?n=t[1]:(n=()=>gt(e),t[0]=e,t[1]=n),(0,He.useSyncExternalStore)(G,n,vt)}function vt(){return ot}function K(e){for(let t of I.values()){let n=t.find(t=>t.id===e);if(n)return n}return L.find(t=>t.id===e)??null}function yt(e){Ge({docName:e.docName,quote:e.quote,prefix:e.prefix,suffix:e.suffix,body:e.body,queue:!0}).then(t=>{if(W(e.docName).catch(()=>void 0),e.onCreated!==void 0){e.onCreated(t.threadId);return}at(),cn()}).catch(e=>{S.error(e instanceof Error&&e.message?C._({id:`q3W2nd`,values:{0:e.message}}):C._({id:`SRBk2G`}))})}function bt(e){Ge({docName:e.docName,propertyKey:e.propertyKey,propertyPath:e.propertyPath,quote:e.quote,body:e.body,queue:!0}).then(()=>{W(e.docName).catch(()=>void 0),at(),cn()}).catch(e=>{S.error(e instanceof Error&&e.message?C._({id:`q3W2nd`,values:{0:e.message}}):C._({id:`SRBk2G`}))})}function q(e,t,n){e.then(()=>W(t)).catch(e=>{S.error(e instanceof Error&&e.message?`${n} ${e.message}`:n),W(t).catch(()=>void 0)})}function xt(e,t){let n=K(e)?.docName;q(Ke(e,t),n,C._({id:`kzpkcn`}))}function St(e){let t=K(e)?.docName;q(qe(e),t,C._({id:`eoEUI3`}))}function Ct(e){let t=K(e)?.docName;q(Je(e),t,C._({id:`lISYEX`}))}function wt(e){let t=K(e)?.docName;q(Qe(e),t,C._({id:`IxHMdF`}))}function Tt(e,t,n){let r=K(e)?.docName;q(Ye(e,{quote:t,prefix:n?.prefix,suffix:n?.suffix}),r,C._({id:`mlvM8g`}))}var Et=F,Dt=-1,Ot=F,kt=-1,At=-1;function J(){if(ht(),Dt!==H){let e=L.filter(e=>e.queued&&e.status!==`resolved`).sort((e,t)=>e.createdAt-t.createdAt).map(e=>e.id);Et=e.length===0?F:e,Dt=H}return Et}function jt(){return(0,He.useSyncExternalStore)(G,J,Mt)}function Mt(){return F}function Nt(){let e=J();if(kt!==H||At!==st){let t=e.filter(e=>!V.has(e));Ot=t.length===0?F:t,kt=H,At=st}return Ot}function Pt(){return(0,He.useSyncExternalStore)(G,Nt,Ft)}function Ft(){return F}function It(e){return J().includes(e)}function Lt(e){let t=K(e)?.docName;if(V.has(e)){let t=new Set(V);t.delete(e),V=t,U()}q(Xe(e),t,C._({id:`Hhe73G`}))}function Rt(e){let t=K(e)?.docName;q(Ze(e),t,C._({id:`os6dRM`}))}function zt(e){It(e)?Rt(e):Lt(e)}function Bt(){V.size!==0&&(V=new Set,U())}function Vt(e){let t=new Set(V);t.has(e)?t.delete(e):t.add(e),V=t,U()}function Ht(){let e=J();e.length!==0&&Promise.all(e.map(e=>Ze(e).then(()=>!0).catch(()=>!1))).then(t=>{let n=t.filter(e=>!e).length;n>0&&S.error(C._({id:`4_5_n5`,values:{0:e.length,failed:n}})),W().catch(()=>void 0)})}var Ut=!1;async function Wt({compose:e,threadIds:t,resolve:n=!0}){let r=t??Nt();if(r.length===0||Ut)return[];Ut=!0;try{return await Gt(r,e,n)}finally{Ut=!1}}async function Gt(e,t,n){let r;try{r=await $e(e)}catch(e){return S.error(e instanceof Error&&e.message?C._({id:`VIiaFH`,values:{0:e.message}}):C._({id:`LvoXJX`})),[]}lt();let i=r.results.flatMap(e=>e.ok?[{threadId:e.threadId,payload:e.payload}]:[]);if(i.length===0)return await W().catch(()=>void 0),[];let a=!1;try{a=await t(i)}catch{a=!1}let o=a?i.map(e=>e.threadId):[];return o.length>0&&n&&await et(o).catch(()=>{S.error(C._({id:`siXSpl`}))}),await W().catch(()=>void 0),o}var Kt=`ok:comment-focus-thread`,qt=`ok:comment-open-popover`,Y=`ok:comment-start`,Jt=`ok:comment-posted`,X=typeof window>`u`?new EventTarget:window;function Yt(e){X.dispatchEvent(new CustomEvent(Kt,{detail:e}))}function Xt(e){let t=t=>e(t.detail);return X.addEventListener(Kt,t),()=>X.removeEventListener(Kt,t)}var Zt=null,Z=null,Qt=null,$t=new Set;function en(){let e=Z??Zt;if(e!==Qt){Qt=e;for(let e of $t)e()}}function tn(){return Qt}function nn(e){Z=e,en()}function rn(e){Z===e&&(Z=null,en())}function an(e){return $t.add(e),()=>{$t.delete(e)}}function on(e){Zt=e,en(),X.dispatchEvent(new CustomEvent(qt,{detail:e}))}function sn(e){let t=t=>e(t.detail);return X.addEventListener(qt,t),()=>X.removeEventListener(qt,t)}function cn(){X.dispatchEvent(new CustomEvent(Jt))}function ln(e){let t=()=>e();return X.addEventListener(Jt,t),()=>X.removeEventListener(Jt,t)}function un(){X.dispatchEvent(new CustomEvent(Y))}function dn(e){let t=()=>e();return X.addEventListener(Y,t),()=>X.removeEventListener(Y,t)}var fn=1e4;function pn(e){let t=()=>{let t=n(e.docName);if(!t||t.isDestroyed)return!1;let r=Fe(t.state.doc,e.quote,e.context);return r&&(t.chain().focus().setTextSelection(r).run(),Ve(t,r)),Yt(e.threadId),!0};if(O(`comments`),t())return;window.location.assign(w(e.docName));let i=!1,a=()=>{i||(i=!0,o(),window.clearTimeout(s))},o=r(()=>{t()&&a()}),s=window.setTimeout(a,fn);t()&&a()}var Q=t();function mn(){let e=(0,E.c)(2),t=jt(),n;if(e[0]!==t){n=[];for(let e of t){let t=K(e);t!==null&&n.push(t)}e[0]=t,e[1]=n}else n=e[1];return n}function hn(){return Pt().length}function gn(e){let t=(0,E.c)(34),{count:n,attached:r,expanded:i,onAttach:s,onToggleExpanded:d,onDismiss:f}=e,{_:p}=o();if(n===0)return null;if(!r){let e;t[0]===p?e=t[1]:(e=p({id:`8ycqHY`}),t[0]=p,t[1]=e);let n,r,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=l(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,Q.jsx)(c,{className:`size-3`}),i=(0,Q.jsx)(a,{id:`b24kPi`}),t[2]=n,t[3]=r,t[4]=i):(n=t[2],r=t[3],i=t[4]);let o;return t[5]!==s||t[6]!==e?(o=(0,Q.jsxs)(u,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:s,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[5]=s,t[6]=e,t[7]=o):o=t[7],o}let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=l(`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[8]=m):m=t[8];let h;t[9]!==p||t[10]!==i?(h=p(i?{id:`HFqQui`}:{id:`qokN44`}),t[9]=p,t[10]=i,t[11]=h):h=t[11];let g;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Q.jsx)(ne,{className:`size-3`}),t[12]=g):g=t[12];let _;t[13]===n?_=t[14]:(_=(0,Q.jsx)(a,{id:`eiUA4k`,values:{count:n}}),t[13]=n,t[14]=_);let v=i&&`rotate-180`,y;t[15]===v?y=t[16]:(y=l(`size-3 transition-transform`,v),t[15]=v,t[16]=y);let b;t[17]===y?b=t[18]:(b=(0,Q.jsx)(ee,{className:y}),t[17]=y,t[18]=b);let x;t[19]!==i||t[20]!==d||t[21]!==h||t[22]!==_||t[23]!==b?(x=(0,Q.jsxs)(u,{type:`button`,size:`sm`,variant:`ghost`,"aria-expanded":i,"aria-label":h,onClick:d,"data-testid":`composer-comments-peek`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[g,_,b]}),t[19]=i,t[20]=d,t[21]=h,t[22]=_,t[23]=b,t[24]=x):x=t[24];let S;t[25]===p?S=t[26]:(S=p({id:`pFRz_E`}),t[25]=p,t[26]=S);let C;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(te,{className:`size-3`}),t[27]=C):C=t[27];let w;t[28]!==f||t[29]!==S?(w=(0,Q.jsx)(u,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":S,onClick:f,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:C}),t[28]=f,t[29]=S,t[30]=w):w=t[30];let T;return t[31]!==w||t[32]!==x?(T=(0,Q.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:m,children:[x,w]}),t[31]=w,t[32]=x,t[33]=T):T=t[33],T}function _n(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function vn(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function yn(e){let t=(0,E.c)(14),{thread:n,className:r}=e,i=n.anchor?.quote??``;if(n.target.kind===`property`){let e;t[0]!==n.target.key||t[1]!==n.target.path?(e=vn(n.target.key,n.target.path),t[0]=n.target.key,t[1]=n.target.path,t[2]=e):e=t[2];let a=e,o;t[3]===r?o=t[4]:(o=l(`w-full truncate font-mono text-[11px] text-muted-foreground`,r),t[3]=r,t[4]=o);let s=i===``?``:` “${i}”`,c;return t[5]!==a||t[6]!==o||t[7]!==s?(c=(0,Q.jsxs)(`span`,{className:o,children:[a,`:`,s]}),t[5]=a,t[6]=o,t[7]=s,t[8]=c):c=t[8],c}let a;t[9]===r?a=t[10]:(a=l(`w-full truncate font-mono text-[11px] text-muted-foreground`,r),t[9]=r,t[10]=a);let o;return t[11]!==i||t[12]!==a?(o=(0,Q.jsxs)(`span`,{className:a,children:[`“`,i,`”`]}),t[11]=i,t[12]=a,t[13]=o):o=t[13],o}function bn(e){pn({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{Se({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=xn)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var xn=30;function Sn(e){let t=(0,E.c)(9),{threads:n}=e,{_:r}=o(),i=Pt();if(n.length===0)return null;let s;if(t[0]!==r||t[1]!==i||t[2]!==n){let e;t[4]!==r||t[5]!==i?(e=e=>{let t=e.status===`orphaned`,n=i.includes(e.id);return(0,Q.jsxs)(`li`,{className:l(`flex items-start gap-2 rounded-md border bg-background/60 px-2 py-1.5`,!n&&`opacity-50`),children:[(0,Q.jsx)(p,{checked:n,onCheckedChange:()=>Vt(e.id),"aria-label":r({id:`Uoux8m`}),className:`mt-0.5`}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1 rounded border px-1 py-px text-[10px] text-muted-foreground`,title:e.docName,children:[(0,Q.jsx)(f,{className:`size-2.5 shrink-0`}),(0,Q.jsx)(`span`,{className:`truncate`,children:_n(e.docName)})]}),t&&(0,Q.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-[10px] text-amber-600 dark:text-amber-500`,title:r({id:`MBe6TE`}),children:[(0,Q.jsx)(re,{className:`size-2.5`}),(0,Q.jsx)(a,{id:`2UgoBZ`})]})]}),(0,Q.jsxs)(u,{type:`button`,variant:`ghost`,"aria-label":r({id:`rscgd_`,values:{0:_n(e.docName)}}),onClick:()=>bn(e),className:`h-auto min-h-0 w-full min-w-0 flex-col items-start gap-1 px-0 py-0 text-left font-normal hover:bg-transparent`,children:[(0,Q.jsx)(yn,{thread:e}),(0,Q.jsx)(`span`,{className:`line-clamp-2 w-full text-xs whitespace-normal text-foreground/90`,children:e.body})]})]}),(0,Q.jsx)(u,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":r({id:`YDX9lo`}),onClick:()=>Rt(e.id),className:`size-5 shrink-0 p-0 text-muted-foreground hover:text-foreground`,children:(0,Q.jsx)(te,{className:`size-3`})})]},e.id)},t[4]=r,t[5]=i,t[6]=e):e=t[6],s=n.map(e),t[0]=r,t[1]=i,t[2]=n,t[3]=s}else s=t[3];let c;return t[7]===s?c=t[8]:(c=(0,Q.jsx)(`ul`,{"data-testid":`composer-comments-list`,className:`mt-1 flex max-h-64 basis-full list-none flex-col gap-1 overflow-y-auto subtle-scrollbar`,children:s}),t[7]=s,t[8]=c),c}function Cn(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 wn(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function Tn(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function En(e){if(!e.repeats)return null;let t=wn(e.prefix),n=Tn(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 Dn(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(`
4
4
  `))i.push(` > ${e}`);i.push(``),i.push(` ${e.body.trim()}`)}e.anchorLost&&(i.push(``),i.push(n===``?` (Note: \`${e.propertyKey}\` is no longer in this document's frontmatter — it was renamed or removed since the comment was written. Do not apply this to a different property; if you cannot tell what it now refers to, say so instead of guessing.)`:` (Note: that text is no longer in \`${e.propertyKey}\` — the value was edited, reshaped, or removed since the comment was written. Do not apply this to a different property or a different part of the value; if you cannot tell what it now refers to, say so instead of guessing.)`));return}i.push(`${t+1}. In \`${e.docName}\`, on this passage:`),i.push(``);for(let t of e.quote.split(`
5
5
  `))i.push(` > ${t}`);i.push(``),i.push(` ${e.body.trim()}`);let n=En(e);n!==null&&(i.push(``),i.push(` ${n}`)),e.anchorLost&&(i.push(``),i.push(` (Note: this passage is no longer in the document — it was edited or removed since the comment was written. Do not apply this to a different passage; if you cannot tell what it now refers to, say so instead of guessing.)`))}),n&&n.markdown.trim().length>0){i.push(``),i.push(`Also in scope, selected in \`${n.docName}\` (not a comment):`),i.push(``);for(let e of n.markdown.trim().split(`
6
6
  `))i.push(`> ${e}`)}return i.join(`