@weavecode/weave 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/node_modules/@modelcontextprotocol/sdk/node_modules/@hono/node-server/dist/index.cjs +31 -6
  2. package/node_modules/@modelcontextprotocol/sdk/node_modules/@hono/node-server/dist/index.mjs +31 -6
  3. package/node_modules/@modelcontextprotocol/sdk/node_modules/@hono/node-server/package.json +1 -1
  4. package/node_modules/@modelcontextprotocol/sdk/node_modules/express-rate-limit/dist/index.cjs +1 -1
  5. package/node_modules/@modelcontextprotocol/sdk/node_modules/express-rate-limit/dist/index.mjs +1 -1
  6. package/node_modules/@modelcontextprotocol/sdk/node_modules/express-rate-limit/node_modules/ip-address/README.md +39 -39
  7. package/node_modules/@modelcontextprotocol/sdk/node_modules/express-rate-limit/node_modules/ip-address/dist/ipv6.js +1 -1
  8. package/node_modules/@modelcontextprotocol/sdk/node_modules/express-rate-limit/node_modules/ip-address/package.json +1 -1
  9. package/node_modules/@modelcontextprotocol/sdk/node_modules/express-rate-limit/package.json +1 -1
  10. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/adapter/bun/serve-static.js +1 -1
  11. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/adapter/bun/websocket.js +1 -1
  12. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/context.js +1 -1
  13. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/helper/css/common.js +3 -5
  14. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/hono-base.js +4 -10
  15. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/hono.js +0 -1
  16. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +1 -1
  17. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +1 -1
  18. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/csrf/index.js +2 -2
  19. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +2 -2
  20. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +2 -2
  21. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/middleware/mount/index.js +4 -4
  22. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +13 -11
  23. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js +4 -4
  24. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +39 -51
  25. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +15 -5
  26. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/utils/jwt/jwt.js +2 -1
  27. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/utils/mount.js +35 -0
  28. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/utils/url.js +10 -0
  29. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/cjs/validator/validator.js +1 -1
  30. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/context.js +1 -1
  31. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/helper/css/common.js +3 -5
  32. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/hono-base.js +4 -10
  33. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/hono.js +0 -1
  34. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/basic-auth/index.js +1 -1
  35. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/bearer-auth/index.js +1 -1
  36. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/csrf/index.js +2 -2
  37. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/jwk/jwk.js +2 -2
  38. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/jwt/jwt.js +2 -2
  39. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/language/language.js +1 -1
  40. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/middleware/mount/index.js +4 -4
  41. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/router/reg-exp-router/node.js +13 -11
  42. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/router/reg-exp-router/prepared-router.js +5 -5
  43. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/router/reg-exp-router/router.js +40 -52
  44. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/router/reg-exp-router/trie.js +15 -5
  45. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/types/middleware/mount/index.d.ts +1 -0
  46. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +3 -3
  47. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +1 -1
  48. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/types/utils/mount.d.ts +4 -0
  49. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/types/utils/url.d.ts +1 -0
  50. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/utils/jwt/jwt.js +2 -1
  51. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/utils/mount.js +34 -0
  52. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/utils/url.js +10 -1
  53. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/dist/validator/validator.js +1 -1
  54. package/node_modules/@modelcontextprotocol/sdk/node_modules/hono/package.json +1 -1
  55. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/remote.js +3 -1
  56. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/deflate.js +2 -1
  57. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +2 -1
  58. package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/package.json +1 -1
  59. package/node_modules/@weavecode/cli/dist/cli.js +4 -4
  60. package/node_modules/@weavecode/cli/dist/commands/chpass.js +1 -1
  61. package/node_modules/@weavecode/cli/dist/commands/daemon-auth.js +1 -1
  62. package/node_modules/@weavecode/cli/dist/commands/daemon.js +2 -2
  63. package/node_modules/@weavecode/cli/dist/commands/dashboard.js +2 -2
  64. package/node_modules/@weavecode/cli/dist/commands/doctor.js +1 -1
  65. package/node_modules/@weavecode/cli/dist/commands/init.js +1 -1
  66. package/node_modules/@weavecode/cli/dist/commands/scan.js +1 -1
  67. package/node_modules/@weavecode/cli/dist/commands/status.js +2 -2
  68. package/node_modules/@weavecode/cli/dist/commands/uninstall.js +1 -1
  69. package/node_modules/@weavecode/cli/dist/i18n/dict/en.js +3 -3
  70. package/node_modules/@weavecode/cli/dist/i18n/dict/zh.d.ts +7 -0
  71. package/node_modules/@weavecode/cli/dist/i18n/dict/zh.js +3 -3
  72. package/node_modules/@weavecode/cli/dist/i18n/index.js +1 -1
  73. package/node_modules/@weavecode/cli/dist/i18n/t.js +1 -1
  74. package/node_modules/@weavecode/cli/dist/init/claudemd-gen.js +5 -5
  75. package/node_modules/@weavecode/cli/dist/init/executor.js +3 -3
  76. package/node_modules/@weavecode/cli/dist/init/git-commit.js +2 -2
  77. package/node_modules/@weavecode/cli/dist/init/git-exclude.d.ts +20 -0
  78. package/node_modules/@weavecode/cli/dist/init/git-exclude.js +7 -0
  79. package/node_modules/@weavecode/cli/dist/init/harnesses/claude.js +7 -7
  80. package/node_modules/@weavecode/cli/dist/init/harnesses/codex.js +1 -1
  81. package/node_modules/@weavecode/cli/dist/init/instruction-files.d.ts +14 -0
  82. package/node_modules/@weavecode/cli/dist/init/instruction-files.js +1 -0
  83. package/node_modules/@weavecode/cli/dist/init/instruction-link.js +1 -1
  84. package/node_modules/@weavecode/cli/dist/init/plugin-templates.js +1 -1
  85. package/node_modules/@weavecode/cli/dist/init/prompt.js +4 -4
  86. package/node_modules/@weavecode/cli/dist/init/provision.js +1 -1
  87. package/node_modules/@weavecode/cli/dist/init/uninstall.js +6 -6
  88. package/node_modules/@weavecode/cli/dist/init/wiring.js +1 -1
  89. package/node_modules/@weavecode/cli/dist/parser.js +1 -1
  90. package/node_modules/@weavecode/cli/dist/statusline/ansi.js +1 -1
  91. package/node_modules/@weavecode/cli/package.json +5 -5
  92. package/node_modules/@weavecode/core/dist/harness-checks.js +1 -1
  93. package/node_modules/@weavecode/core/dist/harness.d.ts +115 -0
  94. package/node_modules/@weavecode/core/dist/harness.js +1 -1
  95. package/node_modules/@weavecode/core/dist/index.d.ts +1 -1
  96. package/node_modules/@weavecode/core/dist/index.js +1 -1
  97. package/node_modules/@weavecode/core/dist/platform.js +1 -1
  98. package/node_modules/@weavecode/core/dist/types.d.ts +4 -4
  99. package/node_modules/@weavecode/core/dist/types.js +1 -1
  100. package/node_modules/@weavecode/core/dist/utils/fs.js +1 -1
  101. package/node_modules/@weavecode/core/package.json +1 -1
  102. package/node_modules/@weavecode/harness/dist/claude/assets.js +3 -3
  103. package/node_modules/@weavecode/harness/dist/claude/capture.js +9 -9
  104. package/node_modules/@weavecode/harness/dist/claude/commands.d.ts +2 -0
  105. package/node_modules/@weavecode/harness/dist/claude/commands.js +3 -2
  106. package/node_modules/@weavecode/harness/dist/claude/config.js +2 -2
  107. package/node_modules/@weavecode/harness/dist/claude/detect.js +1 -1
  108. package/node_modules/@weavecode/harness/dist/claude/edits.js +1 -1
  109. package/node_modules/@weavecode/harness/dist/claude/event-source.js +1 -1
  110. package/node_modules/@weavecode/harness/dist/claude/images.js +2 -2
  111. package/node_modules/@weavecode/harness/dist/claude/index.js +1 -1
  112. package/node_modules/@weavecode/harness/dist/claude/liveness.js +1 -1
  113. package/node_modules/@weavecode/harness/dist/claude/mcp-gen.js +1 -1
  114. package/node_modules/@weavecode/harness/dist/claude/messaging.js +2 -2
  115. package/node_modules/@weavecode/harness/dist/claude/model-aliases.js +1 -1
  116. package/node_modules/@weavecode/harness/dist/claude/narration.js +1 -1
  117. package/node_modules/@weavecode/harness/dist/claude/peers.js +1 -1
  118. package/node_modules/@weavecode/harness/dist/claude/plan.js +1 -1
  119. package/node_modules/@weavecode/harness/dist/claude/plugins.js +4 -4
  120. package/node_modules/@weavecode/harness/dist/claude/prompt-inbox.js +1 -1
  121. package/node_modules/@weavecode/harness/dist/claude/prompt.js +3 -3
  122. package/node_modules/@weavecode/harness/dist/claude/questions.js +2 -2
  123. package/node_modules/@weavecode/harness/dist/claude/resume.js +1 -1
  124. package/node_modules/@weavecode/harness/dist/claude/rewind.js +1 -1
  125. package/node_modules/@weavecode/harness/dist/claude/settings-gen.js +1 -1
  126. package/node_modules/@weavecode/harness/dist/claude/side-question.js +2 -2
  127. package/node_modules/@weavecode/harness/dist/claude/statusline/generator.d.ts +6 -0
  128. package/node_modules/@weavecode/harness/dist/claude/statusline/generator.js +21 -14
  129. package/node_modules/@weavecode/harness/dist/claude/statusline/git-cache.js +1 -1
  130. package/node_modules/@weavecode/harness/dist/claude/statusline/surface.js +2 -2
  131. package/node_modules/@weavecode/harness/dist/claude/transcript-cursor.js +2 -2
  132. package/node_modules/@weavecode/harness/dist/claude/transcript.js +7 -7
  133. package/node_modules/@weavecode/harness/dist/codex/assets.js +1 -1
  134. package/node_modules/@weavecode/harness/dist/codex/capture.js +2 -2
  135. package/node_modules/@weavecode/harness/dist/codex/commands.js +4 -4
  136. package/node_modules/@weavecode/harness/dist/codex/config.js +2 -2
  137. package/node_modules/@weavecode/harness/dist/codex/detect.js +1 -1
  138. package/node_modules/@weavecode/harness/dist/codex/event-source.js +2 -2
  139. package/node_modules/@weavecode/harness/dist/codex/images.js +1 -1
  140. package/node_modules/@weavecode/harness/dist/codex/index.js +1 -1
  141. package/node_modules/@weavecode/harness/dist/codex/liveness.js +1 -1
  142. package/node_modules/@weavecode/harness/dist/codex/mcp.js +1 -1
  143. package/node_modules/@weavecode/harness/dist/codex/messaging.js +2 -2
  144. package/node_modules/@weavecode/harness/dist/codex/narration.js +1 -1
  145. package/node_modules/@weavecode/harness/dist/codex/plugin-state.js +1 -1
  146. package/node_modules/@weavecode/harness/dist/codex/plugins.js +3 -3
  147. package/node_modules/@weavecode/harness/dist/codex/provision.js +1 -1
  148. package/node_modules/@weavecode/harness/dist/codex/questions.js +2 -2
  149. package/node_modules/@weavecode/harness/dist/codex/rollout.js +5 -5
  150. package/node_modules/@weavecode/harness/dist/codex/side-question.js +4 -4
  151. package/node_modules/@weavecode/harness/dist/codex/titles.js +4 -4
  152. package/node_modules/@weavecode/harness/dist/codex/toml.js +13 -13
  153. package/node_modules/@weavecode/harness/dist/codex/transcript.js +2 -2
  154. package/node_modules/@weavecode/harness/dist/driver.d.ts +6 -0
  155. package/node_modules/@weavecode/harness/dist/driver.js +1 -1
  156. package/node_modules/@weavecode/harness/dist/init/generated.js +2 -2
  157. package/node_modules/@weavecode/harness/dist/init/pipeline.js +1 -1
  158. package/node_modules/@weavecode/harness/dist/registry-wiring.js +1 -1
  159. package/node_modules/@weavecode/harness/dist/shared/install-link.js +1 -1
  160. package/node_modules/@weavecode/harness/dist/shared/json-cap.js +1 -1
  161. package/node_modules/@weavecode/harness/package.json +2 -2
  162. package/node_modules/@weavecode/server/dist/config/dotted.js +1 -1
  163. package/node_modules/@weavecode/server/dist/config/profiles.js +2 -2
  164. package/node_modules/@weavecode/server/dist/daemon/ai-config.js +2 -2
  165. package/node_modules/@weavecode/server/dist/daemon/ai-context.js +6 -6
  166. package/node_modules/@weavecode/server/dist/daemon/ai-routes.js +4 -4
  167. package/node_modules/@weavecode/server/dist/daemon/api-log.js +3 -3
  168. package/node_modules/@weavecode/server/dist/daemon/auth-routes.js +1 -1
  169. package/node_modules/@weavecode/server/dist/daemon/auto-start.js +3 -3
  170. package/node_modules/@weavecode/server/dist/daemon/capture-routes.js +1 -1
  171. package/node_modules/@weavecode/server/dist/daemon/config-routes.js +1 -1
  172. package/node_modules/@weavecode/server/dist/daemon/cron.js +1 -1
  173. package/node_modules/@weavecode/server/dist/daemon/dashboard-auth.js +2 -2
  174. package/node_modules/@weavecode/server/dist/daemon/dashboard-pusher.js +1 -1
  175. package/node_modules/@weavecode/server/dist/daemon/decision-config.js +2 -2
  176. package/node_modules/@weavecode/server/dist/daemon/dev-entry.js +1 -1
  177. package/node_modules/@weavecode/server/dist/daemon/entry.js +2 -2
  178. package/node_modules/@weavecode/server/dist/daemon/fs-browser.js +1 -1
  179. package/node_modules/@weavecode/server/dist/daemon/hook-pipeline.js +1 -1
  180. package/node_modules/@weavecode/server/dist/daemon/hooks-routes.js +1 -1
  181. package/node_modules/@weavecode/server/dist/daemon/http.js +1 -1
  182. package/node_modules/@weavecode/server/dist/daemon/liveness.js +1 -1
  183. package/node_modules/@weavecode/server/dist/daemon/mcp-orchestration.js +1 -1
  184. package/node_modules/@weavecode/server/dist/daemon/narration-watcher.js +2 -2
  185. package/node_modules/@weavecode/server/dist/daemon/opener/backend-ghostty.js +1 -1
  186. package/node_modules/@weavecode/server/dist/daemon/opener/backend-iterm.js +1 -1
  187. package/node_modules/@weavecode/server/dist/daemon/opener/backend-konsole.js +2 -2
  188. package/node_modules/@weavecode/server/dist/daemon/opener/backend-terminal-app.js +1 -1
  189. package/node_modules/@weavecode/server/dist/daemon/opener/backend-wezterm.js +1 -1
  190. package/node_modules/@weavecode/server/dist/daemon/opener/backend-wt.js +1 -1
  191. package/node_modules/@weavecode/server/dist/daemon/opener/backend.js +1 -1
  192. package/node_modules/@weavecode/server/dist/daemon/opener/pty-terminals.js +1 -1
  193. package/node_modules/@weavecode/server/dist/daemon/opener/shared.js +1 -1
  194. package/node_modules/@weavecode/server/dist/daemon/opener/wezterm-mux.js +1 -1
  195. package/node_modules/@weavecode/server/dist/daemon/opener/wt.js +3 -3
  196. package/node_modules/@weavecode/server/dist/daemon/opener.js +1 -1
  197. package/node_modules/@weavecode/server/dist/daemon/pet-seed.d.ts +4 -0
  198. package/node_modules/@weavecode/server/dist/daemon/pet-seed.js +2 -0
  199. package/node_modules/@weavecode/server/dist/daemon/pet-window.d.ts +17 -0
  200. package/node_modules/@weavecode/server/dist/daemon/pet-window.js +2 -0
  201. package/node_modules/@weavecode/server/dist/daemon/port.js +1 -1
  202. package/node_modules/@weavecode/server/dist/daemon/project-files.d.ts +1 -1
  203. package/node_modules/@weavecode/server/dist/daemon/project-files.js +2 -2
  204. package/node_modules/@weavecode/server/dist/daemon/project-harnesses.js +2 -2
  205. package/node_modules/@weavecode/server/dist/daemon/project-updates-refresher.js +1 -1
  206. package/node_modules/@weavecode/server/dist/daemon/prompt-images.js +1 -1
  207. package/node_modules/@weavecode/server/dist/daemon/routes/hooks-admin.js +1 -1
  208. package/node_modules/@weavecode/server/dist/daemon/routes/installations.d.ts +29 -0
  209. package/node_modules/@weavecode/server/dist/daemon/routes/installations.js +1 -0
  210. package/node_modules/@weavecode/server/dist/daemon/routes/market.js +1 -1
  211. package/node_modules/@weavecode/server/dist/daemon/routes/orchestration.js +1 -1
  212. package/node_modules/@weavecode/server/dist/daemon/routes/path-refs.js +1 -1
  213. package/node_modules/@weavecode/server/dist/daemon/routes/pets.d.ts +3 -0
  214. package/node_modules/@weavecode/server/dist/daemon/routes/pets.js +1 -0
  215. package/node_modules/@weavecode/server/dist/daemon/routes/project-files.js +1 -1
  216. package/node_modules/@weavecode/server/dist/daemon/routes/projects.js +1 -1
  217. package/node_modules/@weavecode/server/dist/daemon/routes/search.js +1 -1
  218. package/node_modules/@weavecode/server/dist/daemon/routes/session-control.js +1 -1
  219. package/node_modules/@weavecode/server/dist/daemon/routes/session-insights.js +1 -1
  220. package/node_modules/@weavecode/server/dist/daemon/routes/settings-statusline.js +1 -1
  221. package/node_modules/@weavecode/server/dist/daemon/routes/uploads.js +1 -1
  222. package/node_modules/@weavecode/server/dist/daemon/routes/visualizations.js +2 -1
  223. package/node_modules/@weavecode/server/dist/daemon/routes/watches.js +1 -1
  224. package/node_modules/@weavecode/server/dist/daemon/server.d.ts +4 -0
  225. package/node_modules/@weavecode/server/dist/daemon/server.js +8 -8
  226. package/node_modules/@weavecode/server/dist/daemon/session-open.js +1 -1
  227. package/node_modules/@weavecode/server/dist/daemon/session-probe.js +1 -1
  228. package/node_modules/@weavecode/server/dist/daemon/settings.d.ts +21 -0
  229. package/node_modules/@weavecode/server/dist/daemon/settings.js +2 -2
  230. package/node_modules/@weavecode/server/dist/daemon/snapshot-refresher.js +1 -1
  231. package/node_modules/@weavecode/server/dist/daemon/sse-hub.js +1 -1
  232. package/node_modules/@weavecode/server/dist/daemon/start.js +1 -1
  233. package/node_modules/@weavecode/server/dist/daemon/state.js +2 -2
  234. package/node_modules/@weavecode/server/dist/daemon/static.js +1 -1
  235. package/node_modules/@weavecode/server/dist/daemon/terminal-topology-refresher.js +1 -1
  236. package/node_modules/@weavecode/server/dist/daemon/tls.js +1 -1
  237. package/node_modules/@weavecode/server/dist/daemon/toolkit-routes.js +1 -1
  238. package/node_modules/@weavecode/server/dist/daemon/upload-sessions.js +1 -1
  239. package/node_modules/@weavecode/server/dist/db/db.d.ts +4 -1
  240. package/node_modules/@weavecode/server/dist/db/db.js +2 -2
  241. package/node_modules/@weavecode/server/dist/db/layout.d.ts +5 -0
  242. package/node_modules/@weavecode/server/dist/db/layout.js +2 -1
  243. package/node_modules/@weavecode/server/dist/db/paths.d.ts +9 -0
  244. package/node_modules/@weavecode/server/dist/db/paths.js +1 -1
  245. package/node_modules/@weavecode/server/dist/hooks/answer-keys.js +1 -1
  246. package/node_modules/@weavecode/server/dist/hooks/dashboard-rate.js +1 -1
  247. package/node_modules/@weavecode/server/dist/hooks/decision-judge.js +1 -1
  248. package/node_modules/@weavecode/server/dist/hooks/delivery/ack-gate.js +1 -1
  249. package/node_modules/@weavecode/server/dist/hooks/delivery/channels.js +1 -1
  250. package/node_modules/@weavecode/server/dist/hooks/delivery/keys.js +1 -1
  251. package/node_modules/@weavecode/server/dist/hooks/delivery/queue.js +1 -1
  252. package/node_modules/@weavecode/server/dist/hooks/delivery/relay.js +1 -1
  253. package/node_modules/@weavecode/server/dist/hooks/delivery/send.js +2 -2
  254. package/node_modules/@weavecode/server/dist/hooks/delivery/views.js +1 -1
  255. package/node_modules/@weavecode/server/dist/hooks/dispatcher.js +6 -6
  256. package/node_modules/@weavecode/server/dist/hooks/edge-extract.js +1 -1
  257. package/node_modules/@weavecode/server/dist/hooks/handlers/webhook.js +1 -1
  258. package/node_modules/@weavecode/server/dist/hooks/headless-runner.js +2 -2
  259. package/node_modules/@weavecode/server/dist/hooks/inbox-socket.js +2 -2
  260. package/node_modules/@weavecode/server/dist/hooks/inbox-worker.js +3 -3
  261. package/node_modules/@weavecode/server/dist/hooks/match.js +1 -1
  262. package/node_modules/@weavecode/server/dist/hooks/message-deliverer.js +5 -5
  263. package/node_modules/@weavecode/server/dist/hooks/mirror.js +4 -4
  264. package/node_modules/@weavecode/server/dist/hooks/orchestration-engine.js +7 -7
  265. package/node_modules/@weavecode/server/dist/hooks/orchestration-graph.js +1 -1
  266. package/node_modules/@weavecode/server/dist/hooks/plugin-installer.js +3 -3
  267. package/node_modules/@weavecode/server/dist/hooks/plugin-loader.js +1 -1
  268. package/node_modules/@weavecode/server/dist/hooks/plugin-project-state.js +1 -1
  269. package/node_modules/@weavecode/server/dist/hooks/prompt-flusher.js +1 -1
  270. package/node_modules/@weavecode/server/dist/hooks/promptbox.js +8 -8
  271. package/node_modules/@weavecode/server/dist/hooks/push-notify.js +2 -2
  272. package/node_modules/@weavecode/server/dist/hooks/question-tracker.js +1 -1
  273. package/node_modules/@weavecode/server/dist/hooks/registry.js +1 -1
  274. package/node_modules/@weavecode/server/dist/hooks/resume-runner.js +1 -1
  275. package/node_modules/@weavecode/server/dist/hooks/session-purge.js +1 -1
  276. package/node_modules/@weavecode/server/dist/hooks/side-questions.js +1 -1
  277. package/node_modules/@weavecode/server/dist/hooks/synthetic-sessions.js +1 -1
  278. package/node_modules/@weavecode/server/dist/hooks/toolkit-scan.js +1 -1
  279. package/node_modules/@weavecode/server/dist/hooks/toolkit.js +5 -5
  280. package/node_modules/@weavecode/server/dist/hooks/watch-engine.js +1 -1
  281. package/node_modules/@weavecode/server/dist/index.d.ts +1 -1
  282. package/node_modules/@weavecode/server/dist/index.js +1 -1
  283. package/node_modules/@weavecode/server/dist/install/apply-update.js +1 -1
  284. package/node_modules/@weavecode/server/dist/install/capabilities.js +1 -1
  285. package/node_modules/@weavecode/server/dist/install/codex-toml.js +1 -1
  286. package/node_modules/@weavecode/server/dist/install/file-assets.js +1 -1
  287. package/node_modules/@weavecode/server/dist/install/fingerprint.js +1 -1
  288. package/node_modules/@weavecode/server/dist/install/global-config.js +1 -1
  289. package/node_modules/@weavecode/server/dist/install/global-file-assets.js +1 -1
  290. package/node_modules/@weavecode/server/dist/install/init-files.d.ts +0 -9
  291. package/node_modules/@weavecode/server/dist/install/init-files.js +2 -2
  292. package/node_modules/@weavecode/server/dist/install/install-ledger.js +1 -1
  293. package/node_modules/@weavecode/server/dist/install/installer.js +1 -1
  294. package/node_modules/@weavecode/server/dist/install/library-index.js +1 -1
  295. package/node_modules/@weavecode/server/dist/install/mcp-rows.js +1 -1
  296. package/node_modules/@weavecode/server/dist/install/plugin-install.js +1 -1
  297. package/node_modules/@weavecode/server/dist/install/plugin-rows.js +1 -1
  298. package/node_modules/@weavecode/server/dist/install/plugin-templates.js +1 -1
  299. package/node_modules/@weavecode/server/dist/install/project-config.js +1 -1
  300. package/node_modules/@weavecode/server/dist/install/reader.js +1 -1
  301. package/node_modules/@weavecode/server/dist/install/scan-cache.js +1 -1
  302. package/node_modules/@weavecode/server/dist/install/scanner.js +1 -1
  303. package/node_modules/@weavecode/server/dist/install/settings-mcp.js +2 -2
  304. package/node_modules/@weavecode/server/dist/install/updates.js +1 -1
  305. package/node_modules/@weavecode/server/dist/market/builtin.js +1 -1
  306. package/node_modules/@weavecode/server/dist/market/identity.js +1 -1
  307. package/node_modules/@weavecode/server/dist/market/import.js +2 -2
  308. package/node_modules/@weavecode/server/dist/market/refresh.js +1 -1
  309. package/node_modules/@weavecode/server/dist/market/resolve.js +1 -1
  310. package/node_modules/@weavecode/server/dist/market/updates.js +1 -1
  311. package/node_modules/@weavecode/server/dist/registry.js +2 -2
  312. package/node_modules/@weavecode/server/dist/repositories/hook-dispatches.js +4 -4
  313. package/node_modules/@weavecode/server/dist/repositories/hook-events.d.ts +6 -0
  314. package/node_modules/@weavecode/server/dist/repositories/hook-events.js +8 -5
  315. package/node_modules/@weavecode/server/dist/repositories/hook-rules.js +4 -4
  316. package/node_modules/@weavecode/server/dist/repositories/libraries.js +1 -1
  317. package/node_modules/@weavecode/server/dist/repositories/orchestrations.js +7 -7
  318. package/node_modules/@weavecode/server/dist/repositories/plugin-states.js +1 -1
  319. package/node_modules/@weavecode/server/dist/repositories/projects.js +1 -1
  320. package/node_modules/@weavecode/server/dist/repositories/push-subscriptions.js +2 -2
  321. package/node_modules/@weavecode/server/dist/repositories/session-watches.js +4 -4
  322. package/node_modules/@weavecode/server/dist/repositories/sessions.js +2 -2
  323. package/node_modules/@weavecode/server/dist/repositories/uploads.js +11 -11
  324. package/node_modules/@weavecode/server/dist/statusline/cache-sweeper.js +1 -1
  325. package/node_modules/@weavecode/server/dist/statusline/generator.js +1 -1
  326. package/node_modules/@weavecode/server/dist/statusline/manager.js +3 -3
  327. package/node_modules/@weavecode/server/dist/surfaces.js +1 -1
  328. package/node_modules/@weavecode/server/dist/watch/cache.js +1 -1
  329. package/node_modules/@weavecode/server/dist/watch/classifier.js +1 -1
  330. package/node_modules/@weavecode/server/dist/watch/plugin-mods.js +1 -1
  331. package/node_modules/@weavecode/server/dist/watch/sync-scheduler.js +1 -1
  332. package/node_modules/@weavecode/server/dist/watch/watch-service.js +1 -1
  333. package/node_modules/@weavecode/server/package.json +4 -4
  334. package/node_modules/@weavecode/server/web/dist/assets/abnfDiagram-WEYOIA3C-S1lL1V_n.js +1 -0
  335. package/node_modules/@weavecode/server/web/dist/assets/{arc-CRZTRyjb.js → arc-CoTNHyHV.js} +1 -1
  336. package/node_modules/@weavecode/server/web/dist/assets/architectureDiagram-ZHVYKT53-C6ttfnzW.js +36 -0
  337. package/node_modules/@weavecode/server/web/dist/assets/{blockDiagram-RJAE7QA3-BIH8mSIZ.js → blockDiagram-RJAE7QA3-CYr3Cpu9.js} +2 -2
  338. package/node_modules/@weavecode/server/web/dist/assets/{c4Diagram-XDPPPE54-5YoKWFOD.js → c4Diagram-XDPPPE54-BFS7PhLD.js} +2 -2
  339. package/node_modules/@weavecode/server/web/dist/assets/channel-DxQHp3Yc.js +1 -0
  340. package/node_modules/@weavecode/server/web/dist/assets/{chunk-2E7WHVMD-B653kMXt.js → chunk-2E7WHVMD-DJ7X_Shu.js} +1 -1
  341. package/node_modules/@weavecode/server/web/dist/assets/{chunk-2Q5K7J3B-f_A4_eDz.js → chunk-2Q5K7J3B-B8nr2rdz.js} +1 -1
  342. package/node_modules/@weavecode/server/web/dist/assets/{chunk-4EMNKR2T-v5j5qNGj.js → chunk-4EMNKR2T-DmnZmUMU.js} +1 -1
  343. package/node_modules/@weavecode/server/web/dist/assets/chunk-55XCU76K-Xz9a8dmp.js +1 -0
  344. package/node_modules/@weavecode/server/web/dist/assets/{chunk-5VM5RSS4-BeROhLXN.js → chunk-5VM5RSS4-Dg9mg7pf.js} +1 -1
  345. package/node_modules/@weavecode/server/web/dist/assets/{chunk-JWPE2WC7-D6dXb_jr.js → chunk-JWPE2WC7-CmjTZO8o.js} +1 -1
  346. package/node_modules/@weavecode/server/web/dist/assets/{chunk-VQ5W62QI-CnHdSEMi.js → chunk-VQ5W62QI-D3YDdJ3E.js} +1 -1
  347. package/node_modules/@weavecode/server/web/dist/assets/chunk-XXDRQBXY-s1OG9sqW.js +1 -0
  348. package/node_modules/@weavecode/server/web/dist/assets/chunk-ZCHMQSOR-C3hINQU3.js +2 -0
  349. package/node_modules/@weavecode/server/web/dist/assets/{classDiagram-v2-4MYWR3UA-DQe1b_k8.js → classDiagram-v2-4MYWR3UA-BTsbYrVl.js} +2 -2
  350. package/node_modules/@weavecode/server/web/dist/assets/cose-bilkent-JH36ORCC-C0W8Y-jI.js +1 -0
  351. package/node_modules/@weavecode/server/web/dist/assets/{cynefin-EF2NZ3EQ-OZotFKUu.js → cynefin-EF2NZ3EQ-stAu4Rh-.js} +1 -1
  352. package/node_modules/@weavecode/server/web/dist/assets/cynefinDiagram-WF24UDRP-CqYibiiv.js +62 -0
  353. package/node_modules/@weavecode/server/web/dist/assets/dagre-NK4GIZVX-qqcoJAqB.js +4 -0
  354. package/node_modules/@weavecode/server/web/dist/assets/diagram-CBK3MWTC-D0YTopb7.js +24 -0
  355. package/node_modules/@weavecode/server/web/dist/assets/diagram-I5XIIV2D-Csvw6aYr.js +24 -0
  356. package/node_modules/@weavecode/server/web/dist/assets/{diagram-ODIL2UCW-D9A6W8oB.js → diagram-ODIL2UCW-Dl0tYLkF.js} +2 -2
  357. package/node_modules/@weavecode/server/web/dist/assets/{diagram-PFBEJUXE-PeI-eyu2.js → diagram-PFBEJUXE-BCPSWZPe.js} +2 -2
  358. package/node_modules/@weavecode/server/web/dist/assets/diagram-RJA3I4VV-ETg-BrAJ.js +41 -0
  359. package/node_modules/@weavecode/server/web/dist/assets/{diagram-TYUNFSNR-D5KieEw5.js → diagram-TYUNFSNR-_M6ZxBG7.js} +2 -2
  360. package/node_modules/@weavecode/server/web/dist/assets/ebnfDiagram-V4P3TTPT-C-e_W7qx.js +1 -0
  361. package/node_modules/@weavecode/server/web/dist/assets/{elk-QONTBCTQ-D3xrVg0U.js → elk-QONTBCTQ-B5TBharB.js} +3 -3
  362. package/node_modules/@weavecode/server/web/dist/assets/{erDiagram-KYQIGQAA-y_V1cor7.js → erDiagram-KYQIGQAA-D08rj2pv.js} +2 -2
  363. package/node_modules/@weavecode/server/web/dist/assets/{flowDiagram-IUGLLWBU-BJ8Z0MkF.js → flowDiagram-IUGLLWBU-BALTxsKh.js} +1 -1
  364. package/node_modules/@weavecode/server/web/dist/assets/ganttDiagram-R7GPNTJY-Cts193jT.js +292 -0
  365. package/node_modules/@weavecode/server/web/dist/assets/gitGraphDiagram-PDYL7XHY-L9qYUX0v.js +106 -0
  366. package/node_modules/@weavecode/server/web/dist/assets/infoDiagram-MVDRKAX5-Bv47rgU0.js +2 -0
  367. package/node_modules/@weavecode/server/web/dist/assets/{ishikawaDiagram-HPEHV2GE-ChEnND76.js → ishikawaDiagram-HPEHV2GE-Da8_s6cs.js} +2 -2
  368. package/node_modules/@weavecode/server/web/dist/assets/{journeyDiagram-BOSHW7O7-DHcNtpYF.js → journeyDiagram-BOSHW7O7-Bj3CjZOf.js} +2 -2
  369. package/node_modules/@weavecode/server/web/dist/assets/{kanban-definition-FNSA4HC5-Dft7qpW5.js → kanban-definition-FNSA4HC5-D1hicmMu.js} +2 -2
  370. package/node_modules/@weavecode/server/web/dist/assets/linear-CWQg2iA1.js +1 -0
  371. package/node_modules/@weavecode/server/web/dist/assets/main-XLn3EZFh.css +11 -0
  372. package/node_modules/@weavecode/server/web/dist/assets/main-bsb0lQoL.js +1096 -0
  373. package/node_modules/@weavecode/server/web/dist/assets/{mermaid.core-D_Dp_Kl2.js → mermaid.core-C-wP0Zg2.js} +4 -4
  374. package/node_modules/@weavecode/server/web/dist/assets/{mindmap-definition-6OY57UG3-CM6OAd_-.js → mindmap-definition-6OY57UG3-Dk0VKqre.js} +2 -2
  375. package/node_modules/@weavecode/server/web/dist/assets/modulepreload-polyfill-B5Qt9EMX.js +1 -0
  376. package/node_modules/@weavecode/server/web/dist/assets/pegDiagram-ECIUJNBX-Bp1K_F9z.js +1 -0
  377. package/node_modules/@weavecode/server/web/dist/assets/pet-J6izA90s.js +1 -0
  378. package/node_modules/@weavecode/server/web/dist/assets/pieDiagram-GNMPY74T-BZ4rGy3t.js +39 -0
  379. package/node_modules/@weavecode/server/web/dist/assets/{quadrantDiagram-D57K4MC3-D8pQ_PU2.js → quadrantDiagram-D57K4MC3-B4N5KRsR.js} +4 -4
  380. package/node_modules/@weavecode/server/web/dist/assets/railroadDiagram-Y72NRBL7-C8nx8oHf.js +1 -0
  381. package/node_modules/@weavecode/server/web/dist/assets/{requirementDiagram-EQYSW5RA-C90DU5Ny.js → requirementDiagram-EQYSW5RA-VSH57d0d.js} +2 -2
  382. package/node_modules/@weavecode/server/web/dist/assets/{sankeyDiagram-SY24JHO5-B_poYGgJ.js → sankeyDiagram-SY24JHO5-jUb1hcya.js} +2 -2
  383. package/node_modules/@weavecode/server/web/dist/assets/{sequenceDiagram-BLEHNHQU-DDW7b2Dn.js → sequenceDiagram-BLEHNHQU-E2BioCNi.js} +2 -2
  384. package/node_modules/@weavecode/server/web/dist/assets/sizeCapture-INFHLROL-BdKrbRmI.js +1 -0
  385. package/node_modules/@weavecode/server/web/dist/assets/{stateDiagram-v2-A6IESKWZ-CkVMAyxG.js → stateDiagram-v2-A6IESKWZ-tFz7uNM7.js} +2 -2
  386. package/node_modules/@weavecode/server/web/dist/assets/swimlanes-B3ENRKFQ-B9BAPDWw.js +1 -0
  387. package/node_modules/@weavecode/server/web/dist/assets/swimlanesDiagram-AYQRV4AK-DQ2NPLl9.js +8 -0
  388. package/node_modules/@weavecode/server/web/dist/assets/{timeline-definition-JXYKGLGB-DnhkRGLb.js → timeline-definition-JXYKGLGB-CofNnFTK.js} +2 -2
  389. package/node_modules/@weavecode/server/web/dist/assets/{usecaseDiagram-WPOLBNNX-_TdIjC6Z.js → usecaseDiagram-WPOLBNNX-DOvjhJjJ.js} +2 -2
  390. package/node_modules/@weavecode/server/web/dist/assets/{vennDiagram-Q3Y3IDCW-FzgsymXB.js → vennDiagram-Q3Y3IDCW-BcFHWnhS.js} +2 -2
  391. package/node_modules/@weavecode/server/web/dist/assets/{wardleyDiagram-IVAIDKWA-BwqimStC.js → wardleyDiagram-IVAIDKWA-Bz2aqRAs.js} +2 -2
  392. package/node_modules/@weavecode/server/web/dist/assets/{xychartDiagram-4URNHDU4-CFjjVPIV.js → xychartDiagram-4URNHDU4-DpNF6Vsq.js} +2 -2
  393. package/node_modules/@weavecode/server/web/dist/index.html +3 -2
  394. package/node_modules/@weavecode/server/web/dist/pet.html +130 -0
  395. package/node_modules/@weavecode/templates/dist/index.d.ts +2 -0
  396. package/node_modules/@weavecode/templates/dist/index.js +1 -1
  397. package/node_modules/@weavecode/templates/dist/resources/pets/weave-spider/pet.json +7 -0
  398. package/node_modules/@weavecode/templates/dist/resources/pets/weave-spider/spritesheet.png +0 -0
  399. package/node_modules/@weavecode/templates/dist/resources/weave-market/.claude-plugin/marketplace.json +6 -0
  400. package/node_modules/@weavecode/templates/dist/resources/weave-market/plugins/core-skills/weave-pet-hatcher/.claude-plugin/plugin.json +8 -0
  401. package/node_modules/@weavecode/templates/dist/resources/weave-market/plugins/core-skills/weave-pet-hatcher/skills/weave-pet-hatcher/SKILL.md +121 -0
  402. package/node_modules/@weavecode/templates/dist/resources/weave-market/plugins/core-skills/weave-pet-hatcher/skills/weave-pet-hatcher/scripts/assemble-pet.mjs +308 -0
  403. package/node_modules/@weavecode/templates/dist/resources/weave-market/plugins/core-skills/weave-pet-hatcher/weave.json +4 -0
  404. package/node_modules/@weavecode/templates/package.json +2 -2
  405. package/package.json +11 -7
  406. package/scripts/preinstall.mjs +108 -0
  407. package/node_modules/@weavecode/server/web/dist/assets/abnfDiagram-WEYOIA3C-DDeQkTf5.js +0 -1
  408. package/node_modules/@weavecode/server/web/dist/assets/architectureDiagram-ZHVYKT53-Dj54DE3O.js +0 -36
  409. package/node_modules/@weavecode/server/web/dist/assets/channel-5VM93AJ8.js +0 -1
  410. package/node_modules/@weavecode/server/web/dist/assets/chunk-55XCU76K-CgEqeP7j.js +0 -1
  411. package/node_modules/@weavecode/server/web/dist/assets/chunk-XXDRQBXY-BkG_e6PE.js +0 -1
  412. package/node_modules/@weavecode/server/web/dist/assets/chunk-ZCHMQSOR-DxR-fxzs.js +0 -2
  413. package/node_modules/@weavecode/server/web/dist/assets/cose-bilkent-JH36ORCC-DThrA8S5.js +0 -1
  414. package/node_modules/@weavecode/server/web/dist/assets/cynefinDiagram-WF24UDRP-DJjq2hfT.js +0 -62
  415. package/node_modules/@weavecode/server/web/dist/assets/dagre-NK4GIZVX-C2vH93HT.js +0 -4
  416. package/node_modules/@weavecode/server/web/dist/assets/diagram-CBK3MWTC-DrF_ScM-.js +0 -24
  417. package/node_modules/@weavecode/server/web/dist/assets/diagram-I5XIIV2D-D1qoUJ4t.js +0 -24
  418. package/node_modules/@weavecode/server/web/dist/assets/diagram-RJA3I4VV-DITY0Rd8.js +0 -41
  419. package/node_modules/@weavecode/server/web/dist/assets/ebnfDiagram-V4P3TTPT-DDylK-gz.js +0 -1
  420. package/node_modules/@weavecode/server/web/dist/assets/ganttDiagram-R7GPNTJY-C0q-CS1T.js +0 -292
  421. package/node_modules/@weavecode/server/web/dist/assets/gitGraphDiagram-PDYL7XHY-BYTComiB.js +0 -106
  422. package/node_modules/@weavecode/server/web/dist/assets/index-BKxAxaVG.js +0 -1091
  423. package/node_modules/@weavecode/server/web/dist/assets/index-C0Sd4MH7.css +0 -11
  424. package/node_modules/@weavecode/server/web/dist/assets/infoDiagram-MVDRKAX5-DtixgjLP.js +0 -2
  425. package/node_modules/@weavecode/server/web/dist/assets/linear-DEo11t-X.js +0 -1
  426. package/node_modules/@weavecode/server/web/dist/assets/pegDiagram-ECIUJNBX-_QkY0h8Q.js +0 -1
  427. package/node_modules/@weavecode/server/web/dist/assets/pieDiagram-GNMPY74T-ZGr5vtDj.js +0 -39
  428. package/node_modules/@weavecode/server/web/dist/assets/railroadDiagram-Y72NRBL7-DUIo-WmA.js +0 -1
  429. package/node_modules/@weavecode/server/web/dist/assets/sizeCapture-INFHLROL-CmKoqX6K.js +0 -1
  430. package/node_modules/@weavecode/server/web/dist/assets/swimlanes-B3ENRKFQ-Dm_Omzky.js +0 -1
  431. package/node_modules/@weavecode/server/web/dist/assets/swimlanesDiagram-AYQRV4AK-Bjj8ZA4d.js +0 -8
