@baique/pi-web-sky 0.1.39 → 0.1.40

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 (379) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +9 -14
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/react-loadable-manifest.json +51 -51
  6. package/.next/required-server-files.js +1 -1
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/routes-manifest.json +3 -45
  9. package/.next/server/app/_global-error/page.js +2 -2
  10. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page.js +1 -1
  17. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/_not-found.html +1 -1
  19. package/.next/server/app/_not-found.rsc +3 -3
  20. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  21. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  22. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  23. package/.next/server/app/api/agent/[id]/bash-output/route.js +2 -2
  24. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  25. package/.next/server/app/api/agent/[id]/route.js +2 -2
  26. package/.next/server/app/api/agent/new/route.js +1 -1
  27. package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
  28. package/.next/server/app/api/agent/running/route.js +1 -1
  29. package/.next/server/app/api/app-update/route.js +1 -1
  30. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  31. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  32. package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
  33. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  34. package/.next/server/app/api/auth/providers/route.js +1 -1
  35. package/.next/server/app/api/boards/[id]/reconcile/route.js +1 -0
  36. package/.next/server/app/api/boards/[id]/reconcile/route_client-reference-manifest.js +1 -0
  37. package/.next/server/app/api/boards/[id]/route.js +1 -1
  38. package/.next/server/app/api/boards/purge-orphans/route.js +1 -1
  39. package/.next/server/app/api/boards/reorder/route.js +1 -1
  40. package/.next/server/app/api/boards/route.js +1 -1
  41. package/.next/server/app/api/cwd/browse/route.js +1 -1
  42. package/.next/server/app/api/cwd/validate/route.js +2 -2
  43. package/.next/server/app/api/default-cwd/route.js +2 -2
  44. package/.next/server/app/api/file-index/route.js +2 -2
  45. package/.next/server/app/api/files/[...path]/route.js +3 -3
  46. package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -1
  47. package/.next/server/app/api/git/diff/route.js +1 -1
  48. package/.next/server/app/api/git/status/route.js +1 -1
  49. package/.next/server/app/api/home/route.js +1 -1
  50. package/.next/server/app/api/mcp/route.js +1 -1
  51. package/.next/server/app/api/models/route.js +2 -2
  52. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  53. package/.next/server/app/api/models-config/discover/route.js +1 -1
  54. package/.next/server/app/api/models-config/route.js +1 -1
  55. package/.next/server/app/api/models-config/test/route.js +1 -1
  56. package/.next/server/app/api/plugins/route.js +2 -2
  57. package/.next/server/app/api/project-trust/route.js +2 -2
  58. package/.next/server/app/api/quota/route.js +1 -1
  59. package/.next/server/app/api/search/route.js +2 -2
  60. package/.next/server/app/api/sessions/[id]/auto-name/route.js +3 -3
  61. package/.next/server/app/api/sessions/[id]/context/route.js +2 -2
  62. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +2 -2
  63. package/.next/server/app/api/sessions/[id]/export/route.js +2 -2
  64. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  65. package/.next/server/app/api/sessions/[id]/state/route.js +2 -2
  66. package/.next/server/app/api/sessions/[id]/todos/route.js +2 -2
  67. package/.next/server/app/api/sessions/route.js +2 -2
  68. package/.next/server/app/api/skills/check/route.js +1 -1
  69. package/.next/server/app/api/skills/install/route.js +2 -2
  70. package/.next/server/app/api/skills/route.js +1 -1
  71. package/.next/server/app/api/skills/search/route.js +1 -1
  72. package/.next/server/app/api/skills/update/route.js +1 -1
  73. package/.next/server/app/api/task-card-questions/[id]/answer/route.js +1 -1
  74. package/.next/server/app/api/task-card-questions/route.js +1 -1
  75. package/.next/server/app/api/task-cards/[id]/route.js +1 -1
  76. package/.next/server/app/api/task-cards/route.js +1 -1
  77. package/.next/server/app/api/task-scheduler/status/route.js +1 -1
  78. package/.next/server/app/api/tasks/[id]/board/route.js +1 -1
  79. package/.next/server/app/api/tasks/[id]/route.js +1 -1
  80. package/.next/server/app/api/tasks/reorder/route.js +1 -1
  81. package/.next/server/app/api/tasks/route.js +1 -1
  82. package/.next/server/app/api/terminal/[id]/events/route.js +2 -2
  83. package/.next/server/app/api/terminal/[id]/route.js +2 -2
  84. package/.next/server/app/api/terminal/route.js +2 -2
  85. package/.next/server/app/api/worktrees/route.js +2 -2
  86. package/.next/server/app/favicon.ico/route.js +1 -1
  87. package/.next/server/app/index.html +1 -1
  88. package/.next/server/app/index.rsc +5 -5
  89. package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  90. package/.next/server/app/index.segments/_full.segment.rsc +5 -5
  91. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  92. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  93. package/.next/server/app/page.js +7 -7
  94. package/.next/server/app/page_client-reference-manifest.js +1 -1
  95. package/.next/server/app-paths-manifest.json +9 -14
  96. package/.next/server/chunks/1094.js +2 -2
  97. package/.next/server/chunks/1601.js +1 -1
  98. package/.next/server/chunks/1860.js +1 -1
  99. package/.next/server/chunks/2075.js +1 -1
  100. package/.next/server/chunks/2169.js +1 -1
  101. package/.next/server/chunks/2404.js +1 -1
  102. package/.next/server/chunks/2524.js +1 -0
  103. package/.next/server/chunks/3012.js +1 -1
  104. package/.next/server/chunks/{5760.js → 3379.js} +1 -1
  105. package/.next/server/chunks/3500.js +1 -1
  106. package/.next/server/chunks/4226.js +5 -2
  107. package/.next/server/chunks/4267.js +1 -1
  108. package/.next/server/chunks/4563.js +1 -1
  109. package/.next/server/chunks/5318.js +1 -1
  110. package/.next/server/chunks/542.js +3 -44
  111. package/.next/server/chunks/5794.js +1 -1
  112. package/.next/server/chunks/6052.js +1 -1
  113. package/.next/server/chunks/6253.js +1 -1
  114. package/.next/server/chunks/6288.js +1 -1
  115. package/.next/server/chunks/6366.js +1 -1
  116. package/.next/server/chunks/673.js +1 -1
  117. package/.next/server/chunks/6916.js +2 -2
  118. package/.next/server/chunks/7128.js +43 -0
  119. package/.next/server/chunks/7265.js +2 -2
  120. package/.next/server/chunks/7799.js +1 -1
  121. package/.next/server/chunks/8106.js +1 -1
  122. package/.next/server/chunks/8333.js +1 -1
  123. package/.next/server/chunks/8604.js +1 -1
  124. package/.next/server/chunks/861.js +1 -0
  125. package/.next/server/chunks/8713.js +1 -1
  126. package/.next/server/chunks/8782.js +2 -2
  127. package/.next/server/chunks/898.js +1 -1
  128. package/.next/server/chunks/922.js +2 -2
  129. package/.next/server/chunks/9280.js +6 -6
  130. package/.next/server/chunks/9510.js +1 -1
  131. package/.next/server/instrumentation.js +1 -1
  132. package/.next/server/instrumentation.js.nft.json +1 -1
  133. package/.next/server/middleware-build-manifest.js +1 -1
  134. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  135. package/.next/server/pages/404.html +1 -1
  136. package/.next/server/pages/500.html +1 -1
  137. package/.next/server/server-reference-manifest.json +1 -1
  138. package/.next/static/chunks/{103.23142a67b02246a8.js → 103.6c91a059aa01d92c.js} +2 -2
  139. package/.next/static/chunks/{1032.12b382a9096ab2a4.js → 1032.9e8f793d46f463f8.js} +1 -1
  140. package/.next/static/chunks/{1063.775c442bdbeef08b.js → 1063.470df8a037dc8409.js} +1 -1
  141. package/.next/static/chunks/1a258343.f4fc2c133917ded8.js +2 -0
  142. package/.next/static/chunks/{1ba63609.b2ae90f43319a29e.js → 1ba63609.569928c7234f832c.js} +1 -1
  143. package/.next/static/chunks/{2181.ba21239d3ac39f81.js → 2181.b8dda21843ef5e74.js} +1 -1
  144. package/.next/static/chunks/{2325.23caf22075e51aa5.js → 2325.23e538886331cf64.js} +1 -1
  145. package/.next/static/chunks/{2356.523277bb8c6bf72a.js → 2356.b7312589c345edec.js} +1 -1
  146. package/.next/static/chunks/{268.72794ee2773c2060.js → 268.a1d90aca268be18a.js} +1 -1
  147. package/.next/static/chunks/{2695.6f49435bae1e6f33.js → 2695.5624aa3aae540e87.js} +1 -1
  148. package/.next/static/chunks/{2703.495a65ed14b2f094.js → 2703.097bc88286733740.js} +1 -1
  149. package/.next/static/chunks/{2821.934bcf60fbdc28c6.js → 2821.d2392a93d192fe92.js} +1 -1
  150. package/.next/static/chunks/3308.2cd6f20e6c0f4e92.js +73 -0
  151. package/.next/static/chunks/{3336.a76f9485fe7cb762.js → 3336.9b1dc9ec3507d64f.js} +1 -1
  152. package/.next/static/chunks/3546.779d2c7646aa77cc.js +1 -0
  153. package/.next/static/chunks/{370.8e8f3cf8eb0e29dd.js → 370.cde2a84caa84054f.js} +1 -1
  154. package/.next/static/chunks/{3716.72bf4c9d7325debd.js → 3716.5bac496cea32ca8f.js} +1 -1
  155. package/.next/static/chunks/{3995.eca0f5bef1fc3ae5.js → 3995.cd112debcd64c610.js} +1 -1
  156. package/.next/static/chunks/{4004.74b9bcf5478b1663.js → 4004.a8f79ef62f32aa30.js} +2 -2
  157. package/.next/static/chunks/{4202.8440832386f023c7.js → 4202.96f5b1beb8b3e3f5.js} +1 -1
  158. package/.next/static/chunks/{4238.6f102dcbcf2ae339.js → 4238.28efbf9aa0c82d90.js} +1 -1
  159. package/.next/static/chunks/{4405.7a19458960a1058e.js → 4405.cda46a596a02aef7.js} +1 -1
  160. package/.next/static/chunks/54a60aa6.5e4421e7afde4de8.js +78 -0
  161. package/.next/static/chunks/{6121.eb9023b1cbc78ee2.js → 6121.5e650e714b402b6f.js} +1 -1
  162. package/.next/static/chunks/{6195.1153369f5f8b13a2.js → 6195.1b7f9dc127381bbc.js} +1 -1
  163. package/.next/static/chunks/6380.d148a8e2c701ad78.js +68 -0
  164. package/.next/static/chunks/6582.efef0ed269bacae2.js +1 -0
  165. package/.next/static/chunks/6be7e44c.00d0163f409986f0.js +1 -0
  166. package/.next/static/chunks/{7331.2add3c4e125a2dba.js → 7331.4afa66d6353c8e07.js} +1 -1
  167. package/.next/static/chunks/752.f41a9dcb0e6548eb.js +1 -0
  168. package/.next/static/chunks/{8200.a36b9f8c983c6b9e.js → 8200.350d650649b977eb.js} +1 -1
  169. package/.next/static/chunks/{8885.cf60cac98bf8b70c.js → 8885.2c060cb45c85547b.js} +1 -1
  170. package/.next/static/chunks/{918.6a9bbe564e4a2d0f.js → 918.593eb466d35cb8ad.js} +1 -1
  171. package/.next/static/chunks/{9698.4d09a99b9d99f3e5.js → 9698.758755d0387e0e22.js} +2 -2
  172. package/.next/static/chunks/97.fb73c551e14b3612.js +2 -0
  173. package/.next/static/chunks/{993e5495.8797001fcfcf2889.js → 993e5495.12cdfbc3af5c79e9.js} +1 -1
  174. package/.next/static/chunks/{9974.9a0f79beca65e8c4.js → 9974.5ee982e074ad047e.js} +1 -1
  175. package/.next/static/chunks/app/_global-error/page-bb8f79f321e26750.js +1 -0
  176. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-bb8f79f321e26750.js +1 -0
  177. package/.next/static/chunks/app/api/agent/[id]/events/route-bb8f79f321e26750.js +1 -0
  178. package/.next/static/chunks/app/api/agent/[id]/route-bb8f79f321e26750.js +1 -0
  179. package/.next/static/chunks/app/api/agent/new/route-bb8f79f321e26750.js +1 -0
  180. package/.next/static/chunks/app/api/agent/running/route-bb8f79f321e26750.js +1 -0
  181. package/.next/static/chunks/app/api/app-update/route-bb8f79f321e26750.js +1 -0
  182. package/.next/static/chunks/app/api/auth/all-providers/route-bb8f79f321e26750.js +1 -0
  183. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-bb8f79f321e26750.js +1 -0
  184. package/.next/static/chunks/app/api/auth/login/[provider]/route-bb8f79f321e26750.js +1 -0
  185. package/.next/static/chunks/app/api/auth/logout/[provider]/route-bb8f79f321e26750.js +1 -0
  186. package/.next/static/chunks/app/api/auth/providers/route-bb8f79f321e26750.js +1 -0
  187. package/.next/static/chunks/app/api/boards/[id]/reconcile/route-bb8f79f321e26750.js +1 -0
  188. package/.next/static/chunks/app/api/boards/[id]/route-bb8f79f321e26750.js +1 -0
  189. package/.next/static/chunks/app/api/boards/purge-orphans/route-bb8f79f321e26750.js +1 -0
  190. package/.next/static/chunks/app/api/boards/reorder/route-bb8f79f321e26750.js +1 -0
  191. package/.next/static/chunks/app/api/boards/route-bb8f79f321e26750.js +1 -0
  192. package/.next/static/chunks/app/api/cwd/browse/route-bb8f79f321e26750.js +1 -0
  193. package/.next/static/chunks/app/api/cwd/validate/route-bb8f79f321e26750.js +1 -0
  194. package/.next/static/chunks/app/api/default-cwd/route-bb8f79f321e26750.js +1 -0
  195. package/.next/static/chunks/app/api/file-index/route-bb8f79f321e26750.js +1 -0
  196. package/.next/static/chunks/app/api/files/[...path]/route-bb8f79f321e26750.js +1 -0
  197. package/.next/static/chunks/app/api/git/diff/route-bb8f79f321e26750.js +1 -0
  198. package/.next/static/chunks/app/api/git/status/route-bb8f79f321e26750.js +1 -0
  199. package/.next/static/chunks/app/api/home/route-bb8f79f321e26750.js +1 -0
  200. package/.next/static/chunks/app/api/mcp/route-bb8f79f321e26750.js +1 -0
  201. package/.next/static/chunks/app/api/models/route-bb8f79f321e26750.js +1 -0
  202. package/.next/static/chunks/app/api/models-config/catalog/route-bb8f79f321e26750.js +1 -0
  203. package/.next/static/chunks/app/api/models-config/discover/route-bb8f79f321e26750.js +1 -0
  204. package/.next/static/chunks/app/api/models-config/route-bb8f79f321e26750.js +1 -0
  205. package/.next/static/chunks/app/api/models-config/test/route-bb8f79f321e26750.js +1 -0
  206. package/.next/static/chunks/app/api/plugins/route-bb8f79f321e26750.js +1 -0
  207. package/.next/static/chunks/app/api/project-trust/route-bb8f79f321e26750.js +1 -0
  208. package/.next/static/chunks/app/api/quota/route-bb8f79f321e26750.js +1 -0
  209. package/.next/static/chunks/app/api/search/route-bb8f79f321e26750.js +1 -0
  210. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-bb8f79f321e26750.js +1 -0
  211. package/.next/static/chunks/app/api/sessions/[id]/context/route-bb8f79f321e26750.js +1 -0
  212. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-bb8f79f321e26750.js +1 -0
  213. package/.next/static/chunks/app/api/sessions/[id]/export/route-bb8f79f321e26750.js +1 -0
  214. package/.next/static/chunks/app/api/sessions/[id]/route-bb8f79f321e26750.js +1 -0
  215. package/.next/static/chunks/app/api/sessions/[id]/state/route-bb8f79f321e26750.js +1 -0
  216. package/.next/static/chunks/app/api/sessions/[id]/todos/route-bb8f79f321e26750.js +1 -0
  217. package/.next/static/chunks/app/api/sessions/route-bb8f79f321e26750.js +1 -0
  218. package/.next/static/chunks/app/api/skills/check/route-bb8f79f321e26750.js +1 -0
  219. package/.next/static/chunks/app/api/skills/install/route-bb8f79f321e26750.js +1 -0
  220. package/.next/static/chunks/app/api/skills/route-bb8f79f321e26750.js +1 -0
  221. package/.next/static/chunks/app/api/skills/search/route-bb8f79f321e26750.js +1 -0
  222. package/.next/static/chunks/app/api/skills/update/route-bb8f79f321e26750.js +1 -0
  223. package/.next/static/chunks/app/api/task-card-questions/[id]/answer/route-bb8f79f321e26750.js +1 -0
  224. package/.next/static/chunks/app/api/task-card-questions/route-bb8f79f321e26750.js +1 -0
  225. package/.next/static/chunks/app/api/task-cards/[id]/route-bb8f79f321e26750.js +1 -0
  226. package/.next/static/chunks/app/api/task-cards/route-bb8f79f321e26750.js +1 -0
  227. package/.next/static/chunks/app/api/task-scheduler/status/route-bb8f79f321e26750.js +1 -0
  228. package/.next/static/chunks/app/api/tasks/[id]/board/route-bb8f79f321e26750.js +1 -0
  229. package/.next/static/chunks/app/api/tasks/[id]/route-bb8f79f321e26750.js +1 -0
  230. package/.next/static/chunks/app/api/tasks/reorder/route-bb8f79f321e26750.js +1 -0
  231. package/.next/static/chunks/app/api/tasks/route-bb8f79f321e26750.js +1 -0
  232. package/.next/static/chunks/app/api/terminal/[id]/events/route-bb8f79f321e26750.js +1 -0
  233. package/.next/static/chunks/app/api/terminal/[id]/route-bb8f79f321e26750.js +1 -0
  234. package/.next/static/chunks/app/api/terminal/route-bb8f79f321e26750.js +1 -0
  235. package/.next/static/chunks/app/api/worktrees/route-bb8f79f321e26750.js +1 -0
  236. package/.next/static/chunks/app/{layout-7761e430ed68b347.js → layout-702d3c97d297c42d.js} +1 -1
  237. package/.next/static/chunks/app/manifest.webmanifest/route-bb8f79f321e26750.js +1 -0
  238. package/.next/static/chunks/app/page-fd18462c3c937a50.js +89 -0
  239. package/.next/static/chunks/next/dist/client/components/builtin/app-error-bb8f79f321e26750.js +1 -0
  240. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-bb8f79f321e26750.js +1 -0
  241. package/.next/static/chunks/next/dist/client/components/builtin/not-found-bb8f79f321e26750.js +1 -0
  242. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-bb8f79f321e26750.js +1 -0
  243. package/.next/static/chunks/webpack-d17b4dde91b96c63.js +1 -0
  244. package/.next/static/css/0c7244f7214af81f.css +1 -0
  245. package/.next/static/css/12456255969ac8de.css +31 -0
  246. package/.next/trace +43 -49
  247. package/.next/trace-build +1 -1
  248. package/.next/types/app/api/boards/[id]/{reconcile-task-edges → reconcile}/route.ts +3 -3
  249. package/.next/types/routes.d.ts +2 -7
  250. package/.next/types/validator.ts +3 -48
  251. package/README.md +6 -9
  252. package/THIRD_PARTY_NOTICES.md +10 -82
  253. package/bin/pi-web-sky.js +3 -3
  254. package/lib/board-reconcile-scheduler.ts +56 -0
  255. package/lib/board-reconcile.test.mjs +252 -0
  256. package/lib/board-reconcile.ts +422 -0
  257. package/lib/board-store.test.mjs +26 -4
  258. package/lib/board-store.ts +44 -6
  259. package/lib/i18n/messages/en.ts +1 -1
  260. package/lib/i18n/messages/zh-CN.ts +1 -1
  261. package/lib/session-delete.ts +5 -0
  262. package/lib/sqlite-db.ts +13 -1
  263. package/lib/task-card-store.ts +26 -1
  264. package/lib/task-scheduler.test.mjs +79 -0
  265. package/lib/task-scheduler.ts +195 -21
  266. package/lib/yjs-room-server.mjs +139 -0
  267. package/package.json +12 -9
  268. package/server.mjs +7 -7
  269. package/.next/server/app/api/boards/[id]/canvas/route.js +0 -1
  270. package/.next/server/app/api/boards/[id]/canvas/route_client-reference-manifest.js +0 -1
  271. package/.next/server/app/api/boards/[id]/edges/[eid]/route.js +0 -1
  272. package/.next/server/app/api/boards/[id]/edges/[eid]/route.js.nft.json +0 -1
  273. package/.next/server/app/api/boards/[id]/edges/[eid]/route_client-reference-manifest.js +0 -1
  274. package/.next/server/app/api/boards/[id]/edges/route.js +0 -1
  275. package/.next/server/app/api/boards/[id]/edges/route.js.nft.json +0 -1
  276. package/.next/server/app/api/boards/[id]/edges/route_client-reference-manifest.js +0 -1
  277. package/.next/server/app/api/boards/[id]/nodes/[nid]/route.js +0 -1
  278. package/.next/server/app/api/boards/[id]/nodes/[nid]/route.js.nft.json +0 -1
  279. package/.next/server/app/api/boards/[id]/nodes/[nid]/route_client-reference-manifest.js +0 -1
  280. package/.next/server/app/api/boards/[id]/nodes/route.js +0 -1
  281. package/.next/server/app/api/boards/[id]/nodes/route.js.nft.json +0 -1
  282. package/.next/server/app/api/boards/[id]/nodes/route_client-reference-manifest.js +0 -1
  283. package/.next/server/app/api/boards/[id]/reconcile-task-edges/route.js +0 -1
  284. package/.next/server/app/api/boards/[id]/reconcile-task-edges/route.js.nft.json +0 -1
  285. package/.next/server/app/api/boards/[id]/reconcile-task-edges/route_client-reference-manifest.js +0 -1
  286. package/.next/static/chunks/3308.857c554428b3294e.js +0 -73
  287. package/.next/static/chunks/333.bf0651c789b2eb33.js +0 -1
  288. package/.next/static/chunks/5315.dba7515ae6e139ae.js +0 -4
  289. package/.next/static/chunks/54a60aa6.0e43cde7298ebcb7.js +0 -78
  290. package/.next/static/chunks/7999.879d5a20e8641752.js +0 -259
  291. package/.next/static/chunks/app/_global-error/page-d6f52627eddf9119.js +0 -1
  292. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-d6f52627eddf9119.js +0 -1
  293. package/.next/static/chunks/app/api/agent/[id]/events/route-d6f52627eddf9119.js +0 -1
  294. package/.next/static/chunks/app/api/agent/[id]/route-d6f52627eddf9119.js +0 -1
  295. package/.next/static/chunks/app/api/agent/new/route-d6f52627eddf9119.js +0 -1
  296. package/.next/static/chunks/app/api/agent/running/route-d6f52627eddf9119.js +0 -1
  297. package/.next/static/chunks/app/api/app-update/route-d6f52627eddf9119.js +0 -1
  298. package/.next/static/chunks/app/api/auth/all-providers/route-d6f52627eddf9119.js +0 -1
  299. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-d6f52627eddf9119.js +0 -1
  300. package/.next/static/chunks/app/api/auth/login/[provider]/route-d6f52627eddf9119.js +0 -1
  301. package/.next/static/chunks/app/api/auth/logout/[provider]/route-d6f52627eddf9119.js +0 -1
  302. package/.next/static/chunks/app/api/auth/providers/route-d6f52627eddf9119.js +0 -1
  303. package/.next/static/chunks/app/api/boards/[id]/canvas/route-d6f52627eddf9119.js +0 -1
  304. package/.next/static/chunks/app/api/boards/[id]/edges/[eid]/route-d6f52627eddf9119.js +0 -1
  305. package/.next/static/chunks/app/api/boards/[id]/edges/route-d6f52627eddf9119.js +0 -1
  306. package/.next/static/chunks/app/api/boards/[id]/nodes/[nid]/route-d6f52627eddf9119.js +0 -1
  307. package/.next/static/chunks/app/api/boards/[id]/nodes/route-d6f52627eddf9119.js +0 -1
  308. package/.next/static/chunks/app/api/boards/[id]/reconcile-task-edges/route-d6f52627eddf9119.js +0 -1
  309. package/.next/static/chunks/app/api/boards/[id]/route-d6f52627eddf9119.js +0 -1
  310. package/.next/static/chunks/app/api/boards/purge-orphans/route-d6f52627eddf9119.js +0 -1
  311. package/.next/static/chunks/app/api/boards/reorder/route-d6f52627eddf9119.js +0 -1
  312. package/.next/static/chunks/app/api/boards/route-d6f52627eddf9119.js +0 -1
  313. package/.next/static/chunks/app/api/cwd/browse/route-d6f52627eddf9119.js +0 -1
  314. package/.next/static/chunks/app/api/cwd/validate/route-d6f52627eddf9119.js +0 -1
  315. package/.next/static/chunks/app/api/default-cwd/route-d6f52627eddf9119.js +0 -1
  316. package/.next/static/chunks/app/api/file-index/route-d6f52627eddf9119.js +0 -1
  317. package/.next/static/chunks/app/api/files/[...path]/route-d6f52627eddf9119.js +0 -1
  318. package/.next/static/chunks/app/api/git/diff/route-d6f52627eddf9119.js +0 -1
  319. package/.next/static/chunks/app/api/git/status/route-d6f52627eddf9119.js +0 -1
  320. package/.next/static/chunks/app/api/home/route-d6f52627eddf9119.js +0 -1
  321. package/.next/static/chunks/app/api/mcp/route-d6f52627eddf9119.js +0 -1
  322. package/.next/static/chunks/app/api/models/route-d6f52627eddf9119.js +0 -1
  323. package/.next/static/chunks/app/api/models-config/catalog/route-d6f52627eddf9119.js +0 -1
  324. package/.next/static/chunks/app/api/models-config/discover/route-d6f52627eddf9119.js +0 -1
  325. package/.next/static/chunks/app/api/models-config/route-d6f52627eddf9119.js +0 -1
  326. package/.next/static/chunks/app/api/models-config/test/route-d6f52627eddf9119.js +0 -1
  327. package/.next/static/chunks/app/api/plugins/route-d6f52627eddf9119.js +0 -1
  328. package/.next/static/chunks/app/api/project-trust/route-d6f52627eddf9119.js +0 -1
  329. package/.next/static/chunks/app/api/quota/route-d6f52627eddf9119.js +0 -1
  330. package/.next/static/chunks/app/api/search/route-d6f52627eddf9119.js +0 -1
  331. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-d6f52627eddf9119.js +0 -1
  332. package/.next/static/chunks/app/api/sessions/[id]/context/route-d6f52627eddf9119.js +0 -1
  333. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-d6f52627eddf9119.js +0 -1
  334. package/.next/static/chunks/app/api/sessions/[id]/export/route-d6f52627eddf9119.js +0 -1
  335. package/.next/static/chunks/app/api/sessions/[id]/route-d6f52627eddf9119.js +0 -1
  336. package/.next/static/chunks/app/api/sessions/[id]/state/route-d6f52627eddf9119.js +0 -1
  337. package/.next/static/chunks/app/api/sessions/[id]/todos/route-d6f52627eddf9119.js +0 -1
  338. package/.next/static/chunks/app/api/sessions/route-d6f52627eddf9119.js +0 -1
  339. package/.next/static/chunks/app/api/skills/check/route-d6f52627eddf9119.js +0 -1
  340. package/.next/static/chunks/app/api/skills/install/route-d6f52627eddf9119.js +0 -1
  341. package/.next/static/chunks/app/api/skills/route-d6f52627eddf9119.js +0 -1
  342. package/.next/static/chunks/app/api/skills/search/route-d6f52627eddf9119.js +0 -1
  343. package/.next/static/chunks/app/api/skills/update/route-d6f52627eddf9119.js +0 -1
  344. package/.next/static/chunks/app/api/task-card-questions/[id]/answer/route-d6f52627eddf9119.js +0 -1
  345. package/.next/static/chunks/app/api/task-card-questions/route-d6f52627eddf9119.js +0 -1
  346. package/.next/static/chunks/app/api/task-cards/[id]/route-d6f52627eddf9119.js +0 -1
  347. package/.next/static/chunks/app/api/task-cards/route-d6f52627eddf9119.js +0 -1
  348. package/.next/static/chunks/app/api/task-scheduler/status/route-d6f52627eddf9119.js +0 -1
  349. package/.next/static/chunks/app/api/tasks/[id]/board/route-d6f52627eddf9119.js +0 -1
  350. package/.next/static/chunks/app/api/tasks/[id]/route-d6f52627eddf9119.js +0 -1
  351. package/.next/static/chunks/app/api/tasks/reorder/route-d6f52627eddf9119.js +0 -1
  352. package/.next/static/chunks/app/api/tasks/route-d6f52627eddf9119.js +0 -1
  353. package/.next/static/chunks/app/api/terminal/[id]/events/route-d6f52627eddf9119.js +0 -1
  354. package/.next/static/chunks/app/api/terminal/[id]/route-d6f52627eddf9119.js +0 -1
  355. package/.next/static/chunks/app/api/terminal/route-d6f52627eddf9119.js +0 -1
  356. package/.next/static/chunks/app/api/worktrees/route-d6f52627eddf9119.js +0 -1
  357. package/.next/static/chunks/app/manifest.webmanifest/route-d6f52627eddf9119.js +0 -1
  358. package/.next/static/chunks/app/page-2c87c41e7f848f45.js +0 -89
  359. package/.next/static/chunks/e3e7ddb2.a35db430b3564999.js +0 -1
  360. package/.next/static/chunks/next/dist/client/components/builtin/app-error-d6f52627eddf9119.js +0 -1
  361. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-d6f52627eddf9119.js +0 -1
  362. package/.next/static/chunks/next/dist/client/components/builtin/not-found-d6f52627eddf9119.js +0 -1
  363. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-d6f52627eddf9119.js +0 -1
  364. package/.next/static/chunks/webpack-4bbf04891e910713.js +0 -1
  365. package/.next/static/css/80c818c5781fbadc.css +0 -4
  366. package/.next/static/css/d3a2b5077b52c727.css +0 -1
  367. package/.next/types/app/api/boards/[id]/canvas/route.ts +0 -353
  368. package/.next/types/app/api/boards/[id]/edges/[eid]/route.ts +0 -353
  369. package/.next/types/app/api/boards/[id]/edges/route.ts +0 -353
  370. package/.next/types/app/api/boards/[id]/nodes/[nid]/route.ts +0 -353
  371. package/.next/types/app/api/boards/[id]/nodes/route.ts +0 -353
  372. package/lib/board-search.test.mjs +0 -110
  373. package/lib/board-search.ts +0 -63
  374. package/lib/file-explorer-state.test.mjs +0 -63
  375. package/lib/file-explorer-state.ts +0 -36
  376. package/lib/sync-room-server.mjs +0 -137
  377. /package/.next/server/app/api/boards/[id]/{canvas → reconcile}/route.js.nft.json +0 -0
  378. /package/.next/static/{IzmOG04jJst1VpUvr_fr5 → 12RFLqhiUZG8Sj49T1KKQ}/_buildManifest.js +0 -0
  379. /package/.next/static/{IzmOG04jJst1VpUvr_fr5 → 12RFLqhiUZG8Sj49T1KKQ}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3716],{33716:(t,i,e)=>{e.d(i,{diagram:()=>te});var s,a=e(56174),n=e(19836);e(39457);var h=e(86305),o=e(37325),r=e(56037),l=e(89851),c=e(33948),g=function(){var t=(0,l.K)(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],h=[1,7],o=[1,5,10,12,14,16,18,19,21,23,36,37,38],r=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],m=[1,34],y=[1,35],b=[1,36],A=[1,37],w=[1,43],S=[1,42],C=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,36,37,38],R=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],T=[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],D=[1,65],L=[26,28],P={trace:(0,l.K)(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:(0,l.K)(function(t,i,e,s,a,n,h){var o=n.length-1;switch(a){case 5:s.setOrientation(n[o]);break;case 9:s.setDiagramTitle(n[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[o]);break;case 13:s.setLineData(n[o-1],n[o]);break;case 14:s.setBarData({text:"",type:"text"},n[o]);break;case 15:s.setBarData(n[o-1],n[o]);break;case 16:this.$=n[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),s.setAccDescription(this.$);break;case 19:case 29:this.$=n[o-1];break;case 20:case 30:this.$=[n[o-2],...n[o]];break;case 21:case 31:this.$=[n[o]];break;case 22:this.$={value:Number(n[o-1]),label:n[o]};break;case 23:this.$={value:Number(n[o]),label:""};break;case 24:s.setXAxisTitle(n[o]);break;case 25:s.setXAxisTitle(n[o-1]);break;case 26:s.setXAxisTitle({type:"text",text:""});break;case 27:s.setXAxisBand(n[o]);break;case 28:s.setXAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 32:s.setYAxisTitle(n[o]);break;case 33:s.setYAxisTitle(n[o-1]);break;case 34:s.setYAxisTitle({type:"text",text:""});break;case 35:s.setYAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 39:case 40:this.$={text:n[o],type:"text"};break;case 41:this.$={text:n[o],type:"markdown"};break;case 42:this.$=n[o];break;case 43:this.$=n[o-1]+""+n[o]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:n,38:h}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:n,38:h}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:n,38:h}),{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]},t(o,[2,36]),t(o,[2,37]),t(o,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:n,38:h}),{1:[2,3]},t(o,[2,5]),t(i,[2,7],{4:22,36:a,37:n,38:h}),{11:23,30:r,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},{11:39,13:38,24:w,29:S,30:r,31:40,32:41,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},{11:45,15:44,29:C,30:r,35:46,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},{11:49,17:48,24:k,30:r,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},{11:52,17:51,24:k,30:r,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(R,[2,39],{41:55,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A}),t(R,[2,40]),t(R,[2,41]),t(T,[2,42]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),t(T,[2,50]),t(T,[2,51]),t(T,[2,52]),t(T,[2,53]),t(_,[2,10]),t(_,[2,24],{32:41,31:56,24:w,29:S}),t(_,[2,26]),t(_,[2,27]),{33:[1,57]},{11:59,30:r,34:58,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},t(_,[2,11]),t(_,[2,32],{35:60,29:C}),t(_,[2,34]),{33:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:64,29:D},t(_,[2,14]),{17:66,24:k},t(_,[2,16]),t(_,[2,17]),t(T,[2,43]),t(_,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(_,[2,33]),{29:[1,70]},t(_,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(L,[2,23],{30:[1,73]}),t(_,[2,15]),t(_,[2,28]),t(_,[2,29]),{11:59,30:r,34:74,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},t(_,[2,35]),t(_,[2,19]),{25:75,27:64,29:D},t(L,[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:(0,l.K)(function(t,i){if(i.recoverable)this.trace(t);else{var e=Error(t);throw e.hash=i,e}},"parseError"),parse:(0,l.K)(function(t){var i=this,e=[0],s=[],a=[null],n=[],h=this.table,o="",r=0,c=0,g=0,u=n.slice.call(arguments,1),x=Object.create(this.lexer),d={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d[p]=this.yy[p]);x.setInput(t,d),d.lexer=x,d.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;n.push(f);var m=x.options&&x.options.ranges;function y(){var t;return"number"!=typeof(t=s.pop()||x.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof d.parseError?this.parseError=d.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K)(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),(0,l.K)(y,"lex");for(var b,A,w,S,C,k,_,R,T,D={};;){if(w=e[e.length-1],this.defaultActions[w]?S=this.defaultActions[w]:(null==b&&(b=y()),S=h[w]&&h[w][b]),void 0===S||!S.length||!S[0]){var L="";for(k in T=[],h[w])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(r+1)+":\n"+x.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(r+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[b]||b,line:x.yylineno,loc:f,expected:T})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(S[0]){case 1:e.push(b),a.push(x.yytext),n.push(x.yylloc),e.push(S[1]),b=null,A?(b=A,A=null):(c=x.yyleng,o=x.yytext,r=x.yylineno,f=x.yylloc,g>0&&g--);break;case 2:if(_=this.productions_[S[1]][1],D.$=a[a.length-_],D._$={first_line:n[n.length-(_||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(_||1)].first_column,last_column:n[n.length-1].last_column},m&&(D._$.range=[n[n.length-(_||1)].range[0],n[n.length-1].range[1]]),void 0!==(C=this.performAction.apply(D,[o,c,r,d,S[1],a,n].concat(u))))return C;_&&(e=e.slice(0,-1*_*2),a=a.slice(0,-1*_),n=n.slice(0,-1*_)),e.push(this.productions_[S[1]][0]),a.push(D.$),n.push(D._$),R=h[e[e.length-2]][e[e.length-1]],e.push(R);break;case 3:return!0}}return!0},"parse")};function E(){this.yy={}}return P.lexer={EOF:1,parseError:(0,l.K)(function(t,i){if(this.yy.parser)this.yy.parser.parseError(t,i);else throw Error(t)},"parseError"),setInput:(0,l.K)(function(t,i){return this.yy=i||this.yy||{},this._input=t,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:(0,l.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K)(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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),e.length-1&&(this.yylineno-=e.length-1);var a=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K)(function(){return this._more=!0,this},"more"),reject:(0,l.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K)(function(){var t=this.pastInput(),i=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:(0,l.K)(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack)for(var n in a)this[n]=a[n];return!1},"test_match"),next:(0,l.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,i,e,s,a=this._currentRules(),n=0;n<a.length;n++)if((e=this._input.match(this.rules[a[n]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(!this._backtrack)return!1;i=!1;continue}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K)(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:(0,l.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K)(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),36;case 4:return 36;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:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14: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 27:this.pushState("string");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 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}}},(0,l.K)(E,"Parser"),E.prototype=P,P.Parser=E,new E}();function u(t){return"bar"===t.type}function x(t){return"band"===t.type}function d(t){return"linear"===t.type}g.parser=g,(0,l.K)(u,"isBarPlot"),(0,l.K)(x,"isBandAxisData"),(0,l.K)(d,"isLinearAxisData");var p=class{constructor(t){this.parentGroup=t}static{(0,l.K)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};let e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of t){let t=(0,n.W)(s,1,a),h=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return s.remove(),e}},f=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,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}static{(0,l.K)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?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(){let 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(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*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){let e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);let a=e.height;"bottom"===this.axisPosition&&0!==this.normalizedLabelRotationInRad&&(a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*e.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*e.height))),a+=2*this.axisConfig.labelPadding,this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,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){let e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);let a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?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){let i=this.normalizedLabelRotationInRad;return 0===i?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let 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(t=>({text:t.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(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let 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(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,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(){let t=[];if(this.showAxisLine){let 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(t=>({text:t.toString(),x:this.getScaleValue(t)+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:180*this.normalizedLabelRotationInRad/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${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(){let t=[];if(this.showAxisLine){let 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(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${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("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},m=class extends f{static{(0,l.K)(this,"BandAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=(0,c.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,c.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),r.R.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},y=class extends f{static{(0,l.K)(this,"LinearAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=(0,c.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,c.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function b(t,i,e,s){let a=new p(s);return x(t)?new m(i,e,t.categories,t.title,a):new y(i,e,[t.min,t.max],t.title,a)}(0,l.K)(b,"getAxis");var A=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,l.K)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let 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}};function w(t,i,e,s){return new A(new p(s),t,i,e)}(0,l.K)(w,"getChartTitleComponent");var S=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}static{(0,l.K)(this,"LinePlot")}getDrawableElement(){let t,i=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);if(!(t="horizontal"===this.orientation?(0,c.n8j)().y(t=>t[0]).x(t=>t[1])(i):(0,c.n8j)().x(t=>t[0]).y(t=>t[1])(i)))return[];let e=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let t=[];for(let[e,[s,a]]of i.entries()){let i=this.plotData.pointLabels[e];i&&("horizontal"===this.orientation?t.push({x:a+10,y:s,text:i,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):t.push({x:s,y:a-10,text:i,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}t.length>0&&e.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:t})}return e}},C=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}static{(0,l.K)(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[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(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},k=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,l.K)(this,"BasePlot")}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");let t=[];for(let[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{let s=new S(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{let s=new C(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function _(t,i,e){return new k(t,i,e)}(0,l.K)(_,"getPlotComponent");var R=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:w(t,i,e,s),plot:_(t,i,e),xAxis:b(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:b(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{(0,l.K)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),n=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:a,height:n});t-=h.width,i-=h.height,s=(h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i})).height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),e=(h=this.componentStore.yAxis.calculateSpace({width:t,height:i})).width,(t-=h.width)>0&&(a+=t,t=0),i>0&&(n+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:n}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+a]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+n}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:n,height:h});t-=o.width,i-=o.height,e=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i})).height,i-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=o.width,s=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=o.height,a=e+o.height,t>0&&(n+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];for(let i of(this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis),Object.values(this.componentStore)))t.push(...i.getDrawableElements());return t}},T=class{static{(0,l.K)(this,"XYChartBuilder")}static build(t,i,e,s){return new R(t,i,e,s).getDrawableElement()}},D=0,L=z(),P=M(),E=$(),v=P.plotColorPalette.split(",").map(t=>t.trim()),K=!1,I=!1;function M(){let t=(0,o.P$)(),i=(0,o.zj)();return(0,h.$t)(t.xyChart,i.themeVariables.xyChart)}function z(){let t=(0,o.zj)();return(0,h.$t)(o.UI.xyChart,t.xyChart)}function $(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function B(t){let i=(0,o.zj)();return(0,o.jZ)(t.trim(),i)}function O(t){s=t}function W(t){"horizontal"===t?L.chartOrientation="horizontal":L.chartOrientation="vertical"}function F(t){E.xAxis.title=B(t.text)}function N(t,i){E.xAxis={type:"linear",title:E.xAxis.title,min:t,max:i},K=!0}function V(t){E.xAxis={type:"band",title:E.xAxis.title,categories:t.map(t=>B(t.text))},K=!0}function X(t){E.yAxis.title=B(t.text)}function Y(t,i){E.yAxis={type:"linear",title:E.yAxis.title,min:t,max:i},I=!0}function H(t){let i=Math.min(...t),e=Math.max(...t),s=d(E.yAxis)?E.yAxis.min:1/0,a=d(E.yAxis)?E.yAxis.max:-1/0;E.yAxis={type:"linear",title:E.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function U(t){let i=[];if(0===t.length)return i;if(K||N(Math.min(d(E.xAxis)?E.xAxis.min:1/0,1),Math.max(d(E.xAxis)?E.xAxis.max:-1/0,t.length)),x(E.xAxis)&&t.length>E.xAxis.categories.length&&(t=t.slice(0,E.xAxis.categories.length)),I||H(t),x(E.xAxis)&&(i=E.xAxis.categories.map((i,e)=>[i,t[e]])),d(E.xAxis)){let e=E.xAxis.min,s=E.xAxis.max;if(1===t.length)i=[[`${e}`,t[0]]];else{let a=(s-e)/(t.length-1);i=t.map((t,i)=>[`${e+i*a}`,t])}}return i}function j(t){return v[0===t?0:t%v.length]}function G(t,i){let e=i.map(t=>t.value),s=i.map(t=>t.label?B(t.label):""),a=U(e),n=s.some(t=>""!==t);E.plots.push({type:"line",strokeFill:j(D),strokeWidth:2,data:a,...n?{pointLabels:s}:{}}),D++}function Q(t,i){let e=U(i.map(t=>t.value));E.plots.push({type:"bar",fill:j(D),data:e}),D++}function Z(){if(0===E.plots.length)throw Error("No Plot to render, please provide a plot with some data");return E.title=(0,o.ab)(),T.build(L,E,P,s)}function q(){return P}function J(){return L}function tt(){return E}(0,l.K)(M,"getChartDefaultThemeConfig"),(0,l.K)(z,"getChartDefaultConfig"),(0,l.K)($,"getChartDefaultData"),(0,l.K)(B,"textSanitizer"),(0,l.K)(O,"setTmpSVGG"),(0,l.K)(W,"setOrientation"),(0,l.K)(F,"setXAxisTitle"),(0,l.K)(N,"setXAxisRangeData"),(0,l.K)(V,"setXAxisBand"),(0,l.K)(X,"setYAxisTitle"),(0,l.K)(Y,"setYAxisRangeData"),(0,l.K)(H,"setYAxisRangeFromPlotData"),(0,l.K)(U,"transformDataWithoutCategory"),(0,l.K)(j,"getPlotColorFromPalette"),(0,l.K)(G,"setLineData"),(0,l.K)(Q,"setBarData"),(0,l.K)(Z,"getDrawableElem"),(0,l.K)(q,"getChartThemeConfig"),(0,l.K)(J,"getChartConfig"),(0,l.K)(tt,"getXYChartData");var ti={getDrawableElem:Z,clear:(0,l.K)(function(){(0,o.IU)(),D=0,L=z(),E=$(),v=(P=M()).plotColorPalette.split(",").map(t=>t.trim()),K=!1,I=!1},"clear"),setAccTitle:o.SV,getAccTitle:o.iN,setDiagramTitle:o.ke,getDiagramTitle:o.ab,getAccDescription:o.m7,setAccDescription:o.EI,setOrientation:W,setXAxisTitle:F,setXAxisRangeData:N,setXAxisBand:V,setYAxisTitle:X,setYAxisRangeData:Y,setLineData:G,setBarData:Q,setTmpSVGG:O,getChartThemeConfig:q,getChartConfig:J,getXYChartData:tt},te={parser:g,db:ti,renderer:{draw:(0,l.K)((t,i,e,s)=>{let n=s.db,h=n.getChartThemeConfig(),c=n.getChartConfig(),g=n.getXYChartData().plots[0].data.map(t=>t[1]);function u(t){return"top"===t?"text-before-edge":"middle"}function x(t){return"left"===t?"start":"right"===t?"end":"middle"}function d(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,l.K)(u,"getDominantBaseLine"),(0,l.K)(x,"getTextAnchor"),(0,l.K)(d,"getTextTransformation"),r.R.debug("Rendering xychart chart\n"+t);let p=(0,a.D)(i),f=p.append("g").attr("class","main"),m=f.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");(0,o.a$)(p,c.height,c.width,!0),p.attr("viewBox",`0 0 ${c.width} ${c.height}`),m.attr("fill",h.backgroundColor),n.setTmpSVGG(p.append("g").attr("class","mermaid-tmp-group"));let y=n.getDrawableElem(),b={};function A(t){let i=f,e="";for(let[s]of t.entries()){let a=f;s>0&&b[e]&&(a=b[e]),e+=t[s],(i=b[e])||(i=b[e]=a.append("g").attr("class",t[s]))}return i}for(let t of((0,l.K)(A,"getGroup"),y)){if(0===t.data.length)continue;let i=A(t.groupTexts);switch(t.type){case"rect":if(i.selectAll("rect").data(t.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),c.showDataLabel){let e=c.showDataLabelOutsideBar;if("horizontal"===c.chartOrientation){let s=function(t,i){let{data:e,label:s}=t;return i*s.length*a<=e.width-n};(0,l.K)(s,"fitsHorizontally");let a=.7,n=10,o=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),r=Math.floor(Math.min(...o.map(t=>{let{data:i}=t,e=.7*i.height;for(;!s(t,e)&&e>0;)e-=1;return e}))),c=(0,l.K)(t=>e?t.data.x+t.data.width+n:t.data.x+t.data.width-n,"determineLabelXPosition");i.selectAll("text").data(o).enter().append("text").attr("x",c).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",e?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${r}px`).text(t=>t.label)}else{let s=function(t,i,e){let{data:s,label:a}=t,n=i*a.length*.7,h=s.x+s.width/2,o=h-n/2,r=h+n/2,l=o>=s.x&&r<=s.x+s.width,c=s.y+e+i<=s.y+s.height;return l&&c};(0,l.K)(s,"fitsInBar");let a=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),n=Math.floor(Math.min(...a.map(t=>{let{data:i,label:e}=t,a=i.width/(.7*e.length);for(;!s(t,a,10)&&a>0;)a-=1;return a}))),o=(0,l.K)(t=>e?t.data.y-10:t.data.y+10,"determineLabelYPosition");i.selectAll("text").data(a).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",o).attr("text-anchor","middle").attr("dominant-baseline",e?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${n}px`).text(t=>t.label)}}break;case"text":i.selectAll("text").data(t.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>u(t.verticalPos)).attr("text-anchor",t=>x(t.horizontalPos)).attr("transform",t=>d(t)).text(t=>t.text);break;case"path":i.selectAll("path").data(t.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3716],{33716:(t,i,e)=>{e.d(i,{diagram:()=>te});var s,a=e(56174),n=e(19836);e(39457);var h=e(86305),o=e(37325),r=e(56037),l=e(89851),c=e(32054),g=function(){var t=(0,l.K)(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],h=[1,7],o=[1,5,10,12,14,16,18,19,21,23,36,37,38],r=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],m=[1,34],y=[1,35],b=[1,36],A=[1,37],w=[1,43],S=[1,42],C=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,36,37,38],R=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],T=[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],D=[1,65],L=[26,28],P={trace:(0,l.K)(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:(0,l.K)(function(t,i,e,s,a,n,h){var o=n.length-1;switch(a){case 5:s.setOrientation(n[o]);break;case 9:s.setDiagramTitle(n[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[o]);break;case 13:s.setLineData(n[o-1],n[o]);break;case 14:s.setBarData({text:"",type:"text"},n[o]);break;case 15:s.setBarData(n[o-1],n[o]);break;case 16:this.$=n[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),s.setAccDescription(this.$);break;case 19:case 29:this.$=n[o-1];break;case 20:case 30:this.$=[n[o-2],...n[o]];break;case 21:case 31:this.$=[n[o]];break;case 22:this.$={value:Number(n[o-1]),label:n[o]};break;case 23:this.$={value:Number(n[o]),label:""};break;case 24:s.setXAxisTitle(n[o]);break;case 25:s.setXAxisTitle(n[o-1]);break;case 26:s.setXAxisTitle({type:"text",text:""});break;case 27:s.setXAxisBand(n[o]);break;case 28:s.setXAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 32:s.setYAxisTitle(n[o]);break;case 33:s.setYAxisTitle(n[o-1]);break;case 34:s.setYAxisTitle({type:"text",text:""});break;case 35:s.setYAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 39:case 40:this.$={text:n[o],type:"text"};break;case 41:this.$={text:n[o],type:"markdown"};break;case 42:this.$=n[o];break;case 43:this.$=n[o-1]+""+n[o]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:n,38:h}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:n,38:h}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:n,38:h}),{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]},t(o,[2,36]),t(o,[2,37]),t(o,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:n,38:h}),{1:[2,3]},t(o,[2,5]),t(i,[2,7],{4:22,36:a,37:n,38:h}),{11:23,30:r,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},{11:39,13:38,24:w,29:S,30:r,31:40,32:41,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},{11:45,15:44,29:C,30:r,35:46,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},{11:49,17:48,24:k,30:r,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},{11:52,17:51,24:k,30:r,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(R,[2,39],{41:55,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A}),t(R,[2,40]),t(R,[2,41]),t(T,[2,42]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),t(T,[2,50]),t(T,[2,51]),t(T,[2,52]),t(T,[2,53]),t(_,[2,10]),t(_,[2,24],{32:41,31:56,24:w,29:S}),t(_,[2,26]),t(_,[2,27]),{33:[1,57]},{11:59,30:r,34:58,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},t(_,[2,11]),t(_,[2,32],{35:60,29:C}),t(_,[2,34]),{33:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:64,29:D},t(_,[2,14]),{17:66,24:k},t(_,[2,16]),t(_,[2,17]),t(T,[2,43]),t(_,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(_,[2,33]),{29:[1,70]},t(_,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(L,[2,23],{30:[1,73]}),t(_,[2,15]),t(_,[2,28]),t(_,[2,29]),{11:59,30:r,34:74,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:A},t(_,[2,35]),t(_,[2,19]),{25:75,27:64,29:D},t(L,[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:(0,l.K)(function(t,i){if(i.recoverable)this.trace(t);else{var e=Error(t);throw e.hash=i,e}},"parseError"),parse:(0,l.K)(function(t){var i=this,e=[0],s=[],a=[null],n=[],h=this.table,o="",r=0,c=0,g=0,u=n.slice.call(arguments,1),x=Object.create(this.lexer),d={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d[p]=this.yy[p]);x.setInput(t,d),d.lexer=x,d.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;n.push(f);var m=x.options&&x.options.ranges;function y(){var t;return"number"!=typeof(t=s.pop()||x.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof d.parseError?this.parseError=d.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K)(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),(0,l.K)(y,"lex");for(var b,A,w,S,C,k,_,R,T,D={};;){if(w=e[e.length-1],this.defaultActions[w]?S=this.defaultActions[w]:(null==b&&(b=y()),S=h[w]&&h[w][b]),void 0===S||!S.length||!S[0]){var L="";for(k in T=[],h[w])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(r+1)+":\n"+x.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(r+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[b]||b,line:x.yylineno,loc:f,expected:T})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(S[0]){case 1:e.push(b),a.push(x.yytext),n.push(x.yylloc),e.push(S[1]),b=null,A?(b=A,A=null):(c=x.yyleng,o=x.yytext,r=x.yylineno,f=x.yylloc,g>0&&g--);break;case 2:if(_=this.productions_[S[1]][1],D.$=a[a.length-_],D._$={first_line:n[n.length-(_||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(_||1)].first_column,last_column:n[n.length-1].last_column},m&&(D._$.range=[n[n.length-(_||1)].range[0],n[n.length-1].range[1]]),void 0!==(C=this.performAction.apply(D,[o,c,r,d,S[1],a,n].concat(u))))return C;_&&(e=e.slice(0,-1*_*2),a=a.slice(0,-1*_),n=n.slice(0,-1*_)),e.push(this.productions_[S[1]][0]),a.push(D.$),n.push(D._$),R=h[e[e.length-2]][e[e.length-1]],e.push(R);break;case 3:return!0}}return!0},"parse")};function E(){this.yy={}}return P.lexer={EOF:1,parseError:(0,l.K)(function(t,i){if(this.yy.parser)this.yy.parser.parseError(t,i);else throw Error(t)},"parseError"),setInput:(0,l.K)(function(t,i){return this.yy=i||this.yy||{},this._input=t,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:(0,l.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K)(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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),e.length-1&&(this.yylineno-=e.length-1);var a=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K)(function(){return this._more=!0,this},"more"),reject:(0,l.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K)(function(){var t=this.pastInput(),i=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:(0,l.K)(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack)for(var n in a)this[n]=a[n];return!1},"test_match"),next:(0,l.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,i,e,s,a=this._currentRules(),n=0;n<a.length;n++)if((e=this._input.match(this.rules[a[n]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(!this._backtrack)return!1;i=!1;continue}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K)(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:(0,l.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K)(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),36;case 4:return 36;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:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14: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 27:this.pushState("string");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 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}}},(0,l.K)(E,"Parser"),E.prototype=P,P.Parser=E,new E}();function u(t){return"bar"===t.type}function x(t){return"band"===t.type}function d(t){return"linear"===t.type}g.parser=g,(0,l.K)(u,"isBarPlot"),(0,l.K)(x,"isBandAxisData"),(0,l.K)(d,"isLinearAxisData");var p=class{constructor(t){this.parentGroup=t}static{(0,l.K)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};let e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of t){let t=(0,n.W)(s,1,a),h=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return s.remove(),e}},f=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,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}static{(0,l.K)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?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(){let 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(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*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){let e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);let a=e.height;"bottom"===this.axisPosition&&0!==this.normalizedLabelRotationInRad&&(a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*e.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*e.height))),a+=2*this.axisConfig.labelPadding,this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,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){let e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);let a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?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){let i=this.normalizedLabelRotationInRad;return 0===i?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let 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(t=>({text:t.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(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let 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(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,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(){let t=[];if(this.showAxisLine){let 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(t=>({text:t.toString(),x:this.getScaleValue(t)+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:180*this.normalizedLabelRotationInRad/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${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(){let t=[];if(this.showAxisLine){let 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(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${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("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},m=class extends f{static{(0,l.K)(this,"BandAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=(0,c.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,c.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),r.R.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},y=class extends f{static{(0,l.K)(this,"LinearAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=(0,c.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,c.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function b(t,i,e,s){let a=new p(s);return x(t)?new m(i,e,t.categories,t.title,a):new y(i,e,[t.min,t.max],t.title,a)}(0,l.K)(b,"getAxis");var A=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,l.K)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let 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}};function w(t,i,e,s){return new A(new p(s),t,i,e)}(0,l.K)(w,"getChartTitleComponent");var S=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}static{(0,l.K)(this,"LinePlot")}getDrawableElement(){let t,i=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);if(!(t="horizontal"===this.orientation?(0,c.n8j)().y(t=>t[0]).x(t=>t[1])(i):(0,c.n8j)().x(t=>t[0]).y(t=>t[1])(i)))return[];let e=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let t=[];for(let[e,[s,a]]of i.entries()){let i=this.plotData.pointLabels[e];i&&("horizontal"===this.orientation?t.push({x:a+10,y:s,text:i,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):t.push({x:s,y:a-10,text:i,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}t.length>0&&e.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:t})}return e}},C=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}static{(0,l.K)(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[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(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},k=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,l.K)(this,"BasePlot")}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");let t=[];for(let[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{let s=new S(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{let s=new C(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function _(t,i,e){return new k(t,i,e)}(0,l.K)(_,"getPlotComponent");var R=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:w(t,i,e,s),plot:_(t,i,e),xAxis:b(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:b(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{(0,l.K)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),n=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:a,height:n});t-=h.width,i-=h.height,s=(h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i})).height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),e=(h=this.componentStore.yAxis.calculateSpace({width:t,height:i})).width,(t-=h.width)>0&&(a+=t,t=0),i>0&&(n+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:n}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+a]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+n}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:n,height:h});t-=o.width,i-=o.height,e=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i})).height,i-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=o.width,s=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=o.height,a=e+o.height,t>0&&(n+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];for(let i of(this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis),Object.values(this.componentStore)))t.push(...i.getDrawableElements());return t}},T=class{static{(0,l.K)(this,"XYChartBuilder")}static build(t,i,e,s){return new R(t,i,e,s).getDrawableElement()}},D=0,L=z(),P=M(),E=$(),v=P.plotColorPalette.split(",").map(t=>t.trim()),K=!1,I=!1;function M(){let t=(0,o.P$)(),i=(0,o.zj)();return(0,h.$t)(t.xyChart,i.themeVariables.xyChart)}function z(){let t=(0,o.zj)();return(0,h.$t)(o.UI.xyChart,t.xyChart)}function $(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function B(t){let i=(0,o.zj)();return(0,o.jZ)(t.trim(),i)}function O(t){s=t}function W(t){"horizontal"===t?L.chartOrientation="horizontal":L.chartOrientation="vertical"}function F(t){E.xAxis.title=B(t.text)}function N(t,i){E.xAxis={type:"linear",title:E.xAxis.title,min:t,max:i},K=!0}function V(t){E.xAxis={type:"band",title:E.xAxis.title,categories:t.map(t=>B(t.text))},K=!0}function X(t){E.yAxis.title=B(t.text)}function Y(t,i){E.yAxis={type:"linear",title:E.yAxis.title,min:t,max:i},I=!0}function H(t){let i=Math.min(...t),e=Math.max(...t),s=d(E.yAxis)?E.yAxis.min:1/0,a=d(E.yAxis)?E.yAxis.max:-1/0;E.yAxis={type:"linear",title:E.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function U(t){let i=[];if(0===t.length)return i;if(K||N(Math.min(d(E.xAxis)?E.xAxis.min:1/0,1),Math.max(d(E.xAxis)?E.xAxis.max:-1/0,t.length)),x(E.xAxis)&&t.length>E.xAxis.categories.length&&(t=t.slice(0,E.xAxis.categories.length)),I||H(t),x(E.xAxis)&&(i=E.xAxis.categories.map((i,e)=>[i,t[e]])),d(E.xAxis)){let e=E.xAxis.min,s=E.xAxis.max;if(1===t.length)i=[[`${e}`,t[0]]];else{let a=(s-e)/(t.length-1);i=t.map((t,i)=>[`${e+i*a}`,t])}}return i}function j(t){return v[0===t?0:t%v.length]}function G(t,i){let e=i.map(t=>t.value),s=i.map(t=>t.label?B(t.label):""),a=U(e),n=s.some(t=>""!==t);E.plots.push({type:"line",strokeFill:j(D),strokeWidth:2,data:a,...n?{pointLabels:s}:{}}),D++}function Q(t,i){let e=U(i.map(t=>t.value));E.plots.push({type:"bar",fill:j(D),data:e}),D++}function Z(){if(0===E.plots.length)throw Error("No Plot to render, please provide a plot with some data");return E.title=(0,o.ab)(),T.build(L,E,P,s)}function q(){return P}function J(){return L}function tt(){return E}(0,l.K)(M,"getChartDefaultThemeConfig"),(0,l.K)(z,"getChartDefaultConfig"),(0,l.K)($,"getChartDefaultData"),(0,l.K)(B,"textSanitizer"),(0,l.K)(O,"setTmpSVGG"),(0,l.K)(W,"setOrientation"),(0,l.K)(F,"setXAxisTitle"),(0,l.K)(N,"setXAxisRangeData"),(0,l.K)(V,"setXAxisBand"),(0,l.K)(X,"setYAxisTitle"),(0,l.K)(Y,"setYAxisRangeData"),(0,l.K)(H,"setYAxisRangeFromPlotData"),(0,l.K)(U,"transformDataWithoutCategory"),(0,l.K)(j,"getPlotColorFromPalette"),(0,l.K)(G,"setLineData"),(0,l.K)(Q,"setBarData"),(0,l.K)(Z,"getDrawableElem"),(0,l.K)(q,"getChartThemeConfig"),(0,l.K)(J,"getChartConfig"),(0,l.K)(tt,"getXYChartData");var ti={getDrawableElem:Z,clear:(0,l.K)(function(){(0,o.IU)(),D=0,L=z(),E=$(),v=(P=M()).plotColorPalette.split(",").map(t=>t.trim()),K=!1,I=!1},"clear"),setAccTitle:o.SV,getAccTitle:o.iN,setDiagramTitle:o.ke,getDiagramTitle:o.ab,getAccDescription:o.m7,setAccDescription:o.EI,setOrientation:W,setXAxisTitle:F,setXAxisRangeData:N,setXAxisBand:V,setYAxisTitle:X,setYAxisRangeData:Y,setLineData:G,setBarData:Q,setTmpSVGG:O,getChartThemeConfig:q,getChartConfig:J,getXYChartData:tt},te={parser:g,db:ti,renderer:{draw:(0,l.K)((t,i,e,s)=>{let n=s.db,h=n.getChartThemeConfig(),c=n.getChartConfig(),g=n.getXYChartData().plots[0].data.map(t=>t[1]);function u(t){return"top"===t?"text-before-edge":"middle"}function x(t){return"left"===t?"start":"right"===t?"end":"middle"}function d(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,l.K)(u,"getDominantBaseLine"),(0,l.K)(x,"getTextAnchor"),(0,l.K)(d,"getTextTransformation"),r.R.debug("Rendering xychart chart\n"+t);let p=(0,a.D)(i),f=p.append("g").attr("class","main"),m=f.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");(0,o.a$)(p,c.height,c.width,!0),p.attr("viewBox",`0 0 ${c.width} ${c.height}`),m.attr("fill",h.backgroundColor),n.setTmpSVGG(p.append("g").attr("class","mermaid-tmp-group"));let y=n.getDrawableElem(),b={};function A(t){let i=f,e="";for(let[s]of t.entries()){let a=f;s>0&&b[e]&&(a=b[e]),e+=t[s],(i=b[e])||(i=b[e]=a.append("g").attr("class",t[s]))}return i}for(let t of((0,l.K)(A,"getGroup"),y)){if(0===t.data.length)continue;let i=A(t.groupTexts);switch(t.type){case"rect":if(i.selectAll("rect").data(t.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),c.showDataLabel){let e=c.showDataLabelOutsideBar;if("horizontal"===c.chartOrientation){let s=function(t,i){let{data:e,label:s}=t;return i*s.length*a<=e.width-n};(0,l.K)(s,"fitsHorizontally");let a=.7,n=10,o=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),r=Math.floor(Math.min(...o.map(t=>{let{data:i}=t,e=.7*i.height;for(;!s(t,e)&&e>0;)e-=1;return e}))),c=(0,l.K)(t=>e?t.data.x+t.data.width+n:t.data.x+t.data.width-n,"determineLabelXPosition");i.selectAll("text").data(o).enter().append("text").attr("x",c).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",e?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${r}px`).text(t=>t.label)}else{let s=function(t,i,e){let{data:s,label:a}=t,n=i*a.length*.7,h=s.x+s.width/2,o=h-n/2,r=h+n/2,l=o>=s.x&&r<=s.x+s.width,c=s.y+e+i<=s.y+s.height;return l&&c};(0,l.K)(s,"fitsInBar");let a=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),n=Math.floor(Math.min(...a.map(t=>{let{data:i,label:e}=t,a=i.width/(.7*e.length);for(;!s(t,a,10)&&a>0;)a-=1;return a}))),o=(0,l.K)(t=>e?t.data.y-10:t.data.y+10,"determineLabelYPosition");i.selectAll("text").data(a).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",o).attr("text-anchor","middle").attr("dominant-baseline",e?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${n}px`).text(t=>t.label)}}break;case"text":i.selectAll("text").data(t.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>u(t.verticalPos)).attr("text-anchor",t=>x(t.horizontalPos)).attr("transform",t=>d(t)).text(t=>t.text);break;case"path":i.selectAll("path").data(t.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}}}}]);
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3995],{73995:(e,t,a)=>{a.d(t,{diagram:()=>v});var i=a(80650),l=a(56174),r=a(86305),n=a(37325),s=a(56037),o=a(89851),c=a(88863),d=a(33948),p=n.UI.pie,h={sections:new Map,showData:!1,config:p},g=h.sections,u=h.showData,f=structuredClone(p),m=(0,o.K)(()=>structuredClone(f),"getConfig"),$=(0,o.K)(()=>{g=new Map,u=h.showData,(0,n.IU)()},"clear"),x=(0,o.K)(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);g.has(e)||(g.set(e,t),s.R.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),w=(0,o.K)(()=>g,"getSections"),S=(0,o.K)(e=>{u=e},"setShowData"),y=(0,o.K)(()=>u,"getShowData"),b={getConfig:m,clear:$,setDiagramTitle:n.ke,getDiagramTitle:n.ab,setAccTitle:n.SV,getAccTitle:n.iN,setAccDescription:n.EI,getAccDescription:n.m7,addSection:x,getSections:w,setShowData:S,getShowData:y},C=(0,o.K)((e,t)=>{(0,i.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),D={parse:(0,o.K)(async e=>{let t=await (0,c.qg)("pie",e);s.R.debug(t),C(t,b)},"parse")},T=(0,o.K)(e=>`
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3995],{73995:(e,t,a)=>{a.d(t,{diagram:()=>v});var i=a(80650),l=a(56174),r=a(86305),n=a(37325),s=a(56037),o=a(89851),c=a(88863),d=a(32054),p=n.UI.pie,h={sections:new Map,showData:!1,config:p},g=h.sections,u=h.showData,f=structuredClone(p),m=(0,o.K)(()=>structuredClone(f),"getConfig"),$=(0,o.K)(()=>{g=new Map,u=h.showData,(0,n.IU)()},"clear"),x=(0,o.K)(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);g.has(e)||(g.set(e,t),s.R.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),w=(0,o.K)(()=>g,"getSections"),S=(0,o.K)(e=>{u=e},"setShowData"),y=(0,o.K)(()=>u,"getShowData"),b={getConfig:m,clear:$,setDiagramTitle:n.ke,getDiagramTitle:n.ab,setAccTitle:n.SV,getAccTitle:n.iN,setAccDescription:n.EI,getAccDescription:n.m7,addSection:x,getSections:w,setShowData:S,getShowData:y},C=(0,o.K)((e,t)=>{(0,i.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),D={parse:(0,o.K)(async e=>{let t=await (0,c.qg)("pie",e);s.R.debug(t),C(t,b)},"parse")},T=(0,o.K)(e=>`
2
2
  .pieCircle{
3
3
  stroke: ${e.pieStrokeColor};
4
4
  stroke-width : ${e.pieStrokeWidth};
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4004],{14004:(t,e,s)=>{s.d(e,{AC:()=>T,tM:()=>D,ur:()=>C});var i=s(71662),r=s(16443),a=s(45097),n=s(66246),u=s(48362),l=s(40202),o=s(94340),c=s(86305),h=s(37325),d=s(56037),p=s(89851),g=s(33948),A=s(91992),y=s(72555),b=s(13222),k=class{constructor(){this.vertexCounter=0,this.config=(0,h.D7)(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=h.SV,this.setAccDescription=h.EI,this.setDiagramTitle=h.ke,this.getAccTitle=h.iN,this.getAccDescription=h.m7,this.getDiagramTitle=h.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,p.K)(this,"FlowDB")}sanitizeText(t){return h.Y2.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let e of this.vertices.values())if(e.id===t)return this.diagramId?`${this.diagramId}-${e.domId}`:e.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,e,s,i,r,a,u={},l){let c,p;if(!t||0===t.trim().length)return;if(void 0!==l){let t;t=l.includes("\n")?l+"\n":"{\n"+l+"\n}",c=(0,n.H)(t,{schema:n.r})}let g=this.edges.find(e=>e.id===t);if(g){let t=c;t?.animate!==void 0&&(g.animate=t.animate),t?.animation!==void 0&&(g.animation=t.animation),t?.curve!==void 0&&(g.interpolate=t.curve);return}let A=this.vertices.get(t);if(void 0===A&&(void 0===e&&void 0===s&&null!=i&&d.R.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),A={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,A)),this.vertexCounter++,void 0!==e?(this.config=(0,h.D7)(),p=this.sanitizeText(e.text.trim()),A.labelType=e.type,p.startsWith('"')&&p.endsWith('"')&&(p=p.substring(1,p.length-1)),A.text=p):void 0===A.text&&(A.text=t),void 0!==s&&(A.type=s),null!=i&&i.forEach(t=>{A.styles.push(t)}),null!=r&&r.forEach(t=>{A.classes.push(t)}),void 0!==a&&(A.dir=a),void 0===A.props?A.props=u:void 0!==u&&Object.assign(A.props,u),void 0!==c){if(c.shape){if(c.shape!==c.shape.toLowerCase()||c.shape.includes("_"))throw Error(`No such shape: ${c.shape}. Shape names should be lowercase.`);if(!(0,o.aP)(c.shape))throw Error(`No such shape: ${c.shape}.`);A.type=c?.shape}c?.label&&(A.text=c?.label,A.labelType=this.sanitizeNodeLabelType(c?.labelType)),c?.icon&&(A.icon=c?.icon,c.label?.trim()||A.text!==t||(A.text="")),c?.form&&(A.form=c?.form),c?.pos&&(A.pos=c?.pos),c?.img&&(A.img=c?.img,c.label?.trim()||A.text!==t||(A.text="")),c?.constraint&&(A.constraint=c.constraint),c.w&&(A.assetWidth=Number(c.w)),c.h&&(A.assetHeight=Number(c.h))}}addSingleLink(t,e,s,i){let r={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};d.R.info("abc78 Got edge...",r);let a=s.text;if(void 0!==a&&(r.text=this.sanitizeText(a.text.trim()),r.text.startsWith('"')&&r.text.endsWith('"')&&(r.text=r.text.substring(1,r.text.length-1)),r.labelType=this.sanitizeNodeLabelType(a.type)),void 0!==s&&(r.type=s.type,r.stroke=s.stroke,r.length=s.length>10?10:s.length),i&&!this.edges.some(t=>t.id===i))r.id=i,r.isUserDefinedId=!0;else{let t=this.edges.filter(t=>t.start===r.start&&t.end===r.end);0===t.length?r.id=(0,c.rY)(r.start,r.end,{counter:0,prefix:"L"}):r.id=(0,c.rY)(r.start,r.end,{counter:t.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))d.R.info("Pushing edge..."),this.edges.push(r);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4004],{14004:(t,e,s)=>{s.d(e,{AC:()=>T,tM:()=>D,ur:()=>C});var i=s(71662),r=s(16443),a=s(45097),n=s(66246),u=s(48362),l=s(40202),o=s(94340),c=s(86305),h=s(37325),d=s(56037),p=s(89851),g=s(32054),A=s(91992),y=s(72555),b=s(13222),k=class{constructor(){this.vertexCounter=0,this.config=(0,h.D7)(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=h.SV,this.setAccDescription=h.EI,this.setDiagramTitle=h.ke,this.getAccTitle=h.iN,this.getAccDescription=h.m7,this.getDiagramTitle=h.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,p.K)(this,"FlowDB")}sanitizeText(t){return h.Y2.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let e of this.vertices.values())if(e.id===t)return this.diagramId?`${this.diagramId}-${e.domId}`:e.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,e,s,i,r,a,u={},l){let c,p;if(!t||0===t.trim().length)return;if(void 0!==l){let t;t=l.includes("\n")?l+"\n":"{\n"+l+"\n}",c=(0,n.H)(t,{schema:n.r})}let g=this.edges.find(e=>e.id===t);if(g){let t=c;t?.animate!==void 0&&(g.animate=t.animate),t?.animation!==void 0&&(g.animation=t.animation),t?.curve!==void 0&&(g.interpolate=t.curve);return}let A=this.vertices.get(t);if(void 0===A&&(void 0===e&&void 0===s&&null!=i&&d.R.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),A={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,A)),this.vertexCounter++,void 0!==e?(this.config=(0,h.D7)(),p=this.sanitizeText(e.text.trim()),A.labelType=e.type,p.startsWith('"')&&p.endsWith('"')&&(p=p.substring(1,p.length-1)),A.text=p):void 0===A.text&&(A.text=t),void 0!==s&&(A.type=s),null!=i&&i.forEach(t=>{A.styles.push(t)}),null!=r&&r.forEach(t=>{A.classes.push(t)}),void 0!==a&&(A.dir=a),void 0===A.props?A.props=u:void 0!==u&&Object.assign(A.props,u),void 0!==c){if(c.shape){if(c.shape!==c.shape.toLowerCase()||c.shape.includes("_"))throw Error(`No such shape: ${c.shape}. Shape names should be lowercase.`);if(!(0,o.aP)(c.shape))throw Error(`No such shape: ${c.shape}.`);A.type=c?.shape}c?.label&&(A.text=c?.label,A.labelType=this.sanitizeNodeLabelType(c?.labelType)),c?.icon&&(A.icon=c?.icon,c.label?.trim()||A.text!==t||(A.text="")),c?.form&&(A.form=c?.form),c?.pos&&(A.pos=c?.pos),c?.img&&(A.img=c?.img,c.label?.trim()||A.text!==t||(A.text="")),c?.constraint&&(A.constraint=c.constraint),c.w&&(A.assetWidth=Number(c.w)),c.h&&(A.assetHeight=Number(c.h))}}addSingleLink(t,e,s,i){let r={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};d.R.info("abc78 Got edge...",r);let a=s.text;if(void 0!==a&&(r.text=this.sanitizeText(a.text.trim()),r.text.startsWith('"')&&r.text.endsWith('"')&&(r.text=r.text.substring(1,r.text.length-1)),r.labelType=this.sanitizeNodeLabelType(a.type)),void 0!==s&&(r.type=s.type,r.stroke=s.stroke,r.length=s.length>10?10:s.length),i&&!this.edges.some(t=>t.id===i))r.id=i,r.isUserDefinedId=!0;else{let t=this.edges.filter(t=>t.start===r.start&&t.end===r.end);0===t.length?r.id=(0,c.rY)(r.start,r.end,{counter:0,prefix:"L"}):r.id=(0,c.rY)(r.start,r.end,{counter:t.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))d.R.info("Pushing edge..."),this.edges.push(r);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
2
2
 
3
3
  Initialize mermaid with maxEdges set to a higher number to allow more edges.
4
4
  You cannot set this config via configuration inside the diagram as it is a secure config.
@@ -143,7 +143,7 @@ You have to call mermaid.initialize.`)}isLinkData(t){return null!==t&&"object"==
143
143
  text-align: center;
144
144
  }
145
145
  ${(0,i.o)()}
146
- `,"getStyles"),C=(0,p.K)(({defaultLayout:t,styles:e=D}={})=>({parser:x,get db(){return new k},renderer:f,styles:e,init:(0,p.K)(e=>{e.flowchart||(e.flowchart={});let s=(0,h.TM)().layout??t??e.layout;s&&(0,h.XV)({layout:s}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,(0,h.XV)({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),T=C()},16443:(t,e,s)=>{s.d(e,{A:()=>a});var i=s(89851),r=s(33948),a=(0,i.K)((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},40202:(t,e,s)=>{s.d(e,{CP:()=>h,Ck:()=>g,HT:()=>p,PB:()=>d,aC:()=>c,lC:()=>l,m:()=>o,tk:()=>u});var i=s(37325),r=s(89851),a=s(84485),n=s(33948),u=(0,r.K)((t,e)=>{let s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)s.attr(t,e.attrs[t]);return e.class&&s.attr("class",e.class),s},"drawRect"),l=(0,r.K)((t,e)=>{u(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),o=(0,r.K)((t,e)=>{let s=e.text.replace(i.H1," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class&&r.attr("class",e.class);let a=r.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(s),r},"drawText"),c=(0,r.K)((t,e,s,i)=>{let r=t.append("image");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",n)},"drawImage"),h=(0,r.K)((t,e,s,i)=>{let r=t.append("use");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),d=(0,r.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,r.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,r.K)(()=>{let t=(0,n.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},45097:(t,e,s)=>{s.d(e,{P:()=>n});var i=s(37325),r=s(56037),a=s(89851),n=(0,a.K)((t,e,s,a)=>{t.attr("class",s);let{width:n,height:o,x:c,y:h}=u(t,e);(0,i.a$)(t,o,n,a);let d=l(c,h,n,o,e);t.attr("viewBox",d),r.R.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),u=(0,a.K)((t,e)=>{let s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,a.K)((t,e,s,i,r)=>`${t-r} ${e-r} ${s} ${i}`,"createViewBox")},71662:(t,e,s)=>{s.d(e,{o:()=>i});var i=(0,s(89851).K)(()=>`
146
+ `,"getStyles"),C=(0,p.K)(({defaultLayout:t,styles:e=D}={})=>({parser:x,get db(){return new k},renderer:f,styles:e,init:(0,p.K)(e=>{e.flowchart||(e.flowchart={});let s=(0,h.TM)().layout??t??e.layout;s&&(0,h.XV)({layout:s}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,(0,h.XV)({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),T=C()},16443:(t,e,s)=>{s.d(e,{A:()=>a});var i=s(89851),r=s(32054),a=(0,i.K)((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},40202:(t,e,s)=>{s.d(e,{CP:()=>h,Ck:()=>g,HT:()=>p,PB:()=>d,aC:()=>c,lC:()=>l,m:()=>o,tk:()=>u});var i=s(37325),r=s(89851),a=s(84485),n=s(32054),u=(0,r.K)((t,e)=>{let s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)s.attr(t,e.attrs[t]);return e.class&&s.attr("class",e.class),s},"drawRect"),l=(0,r.K)((t,e)=>{u(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),o=(0,r.K)((t,e)=>{let s=e.text.replace(i.H1," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class&&r.attr("class",e.class);let a=r.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(s),r},"drawText"),c=(0,r.K)((t,e,s,i)=>{let r=t.append("image");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",n)},"drawImage"),h=(0,r.K)((t,e,s,i)=>{let r=t.append("use");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),d=(0,r.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,r.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,r.K)(()=>{let t=(0,n.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},45097:(t,e,s)=>{s.d(e,{P:()=>n});var i=s(37325),r=s(56037),a=s(89851),n=(0,a.K)((t,e,s,a)=>{t.attr("class",s);let{width:n,height:o,x:c,y:h}=u(t,e);(0,i.a$)(t,o,n,a);let d=l(c,h,n,o,e);t.attr("viewBox",d),r.R.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),u=(0,a.K)((t,e)=>{let s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,a.K)((t,e,s,i,r)=>`${t-r} ${e-r} ${s} ${i}`,"createViewBox")},71662:(t,e,s)=>{s.d(e,{o:()=>i});var i=(0,s(89851).K)(()=>`
147
147
  /* Font Awesome icon styling - consolidated */
148
148
  .label-icon {
149
149
  display: inline-block;
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4202],{16443:(t,e,s)=>{s.d(e,{A:()=>a});var i=s(89851),r=s(33948),a=(0,i.K)((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},40202:(t,e,s)=>{s.d(e,{CP:()=>d,Ck:()=>y,HT:()=>p,PB:()=>u,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>o});var i=s(37325),r=s(89851),a=s(84485),n=s(33948),o=(0,r.K)((t,e)=>{let s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)s.attr(t,e.attrs[t]);return e.class&&s.attr("class",e.class),s},"drawRect"),l=(0,r.K)((t,e)=>{o(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),c=(0,r.K)((t,e)=>{let s=e.text.replace(i.H1," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class&&r.attr("class",e.class);let a=r.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(s),r},"drawText"),h=(0,r.K)((t,e,s,i)=>{let r=t.append("image");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",n)},"drawImage"),d=(0,r.K)((t,e,s,i)=>{let r=t.append("use");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),u=(0,r.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,r.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),y=(0,r.K)(()=>{let t=(0,n.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},45097:(t,e,s)=>{s.d(e,{P:()=>n});var i=s(37325),r=s(56037),a=s(89851),n=(0,a.K)((t,e,s,a)=>{t.attr("class",s);let{width:n,height:c,x:h,y:d}=o(t,e);(0,i.a$)(t,c,n,a);let u=l(h,d,n,c,e);t.attr("viewBox",u),r.R.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),o=(0,a.K)((t,e)=>{let s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,a.K)((t,e,s,i,r)=>`${t-r} ${e-r} ${s} ${i}`,"createViewBox")},74202:(t,e,s)=>{s.d(e,{Zk:()=>y,q7:()=>j,tM:()=>tn,u4:()=>ta});var i=s(16443),r=s(45097),a=s(48362),n=s(40202),o=s(86305),l=s(37325),c=s(56037),h=s(89851),d=s(33948),u=s(91992),p=function(){var t=(0,h.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],i=[1,4],r=[2,4],a=[1,9],n=[1,11],o=[1,16],l=[1,17],c=[1,18],d=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],k=[1,27],b=[1,28],T=[1,29],_=[1,30],x=[1,31],E=[1,32],D=[1,35],$=[1,36],C=[1,37],v=[1,38],I=[1,34],w=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],A=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],L=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],R={trace:(0,h.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,h.K)(function(t,e,s,i,r,a,n){var o=a.length-1;switch(r){case 3:return i.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:case 12:this.$=a[o];break;case 8:this.$="nl";break;case 13:let l=a[o-1];l.description=i.trimColon(a[o]),this.$=l;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:let c=i.trimColon(a[o]);this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var h=a[o],d=a[o-2].trim();if(a[o].match(":")){var u=a[o].split(":");h=u[0],d=[d,u[1]]}this.$={stmt:"state",id:h,type:"default",description:d};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:I},t(w,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:I},t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12],{14:[1,40],15:[1,41]}),t(w,[2,16]),{18:[1,42]},t(w,[2,18],{20:[1,43]}),{23:[1,44]},t(w,[2,22]),t(w,[2,23]),t(w,[2,24]),t(w,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(w,[2,28]),{34:[1,49]},{36:[1,50]},t(w,[2,31]),{13:51,24:u,57:I},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(A,[2,44],{58:[1,56]}),t(A,[2,45],{58:[1,57]}),t(w,[2,38]),t(w,[2,39]),t(w,[2,40]),t(w,[2,41]),t(w,[2,6]),t(w,[2,13]),{13:58,24:u,57:I},t(w,[2,17]),t(L,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(w,[2,29]),t(w,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(w,[2,14],{14:[1,71]}),{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,72],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:I},t(w,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(w,[2,34]),t(w,[2,35]),t(w,[2,36]),t(w,[2,37]),t(A,[2,46]),t(A,[2,47]),t(w,[2,15]),t(w,[2,19]),t(L,r,{7:78}),t(w,[2,26]),t(w,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,81],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:I},t(w,[2,32]),t(w,[2,33]),t(w,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,h.K)(function(t,e){if(e.recoverable)this.trace(t);else{var s=Error(t);throw s.hash=e,s}},"parseError"),parse:(0,h.K)(function(t){var e=this,s=[0],i=[],r=[null],a=[],n=this.table,o="",l=0,c=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y[g]=this.yy[g]);p.setInput(t,y),y.lexer=p,y.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K)(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,h.K)(S,"lex");for(var k,b,T,_,x,E,D,$,C,v={};;){if(T=s[s.length-1],this.defaultActions[T]?_=this.defaultActions[T]:(null==k&&(k=S()),_=n[T]&&n[T][k]),void 0===_||!_.length||!_[0]){var I="";for(E in C=[],n[T])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");I=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw Error("Parse Error: multiple actions possible at state: "+T+", token: "+k);switch(_[0]){case 1:s.push(k),r.push(p.yytext),a.push(p.yylloc),s.push(_[1]),k=null,b?(k=b,b=null):(c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(D=this.productions_[_[1]][1],v.$=r[r.length-D],v._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},m&&(v._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(v,[o,c,l,y,_[1],r,a].concat(u))))return x;D&&(s=s.slice(0,-1*D*2),r=r.slice(0,-1*D),a=a.slice(0,-1*D)),s.push(this.productions_[_[1]][0]),r.push(v.$),a.push(v._$),$=n[s[s.length-2]][s[s.length-1]],s.push($);break;case 3:return!0}}return!0},"parse")};function N(){this.yy={}}return R.lexer={EOF:1,parseError:(0,h.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,h.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:(0,h.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,h.K)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),s.length-1&&(this.yylineno-=s.length-1);var r=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,h.K)(function(){return this._more=!0,this},"more"),reject:(0,h.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,h.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,h.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,h.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,h.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,h.K)(function(t,e){var s,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var a in r)this[a]=r[a];return!1},"test_match"),next:(0,h.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,r=this._currentRules(),a=0;a<r.length;a++)if((s=this._input.match(this.rules[r[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,h.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,h.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,h.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,h.K)(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:(0,h.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,h.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,h.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,h.K)(function(t,e,s,i){function r(){let s=e.yytext.indexOf("%%");if(0===s)return!1;if(s>0){let i=e.yytext.slice(0,s),r=e.yytext.slice(s);r&&t.lexer.unput(r),e.yytext=i}return!0}switch((0,h.K)(r,"processId"),s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 78:return 5;case 9:case 10:case 11:case 12:case 57:case 63:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 54:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 65:if(!r())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+e.yytext.trim()+'"');case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:return"NOTE_TEXT";case 66:if(!r())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 68:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!r())return;return 24;case 74:return e.yytext=e.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}},(0,h.K)(N,"Parser"),N.prototype=R,R.Parser=N,new N}();p.parser=p;var y=p,g="TB",f="state",m="root",S="relation",k="default",b="divider",T="fill:none",_="fill: #333",x="markdown",E="normal",D="rect",$="rectWithTitle",C="divider",v="roundedWithTitle",I="statediagram",w=`${I}-state`,A="transition",L=`${A} note-edge`,R=`${I}-note`,N=`${I}-cluster`,K=`${I}-cluster-alt`,O="parent",B="note",F="----",P=`${F}${B}`,Y=`${F}${O}`,G=(0,h.K)((t,e=g)=>{if(!t.doc)return e;let s=e;for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir"),j={getClasses:(0,h.K)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,h.K)(async function(t,e,s,n){c.R.info("REF0:"),c.R.info("Drawing state diagram (v2)",e);let{securityLevel:h,state:d,layout:u}=(0,l.D7)();n.db.extract(n.db.getRootDocV2());let p=n.db.getData(),y=(0,i.A)(e,h);p.type=n.type,p.layoutAlgorithm=u,p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50,"neo"===(0,l.D7)().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await (0,a.XX)(p,y);try{("function"==typeof n.db.getLinks?n.db.getLinks():new Map).forEach((t,e)=>{let s,i="string"==typeof e?e:"string"==typeof e?.id?e.id:"",r=p.nodes.find(t=>t.id===i);if(!i)return void c.R.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));let a=y.node()?.querySelectorAll("g.node, g.rough-node");if(a?.forEach(t=>{let e=t.textContent?.trim();(t.id===r?.domId||e===i)&&(s=t)}),!s)return void c.R.warn("⚠️ Could not find node matching text:",i);let n=s.parentNode;if(!n)return void c.R.warn("⚠️ Node has no parent, cannot wrap:",i);let o=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),o.setAttribute("target","_blank"),t.tooltip){let e=t.tooltip.replace(/^"+|"+$/g,"");o.setAttribute("title",e),s.setAttribute("title",e)}n.replaceChild(o,s),o.appendChild(s),c.R.info("\uD83D\uDD17 Wrapped node in <a> tag for:",i,t.url)})}catch(t){c.R.error("❌ Error injecting clickable links:",t)}o._K.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,n.db.getDiagramTitle()),(0,r.P)(y,8,I,d?.useMaxWidth??!0)},"draw"),getDir:G},z=new Map,M=0;function W(t="",e=0,s="",i=F){let r=null!==s&&s.length>0?`${i}${s}`:"";return`state-${t}${r}-${e}`}(0,h.K)(W,"stateDomId");var U=(0,h.K)((t,e,s,i,r,a,n,o)=>{c.R.trace("items",e),e.forEach(e=>{switch(e.stmt){case f:case k:q(t,e,s,i,r,a,n,o);break;case S:{q(t,e.state1,s,i,r,a,n,o),q(t,e.state2,s,i,r,a,n,o);let c="neo"===n,h={id:"edge"+M,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:c?"arrow_barb_neo":"arrow_barb",style:T,labelStyle:"",label:l.Y2.sanitizeText(e.description??"",(0,l.D7)()),arrowheadStyle:_,labelpos:"c",labelType:x,thickness:E,classes:A,look:n};r.push(h),M++}}})},"setupDoc"),X=(0,h.K)((t,e=g)=>{let s=e;if(t.doc)for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir");function H(t,e,s){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{let i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));let i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function V(t){return t?.classes?.join(" ")??""}function J(t){return t?.styles??[]}(0,h.K)(H,"insertOrUpdateNode"),(0,h.K)(V,"getClassesFromDbInfo"),(0,h.K)(J,"getStylesFromDbInfo");var q=(0,h.K)((t,e,s,i,r,a,n,o)=>{let h=e.id,d=s.get(h),u=V(d),p=J(d),y=(0,l.D7)();if(c.R.info("dataFetcher parsedItem",e,d,p),"root"!==h){let s=D;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==k&&(s=e.type),z.get(h)||z.set(h,{id:h,shape:s,description:l.Y2.sanitizeText(h,y),cssClasses:`${u} ${w}`,cssStyles:p});let d=z.get(h);e.description&&(Array.isArray(d.description)?(d.shape=$,d.description.push(e.description)):d.description?.length&&d.description.length>0?(d.shape=$,d.description===h?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=D,d.description=e.description),d.description=l.Y2.sanitizeTextOrArray(d.description,y)),d.description?.length===1&&d.shape===$&&("group"===d.type?d.shape=v:d.shape=D),!d.type&&e.doc&&(c.R.info("Setting cluster for XCX",h,X(e)),d.type="group",d.isGroup=!0,d.dir=X(e),d.explicitDir=e.doc.some(t=>"dir"===t.stmt),d.shape=e.type===b?C:v,d.cssClasses=`${d.cssClasses} ${N} ${a?K:""}`);let g={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:h,dir:d.dir,domId:W(h,M),type:d.type,isGroup:"group"===d.type,padding:8,rx:10,ry:10,look:n,labelType:"markdown"};if(g.shape===C&&(g.label=""),t&&"root"!==t.id&&(c.R.trace("Setting node ",h," to be child of its parent ",t.id),g.parentId=t.id),g.centerLabel=!0,e.note){let t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:R,cssStyles:[],cssCompiledStyles:[],id:h+P+"-"+M,domId:W(h,M,B),type:d.type,isGroup:"group"===d.type,padding:y.flowchart?.padding,look:n,position:e.note.position},s=h+Y,a={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:h+Y,domId:W(h,M,O),type:"group",isGroup:!0,padding:16,look:n,position:e.note.position};M++,a.id=s,t.parentId=s,H(i,a,o),H(i,t,o),H(i,g,o);let l=h,c=t.id;"left of"===e.note.position&&(l=t.id,c=h),r.push({id:l+"-"+c,start:l,end:c,arrowhead:"none",arrowTypeEnd:"",style:T,labelStyle:"",classes:L,arrowheadStyle:_,labelpos:"c",labelType:x,thickness:E,look:n})}else H(i,g,o)}e.doc&&(c.R.trace("Adding nodes children "),U(e,e.doc,s,i,r,!a,n,o))},"dataFetcher"),Z=(0,h.K)(()=>{z.clear(),M=0},"reset"),Q="start",tt="color",te="fill",ts=(0,h.K)(()=>new Map,"newClassesList"),ti=(0,h.K)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),tr=(0,h.K)(t=>JSON.parse(JSON.stringify(t)),"clone"),ta=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=ts(),this.documents={root:ti()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=l.iN,this.setAccTitle=l.SV,this.getAccDescription=l.m7,this.setAccDescription=l.EI,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{(0,h.K)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){for(let e of(this.clear(!0),Array.isArray(t)?t:t.doc))switch(e.stmt){case f:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case S:this.addRelation(e.state1,e.state2,e.description);break;case"classDef":this.addStyleClass(e.id.trim(),e.classes);break;case"style":this.handleStyleDef(e);break;case"applyClass":this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}let e=this.getStates(),s=(0,l.D7)();for(let t of(Z(),q(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes),this.nodes))if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${t.id}]`);t.label=t.label[0]}}handleStyleDef(t){let e=t.id.trim().split(","),s=t.styleClass.split(",");for(let t of e){let e=this.getState(t);if(!e){let s=t.trim();this.addState(s),e=this.getState(s)}e&&(e.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){c.R.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===S){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===f&&("[*]"===e.id?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==m&&e.stmt!==f||!e.doc)return;let i=[],r=[];for(let t of e.doc)if(t.type===b){let e=tr(t);e.doc=tr(r),i.push(e),r=[]}else r.push(t);if(i.length>0&&r.length>0){let t={stmt:f,id:(0,o.$C)(),type:"divider",doc:tr(r)};i.push(tr(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:m,stmt:m},{id:m,stmt:m,doc:this.rootDoc},!0),{id:m,doc:this.rootDoc}}addState(t,e=k,s,i,r,a,n,o){let h=t?.trim();if(this.currentDocument.states.has(h)){let t=this.currentDocument.states.get(h);if(!t)throw Error(`State not found: ${h}`);t.doc||(t.doc=s),t.type||(t.type=e)}else c.R.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:f,id:h,descriptions:[],type:e,doc:s,note:r,classes:[],styles:[],textStyles:[]});if(i&&(c.R.info("Setting state description",h,i),(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(h,t.trim()))),r){let t=this.currentDocument.states.get(h);if(!t)throw Error(`State not found: ${h}`);t.note=r,t.note.text=l.Y2.sanitizeText(t.note.text,(0,l.D7)())}a&&(c.R.info("Setting state classes",h,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(h,t.trim()))),n&&(c.R.info("Setting state styles",h,n),(Array.isArray(n)?n:[n]).forEach(t=>this.setStyle(h,t.trim()))),o&&(c.R.info("Setting state styles",h,n),(Array.isArray(o)?o:[o]).forEach(t=>this.setTextStyle(h,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:ti()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=ts(),t||(this.links=new Map,(0,l.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){c.R.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),c.R.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return"[*]"===t?(this.startEndCount++,`${Q}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=k){return"[*]"===t?Q:e}endIdIfNeeded(t=""){return"[*]"===t?(this.startEndCount++,`end${this.startEndCount}`):t}endTypeIfNeeded(t="",e=k){return"[*]"===t?"end":e}addRelationObjs(t,e,s=""){let i=this.startIdIfNeeded(t.id.trim()),r=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),n=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,n,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:l.Y2.sanitizeText(s,(0,l.D7)())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){let i=this.startIdIfNeeded(t.trim()),r=this.startTypeIfNeeded(t),a=this.endIdIfNeeded(e.trim()),n=this.endTypeIfNeeded(e);this.addState(i,r),this.addState(a,n),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:s?l.Y2.sanitizeText(s,(0,l.D7)()):void 0})}}addDescription(t,e){let s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(l.Y2.sanitizeText(i,(0,l.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let s=this.classes.get(t);e&&s&&e.split(",").forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(tt).exec(t)){let t=e.replace(te,"bgFill").replace(tt,te);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setupToolTips(t){let e=(0,n.Ck)();(0,d.Ltv)(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",t=>{let s=(0,d.Ltv)(t.currentTarget),i=s.attr("title");if(null===i)return;let r=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+r.left+(r.right-r.left)/2+"px").style("top",window.scrollY+r.bottom+"px"),e.html(u.A.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),(0,d.Ltv)(t.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){let e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){let e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=(0,l.D7)();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:G(this.getRootDocV2())}}getConfig(){return(0,l.D7)().state}},tn=(0,h.K)(t=>`
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4202],{16443:(t,e,s)=>{s.d(e,{A:()=>a});var i=s(89851),r=s(32054),a=(0,i.K)((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},40202:(t,e,s)=>{s.d(e,{CP:()=>d,Ck:()=>y,HT:()=>p,PB:()=>u,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>o});var i=s(37325),r=s(89851),a=s(84485),n=s(32054),o=(0,r.K)((t,e)=>{let s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)s.attr(t,e.attrs[t]);return e.class&&s.attr("class",e.class),s},"drawRect"),l=(0,r.K)((t,e)=>{o(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),c=(0,r.K)((t,e)=>{let s=e.text.replace(i.H1," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class&&r.attr("class",e.class);let a=r.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(s),r},"drawText"),h=(0,r.K)((t,e,s,i)=>{let r=t.append("image");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",n)},"drawImage"),d=(0,r.K)((t,e,s,i)=>{let r=t.append("use");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),u=(0,r.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,r.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),y=(0,r.K)(()=>{let t=(0,n.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},45097:(t,e,s)=>{s.d(e,{P:()=>n});var i=s(37325),r=s(56037),a=s(89851),n=(0,a.K)((t,e,s,a)=>{t.attr("class",s);let{width:n,height:c,x:h,y:d}=o(t,e);(0,i.a$)(t,c,n,a);let u=l(h,d,n,c,e);t.attr("viewBox",u),r.R.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),o=(0,a.K)((t,e)=>{let s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,a.K)((t,e,s,i,r)=>`${t-r} ${e-r} ${s} ${i}`,"createViewBox")},74202:(t,e,s)=>{s.d(e,{Zk:()=>y,q7:()=>j,tM:()=>tn,u4:()=>ta});var i=s(16443),r=s(45097),a=s(48362),n=s(40202),o=s(86305),l=s(37325),c=s(56037),h=s(89851),d=s(32054),u=s(91992),p=function(){var t=(0,h.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],i=[1,4],r=[2,4],a=[1,9],n=[1,11],o=[1,16],l=[1,17],c=[1,18],d=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],k=[1,27],b=[1,28],T=[1,29],_=[1,30],x=[1,31],E=[1,32],D=[1,35],$=[1,36],C=[1,37],v=[1,38],I=[1,34],w=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],A=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],L=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],R={trace:(0,h.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,h.K)(function(t,e,s,i,r,a,n){var o=a.length-1;switch(r){case 3:return i.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:case 12:this.$=a[o];break;case 8:this.$="nl";break;case 13:let l=a[o-1];l.description=i.trimColon(a[o]),this.$=l;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:let c=i.trimColon(a[o]);this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var h=a[o],d=a[o-2].trim();if(a[o].match(":")){var u=a[o].split(":");h=u[0],d=[d,u[1]]}this.$={stmt:"state",id:h,type:"default",description:d};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:I},t(w,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:I},t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12],{14:[1,40],15:[1,41]}),t(w,[2,16]),{18:[1,42]},t(w,[2,18],{20:[1,43]}),{23:[1,44]},t(w,[2,22]),t(w,[2,23]),t(w,[2,24]),t(w,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(w,[2,28]),{34:[1,49]},{36:[1,50]},t(w,[2,31]),{13:51,24:u,57:I},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(A,[2,44],{58:[1,56]}),t(A,[2,45],{58:[1,57]}),t(w,[2,38]),t(w,[2,39]),t(w,[2,40]),t(w,[2,41]),t(w,[2,6]),t(w,[2,13]),{13:58,24:u,57:I},t(w,[2,17]),t(L,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(w,[2,29]),t(w,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(w,[2,14],{14:[1,71]}),{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,72],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:I},t(w,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(w,[2,34]),t(w,[2,35]),t(w,[2,36]),t(w,[2,37]),t(A,[2,46]),t(A,[2,47]),t(w,[2,15]),t(w,[2,19]),t(L,r,{7:78}),t(w,[2,26]),t(w,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,81],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:x,48:E,51:D,52:$,53:C,54:v,57:I},t(w,[2,32]),t(w,[2,33]),t(w,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,h.K)(function(t,e){if(e.recoverable)this.trace(t);else{var s=Error(t);throw s.hash=e,s}},"parseError"),parse:(0,h.K)(function(t){var e=this,s=[0],i=[],r=[null],a=[],n=this.table,o="",l=0,c=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y[g]=this.yy[g]);p.setInput(t,y),y.lexer=p,y.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K)(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,h.K)(S,"lex");for(var k,b,T,_,x,E,D,$,C,v={};;){if(T=s[s.length-1],this.defaultActions[T]?_=this.defaultActions[T]:(null==k&&(k=S()),_=n[T]&&n[T][k]),void 0===_||!_.length||!_[0]){var I="";for(E in C=[],n[T])this.terminals_[E]&&E>2&&C.push("'"+this.terminals_[E]+"'");I=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw Error("Parse Error: multiple actions possible at state: "+T+", token: "+k);switch(_[0]){case 1:s.push(k),r.push(p.yytext),a.push(p.yylloc),s.push(_[1]),k=null,b?(k=b,b=null):(c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(D=this.productions_[_[1]][1],v.$=r[r.length-D],v._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},m&&(v._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(v,[o,c,l,y,_[1],r,a].concat(u))))return x;D&&(s=s.slice(0,-1*D*2),r=r.slice(0,-1*D),a=a.slice(0,-1*D)),s.push(this.productions_[_[1]][0]),r.push(v.$),a.push(v._$),$=n[s[s.length-2]][s[s.length-1]],s.push($);break;case 3:return!0}}return!0},"parse")};function N(){this.yy={}}return R.lexer={EOF:1,parseError:(0,h.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,h.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:(0,h.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,h.K)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),s.length-1&&(this.yylineno-=s.length-1);var r=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,h.K)(function(){return this._more=!0,this},"more"),reject:(0,h.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,h.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,h.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,h.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,h.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,h.K)(function(t,e){var s,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var a in r)this[a]=r[a];return!1},"test_match"),next:(0,h.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,r=this._currentRules(),a=0;a<r.length;a++)if((s=this._input.match(this.rules[r[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,h.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,h.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,h.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,h.K)(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:(0,h.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,h.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,h.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,h.K)(function(t,e,s,i){function r(){let s=e.yytext.indexOf("%%");if(0===s)return!1;if(s>0){let i=e.yytext.slice(0,s),r=e.yytext.slice(s);r&&t.lexer.unput(r),e.yytext=i}return!0}switch((0,h.K)(r,"processId"),s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 78:return 5;case 9:case 10:case 11:case 12:case 57:case 63:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 54:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 65:if(!r())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+e.yytext.trim()+'"');case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:return"NOTE_TEXT";case 66:if(!r())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 68:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!r())return;return 24;case 74:return e.yytext=e.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}},(0,h.K)(N,"Parser"),N.prototype=R,R.Parser=N,new N}();p.parser=p;var y=p,g="TB",f="state",m="root",S="relation",k="default",b="divider",T="fill:none",_="fill: #333",x="markdown",E="normal",D="rect",$="rectWithTitle",C="divider",v="roundedWithTitle",I="statediagram",w=`${I}-state`,A="transition",L=`${A} note-edge`,R=`${I}-note`,N=`${I}-cluster`,K=`${I}-cluster-alt`,O="parent",B="note",F="----",P=`${F}${B}`,Y=`${F}${O}`,G=(0,h.K)((t,e=g)=>{if(!t.doc)return e;let s=e;for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir"),j={getClasses:(0,h.K)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,h.K)(async function(t,e,s,n){c.R.info("REF0:"),c.R.info("Drawing state diagram (v2)",e);let{securityLevel:h,state:d,layout:u}=(0,l.D7)();n.db.extract(n.db.getRootDocV2());let p=n.db.getData(),y=(0,i.A)(e,h);p.type=n.type,p.layoutAlgorithm=u,p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50,"neo"===(0,l.D7)().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await (0,a.XX)(p,y);try{("function"==typeof n.db.getLinks?n.db.getLinks():new Map).forEach((t,e)=>{let s,i="string"==typeof e?e:"string"==typeof e?.id?e.id:"",r=p.nodes.find(t=>t.id===i);if(!i)return void c.R.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));let a=y.node()?.querySelectorAll("g.node, g.rough-node");if(a?.forEach(t=>{let e=t.textContent?.trim();(t.id===r?.domId||e===i)&&(s=t)}),!s)return void c.R.warn("⚠️ Could not find node matching text:",i);let n=s.parentNode;if(!n)return void c.R.warn("⚠️ Node has no parent, cannot wrap:",i);let o=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),o.setAttribute("target","_blank"),t.tooltip){let e=t.tooltip.replace(/^"+|"+$/g,"");o.setAttribute("title",e),s.setAttribute("title",e)}n.replaceChild(o,s),o.appendChild(s),c.R.info("\uD83D\uDD17 Wrapped node in <a> tag for:",i,t.url)})}catch(t){c.R.error("❌ Error injecting clickable links:",t)}o._K.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,n.db.getDiagramTitle()),(0,r.P)(y,8,I,d?.useMaxWidth??!0)},"draw"),getDir:G},z=new Map,M=0;function W(t="",e=0,s="",i=F){let r=null!==s&&s.length>0?`${i}${s}`:"";return`state-${t}${r}-${e}`}(0,h.K)(W,"stateDomId");var U=(0,h.K)((t,e,s,i,r,a,n,o)=>{c.R.trace("items",e),e.forEach(e=>{switch(e.stmt){case f:case k:q(t,e,s,i,r,a,n,o);break;case S:{q(t,e.state1,s,i,r,a,n,o),q(t,e.state2,s,i,r,a,n,o);let c="neo"===n,h={id:"edge"+M,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:c?"arrow_barb_neo":"arrow_barb",style:T,labelStyle:"",label:l.Y2.sanitizeText(e.description??"",(0,l.D7)()),arrowheadStyle:_,labelpos:"c",labelType:x,thickness:E,classes:A,look:n};r.push(h),M++}}})},"setupDoc"),X=(0,h.K)((t,e=g)=>{let s=e;if(t.doc)for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir");function H(t,e,s){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{let i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));let i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function V(t){return t?.classes?.join(" ")??""}function J(t){return t?.styles??[]}(0,h.K)(H,"insertOrUpdateNode"),(0,h.K)(V,"getClassesFromDbInfo"),(0,h.K)(J,"getStylesFromDbInfo");var q=(0,h.K)((t,e,s,i,r,a,n,o)=>{let h=e.id,d=s.get(h),u=V(d),p=J(d),y=(0,l.D7)();if(c.R.info("dataFetcher parsedItem",e,d,p),"root"!==h){let s=D;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==k&&(s=e.type),z.get(h)||z.set(h,{id:h,shape:s,description:l.Y2.sanitizeText(h,y),cssClasses:`${u} ${w}`,cssStyles:p});let d=z.get(h);e.description&&(Array.isArray(d.description)?(d.shape=$,d.description.push(e.description)):d.description?.length&&d.description.length>0?(d.shape=$,d.description===h?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=D,d.description=e.description),d.description=l.Y2.sanitizeTextOrArray(d.description,y)),d.description?.length===1&&d.shape===$&&("group"===d.type?d.shape=v:d.shape=D),!d.type&&e.doc&&(c.R.info("Setting cluster for XCX",h,X(e)),d.type="group",d.isGroup=!0,d.dir=X(e),d.explicitDir=e.doc.some(t=>"dir"===t.stmt),d.shape=e.type===b?C:v,d.cssClasses=`${d.cssClasses} ${N} ${a?K:""}`);let g={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:h,dir:d.dir,domId:W(h,M),type:d.type,isGroup:"group"===d.type,padding:8,rx:10,ry:10,look:n,labelType:"markdown"};if(g.shape===C&&(g.label=""),t&&"root"!==t.id&&(c.R.trace("Setting node ",h," to be child of its parent ",t.id),g.parentId=t.id),g.centerLabel=!0,e.note){let t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:R,cssStyles:[],cssCompiledStyles:[],id:h+P+"-"+M,domId:W(h,M,B),type:d.type,isGroup:"group"===d.type,padding:y.flowchart?.padding,look:n,position:e.note.position},s=h+Y,a={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:h+Y,domId:W(h,M,O),type:"group",isGroup:!0,padding:16,look:n,position:e.note.position};M++,a.id=s,t.parentId=s,H(i,a,o),H(i,t,o),H(i,g,o);let l=h,c=t.id;"left of"===e.note.position&&(l=t.id,c=h),r.push({id:l+"-"+c,start:l,end:c,arrowhead:"none",arrowTypeEnd:"",style:T,labelStyle:"",classes:L,arrowheadStyle:_,labelpos:"c",labelType:x,thickness:E,look:n})}else H(i,g,o)}e.doc&&(c.R.trace("Adding nodes children "),U(e,e.doc,s,i,r,!a,n,o))},"dataFetcher"),Z=(0,h.K)(()=>{z.clear(),M=0},"reset"),Q="start",tt="color",te="fill",ts=(0,h.K)(()=>new Map,"newClassesList"),ti=(0,h.K)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),tr=(0,h.K)(t=>JSON.parse(JSON.stringify(t)),"clone"),ta=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=ts(),this.documents={root:ti()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=l.iN,this.setAccTitle=l.SV,this.getAccDescription=l.m7,this.setAccDescription=l.EI,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{(0,h.K)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){for(let e of(this.clear(!0),Array.isArray(t)?t:t.doc))switch(e.stmt){case f:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case S:this.addRelation(e.state1,e.state2,e.description);break;case"classDef":this.addStyleClass(e.id.trim(),e.classes);break;case"style":this.handleStyleDef(e);break;case"applyClass":this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}let e=this.getStates(),s=(0,l.D7)();for(let t of(Z(),q(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes),this.nodes))if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${t.id}]`);t.label=t.label[0]}}handleStyleDef(t){let e=t.id.trim().split(","),s=t.styleClass.split(",");for(let t of e){let e=this.getState(t);if(!e){let s=t.trim();this.addState(s),e=this.getState(s)}e&&(e.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){c.R.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===S){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===f&&("[*]"===e.id?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==m&&e.stmt!==f||!e.doc)return;let i=[],r=[];for(let t of e.doc)if(t.type===b){let e=tr(t);e.doc=tr(r),i.push(e),r=[]}else r.push(t);if(i.length>0&&r.length>0){let t={stmt:f,id:(0,o.$C)(),type:"divider",doc:tr(r)};i.push(tr(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:m,stmt:m},{id:m,stmt:m,doc:this.rootDoc},!0),{id:m,doc:this.rootDoc}}addState(t,e=k,s,i,r,a,n,o){let h=t?.trim();if(this.currentDocument.states.has(h)){let t=this.currentDocument.states.get(h);if(!t)throw Error(`State not found: ${h}`);t.doc||(t.doc=s),t.type||(t.type=e)}else c.R.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:f,id:h,descriptions:[],type:e,doc:s,note:r,classes:[],styles:[],textStyles:[]});if(i&&(c.R.info("Setting state description",h,i),(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(h,t.trim()))),r){let t=this.currentDocument.states.get(h);if(!t)throw Error(`State not found: ${h}`);t.note=r,t.note.text=l.Y2.sanitizeText(t.note.text,(0,l.D7)())}a&&(c.R.info("Setting state classes",h,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(h,t.trim()))),n&&(c.R.info("Setting state styles",h,n),(Array.isArray(n)?n:[n]).forEach(t=>this.setStyle(h,t.trim()))),o&&(c.R.info("Setting state styles",h,n),(Array.isArray(o)?o:[o]).forEach(t=>this.setTextStyle(h,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:ti()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=ts(),t||(this.links=new Map,(0,l.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){c.R.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),c.R.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return"[*]"===t?(this.startEndCount++,`${Q}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=k){return"[*]"===t?Q:e}endIdIfNeeded(t=""){return"[*]"===t?(this.startEndCount++,`end${this.startEndCount}`):t}endTypeIfNeeded(t="",e=k){return"[*]"===t?"end":e}addRelationObjs(t,e,s=""){let i=this.startIdIfNeeded(t.id.trim()),r=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),n=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,n,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:l.Y2.sanitizeText(s,(0,l.D7)())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){let i=this.startIdIfNeeded(t.trim()),r=this.startTypeIfNeeded(t),a=this.endIdIfNeeded(e.trim()),n=this.endTypeIfNeeded(e);this.addState(i,r),this.addState(a,n),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:s?l.Y2.sanitizeText(s,(0,l.D7)()):void 0})}}addDescription(t,e){let s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(l.Y2.sanitizeText(i,(0,l.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let s=this.classes.get(t);e&&s&&e.split(",").forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(tt).exec(t)){let t=e.replace(te,"bgFill").replace(tt,te);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setupToolTips(t){let e=(0,n.Ck)();(0,d.Ltv)(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",t=>{let s=(0,d.Ltv)(t.currentTarget),i=s.attr("title");if(null===i)return;let r=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+r.left+(r.right-r.left)/2+"px").style("top",window.scrollY+r.bottom+"px"),e.html(u.A.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),(0,d.Ltv)(t.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){let e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){let e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=(0,l.D7)();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:G(this.getRootDocV2())}}getConfig(){return(0,l.D7)().state}},tn=(0,h.K)(t=>`
2
2
  defs [id$="-barbEnd"] {
3
3
  fill: ${t.transitionColor};
4
4
  stroke: ${t.transitionColor};