@rpamis/comet 0.4.0-beta.5 → 0.4.0-beta.7

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 (714) hide show
  1. package/README.md +215 -77
  2. package/assets/manifest.json +14 -5
  3. package/assets/skills/comet/SKILL.md +17 -282
  4. package/assets/skills/comet/reference/comet-yaml-fields.md +5 -3
  5. package/assets/skills/comet/reference/context-recovery.md +3 -3
  6. package/assets/skills/comet/reference/intent-frame.md +2 -2
  7. package/assets/skills/comet/reference/scripts.md +2 -2
  8. package/assets/skills/comet/rules/comet-workflow-guard.en.md +32 -0
  9. package/assets/skills/comet/rules/comet-workflow-guard.md +32 -0
  10. package/assets/skills/comet/scripts/comet-entry-runtime.mjs +7834 -0
  11. package/assets/skills/comet/scripts/comet-hook-router.mjs +10307 -0
  12. package/assets/skills/comet/scripts/comet-runtime.mjs +782 -425
  13. package/assets/skills/comet-any/SKILL.md +4 -4
  14. package/assets/skills/comet-any/reference/authoring-subagents.md +1 -1
  15. package/assets/skills/comet-any/reference/bundle-authoring.md +1 -1
  16. package/assets/skills/comet-any/reference/subagents/reference-author.md +1 -1
  17. package/assets/skills/comet-any/reference/subagents/script-author.md +1 -1
  18. package/assets/skills/comet-any/reference/subagents/skill-core-author.md +1 -1
  19. package/assets/skills/comet-any/reference/subagents/skill-reviewer.md +2 -2
  20. package/assets/skills/comet-any/reference/subagents/workflow-entry-author.md +3 -3
  21. package/assets/skills/comet-archive/SKILL.md +7 -9
  22. package/assets/skills/comet-build/SKILL.md +17 -11
  23. package/assets/skills/comet-classic/SKILL.md +293 -0
  24. package/assets/skills/comet-design/SKILL.md +1 -1
  25. package/assets/skills/comet-hotfix/SKILL.md +20 -6
  26. package/assets/skills/comet-native/SKILL.md +257 -0
  27. package/assets/skills/comet-native/reference/artifacts.md +204 -0
  28. package/assets/skills/comet-native/reference/commands.md +118 -0
  29. package/assets/skills/comet-native/reference/recovery.md +143 -0
  30. package/assets/skills/comet-native/scripts/comet-native-hook-guard.mjs +4 -0
  31. package/assets/skills/comet-native/scripts/comet-native-runtime.mjs +28898 -0
  32. package/assets/skills/comet-open/SKILL.md +4 -4
  33. package/assets/skills/comet-tweak/SKILL.md +22 -10
  34. package/assets/skills/comet-verify/SKILL.md +2 -0
  35. package/assets/skills-zh/comet/SKILL.md +17 -270
  36. package/assets/skills-zh/comet/reference/comet-yaml-fields.md +5 -3
  37. package/assets/skills-zh/comet/reference/context-recovery.md +3 -3
  38. package/assets/skills-zh/comet/reference/intent-frame.md +2 -2
  39. package/assets/skills-zh/comet/reference/scripts.md +2 -2
  40. package/assets/skills-zh/comet-any/SKILL.md +4 -4
  41. package/assets/skills-zh/comet-any/reference/authoring-subagents.md +1 -1
  42. package/assets/skills-zh/comet-any/reference/bundle-authoring.md +1 -1
  43. package/assets/skills-zh/comet-any/reference/subagents/reference-author.md +1 -1
  44. package/assets/skills-zh/comet-any/reference/subagents/script-author.md +1 -1
  45. package/assets/skills-zh/comet-any/reference/subagents/skill-core-author.md +1 -1
  46. package/assets/skills-zh/comet-any/reference/subagents/skill-reviewer.md +2 -2
  47. package/assets/skills-zh/comet-any/reference/subagents/workflow-entry-author.md +3 -3
  48. package/assets/skills-zh/comet-archive/SKILL.md +7 -9
  49. package/assets/skills-zh/comet-build/SKILL.md +17 -11
  50. package/assets/skills-zh/comet-classic/SKILL.md +281 -0
  51. package/assets/skills-zh/comet-design/SKILL.md +1 -1
  52. package/assets/skills-zh/comet-hotfix/SKILL.md +20 -6
  53. package/assets/skills-zh/comet-native/SKILL.md +257 -0
  54. package/assets/skills-zh/comet-native/reference/artifacts.md +206 -0
  55. package/assets/skills-zh/comet-native/reference/commands.md +118 -0
  56. package/assets/skills-zh/comet-native/reference/recovery.md +143 -0
  57. package/assets/skills-zh/comet-open/SKILL.md +4 -4
  58. package/assets/skills-zh/comet-tweak/SKILL.md +22 -10
  59. package/assets/skills-zh/comet-verify/SKILL.md +2 -0
  60. package/dist/app/cli/index.js +59 -13
  61. package/dist/app/cli/index.js.map +1 -1
  62. package/dist/app/commands/command-result.d.ts +6 -0
  63. package/dist/app/commands/command-result.d.ts.map +1 -0
  64. package/dist/app/commands/command-result.js +4 -0
  65. package/dist/app/commands/command-result.js.map +1 -0
  66. package/dist/app/commands/doctor.d.ts +1 -0
  67. package/dist/app/commands/doctor.d.ts.map +1 -1
  68. package/dist/app/commands/doctor.js +201 -26
  69. package/dist/app/commands/doctor.js.map +1 -1
  70. package/dist/app/commands/eval.d.ts +3 -1
  71. package/dist/app/commands/eval.d.ts.map +1 -1
  72. package/dist/app/commands/eval.js +17 -7
  73. package/dist/app/commands/eval.js.map +1 -1
  74. package/dist/app/commands/i18n.d.ts +1 -1
  75. package/dist/app/commands/i18n.d.ts.map +1 -1
  76. package/dist/app/commands/i18n.js +6 -2
  77. package/dist/app/commands/i18n.js.map +1 -1
  78. package/dist/app/commands/init.d.ts +10 -2
  79. package/dist/app/commands/init.d.ts.map +1 -1
  80. package/dist/app/commands/init.js +331 -50
  81. package/dist/app/commands/init.js.map +1 -1
  82. package/dist/app/commands/native.d.ts +2 -0
  83. package/dist/app/commands/native.d.ts.map +1 -0
  84. package/dist/app/commands/native.js +10 -0
  85. package/dist/app/commands/native.js.map +1 -0
  86. package/dist/app/commands/project-scope-selection.d.ts.map +1 -1
  87. package/dist/app/commands/project-scope-selection.js +2 -0
  88. package/dist/app/commands/project-scope-selection.js.map +1 -1
  89. package/dist/app/commands/resume-probe.d.ts.map +1 -1
  90. package/dist/app/commands/resume-probe.js +8 -2
  91. package/dist/app/commands/resume-probe.js.map +1 -1
  92. package/dist/app/commands/status.d.ts +0 -31
  93. package/dist/app/commands/status.d.ts.map +1 -1
  94. package/dist/app/commands/status.js +49 -172
  95. package/dist/app/commands/status.js.map +1 -1
  96. package/dist/app/commands/update.d.ts +20 -4
  97. package/dist/app/commands/update.d.ts.map +1 -1
  98. package/dist/app/commands/update.js +698 -90
  99. package/dist/app/commands/update.js.map +1 -1
  100. package/dist/app/commands/workflow.d.ts +6 -0
  101. package/dist/app/commands/workflow.d.ts.map +1 -0
  102. package/dist/app/commands/workflow.js +11 -0
  103. package/dist/app/commands/workflow.js.map +1 -0
  104. package/dist/config/repository-layout.json +21 -1
  105. package/dist/domains/comet-classic/classic-archive.d.ts.map +1 -1
  106. package/dist/domains/comet-classic/classic-archive.js +3 -0
  107. package/dist/domains/comet-classic/classic-archive.js.map +1 -1
  108. package/dist/domains/comet-classic/classic-branch-binding.d.ts +51 -0
  109. package/dist/domains/comet-classic/classic-branch-binding.d.ts.map +1 -0
  110. package/dist/domains/comet-classic/classic-branch-binding.js +107 -0
  111. package/dist/domains/comet-classic/classic-branch-binding.js.map +1 -0
  112. package/dist/domains/comet-classic/classic-current-change.d.ts +3 -5
  113. package/dist/domains/comet-classic/classic-current-change.d.ts.map +1 -1
  114. package/dist/domains/comet-classic/classic-current-change.js +59 -68
  115. package/dist/domains/comet-classic/classic-current-change.js.map +1 -1
  116. package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -1
  117. package/dist/domains/comet-classic/classic-guard.js +40 -10
  118. package/dist/domains/comet-classic/classic-guard.js.map +1 -1
  119. package/dist/domains/comet-classic/classic-hook-guard.d.ts +9 -0
  120. package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -1
  121. package/dist/domains/comet-classic/classic-hook-guard.js +109 -13
  122. package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -1
  123. package/dist/domains/comet-classic/classic-project-config.d.ts.map +1 -1
  124. package/dist/domains/comet-classic/classic-project-config.js +12 -8
  125. package/dist/domains/comet-classic/classic-project-config.js.map +1 -1
  126. package/dist/domains/comet-classic/classic-runtime-run.d.ts.map +1 -1
  127. package/dist/domains/comet-classic/classic-runtime-run.js +9 -1
  128. package/dist/domains/comet-classic/classic-runtime-run.js.map +1 -1
  129. package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -1
  130. package/dist/domains/comet-classic/classic-state-command.js +94 -4
  131. package/dist/domains/comet-classic/classic-state-command.js.map +1 -1
  132. package/dist/domains/comet-classic/classic-state-events.d.ts +1 -1
  133. package/dist/domains/comet-classic/classic-state-events.d.ts.map +1 -1
  134. package/dist/domains/comet-classic/classic-state.d.ts +2 -1
  135. package/dist/domains/comet-classic/classic-state.d.ts.map +1 -1
  136. package/dist/domains/comet-classic/classic-state.js +3 -0
  137. package/dist/domains/comet-classic/classic-state.js.map +1 -1
  138. package/dist/domains/comet-classic/classic-transitions.d.ts.map +1 -1
  139. package/dist/domains/comet-classic/classic-transitions.js +1 -0
  140. package/dist/domains/comet-classic/classic-transitions.js.map +1 -1
  141. package/dist/domains/comet-classic/classic-validate-command.d.ts.map +1 -1
  142. package/dist/domains/comet-classic/classic-validate-command.js +6 -0
  143. package/dist/domains/comet-classic/classic-validate-command.js.map +1 -1
  144. package/dist/domains/comet-entry/current-selection-repair.d.ts +17 -0
  145. package/dist/domains/comet-entry/current-selection-repair.d.ts.map +1 -0
  146. package/dist/domains/comet-entry/current-selection-repair.js +19 -0
  147. package/dist/domains/comet-entry/current-selection-repair.js.map +1 -0
  148. package/dist/domains/comet-entry/current-selection.d.ts +28 -0
  149. package/dist/domains/comet-entry/current-selection.d.ts.map +1 -0
  150. package/dist/domains/comet-entry/current-selection.js +116 -0
  151. package/dist/domains/comet-entry/current-selection.js.map +1 -0
  152. package/dist/domains/comet-entry/entry-runtime-entry.d.ts +2 -0
  153. package/dist/domains/comet-entry/entry-runtime-entry.d.ts.map +1 -0
  154. package/dist/domains/comet-entry/entry-runtime-entry.js +3 -0
  155. package/dist/domains/comet-entry/entry-runtime-entry.js.map +1 -0
  156. package/dist/domains/comet-entry/entry-runtime.d.ts +7 -0
  157. package/dist/domains/comet-entry/entry-runtime.d.ts.map +1 -0
  158. package/dist/domains/comet-entry/entry-runtime.js +55 -0
  159. package/dist/domains/comet-entry/entry-runtime.js.map +1 -0
  160. package/dist/domains/comet-entry/hook-adapter.d.ts +6 -0
  161. package/dist/domains/comet-entry/hook-adapter.d.ts.map +1 -0
  162. package/dist/domains/comet-entry/hook-adapter.js +202 -0
  163. package/dist/domains/comet-entry/hook-adapter.js.map +1 -0
  164. package/dist/domains/comet-entry/hook-router-entry.d.ts +8 -0
  165. package/dist/domains/comet-entry/hook-router-entry.d.ts.map +1 -0
  166. package/dist/domains/comet-entry/hook-router-entry.js +92 -0
  167. package/dist/domains/comet-entry/hook-router-entry.js.map +1 -0
  168. package/dist/domains/comet-entry/hook-router.d.ts +32 -0
  169. package/dist/domains/comet-entry/hook-router.d.ts.map +1 -0
  170. package/dist/domains/comet-entry/hook-router.js +133 -0
  171. package/dist/domains/comet-entry/hook-router.js.map +1 -0
  172. package/dist/domains/comet-entry/hook-types.d.ts +20 -0
  173. package/dist/domains/comet-entry/hook-types.d.ts.map +1 -0
  174. package/dist/domains/comet-entry/hook-types.js +2 -0
  175. package/dist/domains/comet-entry/hook-types.js.map +1 -0
  176. package/dist/domains/comet-entry/init-workflow.d.ts +16 -0
  177. package/dist/domains/comet-entry/init-workflow.d.ts.map +1 -0
  178. package/dist/domains/comet-entry/init-workflow.js +103 -0
  179. package/dist/domains/comet-entry/init-workflow.js.map +1 -0
  180. package/dist/domains/comet-entry/project-status.d.ts +3 -0
  181. package/dist/domains/comet-entry/project-status.d.ts.map +1 -0
  182. package/dist/domains/comet-entry/project-status.js +222 -0
  183. package/dist/domains/comet-entry/project-status.js.map +1 -0
  184. package/dist/domains/comet-entry/resolve-entry.d.ts +3 -0
  185. package/dist/domains/comet-entry/resolve-entry.d.ts.map +1 -0
  186. package/dist/domains/comet-entry/resolve-entry.js +22 -0
  187. package/dist/domains/comet-entry/resolve-entry.js.map +1 -0
  188. package/dist/domains/comet-entry/resume-probe.d.ts +34 -0
  189. package/dist/domains/comet-entry/resume-probe.d.ts.map +1 -0
  190. package/dist/domains/comet-entry/resume-probe.js +458 -0
  191. package/dist/domains/comet-entry/resume-probe.js.map +1 -0
  192. package/dist/domains/comet-entry/types.d.ts +59 -0
  193. package/dist/domains/comet-entry/types.d.ts.map +1 -0
  194. package/dist/domains/comet-entry/types.js +2 -0
  195. package/dist/domains/comet-entry/types.js.map +1 -0
  196. package/dist/domains/comet-entry/workflow-resolution.d.ts +8 -0
  197. package/dist/domains/comet-entry/workflow-resolution.d.ts.map +1 -0
  198. package/dist/domains/comet-entry/workflow-resolution.js +16 -0
  199. package/dist/domains/comet-entry/workflow-resolution.js.map +1 -0
  200. package/dist/domains/comet-native/index.d.ts +35 -0
  201. package/dist/domains/comet-native/index.d.ts.map +1 -0
  202. package/dist/domains/comet-native/index.js +35 -0
  203. package/dist/domains/comet-native/index.js.map +1 -0
  204. package/dist/domains/comet-native/native-acceptance.d.ts +42 -0
  205. package/dist/domains/comet-native/native-acceptance.d.ts.map +1 -0
  206. package/dist/domains/comet-native/native-acceptance.js +503 -0
  207. package/dist/domains/comet-native/native-acceptance.js.map +1 -0
  208. package/dist/domains/comet-native/native-archive-content.d.ts +26 -0
  209. package/dist/domains/comet-native/native-archive-content.d.ts.map +1 -0
  210. package/dist/domains/comet-native/native-archive-content.js +159 -0
  211. package/dist/domains/comet-native/native-archive-content.js.map +1 -0
  212. package/dist/domains/comet-native/native-archive-inspection.d.ts +9 -0
  213. package/dist/domains/comet-native/native-archive-inspection.d.ts.map +1 -0
  214. package/dist/domains/comet-native/native-archive-inspection.js +94 -0
  215. package/dist/domains/comet-native/native-archive-inspection.js.map +1 -0
  216. package/dist/domains/comet-native/native-archive-preflight.d.ts +52 -0
  217. package/dist/domains/comet-native/native-archive-preflight.d.ts.map +1 -0
  218. package/dist/domains/comet-native/native-archive-preflight.js +214 -0
  219. package/dist/domains/comet-native/native-archive-preflight.js.map +1 -0
  220. package/dist/domains/comet-native/native-archive-transaction.d.ts +19 -0
  221. package/dist/domains/comet-native/native-archive-transaction.d.ts.map +1 -0
  222. package/dist/domains/comet-native/native-archive-transaction.js +1181 -0
  223. package/dist/domains/comet-native/native-archive-transaction.js.map +1 -0
  224. package/dist/domains/comet-native/native-archive.d.ts +36 -0
  225. package/dist/domains/comet-native/native-archive.d.ts.map +1 -0
  226. package/dist/domains/comet-native/native-archive.js +403 -0
  227. package/dist/domains/comet-native/native-archive.js.map +1 -0
  228. package/dist/domains/comet-native/native-artifacts.d.ts +10 -0
  229. package/dist/domains/comet-native/native-artifacts.d.ts.map +1 -0
  230. package/dist/domains/comet-native/native-artifacts.js +204 -0
  231. package/dist/domains/comet-native/native-artifacts.js.map +1 -0
  232. package/dist/domains/comet-native/native-atomic-file.d.ts +10 -0
  233. package/dist/domains/comet-native/native-atomic-file.d.ts.map +1 -0
  234. package/dist/domains/comet-native/native-atomic-file.js +175 -0
  235. package/dist/domains/comet-native/native-atomic-file.js.map +1 -0
  236. package/dist/domains/comet-native/native-bounded-file.d.ts +19 -0
  237. package/dist/domains/comet-native/native-bounded-file.d.ts.map +1 -0
  238. package/dist/domains/comet-native/native-bounded-file.js +180 -0
  239. package/dist/domains/comet-native/native-bounded-file.js.map +1 -0
  240. package/dist/domains/comet-native/native-build-evidence.d.ts +42 -0
  241. package/dist/domains/comet-native/native-build-evidence.d.ts.map +1 -0
  242. package/dist/domains/comet-native/native-build-evidence.js +257 -0
  243. package/dist/domains/comet-native/native-build-evidence.js.map +1 -0
  244. package/dist/domains/comet-native/native-canonical-hash.d.ts +10 -0
  245. package/dist/domains/comet-native/native-canonical-hash.d.ts.map +1 -0
  246. package/dist/domains/comet-native/native-canonical-hash.js +100 -0
  247. package/dist/domains/comet-native/native-canonical-hash.js.map +1 -0
  248. package/dist/domains/comet-native/native-change-recovery.d.ts +11 -0
  249. package/dist/domains/comet-native/native-change-recovery.d.ts.map +1 -0
  250. package/dist/domains/comet-native/native-change-recovery.js +15 -0
  251. package/dist/domains/comet-native/native-change-recovery.js.map +1 -0
  252. package/dist/domains/comet-native/native-change.d.ts +61 -0
  253. package/dist/domains/comet-native/native-change.d.ts.map +1 -0
  254. package/dist/domains/comet-native/native-change.js +696 -0
  255. package/dist/domains/comet-native/native-change.js.map +1 -0
  256. package/dist/domains/comet-native/native-check-receipt-model.d.ts +63 -0
  257. package/dist/domains/comet-native/native-check-receipt-model.d.ts.map +1 -0
  258. package/dist/domains/comet-native/native-check-receipt-model.js +347 -0
  259. package/dist/domains/comet-native/native-check-receipt-model.js.map +1 -0
  260. package/dist/domains/comet-native/native-check-receipt-storage.d.ts +10 -0
  261. package/dist/domains/comet-native/native-check-receipt-storage.d.ts.map +1 -0
  262. package/dist/domains/comet-native/native-check-receipt-storage.js +196 -0
  263. package/dist/domains/comet-native/native-check-receipt-storage.js.map +1 -0
  264. package/dist/domains/comet-native/native-check-receipt.d.ts +19 -0
  265. package/dist/domains/comet-native/native-check-receipt.d.ts.map +1 -0
  266. package/dist/domains/comet-native/native-check-receipt.js +446 -0
  267. package/dist/domains/comet-native/native-check-receipt.js.map +1 -0
  268. package/dist/domains/comet-native/native-check.d.ts +18 -0
  269. package/dist/domains/comet-native/native-check.d.ts.map +1 -0
  270. package/dist/domains/comet-native/native-check.js +29 -0
  271. package/dist/domains/comet-native/native-check.js.map +1 -0
  272. package/dist/domains/comet-native/native-checkpoint-journal.d.ts +13 -0
  273. package/dist/domains/comet-native/native-checkpoint-journal.d.ts.map +1 -0
  274. package/dist/domains/comet-native/native-checkpoint-journal.js +53 -0
  275. package/dist/domains/comet-native/native-checkpoint-journal.js.map +1 -0
  276. package/dist/domains/comet-native/native-checkpoint-storage.d.ts +43 -0
  277. package/dist/domains/comet-native/native-checkpoint-storage.d.ts.map +1 -0
  278. package/dist/domains/comet-native/native-checkpoint-storage.js +487 -0
  279. package/dist/domains/comet-native/native-checkpoint-storage.js.map +1 -0
  280. package/dist/domains/comet-native/native-cli-entry.d.ts +2 -0
  281. package/dist/domains/comet-native/native-cli-entry.d.ts.map +1 -0
  282. package/dist/domains/comet-native/native-cli-entry.js +18 -0
  283. package/dist/domains/comet-native/native-cli-entry.js.map +1 -0
  284. package/dist/domains/comet-native/native-cli.d.ts +7 -0
  285. package/dist/domains/comet-native/native-cli.d.ts.map +1 -0
  286. package/dist/domains/comet-native/native-cli.js +642 -0
  287. package/dist/domains/comet-native/native-cli.js.map +1 -0
  288. package/dist/domains/comet-native/native-config.d.ts +15 -0
  289. package/dist/domains/comet-native/native-config.d.ts.map +1 -0
  290. package/dist/domains/comet-native/native-config.js +281 -0
  291. package/dist/domains/comet-native/native-config.js.map +1 -0
  292. package/dist/domains/comet-native/native-conflict-inspection.d.ts +17 -0
  293. package/dist/domains/comet-native/native-conflict-inspection.d.ts.map +1 -0
  294. package/dist/domains/comet-native/native-conflict-inspection.js +90 -0
  295. package/dist/domains/comet-native/native-conflict-inspection.js.map +1 -0
  296. package/dist/domains/comet-native/native-conflict-radar.d.ts +75 -0
  297. package/dist/domains/comet-native/native-conflict-radar.d.ts.map +1 -0
  298. package/dist/domains/comet-native/native-conflict-radar.js +326 -0
  299. package/dist/domains/comet-native/native-conflict-radar.js.map +1 -0
  300. package/dist/domains/comet-native/native-continuation.d.ts +9 -0
  301. package/dist/domains/comet-native/native-continuation.d.ts.map +1 -0
  302. package/dist/domains/comet-native/native-continuation.js +146 -0
  303. package/dist/domains/comet-native/native-continuation.js.map +1 -0
  304. package/dist/domains/comet-native/native-contract-files.d.ts +24 -0
  305. package/dist/domains/comet-native/native-contract-files.d.ts.map +1 -0
  306. package/dist/domains/comet-native/native-contract-files.js +66 -0
  307. package/dist/domains/comet-native/native-contract-files.js.map +1 -0
  308. package/dist/domains/comet-native/native-contract.d.ts +41 -0
  309. package/dist/domains/comet-native/native-contract.d.ts.map +1 -0
  310. package/dist/domains/comet-native/native-contract.js +141 -0
  311. package/dist/domains/comet-native/native-contract.js.map +1 -0
  312. package/dist/domains/comet-native/native-diagnostics.d.ts +18 -0
  313. package/dist/domains/comet-native/native-diagnostics.d.ts.map +1 -0
  314. package/dist/domains/comet-native/native-diagnostics.js +522 -0
  315. package/dist/domains/comet-native/native-diagnostics.js.map +1 -0
  316. package/dist/domains/comet-native/native-doctor.d.ts +12 -0
  317. package/dist/domains/comet-native/native-doctor.d.ts.map +1 -0
  318. package/dist/domains/comet-native/native-doctor.js +768 -0
  319. package/dist/domains/comet-native/native-doctor.js.map +1 -0
  320. package/dist/domains/comet-native/native-evidence-retention.d.ts +37 -0
  321. package/dist/domains/comet-native/native-evidence-retention.d.ts.map +1 -0
  322. package/dist/domains/comet-native/native-evidence-retention.js +885 -0
  323. package/dist/domains/comet-native/native-evidence-retention.js.map +1 -0
  324. package/dist/domains/comet-native/native-evidence-storage.d.ts +41 -0
  325. package/dist/domains/comet-native/native-evidence-storage.d.ts.map +1 -0
  326. package/dist/domains/comet-native/native-evidence-storage.js +351 -0
  327. package/dist/domains/comet-native/native-evidence-storage.js.map +1 -0
  328. package/dist/domains/comet-native/native-findings.d.ts +8 -0
  329. package/dist/domains/comet-native/native-findings.d.ts.map +1 -0
  330. package/dist/domains/comet-native/native-findings.js +238 -0
  331. package/dist/domains/comet-native/native-findings.js.map +1 -0
  332. package/dist/domains/comet-native/native-guards.d.ts +7 -0
  333. package/dist/domains/comet-native/native-guards.d.ts.map +1 -0
  334. package/dist/domains/comet-native/native-guards.js +126 -0
  335. package/dist/domains/comet-native/native-guards.js.map +1 -0
  336. package/dist/domains/comet-native/native-hash.d.ts +3 -0
  337. package/dist/domains/comet-native/native-hash.d.ts.map +1 -0
  338. package/dist/domains/comet-native/native-hash.js +12 -0
  339. package/dist/domains/comet-native/native-hash.js.map +1 -0
  340. package/dist/domains/comet-native/native-hook-guard.d.ts +17 -0
  341. package/dist/domains/comet-native/native-hook-guard.d.ts.map +1 -0
  342. package/dist/domains/comet-native/native-hook-guard.js +154 -0
  343. package/dist/domains/comet-native/native-hook-guard.js.map +1 -0
  344. package/dist/domains/comet-native/native-lock.d.ts +47 -0
  345. package/dist/domains/comet-native/native-lock.d.ts.map +1 -0
  346. package/dist/domains/comet-native/native-lock.js +395 -0
  347. package/dist/domains/comet-native/native-lock.js.map +1 -0
  348. package/dist/domains/comet-native/native-mutation-lock.d.ts +5 -0
  349. package/dist/domains/comet-native/native-mutation-lock.d.ts.map +1 -0
  350. package/dist/domains/comet-native/native-mutation-lock.js +66 -0
  351. package/dist/domains/comet-native/native-mutation-lock.js.map +1 -0
  352. package/dist/domains/comet-native/native-paths.d.ts +10 -0
  353. package/dist/domains/comet-native/native-paths.d.ts.map +1 -0
  354. package/dist/domains/comet-native/native-paths.js +171 -0
  355. package/dist/domains/comet-native/native-paths.js.map +1 -0
  356. package/dist/domains/comet-native/native-progress-checkpoint.d.ts +13 -0
  357. package/dist/domains/comet-native/native-progress-checkpoint.d.ts.map +1 -0
  358. package/dist/domains/comet-native/native-progress-checkpoint.js +104 -0
  359. package/dist/domains/comet-native/native-progress-checkpoint.js.map +1 -0
  360. package/dist/domains/comet-native/native-protected-file.d.ts +113 -0
  361. package/dist/domains/comet-native/native-protected-file.d.ts.map +1 -0
  362. package/dist/domains/comet-native/native-protected-file.js +509 -0
  363. package/dist/domains/comet-native/native-protected-file.js.map +1 -0
  364. package/dist/domains/comet-native/native-redaction.d.ts +2 -0
  365. package/dist/domains/comet-native/native-redaction.d.ts.map +1 -0
  366. package/dist/domains/comet-native/native-redaction.js +18 -0
  367. package/dist/domains/comet-native/native-redaction.js.map +1 -0
  368. package/dist/domains/comet-native/native-repair-integration.d.ts +42 -0
  369. package/dist/domains/comet-native/native-repair-integration.d.ts.map +1 -0
  370. package/dist/domains/comet-native/native-repair-integration.js +184 -0
  371. package/dist/domains/comet-native/native-repair-integration.js.map +1 -0
  372. package/dist/domains/comet-native/native-repair-runtime.d.ts +73 -0
  373. package/dist/domains/comet-native/native-repair-runtime.d.ts.map +1 -0
  374. package/dist/domains/comet-native/native-repair-runtime.js +509 -0
  375. package/dist/domains/comet-native/native-repair-runtime.js.map +1 -0
  376. package/dist/domains/comet-native/native-repair-stagnation.d.ts +85 -0
  377. package/dist/domains/comet-native/native-repair-stagnation.d.ts.map +1 -0
  378. package/dist/domains/comet-native/native-repair-stagnation.js +256 -0
  379. package/dist/domains/comet-native/native-repair-stagnation.js.map +1 -0
  380. package/dist/domains/comet-native/native-resume-view.d.ts +14 -0
  381. package/dist/domains/comet-native/native-resume-view.d.ts.map +1 -0
  382. package/dist/domains/comet-native/native-resume-view.js +105 -0
  383. package/dist/domains/comet-native/native-resume-view.js.map +1 -0
  384. package/dist/domains/comet-native/native-revision.d.ts +20 -0
  385. package/dist/domains/comet-native/native-revision.d.ts.map +1 -0
  386. package/dist/domains/comet-native/native-revision.js +32 -0
  387. package/dist/domains/comet-native/native-revision.js.map +1 -0
  388. package/dist/domains/comet-native/native-root-move.d.ts +20 -0
  389. package/dist/domains/comet-native/native-root-move.d.ts.map +1 -0
  390. package/dist/domains/comet-native/native-root-move.js +812 -0
  391. package/dist/domains/comet-native/native-root-move.js.map +1 -0
  392. package/dist/domains/comet-native/native-run-consistency.d.ts +3 -0
  393. package/dist/domains/comet-native/native-run-consistency.d.ts.map +1 -0
  394. package/dist/domains/comet-native/native-run-consistency.js +136 -0
  395. package/dist/domains/comet-native/native-run-consistency.js.map +1 -0
  396. package/dist/domains/comet-native/native-run-store.d.ts +41 -0
  397. package/dist/domains/comet-native/native-run-store.d.ts.map +1 -0
  398. package/dist/domains/comet-native/native-run-store.js +451 -0
  399. package/dist/domains/comet-native/native-run-store.js.map +1 -0
  400. package/dist/domains/comet-native/native-runtime-package.d.ts +16 -0
  401. package/dist/domains/comet-native/native-runtime-package.d.ts.map +1 -0
  402. package/dist/domains/comet-native/native-runtime-package.js +72 -0
  403. package/dist/domains/comet-native/native-runtime-package.js.map +1 -0
  404. package/dist/domains/comet-native/native-schema-migration.d.ts +11 -0
  405. package/dist/domains/comet-native/native-schema-migration.d.ts.map +1 -0
  406. package/dist/domains/comet-native/native-schema-migration.js +899 -0
  407. package/dist/domains/comet-native/native-schema-migration.js.map +1 -0
  408. package/dist/domains/comet-native/native-selection.d.ts +12 -0
  409. package/dist/domains/comet-native/native-selection.d.ts.map +1 -0
  410. package/dist/domains/comet-native/native-selection.js +52 -0
  411. package/dist/domains/comet-native/native-selection.js.map +1 -0
  412. package/dist/domains/comet-native/native-sensitive-paths.d.ts +7 -0
  413. package/dist/domains/comet-native/native-sensitive-paths.d.ts.map +1 -0
  414. package/dist/domains/comet-native/native-sensitive-paths.js +69 -0
  415. package/dist/domains/comet-native/native-sensitive-paths.js.map +1 -0
  416. package/dist/domains/comet-native/native-snapshot.d.ts +74 -0
  417. package/dist/domains/comet-native/native-snapshot.d.ts.map +1 -0
  418. package/dist/domains/comet-native/native-snapshot.js +2308 -0
  419. package/dist/domains/comet-native/native-snapshot.js.map +1 -0
  420. package/dist/domains/comet-native/native-specs.d.ts +12 -0
  421. package/dist/domains/comet-native/native-specs.d.ts.map +1 -0
  422. package/dist/domains/comet-native/native-specs.js +270 -0
  423. package/dist/domains/comet-native/native-specs.js.map +1 -0
  424. package/dist/domains/comet-native/native-trajectory-limits.d.ts +7 -0
  425. package/dist/domains/comet-native/native-trajectory-limits.d.ts.map +1 -0
  426. package/dist/domains/comet-native/native-trajectory-limits.js +13 -0
  427. package/dist/domains/comet-native/native-trajectory-limits.js.map +1 -0
  428. package/dist/domains/comet-native/native-trajectory-recovery.d.ts +37 -0
  429. package/dist/domains/comet-native/native-trajectory-recovery.d.ts.map +1 -0
  430. package/dist/domains/comet-native/native-trajectory-recovery.js +133 -0
  431. package/dist/domains/comet-native/native-trajectory-recovery.js.map +1 -0
  432. package/dist/domains/comet-native/native-trajectory.d.ts +16 -0
  433. package/dist/domains/comet-native/native-trajectory.d.ts.map +1 -0
  434. package/dist/domains/comet-native/native-trajectory.js +27 -0
  435. package/dist/domains/comet-native/native-trajectory.js.map +1 -0
  436. package/dist/domains/comet-native/native-transaction.d.ts +45 -0
  437. package/dist/domains/comet-native/native-transaction.d.ts.map +1 -0
  438. package/dist/domains/comet-native/native-transaction.js +846 -0
  439. package/dist/domains/comet-native/native-transaction.js.map +1 -0
  440. package/dist/domains/comet-native/native-transition-evidence.d.ts +4 -0
  441. package/dist/domains/comet-native/native-transition-evidence.d.ts.map +1 -0
  442. package/dist/domains/comet-native/native-transition-evidence.js +20 -0
  443. package/dist/domains/comet-native/native-transition-evidence.js.map +1 -0
  444. package/dist/domains/comet-native/native-transition-journal.d.ts +30 -0
  445. package/dist/domains/comet-native/native-transition-journal.d.ts.map +1 -0
  446. package/dist/domains/comet-native/native-transition-journal.js +819 -0
  447. package/dist/domains/comet-native/native-transition-journal.js.map +1 -0
  448. package/dist/domains/comet-native/native-transitions.d.ts +13 -0
  449. package/dist/domains/comet-native/native-transitions.d.ts.map +1 -0
  450. package/dist/domains/comet-native/native-transitions.js +632 -0
  451. package/dist/domains/comet-native/native-transitions.js.map +1 -0
  452. package/dist/domains/comet-native/native-types.d.ts +547 -0
  453. package/dist/domains/comet-native/native-types.d.ts.map +1 -0
  454. package/dist/domains/comet-native/native-types.js +8 -0
  455. package/dist/domains/comet-native/native-types.js.map +1 -0
  456. package/dist/domains/comet-native/native-verification-evidence.d.ts +86 -0
  457. package/dist/domains/comet-native/native-verification-evidence.d.ts.map +1 -0
  458. package/dist/domains/comet-native/native-verification-evidence.js +480 -0
  459. package/dist/domains/comet-native/native-verification-evidence.js.map +1 -0
  460. package/dist/domains/comet-native/native-verification-runtime.d.ts +58 -0
  461. package/dist/domains/comet-native/native-verification-runtime.d.ts.map +1 -0
  462. package/dist/domains/comet-native/native-verification-runtime.js +321 -0
  463. package/dist/domains/comet-native/native-verification-runtime.js.map +1 -0
  464. package/dist/domains/comet-native/native-verification-scope.d.ts +117 -0
  465. package/dist/domains/comet-native/native-verification-scope.d.ts.map +1 -0
  466. package/dist/domains/comet-native/native-verification-scope.js +1040 -0
  467. package/dist/domains/comet-native/native-verification-scope.js.map +1 -0
  468. package/dist/domains/comet-native/native-workspace.d.ts +46 -0
  469. package/dist/domains/comet-native/native-workspace.d.ts.map +1 -0
  470. package/dist/domains/comet-native/native-workspace.js +276 -0
  471. package/dist/domains/comet-native/native-workspace.js.map +1 -0
  472. package/dist/domains/dashboard/collector.d.ts.map +1 -1
  473. package/dist/domains/dashboard/collector.js +9 -1
  474. package/dist/domains/dashboard/collector.js.map +1 -1
  475. package/dist/domains/dashboard/native-adapter.d.ts +157 -0
  476. package/dist/domains/dashboard/native-adapter.d.ts.map +1 -0
  477. package/dist/domains/dashboard/native-adapter.js +302 -0
  478. package/dist/domains/dashboard/native-adapter.js.map +1 -0
  479. package/dist/domains/dashboard/native-collector.d.ts +6 -0
  480. package/dist/domains/dashboard/native-collector.d.ts.map +1 -0
  481. package/dist/domains/dashboard/native-collector.js +285 -0
  482. package/dist/domains/dashboard/native-collector.js.map +1 -0
  483. package/dist/domains/dashboard/types.d.ts +5 -0
  484. package/dist/domains/dashboard/types.d.ts.map +1 -1
  485. package/dist/domains/dashboard/web/assets/{arc-TGVUG2WN.js → arc-CxdiLJ50.js} +1 -1
  486. package/dist/domains/dashboard/web/assets/{architectureDiagram-3BPJPVTR-ASHmiHoP.js → architectureDiagram-3BPJPVTR-D5YCQu4e.js} +1 -1
  487. package/dist/domains/dashboard/web/assets/{blockDiagram-GPEHLZMM-CwASxBKe.js → blockDiagram-GPEHLZMM-8NfdCOQ8.js} +1 -1
  488. package/dist/domains/dashboard/web/assets/{c4Diagram-AAUBKEIU-BU8z_WNk.js → c4Diagram-AAUBKEIU-B3cFnNT7.js} +1 -1
  489. package/dist/domains/dashboard/web/assets/channel-B6AFly29.js +1 -0
  490. package/dist/domains/dashboard/web/assets/{chunk-2J33WTMH-CBGlUx4_.js → chunk-2J33WTMH-CBNfW-Dr.js} +1 -1
  491. package/dist/domains/dashboard/web/assets/{chunk-4BX2VUAB-CS-iGcFz.js → chunk-4BX2VUAB-vWyemRBr.js} +1 -1
  492. package/dist/domains/dashboard/web/assets/{chunk-55IACEB6-BUtCVJat.js → chunk-55IACEB6-H6haOo2C.js} +1 -1
  493. package/dist/domains/dashboard/web/assets/{chunk-727SXJPM-C94tj_pf.js → chunk-727SXJPM-D02UjGND.js} +1 -1
  494. package/dist/domains/dashboard/web/assets/{chunk-AQP2D5EJ-BFOKcpdG.js → chunk-AQP2D5EJ-wKsbOw_T.js} +1 -1
  495. package/dist/domains/dashboard/web/assets/{chunk-FMBD7UC4-Dmx8B-st.js → chunk-FMBD7UC4-eYFEZimP.js} +1 -1
  496. package/dist/domains/dashboard/web/assets/{chunk-ND2GUHAM-DYV00CNn.js → chunk-ND2GUHAM-fMaIDDI2.js} +1 -1
  497. package/dist/domains/dashboard/web/assets/{chunk-QZHKN3VN-DMJJyQnw.js → chunk-QZHKN3VN-C9rhF6Hm.js} +1 -1
  498. package/dist/domains/dashboard/web/assets/classDiagram-4FO5ZUOK-BcnrxOTt.js +1 -0
  499. package/dist/domains/dashboard/web/assets/classDiagram-v2-Q7XG4LA2-BcnrxOTt.js +1 -0
  500. package/dist/domains/dashboard/web/assets/{cose-bilkent-S5V4N54A-P4nE2rea.js → cose-bilkent-S5V4N54A-CbaShPub.js} +1 -1
  501. package/dist/domains/dashboard/web/assets/{cynefin-VYW2F7L2-C-R1HXDv.js → cynefin-VYW2F7L2-DN4emAQv.js} +1 -1
  502. package/dist/domains/dashboard/web/assets/{dagre-BM42HDAG-BH8d-C9z.js → dagre-BM42HDAG-BpSzbk_V.js} +1 -1
  503. package/dist/domains/dashboard/web/assets/demo-BuVau32v.js +25 -0
  504. package/dist/domains/dashboard/web/assets/{diagram-2AECGRRQ-DpXTgQIH.js → diagram-2AECGRRQ-CfXwGGpQ.js} +1 -1
  505. package/dist/domains/dashboard/web/assets/{diagram-5GNKFQAL-DSiFJzSw.js → diagram-5GNKFQAL-DMp0Zmot.js} +1 -1
  506. package/dist/domains/dashboard/web/assets/{diagram-KO2AKTUF-DULMkben.js → diagram-KO2AKTUF-C7ZvofsM.js} +1 -1
  507. package/dist/domains/dashboard/web/assets/{diagram-LMA3HP47-Pi8m_NO9.js → diagram-LMA3HP47-BjmxFnap.js} +1 -1
  508. package/dist/domains/dashboard/web/assets/{diagram-OG6HWLK6-BSe6bCWm.js → diagram-OG6HWLK6-DFBG1Iqy.js} +1 -1
  509. package/dist/domains/dashboard/web/assets/{erDiagram-TEJ5UH35-zb-FEcbq.js → erDiagram-TEJ5UH35-MpNT7dzt.js} +1 -1
  510. package/dist/domains/dashboard/web/assets/{flowDiagram-I6XJVG4X-Dr-Gk0z2.js → flowDiagram-I6XJVG4X-_1wAR6c1.js} +1 -1
  511. package/dist/domains/dashboard/web/assets/{ganttDiagram-6RSMTGT7-qs6Zb2A6.js → ganttDiagram-6RSMTGT7-DJKjDeWl.js} +1 -1
  512. package/dist/domains/dashboard/web/assets/{gitGraphDiagram-PVQCEYII-BQ314orT.js → gitGraphDiagram-PVQCEYII-BL7yUEn-.js} +1 -1
  513. package/dist/domains/dashboard/web/assets/index-CjE9mHGb.js +24 -0
  514. package/dist/domains/dashboard/web/assets/index-D-AGxvI4.css +1 -0
  515. package/dist/domains/dashboard/web/assets/{infoDiagram-5YYISTIA-O0bQp98A.js → infoDiagram-5YYISTIA-Bt5fqrOd.js} +1 -1
  516. package/dist/domains/dashboard/web/assets/{ishikawaDiagram-YF4QCWOH-BPC7wbKh.js → ishikawaDiagram-YF4QCWOH-COCMcjBM.js} +1 -1
  517. package/dist/domains/dashboard/web/assets/{journeyDiagram-JHISSGLW-ohViOd4b.js → journeyDiagram-JHISSGLW-DGcpcWny.js} +1 -1
  518. package/dist/domains/dashboard/web/assets/{kanban-definition-UN3LZRKU-CHleNdbG.js → kanban-definition-UN3LZRKU-QSBNsWMP.js} +1 -1
  519. package/dist/domains/dashboard/web/assets/{linear-CyqiW--Q.js → linear-9uyeeBZf.js} +1 -1
  520. package/dist/domains/dashboard/web/assets/{mermaid.core-qS9XvtaK.js → mermaid.core-CkNdB471.js} +4 -4
  521. package/dist/domains/dashboard/web/assets/{mindmap-definition-RKZ34NQL-oaGkqO9l.js → mindmap-definition-RKZ34NQL-CiNxI0gP.js} +1 -1
  522. package/dist/domains/dashboard/web/assets/{pieDiagram-4H26LBE5-CPcB-AFh.js → pieDiagram-4H26LBE5-BLJ6QnRO.js} +1 -1
  523. package/dist/domains/dashboard/web/assets/{quadrantDiagram-W4KKPZXB-LFy52Qtj.js → quadrantDiagram-W4KKPZXB-CflW-eFH.js} +1 -1
  524. package/dist/domains/dashboard/web/assets/{requirementDiagram-4Y6WPE33-BdjeaYP_.js → requirementDiagram-4Y6WPE33-B9HLmRWH.js} +1 -1
  525. package/dist/domains/dashboard/web/assets/{sankeyDiagram-5OEKKPKP-DDJ4styL.js → sankeyDiagram-5OEKKPKP-6xnco5k5.js} +1 -1
  526. package/dist/domains/dashboard/web/assets/{sequenceDiagram-3UESZ5HK-BL5bFNoz.js → sequenceDiagram-3UESZ5HK-Dp1rujNZ.js} +1 -1
  527. package/dist/domains/dashboard/web/assets/{stateDiagram-AJRCARHV-BNUfikui.js → stateDiagram-AJRCARHV-C1Xc90ek.js} +1 -1
  528. package/dist/domains/dashboard/web/assets/stateDiagram-v2-BHNVJYJU-p-qmzXyE.js +1 -0
  529. package/dist/domains/dashboard/web/assets/{timeline-definition-PNZ67QCA--ps2uu6L.js → timeline-definition-PNZ67QCA-g9s-m5Z4.js} +1 -1
  530. package/dist/domains/dashboard/web/assets/{vennDiagram-CIIHVFJN-C2q8q26c.js → vennDiagram-CIIHVFJN-rkEyhyCc.js} +1 -1
  531. package/dist/domains/dashboard/web/assets/{wardleyDiagram-YWT4CUSO-BUH9gXqd.js → wardleyDiagram-YWT4CUSO-CJLrWGXc.js} +1 -1
  532. package/dist/domains/dashboard/web/assets/{xychartDiagram-2RQKCTM6-B-DielEy.js → xychartDiagram-2RQKCTM6-BxJvPNqo.js} +1 -1
  533. package/dist/domains/dashboard/web/index.html +2 -2
  534. package/dist/domains/engine/storage-layout.d.ts +14 -0
  535. package/dist/domains/engine/storage-layout.d.ts.map +1 -0
  536. package/dist/domains/engine/storage-layout.js +32 -0
  537. package/dist/domains/engine/storage-layout.js.map +1 -0
  538. package/dist/domains/engine/storage-run.d.ts +9 -0
  539. package/dist/domains/engine/storage-run.d.ts.map +1 -0
  540. package/dist/domains/engine/storage-run.js +116 -0
  541. package/dist/domains/engine/storage-run.js.map +1 -0
  542. package/dist/domains/factory/package.d.ts.map +1 -1
  543. package/dist/domains/factory/package.js +5 -3
  544. package/dist/domains/factory/package.js.map +1 -1
  545. package/dist/domains/integrations/openspec.d.ts.map +1 -1
  546. package/dist/domains/integrations/openspec.js +8 -6
  547. package/dist/domains/integrations/openspec.js.map +1 -1
  548. package/dist/domains/skill/find.d.ts.map +1 -1
  549. package/dist/domains/skill/find.js +7 -1
  550. package/dist/domains/skill/find.js.map +1 -1
  551. package/dist/domains/skill/platform-inspect.d.ts +6 -2
  552. package/dist/domains/skill/platform-inspect.d.ts.map +1 -1
  553. package/dist/domains/skill/platform-inspect.js +52 -8
  554. package/dist/domains/skill/platform-inspect.js.map +1 -1
  555. package/dist/domains/skill/platform-install.d.ts +18 -7
  556. package/dist/domains/skill/platform-install.d.ts.map +1 -1
  557. package/dist/domains/skill/platform-install.js +338 -71
  558. package/dist/domains/skill/platform-install.js.map +1 -1
  559. package/dist/domains/skill/project-instructions.d.ts.map +1 -1
  560. package/dist/domains/skill/project-instructions.js +12 -6
  561. package/dist/domains/skill/project-instructions.js.map +1 -1
  562. package/dist/domains/skill/uninstall.d.ts.map +1 -1
  563. package/dist/domains/skill/uninstall.js +15 -3
  564. package/dist/domains/skill/uninstall.js.map +1 -1
  565. package/dist/domains/workflow-contract/builtins.d.ts +6 -0
  566. package/dist/domains/workflow-contract/builtins.d.ts.map +1 -1
  567. package/dist/domains/workflow-contract/builtins.js +137 -0
  568. package/dist/domains/workflow-contract/builtins.js.map +1 -1
  569. package/dist/domains/workflow-contract/index.d.ts +3 -1
  570. package/dist/domains/workflow-contract/index.d.ts.map +1 -1
  571. package/dist/domains/workflow-contract/index.js +2 -1
  572. package/dist/domains/workflow-contract/index.js.map +1 -1
  573. package/dist/domains/workflow-contract/normalize.d.ts.map +1 -1
  574. package/dist/domains/workflow-contract/normalize.js +28 -10
  575. package/dist/domains/workflow-contract/normalize.js.map +1 -1
  576. package/dist/domains/workflow-contract/project-config.d.ts +7 -0
  577. package/dist/domains/workflow-contract/project-config.d.ts.map +1 -0
  578. package/dist/domains/workflow-contract/project-config.js +110 -0
  579. package/dist/domains/workflow-contract/project-config.js.map +1 -0
  580. package/dist/domains/workflow-contract/types.d.ts +4 -2
  581. package/dist/domains/workflow-contract/types.d.ts.map +1 -1
  582. package/dist/domains/workflow-contract/validation.d.ts.map +1 -1
  583. package/dist/domains/workflow-contract/validation.js +14 -5
  584. package/dist/domains/workflow-contract/validation.js.map +1 -1
  585. package/dist/platform/install/detect.d.ts +3 -1
  586. package/dist/platform/install/detect.d.ts.map +1 -1
  587. package/dist/platform/install/detect.js +4 -1
  588. package/dist/platform/install/detect.js.map +1 -1
  589. package/dist/platform/install/project-registry.js +2 -2
  590. package/dist/platform/install/project-registry.js.map +1 -1
  591. package/dist/platform/paths/repository-layout.d.ts +16 -0
  592. package/dist/platform/paths/repository-layout.d.ts.map +1 -1
  593. package/dist/platform/paths/repository-layout.js.map +1 -1
  594. package/eval/local/README.md +50 -0
  595. package/eval/local/scripts/compare_baselines.py +127 -1
  596. package/eval/local/scripts/regression_check.py +3 -4
  597. package/eval/local/tasks/comet-native-clarification/environment/Dockerfile +27 -0
  598. package/eval/local/tasks/comet-native-clarification/environment/test_wordcount.py +25 -0
  599. package/eval/local/tasks/comet-native-clarification/environment/wordcount.py +36 -0
  600. package/eval/local/tasks/comet-native-clarification/instruction.md +7 -0
  601. package/eval/local/tasks/comet-native-clarification/task.toml +40 -0
  602. package/eval/local/tasks/comet-native-clarification/validation/test_native_clarification.py +193 -0
  603. package/eval/local/tasks/comet-native-clarification-modes/environment/Dockerfile +27 -0
  604. package/eval/local/tasks/comet-native-clarification-modes/environment/test_wordcount.py +25 -0
  605. package/eval/local/tasks/comet-native-clarification-modes/environment/wordcount.py +36 -0
  606. package/eval/local/tasks/comet-native-clarification-modes/instruction.md +13 -0
  607. package/eval/local/tasks/comet-native-clarification-modes/task.toml +39 -0
  608. package/eval/local/tasks/comet-native-clarification-modes/validation/test_native_clarification_modes.py +235 -0
  609. package/eval/local/tasks/comet-native-interrupted-transition/environment/.comet/config.yaml +6 -0
  610. package/eval/local/tasks/comet-native-interrupted-transition/environment/Dockerfile +28 -0
  611. package/eval/local/tasks/comet-native-interrupted-transition/environment/docs/comet/changes/add-character-counting/brief.md +17 -0
  612. package/eval/local/tasks/comet-native-interrupted-transition/environment/docs/comet/changes/add-character-counting/comet-state.yaml +12 -0
  613. package/eval/local/tasks/comet-native-interrupted-transition/environment/docs/comet/changes/add-character-counting/runtime/transition.json +69 -0
  614. package/eval/local/tasks/comet-native-interrupted-transition/environment/docs/comet/changes/add-character-counting/specs/character-counting/spec.md +3 -0
  615. package/eval/local/tasks/comet-native-interrupted-transition/environment/test_wordcount.py +20 -0
  616. package/eval/local/tasks/comet-native-interrupted-transition/environment/wordcount.py +27 -0
  617. package/eval/local/tasks/comet-native-interrupted-transition/instruction.md +7 -0
  618. package/eval/local/tasks/comet-native-interrupted-transition/task.toml +35 -0
  619. package/eval/local/tasks/comet-native-interrupted-transition/validation/test_native_interrupted_transition.py +63 -0
  620. package/eval/local/tasks/comet-native-repository-fact/environment/Dockerfile +26 -0
  621. package/eval/local/tasks/comet-native-repository-fact/environment/PRODUCT_RULES.md +3 -0
  622. package/eval/local/tasks/comet-native-repository-fact/environment/test_wordcount.py +20 -0
  623. package/eval/local/tasks/comet-native-repository-fact/environment/wordcount.py +27 -0
  624. package/eval/local/tasks/comet-native-repository-fact/instruction.md +7 -0
  625. package/eval/local/tasks/comet-native-repository-fact/task.toml +35 -0
  626. package/eval/local/tasks/comet-native-repository-fact/validation/test_native_repository_fact.py +53 -0
  627. package/eval/local/tasks/comet-native-wave-b-decision-resume/environment/Dockerfile +27 -0
  628. package/eval/local/tasks/comet-native-wave-b-decision-resume/environment/test_wordcount.py +27 -0
  629. package/eval/local/tasks/comet-native-wave-b-decision-resume/environment/wordcount.py +36 -0
  630. package/eval/local/tasks/comet-native-wave-b-decision-resume/instruction.md +9 -0
  631. package/eval/local/tasks/comet-native-wave-b-decision-resume/task.toml +40 -0
  632. package/eval/local/tasks/comet-native-wave-b-decision-resume/validation/test_native_wave_b_decision_resume.py +208 -0
  633. package/eval/local/tasks/comet-native-wave-c-verification-integrity/environment/Dockerfile +27 -0
  634. package/eval/local/tasks/comet-native-wave-c-verification-integrity/environment/test_wordcount.py +27 -0
  635. package/eval/local/tasks/comet-native-wave-c-verification-integrity/environment/wordcount.py +36 -0
  636. package/eval/local/tasks/comet-native-wave-c-verification-integrity/instruction.md +11 -0
  637. package/eval/local/tasks/comet-native-wave-c-verification-integrity/task.toml +36 -0
  638. package/eval/local/tasks/comet-native-wave-c-verification-integrity/validation/test_native_wave_c_verification_integrity.py +344 -0
  639. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/environment/Dockerfile +27 -0
  640. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/environment/test_wordcount.py +27 -0
  641. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/environment/wordcount.py +36 -0
  642. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/instruction.md +11 -0
  643. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/task.toml +37 -0
  644. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/validation/test_native_wave_d_stagnation_stop.py +284 -0
  645. package/eval/local/tasks/comet-native-wave-e-parallel-safety/environment/.include-trusted-native-runtime +1 -0
  646. package/eval/local/tasks/comet-native-wave-e-parallel-safety/environment/Dockerfile +27 -0
  647. package/eval/local/tasks/comet-native-wave-e-parallel-safety/environment/test_wordcount.py +27 -0
  648. package/eval/local/tasks/comet-native-wave-e-parallel-safety/environment/wordcount.py +36 -0
  649. package/eval/local/tasks/comet-native-wave-e-parallel-safety/instruction.md +9 -0
  650. package/eval/local/tasks/comet-native-wave-e-parallel-safety/task.toml +37 -0
  651. package/eval/local/tasks/comet-native-wave-e-parallel-safety/validation/test_native_wave_e_parallel_safety.py +309 -0
  652. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/.include-current-comet-cli +1 -0
  653. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/Dockerfile +31 -0
  654. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/current-comet-package.json +18 -0
  655. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/current-comet.sh +14 -0
  656. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/test_wordcount.py +27 -0
  657. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/wordcount.py +36 -0
  658. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/instruction.md +7 -0
  659. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/task.toml +36 -0
  660. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/validation/test_native_wave_f_dashboard_readonly.py +469 -0
  661. package/eval/local/tasks/comet-native-workflow/environment/Dockerfile +27 -0
  662. package/eval/local/tasks/comet-native-workflow/environment/test_wordcount.py +25 -0
  663. package/eval/local/tasks/comet-native-workflow/environment/wordcount.py +36 -0
  664. package/eval/local/tasks/comet-native-workflow/instruction.md +14 -0
  665. package/eval/local/tasks/comet-native-workflow/task.toml +36 -0
  666. package/eval/local/tasks/comet-native-workflow/validation/test_native_workflow.py +149 -0
  667. package/eval/local/tasks/index.yaml +61 -0
  668. package/eval/local/tests/conftest.py +407 -22
  669. package/eval/local/tests/scaffold/test_aligned_comparison.py +1012 -0
  670. package/eval/local/tests/scaffold/test_conftest_helpers.py +187 -7
  671. package/eval/local/tests/scaffold/test_logging.py +135 -1
  672. package/eval/local/tests/scaffold/test_manifests.py +2 -0
  673. package/eval/local/tests/scaffold/test_native_aligned_eval.py +346 -0
  674. package/eval/local/tests/scaffold/test_native_wave_evaluations.py +1889 -0
  675. package/eval/local/tests/scaffold/test_profiles.py +33 -0
  676. package/eval/local/tests/scaffold/test_sample_quality.py +57 -0
  677. package/eval/local/tests/scaffold/test_tasks.py +377 -1
  678. package/eval/local/tests/scaffold/test_treatments.py +59 -13
  679. package/eval/local/tests/scaffold/test_utils.py +277 -4
  680. package/eval/local/tests/tasks/__init__.py +1 -0
  681. package/eval/local/tests/tasks/test_tasks.py +104 -78
  682. package/eval/local/tests/tasks/test_validation_scripts.py +37 -0
  683. package/eval/local/treatments/comet/comet_native_phase1.yaml +66 -0
  684. package/eval/scaffold/python/aligned_comparison.py +1631 -0
  685. package/eval/scaffold/python/generic_llm_judge.py +3 -1
  686. package/eval/scaffold/python/llm_judge.py +0 -3
  687. package/eval/scaffold/python/logging.py +115 -16
  688. package/eval/scaffold/python/manifests.py +2 -0
  689. package/eval/scaffold/python/native_eval.py +138 -0
  690. package/eval/scaffold/python/pass_at_k.py +0 -1
  691. package/eval/scaffold/python/report_outputs.py +226 -44
  692. package/eval/scaffold/python/sample_quality.py +45 -2
  693. package/eval/scaffold/python/tasks.py +11 -0
  694. package/eval/scaffold/python/utils.py +108 -20
  695. package/eval/scaffold/python/validation/__init__.py +15 -5
  696. package/eval/scaffold/python/validation/comet_workflow.py +10 -5
  697. package/eval/scaffold/python/validation/generic_rubric.py +1 -2
  698. package/eval/scaffold/python/validation/native_wave.py +2154 -0
  699. package/eval/scaffold/python/validation/native_workflow.py +252 -0
  700. package/eval/scaffold/python/validation/rubric.py +0 -2
  701. package/eval/scaffold/shell/completion-point.sh +18 -0
  702. package/eval/scaffold/shell/decision-point.sh +35 -0
  703. package/eval/scaffold/shell/docker.sh +150 -9
  704. package/eval/scaffold/shell/run-claude-loop.sh +57 -27
  705. package/package.json +19 -5
  706. package/dist/domains/dashboard/web/assets/channel-kp6Ng2JJ.js +0 -1
  707. package/dist/domains/dashboard/web/assets/classDiagram-4FO5ZUOK-yBDjgMY_.js +0 -1
  708. package/dist/domains/dashboard/web/assets/classDiagram-v2-Q7XG4LA2-yBDjgMY_.js +0 -1
  709. package/dist/domains/dashboard/web/assets/demo-DQyfozbi.js +0 -1
  710. package/dist/domains/dashboard/web/assets/index-BLAfkNTu.css +0 -1
  711. package/dist/domains/dashboard/web/assets/index-DtLUOcAW.js +0 -24
  712. package/dist/domains/dashboard/web/assets/stateDiagram-v2-BHNVJYJU-DGrsmWts.js +0 -1
  713. package/eval/.env.example +0 -52
  714. package/eval/langsmith/.env.example +0 -16