@@ -1,4 +1,4 @@
1
- import{p as zt}from"./chunk-JWPE2WC7-D6dXb_jr.js";import{s as Lt,g as Tt,q as At,p as Xt,a as Et,b as Yt,_ as y,Q as It,K as Bt,M as J,l as et,P as Ft,d as Rt,z as Ot,c as V}from"./mermaid.core-D_Dp_Kl2.js";import{p as Wt}from"./cynefin-EF2NZ3EQ-OZotFKUu.js";import"./index-BKxAxaVG.js";var G=y((a,o)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),E=y((a,o,e)=>({x:G(o,`${e} evolution`),y:G(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Dt=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(a),e=o==null?void 0:o[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Gt=y((a,o)=>{if(zt(a,o),a.size&&o.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),p=a.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);o.updateAxes({stages:e,stageBoundaries:p})}if(a.anchors.forEach(e=>{const p=E(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,p.x,p.y,"anchor")}),a.components.forEach(e=>{var v;const p=E(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;o.addNode(e.name,e.name,p.x,p.y,"component",r,d,e.inertia,m)}),a.notes.forEach(e=>{const p=E(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,p.x,p.y)}),a.pipelines.forEach(e=>{const p=o.getNode(e.parent);if(!p||typeof p.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const r=p.y;o.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,L=G(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(m,d.name,L,r,"pipeline-component",v,g),o.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const p=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let r=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Dt(e.arrow);!r&&d&&(r=d);const v=e.linkLabel,g=m??v;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),p,g,r)}),a.evolves.forEach(e=>{const p=o.getNode(e.component);if((p==null?void 0:p.y)!==void 0){const r=G(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,r,p.y)}}),a.annotations.length>0){const e=a.annotations[0],p=E(e.x,e.y,"Annotations box");o.setAnnotationsBox(p.x,p.y)}a.annotation.forEach(e=>{const p=E(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:p.x,y:p.y}],e.text)}),a.accelerators.forEach(e=>{const p=E(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,p.x,p.y)}),a.deaccelerators.forEach(e=>{const p=E(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,p.x,p.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var p;const o=await Wt("wardley",a);et.debug(o);const e=(p=at.parser)==null?void 0:p.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Gt(o,e)},"parse")},I,qt=(I=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(o){const e=this.nodes.get(o.id)??{id:o.id,label:o.label},p={...e,...o,className:o.className??e.className,labelOffsetX:o.labelOffsetX??e.labelOffsetX,labelOffsetY:o.labelOffsetY??e.labelOffsetY};this.nodes.set(o.id,p)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const p=this.pipelines.get(o);p&&p.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,p]of this.nodes)if(p.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(I,"WardleyBuilder"),I),b=new qt;function rt(){return V()["wardley-beta"]}y(rt,"getConfig");function ot(a,o,e,p,r,d,m,v,g){b.addNode({id:a,label:o,x:e,y:p,className:r,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,o,e=!1,p,r){b.addLink({source:a,target:o,dashed:e,label:p,flow:r})}y(st,"addLink");function nt(a,o,e){b.addTrend({nodeId:a,targetX:o,targetY:e})}y(nt,"addTrend");function it(a,o,e){b.addAnnotation({number:a,coordinates:o,text:e})}y(it,"addAnnotation");function dt(a,o,e){b.addNote({text:a,x:o,y:e})}y(dt,"addNote");function lt(a,o,e){b.addAccelerator({name:a,x:o,y:e})}y(lt,"addAccelerator");function ct(a,o,e){b.addDeaccelerator({name:a,x:o,y:e})}y(ct,"addDeaccelerator");function pt(a,o){b.setAnnotationsBox(a,o)}y(pt,"setAnnotationsBox");function ht(a,o){b.setSize(a,o)}y(ht,"setSize");function xt(a){b.startPipeline(a)}y(xt,"startPipeline");function ft(a,o){b.addPipelineComponent(a,o)}y(ft,"addPipelineComponent");function gt(a){b.setAxes(a)}y(gt,"updateAxes");function ut(a){return b.getNode(a)}y(ut,"getNode");function yt(a){return b.resolveNodeId(a)}y(yt,"resolveNodeId");function mt(){return b.build()}y(mt,"getWardleyData");function wt(){b.clear(),Ot()}y(wt,"clear");var Ht={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,resolveNodeId:yt,getWardleyData:mt,clear:wt,setAccTitle:Yt,getAccTitle:Et,setDiagramTitle:Xt,getDiagramTitle:At,getAccDescription:Tt,setAccDescription:Lt},jt=["Genesis","Custom Built","Product","Commodity"],Vt=y(()=>{var o,e,p,r,d,m,v,g,L,M,k,N;const{themeVariables:a}=V();return{backgroundColor:((o=a.wardley)==null?void 0:o.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((p=a.wardley)==null?void 0:p.axisTextColor)??a.primaryTextColor??"#222",gridColor:((r=a.wardley)==null?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((L=a.wardley)==null?void 0:L.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((k=a.wardley)==null?void 0:k.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),_t=y(()=>{const a=V()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),Zt=y((a,o,e,p)=>{var Q,U;et.debug(`Rendering Wardley map
1
+ import{p as zt}from"./chunk-JWPE2WC7-CmjTZO8o.js";import{s as Lt,g as Tt,q as At,p as Xt,a as Et,b as Yt,_ as y,Q as It,K as Bt,M as J,l as et,P as Ft,d as Rt,z as Ot,c as V}from"./mermaid.core-C-wP0Zg2.js";import{p as Wt}from"./cynefin-EF2NZ3EQ-stAu4Rh-.js";import"./main-bsb0lQoL.js";import"./modulepreload-polyfill-B5Qt9EMX.js";var G=y((a,o)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),E=y((a,o,e)=>({x:G(o,`${e} evolution`),y:G(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Dt=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(a),e=o==null?void 0:o[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Gt=y((a,o)=>{if(zt(a,o),a.size&&o.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),p=a.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);o.updateAxes({stages:e,stageBoundaries:p})}if(a.anchors.forEach(e=>{const p=E(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,p.x,p.y,"anchor")}),a.components.forEach(e=>{var v;const p=E(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;o.addNode(e.name,e.name,p.x,p.y,"component",r,d,e.inertia,m)}),a.notes.forEach(e=>{const p=E(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,p.x,p.y)}),a.pipelines.forEach(e=>{const p=o.getNode(e.parent);if(!p||typeof p.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const r=p.y;o.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,L=G(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(m,d.name,L,r,"pipeline-component",v,g),o.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const p=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let r=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Dt(e.arrow);!r&&d&&(r=d);const v=e.linkLabel,g=m??v;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),p,g,r)}),a.evolves.forEach(e=>{const p=o.getNode(e.component);if((p==null?void 0:p.y)!==void 0){const r=G(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,r,p.y)}}),a.annotations.length>0){const e=a.annotations[0],p=E(e.x,e.y,"Annotations box");o.setAnnotationsBox(p.x,p.y)}a.annotation.forEach(e=>{const p=E(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:p.x,y:p.y}],e.text)}),a.accelerators.forEach(e=>{const p=E(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,p.x,p.y)}),a.deaccelerators.forEach(e=>{const p=E(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,p.x,p.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var p;const o=await Wt("wardley",a);et.debug(o);const e=(p=at.parser)==null?void 0:p.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Gt(o,e)},"parse")},I,qt=(I=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(o){const e=this.nodes.get(o.id)??{id:o.id,label:o.label},p={...e,...o,className:o.className??e.className,labelOffsetX:o.labelOffsetX??e.labelOffsetX,labelOffsetY:o.labelOffsetY??e.labelOffsetY};this.nodes.set(o.id,p)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const p=this.pipelines.get(o);p&&p.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,p]of this.nodes)if(p.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(I,"WardleyBuilder"),I),b=new qt;function rt(){return V()["wardley-beta"]}y(rt,"getConfig");function ot(a,o,e,p,r,d,m,v,g){b.addNode({id:a,label:o,x:e,y:p,className:r,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,o,e=!1,p,r){b.addLink({source:a,target:o,dashed:e,label:p,flow:r})}y(st,"addLink");function nt(a,o,e){b.addTrend({nodeId:a,targetX:o,targetY:e})}y(nt,"addTrend");function it(a,o,e){b.addAnnotation({number:a,coordinates:o,text:e})}y(it,"addAnnotation");function dt(a,o,e){b.addNote({text:a,x:o,y:e})}y(dt,"addNote");function lt(a,o,e){b.addAccelerator({name:a,x:o,y:e})}y(lt,"addAccelerator");function ct(a,o,e){b.addDeaccelerator({name:a,x:o,y:e})}y(ct,"addDeaccelerator");function pt(a,o){b.setAnnotationsBox(a,o)}y(pt,"setAnnotationsBox");function ht(a,o){b.setSize(a,o)}y(ht,"setSize");function xt(a){b.startPipeline(a)}y(xt,"startPipeline");function ft(a,o){b.addPipelineComponent(a,o)}y(ft,"addPipelineComponent");function gt(a){b.setAxes(a)}y(gt,"updateAxes");function ut(a){return b.getNode(a)}y(ut,"getNode");function yt(a){return b.resolveNodeId(a)}y(yt,"resolveNodeId");function mt(){return b.build()}y(mt,"getWardleyData");function wt(){b.clear(),Ot()}y(wt,"clear");var Ht={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,resolveNodeId:yt,getWardleyData:mt,clear:wt,setAccTitle:Yt,getAccTitle:Et,setDiagramTitle:Xt,getDiagramTitle:At,getAccDescription:Tt,setAccDescription:Lt},jt=["Genesis","Custom Built","Product","Commodity"],Vt=y(()=>{var o,e,p,r,d,m,v,g,L,M,k,N;const{themeVariables:a}=V();return{backgroundColor:((o=a.wardley)==null?void 0:o.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((p=a.wardley)==null?void 0:p.axisTextColor)??a.primaryTextColor??"#222",gridColor:((r=a.wardley)==null?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((L=a.wardley)==null?void 0:L.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((k=a.wardley)==null?void 0:k.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),_t=y(()=>{const a=V()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),Zt=y((a,o,e,p)=>{var Q,U;et.debug(`Rendering Wardley map
2
2
  `+a);const r=_t(),d=Vt(),m=r.nodeRadius*1.6,v=p.db,g=v.getWardleyData(),L=v.getDiagramTitle(),M=((Q=g.size)==null?void 0:Q.width)??r.width,k=((U=g.size)==null?void 0:U.height)??r.height,N=Ft(o);N.selectAll("*").remove(),Rt(N,k,M,r.useMaxWidth),N.attr("viewBox",`0 0 ${M} ${k}`);const P=N.append("g").attr("class","wardley-map"),q=N.append("defs");q.append("marker").attr("id",`arrow-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${o}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),P.append("rect").attr("class","wardley-background").attr("width",M).attr("height",k).attr("fill",d.backgroundColor);const B=M-r.padding*2,F=k-r.padding*2;L&&P.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",r.padding/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(L);const T=y(t=>r.padding+t/100*B,"projectX"),A=y(t=>k-r.padding-t/100*F,"projectY"),O=P.append("g").attr("class","wardley-axes");O.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const kt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+B/2).attr("y",k-r.padding/4).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(kt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+F/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+F/2})`).text(bt);const R=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:jt;if(R.length>0){const t=P.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===R.length){let i=0;n.forEach(h=>{s.push({start:i,end:h}),i=h})}else{const i=1/R.length;R.forEach((h,l)=>{s.push({start:l*i,end:(l+1)*i})})}R.forEach((i,h)=>{const l=s[h],x=r.padding+l.start*B,f=r.padding+l.end*B,u=(x+f)/2;h>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",k-r.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(r.showGrid){const t=P.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=r.padding+B*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding-F*s).attr("y2",k-r.padding-F*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:T(t.x),y:A(t.y),node:t})}),g.pipelines.length>0){const t=P.append("g").attr("class","wardley-pipelines"),n=P.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let h=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(h=Math.min(h,u.x),l=Math.max(l,u.x),x=u.y)}),h!==1/0&&l!==-1/0){const u=r.nodeRadius*4,w=x-u/2,S=c.get(s.nodeId);if(S){const z=(h+l)/2;S.x=z,S.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",h-15).attr("y",w).attr("width",l-h+15*2).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=P.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const K=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=Z.get(t.target);return!(n!=null&&n.has(t.source))});_.selectAll("line").data(K).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*h}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*h}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*h}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*h}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${o})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${o})`:null),_.selectAll("text").data(K.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+h*h),f=8,u=h/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,h=s.x-n.x,l=s.y-n.y,x=Math.sqrt(h*h+l*l),f=8,u=-h/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,S=-l/f,z=i+w*u,W=h+S*u;let Y=Math.atan2(x,l)*180/Math.PI;return(Y>90||Y<-90)&&(Y+=180),`rotate(${Y} ${z} ${W})`}).text(t=>t.label);const $t=P.append("g").attr("class","wardley-trends"),vt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=T(t.targetX),i=A(t.targetY),h=s-n.x,l=i-n.y,x=Math.sqrt(h*h+l*l),f=r.nodeRadius+2,u=x>f?s-h/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);$t.selectAll("line").data(vt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${o})`);const C=P.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));C.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const X=C.filter(t=>t.sourceStrategy==="market");X.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=r.nodeRadius*.7,$=r.nodeRadius*1.2;if(X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),C.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),C.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",r.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=P.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:T(i.x),y:A(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const h=t.append("g").attr("class","wardley-annotation");h.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),h.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=T(g.annotationsBox.x),s=A(g.annotationsBox.y);const i=10,h=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,S)=>w.number-S.number),u=[];if(f.forEach((w,S)=>{const z=x.append("text").attr("x",n+i).attr("y",s+i+(S+1)*h).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(z)}),u.length>0){let w=0,S=0;u.forEach(j=>{const D=j.node(),Nt=D.getComputedTextLength();w=Math.max(w,Nt);const Ct=D.getBBox();S=Math.max(S,Ct.height)});const z=w+i*2+105,W=f.length*h+i*2+S/2,Y=r.padding,Pt=M-r.padding-z,St=r.padding,Mt=k-r.padding-W;n=Math.max(Y,Math.min(n,Pt)),s=Math.max(St,Math.min(s,Mt)),u.forEach((j,D)=>{j.attr("x",n+i).attr("y",s+i+(D+1)*h)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",z).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=P.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=T(n.x),i=A(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=P.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=T(n.x),i=A(n.y),h=60,l=30,x=20,f=`
3
3
  M ${s} ${i-l/2}
4
4
  L ${s+h-x} ${i-l/2}
@@ -75,4 +75,4 @@ import{p as zt}from"./chunk-JWPE2WC7-D6dXb_jr.js";import{s as Lt,g as Tt,q as At
75
75
  .wardley-notes text {
76
76
  fill: ${r.axisTextColor};
77
77
  }
78
- `},"styles"),re={parser:at,db:Ht,renderer:Kt,styles:Qt};export{re as diagram};
78
+ `},"styles"),oe={parser:at,db:Ht,renderer:Kt,styles:Qt};export{oe as diagram};
@@ -1,7 +1,7 @@
1
- import{s as pi,g as mi,q as $t,p as yi,a as bi,b as wi,_ as a,l as Ut,P as Ai,d as Ci,z as Si,K as Dt,j as Ri,M as Gt,N as _i,Q as ki,aG as Ti,aH as Xt}from"./mermaid.core-D_Dp_Kl2.js";import"./index-BKxAxaVG.js";import{i as Di}from"./init-Gi6I4Gst.js";import{o as Pi}from"./ordinal-Cboi1Yqb.js";import{l as Nt}from"./linear-DEo11t-X.js";import"./defaultLocale-DX6XiGOO.js";function vi(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function St(){var e=Pi().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,l,m=!1,u=0,d=0,S=.5;delete e.unknown;function y(){var f=t().length,L=n<s,D=L?n:s,E=L?s:n;o=(E-D)/Math.max(1,f-u+d*2),m&&(o=Math.floor(o)),D+=(E-D-o*(f-u))*S,l=o*(1-u),m&&(D=Math.round(D),l=Math.round(l));var M=vi(f).map(function(w){return D+o*w});return i(L?M.reverse():M)}return e.domain=function(f){return arguments.length?(t(f),y()):t()},e.range=function(f){return arguments.length?([s,n]=f,s=+s,n=+n,y()):[s,n]},e.rangeRound=function(f){return[s,n]=f,s=+s,n=+n,m=!0,y()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(f){return arguments.length?(m=!!f,y()):m},e.padding=function(f){return arguments.length?(u=Math.min(1,d=+f),y()):u},e.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),y()):u},e.paddingOuter=function(f){return arguments.length?(d=+f,y()):d},e.align=function(f){return arguments.length?(S=Math.max(0,Math.min(1,f)),y()):S},e.copy=function(){return St(t(),[s,n]).round(m).paddingInner(u).paddingOuter(d).align(S)},Di.apply(y(),arguments)}var Rt=function(){var e=a(function(F,r,g,x){for(g=g||{},x=F.length;x--;g[F[x]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],l=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],u=[1,25],d=[1,26],S=[1,28],y=[1,29],f=[1,30],L=[1,31],D=[1,32],E=[1,33],M=[1,34],w=[1,35],P=[1,36],c=[1,37],B=[1,43],W=[1,42],X=[1,47],N=[1,50],k=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],C=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],R=[1,65],O=[26,28],T={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:a(function(r,g,x,p,_,h,lt){var b=h.length-1;switch(_){case 5:p.setOrientation(h[b]);break;case 9:p.setDiagramTitle(h[b].text.trim());break;case 12:p.setLineData({text:"",type:"text"},h[b]);break;case 13:p.setLineData(h[b-1],h[b]);break;case 14:p.setBarData({text:"",type:"text"},h[b]);break;case 15:p.setBarData(h[b-1],h[b]);break;case 16:this.$=h[b].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=h[b].trim(),p.setAccDescription(this.$);break;case 19:this.$=h[b-1];break;case 20:case 30:this.$=[h[b-2],...h[b]];break;case 21:case 31:this.$=[h[b]];break;case 22:this.$={value:Number(h[b-1]),label:h[b]};break;case 23:this.$={value:Number(h[b]),label:""};break;case 24:p.setXAxisTitle(h[b]);break;case 25:p.setXAxisTitle(h[b-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(h[b]);break;case 28:p.setXAxisRangeData(Number(h[b-2]),Number(h[b]));break;case 29:this.$=h[b-1];break;case 32:p.setYAxisTitle(h[b]);break;case 33:p.setYAxisTitle(h[b-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(h[b-2]),Number(h[b]));break;case 39:this.$={text:h[b],type:"text"};break;case 40:this.$={text:h[b],type:"text"};break;case 41:this.$={text:h[b],type:"markdown"};break;case 42:this.$=h[b];break;case 43:this.$=h[b-1]+""+h[b];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:n,37:o,38:l}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:n,37:o,38:l}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:n,37:o,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:n,37:o,38:l}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:n,37:o,38:l}),{11:23,30:u,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:39,13:38,24:B,29:W,30:u,31:40,32:41,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:45,15:44,29:X,30:u,35:46,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:49,17:48,24:N,30:u,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:52,17:51,24:N,30:u,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{20:[1,53]},{22:[1,54]},e(k,[2,18]),{1:[2,2]},e(k,[2,8]),e(k,[2,9]),e(H,[2,39],{41:55,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c}),e(H,[2,40]),e(H,[2,41]),e(C,[2,42]),e(C,[2,44]),e(C,[2,45]),e(C,[2,46]),e(C,[2,47]),e(C,[2,48]),e(C,[2,49]),e(C,[2,50]),e(C,[2,51]),e(C,[2,52]),e(C,[2,53]),e(k,[2,10]),e(k,[2,24],{32:41,31:56,24:B,29:W}),e(k,[2,26]),e(k,[2,27]),{33:[1,57]},{11:59,30:u,34:58,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},e(k,[2,11]),e(k,[2,32],{35:60,29:X}),e(k,[2,34]),{33:[1,61]},e(k,[2,12]),{17:62,24:N},{25:63,27:64,29:R},e(k,[2,14]),{17:66,24:N},e(k,[2,16]),e(k,[2,17]),e(C,[2,43]),e(k,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(k,[2,33]),{29:[1,70]},e(k,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(O,[2,23],{30:[1,73]}),e(k,[2,15]),e(k,[2,28]),e(k,[2,29]),{11:59,30:u,34:74,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},e(k,[2,35]),e(k,[2,19]),{25:75,27:64,29:R},e(O,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:a(function(r,g){if(g.recoverable)this.trace(r);else{var x=new Error(r);throw x.hash=g,x}},"parseError"),parse:a(function(r){var g=this,x=[0],p=[],_=[null],h=[],lt=this.table,b="",dt=0,Ot=0,ui=2,Vt=1,di=h.slice.call(arguments,1),v=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);v.setInput(r,$.yy),$.yy.lexer=v,$.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var wt=v.yylloc;h.push(wt);var xi=v.options&&v.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(z){x.length=x.length-2*z,_.length=_.length-z,h.length=h.length-z}a(fi,"popStack");function Wt(){var z;return z=p.pop()||v.lex()||Vt,typeof z!="number"&&(z instanceof Array&&(p=z,z=p.pop()),z=g.symbols_[z]||z),z}a(Wt,"lex");for(var I,U,V,At,j={},xt,Y,Ft,ft;;){if(U=x[x.length-1],this.defaultActions[U]?V=this.defaultActions[U]:((I===null||typeof I>"u")&&(I=Wt()),V=lt[U]&&lt[U][I]),typeof V>"u"||!V.length||!V[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");v.showPosition?Ct="Parse error on line "+(dt+1)+`:
1
+ import{s as pi,g as mi,q as $t,p as yi,a as bi,b as wi,_ as a,l as Ut,P as Ai,d as Ci,z as Si,K as Dt,j as Ri,M as Gt,N as _i,Q as ki,aG as Ti,aH as Xt}from"./mermaid.core-C-wP0Zg2.js";import"./main-bsb0lQoL.js";import{i as Di}from"./init-Gi6I4Gst.js";import{o as Pi}from"./ordinal-Cboi1Yqb.js";import{l as Nt}from"./linear-CWQg2iA1.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./defaultLocale-DX6XiGOO.js";function vi(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function St(){var e=Pi().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,l,m=!1,u=0,d=0,S=.5;delete e.unknown;function y(){var f=t().length,L=n<s,D=L?n:s,E=L?s:n;o=(E-D)/Math.max(1,f-u+d*2),m&&(o=Math.floor(o)),D+=(E-D-o*(f-u))*S,l=o*(1-u),m&&(D=Math.round(D),l=Math.round(l));var M=vi(f).map(function(w){return D+o*w});return i(L?M.reverse():M)}return e.domain=function(f){return arguments.length?(t(f),y()):t()},e.range=function(f){return arguments.length?([s,n]=f,s=+s,n=+n,y()):[s,n]},e.rangeRound=function(f){return[s,n]=f,s=+s,n=+n,m=!0,y()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(f){return arguments.length?(m=!!f,y()):m},e.padding=function(f){return arguments.length?(u=Math.min(1,d=+f),y()):u},e.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),y()):u},e.paddingOuter=function(f){return arguments.length?(d=+f,y()):d},e.align=function(f){return arguments.length?(S=Math.max(0,Math.min(1,f)),y()):S},e.copy=function(){return St(t(),[s,n]).round(m).paddingInner(u).paddingOuter(d).align(S)},Di.apply(y(),arguments)}var Rt=function(){var e=a(function(F,r,g,x){for(g=g||{},x=F.length;x--;g[F[x]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],l=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],u=[1,25],d=[1,26],S=[1,28],y=[1,29],f=[1,30],L=[1,31],D=[1,32],E=[1,33],M=[1,34],w=[1,35],P=[1,36],c=[1,37],B=[1,43],W=[1,42],X=[1,47],N=[1,50],k=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],C=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],R=[1,65],O=[26,28],T={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:a(function(r,g,x,p,_,h,lt){var b=h.length-1;switch(_){case 5:p.setOrientation(h[b]);break;case 9:p.setDiagramTitle(h[b].text.trim());break;case 12:p.setLineData({text:"",type:"text"},h[b]);break;case 13:p.setLineData(h[b-1],h[b]);break;case 14:p.setBarData({text:"",type:"text"},h[b]);break;case 15:p.setBarData(h[b-1],h[b]);break;case 16:this.$=h[b].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=h[b].trim(),p.setAccDescription(this.$);break;case 19:this.$=h[b-1];break;case 20:case 30:this.$=[h[b-2],...h[b]];break;case 21:case 31:this.$=[h[b]];break;case 22:this.$={value:Number(h[b-1]),label:h[b]};break;case 23:this.$={value:Number(h[b]),label:""};break;case 24:p.setXAxisTitle(h[b]);break;case 25:p.setXAxisTitle(h[b-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(h[b]);break;case 28:p.setXAxisRangeData(Number(h[b-2]),Number(h[b]));break;case 29:this.$=h[b-1];break;case 32:p.setYAxisTitle(h[b]);break;case 33:p.setYAxisTitle(h[b-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(h[b-2]),Number(h[b]));break;case 39:this.$={text:h[b],type:"text"};break;case 40:this.$={text:h[b],type:"text"};break;case 41:this.$={text:h[b],type:"markdown"};break;case 42:this.$=h[b];break;case 43:this.$=h[b-1]+""+h[b];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:n,37:o,38:l}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:n,37:o,38:l}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:n,37:o,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:n,37:o,38:l}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:n,37:o,38:l}),{11:23,30:u,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:39,13:38,24:B,29:W,30:u,31:40,32:41,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:45,15:44,29:X,30:u,35:46,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:49,17:48,24:N,30:u,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{11:52,17:51,24:N,30:u,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},{20:[1,53]},{22:[1,54]},e(k,[2,18]),{1:[2,2]},e(k,[2,8]),e(k,[2,9]),e(H,[2,39],{41:55,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c}),e(H,[2,40]),e(H,[2,41]),e(C,[2,42]),e(C,[2,44]),e(C,[2,45]),e(C,[2,46]),e(C,[2,47]),e(C,[2,48]),e(C,[2,49]),e(C,[2,50]),e(C,[2,51]),e(C,[2,52]),e(C,[2,53]),e(k,[2,10]),e(k,[2,24],{32:41,31:56,24:B,29:W}),e(k,[2,26]),e(k,[2,27]),{33:[1,57]},{11:59,30:u,34:58,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},e(k,[2,11]),e(k,[2,32],{35:60,29:X}),e(k,[2,34]),{33:[1,61]},e(k,[2,12]),{17:62,24:N},{25:63,27:64,29:R},e(k,[2,14]),{17:66,24:N},e(k,[2,16]),e(k,[2,17]),e(C,[2,43]),e(k,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(k,[2,33]),{29:[1,70]},e(k,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(O,[2,23],{30:[1,73]}),e(k,[2,15]),e(k,[2,28]),e(k,[2,29]),{11:59,30:u,34:74,39:24,40:d,41:27,42:S,43:y,44:f,45:L,46:D,47:E,48:M,49:w,50:P,51:c},e(k,[2,35]),e(k,[2,19]),{25:75,27:64,29:R},e(O,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:a(function(r,g){if(g.recoverable)this.trace(r);else{var x=new Error(r);throw x.hash=g,x}},"parseError"),parse:a(function(r){var g=this,x=[0],p=[],_=[null],h=[],lt=this.table,b="",dt=0,Ot=0,ui=2,Vt=1,di=h.slice.call(arguments,1),v=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);v.setInput(r,$.yy),$.yy.lexer=v,$.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var wt=v.yylloc;h.push(wt);var xi=v.options&&v.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(z){x.length=x.length-2*z,_.length=_.length-z,h.length=h.length-z}a(fi,"popStack");function Wt(){var z;return z=p.pop()||v.lex()||Vt,typeof z!="number"&&(z instanceof Array&&(p=z,z=p.pop()),z=g.symbols_[z]||z),z}a(Wt,"lex");for(var I,U,V,At,j={},xt,Y,Ft,ft;;){if(U=x[x.length-1],this.defaultActions[U]?V=this.defaultActions[U]:((I===null||typeof I>"u")&&(I=Wt()),V=lt[U]&&lt[U][I]),typeof V>"u"||!V.length||!V[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");v.showPosition?Ct="Parse error on line "+(dt+1)+`:
2
2
  `+v.showPosition()+`
3
3
  Expecting `+ft.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Ct="Parse error on line "+(dt+1)+": Unexpected "+(I==Vt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Ct,{text:v.match,token:this.terminals_[I]||I,line:v.yylineno,loc:wt,expected:ft})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+I);switch(V[0]){case 1:x.push(I),_.push(v.yytext),h.push(v.yylloc),x.push(V[1]),I=null,Ot=v.yyleng,b=v.yytext,dt=v.yylineno,wt=v.yylloc;break;case 2:if(Y=this.productions_[V[1]][1],j.$=_[_.length-Y],j._$={first_line:h[h.length-(Y||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(Y||1)].first_column,last_column:h[h.length-1].last_column},xi&&(j._$.range=[h[h.length-(Y||1)].range[0],h[h.length-1].range[1]]),At=this.performAction.apply(j,[b,Ot,dt,$.yy,V[1],_,h].concat(di)),typeof At<"u")return At;Y&&(x=x.slice(0,-1*Y*2),_=_.slice(0,-1*Y),h=h.slice(0,-1*Y)),x.push(this.productions_[V[1]][0]),_.push(j.$),h.push(j._$),Ft=lt[x[x.length-2]][x[x.length-1]],x.push(Ft);break;case 3:return!0}}return!0},"parse")},rt=function(){var F={EOF:1,parseError:a(function(g,x){if(this.yy.parser)this.yy.parser.parseError(g,x);else throw new Error(g)},"parseError"),setInput:a(function(r,g){return this.yy=g||this.yy||{},this._input=r,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:a(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:a(function(r){var g=r.length,x=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var p=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),x.length-1&&(this.yylineno-=x.length-1);var _=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:x?(x.length===p.length?this.yylloc.first_column:0)+p[p.length-x.length].length-x[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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:a(function(r){this.unput(this.match.slice(r))},"less"),pastInput:a(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var r=this.pastInput(),g=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
5
  `+g+"^"},"showPosition"),test_match:a(function(r,g){var x,p,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),p=r[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],x=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var h in _)this[h]=_[h];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,g,x,p;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),h=0;h<_.length;h++)if(x=this._input.match(this.rules[_[h]]),x&&(!g||x[0].length>g[0].length)){if(g=x,p=h,this.options.backtrack_lexer){if(r=this.test_match(x,_[h]),r!==!1)return r;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(r=this.test_match(g,_[p]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
6
  `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var g=this.next();return g||this.lex()},"lex"),begin:a(function(g){this.conditionStack.push(g)},"begin"),popState:a(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:a(function(g){this.begin(g)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(g,x,p,_){switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return F}();T.lexer=rt;function q(){this.yy={}}return a(q,"Parser"),q.prototype=T,T.Parser=q,new q}();Rt.parser=Rt;var Li=Rt;function pt(e){return e.type==="bar"}a(pt,"isBarPlot");function mt(e){return e.type==="band"}a(mt,"isBandAxisData");function Q(e){return e.type==="linear"}a(Q,"isLinearAxisData");var K,Pt=(K=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){var d,S;if(!this.parentGroup)return{width:t.reduce((y,f)=>Math.max(f.length,y),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i),o=(S=(d=n.node())==null?void 0:d.getScreenCTM)==null?void 0:S.call(d),l=a(y=>y&&y>0?y:1,"toScale"),m=l(o==null?void 0:o.a),u=l(o==null?void 0:o.d);for(const y of t){const f=Ti(n,1,y),L=f?f.width/m:y.length*i,D=f?f.height/u:i;s.width=Math.max(s.width,L),s.height=Math.max(s.height,D)}return n.remove(),s}},a(K,"TextDimensionCalculatorWithFont"),K),Yt=.7,Ht=.2,Z,qt=(Z=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Yt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Yt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ht*t.width;this.outerPadding=Math.min(s.width/2,n);let o=s.height;this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0&&(o=Math.max(o,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height))),o+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ht*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){const i=this.normalizedLabelRotationInRad;return i===0?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(Z,"BaseAxis"),Z),J,Ei=(J=class extends qt{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=St().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=St().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Ut.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(J,"BandAxis"),J),tt,Mi=(tt=class extends qt{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=Nt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Nt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(tt,"LinearAxis"),tt);function _t(e,t,i,s){const n=new Pt(s);return mt(e)?new Ei(t,i,e.categories,e.title,n):new Mi(t,i,[e.min,e.max],e.title,n)}a(_t,"getAxis");var it,Ii=(it=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.titleWidth=0,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return n<=t.height&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.titleWidth=i.width,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}alignTo(t,i){const s=Math.min(this.titleWidth,this.chartConfig.width)/2,n=Math.min(Math.max((t+i)/2,s),this.chartConfig.width-s);this.boundingRect.x=n-s,this.boundingRect.width=s*2}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(it,"ChartTitle"),it);function jt(e,t,i,s){const n=new Pt(s);return new Ii(n,e,t,i)}a(jt,"getChartTitleComponent");var zi=.75,Bi=.5,Oi=.35;function kt(e){return{fontSize:e,markerSize:e*zi,markerSpacing:e*Oi,itemSpacing:e*Bi}}a(kt,"getLegendLayout");var et,Vi=(et=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(d=>d.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};const{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:o}=kt(this.chartConfig.legendFontSize),l=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(d=>d.title),i),m=this.chartConfig.legendPadding*2+s+n+l.width,u=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*o;return m<=t.width&&u<=t.height?(this.boundingRect.width=m,this.boundingRect.height=u):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];const{fontSize:t,markerSize:i,markerSpacing:s,itemSpacing:n}=kt(this.chartConfig.legendFontSize),o=t+n,l=this.boundingRect.x+this.chartConfig.legendPadding,m=this.boundingRect.y+this.chartConfig.legendPadding,u=[],d=[];for(const[S,y]of this.visiblePlots.entries())if(pt(y))u.push({x:l,y:m+S*o,width:i,height:i,fill:y.fill,strokeFill:y.fill,strokeWidth:0});else{const f=m+S*o+i/2;d.push({path:`M ${l},${f} L ${l+i},${f}`,strokeFill:y.strokeFill,strokeWidth:y.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:u},{groupTexts:["legend","markers"],type:"path",data:d},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((S,y)=>({text:S.title,x:l+i+s,y:m+y*o+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}},a(et,"ChartLegend"),et);function Qt(e,t,i,s){const n=new Pt(s);return new Vi(n,e,t,i)}a(Qt,"getChartLegendComponent");var st,Wi=(st=class{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]);let i;if(this.orientation==="horizontal"?i=Xt().y(n=>n[0]).x(n=>n[1])(t):i=Xt().x(n=>n[0]).y(n=>n[1])(t),!i)return[];const s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){const l=[];for(const[m,[u,d]]of t.entries()){const S=this.plotData.pointLabels[m];S&&(this.orientation==="horizontal"?l.push({x:d+10,y:u,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):l.push({x:u,y:d-10,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}l.length>0&&s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:l})}return s}},a(st,"LinePlot"),st),nt,Fi=(nt=class{constructor(t,i,s,n,o,l){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=l}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(nt,"BarPlot"),nt),at,Xi=(at=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Wi(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Fi(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}},a(at,"BasePlot"),at);function Kt(e,t,i){return new Xi(e,t,i)}a(Kt,"getPlotComponent");var ot,Ni=(ot=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:jt(t,i,s,n),plot:Kt(t,i,s),legend:Qt(t,i,s,n),xAxis:_t(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:_t(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o={width:0,height:0},l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),m=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:l,height:m});t-=u.width,i-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=u.height,i-=u.height,this.componentStore.xAxis.setAxisPosition("bottom"),u=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=u.height,this.componentStore.yAxis.setAxisPosition("left"),u=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=u.width,t-=u.width,o=this.componentStore.legend.calculateSpace({width:t,height:m}),t-=o.width,t>0&&(l+=t,t=0),i>0&&(m+=i,i=0),this.componentStore.plot.calculateSpace({width:l,height:m}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.title.alignTo(s,s+l),this.componentStore.legend.setBoundingBoxXY({x:s+l,y:n+Math.max((m-o.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+l]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+m}),this.componentStore.yAxis.setRange([n,n+m]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(d=>pt(d))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,l={width:0,height:0},m=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),d=this.componentStore.plot.calculateSpace({width:m,height:u});t-=d.width,i-=d.height,d=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=d.height,i-=d.height,this.componentStore.xAxis.setAxisPosition("left"),d=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=d.width,n=d.width,this.componentStore.yAxis.setAxisPosition("top"),d=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=d.height,o=s+d.height,l=this.componentStore.legend.calculateSpace({width:t,height:u}),t-=l.width,t>0&&(m+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:m,height:u}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.title.alignTo(n,n+m),this.componentStore.legend.setBoundingBoxXY({x:n+m,y:o+Math.max((u-l.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+m]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+u]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(S=>pt(S))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(ot,"Orchestrator"),ot),ht,Yi=(ht=class{static build(t,i,s,n){return new Ni(t,i,s,n).getDrawableElement()}},a(ht,"XYChartBuilder"),ht),ct=0,Zt,gt=Et(),ut=Lt(),A=Mt(),Tt=ut.plotColorPalette.split(",").map(e=>e.trim()),yt=!1,vt=!1;function Lt(){const e=ki(),t=Dt();return Gt(e.xyChart,t.themeVariables.xyChart)}a(Lt,"getChartDefaultThemeConfig");function Et(){const e=Dt();return Gt(_i.xyChart,e.xyChart)}a(Et,"getChartDefaultConfig");function Mt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(Mt,"getChartDefaultData");function G(e){const t=Dt();return Ri(e.trim(),t)}a(G,"textSanitizer");function Jt(e){Zt=e}a(Jt,"setTmpSVGG");function ti(e){e==="horizontal"?gt.chartOrientation="horizontal":gt.chartOrientation="vertical"}a(ti,"setOrientation");function ii(e){A.xAxis.title=G(e.text)}a(ii,"setXAxisTitle");function It(e,t){A.xAxis={type:"linear",title:A.xAxis.title,min:e,max:t},yt=!0}a(It,"setXAxisRangeData");function ei(e){A.xAxis={type:"band",title:A.xAxis.title,categories:e.map(t=>G(t.text))},yt=!0}a(ei,"setXAxisBand");function si(e){A.yAxis.title=G(e.text)}a(si,"setYAxisTitle");function ni(e,t){A.yAxis={type:"linear",title:A.yAxis.title,min:e,max:t},vt=!0}a(ni,"setYAxisRangeData");function ai(e){const t=Math.min(...e),i=Math.max(...e),s=Q(A.yAxis)?A.yAxis.min:1/0,n=Q(A.yAxis)?A.yAxis.max:-1/0;A.yAxis={type:"linear",title:A.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}a(ai,"setYAxisRangeFromPlotData");function zt(e){let t=[];if(e.length===0)return t;if(!yt){const i=Q(A.xAxis)?A.xAxis.min:1/0,s=Q(A.xAxis)?A.xAxis.max:-1/0;It(Math.min(i,1),Math.max(s,e.length))}if(mt(A.xAxis)&&e.length>A.xAxis.categories.length&&(e=e.slice(0,A.xAxis.categories.length)),vt||ai(e),mt(A.xAxis)&&(t=A.xAxis.categories.map((i,s)=>[i,e[s]])),Q(A.xAxis)){const i=A.xAxis.min,s=A.xAxis.max;if(e.length===1)t=[[`${i}`,e[0]]];else{const n=(s-i)/(e.length-1);t=e.map((o,l)=>[`${i+l*n}`,o])}}return t}a(zt,"transformDataWithoutCategory");function Bt(e){return Tt[e===0?0:e%Tt.length]}a(Bt,"getPlotColorFromPalette");function oi(e,t){const i=t.map(l=>l.value),s=t.map(l=>l.label?G(l.label):""),n=zt(i),o=s.some(l=>l!=="");A.plots.push({type:"line",title:G(e.text),strokeFill:Bt(ct),strokeWidth:2,data:n,...o?{pointLabels:s}:{}}),ct++}a(oi,"setLineData");function hi(e,t){const i=t.map(n=>n.value),s=zt(i);A.plots.push({type:"bar",title:G(e.text),fill:Bt(ct),data:s}),ct++}a(hi,"setBarData");function ri(){if(A.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return A.title=$t(),Yi.build(gt,A,ut,Zt)}a(ri,"getDrawableElem");function li(){return ut}a(li,"getChartThemeConfig");function ci(){return gt}a(ci,"getChartConfig");function gi(){return A}a(gi,"getXYChartData");var Hi=a(function(){Si(),ct=0,gt=Et(),A=Mt(),ut=Lt(),Tt=ut.plotColorPalette.split(",").map(e=>e.trim()),yt=!1,vt=!1},"clear"),$i={getDrawableElem:ri,clear:Hi,setAccTitle:wi,getAccTitle:bi,setDiagramTitle:yi,getDiagramTitle:$t,getAccDescription:mi,setAccDescription:pi,setOrientation:ti,setXAxisTitle:ii,setXAxisRangeData:It,setXAxisBand:ei,setYAxisTitle:si,setYAxisRangeData:ni,setLineData:oi,setBarData:hi,setTmpSVGG:Jt,getChartThemeConfig:li,getChartConfig:ci,getXYChartData:gi},Ui=a((e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),l=n.getChartConfig(),m=n.getXYChartData().plots[0].data.map(w=>w[1]);function u(w){return w==="top"?"text-before-edge":"middle"}a(u,"getDominantBaseLine");function d(w){return w==="left"?"start":w==="right"?"end":"middle"}a(d,"getTextAnchor");function S(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}a(S,"getTextTransformation"),Ut.debug(`Rendering xychart chart
7
- `+e);const y=Ai(t),f=y.append("g").attr("class","main"),L=f.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");Ci(y,l.height,l.width,!0),y.attr("viewBox",`0 0 ${l.width} ${l.height}`),L.attr("fill",o.backgroundColor),n.setTmpSVGG(y.append("g").attr("class","mermaid-tmp-group"));const D=n.getDrawableElem(),E={};function M(w){let P=f,c="";for(const[B]of w.entries()){let W=f;B>0&&E[c]&&(W=E[c]),c+=w[B],P=E[c],P||(P=E[c]=W.append("g").attr("class",w[B]))}return P}a(M,"getGroup");for(const w of D){if(w.data.length===0)continue;const P=M(w.groupTexts);switch(w.type){case"rect":if(P.selectAll("rect").data(w.data).enter().append("rect").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).attr("fill",c=>c.fill).attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth),l.showDataLabel){const c=l.showDataLabelOutsideBar;if(l.chartOrientation==="horizontal"){let B=function(R,O){const{data:T,label:rt}=R;return O*rt.length*W<=T.width-X};a(B,"fitsHorizontally");const W=.7,X=10,N=w.data.map((R,O)=>({data:R,label:m[O].toString()})).filter(R=>R.data.width>0&&R.data.height>0),k=N.map(R=>{const{data:O}=R;let T=O.height*.7;for(;!B(R,T)&&T>0;)T-=1;return T}),H=Math.floor(Math.min(...k)),C=a(R=>c?R.data.x+R.data.width+X:R.data.x+R.data.width-X,"determineLabelXPosition");P.selectAll("text").data(N).enter().append("text").attr("x",C).attr("y",R=>R.data.y+R.data.height/2).attr("text-anchor",c?"start":"end").attr("dominant-baseline","middle").attr("fill",o.dataLabelColor).attr("font-size",`${H}px`).text(R=>R.label)}else{let B=function(C,R,O){const{data:T,label:rt}=C,F=R*rt.length*.7,r=T.x+T.width/2,g=r-F/2,x=r+F/2,p=g>=T.x&&x<=T.x+T.width,_=T.y+O+R<=T.y+T.height;return p&&_};a(B,"fitsInBar");const W=10,X=w.data.map((C,R)=>({data:C,label:m[R].toString()})).filter(C=>C.data.width>0&&C.data.height>0),N=X.map(C=>{const{data:R,label:O}=C;let T=R.width/(O.length*.7);for(;!B(C,T,W)&&T>0;)T-=1;return T}),k=Math.floor(Math.min(...N)),H=a(C=>c?C.data.y-W:C.data.y+W,"determineLabelYPosition");P.selectAll("text").data(X).enter().append("text").attr("x",C=>C.data.x+C.data.width/2).attr("y",H).attr("text-anchor","middle").attr("dominant-baseline",c?"auto":"hanging").attr("fill",o.dataLabelColor).attr("font-size",`${k}px`).text(C=>C.label)}}break;case"text":P.selectAll("text").data(w.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",c=>c.fill).attr("font-size",c=>c.fontSize).attr("dominant-baseline",c=>u(c.verticalPos)).attr("text-anchor",c=>d(c.horizontalPos)).attr("transform",c=>S(c)).text(c=>c.text);break;case"path":P.selectAll("path").data(w.data).enter().append("path").attr("d",c=>c.path).attr("fill",c=>c.fill?c.fill:"none").attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth);break}}},"draw"),Gi={draw:Ui},te={parser:Li,db:$i,renderer:Gi};export{te as diagram};
7
+ `+e);const y=Ai(t),f=y.append("g").attr("class","main"),L=f.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");Ci(y,l.height,l.width,!0),y.attr("viewBox",`0 0 ${l.width} ${l.height}`),L.attr("fill",o.backgroundColor),n.setTmpSVGG(y.append("g").attr("class","mermaid-tmp-group"));const D=n.getDrawableElem(),E={};function M(w){let P=f,c="";for(const[B]of w.entries()){let W=f;B>0&&E[c]&&(W=E[c]),c+=w[B],P=E[c],P||(P=E[c]=W.append("g").attr("class",w[B]))}return P}a(M,"getGroup");for(const w of D){if(w.data.length===0)continue;const P=M(w.groupTexts);switch(w.type){case"rect":if(P.selectAll("rect").data(w.data).enter().append("rect").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).attr("fill",c=>c.fill).attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth),l.showDataLabel){const c=l.showDataLabelOutsideBar;if(l.chartOrientation==="horizontal"){let B=function(R,O){const{data:T,label:rt}=R;return O*rt.length*W<=T.width-X};a(B,"fitsHorizontally");const W=.7,X=10,N=w.data.map((R,O)=>({data:R,label:m[O].toString()})).filter(R=>R.data.width>0&&R.data.height>0),k=N.map(R=>{const{data:O}=R;let T=O.height*.7;for(;!B(R,T)&&T>0;)T-=1;return T}),H=Math.floor(Math.min(...k)),C=a(R=>c?R.data.x+R.data.width+X:R.data.x+R.data.width-X,"determineLabelXPosition");P.selectAll("text").data(N).enter().append("text").attr("x",C).attr("y",R=>R.data.y+R.data.height/2).attr("text-anchor",c?"start":"end").attr("dominant-baseline","middle").attr("fill",o.dataLabelColor).attr("font-size",`${H}px`).text(R=>R.label)}else{let B=function(C,R,O){const{data:T,label:rt}=C,F=R*rt.length*.7,r=T.x+T.width/2,g=r-F/2,x=r+F/2,p=g>=T.x&&x<=T.x+T.width,_=T.y+O+R<=T.y+T.height;return p&&_};a(B,"fitsInBar");const W=10,X=w.data.map((C,R)=>({data:C,label:m[R].toString()})).filter(C=>C.data.width>0&&C.data.height>0),N=X.map(C=>{const{data:R,label:O}=C;let T=R.width/(O.length*.7);for(;!B(C,T,W)&&T>0;)T-=1;return T}),k=Math.floor(Math.min(...N)),H=a(C=>c?C.data.y-W:C.data.y+W,"determineLabelYPosition");P.selectAll("text").data(X).enter().append("text").attr("x",C=>C.data.x+C.data.width/2).attr("y",H).attr("text-anchor","middle").attr("dominant-baseline",c?"auto":"hanging").attr("fill",o.dataLabelColor).attr("font-size",`${k}px`).text(C=>C.label)}}break;case"text":P.selectAll("text").data(w.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",c=>c.fill).attr("font-size",c=>c.fontSize).attr("dominant-baseline",c=>u(c.verticalPos)).attr("text-anchor",c=>d(c.horizontalPos)).attr("transform",c=>S(c)).text(c=>c.text);break;case"path":P.selectAll("path").data(w.data).enter().append("path").attr("d",c=>c.path).attr("fill",c=>c.fill?c.fill:"none").attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth);break}}},"draw"),Gi={draw:Ui},ie={parser:Li,db:$i,renderer:Gi};export{ie as diagram};
@@ -43,8 +43,9 @@
43
43
  <!-- Powerline glyphs load before first paint — no tofu flash in the preview -->
44
44
  <link rel="preload" href="/fonts/WeaveNerdMono-Regular.woff?v=2" as="font" type="font/woff" crossorigin />
45
45
  <link rel="preload" href="/fonts/WeaveNerdMono-Bold.woff?v=2" as="font" type="font/woff" crossorigin />
46
- <script type="module" crossorigin src="/assets/index-BKxAxaVG.js"></script>
47
- <link rel="stylesheet" crossorigin href="/assets/index-C0Sd4MH7.css">
46
+ <script type="module" crossorigin src="/assets/main-bsb0lQoL.js"></script>
47
+ <link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-B5Qt9EMX.js">
48
+ <link rel="stylesheet" crossorigin href="/assets/main-XLn3EZFh.css">
48
49
  </head>
49
50
  <body class="bg-neutral-950 text-neutral-100">
50
51
  <div id="root"></div>
@@ -0,0 +1,130 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <title>weave-pet-window</title>
6
+ <style>
7
+ /* 透明窗的前提:body 不可见区域必须透出去(WebView2 DefaultBackgroundColor=Transparent) */
8
+ html,
9
+ body {
10
+ margin: 0;
11
+ padding: 0;
12
+ width: 100%;
13
+ height: 100%;
14
+ background: transparent;
15
+ overflow: hidden;
16
+ -webkit-user-select: none;
17
+ -moz-user-select: none;
18
+ user-select: none;
19
+ cursor: grab;
20
+ }
21
+ body.dragging,
22
+ body:active {
23
+ cursor: grabbing;
24
+ }
25
+ canvas {
26
+ display: block;
27
+ width: 100%;
28
+ height: 100%;
29
+ }
30
+ /* 提醒气泡栈:宠物上方一列,待答常驻、其余提醒到点淡出 */
31
+ #bubbles {
32
+ position: absolute;
33
+ top: 4px;
34
+ left: 50%;
35
+ transform: translateX(-50%);
36
+ width: 92%;
37
+ display: flex;
38
+ flex-direction: column;
39
+ align-items: center;
40
+ gap: 4px;
41
+ pointer-events: none;
42
+ }
43
+ #bubbles .bubble {
44
+ max-width: 100%;
45
+ box-sizing: border-box;
46
+ padding: 3px 8px;
47
+ border-radius: 8px;
48
+ background: rgba(23, 23, 23, 0.92);
49
+ color: #fafafa;
50
+ font: 11px/1.4 system-ui, sans-serif;
51
+ /* 最多两行,超出再省略(会话名长起来单行放不下) */
52
+ display: -webkit-box;
53
+ -webkit-line-clamp: 2;
54
+ -webkit-box-orient: vertical;
55
+ overflow: hidden;
56
+ overflow-wrap: anywhere;
57
+ opacity: 0;
58
+ transition: opacity 0.25s ease;
59
+ pointer-events: auto;
60
+ cursor: pointer;
61
+ }
62
+ #bubbles .bubble.show {
63
+ opacity: 1;
64
+ }
65
+ /* 休息打呼:三个 z 依次上浮淡出,悬在宠物头右上方。
66
+ * 尺寸随宠物档缩放(--zzz-scale 由 main.ts 按 SIZE_PX 设),这里只写相对几何。 */
67
+ #zzz {
68
+ position: absolute;
69
+ width: calc(24px * var(--zzz-scale, 1));
70
+ height: calc(20px * var(--zzz-scale, 1));
71
+ display: none;
72
+ pointer-events: none;
73
+ }
74
+ #zzz.show {
75
+ display: block;
76
+ }
77
+ #zzz span {
78
+ position: absolute;
79
+ bottom: 0;
80
+ left: 0;
81
+ color: #c9bcff;
82
+ font: calc(9px * var(--zzz-scale, 1)) / 1 system-ui, sans-serif;
83
+ text-shadow: 0 0 2px rgba(0, 0, 0, 0.55);
84
+ opacity: 0;
85
+ animation: zzz-float 2.4s ease-out infinite;
86
+ }
87
+ #zzz span:nth-child(2) {
88
+ left: calc(5px * var(--zzz-scale, 1));
89
+ bottom: calc(4px * var(--zzz-scale, 1));
90
+ font-size: calc(11px * var(--zzz-scale, 1));
91
+ animation-delay: 0.8s;
92
+ }
93
+ #zzz span:nth-child(3) {
94
+ left: calc(11px * var(--zzz-scale, 1));
95
+ bottom: calc(8px * var(--zzz-scale, 1));
96
+ font-size: calc(13px * var(--zzz-scale, 1));
97
+ animation-delay: 1.6s;
98
+ }
99
+ #zzz.frozen span {
100
+ animation-play-state: paused;
101
+ }
102
+ @keyframes zzz-float {
103
+ 0% {
104
+ opacity: 0;
105
+ transform: translate(0, 0) scale(0.8);
106
+ }
107
+ 25% {
108
+ opacity: 0.9;
109
+ }
110
+ 100% {
111
+ opacity: 0;
112
+ transform: translate(calc(3px * var(--zzz-scale, 1)), calc(-12px * var(--zzz-scale, 1))) scale(1.1);
113
+ }
114
+ }
115
+ @media (prefers-reduced-motion: reduce) {
116
+ #zzz span {
117
+ animation: none;
118
+ opacity: 0.85;
119
+ }
120
+ }
121
+ </style>
122
+ <script type="module" crossorigin src="/assets/pet-J6izA90s.js"></script>
123
+ <link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-B5Qt9EMX.js">
124
+ </head>
125
+ <body>
126
+ <canvas id="stage"></canvas>
127
+ <div id="bubbles"></div>
128
+ <div id="zzz"><span>z</span><span>z</span><span>z</span></div>
129
+ </body>
130
+ </html>
@@ -45,3 +45,5 @@ export declare function builtinMarketRoot(): string;
45
45
  export declare function builtinPacksRoot(): string;
46
46
  /** 内置 SPI 规则包的平铺装载根。 */
47
47
  export declare function builtinRulesRoot(): string;
48
+ /** 内置宠物资产根(`resources/pets/`,daemon 播种到 `<data>/pets/`)。 */
49
+ export declare function builtinPetsRoot(): string;
@@ -1 +1 @@
1
- import t from"node:path";import{fileURLToPath as i}from"node:url";const n=t.dirname(i(import.meta.url)),s=[{name:"review",category:"command",sourcePath:"resources/weave-market/init/commands/review.md",description:"Review branch changes"},{name:"scaffold",category:"command",sourcePath:"resources/weave-market/init/commands/scaffold.md",description:"Generate component scaffold"},{name:"explain",category:"command",sourcePath:"resources/weave-market/init/commands/explain.md",description:"Explain selected code"},{name:"test",category:"command",sourcePath:"resources/weave-market/init/commands/test.md",description:"Write or update tests"},{name:"writer",category:"agent",sourcePath:"resources/weave-market/init/agents/writer.md",description:"Focused drafting agent"},{name:"reviewer",category:"agent",sourcePath:"resources/weave-market/init/agents/reviewer.md",description:"Critical review specialist"},{name:"researcher",category:"agent",sourcePath:"resources/weave-market/init/agents/researcher.md",description:"Exploration and analysis agent"},{name:"planner",category:"agent",sourcePath:"resources/weave-market/init/agents/planner.md",description:"Planning and design agent"}];export class TemplateRegistry{entries;pluginEntries=[];constructor(){this.entries=[...s]}register(e){return this.getByName(e.name)?!1:(this.pluginEntries.push(e),!0)}getPluginEntries(e){return this.pluginEntries.filter(r=>r.name.startsWith(`${e}:`))}getByCategory(e){return[...this.entries,...this.pluginEntries].filter(r=>r.category===e)}getByName(e){return[...this.entries,...this.pluginEntries].find(r=>r.name===e)}resolvePath(e){return t.isAbsolute(e.sourcePath)?e.sourcePath:t.join(n,e.sourcePath)}getSkillsSourceDir(){return t.join(builtinMarketRoot(),"skills")}getCommandsSourceDir(){return t.join(builtinMarketRoot(),"init","commands")}getAgentsSourceDir(){return t.join(builtinMarketRoot(),"init","agents")}getAll(){return[...this.entries,...this.pluginEntries]}}export const templateRegistry=new TemplateRegistry;export function builtinMarketRoot(){return t.join(n,"resources","weave-market")}export function builtinPacksRoot(){return t.join(builtinMarketRoot(),"plugins")}export function builtinRulesRoot(){return t.join(builtinMarketRoot(),"rules")}
1
+ import t from"node:path";import{fileURLToPath as i}from"node:url";const n=t.dirname(i(import.meta.url)),s=[{name:"review",category:"command",sourcePath:"resources/weave-market/init/commands/review.md",description:"Review branch changes"},{name:"scaffold",category:"command",sourcePath:"resources/weave-market/init/commands/scaffold.md",description:"Generate component scaffold"},{name:"explain",category:"command",sourcePath:"resources/weave-market/init/commands/explain.md",description:"Explain selected code"},{name:"test",category:"command",sourcePath:"resources/weave-market/init/commands/test.md",description:"Write or update tests"},{name:"writer",category:"agent",sourcePath:"resources/weave-market/init/agents/writer.md",description:"Focused drafting agent"},{name:"reviewer",category:"agent",sourcePath:"resources/weave-market/init/agents/reviewer.md",description:"Critical review specialist"},{name:"researcher",category:"agent",sourcePath:"resources/weave-market/init/agents/researcher.md",description:"Exploration and analysis agent"},{name:"planner",category:"agent",sourcePath:"resources/weave-market/init/agents/planner.md",description:"Planning and design agent"}];export class TemplateRegistry{entries;pluginEntries=[];constructor(){this.entries=[...s]}register(e){return this.getByName(e.name)?!1:(this.pluginEntries.push(e),!0)}getPluginEntries(e){return this.pluginEntries.filter(r=>r.name.startsWith(`${e}:`))}getByCategory(e){return[...this.entries,...this.pluginEntries].filter(r=>r.category===e)}getByName(e){return[...this.entries,...this.pluginEntries].find(r=>r.name===e)}resolvePath(e){return t.isAbsolute(e.sourcePath)?e.sourcePath:t.join(n,e.sourcePath)}getSkillsSourceDir(){return t.join(builtinMarketRoot(),"skills")}getCommandsSourceDir(){return t.join(builtinMarketRoot(),"init","commands")}getAgentsSourceDir(){return t.join(builtinMarketRoot(),"init","agents")}getAll(){return[...this.entries,...this.pluginEntries]}}export const templateRegistry=new TemplateRegistry;export function builtinMarketRoot(){return t.join(n,"resources","weave-market")}export function builtinPacksRoot(){return t.join(builtinMarketRoot(),"plugins")}export function builtinRulesRoot(){return t.join(builtinMarketRoot(),"rules")}export function builtinPetsRoot(){return t.join(n,"resources","pets")}
@@ -0,0 +1,7 @@
1
+ {
2
+ "id": "weave-spider",
3
+ "displayName": "Weave Spider",
4
+ "description": "The default weave pet — a small spider that weaves alongside you.",
5
+ "spriteVersionNumber": 2,
6
+ "spritesheetPath": "spritesheet.png"
7
+ }
@@ -34,6 +34,12 @@
34
34
  "description": "Weave orchestration via MCP: list/get/create/update/delete/trigger/runs — workflow, argument shapes, response formats and pitfalls",
35
35
  "version": "0.1.0",
36
36
  "source": "./plugins/core-skills/weave-orchestration"
37
+ },
38
+ {
39
+ "name": "weave-pet-hatcher",
40
+ "description": "Hatch a weave desktop pet: generate spritesheet rows, assemble the codex-compatible v2 atlas, validate, and install into the weave pets data dir",
41
+ "version": "0.1.0",
42
+ "source": "./plugins/core-skills/weave-pet-hatcher"
37
43
  }
38
44
  ]
39
45
  }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "weave-pet-hatcher",
3
+ "version": "0.1.0",
4
+ "description": "Hatch a weave desktop pet: generate spritesheet rows, assemble the codex-compatible v2 atlas, validate, and install into the weave pets data dir",
5
+ "author": {
6
+ "name": "weave"
7
+ }
8
+ }
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: weave-pet-hatcher
3
+ description: 孵化一只 weave 桌面宠物——生成精灵图各行、拼装 codex 兼容 v2 图集、校验并装进 weave 的 pets 数据目录。要创建新宠物、改现有宠物外观、把角色图做成桌面宠物时使用。
4
+ ---
5
+
6
+ # Weave Pet Hatcher
7
+
8
+ 孵化一只 weave 桌面宠物:8 列 × 11 行精灵图集(单元 192×208,整图 1536×2288)+
9
+ `pet.json`,装进 weave 数据目录后即可在 dashboard 设置里选用。
10
+
11
+ ## 契约(与 codex v2 兼容)
12
+
13
+ | 行 | 状态 | 用到的列 |
14
+ |---|---|---|
15
+ | 0 | idle | 0-5 |
16
+ | 1 | running-right | 0-7 |
17
+ | 2 | running-left | 0-7 |
18
+ | 3 | waving | 0-3 |
19
+ | 4 | jumping | 0-4 |
20
+ | 5 | failed | 0-7 |
21
+ | 6 | waiting | 0-5 |
22
+ | 7 | running | 0-5 |
23
+ | 8 | review | 0-5 |
24
+ | 9 | 注视方向 A(000→157.5°,顺时针) | 0-7 |
25
+ | 10 | 注视方向 B(180→337.5°) | 0-7 |
26
+
27
+ - 单元 192×208;标准行未用到的格子必须全透明;`000°` = 向上看(不是正面)。
28
+ - 动画时长表是宿主内建的,manifest 不写。
29
+ - `pet.json` 形状:
30
+
31
+ ```json
32
+ {
33
+ "id": "pet-name",
34
+ "displayName": "Pet Name",
35
+ "description": "One short sentence.",
36
+ "spriteVersionNumber": 2,
37
+ "spritesheetPath": "spritesheet.webp"
38
+ }
39
+ ```
40
+
41
+ `spriteVersionNumber: 2` 必须写——缺了按 v1(9 行)解读,2288 高的图会被拒。
42
+ 只做 9 行标准动画时写 `1`、整图 1536×1872。
43
+
44
+ ## 落点
45
+
46
+ weave 的宠物目录由 daemon 提供:`GET /api/pets` 的 `root` 字段就是资产根
47
+ (默认 `<数据目录>/data/pets/`)。每只宠物一个子目录:
48
+
49
+ ```text
50
+ <pets-root>/<pet-id>/
51
+ ├── pet.json
52
+ └── spritesheet.webp (或 spritesheet.png)
53
+ ```
54
+
55
+ 不知道数据目录在哪时,问 dashboard 设置页,或直接看 `GET /api/pets` 的响应。
56
+
57
+ ## 工作流
58
+
59
+ ### 1. 概念与参考
60
+
61
+ 收集:宠物名(id 用小写连字符)、一句话描述、参考图(可选)。有参考图就把它们
62
+ 作为每一行的生成基准;没有就先用文字生成一张「基础设定图」,之后所有行都以它为
63
+ 身份基准(同样的脸、配色、材质、比例、道具)。
64
+
65
+ ### 2. 生图
66
+
67
+ 用当前 harness 自己的图像能力生成。每行生成一条**横排条带**(该行的帧从左到右
68
+ 排开、帧间距均匀、角色居中、四周留安全边),而不是逐帧单图:
69
+
70
+ - 条带背景用纯色抠像底(如纯绿 #00FF00),角色绝不使用与底色相近的颜色。
71
+ - 所有行共用同一张基础设定图作 grounding;行与行之间身份漂移 = 失败。
72
+ - 状态语义(每行画什么):
73
+ - `idle` 安静呼吸/眨眼循环,第一帧兼作 reduced-motion 静帧;
74
+ - `running-right` / `running-left` 朝对应方向的位移跑动,步态明显交替;
75
+ - `waving` 挥手致意(只靠肢体姿势表达,不画速度线/波纹);
76
+ - `jumping` 起跳-腾空-落地(不画影子/尘土);
77
+ - `failed` 沮丧/出错反应(委屈耷拉、翻倒均可,不画漂浮符号);
78
+ - `waiting` 期待地等你回应(前倾、举手、眼巴巴);
79
+ - `running` 忙碌工作态(打字/思考/扫描,**不是**字面跑步);
80
+ - `review` 专注检视成果(眯眼、凑近、点头);
81
+ - 行 9/10 十六个注视方向构成一条连续顺时针弧线,相邻格动作连续、
82
+ 四个基数方向(上/右/下/左)必须一眼可辨。
83
+ - 禁止:文字、阴影、光晕、脱离身体的特效、出格裁切、格间串姿。
84
+
85
+ ### 3. 拼装与校验(本 skill 自带脚本,纯 node 零依赖)
86
+
87
+ ```bash
88
+ node <skill-dir>/scripts/assemble-pet.mjs \
89
+ --rows-dir <run-dir>/rows \
90
+ --out-dir <run-dir>/final \
91
+ --pet-id <pet-id> \
92
+ --display-name "<Name>" \
93
+ --description "<one sentence>" \
94
+ --version 2
95
+ ```
96
+
97
+ `<run-dir>/rows/` 里每行一个 PNG 条带:`row-0.png` … `row-10.png`(v1 只到
98
+ row-8)。脚本负责:切格 → 尺寸校验(每格恰好 192×208)→ 拼整图 → 抠像底转透明
99
+ → 写 `pet.json` + `spritesheet.png`,并产出 `contact-sheet.png`(每行缩略一览)
100
+ 供目检。
101
+
102
+ 校验失败(条带宽度不对、格数不足)会明确报错哪一行——重生成那一行即可,
103
+ **不要**手补单格进成品。
104
+
105
+ ### 4. 目检
106
+
107
+ 打开 `contact-sheet.png` 逐行核对:身份一致、状态语义正确、无裁切、无背景残留。
108
+ 注视行把 16 格按顺序扫一遍:基数方向不清 = 重生成整行。
109
+
110
+ ### 5. 安装
111
+
112
+ 把 `final/pet.json` 与 `final/spritesheet.png` 拷进 `<pets-root>/<pet-id>/`
113
+ (webp 可选:png 直接可用)。然后提示用户:**dashboard → 设置 → 桌面宠物**
114
+ 里选中新宠物;宠物窗已开着时,关掉再开(或重启 daemon)即可换装。
115
+
116
+ ## 边界
117
+
118
+ - weave 宠物窗当前仅 Windows(WebView2);资产本身跨平台通用。
119
+ - 图集上限 8 MB(超过会被 `/pets/:id/spritesheet` 拒绝)。
120
+ - 不要修改 weave 内置默认宠(`weave-spider`)的目录——daemon 播种时已存在
121
+ 的目录不会被覆盖,但尊重用户数据是底线。