@@ -1,4 +1,4 @@
1
- import{_ as w,aU as _,aV as Y,aW as F,aX as j,l as r,c as H,aY as V,aZ as U,af as $,aP as W,ag as P,ae as Z,a_ as q,a$ as z,b0 as K}from"./mermaid.core-qS9XvtaK.js";import{i as N,G as B}from"./graph--OzhPTMs.js";import{b as Q,m as R,l as I}from"./layout-SsrduOYp.js";import"./index-DtLUOcAW.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var ee=4;function ne(e){return Q(e,ee)}function b(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:te(e),edges:se(e)};return N(e.graph())||(t.value=ne(e.graph())),t}function te(e){return R(e.nodes(),function(t){var n=e.node(t),a=e.parent(t),i={v:t};return N(n)||(i.value=n),N(a)||(i.parent=a),i})}function se(e){return R(e.edges(),function(t){var n=e.edge(t),a={v:t.v,w:t.w};return N(t.name)||(a.name=t.name),N(n)||(a.value=n),a})}var d=new Map,p=new Map,A=new Map,re=w(()=>{p.clear(),A.clear(),d.clear()},"clear"),D=w((e,t)=>{const n=p.get(t)||[];return r.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),ie=w((e,t)=>{const n=p.get(t)||[];return r.info("Descendants of ",t," is ",n),r.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(r.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=w((e,t,n,a)=>{r.warn("Copying children of ",e,"root",a,"data",t.node(e),a);const i=t.children(e)||[];e!==a&&i.push(e),r.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(o=>{if(t.children(o).length>0)G(o,t,n,a);else{const l=t.node(o);r.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(r.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(r.debug("Setting parent",o,e),n.setParent(o,e)):(r.info("In copy ",e,"root",a,"data",t.node(e),a),r.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));const u=t.edges(o);r.debug("Copying Edges",u),u.forEach(c=>{r.info("Edge",c);const m=t.edge(c.v,c.w,c.name);r.info("Edge data",m,a);try{ie(c,a)?(r.info("Copying as ",c.v,c.w,m,c.name),n.setEdge(c.v,c.w,m,c.name),r.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):r.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",a," clusterId:",e)}catch(h){r.error(h)}})}r.debug("Removing node",o),t.removeNode(o)})},"copy"),J=w((e,t)=>{const n=t.children(e);let a=[...n];for(const i of n)A.set(i,e),a=[...a,...J(i,t)];return a},"extractDescendants"),oe=w((e,t,n)=>{const a=e.edges().filter(c=>c.v===t||c.w===t),i=e.edges().filter(c=>c.v===n||c.w===n),o=a.map(c=>({v:c.v===t?n:c.v,w:c.w===t?t:c.w})),l=i.map(c=>({v:c.v,w:c.w}));return o.filter(c=>l.some(m=>c.v===m.v&&c.w===m.w))},"findCommonEdges"),C=w((e,t,n)=>{const a=t.children(e);if(r.trace("Searching children of id ",e,a),a.length<1)return e;let i;for(const o of a){const l=C(o,t,n),u=oe(t,n,l);if(l)if(u.length>0)i=l;else return l}return i},"findNonClusterChild"),k=w(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,"getAnchorId"),ae=w((e,t)=>{if(!e||t>10){r.debug("Opting out, no graph ");return}else r.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(r.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),p.set(n,J(n,e)),d.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),i=e.edges();a.length>0?(r.debug("Cluster identified",n,p),i.forEach(o=>{const l=D(o.v,n),u=D(o.w,n);l^u&&(r.warn("Edge: ",o," leaves cluster ",n),r.warn("Descendants of XXX ",n,": ",p.get(n)),d.get(n).externalConnections=!0)})):r.debug("Not a cluster ",n,p)});for(let n of d.keys()){const a=d.get(n).id,i=e.parent(a);i!==n&&d.has(i)&&!d.get(i).externalConnections&&(d.get(n).id=i)}e.edges().forEach(function(n){const a=e.edge(n);r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let i=n.v,o=n.w;if(r.warn("Fix XXX",d,"ids:",n.v,n.w,"Translating: ",d.get(n.v)," --- ",d.get(n.w)),d.get(n.v)||d.get(n.w)){if(r.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),i=k(n.v),o=k(n.w),e.removeEdge(n.v,n.w,n.name),i!==n.v){const l=e.parent(i);d.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);d.get(l).externalConnections=!0,a.toCluster=n.w}r.warn("Fix Replacing with XXX",i,o,n.name),e.setEdge(i,o,a,n.name)}}),r.warn("Adjusted Graph",b(e)),T(e,0),r.trace(d)},"adjustClustersAndEdges"),T=w((e,t)=>{if(r.warn("extractor - ",t,b(e),e.children("D")),t>10){r.error("Bailing out");return}let n=e.nodes(),a=!1;for(const i of n){const o=e.children(i);a=a||o.length>0}if(!a){r.debug("Done, no node has children",e.nodes());return}r.debug("Nodes = ",n,t);for(const i of n)if(r.debug("Extracting node",i,d,d.has(i)&&!d.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!d.has(i))r.debug("Not a cluster",i,t);else if(!d.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){r.warn("Cluster without external connections, without a parent and with children",i,t);let l=e.graph().rankdir==="TB"?"LR":"TB";d.get(i)?.clusterData?.dir&&(l=d.get(i).clusterData.dir,r.warn("Fixing dir",d.get(i).clusterData.dir,l));const u=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});r.warn("Old graph before copy",b(e)),G(i,e,u,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:d.get(i).clusterData,label:d.get(i).label,graph:u}),r.warn("New graph after copy node: (",i,")",b(u)),r.debug("Old graph after copy",b(e))}else r.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!d.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),r.debug(d);n=e.nodes(),r.warn("New list of nodes",n);for(const i of n){const o=e.node(i);r.warn(" Now next level",i,o),o?.clusterNode&&T(o.graph,t+1)}},"extractor"),L=w((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{const i=e.children(a),o=L(e,i);n=[...n,...o]}),n},"sorter"),ce=w(e=>L(e,e.children()),"sortNodesByHierarchy"),M=w(async(e,t,n,a,i,o)=>{r.warn("Graph in recursive render:XAX",b(t),i);const l=t.graph().rankdir;r.trace("Dir in recursive render - dir:",l);const u=e.insert("g").attr("class","root");t.nodes()?r.info("Recursive render XXX",t.nodes()):r.info("No nodes found for",t),t.edges().length>0&&r.info("Recursive edges",t.edge(t.edges()[0]));const c=u.insert("g").attr("class","clusters"),m=u.insert("g").attr("class","edgePaths"),h=u.insert("g").attr("class","edgeLabels"),v=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){const s=t.node(f);if(i!==void 0){const g=JSON.parse(JSON.stringify(i.clusterData));r.trace(`Setting data for parent cluster XXX
1
+ import{_ as w,aU as _,aV as Y,aW as F,aX as j,l as r,c as H,aY as V,aZ as U,af as $,aP as W,ag as P,ae as Z,a_ as q,a$ as z,b0 as K}from"./mermaid.core-CkNdB471.js";import{i as N,G as B}from"./graph--OzhPTMs.js";import{b as Q,m as R,l as I}from"./layout-SsrduOYp.js";import"./index-CjE9mHGb.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var ee=4;function ne(e){return Q(e,ee)}function b(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:te(e),edges:se(e)};return N(e.graph())||(t.value=ne(e.graph())),t}function te(e){return R(e.nodes(),function(t){var n=e.node(t),a=e.parent(t),i={v:t};return N(n)||(i.value=n),N(a)||(i.parent=a),i})}function se(e){return R(e.edges(),function(t){var n=e.edge(t),a={v:t.v,w:t.w};return N(t.name)||(a.name=t.name),N(n)||(a.value=n),a})}var d=new Map,p=new Map,A=new Map,re=w(()=>{p.clear(),A.clear(),d.clear()},"clear"),D=w((e,t)=>{const n=p.get(t)||[];return r.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),ie=w((e,t)=>{const n=p.get(t)||[];return r.info("Descendants of ",t," is ",n),r.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(r.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=w((e,t,n,a)=>{r.warn("Copying children of ",e,"root",a,"data",t.node(e),a);const i=t.children(e)||[];e!==a&&i.push(e),r.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(o=>{if(t.children(o).length>0)G(o,t,n,a);else{const l=t.node(o);r.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(r.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(r.debug("Setting parent",o,e),n.setParent(o,e)):(r.info("In copy ",e,"root",a,"data",t.node(e),a),r.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));const u=t.edges(o);r.debug("Copying Edges",u),u.forEach(c=>{r.info("Edge",c);const m=t.edge(c.v,c.w,c.name);r.info("Edge data",m,a);try{ie(c,a)?(r.info("Copying as ",c.v,c.w,m,c.name),n.setEdge(c.v,c.w,m,c.name),r.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):r.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",a," clusterId:",e)}catch(h){r.error(h)}})}r.debug("Removing node",o),t.removeNode(o)})},"copy"),J=w((e,t)=>{const n=t.children(e);let a=[...n];for(const i of n)A.set(i,e),a=[...a,...J(i,t)];return a},"extractDescendants"),oe=w((e,t,n)=>{const a=e.edges().filter(c=>c.v===t||c.w===t),i=e.edges().filter(c=>c.v===n||c.w===n),o=a.map(c=>({v:c.v===t?n:c.v,w:c.w===t?t:c.w})),l=i.map(c=>({v:c.v,w:c.w}));return o.filter(c=>l.some(m=>c.v===m.v&&c.w===m.w))},"findCommonEdges"),C=w((e,t,n)=>{const a=t.children(e);if(r.trace("Searching children of id ",e,a),a.length<1)return e;let i;for(const o of a){const l=C(o,t,n),u=oe(t,n,l);if(l)if(u.length>0)i=l;else return l}return i},"findNonClusterChild"),k=w(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,"getAnchorId"),ae=w((e,t)=>{if(!e||t>10){r.debug("Opting out, no graph ");return}else r.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(r.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),p.set(n,J(n,e)),d.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),i=e.edges();a.length>0?(r.debug("Cluster identified",n,p),i.forEach(o=>{const l=D(o.v,n),u=D(o.w,n);l^u&&(r.warn("Edge: ",o," leaves cluster ",n),r.warn("Descendants of XXX ",n,": ",p.get(n)),d.get(n).externalConnections=!0)})):r.debug("Not a cluster ",n,p)});for(let n of d.keys()){const a=d.get(n).id,i=e.parent(a);i!==n&&d.has(i)&&!d.get(i).externalConnections&&(d.get(n).id=i)}e.edges().forEach(function(n){const a=e.edge(n);r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),r.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let i=n.v,o=n.w;if(r.warn("Fix XXX",d,"ids:",n.v,n.w,"Translating: ",d.get(n.v)," --- ",d.get(n.w)),d.get(n.v)||d.get(n.w)){if(r.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),i=k(n.v),o=k(n.w),e.removeEdge(n.v,n.w,n.name),i!==n.v){const l=e.parent(i);d.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);d.get(l).externalConnections=!0,a.toCluster=n.w}r.warn("Fix Replacing with XXX",i,o,n.name),e.setEdge(i,o,a,n.name)}}),r.warn("Adjusted Graph",b(e)),T(e,0),r.trace(d)},"adjustClustersAndEdges"),T=w((e,t)=>{if(r.warn("extractor - ",t,b(e),e.children("D")),t>10){r.error("Bailing out");return}let n=e.nodes(),a=!1;for(const i of n){const o=e.children(i);a=a||o.length>0}if(!a){r.debug("Done, no node has children",e.nodes());return}r.debug("Nodes = ",n,t);for(const i of n)if(r.debug("Extracting node",i,d,d.has(i)&&!d.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!d.has(i))r.debug("Not a cluster",i,t);else if(!d.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){r.warn("Cluster without external connections, without a parent and with children",i,t);let l=e.graph().rankdir==="TB"?"LR":"TB";d.get(i)?.clusterData?.dir&&(l=d.get(i).clusterData.dir,r.warn("Fixing dir",d.get(i).clusterData.dir,l));const u=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});r.warn("Old graph before copy",b(e)),G(i,e,u,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:d.get(i).clusterData,label:d.get(i).label,graph:u}),r.warn("New graph after copy node: (",i,")",b(u)),r.debug("Old graph after copy",b(e))}else r.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!d.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),r.debug(d);n=e.nodes(),r.warn("New list of nodes",n);for(const i of n){const o=e.node(i);r.warn(" Now next level",i,o),o?.clusterNode&&T(o.graph,t+1)}},"extractor"),L=w((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{const i=e.children(a),o=L(e,i);n=[...n,...o]}),n},"sorter"),ce=w(e=>L(e,e.children()),"sortNodesByHierarchy"),M=w(async(e,t,n,a,i,o)=>{r.warn("Graph in recursive render:XAX",b(t),i);const l=t.graph().rankdir;r.trace("Dir in recursive render - dir:",l);const u=e.insert("g").attr("class","root");t.nodes()?r.info("Recursive render XXX",t.nodes()):r.info("No nodes found for",t),t.edges().length>0&&r.info("Recursive edges",t.edge(t.edges()[0]));const c=u.insert("g").attr("class","clusters"),m=u.insert("g").attr("class","edgePaths"),h=u.insert("g").attr("class","edgeLabels"),v=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){const s=t.node(f);if(i!==void 0){const g=JSON.parse(JSON.stringify(i.clusterData));r.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,f,`
3
3
  data=`,g.height,`
4
4
  Parent cluster`,i.height),t.setNode(i.id,g),t.parent(f)||(r.trace("Setting parent",f,i.id),t.setParent(f,i.id,g))}if(r.info("(Insert) Node XXX"+f+": "+JSON.stringify(t.node(f))),s?.clusterNode){r.info("Cluster identified XBX",f,s.width,t.node(f));const{ranksep:g,nodesep:y}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:g+25,nodesep:y});const E=await M(v,s.graph,n,a,t.node(f),o),x=E.elem;V(s,x),s.diff=E.diff||0,r.info("New compound node after recursive render XAX",f,"width",s.width,"height",s.height),U(x,s)}else t.children(f).length>0?(r.trace("Cluster - the non recursive path XBX",f,s.id,s,s.width,"Graph:",t),r.trace(C(s.id,t)),d.set(s.id,{id:C(s.id,t),node:s})):(r.trace("Node - the non recursive path XAX",f,v,t.node(f),l),await $(v,t.node(f),{config:o,dir:l}))})),await w(async()=>{const f=t.edges().map(async function(s){const g=t.edge(s.v,s.w,s.name);r.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),r.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),r.info("Fix",d,"ids:",s.v,s.w,"Translating: ",d.get(s.v),d.get(s.w)),await K(h,g)});await Promise.all(f)},"processEdges")(),r.info("Graph before layout:",JSON.stringify(b(t))),r.info("############################################# XXX"),r.info("### Layout ### XXX"),r.info("############################################# XXX"),I(t),r.info("Graph after layout:",JSON.stringify(b(t)));let O=0,{subGraphTitleTotalMargin:S}=W(o);return await Promise.all(ce(t).map(async function(f){const s=t.node(f);if(r.info("Position XBX => "+f+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s?.clusterNode)s.y+=S,r.info("A tainted cluster node XBX1",f,s.id,s.width,s.height,s.x,s.y,t.parent(f)),d.get(s.id).node=s,P(s);else if(t.children(f).length>0){r.info("A pure cluster node XBX1",f,s.id,s.x,s.y,s.width,s.height,t.parent(f)),s.height+=S,t.node(s.parentId);const g=s?.padding/2||0,y=s?.labelBBox?.height||0,E=y-g||0;r.debug("OffsetY",E,"labelHeight",y,"halfPadding",g),await Z(c,s),d.get(s.id).node=s}else{const g=t.node(s.parentId);s.y+=S/2,r.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",g,g?.offsetY,s),P(s)}})),t.edges().forEach(function(f){const s=t.edge(f);r.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(s),s),s.points.forEach(x=>x.y+=S/2);const g=t.node(f.v);var y=t.node(f.w);const E=q(m,s,d,n,g,y,a);z(s,E)}),t.nodes().forEach(function(f){const s=t.node(f);r.info(f,s.type,s.diff),s.isGroup&&(O=s.diff)}),r.warn("Returning from recursive render XAX",u,O),{elem:u,diff:O}},"recursiveRender"),me=w(async(e,t)=>{const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=t.select("g");_(a,e.markers,e.type,e.diagramId),Y(),F(),j(),re(),e.nodes.forEach(o=>{n.setNode(o.id,{...o}),o.parentId&&n.setParent(o.id,o.parentId)}),r.debug("Edges:",e.edges),e.edges.forEach(o=>{if(o.start===o.end){const l=o.start,u=l+"---"+l+"---1",c=l+"---"+l+"---2",m=n.node(l);n.setNode(u,{domId:u,id:u,parentId:m.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(u,m.parentId),n.setNode(c,{domId:c,id:c,parentId:m.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(c,m.parentId);const h=structuredClone(o),v=structuredClone(o),X=structuredClone(o);h.label="",h.arrowTypeEnd="none",h.endLabelLeft="",h.endLabelRight="",h.startLabelLeft="",h.id=l+"-cyclic-special-1",v.startLabelRight="",v.startLabelLeft="",v.endLabelLeft="",v.endLabelRight="",v.arrowTypeStart="none",v.arrowTypeEnd="none",v.id=l+"-cyclic-special-mid",X.label="",X.startLabelRight="",X.startLabelLeft="",X.arrowTypeStart="none",m.isGroup&&(h.fromCluster=l,X.toCluster=l),X.id=l+"-cyclic-special-2",X.arrowTypeStart="none",n.setEdge(l,u,h,l+"-cyclic-special-0"),n.setEdge(u,c,v,l+"-cyclic-special-1"),n.setEdge(c,l,X,l+"-cyc<lic-special-2")}else n.setEdge(o.start,o.end,{...o},o.id)}),r.warn("Graph at first:",JSON.stringify(b(n))),ae(n),r.warn("Graph after XAX:",JSON.stringify(b(n)));const i=H();await M(a,n,e.type,e.diagramId,void 0,i)},"render");export{me as render};
@@ -0,0 +1,25 @@
1
+ function r(e){const s=e.path,a=e.phase,o=a!=="open"&&a!=="unknown",t=[];o&&!e.artifacts?.grouped?.some(c=>c.key==="designDoc")&&t.push({key:"designDoc",label:"技术设计",source:"superpowers",exists:!0,path:`docs/superpowers/specs/${e.name}-design.md`});const n=[{key:"cometYaml",label:".comet.yaml",source:"comet",exists:e.artifacts?.cometYaml??!0,path:`${s}/.comet.yaml`},{key:"handoff",label:"Handoff 上下文",source:"comet",exists:!1,path:`${s}/.comet/handoff/design-context.json`},{key:"checkpoint",label:"Checkpoint",source:"comet",exists:!1,path:`${s}/.comet/checkpoint.json`},{key:"brainstorm",label:"Brainstorm 摘要",source:"comet",exists:!1,path:`${s}/.comet/handoff/brainstorm-summary.md`},{key:"subagentProgress",label:"Subagent 进度",source:"comet",exists:!1,path:`${s}/.comet/subagent-progress.md`}];return e.artifacts?.grouped&&e.artifacts.grouped.push(...t,...n),e}const i={project:{name:"Comet",path:"~/projects/comet",generatedAt:"2026-06-25T14:32:00.000Z"},summary:{activeChanges:4,archivedChanges:3,verifyFailed:1,tasksIncomplete:15,dirtyFiles:3},git:{branch:"feat/dashboard-redesign",head:"8f3a2c1",dirtyFiles:3,dirtyFileList:["domains/dashboard/web/index.html","domains/dashboard/web/styles.css","domains/dashboard/collector.ts"],recentCommits:["8f3a2c1 重构 dashboard 采集逻辑","2bd9e0a 新增 phase stepper 组件","c4f1a80 修复 verify 解析空指针","9a02d7d 初始化 openspec/changes 目录"]},risks:[{level:"error",code:"verify-failed",message:"1 个变更验证失败",suggestion:"打开 fix-webhook-retries 并重新运行 comet verify"},{level:"warning",code:"tasks-incomplete",message:"共 15 个未完成任务",suggestion:"完成任务后变更即可进入 Verify 阶段"},{level:"warning",code:"git-dirty",message:"3 个未提交文件阻塞 verify",suggestion:"提交或暂存 (stash) 后再运行验证"}],changes:{active:[{id:"add-auth-rate-limiting",name:"add-auth-rate-limiting",displayName:"add-auth-rate-limiting",status:"active",path:"openspec/changes/add-auth-rate-limiting",workflow:"feature",phase:"build",updatedAt:"2 小时前",tasks:{completed:8,total:12,incomplete:["为滑动窗口补充单元测试","Redis 适配器集成测试","5000 QPS 压测场景","补充 README 限流说明"],sections:[{title:"限流策略",completed:3,total:3,status:"done"},{title:"中间件实现",completed:3,total:4,status:"active"},{title:"测试覆盖",completed:2,total:5,status:"pending"}]},artifacts:{proposal:!0,design:!0,tasks:!0,plan:!0,verifyReport:!1,cometYaml:!0,grouped:[{key:"proposal",label:"提案",source:"openspec",exists:!0,path:"openspec/changes/add-auth-rate-limiting/proposal.md"},{key:"design",label:"设计文档",source:"openspec",exists:!0,path:"openspec/changes/add-auth-rate-limiting/design.md"},{key:"tasks",label:"任务清单",source:"openspec",exists:!0,path:"openspec/changes/add-auth-rate-limiting/tasks.md"},{key:"designDoc",label:"技术设计",source:"superpowers",exists:!0,path:"docs/superpowers/specs/2026-06-20-rate-limiting-design.md"},{key:"plan",label:"实施计划",source:"superpowers",exists:!0,path:"docs/superpowers/plans/2026-06-20-rate-limiting.md"}]},verify:{result:"pending",reportExists:!1},next:{command:"comet build",reason:"还有 4 个任务未完成",description:"优先推进「测试覆盖」分组,全部任务完成后即可进入 Verify 阶段。"},risks:[{level:"warning",code:"tasks-incomplete",message:"4 个任务未完成,将阻塞进入 Verify",suggestion:"完成「测试覆盖」分组后运行 comet verify"}]},{id:"dashboard-redesign",name:"dashboard-redesign",displayName:"dashboard-redesign",status:"active",path:"openspec/changes/dashboard-redesign",workflow:"feature",phase:"design",updatedAt:"昨天",tasks:{completed:2,total:9,incomplete:["锁定视觉系统","定义响应式断点","交互原型"],sections:[{title:"信息架构",completed:2,total:3,status:"active"},{title:"视觉系统",completed:0,total:3,status:"pending"},{title:"交互原型",completed:0,total:3,status:"pending"}]},artifacts:{proposal:!0,design:!0,tasks:!0,plan:!1,verifyReport:!1,cometYaml:!0,grouped:[{key:"proposal",label:"提案",source:"openspec",exists:!0,path:"openspec/changes/dashboard-redesign/proposal.md"},{key:"design",label:"设计文档",source:"openspec",exists:!0,path:"openspec/changes/dashboard-redesign/design.md"},{key:"tasks",label:"任务清单",source:"openspec",exists:!0,path:"openspec/changes/dashboard-redesign/tasks.md"}]},verify:{result:"pending",reportExists:!1},next:{command:"comet design",reason:"设计阶段进行中",description:"完成视觉系统与交互原型分组后,产出 plan.md 并进入构建。"},risks:[{level:"warning",code:"tasks-incomplete",message:"7 个任务未完成",suggestion:"先锁定视觉系统,再展开交互原型"}]},{id:"fix-webhook-retries",name:"fix-webhook-retries",displayName:"fix-webhook-retries",status:"active",path:"openspec/changes/fix-webhook-retries",workflow:"fix",phase:"verify",updatedAt:"3 小时前",tasks:{completed:11,total:11,incomplete:[],sections:[{title:"重试逻辑",completed:5,total:5,status:"done"},{title:"退避策略",completed:3,total:3,status:"done"},{title:"测试",completed:3,total:3,status:"done"}]},artifacts:{proposal:!0,design:!0,tasks:!0,plan:!0,verifyReport:!0,cometYaml:!0,grouped:[{key:"proposal",label:"提案",source:"openspec",exists:!0,path:"openspec/changes/fix-webhook-retries/proposal.md"},{key:"design",label:"设计文档",source:"openspec",exists:!0,path:"openspec/changes/fix-webhook-retries/design.md"},{key:"tasks",label:"任务清单",source:"openspec",exists:!0,path:"openspec/changes/fix-webhook-retries/tasks.md"},{key:"designDoc",label:"技术设计",source:"superpowers",exists:!0,path:"docs/superpowers/specs/2026-06-22-webhook-retry-design.md"},{key:"plan",label:"实施计划",source:"superpowers",exists:!0,path:"docs/superpowers/plans/2026-06-22-webhook-retry.md"},{key:"verifyReport",label:"验证报告",source:"superpowers",exists:!0,path:"docs/superpowers/reports/2026-06-23-webhook-verify.md"}]},verify:{result:"fail",reportExists:!0,summary:"2 / 4 断言通过 — 重试上限与幂等性失败"},next:{command:"comet verify",reason:"验证失败需修复",description:"verify-result.md 显示 2 项断言失败,修复后重新运行 comet verify。"},risks:[{level:"error",code:"verify-failed",message:"验证未通过:2 项断言失败",suggestion:"检查 verify-result.md 中的失败用例并修复实现"}]},{id:"migrate-config-to-yaml",name:"migrate-config-to-yaml",displayName:"migrate-config-to-yaml",status:"active",path:"openspec/changes/migrate-config-to-yaml",workflow:"refactor",phase:"build",updatedAt:"2 天前",tasks:{completed:6,total:10,incomplete:["完成迁移脚本 dry-run","补充配置迁移文档"],sections:[{title:"配置映射",completed:4,total:4,status:"done"},{title:"迁移脚本",completed:2,total:3,status:"active"},{title:"文档更新",completed:0,total:3,status:"pending"}]},artifacts:{proposal:!0,design:!0,tasks:!0,plan:!0,verifyReport:!1,cometYaml:!0,grouped:[{key:"proposal",label:"提案",source:"openspec",exists:!0,path:"openspec/changes/migrate-config-to-yaml/proposal.md"},{key:"design",label:"设计文档",source:"openspec",exists:!0,path:"openspec/changes/migrate-config-to-yaml/design.md"},{key:"tasks",label:"任务清单",source:"openspec",exists:!0,path:"openspec/changes/migrate-config-to-yaml/tasks.md"},{key:"plan",label:"实施计划",source:"superpowers",exists:!0,path:"docs/superpowers/plans/2026-06-26-config-yaml.md"}]},verify:{result:"pending",reportExists:!1},next:{command:"comet build",reason:"4 个任务未完成",description:"完成迁移脚本与文档更新分组后进入验证。"},risks:[{level:"info",code:"phase-stale",message:"该变更 2 天未更新",suggestion:"确认是否仍活跃,否则考虑归档"}]}],archived:[{id:"archive/2025-11-02-add-dark-mode",name:"2025-11-02-add-dark-mode",displayName:"add-dark-mode",status:"archived",path:"openspec/changes/archive/2025-11-02-add-dark-mode",workflow:"feature",phase:"archive",updatedAt:"2025-11-02",archive:{archiveName:"2025-11-02-add-dark-mode",originalName:"add-dark-mode",archivedAt:"2025-11-02",archivePath:"openspec/changes/archive/2025-11-02-add-dark-mode"},tasks:{completed:14,total:14,incomplete:[],sections:[{title:"主题切换",completed:6,total:6,status:"done"},{title:"样式适配",completed:8,total:8,status:"done"}]},artifacts:{proposal:!0,design:!0,tasks:!0,plan:!0,verifyReport:!0,cometYaml:!0,grouped:[{key:"proposal",label:"提案",source:"openspec",exists:!0,path:"openspec/changes/archive/2025-11-02-add-dark-mode/proposal.md"},{key:"design",label:"设计文档",source:"openspec",exists:!0,path:"openspec/changes/archive/2025-11-02-add-dark-mode/design.md"},{key:"tasks",label:"任务清单",source:"openspec",exists:!0,path:"openspec/changes/archive/2025-11-02-add-dark-mode/tasks.md"},{key:"plan",label:"实施计划",source:"superpowers",exists:!0,path:"docs/superpowers/plans/2025-11-01-dark-mode.md"},{key:"verifyReport",label:"验证报告",source:"superpowers",exists:!0,path:"docs/superpowers/reports/2025-11-02-dark-mode-verify.md"}]},verify:{result:"pass",reportExists:!0,summary:"全部断言通过"}},{id:"archive/2025-10-18-refactor-collector",name:"2025-10-18-refactor-collector",displayName:"refactor-collector",status:"archived",path:"openspec/changes/archive/2025-10-18-refactor-collector",workflow:"refactor",phase:"archive",updatedAt:"2025-10-18",archive:{archiveName:"2025-10-18-refactor-collector",originalName:"refactor-collector",archivedAt:"2025-10-18",archivePath:"openspec/changes/archive/2025-10-18-refactor-collector"},tasks:{completed:9,total:9,incomplete:[],sections:[{title:"重构",completed:9,total:9,status:"done"}]},artifacts:{proposal:!0,design:!0,tasks:!0,plan:!0,verifyReport:!0,cometYaml:!0,grouped:[{key:"proposal",label:"提案",source:"openspec",exists:!0,path:"openspec/changes/archive/2025-10-18-refactor-collector/proposal.md"},{key:"design",label:"设计文档",source:"openspec",exists:!0,path:"openspec/changes/archive/2025-10-18-refactor-collector/design.md"},{key:"tasks",label:"任务清单",source:"openspec",exists:!0,path:"openspec/changes/archive/2025-10-18-refactor-collector/tasks.md"},{key:"plan",label:"实施计划",source:"superpowers",exists:!0,path:"docs/superpowers/plans/2025-10-17-refactor-collector.md"},{key:"verifyReport",label:"验证报告",source:"superpowers",exists:!0,path:"docs/superpowers/reports/2025-10-18-collector-verify.md"}]},verify:{result:"pass",reportExists:!0,summary:"全部断言通过"}},{id:"archive/2025-09-30-init-openspec",name:"2025-09-30-init-openspec",displayName:"init-openspec",status:"archived",path:"openspec/changes/archive/2025-09-30-init-openspec",workflow:"chore",phase:"archive",updatedAt:"2025-09-30",archive:{archiveName:"2025-09-30-init-openspec",originalName:"init-openspec",archivedAt:"2025-09-30",archivePath:"openspec/changes/archive/2025-09-30-init-openspec"},tasks:{completed:6,total:6,incomplete:[],sections:[{title:"初始化",completed:6,total:6,status:"done"}]},artifacts:{proposal:!0,design:!0,tasks:!0,plan:!0,verifyReport:!0,cometYaml:!0,grouped:[{key:"proposal",label:"提案",source:"openspec",exists:!0,path:"openspec/changes/archive/2025-09-30-init-openspec/proposal.md"},{key:"design",label:"设计文档",source:"openspec",exists:!0,path:"openspec/changes/archive/2025-09-30-init-openspec/design.md"},{key:"tasks",label:"任务清单",source:"openspec",exists:!0,path:"openspec/changes/archive/2025-09-30-init-openspec/tasks.md"},{key:"plan",label:"实施计划",source:"superpowers",exists:!0,path:"docs/superpowers/plans/2025-09-29-init-openspec.md"},{key:"verifyReport",label:"验证报告",source:"superpowers",exists:!0,path:"docs/superpowers/reports/2025-09-30-openspec-verify.md"}]},verify:{result:"pass",reportExists:!0,summary:"全部断言通过"}}]},native:{schema:"comet.dashboard.native.v1",generatedAt:"2026-07-19T14:32:00.000Z",totalChangeCount:3,visibleChangeCount:3,omittedChangeCount:0,changesTruncated:!1,changes:[{workflow:"native",name:"ship-native-dashboard",status:"active",archivedAt:null,phase:"build",revision:4,selected:!0,approval:"confirmed",nextCommand:'comet native next ship-native-dashboard --summary "Dashboard UI implemented"',verificationResult:"pending",verificationFreshness:"missing",archiveReady:!1,continuation:{disposition:"continue",action:"work-phase",command:null,requiresUserDecision:!1,requiredInputs:[],requiredInputsTruncated:!1},findings:{total:0,errors:0,warnings:0,info:0,requiresUserDecision:!1,codes:[],truncated:!1},archive:{ready:!1,evidenceFreshness:"missing",operationCount:0,findingCodes:["archive-phase-required","verification-evidence-missing"],findingCodesTruncated:!1,preflightHash:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},conflicts:{visibleDefiniteConflict:0,visiblePossibleOverlap:1,peers:[{change:"align-dashboard-copy",classification:"possible-overlap",workspaceRelationship:"same",signalCount:1}],peersTruncated:!1},artifacts:[{key:"brief",label:"需求简报",path:"brief.md",exists:!0,content:`# Outcome
2
+
3
+ Ship a dedicated Native dashboard view.
4
+
5
+ # Scope
6
+
7
+ Reuse the Classic information architecture and Markdown preview.
8
+ `,truncated:!1,size:132},{key:"spec-dashboard",label:"dashboard Spec",path:"specs/dashboard/spec.md",exists:!0,content:`# Dashboard workflow view
9
+
10
+ ## Requirement
11
+
12
+ Classic and Native views MUST be selected independently.
13
+ `,truncated:!1,size:103}],progress:{createdAt:"2026-07-18T09:10:00.000Z",checkpointAt:"2026-07-19T13:46:00.000Z",checkpointPhase:"build",summary:"完成 Native 独立视图、归档筛选和 Markdown 产物预览。",nextAction:"补充信息密度并完成 Dashboard 浏览器验证。",artifactCount:2},specs:{total:1,create:1,replace:0,remove:0,capabilities:[{capability:"dashboard",operation:"create"}],capabilitiesTruncated:!1},acceptance:{total:4,evidenced:2,skipped:0,missing:2},implementation:{complete:!0,declaredArtifactCount:5,changeCount:8,unattributedCount:0,unresolvedCount:0},repair:null},{workflow:"native",name:"align-dashboard-copy",status:"active",archivedAt:null,phase:"verify",revision:7,selected:!1,approval:"implicit",nextCommand:null,verificationResult:"fail",verificationFreshness:"partial",archiveReady:!1,continuation:{disposition:"await-user",action:"repair",command:null,requiresUserDecision:!0,requiredInputs:["verification-scope"],requiredInputsTruncated:!1},findings:{total:2,errors:1,warnings:1,info:0,requiresUserDecision:!0,codes:["verification-command-failed","user-decision-required"],truncated:!1},archive:{ready:!1,evidenceFreshness:"partial",operationCount:0,findingCodes:["verification-not-passed"],findingCodesTruncated:!1,preflightHash:"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"},conflicts:{visibleDefiniteConflict:0,visiblePossibleOverlap:1,peers:[{change:"ship-native-dashboard",classification:"possible-overlap",workspaceRelationship:"same",signalCount:1}],peersTruncated:!1},artifacts:[{key:"brief",label:"需求简报",path:"brief.md",exists:!0,content:`# Outcome
14
+
15
+ Align the Native dashboard copy with Runtime terminology.
16
+ `,truncated:!1,size:70},{key:"verification",label:"验证报告",path:"verification.md",exists:!0,content:`# Conclusion
17
+
18
+ One copy assertion still requires a user decision.
19
+ `,truncated:!1,size:68}],progress:{createdAt:"2026-07-18T11:30:00.000Z",checkpointAt:"2026-07-19T12:20:00.000Z",checkpointPhase:"verify",summary:"完成中英文术语同步,验证发现一项需要用户决定的文案差异。",nextAction:"确认 verification scope 后重新运行验证。",artifactCount:2},specs:{total:1,create:0,replace:1,remove:0,capabilities:[{capability:"dashboard-copy",operation:"replace"}],capabilitiesTruncated:!1},acceptance:{total:3,evidenced:2,skipped:0,missing:1},implementation:{complete:!1,declaredArtifactCount:2,changeCount:3,unattributedCount:0,unresolvedCount:1},repair:null},{workflow:"native",name:"document-native-resume",status:"archived",archivedAt:"2026-07-18",phase:"archive",revision:9,selected:!1,approval:"confirmed",nextCommand:"comet native archive document-native-resume --dry-run",verificationResult:"pass",verificationFreshness:"complete",archiveReady:!0,continuation:{disposition:"done",action:"archive",command:"comet native archive document-native-resume --dry-run",requiresUserDecision:!1,requiredInputs:[],requiredInputsTruncated:!1},findings:{total:0,errors:0,warnings:0,info:0,requiresUserDecision:!1,codes:[],truncated:!1},archive:{ready:!0,evidenceFreshness:"complete",operationCount:3,findingCodes:[],findingCodesTruncated:!1,preflightHash:"cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"},conflicts:{visibleDefiniteConflict:0,visiblePossibleOverlap:0,peers:[],peersTruncated:!1},artifacts:[{key:"brief",label:"需求简报",path:"brief.md",exists:!0,content:`# Outcome
20
+
21
+ Document automatic Native resume probing.
22
+ `,truncated:!1,size:55},{key:"verification",label:"验证报告",path:"verification.md",exists:!0,content:`# Conclusion
23
+
24
+ Documentation validation passed.
25
+ `,truncated:!1,size:48}],progress:{createdAt:"2026-07-16T08:15:00.000Z",checkpointAt:null,checkpointPhase:null,summary:"Native change 已完成并归档。",nextAction:null,artifactCount:2},specs:{total:1,create:0,replace:1,remove:0,capabilities:[{capability:"native-resume",operation:"replace"}],capabilitiesTruncated:!1},acceptance:{total:2,evidenced:2,skipped:0,missing:0},implementation:null,repair:null}],conflicts:{available:!0,definiteConflict:0,possibleOverlap:1,disjoint:2,relationshipCount:3,visibleRelationshipCount:3,omittedRelationshipCount:0,relationshipsTruncated:!1}}};i.changes.active.forEach(r);i.changes.archived.forEach(r);const l={compose:{summary:{drafts:3,evalPassed:2,reviewApproved:1,targetPlatforms:3},bundles:[{name:"customize-comet-release-checks",status:"review-approved",currentStep:"publish",mode:"optimize",goal:"定制 /comet:在验证前插入发布准备、README 同步和 Changelog 检查。",engineMode:"deterministic",runnerMode:"change",reusedSkills:[{skill:"comet",status:"available",sourceCount:1},{skill:"verification-before-completion",status:"available",sourceCount:2},{skill:"finishing-a-development-branch",status:"available",sourceCount:2}],generatedControlPlane:["SKILL.md","reference/workflow-protocol.json","reference/composition-report.md","reference/skill-review.md","comet/eval.yaml","scripts/comet-check.mjs"],requiredConfirmations:[{label:"Skill Creator proposal confirmed",required:!0,confirmed:!0},{label:"Eval result attached",required:!0,confirmed:!0},{label:"Review approved",required:!0,confirmed:!0},{label:"Executable disclosure reviewed",required:!1,confirmed:!1}],callChain:["comet-open","comet-design","release-readiness-check","comet-build","verification-before-completion","comet-archive"],distribution:{readiness:"publishable",plannedFiles:18,executables:3,platforms:[{platform:"Codex",status:"previewed"},{platform:"Claude Code",status:"previewed"},{platform:"Gemini",status:"capability warning"}]}},{name:"create-skill-maker-review-flow",status:"eval-passed",currentStep:"review",mode:"create",goal:"创建 Skill:把需求澄清、作者分工、审阅报告和安装预览串成可恢复流程。",engineMode:"adaptive",runnerMode:"standalone",reusedSkills:[{skill:"brainstorming",status:"available",sourceCount:2},{skill:"writing-skills",status:"available",sourceCount:1},{skill:"skill-creator",status:"available",sourceCount:1}],generatedControlPlane:["reference/authoring-lanes.json","reference/resolved-skills.json","reference/composition-report.md","reference/decision-points.md","scripts/comet-plan.mjs"],requiredConfirmations:[{label:"Resolved Skill choices",required:!0,confirmed:!0},{label:"Authoring lanes complete",required:!0,confirmed:!0},{label:"Run quick eval",required:!0,confirmed:!0}],callChain:["brainstorming","writing-plans","writing-skills","skill-review","install-preview"],distribution:{readiness:"needs review approval",plannedFiles:16,executables:2,platforms:[{platform:"Codex",status:"planned"},{platform:"Claude Code",status:"planned"}]}},{name:"upgrade-review-comments-skill",status:"draft",currentStep:"needs-eval",mode:"optimize",goal:"升级现有 Skill:为 PR 评审意见处理加入“证据优先”和本地验证检查。",engineMode:"deterministic",runnerMode:"change",reusedSkills:[{skill:"receiving-code-review",status:"available",sourceCount:2},{skill:"systematic-debugging",status:"available",sourceCount:2},{skill:"github",status:"ambiguous",sourceCount:3}],generatedControlPlane:["bundle.yaml","reference/resolved-skills.json","comet/checks.yaml"],requiredConfirmations:[{label:"Resolve ambiguous GitHub Skill",required:!0,confirmed:!1},{label:"Generate control plane",required:!0,confirmed:!1},{label:"Run quick eval",required:!0,confirmed:!1}],callChain:["receiving-code-review","systematic-debugging","verification-before-completion"],distribution:{readiness:"blocked by candidate ambiguity",plannedFiles:10,executables:1,platforms:[{platform:"Codex",status:"waiting"}]}}]},eval:{summary:{totalResults:3,passedResults:2,entryPassRate:.91,tokenCount:18640,durationMs:258e3},results:[{name:"customize-comet-release-checks",provider:"comet-eval",level:"full",draftHash:"a".repeat(64),evalManifestHash:"b".repeat(64),tasks:["route-conformance","control-plane","publish-readiness"],treatments:["customize-comet-release-checks"],passAtK:{1:1},weightedScore:{overall:.93},instabilityGap:{overall:.02},failures:[],reports:["eval-report.html"],passed:!0,summary:"Generated package passed route conformance, control-plane validation, and publish readiness.",entries:[{id:"route-conformance",passed:!0,passRate:.96,evidence:["workflow-protocol.json","route-conformance.json"]},{id:"control-plane",passed:!0,passRate:.92,evidence:["comet/eval.yaml","scripts/comet-check.mjs"]},{id:"publish-readiness",passed:!0,passRate:.88,evidence:["reference/skill-review.md","review-summary.json"]}],bundle:{compilePassed:!0,safetyPassed:!0,evidence:["compile.json","hook-disclosure.json"]},benchmark:{cases:18,baselinePassRate:.61,withSkillPassRate:.89,variance:.04,tokenCount:9400,durationMs:142e3}},{name:"create-skill-maker-review-flow",provider:"comet-eval",level:"quick",draftHash:"c".repeat(64),evalManifestHash:"d".repeat(64),tasks:["authoring-lanes","entry-smoke","install-preview"],treatments:["create-skill-maker-review-flow"],passAtK:{1:1},weightedScore:{overall:.9},instabilityGap:{overall:.03},failures:[],reports:["quick-eval-report.html"],passed:!0,summary:"Quick eval passed authoring-lane coverage, entry smoke, and install-preview checks.",entries:[{id:"authoring-lanes",passed:!0,passRate:.9,evidence:["authoring-lanes.json","skill-review.md"]},{id:"install-preview",passed:!0,passRate:.86,evidence:["install-preview.json"]}],bundle:{compilePassed:!0,safetyPassed:!0,evidence:["compile.json","safety.json"]},benchmark:{cases:10,baselinePassRate:.54,withSkillPassRate:.82,tokenCount:5140,durationMs:72e3}},{name:"upgrade-review-comments-skill",provider:"comet-eval",level:"quick",draftHash:"e".repeat(64),evalManifestHash:"f".repeat(64),tasks:["review-comment-intake","candidate-resolution","hook-disclosure"],treatments:["upgrade-review-comments-skill"],passAtK:{1:0},weightedScore:{overall:.58},instabilityGap:{overall:.12},failures:[{task:"candidate-resolution",treatment:"upgrade-review-comments-skill",reason:"GitHub Skill candidate is still ambiguous."},{task:"hook-disclosure",treatment:"upgrade-review-comments-skill",reason:"Hook executable disclosure is missing."}],reports:["quick-eval-report.html"],passed:!1,summary:"Entry smoke found one unresolved GitHub Skill candidate and a missing hook disclosure.",entries:[{id:"review-comment-intake",passed:!0,passRate:.84,evidence:["review-thread-smoke.json"]},{id:"github-routing",passed:!1,passRate:.58,evidence:["ambiguous-target.json"]}],bundle:{compilePassed:!0,safetyPassed:!1,evidence:["compile.json","hook-review-needed.json"]},benchmark:{cases:8,baselinePassRate:.5,withSkillPassRate:.63,tokenCount:4100,durationMs:44e3}}]}};export{l as DEMO_SKILL_VISUALS,i as DEMO_SNAPSHOT};
@@ -1,4 +1,4 @@
1
- import{s as k,g as I,q as R,p as E,a as F,b as _,_ as l,H as D,y as z,E as f,C,F as G,l as P,I as W,e as B}from"./mermaid.core-qS9XvtaK.js";import{p as H}from"./chunk-4BX2VUAB-CS-iGcFz.js";import{p as V}from"./cynefin-VYW2F7L2-C-R1HXDv.js";import"./index-DtLUOcAW.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:x},m=structuredClone(w),j=G.radar,q=l(()=>f({...j,...C().radar}),"getConfig"),b=l(()=>m.axes,"getAxes"),N=l(()=>m.curves,"getCurves"),U=l(()=>m.options,"getOptions"),X=l(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=l(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=l(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule}},"setOptions"),K=l(()=>{z(),m=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:_,getAccTitle:F,setDiagramTitle:E,getDiagramTitle:R,getAccDescription:I,setAccDescription:k},Q=l(a=>{H(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:l(async a=>{const t=await V("radar",a);P.debug(t),Q(t)},"parse")},et=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),p=D(t),u=at(p,c),g=n.max??Math.max(...i.map(y=>Math.max(...y.entries))),h=n.min,v=Math.min(c.width,c.height)/2;rt(u,o,v,n.ticks,n.graticule),st(u,o,v,c),M(u,o,i,h,g,n.graticule,c),T(u,i,n.showLegend,c),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),at=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return B(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o<r;o++){const i=e*(o+1)/r;a.append("circle").attr("r",i).attr("class","radarGraticule")}else if(s==="polygon"){const o=t.length;for(let i=0;i<r;i++){const n=e*(i+1)/r,c=t.map((d,p)=>{const u=2*p*Math.PI/o-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),st=l((a,t,e,r)=>{const s=t.length;for(let o=0;o<s;o++){const i=t[o].label,n=2*o*Math.PI/s-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(n)).attr("y2",e*r.axisScaleFactor*Math.sin(n)).attr("class","radarAxisLine"),a.append("text").text(i).attr("x",e*r.axisLabelFactor*Math.cos(n)).attr("y",e*r.axisLabelFactor*Math.sin(n)).attr("class","radarAxisLabel")}},"drawAxes");function M(a,t,e,r,s,o,i){const n=t.length,c=Math.min(i.width,i.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,y=A(g,r,s,c),S=y*Math.cos(v),O=y*Math.sin(v);return{x:S,y:O}});o==="circle"?a.append("path").attr("d",L(u,i.curveTension)).attr("class",`radarCurve-${p}`):o==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const o=a[(s-1+e)%e],i=a[s],n=a[(s+1)%e],c=a[(s+2)%e],d={x:i.x+(n.x-o.x)*t,y:i.y+(n.y-o.y)*t},p={x:n.x-(c.x-i.x)*t,y:n.y-(c.y-i.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}l(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,i=20;t.forEach((n,c)=>{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var nt={draw:et},ot=l((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
1
+ import{s as k,g as I,q as R,p as E,a as F,b as _,_ as l,H as D,y as z,E as f,C,F as G,l as P,I as W,e as B}from"./mermaid.core-CkNdB471.js";import{p as H}from"./chunk-4BX2VUAB-vWyemRBr.js";import{p as V}from"./cynefin-VYW2F7L2-DN4emAQv.js";import"./index-CjE9mHGb.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:x},m=structuredClone(w),j=G.radar,q=l(()=>f({...j,...C().radar}),"getConfig"),b=l(()=>m.axes,"getAxes"),N=l(()=>m.curves,"getCurves"),U=l(()=>m.options,"getOptions"),X=l(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=l(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=l(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule}},"setOptions"),K=l(()=>{z(),m=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:_,getAccTitle:F,setDiagramTitle:E,getDiagramTitle:R,getAccDescription:I,setAccDescription:k},Q=l(a=>{H(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:l(async a=>{const t=await V("radar",a);P.debug(t),Q(t)},"parse")},et=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),p=D(t),u=at(p,c),g=n.max??Math.max(...i.map(y=>Math.max(...y.entries))),h=n.min,v=Math.min(c.width,c.height)/2;rt(u,o,v,n.ticks,n.graticule),st(u,o,v,c),M(u,o,i,h,g,n.graticule,c),T(u,i,n.showLegend,c),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),at=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return B(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o<r;o++){const i=e*(o+1)/r;a.append("circle").attr("r",i).attr("class","radarGraticule")}else if(s==="polygon"){const o=t.length;for(let i=0;i<r;i++){const n=e*(i+1)/r,c=t.map((d,p)=>{const u=2*p*Math.PI/o-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),st=l((a,t,e,r)=>{const s=t.length;for(let o=0;o<s;o++){const i=t[o].label,n=2*o*Math.PI/s-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(n)).attr("y2",e*r.axisScaleFactor*Math.sin(n)).attr("class","radarAxisLine"),a.append("text").text(i).attr("x",e*r.axisLabelFactor*Math.cos(n)).attr("y",e*r.axisLabelFactor*Math.sin(n)).attr("class","radarAxisLabel")}},"drawAxes");function M(a,t,e,r,s,o,i){const n=t.length,c=Math.min(i.width,i.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,y=A(g,r,s,c),S=y*Math.cos(v),O=y*Math.sin(v);return{x:S,y:O}});o==="circle"?a.append("path").attr("d",L(u,i.curveTension)).attr("class",`radarCurve-${p}`):o==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const o=a[(s-1+e)%e],i=a[s],n=a[(s+1)%e],c=a[(s+2)%e],d={x:i.x+(n.x-o.x)*t,y:i.y+(n.y-o.y)*t},p={x:n.x-(c.x-i.x)*t,y:n.y-(c.y-i.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}l(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,i=20;t.forEach((n,c)=>{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var nt={draw:et},ot=l((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
2
2
  .radarCurve-${r} {
3
3
  color: ${s};
4
4
  fill: ${s};
@@ -1,4 +1,4 @@
1
- import{p as x,b as C,s as f,q as y,g as B,a as T,_ as s,E as u,l as k,H as V,e as _,C as N,y as S,F as D}from"./mermaid.core-qS9XvtaK.js";import{p as $}from"./chunk-4BX2VUAB-CS-iGcFz.js";import{I as A}from"./chunk-QZHKN3VN-DMJJyQnw.js";import{p as H}from"./cynefin-VYW2F7L2-C-R1HXDv.js";import"./index-DtLUOcAW.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var d=new A(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),I=s(()=>{d.reset(),S()},"clear"),X=s(()=>d.records.stack[0],"getRoot"),z=s(()=>d.records.cnt,"getCount"),E=D.treeView,L=s(()=>u(E,N().treeView),"getConfig"),R=s((e,t)=>{for(;e<=d.records.stack[d.records.stack.length-1].level;)d.records.stack.pop();const a={id:d.records.cnt++,level:e,name:t,children:[]};d.records.stack[d.records.stack.length-1].children.push(a),d.records.stack.push(a)},"addNode"),W={clear:I,addNode:R,getRoot:X,getCount:z,getConfig:L,getAccTitle:T,getAccDescription:B,getDiagramTitle:y,setAccDescription:f,setAccTitle:C,setDiagramTitle:x},w=W,F=s(e=>{$(e,w),e.nodes.map(t=>w.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),M={parse:s(async e=>{const t=await H("treeView",e);k.debug(t),F(t)},"parse")},Y=s((e,t,a,n,o)=>{const c=n.append("text").text(a.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:p,width:r}=c.node().getBBox(),l=p+o.paddingY*2,i=r+o.paddingX*2;c.attr("x",e+o.paddingX),c.attr("y",t+l/2),a.BBox={x:e,y:t,width:i,height:l}},"positionLabel"),b=s((e,t,a,n,o,c)=>e.append("line").attr("x1",t).attr("y1",a).attr("x2",n).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),q=s((e,t,a)=>{let n=0,o=0;const c=s((r,l,i,h)=>{const v=h*(i.rowIndent+i.paddingX);Y(v,n,l,r,i);const{height:g,width:m}=l.BBox;b(r,v-i.rowIndent,n+g/2,v,n+g/2,i.lineThickness),o=Math.max(o,v+m),n+=g},"drawNode"),p=s((r,l=0)=>{c(e,r,a,l),r.children.forEach(g=>{p(g,l+1)});const{x:i,y:h,height:v}=r.BBox;if(r.children.length){const{y:g,height:m}=r.children[r.children.length-1].BBox;b(e,i+a.paddingX,h+v,i+a.paddingX,g+m/2+a.lineThickness/2,a.lineThickness)}},"processNode");return p(t),{totalHeight:n,totalWidth:o}},"drawTree"),j=s((e,t,a,n)=>{k.debug(`Rendering treeView diagram
1
+ import{p as x,b as C,s as f,q as y,g as B,a as T,_ as s,E as u,l as k,H as V,e as _,C as N,y as S,F as D}from"./mermaid.core-CkNdB471.js";import{p as $}from"./chunk-4BX2VUAB-vWyemRBr.js";import{I as A}from"./chunk-QZHKN3VN-C9rhF6Hm.js";import{p as H}from"./cynefin-VYW2F7L2-DN4emAQv.js";import"./index-CjE9mHGb.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var d=new A(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),I=s(()=>{d.reset(),S()},"clear"),X=s(()=>d.records.stack[0],"getRoot"),z=s(()=>d.records.cnt,"getCount"),E=D.treeView,L=s(()=>u(E,N().treeView),"getConfig"),R=s((e,t)=>{for(;e<=d.records.stack[d.records.stack.length-1].level;)d.records.stack.pop();const a={id:d.records.cnt++,level:e,name:t,children:[]};d.records.stack[d.records.stack.length-1].children.push(a),d.records.stack.push(a)},"addNode"),W={clear:I,addNode:R,getRoot:X,getCount:z,getConfig:L,getAccTitle:T,getAccDescription:B,getDiagramTitle:y,setAccDescription:f,setAccTitle:C,setDiagramTitle:x},w=W,F=s(e=>{$(e,w),e.nodes.map(t=>w.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),M={parse:s(async e=>{const t=await H("treeView",e);k.debug(t),F(t)},"parse")},Y=s((e,t,a,n,o)=>{const c=n.append("text").text(a.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:p,width:r}=c.node().getBBox(),l=p+o.paddingY*2,i=r+o.paddingX*2;c.attr("x",e+o.paddingX),c.attr("y",t+l/2),a.BBox={x:e,y:t,width:i,height:l}},"positionLabel"),b=s((e,t,a,n,o,c)=>e.append("line").attr("x1",t).attr("y1",a).attr("x2",n).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),q=s((e,t,a)=>{let n=0,o=0;const c=s((r,l,i,h)=>{const v=h*(i.rowIndent+i.paddingX);Y(v,n,l,r,i);const{height:g,width:m}=l.BBox;b(r,v-i.rowIndent,n+g/2,v,n+g/2,i.lineThickness),o=Math.max(o,v+m),n+=g},"drawNode"),p=s((r,l=0)=>{c(e,r,a,l),r.children.forEach(g=>{p(g,l+1)});const{x:i,y:h,height:v}=r.BBox;if(r.children.length){const{y:g,height:m}=r.children[r.children.length-1].BBox;b(e,i+a.paddingX,h+v,i+a.paddingX,g+m/2+a.lineThickness/2,a.lineThickness)}},"processNode");return p(t),{totalHeight:n,totalWidth:o}},"drawTree"),j=s((e,t,a,n)=>{k.debug(`Rendering treeView diagram
2
2
  `+e);const o=n.db,c=o.getRoot(),p=o.getConfig(),r=V(t),l=r.append("g");l.attr("class","tree-view");const{totalHeight:i,totalWidth:h}=q(l,c,p);r.attr("viewBox",`-${p.lineThickness/2} 0 ${h} ${i}`),_(r,i,h,p.useMaxWidth)},"draw"),G={draw:j},J=G,K={labelFontSize:"16px",labelColor:"black",lineColor:"black"},O=s(({treeView:e})=>{const{labelFontSize:t,labelColor:a,lineColor:n}=u(K,e);return`
3
3
  .treeView-node-label {
4
4
  font-size: ${t};
@@ -1,3 +1,3 @@
1
- import{p as re}from"./chunk-4BX2VUAB-CS-iGcFz.js";import{q as oe,p as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as D,d as ue,D as xe,y as fe,E as ge,C as M,F as he,i as y,w as P,aj as pe}from"./mermaid.core-qS9XvtaK.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-C-R1HXDv.js";import"./index-DtLUOcAW.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var T="position frame",$="frame positioned",S="position relation",C="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){N(),fe()},"clear");function N(){B={}}o(N,"reset");var Se=he.eventmodeling,Fe=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=ke;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var ke={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${P(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" ","&nbsp;")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{
1
+ import{p as re}from"./chunk-4BX2VUAB-vWyemRBr.js";import{q as oe,p as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as D,d as ue,D as xe,y as fe,E as ge,C as M,F as he,i as y,w as P,aj as pe}from"./mermaid.core-CkNdB471.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-DN4emAQv.js";import"./index-CjE9mHGb.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var T="position frame",$="frame positioned",S="position relation",C="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){N(),fe()},"clear");function N(){B={}}o(N,"reset");var Se=he.eventmodeling,Fe=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=ke;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var ke={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${P(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" ","&nbsp;")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{
2
2
  `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" ","&nbsp;"),r+="<br/>")}const m=r!==void 0;m&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(G,"calculateTextProps");function V(e,n){const t=n,i=L(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:$,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(V,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function Y(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,d,r),m=c+l.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p<f.length;p++){const w=f[p],R=f[p-1];w.y=R.y+R.height+s.swimlaneGap}return h}o(Y,"evolveFramePositioned");function z(e,n){return e===0&&n.sourceFrames.length===0}o(z,"isFirstFrame");function K(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}o(K,"hasSourceFrame");function F(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(F,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(ve(t.frame)||z(t.index,t.frame))return[];const i=F(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=F(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:C,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Q(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Q,"evolveRelationPositioned");var Me={[T]:V,[S]:J},Be={[$]:Y,[C]:Q};function Z(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Z,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Z(e,n);return ee(e,t)}o(v,"dispatch");var k={getConfig:Fe,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:le,setAccDescription:de,setDiagramTitle:se,getDiagramTitle:oe,setAst:I,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),k.setAst(n),re(n,k)},"parse")},Ae=D(),Re=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ne(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var De=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+`
3
3
  `,"id:",n,t),!Re)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=D(),l=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(l,m.maxR,c,r)),m.boxes.forEach(te(l,c)),m.relations.forEach(ie(l,c,x,r)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),xe(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),Te={draw:De},$e=o(e=>"","getStyles"),Ce=$e,_e={parser:Ee,db:k,renderer:Te,styles:Ce};export{_e as diagram};
@@ -1,4 +1,4 @@
1
- import{_ as b,E as m,H as B,e as C,l as w,b as S,a as D,p as T,q as E,g as F,s as P,C as z,F as A,y as W}from"./mermaid.core-qS9XvtaK.js";import{p as _}from"./chunk-4BX2VUAB-CS-iGcFz.js";import{p as N}from"./cynefin-VYW2F7L2-C-R1HXDv.js";import"./index-DtLUOcAW.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var L=A.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=F,this.setAccDescription=P}getConfig(){const t=m({...L,...z().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,Y=b((e,t)=>{_(e,t);let r=-1,o=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,w.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&t.getPacket().length<M;){const[p,s]=H({start:a,end:i,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(t.pushWord(o),o=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}t.pushWord(o)},"populate"),H=b((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const o=t*r-1,n=t*r;return[{start:e.start,end:o,label:e.label,bits:o-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{const t=await N("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,r)},"parse")},I=b((e,t,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=B(t);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())O(f,$,y,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((e,t,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=r*(o+l)+l;for(const s of t){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:e}={})=>{const t=m(q,e);return`
1
+ import{_ as b,E as m,H as B,e as C,l as w,b as S,a as D,p as T,q as E,g as F,s as P,C as z,F as A,y as W}from"./mermaid.core-CkNdB471.js";import{p as _}from"./chunk-4BX2VUAB-vWyemRBr.js";import{p as N}from"./cynefin-VYW2F7L2-DN4emAQv.js";import"./index-CjE9mHGb.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var L=A.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=E,this.getAccDescription=F,this.setAccDescription=P}getConfig(){const t=m({...L,...z().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,Y=b((e,t)=>{_(e,t);let r=-1,o=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,w.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&t.getPacket().length<M;){const[p,s]=H({start:a,end:i,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(t.pushWord(o),o=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}t.pushWord(o)},"populate"),H=b((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const o=t*r-1,n=t*r;return[{start:e.start,end:o,label:e.label,bits:o-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{const t=await N("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,r)},"parse")},I=b((e,t,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=B(t);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())O(f,$,y,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((e,t,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=r*(o+l)+l;for(const s of t){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:e}={})=>{const t=m(q,e);return`
2
2
  .packetByte {
3
3
  font-size: ${t.byteFontSize};
4
4
  }
@@ -1,4 +1,4 @@
1
- import{_ as w,I as he,C as ee,E as K,H as ue,e as pe,l as Q,bb as P,d as j,b as fe,a as me,p as ge,q as ye,g as Se,s as ve,F as xe,bc as be,y as we}from"./mermaid.core-qS9XvtaK.js";import{s as Ce}from"./chunk-2J33WTMH-CBGlUx4_.js";import{p as Te}from"./chunk-4BX2VUAB-CS-iGcFz.js";import{p as Le}from"./cynefin-VYW2F7L2-C-R1HXDv.js";import{b as O}from"./defaultLocale-DX6XiGOO.js";import{o as J}from"./ordinal-Cboi1Yqb.js";import"./index-DtLUOcAW.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";import"./init-Gi6I4Gst.js";function $e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function Ae(){return this.eachAfter($e)}function Fe(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ne(t,a){for(var l=this,n=[l],r,i,d=-1;l=n.pop();)if(t.call(a,l,++d,this),r=l.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function Me(t,a){for(var l=this,n=[l],r=[],i,d,h,m=-1;l=n.pop();)if(r.push(l),i=l.children)for(d=0,h=i.length;d<h;++d)n.push(i[d]);for(;l=r.pop();)t.call(a,l,++m,this);return this}function Ve(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function _e(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function ke(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=De(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function De(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function Pe(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Be(){return Array.from(this)}function Ee(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Re(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*We(){var t=this,a,l=[t],n,r,i;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)l.push(n[r]);while(l.length)}function te(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Oe)):a===void 0&&(a=Ie);for(var l=new U(t),n,r=[l],i,d,h,m;n=r.pop();)if((d=a(n.data))&&(m=(d=Array.from(d)).length))for(n.children=d,h=m-1;h>=0;--h)r.push(i=d[h]=new U(d[h])),i.parent=n,i.depth=n.depth+1;return l.eachBefore(Ge)}function He(){return te(this).eachBefore(qe)}function Ie(t){return t.children}function Oe(t){return Array.isArray(t)?t[1]:null}function qe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ge(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function U(t){this.data=t,this.depth=this.height=0,this.parent=null}U.prototype=te.prototype={constructor:U,count:Ae,each:Fe,eachAfter:Me,eachBefore:Ne,find:Ve,sum:_e,sort:ke,path:ze,ancestors:Pe,descendants:Be,leaves:Ee,links:Re,copy:He,[Symbol.iterator]:We};function Xe(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function Ye(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,r){for(var i=t.children,d,h=-1,m=i.length,c=t.value&&(n-a)/t.value;++h<m;)d=i[h],d.y0=l,d.y1=r,d.x0=a,d.x1=a+=d.value*c}function Ue(t,a,l,n,r){for(var i=t.children,d,h=-1,m=i.length,c=t.value&&(r-l)/t.value;++h<m;)d=i[h],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var Ze=(1+Math.sqrt(5))/2;function Je(t,a,l,n,r,i){for(var d=[],h=a.children,m,c,u=0,b=0,s=h.length,x,S,v=a.value,p,g,M,N,z,R,V;u<s;){x=r-l,S=i-n;do p=h[b++].value;while(!p&&b<s);for(g=M=p,R=Math.max(S/x,x/S)/(v*t),V=p*p*R,z=Math.max(M/V,V/g);b<s;++b){if(p+=c=h[b].value,c<g&&(g=c),c>M&&(M=c),V=p*p*R,N=Math.max(M/V,V/g),N>z){p-=c;break}z=N}d.push(m={value:p,dice:x<S,children:h.slice(u,b)}),m.dice?je(m,l,n,r,v?n+=S*p/v:i):Ue(m,l,n,v?l+=x*p/v:r,i),v-=p,u=b}return d}const Ke=(function t(a){function l(n,r,i,d,h){Je(a,n,r,i,d,h)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(Ze);function Qe(){var t=Ke,a=!1,l=1,n=1,r=[0],i=q,d=q,h=q,m=q,c=q;function u(s){return s.x0=s.y0=0,s.x1=l,s.y1=n,s.eachBefore(b),r=[0],a&&s.eachBefore(Ye),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,p=s.x1-x,g=s.y1-x;p<S&&(S=p=(S+p)/2),g<v&&(v=g=(v+g)/2),s.x0=S,s.y0=v,s.x1=p,s.y1=g,s.children&&(x=r[s.depth+1]=i(s)/2,S+=c(s)-x,v+=d(s)-x,p-=h(s)-x,g-=m(s)-x,p<S&&(S=p=(S+p)/2),g<v&&(v=g=(v+g)/2),t(s,S,v,p,g))}return u.round=function(s){return arguments.length?(a=!!s,u):a},u.size=function(s){return arguments.length?(l=+s[0],n=+s[1],u):[l,n]},u.tile=function(s){return arguments.length?(t=Xe(s),u):t},u.padding=function(s){return arguments.length?u.paddingInner(s).paddingOuter(s):u.paddingInner()},u.paddingInner=function(s){return arguments.length?(i=typeof s=="function"?s:G(+s),u):i},u.paddingOuter=function(s){return arguments.length?u.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):u.paddingTop()},u.paddingTop=function(s){return arguments.length?(d=typeof s=="function"?s:G(+s),u):d},u.paddingRight=function(s){return arguments.length?(h=typeof s=="function"?s:G(+s),u):h},u.paddingBottom=function(s){return arguments.length?(m=typeof s=="function"?s:G(+s),u):m},u.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:G(+s),u):c},u}var E,ne=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=fe,this.getAccTitle=me,this.setDiagramTitle=ge,this.getDiagramTitle=ye,this.getAccDescription=Se,this.setAccDescription=ve}getNodes(){return this.nodes}getConfig(){const a=xe,l=ee();return K({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(i=>{be(i)&&(n?.textStyles?n.textStyles.push(i):n.textStyles=[i]),n?.styles?n.styles.push(i):n.styles=[i]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){we(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(E,"TreeMapDB"),E);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n?.classSelector,n?.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const i=l[l.length-1].node;i.children?i.children.push(r):i.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(le,"buildHierarchy");var et=w((t,a)=>{Te(t,a);const l=[];for(const i of t.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of t.TreemapRows??[]){const d=i.item;if(!d)continue;const h=i.indent?parseInt(i.indent):0,m=tt(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c:void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};l.push(b)}const n=le(l),r=w((i,d)=>{for(const h of i)a.addNode(h,d),h.children&&h.children.length>0&&r(h.children,d+1)},"addNodesRecursively");r(n,0)},"populate"),tt=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{try{const l=await Le("treemap",t);Q.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");et(l,n)}catch(a){throw Q.error("Error parsing treemap:",a),a}},"parse")},at=10,B=10,X=25,nt=w((t,a,l,n)=>{const r=n.db,i=r.getConfig(),d=i.padding??at,h=r.getDiagramTitle(),m=r.getRoot(),{themeVariables:c}=ee();if(!m)return;const u=h?30:0,b=ue(a),s=i.nodeWidth?i.nodeWidth*B:960,x=i.nodeHeight?i.nodeHeight*B:500,S=s,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),pe(b,v,S,i.useMaxWidth);let p;try{const e=i.valueFormat||",";if(e==="$0,0")p=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);p=w(f=>"$"+O(o||"")(f),"valueFormat")}else p=O(e)}catch(e){Q.error("Error creating format function:",e),p=O(",")}const g=J().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=J().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),N=J().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const z=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=te(m).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),ae=Qe().size([s,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(R),se=ae.descendants().filter(e=>e.children&&e.children.length>0),W=z.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>g(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>M(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=P({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=j(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,L=6;let $;i.showValues!==!1&&e.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=o.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){o.text("..."),y.getComputedTextLength()>A&&o.text("");break}if(o.text(T+"..."),y.getComputedTextLength()<=A)break}}}),i.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const ie=ae.leaves(),Y=z.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+N(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=j(this),f=e.x1-e.x0,C=e.y1-e.y0,L=o.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){o.style("display","none");return}let y=parseInt(o.style("font-size"),10);const _=8,F=28,T=.6,k=6,H=2;for(;L.getComputedTextLength()>D&&y>_;)y--,o.style("font-size",`${y}px`);let I=Math.max(k,Math.min(F,Math.round(y*T))),Z=y+H+I;for(;Z>A&&y>_&&(y--,I=Math.max(k,Math.min(F,Math.round(y*T))),!(I<k&&y===_));)o.style("font-size",`${y}px`),Z=y+H+I;o.style("font-size",`${y}px`),(L.getComputedTextLength()>D||y<_||A<y)&&o.style("display","none")}),i.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+N(o.data.name)+";",C=P({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?p(o.value):"").each(function(o){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const k=(o.y1-o.y0)/2+$/2+_;f.attr("y",k);const H=o.x1-o.x0,ce=o.y1-o.y0-4,de=H-8;f.node().getComputedTextLength()>de||k+F>ce||F<y?f.style("display","none"):f.style("display",null)});const oe=i.diagramPadding??8;Ce(b,oe,"flowchart",i?.useMaxWidth||!1)},"draw"),lt=w(function(t,a){return a.db.getClasses()},"getClasses"),rt={draw:nt,getClasses:lt},st={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},it=w(({treemap:t}={})=>{const a=he(),l=ee(),n=K(a,l.themeVariables),r=K(st,t),i=r.titleColor??n.titleColor,d=r.labelColor??n.textColor,h=r.valueColor??n.textColor;return`
1
+ import{_ as w,I as he,C as ee,E as K,H as ue,e as pe,l as Q,bb as P,d as j,b as fe,a as me,p as ge,q as ye,g as Se,s as ve,F as xe,bc as be,y as we}from"./mermaid.core-CkNdB471.js";import{s as Ce}from"./chunk-2J33WTMH-CBNfW-Dr.js";import{p as Te}from"./chunk-4BX2VUAB-vWyemRBr.js";import{p as Le}from"./cynefin-VYW2F7L2-DN4emAQv.js";import{b as O}from"./defaultLocale-DX6XiGOO.js";import{o as J}from"./ordinal-Cboi1Yqb.js";import"./index-CjE9mHGb.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";import"./init-Gi6I4Gst.js";function $e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function Ae(){return this.eachAfter($e)}function Fe(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ne(t,a){for(var l=this,n=[l],r,i,d=-1;l=n.pop();)if(t.call(a,l,++d,this),r=l.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function Me(t,a){for(var l=this,n=[l],r=[],i,d,h,m=-1;l=n.pop();)if(r.push(l),i=l.children)for(d=0,h=i.length;d<h;++d)n.push(i[d]);for(;l=r.pop();)t.call(a,l,++m,this);return this}function Ve(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function _e(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function ke(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=De(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function De(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function Pe(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Be(){return Array.from(this)}function Ee(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Re(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*We(){var t=this,a,l=[t],n,r,i;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)l.push(n[r]);while(l.length)}function te(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Oe)):a===void 0&&(a=Ie);for(var l=new U(t),n,r=[l],i,d,h,m;n=r.pop();)if((d=a(n.data))&&(m=(d=Array.from(d)).length))for(n.children=d,h=m-1;h>=0;--h)r.push(i=d[h]=new U(d[h])),i.parent=n,i.depth=n.depth+1;return l.eachBefore(Ge)}function He(){return te(this).eachBefore(qe)}function Ie(t){return t.children}function Oe(t){return Array.isArray(t)?t[1]:null}function qe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ge(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function U(t){this.data=t,this.depth=this.height=0,this.parent=null}U.prototype=te.prototype={constructor:U,count:Ae,each:Fe,eachAfter:Me,eachBefore:Ne,find:Ve,sum:_e,sort:ke,path:ze,ancestors:Pe,descendants:Be,leaves:Ee,links:Re,copy:He,[Symbol.iterator]:We};function Xe(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function Ye(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,r){for(var i=t.children,d,h=-1,m=i.length,c=t.value&&(n-a)/t.value;++h<m;)d=i[h],d.y0=l,d.y1=r,d.x0=a,d.x1=a+=d.value*c}function Ue(t,a,l,n,r){for(var i=t.children,d,h=-1,m=i.length,c=t.value&&(r-l)/t.value;++h<m;)d=i[h],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var Ze=(1+Math.sqrt(5))/2;function Je(t,a,l,n,r,i){for(var d=[],h=a.children,m,c,u=0,b=0,s=h.length,x,S,v=a.value,p,g,M,N,z,R,V;u<s;){x=r-l,S=i-n;do p=h[b++].value;while(!p&&b<s);for(g=M=p,R=Math.max(S/x,x/S)/(v*t),V=p*p*R,z=Math.max(M/V,V/g);b<s;++b){if(p+=c=h[b].value,c<g&&(g=c),c>M&&(M=c),V=p*p*R,N=Math.max(M/V,V/g),N>z){p-=c;break}z=N}d.push(m={value:p,dice:x<S,children:h.slice(u,b)}),m.dice?je(m,l,n,r,v?n+=S*p/v:i):Ue(m,l,n,v?l+=x*p/v:r,i),v-=p,u=b}return d}const Ke=(function t(a){function l(n,r,i,d,h){Je(a,n,r,i,d,h)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(Ze);function Qe(){var t=Ke,a=!1,l=1,n=1,r=[0],i=q,d=q,h=q,m=q,c=q;function u(s){return s.x0=s.y0=0,s.x1=l,s.y1=n,s.eachBefore(b),r=[0],a&&s.eachBefore(Ye),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,p=s.x1-x,g=s.y1-x;p<S&&(S=p=(S+p)/2),g<v&&(v=g=(v+g)/2),s.x0=S,s.y0=v,s.x1=p,s.y1=g,s.children&&(x=r[s.depth+1]=i(s)/2,S+=c(s)-x,v+=d(s)-x,p-=h(s)-x,g-=m(s)-x,p<S&&(S=p=(S+p)/2),g<v&&(v=g=(v+g)/2),t(s,S,v,p,g))}return u.round=function(s){return arguments.length?(a=!!s,u):a},u.size=function(s){return arguments.length?(l=+s[0],n=+s[1],u):[l,n]},u.tile=function(s){return arguments.length?(t=Xe(s),u):t},u.padding=function(s){return arguments.length?u.paddingInner(s).paddingOuter(s):u.paddingInner()},u.paddingInner=function(s){return arguments.length?(i=typeof s=="function"?s:G(+s),u):i},u.paddingOuter=function(s){return arguments.length?u.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):u.paddingTop()},u.paddingTop=function(s){return arguments.length?(d=typeof s=="function"?s:G(+s),u):d},u.paddingRight=function(s){return arguments.length?(h=typeof s=="function"?s:G(+s),u):h},u.paddingBottom=function(s){return arguments.length?(m=typeof s=="function"?s:G(+s),u):m},u.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:G(+s),u):c},u}var E,ne=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=fe,this.getAccTitle=me,this.setDiagramTitle=ge,this.getDiagramTitle=ye,this.getAccDescription=Se,this.setAccDescription=ve}getNodes(){return this.nodes}getConfig(){const a=xe,l=ee();return K({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(i=>{be(i)&&(n?.textStyles?n.textStyles.push(i):n.textStyles=[i]),n?.styles?n.styles.push(i):n.styles=[i]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){we(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(E,"TreeMapDB"),E);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n?.classSelector,n?.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const i=l[l.length-1].node;i.children?i.children.push(r):i.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(le,"buildHierarchy");var et=w((t,a)=>{Te(t,a);const l=[];for(const i of t.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of t.TreemapRows??[]){const d=i.item;if(!d)continue;const h=i.indent?parseInt(i.indent):0,m=tt(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c:void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};l.push(b)}const n=le(l),r=w((i,d)=>{for(const h of i)a.addNode(h,d),h.children&&h.children.length>0&&r(h.children,d+1)},"addNodesRecursively");r(n,0)},"populate"),tt=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{try{const l=await Le("treemap",t);Q.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");et(l,n)}catch(a){throw Q.error("Error parsing treemap:",a),a}},"parse")},at=10,B=10,X=25,nt=w((t,a,l,n)=>{const r=n.db,i=r.getConfig(),d=i.padding??at,h=r.getDiagramTitle(),m=r.getRoot(),{themeVariables:c}=ee();if(!m)return;const u=h?30:0,b=ue(a),s=i.nodeWidth?i.nodeWidth*B:960,x=i.nodeHeight?i.nodeHeight*B:500,S=s,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),pe(b,v,S,i.useMaxWidth);let p;try{const e=i.valueFormat||",";if(e==="$0,0")p=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);p=w(f=>"$"+O(o||"")(f),"valueFormat")}else p=O(e)}catch(e){Q.error("Error creating format function:",e),p=O(",")}const g=J().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=J().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),N=J().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const z=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=te(m).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),ae=Qe().size([s,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(R),se=ae.descendants().filter(e=>e.children&&e.children.length>0),W=z.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>g(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>M(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=P({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=j(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,L=6;let $;i.showValues!==!1&&e.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=o.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){o.text("..."),y.getComputedTextLength()>A&&o.text("");break}if(o.text(T+"..."),y.getComputedTextLength()<=A)break}}}),i.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+N(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const ie=ae.leaves(),Y=z.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+N(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=j(this),f=e.x1-e.x0,C=e.y1-e.y0,L=o.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){o.style("display","none");return}let y=parseInt(o.style("font-size"),10);const _=8,F=28,T=.6,k=6,H=2;for(;L.getComputedTextLength()>D&&y>_;)y--,o.style("font-size",`${y}px`);let I=Math.max(k,Math.min(F,Math.round(y*T))),Z=y+H+I;for(;Z>A&&y>_&&(y--,I=Math.max(k,Math.min(F,Math.round(y*T))),!(I<k&&y===_));)o.style("font-size",`${y}px`),Z=y+H+I;o.style("font-size",`${y}px`),(L.getComputedTextLength()>D||y<_||A<y)&&o.style("display","none")}),i.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+N(o.data.name)+";",C=P({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?p(o.value):"").each(function(o){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const k=(o.y1-o.y0)/2+$/2+_;f.attr("y",k);const H=o.x1-o.x0,ce=o.y1-o.y0-4,de=H-8;f.node().getComputedTextLength()>de||k+F>ce||F<y?f.style("display","none"):f.style("display",null)});const oe=i.diagramPadding??8;Ce(b,oe,"flowchart",i?.useMaxWidth||!1)},"draw"),lt=w(function(t,a){return a.db.getClasses()},"getClasses"),rt={draw:nt,getClasses:lt},st={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},it=w(({treemap:t}={})=>{const a=he(),l=ee(),n=K(a,l.themeVariables),r=K(st,t),i=r.titleColor??n.titleColor,d=r.labelColor??n.textColor,h=r.valueColor??n.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${r.sectionStrokeColor};
4
4
  stroke-width: ${r.sectionStrokeWidth};
@@ -1,4 +1,4 @@
1
- import{g as Bt}from"./chunk-55IACEB6-BUtCVJat.js";import{s as Ft}from"./chunk-2J33WTMH-CBGlUx4_.js";import{_ as d,b as Yt,a as Pt,s as zt,g as Gt,p as Kt,q as Ut,c as rt,l as V,y as Zt,x as jt,A as Wt,B as Qt,o as Xt,r as Ht,d as qt,u as Jt}from"./mermaid.core-qS9XvtaK.js";import{c as $t}from"./channel-kp6Ng2JJ.js";import"./index-DtLUOcAW.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var gt=(function(){var s=d(function(I,n,a,o){for(a=a||{},o=I.length;o--;a[I[o]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],c=[1,10],h=[1,11],l=[1,12],p=[1,13],y=[1,23],u=[1,24],k=[1,25],W=[1,26],Q=[1,27],T=[1,19],X=[1,28],B=[1,29],D=[1,20],R=[1,18],S=[1,21],C=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],O=[1,45],A=[1,46],Y=[1,55],P=[40,48,50,51,52,70,71],z=[1,66],G=[1,64],N=[1,61],K=[1,65],U=[1,67],H=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],bt=[65,66,67,68,69],mt=[1,84],kt=[1,83],Et=[1,81],Tt=[1,82],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],q=[1,92],J=[1,91],$=[1,90],Z=[19,58],Ot=[1,101],At=[1,100],ut=[19,58,60,62],dt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:d(function(n,a,o,r,f,t,j){var e=t.length-1;switch(f){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 67:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 79:case 80:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 66:case 69:this.$=t[e];break;case 68:t[e-2].push(t[e]),this.$=t[e-2];break;case 70:this.$=t[e].replace(/"/g,"");break;case 71:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:c,24:h,26:l,28:p,29:14,30:15,31:16,32:17,33:y,34:u,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:C},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:c,24:h,26:l,28:p,29:14,30:15,31:16,32:17,33:y,34:u,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:C},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:at,66:ct,67:ot,68:lt,69:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:A},{16:47,40:O,41:A},{16:48,40:O,41:A},s(i,[2,4]),{11:49,40:T,48:D,50:R,51:S,52:C},{16:50,40:O,41:A},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:T,48:D,50:R,51:S,52:C},{64:57,70:[1,58],71:[1,59]},s(P,[2,72]),s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:N,45:62,46:63,48:K,49:U},s(H,[2,37]),s(H,[2,38]),{16:68,40:O,41:A,42:N},{13:z,38:69,41:G,42:N,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{63:35,12:72,17:[1,73],42:N,65:at,66:ct,67:ot,68:lt,69:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:at,66:ct,67:ot,68:lt,69:ht},s(bt,[2,77]),s(bt,[2,78]),{6:mt,10:kt,39:80,42:Et,47:Tt},{40:[1,85],41:[1,86]},s(St,[2,43],{46:87,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:N}),{6:mt,10:kt,39:88,42:Et,47:Tt},{14:89,40:q,50:J,72:$},{16:93,40:O,41:A},{11:94,40:T,48:D,50:R,51:S,52:C},{18:95,19:[1,96],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:97,57:98,59:99,61:Ot,62:At}),s([19,58,61,62],[2,66]),s(i,[2,22],{15:[1,103],17:[1,102]}),s([40,48,50,51,52],[2,71]),s(i,[2,36]),{13:z,41:G,45:104,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(H,[2,39]),s(H,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,79]),s(i,[2,80]),s(i,[2,81]),{13:[1,105],42:N},{13:[1,107],15:[1,106]},{19:[1,108]},s(i,[2,15]),s(Z,[2,62],{57:109,60:[1,110],62:At}),s(Z,[2,63]),s(ut,[2,67]),s(Z,[2,70]),s(ut,[2,69]),{18:111,19:[1,112],53:53,54:54,58:Y},{16:113,40:O,41:A},s(St,[2,44],{46:87,13:z,41:G,48:K,49:U}),{14:114,40:q,50:J,72:$},{16:115,40:O,41:A},{14:116,40:q,50:J,72:$},s(i,[2,13]),s(Z,[2,64]),{59:117,61:Ot},{19:[1,118]},s(i,[2,20]),s(i,[2,23],{17:[1,119],42:N}),s(i,[2,11]),{13:[1,120],42:N},s(i,[2,10]),s(ut,[2,68]),s(i,[2,18]),{18:121,19:[1,122],53:53,54:54,58:Y},{14:123,40:q,50:J,72:$},{19:[1,124]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:d(function(n,a){if(a.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=a,o}},"parseError"),parse:d(function(n){var a=this,o=[0],r=[],f=[null],t=[],j=this.table,e="",et=0,Nt=0,Lt=2,It=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(x.yy[pt]=this.yy[pt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ft=_.yylloc;t.push(ft);var Vt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){o.length=o.length-2*b,f.length=f.length-b,t.length=t.length-b}d(Mt,"popStack");function Rt(){var b;return b=r.pop()||_.lex()||It,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}d(Rt,"lex");for(var g,v,m,yt,w={},st,E,Ct,it;;){if(v=o[o.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Rt()),m=j[v]&&j[v][g]),typeof m>"u"||!m.length||!m[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`:
1
+ import{g as Bt}from"./chunk-55IACEB6-H6haOo2C.js";import{s as Ft}from"./chunk-2J33WTMH-CBNfW-Dr.js";import{_ as d,b as Yt,a as Pt,s as zt,g as Gt,p as Kt,q as Ut,c as rt,l as V,y as Zt,x as jt,A as Wt,B as Qt,o as Xt,r as Ht,d as qt,u as Jt}from"./mermaid.core-CkNdB471.js";import{c as $t}from"./channel-B6AFly29.js";import"./index-CjE9mHGb.js";import"./_commonjsHelpers-CqkleIqs.js";import"./purify.es-VaSPOPhr.js";var gt=(function(){var s=d(function(I,n,a,o){for(a=a||{},o=I.length;o--;a[I[o]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],c=[1,10],h=[1,11],l=[1,12],p=[1,13],y=[1,23],u=[1,24],k=[1,25],W=[1,26],Q=[1,27],T=[1,19],X=[1,28],B=[1,29],D=[1,20],R=[1,18],S=[1,21],C=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],O=[1,45],A=[1,46],Y=[1,55],P=[40,48,50,51,52,70,71],z=[1,66],G=[1,64],N=[1,61],K=[1,65],U=[1,67],H=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],bt=[65,66,67,68,69],mt=[1,84],kt=[1,83],Et=[1,81],Tt=[1,82],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],q=[1,92],J=[1,91],$=[1,90],Z=[19,58],Ot=[1,101],At=[1,100],ut=[19,58,60,62],dt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:d(function(n,a,o,r,f,t,j){var e=t.length-1;switch(f){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 67:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 79:case 80:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 66:case 69:this.$=t[e];break;case 68:t[e-2].push(t[e]),this.$=t[e-2];break;case 70:this.$=t[e].replace(/"/g,"");break;case 71:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:c,24:h,26:l,28:p,29:14,30:15,31:16,32:17,33:y,34:u,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:C},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:c,24:h,26:l,28:p,29:14,30:15,31:16,32:17,33:y,34:u,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:C},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:at,66:ct,67:ot,68:lt,69:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:A},{16:47,40:O,41:A},{16:48,40:O,41:A},s(i,[2,4]),{11:49,40:T,48:D,50:R,51:S,52:C},{16:50,40:O,41:A},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:T,48:D,50:R,51:S,52:C},{64:57,70:[1,58],71:[1,59]},s(P,[2,72]),s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:N,45:62,46:63,48:K,49:U},s(H,[2,37]),s(H,[2,38]),{16:68,40:O,41:A,42:N},{13:z,38:69,41:G,42:N,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{63:35,12:72,17:[1,73],42:N,65:at,66:ct,67:ot,68:lt,69:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:at,66:ct,67:ot,68:lt,69:ht},s(bt,[2,77]),s(bt,[2,78]),{6:mt,10:kt,39:80,42:Et,47:Tt},{40:[1,85],41:[1,86]},s(St,[2,43],{46:87,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:N}),{6:mt,10:kt,39:88,42:Et,47:Tt},{14:89,40:q,50:J,72:$},{16:93,40:O,41:A},{11:94,40:T,48:D,50:R,51:S,52:C},{18:95,19:[1,96],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:97,57:98,59:99,61:Ot,62:At}),s([19,58,61,62],[2,66]),s(i,[2,22],{15:[1,103],17:[1,102]}),s([40,48,50,51,52],[2,71]),s(i,[2,36]),{13:z,41:G,45:104,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(H,[2,39]),s(H,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,79]),s(i,[2,80]),s(i,[2,81]),{13:[1,105],42:N},{13:[1,107],15:[1,106]},{19:[1,108]},s(i,[2,15]),s(Z,[2,62],{57:109,60:[1,110],62:At}),s(Z,[2,63]),s(ut,[2,67]),s(Z,[2,70]),s(ut,[2,69]),{18:111,19:[1,112],53:53,54:54,58:Y},{16:113,40:O,41:A},s(St,[2,44],{46:87,13:z,41:G,48:K,49:U}),{14:114,40:q,50:J,72:$},{16:115,40:O,41:A},{14:116,40:q,50:J,72:$},s(i,[2,13]),s(Z,[2,64]),{59:117,61:Ot},{19:[1,118]},s(i,[2,20]),s(i,[2,23],{17:[1,119],42:N}),s(i,[2,11]),{13:[1,120],42:N},s(i,[2,10]),s(ut,[2,68]),s(i,[2,18]),{18:121,19:[1,122],53:53,54:54,58:Y},{14:123,40:q,50:J,72:$},{19:[1,124]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:d(function(n,a){if(a.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=a,o}},"parseError"),parse:d(function(n){var a=this,o=[0],r=[],f=[null],t=[],j=this.table,e="",et=0,Nt=0,Lt=2,It=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(x.yy[pt]=this.yy[pt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ft=_.yylloc;t.push(ft);var Vt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){o.length=o.length-2*b,f.length=f.length-b,t.length=t.length-b}d(Mt,"popStack");function Rt(){var b;return b=r.pop()||_.lex()||It,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}d(Rt,"lex");for(var g,v,m,yt,w={},st,E,Ct,it;;){if(v=o[o.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Rt()),m=j[v]&&j[v][g]),typeof m>"u"||!m.length||!m[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`:
2
2
  `+_.showPosition()+`
3
3
  Expecting `+it.join(", ")+", got '"+(this.terminals_[g]||g)+"'":_t="Parse error on line "+(et+1)+": Unexpected "+(g==It?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(_t,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:ft,expected:it})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(m[0]){case 1:o.push(g),f.push(_.yytext),t.push(_.yylloc),o.push(m[1]),g=null,Nt=_.yyleng,e=_.yytext,et=_.yylineno,ft=_.yylloc;break;case 2:if(E=this.productions_[m[1]][1],w.$=f[f.length-E],w._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},Vt&&(w._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),yt=this.performAction.apply(w,[e,Nt,et,x.yy,m[1],f,t].concat(wt)),typeof yt<"u")return yt;E&&(o=o.slice(0,-1*E*2),f=f.slice(0,-1*E),t=t.slice(0,-1*E)),o.push(this.productions_[m[1]][0]),f.push(w.$),t.push(w._$),Ct=j[o[o.length-2]][o[o.length-1]],o.push(Ct);break;case 3:return!0}}return!0},"parse")},Dt=(function(){var I={EOF:1,parseError:d(function(a,o){if(this.yy.parser)this.yy.parser.parseError(a,o);else throw new Error(a)},"parseError"),setInput:d(function(n,a){return this.yy=a||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:d(function(n){var a=n.length,o=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===r.length?this.yylloc.first_column:0)+r[r.length-o.length].length-o[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(n){this.unput(this.match.slice(n))},"less"),pastInput:d(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as He}from"./chunk-FMBD7UC4-Dmx8B-st.js";import{_ as b,n as Me,l as J,c as g1,o as Xe,r as Qe,u as re,b as Je,s as Ze,p as $e,a as et,g as tt,q as st,k as it,t as rt,J as at,v as nt,x as se,d as ie,y as ut,z as ot,A as lt}from"./mermaid.core-qS9XvtaK.js";import{c as ct}from"./chunk-ND2GUHAM-DYV00CNn.js";import{g as ht}from"./chunk-55IACEB6-BUtCVJat.js";import{s as dt}from"./chunk-2J33WTMH-CBGlUx4_.js";import pt from"./purify.es-VaSPOPhr.js";import{c as ft}from"./channel-kp6Ng2JJ.js";import"./index-DtLUOcAW.js";import"./_commonjsHelpers-CqkleIqs.js";var gt="flowchart-",R1,bt=(R1=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Je,this.setAccDescription=Ze,this.setDiagramTitle=$e,this.getAccTitle=et,this.getAccDescription=tt,this.getDiagramTitle=st,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return it.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return this.diagramId?`${this.diagramId}-${a.domId}`:a.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,a,r,n,c,p,l={},A){if(!i||i.trim().length===0)return;let u;if(A!==void 0){let T;A.includes(`
1
+ import{g as He}from"./chunk-FMBD7UC4-eYFEZimP.js";import{_ as b,n as Me,l as J,c as g1,o as Xe,r as Qe,u as re,b as Je,s as Ze,p as $e,a as et,g as tt,q as st,k as it,t as rt,J as at,v as nt,x as se,d as ie,y as ut,z as ot,A as lt}from"./mermaid.core-CkNdB471.js";import{c as ct}from"./chunk-ND2GUHAM-fMaIDDI2.js";import{g as ht}from"./chunk-55IACEB6-H6haOo2C.js";import{s as dt}from"./chunk-2J33WTMH-CBNfW-Dr.js";import pt from"./purify.es-VaSPOPhr.js";import{c as ft}from"./channel-B6AFly29.js";import"./index-CjE9mHGb.js";import"./_commonjsHelpers-CqkleIqs.js";var gt="flowchart-",R1,bt=(R1=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Je,this.setAccDescription=Ze,this.setDiagramTitle=$e,this.getAccTitle=et,this.getAccDescription=tt,this.getDiagramTitle=st,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return it.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return this.diagramId?`${this.diagramId}-${a.domId}`:a.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,a,r,n,c,p,l={},A){if(!i||i.trim().length===0)return;let u;if(A!==void 0){let T;A.includes(`
2
2
  `)?T=A+`
3
3
  `:T=`{
4
4
  `+A+`