@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,4 +1,4 @@
1
- exports.id=673,exports.ids=[673],exports.modules={2388:function(a){a.exports=function(a,b){var c=b.prototype,d=c.format;c.format=function(a){var b=this,c=this.$locale();if(!this.isValid())return d.bind(this)(a);var e=this.$utils(),f=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(a){switch(a){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return c.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return c.ordinal(b.week(),"W");case"w":case"ww":return e.s(b.week(),"w"===a?1:2,"0");case"W":case"WW":return e.s(b.isoWeek(),"W"===a?1:2,"0");case"k":case"kk":return e.s(String(0===b.$H?24:b.$H),"k"===a?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return a}});return d.bind(this)(f)}}},13580:function(a){a.exports=function(){"use strict";var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},b=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,c=/\d/,d=/\d\d/,e=/\d\d?/,f=/\d*[^-_:/,()\s\d]+/,g={},h=function(a){return(a*=1)+(a>68?1900:2e3)},i=function(a){return function(b){this[a]=+b}},j=[/[+-]\d\d:?(\d\d)?|Z/,function(a){(this.zone||(this.zone={})).offset=function(a){if(!a||"Z"===a)return 0;var b=a.match(/([+-]|\d\d)/g),c=60*b[1]+(+b[2]||0);return 0===c?0:"+"===b[0]?-c:c}(a)}],k=function(a){var b=g[a];return b&&(b.indexOf?b:b.s.concat(b.f))},l=function(a,b){var c,d=g.meridiem;if(d){for(var e=1;e<=24;e+=1)if(a.indexOf(d(e,0,b))>-1){c=e>12;break}}else c=a===(b?"pm":"PM");return c},m={A:[f,function(a){this.afternoon=l(a,!1)}],a:[f,function(a){this.afternoon=l(a,!0)}],Q:[c,function(a){this.month=3*(a-1)+1}],S:[c,function(a){this.milliseconds=100*a}],SS:[d,function(a){this.milliseconds=10*a}],SSS:[/\d{3}/,function(a){this.milliseconds=+a}],s:[e,i("seconds")],ss:[e,i("seconds")],m:[e,i("minutes")],mm:[e,i("minutes")],H:[e,i("hours")],h:[e,i("hours")],HH:[e,i("hours")],hh:[e,i("hours")],D:[e,i("day")],DD:[d,i("day")],Do:[f,function(a){var b=g.ordinal,c=a.match(/\d+/);if(this.day=c[0],b)for(var d=1;d<=31;d+=1)b(d).replace(/\[|\]/g,"")===a&&(this.day=d)}],w:[e,i("week")],ww:[d,i("week")],M:[e,i("month")],MM:[d,i("month")],MMM:[f,function(a){var b=k("months"),c=(k("monthsShort")||b.map(function(a){return a.slice(0,3)})).indexOf(a)+1;if(c<1)throw Error();this.month=c%12||c}],MMMM:[f,function(a){var b=k("months").indexOf(a)+1;if(b<1)throw Error();this.month=b%12||b}],Y:[/[+-]?\d+/,i("year")],YY:[d,function(a){this.year=h(a)}],YYYY:[/\d{4}/,i("year")],Z:j,ZZ:j};return function(c,d,e){e.p.customParseFormat=!0,c&&c.parseTwoDigitYear&&(h=c.parseTwoDigitYear);var f=d.prototype,i=f.parse;f.parse=function(c){var d=c.date,f=c.utc,h=c.args;this.$u=f;var j=h[1];if("string"==typeof j){var k=!0===h[2],l=!0===h[3],n=h[2];l&&(n=h[2]),g=this.$locale(),!k&&n&&(g=e.Ls[n]),this.$d=function(c,d,e,f){try{if(["x","X"].indexOf(d)>-1)return new Date(("X"===d?1e3:1)*c);var h=(function(c){var d,e;d=c,e=g&&g.formats;for(var f=(c=d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(b,c,d){var f=d&&d.toUpperCase();return c||e[d]||a[d]||e[f].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(a,b,c){return b||c.slice(1)})})).match(b),h=f.length,i=0;i<h;i+=1){var j=f[i],k=m[j],l=k&&k[0],n=k&&k[1];f[i]=n?{regex:l,parser:n}:j.replace(/^\[|\]$/g,"")}return function(a){for(var b={},c=0,d=0;c<h;c+=1){var e=f[c];if("string"==typeof e)d+=e.length;else{var g=e.regex,i=e.parser,j=a.slice(d),k=g.exec(j)[0];i.call(b,k),a=a.replace(k,"")}}return function(a){var b=a.afternoon;if(void 0!==b){var c=a.hours;b?c<12&&(a.hours+=12):12===c&&(a.hours=0),delete a.afternoon}}(b),b}})(d)(c),i=h.year,j=h.month,k=h.day,l=h.hours,n=h.minutes,o=h.seconds,p=h.milliseconds,q=h.zone,r=h.week,s=new Date,t=k||(i||j?1:s.getDate()),u=i||s.getFullYear(),v=0;i&&!j||(v=j>0?j-1:s.getMonth());var w,x=l||0,y=n||0,z=o||0,A=p||0;return q?new Date(Date.UTC(u,v,t,x,y,z,A+60*q.offset*1e3)):e?new Date(Date.UTC(u,v,t,x,y,z,A)):(w=new Date(u,v,t,x,y,z,A),r&&(w=f(w).week(r).toDate()),w)}catch(a){return new Date("")}}(d,j,f,e),this.init(),n&&!0!==n&&(this.$L=this.locale(n).$L),(k||l)&&d!=this.format(j)&&(this.$d=new Date("")),g={}}else if(j instanceof Array)for(var o=j.length,p=1;p<=o;p+=1){h[1]=j[p-1];var q=e.apply(this,h);if(q.isValid()){this.$d=q.$d,this.$L=q.$L,this.init();break}p===o&&(this.$d=new Date(""))}else i.call(this,c)}}}()},41317:function(a){a.exports=function(){"use strict";var a,b,c=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,e={years:31536e6,months:2628e6,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1,weeks:6048e5},f=function(a){return a instanceof l},g=function(a,b,c){return new l(a,c,b.$l)},h=function(a){return b.p(a)+"s"},i=function(a){return a<0},j=function(a){return i(a)?Math.ceil(a):Math.floor(a)},k=function(a,b){return a?i(a)?{negative:!0,format:""+Math.abs(a)+b}:{negative:!1,format:""+a+b}:{negative:!1,format:""}},l=function(){function i(a,b,c){var f=this;if(this.$d={},this.$l=c,void 0===a&&(this.$ms=0,this.parseFromMilliseconds()),b)return g(a*e[h(b)],this);if("number"==typeof a)return this.$ms=a,this.parseFromMilliseconds(),this;if("object"==typeof a)return Object.keys(a).forEach(function(b){f.$d[h(b)]=a[b]}),this.calMilliseconds(),this;if("string"==typeof a){var i=a.match(d);if(i){var j=i.slice(2).map(function(a){return null!=a?Number(a):0});return this.$d.years=j[0],this.$d.months=j[1],this.$d.weeks=j[2],this.$d.days=j[3],this.$d.hours=j[4],this.$d.minutes=j[5],this.$d.seconds=j[6],this.calMilliseconds(),this}}return this}var l=i.prototype;return l.calMilliseconds=function(){var a=this;this.$ms=Object.keys(this.$d).reduce(function(b,c){return b+(a.$d[c]||0)*e[c]},0)},l.parseFromMilliseconds=function(){var a=this.$ms;this.$d.years=j(a/31536e6),a%=31536e6,this.$d.months=j(a/2628e6),a%=2628e6,this.$d.days=j(a/864e5),a%=864e5,this.$d.hours=j(a/36e5),a%=36e5,this.$d.minutes=j(a/6e4),a%=6e4,this.$d.seconds=j(a/1e3),a%=1e3,this.$d.milliseconds=a},l.toISOString=function(){var a=k(this.$d.years,"Y"),b=k(this.$d.months,"M"),c=+this.$d.days||0;this.$d.weeks&&(c+=7*this.$d.weeks);var d=k(c,"D"),e=k(this.$d.hours,"H"),f=k(this.$d.minutes,"M"),g=this.$d.seconds||0;this.$d.milliseconds&&(g+=this.$d.milliseconds/1e3,g=Math.round(1e3*g)/1e3);var h=k(g,"S"),i=a.negative||b.negative||d.negative||e.negative||f.negative||h.negative,j=e.format||f.format||h.format?"T":"",l=(i?"-":"")+"P"+a.format+b.format+d.format+j+e.format+f.format+h.format;return"P"===l||"-P"===l?"P0D":l},l.toJSON=function(){return this.toISOString()},l.format=function(a){var d={Y:this.$d.years,YY:b.s(this.$d.years,2,"0"),YYYY:b.s(this.$d.years,4,"0"),M:this.$d.months,MM:b.s(this.$d.months,2,"0"),D:this.$d.days,DD:b.s(this.$d.days,2,"0"),H:this.$d.hours,HH:b.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:b.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:b.s(this.$d.seconds,2,"0"),SSS:b.s(this.$d.milliseconds,3,"0")};return(a||"YYYY-MM-DDTHH:mm:ss").replace(c,function(a,b){return b||String(d[a])})},l.as=function(a){return this.$ms/e[h(a)]},l.get=function(a){var b=this.$ms,c=h(a);return"milliseconds"===c?b%=1e3:b="weeks"===c?j(b/e[c]):this.$d[c],b||0},l.add=function(a,b,c){var d;return d=b?a*e[h(b)]:f(a)?a.$ms:g(a,this).$ms,g(this.$ms+d*(c?-1:1),this)},l.subtract=function(a,b){return this.add(a,b,!0)},l.locale=function(a){var b=this.clone();return b.$l=a,b},l.clone=function(){return g(this.$ms,this)},l.humanize=function(b){return a().add(this.$ms,"ms").locale(this.$l).fromNow(!b)},l.valueOf=function(){return this.asMilliseconds()},l.milliseconds=function(){return this.get("milliseconds")},l.asMilliseconds=function(){return this.as("milliseconds")},l.seconds=function(){return this.get("seconds")},l.asSeconds=function(){return this.as("seconds")},l.minutes=function(){return this.get("minutes")},l.asMinutes=function(){return this.as("minutes")},l.hours=function(){return this.get("hours")},l.asHours=function(){return this.as("hours")},l.days=function(){return this.get("days")},l.asDays=function(){return this.as("days")},l.weeks=function(){return this.get("weeks")},l.asWeeks=function(){return this.as("weeks")},l.months=function(){return this.get("months")},l.asMonths=function(){return this.as("months")},l.years=function(){return this.get("years")},l.asYears=function(){return this.as("years")},i}(),m=function(a,b,c){return a.add(b.years()*c,"y").add(b.months()*c,"M").add(b.days()*c,"d").add(b.hours()*c,"h").add(b.minutes()*c,"m").add(b.seconds()*c,"s").add(b.milliseconds()*c,"ms")};return function(c,d,e){a=e,b=e().$utils(),e.duration=function(a,b){return g(a,{$l:e.locale()},b)},e.isDuration=f;var h=d.prototype.add,i=d.prototype.subtract;d.prototype.add=function(a,b){return f(a)?m(this,a,1):h.bind(this)(a,b)},d.prototype.subtract=function(a,b){return f(a)?m(this,a,-1):i.bind(this)(a,b)}}}()},60673:(a,b,c)=>{"use strict";c.d(b,{diagram:()=>aN});var d,e,f,g=c(64922),h=c(45313),i=c(58715),j=c(95097),k=c(65207),l=c(29434),m=c(68660),n=c(13580),o=c(2388),p=c(41317),q=c(69085),r=function(){var a=(0,j.K)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],c=[1,26],d=[1,27],e=[1,28],f=[1,29],g=[1,30],h=[1,31],i=[1,32],k=[1,33],l=[1,34],m=[1,9],n=[1,10],o=[1,11],p=[1,12],q=[1,13],r=[1,14],s=[1,15],t=[1,16],u=[1,19],v=[1,20],w=[1,21],x=[1,22],y=[1,23],z=[1,25],A=[1,35],B={trace:(0,j.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:(0,j.K)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:case 6:case 7:this.$=[];break;case 3:f[h-1].push(f[h]),this.$=f[h-1];break;case 4:case 5:this.$=f[h];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(f[h].substr(11)),this.$=f[h].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=f[h].substr(18);break;case 19:d.TopAxis(),this.$=f[h].substr(8);break;case 20:d.setAxisFormat(f[h].substr(11)),this.$=f[h].substr(11);break;case 21:d.setTickInterval(f[h].substr(13)),this.$=f[h].substr(13);break;case 22:d.setExcludes(f[h].substr(9)),this.$=f[h].substr(9);break;case 23:d.setIncludes(f[h].substr(9)),this.$=f[h].substr(9);break;case 24:d.setTodayMarker(f[h].substr(12)),this.$=f[h].substr(12);break;case 27:d.setDiagramTitle(f[h].substr(6)),this.$=f[h].substr(6);break;case 28:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(f[h].substr(8)),this.$=f[h].substr(8);break;case 33:d.addTask(f[h-1],f[h]),this.$="task";break;case 34:this.$=f[h-1],d.setClickEvent(f[h-1],f[h],null);break;case 35:this.$=f[h-2],d.setClickEvent(f[h-2],f[h-1],f[h]);break;case 36:this.$=f[h-2],d.setClickEvent(f[h-2],f[h-1],null),d.setLink(f[h-2],f[h]);break;case 37:this.$=f[h-3],d.setClickEvent(f[h-3],f[h-2],f[h-1]),d.setLink(f[h-3],f[h]);break;case 38:this.$=f[h-2],d.setClickEvent(f[h-2],f[h],null),d.setLink(f[h-2],f[h-1]);break;case 39:this.$=f[h-3],d.setClickEvent(f[h-3],f[h-1],f[h]),d.setLink(f[h-3],f[h-2]);break;case 40:this.$=f[h-1],d.setLink(f[h-1],f[h]);break;case 41:case 47:this.$=f[h-1]+" "+f[h];break;case 42:case 43:case 45:this.$=f[h-2]+" "+f[h-1]+" "+f[h];break;case 44:case 46:this.$=f[h-3]+" "+f[h-2]+" "+f[h-1]+" "+f[h]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},a(b,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:c,13:d,14:e,15:f,16:g,17:h,18:i,19:18,20:k,21:l,22:m,23:n,24:o,25:p,26:q,27:r,28:s,29:t,30:u,31:v,33:w,35:x,36:y,37:24,38:z,40:A},a(b,[2,7],{1:[2,1]}),a(b,[2,3]),{9:36,11:17,12:c,13:d,14:e,15:f,16:g,17:h,18:i,19:18,20:k,21:l,22:m,23:n,24:o,25:p,26:q,27:r,28:s,29:t,30:u,31:v,33:w,35:x,36:y,37:24,38:z,40:A},a(b,[2,5]),a(b,[2,6]),a(b,[2,17]),a(b,[2,18]),a(b,[2,19]),a(b,[2,20]),a(b,[2,21]),a(b,[2,22]),a(b,[2,23]),a(b,[2,24]),a(b,[2,25]),a(b,[2,26]),a(b,[2,27]),{32:[1,37]},{34:[1,38]},a(b,[2,30]),a(b,[2,31]),a(b,[2,32]),{39:[1,39]},a(b,[2,8]),a(b,[2,9]),a(b,[2,10]),a(b,[2,11]),a(b,[2,12]),a(b,[2,13]),a(b,[2,14]),a(b,[2,15]),a(b,[2,16]),{41:[1,40],43:[1,41]},a(b,[2,4]),a(b,[2,28]),a(b,[2,29]),a(b,[2,33]),a(b,[2,34],{42:[1,42],43:[1,43]}),a(b,[2,40],{41:[1,44]}),a(b,[2,35],{43:[1,45]}),a(b,[2,36]),a(b,[2,38],{42:[1,46]}),a(b,[2,37]),a(b,[2,39])],defaultActions:{},parseError:(0,j.K)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,j.K)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",i=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,j.K)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,j.K)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(i+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,i=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,i,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function C(){this.yy={}}return B.lexer={EOF:1,parseError:(0,j.K)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,j.K)(function(a,b){return this.yy=b||this.yy||{},this._input=a,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,j.K)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,j.K)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=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),c.length-1&&(this.yylineno-=c.length-1);var e=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:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,j.K)(function(){return this._more=!0,this},"more"),reject:(0,j.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,j.K)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,j.K)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,j.K)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,j.K)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,j.K)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={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&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,j.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===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,j.K)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,j.K)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,j.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,j.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,j.K)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,j.K)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,j.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,j.K)(function(a,b,c,d){switch(c){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}},(0,j.K)(C,"Parser"),C.prototype=B,B.Parser=C,new C}();r.parser=r,l.extend(m),l.extend(n),l.extend(o);var s={friday:5,saturday:6},t="",u="",v=void 0,w="",x=[],y=[],z=new Map,A=[],B=[],C="",D="",E=["active","done","crit","milestone","vert"],F=[],G="",H=!1,I=!1,J="sunday",K="saturday",L=0,M=(0,j.K)(function(){A=[],B=[],C="",F=[],as=0,d=void 0,e=void 0,aw=[],t="",u="",D="",v=void 0,w="",x=[],y=[],H=!1,I=!1,L=0,z=new Map,G="",(0,h.IU)(),J="sunday",K="saturday"},"clear"),N=(0,j.K)(function(a){G=a},"setDiagramId"),O=(0,j.K)(function(a){u=a},"setAxisFormat"),P=(0,j.K)(function(){return u},"getAxisFormat"),Q=(0,j.K)(function(a){v=a},"setTickInterval"),R=(0,j.K)(function(){return v},"getTickInterval"),S=(0,j.K)(function(a){w=a},"setTodayMarker"),T=(0,j.K)(function(){return w},"getTodayMarker"),U=(0,j.K)(function(a){t=a},"setDateFormat"),V=(0,j.K)(function(){H=!0},"enableInclusiveEndDates"),W=(0,j.K)(function(){return H},"endDatesAreInclusive"),X=(0,j.K)(function(){I=!0},"enableTopAxis"),Y=(0,j.K)(function(){return I},"topAxisEnabled"),Z=(0,j.K)(function(a){D=a},"setDisplayMode"),$=(0,j.K)(function(){return D},"getDisplayMode"),_=(0,j.K)(function(){return t},"getDateFormat"),aa=(0,j.K)((a,b)=>[...new Set([...a,...b.toLowerCase().split(/[\s,]+/).filter(a=>""!==a)])],"mergeTokens"),ab=(0,j.K)(function(a){x=aa(x,a)},"setIncludes"),ac=(0,j.K)(function(){return x},"getIncludes"),ad=(0,j.K)(function(a){y=aa(y,a)},"setExcludes"),ae=(0,j.K)(function(){return y},"getExcludes"),af=(0,j.K)(function(){return z},"getLinks"),ag=(0,j.K)(function(a){C=a,A.push(a)},"addSection"),ah=(0,j.K)(function(){return A},"getSections"),ai=(0,j.K)(function(){let a=aB(),b=0;for(;!a&&b<10;)a=aB(),b++;return B=aw},"getTasks"),aj=(0,j.K)(function(a,b,c,d){let e=a.format(b.trim()),f=a.format("YYYY-MM-DD");return!(d.includes(e)||d.includes(f))&&(!!(c.includes("weekends")&&(a.isoWeekday()===s[K]||a.isoWeekday()===s[K]+1)||c.includes(a.format("dddd").toLowerCase()))||c.includes(e)||c.includes(f))},"isInvalidDate"),ak=(0,j.K)(function(a){J=a},"setWeekday"),al=(0,j.K)(function(){return J},"getWeekday"),am=(0,j.K)(function(a){K=a},"setWeekend"),an=(0,j.K)(function(a,b,c,d){let e;if(!c.length||a.manualEndTime)return;let[f,g]=ao(e=(e=a.startTime instanceof Date?l(a.startTime):l(a.startTime,b,!0)).add(1,"d"),a.endTime instanceof Date?l(a.endTime):l(a.endTime,b,!0),b,c,d);a.endTime=f.toDate(),a.renderEndTime=g},"checkTaskDates"),ao=(0,j.K)(function(a,b,c,d,e){let f=!1,g=null,h=b.add(1e4,"d");for(;a<=b;){if(f||(g=b.toDate()),(f=aj(a,c,d,e))&&(b=b.add(1,"d"))>h)throw Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");a=a.add(1,"d")}return[b,g]},"fixTaskDates"),ap=(0,j.K)(function(a,b,c){if(c=c.trim(),(0,j.K)(a=>{let b=a.trim();return"x"===b||"X"===b},"isTimestampFormat")(b)&&/^\d+$/.test(c))return new Date(Number(c));let d=/^after\s+(?<ids>[\d\w- ]+)/.exec(c);if(null!==d){let a=null;for(let b of d.groups.ids.split(" ")){let c=az(b);void 0!==c&&(!a||c.endTime>a.endTime)&&(a=c)}if(a)return a.endTime;let b=new Date;return b.setHours(0,0,0,0),b}let e=l(c,b.trim(),!0);if(e.isValid())return e.toDate();{i.R.debug("Invalid date:"+c),i.R.debug("With date format:"+b.trim());let a=new Date(c);if(void 0===a||isNaN(a.getTime())||-1e4>a.getFullYear()||a.getFullYear()>1e4)throw Error("Invalid date:"+c);return a}},"getStartDate"),aq=(0,j.K)(function(a){let b=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(a.trim());return null!==b?[Number.parseFloat(b[1]),b[2]]:[NaN,"ms"]},"parseDuration"),ar=(0,j.K)(function(a,b,c,d=!1){c=c.trim();let e=/^until\s+(?<ids>[\d\w- ]+)/.exec(c);if(null!==e){let a=null;for(let b of e.groups.ids.split(" ")){let c=az(b);void 0!==c&&(!a||c.startTime<a.startTime)&&(a=c)}if(a)return a.startTime;let b=new Date;return b.setHours(0,0,0,0),b}let f=l(c,b.trim(),!0);if(f.isValid())return d&&(f=f.add(1,"d")),f.toDate();let g=l(a),[h,i]=aq(c);if(!Number.isNaN(h)){let a=g.add(h,i);a.isValid()&&(g=a)}return g.toDate()},"getEndDate"),as=0,at=(0,j.K)(function(a){return void 0===a?"task"+(as+=1):a},"parseId"),au=(0,j.K)(function(a,b){let c=(":"===b.substr(0,1)?b.substr(1,b.length):b).split(","),d={};aJ(c,d,E);for(let a=0;a<c.length;a++)c[a]=c[a].trim();let e="";switch(c.length){case 1:d.id=at(),d.startTime=a.endTime,e=c[0];break;case 2:d.id=at(),d.startTime=ap(void 0,t,c[0]),e=c[1];break;case 3:d.id=at(c[0]),d.startTime=ap(void 0,t,c[1]),e=c[2]}return e&&(d.endTime=ar(d.startTime,t,e,H),d.manualEndTime=l(e,"YYYY-MM-DD",!0).isValid(),an(d,t,y,x)),d},"compileData"),av=(0,j.K)(function(a,b){let c=(":"===b.substr(0,1)?b.substr(1,b.length):b).split(","),d={};aJ(c,d,E);for(let a=0;a<c.length;a++)c[a]=c[a].trim();switch(c.length){case 1:d.id=at(),d.startTime={type:"prevTaskEnd",id:a},d.endTime={data:c[0]};break;case 2:d.id=at(),d.startTime={type:"getStartDate",startData:c[0]},d.endTime={data:c[1]};break;case 3:d.id=at(c[0]),d.startTime={type:"getStartDate",startData:c[1]},d.endTime={data:c[2]}}return d},"parseData"),aw=[],ax={},ay=(0,j.K)(function(a,b){let c={section:C,type:C,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:b},task:a,classes:[]},d=av(e,b);c.raw.startTime=d.startTime,c.raw.endTime=d.endTime,c.id=d.id,c.prevTaskId=e,c.active=d.active,c.done=d.done,c.crit=d.crit,c.milestone=d.milestone,c.vert=d.vert,c.vert?c.order=-1:(c.order=L,L++);let f=aw.push(c);e=c.id,ax[c.id]=f-1},"addTask"),az=(0,j.K)(function(a){return aw[ax[a]]},"findTaskById"),aA=(0,j.K)(function(a,b){let c={section:C,type:C,description:a,task:a,classes:[]},e=au(d,b);c.startTime=e.startTime,c.endTime=e.endTime,c.id=e.id,c.active=e.active,c.done=e.done,c.crit=e.crit,c.milestone=e.milestone,c.vert=e.vert,d=c,B.push(c)},"addTaskOrg"),aB=(0,j.K)(function(){let a=(0,j.K)(function(a){let b=aw[a],c="";switch(aw[a].raw.startTime.type){case"prevTaskEnd":{let a=az(b.prevTaskId);b.startTime=a.endTime;break}case"getStartDate":(c=ap(void 0,t,aw[a].raw.startTime.startData))&&(aw[a].startTime=c)}return aw[a].startTime&&(aw[a].endTime=ar(aw[a].startTime,t,aw[a].raw.endTime.data,H),aw[a].endTime&&(aw[a].processed=!0,aw[a].manualEndTime=l(aw[a].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),an(aw[a],t,y,x))),aw[a].processed},"compileTask"),b=!0;for(let[c,d]of aw.entries())a(c),b=b&&d.processed;return b},"compileTasks"),aC=(0,j.K)(function(a,b){let c=b;"loose"!==(0,h.D7)().securityLevel&&(c=(0,k.J)(b)),a.split(",").forEach(function(a){void 0!==az(a)&&(aF(a,()=>{window.open(c,"_self")}),z.set(a,c))}),aD(a,"clickable")},"setLink"),aD=(0,j.K)(function(a,b){a.split(",").forEach(function(a){let c=az(a);void 0!==c&&c.classes.push(b)})},"setClass"),aE=(0,j.K)(function(a,b,c){if("loose"!==(0,h.D7)().securityLevel||void 0===b)return;let d=[];if("string"==typeof c){d=c.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a<d.length;a++){let b=d[a].trim();b.startsWith('"')&&b.endsWith('"')&&(b=b.substr(1,b.length-2)),d[a]=b}}0===d.length&&d.push(a),void 0!==az(a)&&aF(a,()=>{g._K.runFunc(b,...d)})},"setClickFun"),aF=(0,j.K)(function(a,b){F.push(function(){let c=G?`${G}-${a}`:a,d=document.querySelector(`[id="${c}"]`);null!==d&&d.addEventListener("click",function(){b()})},function(){let c=G?`${G}-${a}`:a,d=document.querySelector(`[id="${c}-text"]`);null!==d&&d.addEventListener("click",function(){b()})})},"pushFun"),aG=(0,j.K)(function(a,b,c){a.split(",").forEach(function(a){aE(a,b,c)}),aD(a,"clickable")},"setClickEvent"),aH=(0,j.K)(function(a){F.forEach(function(b){b(a)})},"bindFunctions"),aI={getConfig:(0,j.K)(()=>(0,h.D7)().gantt,"getConfig"),clear:M,setDateFormat:U,getDateFormat:_,enableInclusiveEndDates:V,endDatesAreInclusive:W,enableTopAxis:X,topAxisEnabled:Y,setAxisFormat:O,getAxisFormat:P,setTickInterval:Q,getTickInterval:R,setTodayMarker:S,getTodayMarker:T,setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,setDiagramId:N,setDisplayMode:Z,getDisplayMode:$,setAccDescription:h.EI,getAccDescription:h.m7,addSection:ag,getSections:ah,getTasks:ai,addTask:ay,findTaskById:az,addTaskOrg:aA,setIncludes:ab,getIncludes:ac,setExcludes:ad,getExcludes:ae,setClickEvent:aG,setLink:aC,getLinks:af,bindFunctions:aH,parseDuration:aq,isInvalidDate:aj,setWeekday:ak,getWeekday:al,setWeekend:am};function aJ(a,b,c){let d=!0;for(;d;)d=!1,c.forEach(function(c){let e=RegExp("^\\s*"+c+"\\s*$");a[0].match(e)&&(b[c]=!0,a.shift(1),d=!0)})}(0,j.K)(aJ,"getTaskTags"),l.extend(p);var aK=(0,j.K)(function(){i.R.debug("Something is calling, setConf, remove the call")},"setConf"),aL={monday:q.ABi,tuesday:q.PGu,wednesday:q.GuW,thursday:q.Mol,friday:q.TUC,saturday:q.rGn,sunday:q.YPH},aM=(0,j.K)((a,b)=>{let c=[...a].map(()=>-1/0),d=[...a].sort((a,b)=>a.startTime-b.startTime||a.order-b.order),e=0;for(let a of d)for(let d=0;d<c.length;d++)if(a.startTime>=c[d]){c[d]=a.endTime,a.order=d+b,d>e&&(e=d);break}return e},"getMaxIntersections"),aN={parser:r,db:aI,renderer:{setConf:aK,draw:(0,j.K)(function(a,b,c,d){let e,g=(0,h.D7)().gantt;d.db.setDiagramId(b);let k=(0,h.D7)().securityLevel;"sandbox"===k&&(e=(0,q.Ltv)("#i"+b));let m="sandbox"===k?(0,q.Ltv)(e.nodes()[0].contentDocument.body):(0,q.Ltv)("body"),n="sandbox"===k?e.nodes()[0].contentDocument:document,o=n.getElementById(b);void 0===(f=o.parentElement.offsetWidth)&&(f=1200),void 0!==g.useWidth&&(f=g.useWidth);let p=d.db.getTasks(),r=p.filter(a=>!a.vert),s=[];for(let a of r)s.push(a.type);s=F(s);let t={},u=2*g.topPadding;if("compact"===d.db.getDisplayMode()||"compact"===g.displayMode){let a={};for(let b of r)void 0===a[b.section]?a[b.section]=[b]:a[b.section].push(b);let b=0;for(let c of Object.keys(a)){let d=aM(a[c],b)+1;b+=d,u+=d*(g.barHeight+g.barGap),t[c]=d}}else for(let a of(u+=r.length*(g.barHeight+g.barGap),s))t[a]=r.filter(b=>b.type===a).length;o.setAttribute("viewBox","0 0 "+f+" "+u);let v=m.select(`[id="${b}"]`),w=(0,q.w7C)().domain([(0,q.jkA)(p,function(a){return a.startTime}),(0,q.T9B)(p,function(a){return a.endTime})]).rangeRound([0,f-g.leftPadding-g.rightPadding]);function x(a,b){let c=a.startTime,d=b.startTime,e=0;return c>d?e=1:c<d&&(e=-1),e}function y(a,b,c){let e=g.barHeight,f=e+g.barGap,h=g.topPadding,i=g.leftPadding,j=(0,q.m4Y)().domain([0,s.length]).range(["#00B9FA","#F95002"]).interpolate(q.bEH);A(f,h,i,b,c,a,d.db.getExcludes(),d.db.getIncludes()),C(i,h,b,c),z(a,f,h,i,e,j,b),D(f,h),E(i,h,b,c)}function z(a,c,e,f,i,j,k){a.sort((a,b)=>a.vert===b.vert?0:a.vert?1:-1);let l=a.filter(a=>!a.vert),m=[...new Set(l.map(a=>a.order))].map(a=>l.find(b=>b.order===a));v.append("g").selectAll("rect").data(m).enter().append("rect").attr("x",0).attr("y",function(a,b){return a.order*c+e-2}).attr("width",function(){return k-g.rightPadding/2}).attr("height",c).attr("class",function(a){for(let[b,c]of s.entries())if(a.type===c)return"section section"+b%g.numberSectionStyles;return"section section0"}).enter();let n=v.append("g").selectAll("rect").data(a).enter(),o=d.db.getLinks();if(n.append("rect").attr("id",function(a){return b+"-"+a.id}).attr("rx",3).attr("ry",3).attr("x",function(a){return a.milestone?w(a.startTime)+f+.5*(w(a.endTime)-w(a.startTime))-.5*i:w(a.startTime)+f}).attr("y",function(a,b){return(b=a.order,a.vert)?g.gridLineStartPadding:b*c+e}).attr("width",function(a){return a.milestone?i:a.vert?.08*i:w(a.renderEndTime||a.endTime)-w(a.startTime)}).attr("height",function(a){return a.vert?l.length*(g.barHeight+g.barGap)+2*g.barHeight:i}).attr("transform-origin",function(a,b){return b=a.order,(w(a.startTime)+f+.5*(w(a.endTime)-w(a.startTime))).toString()+"px "+(b*c+e+.5*i).toString()+"px"}).attr("class",function(a){let b="";a.classes.length>0&&(b=a.classes.join(" "));let c=0;for(let[b,d]of s.entries())a.type===d&&(c=b%g.numberSectionStyles);let d="";return a.active?a.crit?d+=" activeCrit":d=" active":a.done?d=a.crit?" doneCrit":" done":a.crit&&(d+=" crit"),0===d.length&&(d=" task"),a.milestone&&(d=" milestone "+d),a.vert&&(d=" vert "+d),d+=c,"task"+(d+=" "+b)}),n.append("text").attr("id",function(a){return b+"-"+a.id+"-text"}).text(function(a){return a.task}).attr("font-size",g.fontSize).attr("x",function(a){let b=w(a.startTime),c=w(a.renderEndTime||a.endTime);if(a.milestone&&(b+=.5*(w(a.endTime)-w(a.startTime))-.5*i,c=b+i),a.vert)return w(a.startTime)+f;let d=this.getBBox().width;return d>c-b?c+d+1.5*g.leftPadding>k?b+f-5:c+f+5:(c-b)/2+b+f}).attr("y",function(a,b){return a.vert?g.gridLineStartPadding+l.length*(g.barHeight+g.barGap)+60:a.order*c+g.barHeight/2+(g.fontSize/2-2)+e}).attr("text-height",i).attr("class",function(a){let b=w(a.startTime),c=w(a.endTime);a.milestone&&(c=b+i);let d=this.getBBox().width,e="";a.classes.length>0&&(e=a.classes.join(" "));let f=0;for(let[b,c]of s.entries())a.type===c&&(f=b%g.numberSectionStyles);let h="";return(a.active&&(h=a.crit?"activeCritText"+f:"activeText"+f),a.done?h=a.crit?h+" doneCritText"+f:h+" doneText"+f:a.crit&&(h=h+" critText"+f),a.milestone&&(h+=" milestoneText"),a.vert&&(h+=" vertText"),d>c-b)?c+d+1.5*g.leftPadding>k?e+" taskTextOutsideLeft taskTextOutside"+f+" "+h:e+" taskTextOutsideRight taskTextOutside"+f+" "+h+" width-"+d:e+" taskText taskText"+f+" "+h+" width-"+d}),"sandbox"===(0,h.D7)().securityLevel){let a=(0,q.Ltv)("#i"+b).nodes()[0].contentDocument;n.filter(function(a){return o.has(a.id)}).each(function(c){var d=a.querySelector("#"+CSS.escape(b+"-"+c.id)),e=a.querySelector("#"+CSS.escape(b+"-"+c.id+"-text"));let f=d.parentNode;var g=a.createElement("a");g.setAttribute("xlink:href",o.get(c.id)),g.setAttribute("target","_top"),f.appendChild(g),g.appendChild(d),g.appendChild(e)})}}function A(a,c,e,f,h,j,k,m){let n,o;if(0===k.length&&0===m.length)return;for(let{startTime:a,endTime:b}of j)(void 0===n||a<n)&&(n=a),(void 0===o||b>o)&&(o=b);if(!n||!o)return;if(l(o).diff(l(n),"year")>5)return void i.R.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");let p=d.db.getDateFormat(),q=[],r=null,s=l(n);for(;s.valueOf()<=o;)d.db.isInvalidDate(s,p,k,m)?r?r.end=s:r={start:s,end:s}:r&&(q.push(r),r=null),s=s.add(1,"d");v.append("g").selectAll("rect").data(q).enter().append("rect").attr("id",a=>b+"-exclude-"+a.start.format("YYYY-MM-DD")).attr("x",a=>w(a.start.startOf("day"))+e).attr("y",g.gridLineStartPadding).attr("width",a=>w(a.end.endOf("day"))-w(a.start.startOf("day"))).attr("height",h-c-g.gridLineStartPadding).attr("transform-origin",function(b,c){return(w(b.start)+e+.5*(w(b.end)-w(b.start))).toString()+"px "+(c*a+.5*h).toString()+"px"}).attr("class","exclude-range")}function B(a,b,c,d){if(c<=0||a>b)return 1/0;let e=l.duration({[d??"day"]:c}).asMilliseconds();return e<=0?1/0:Math.ceil((b-a)/e)}function C(a,b,c,e){let f,h=d.db.getDateFormat(),j=d.db.getAxisFormat();f=j||("D"===h?"%d":g.axisFormat??"%Y-%m-%d");let k=(0,q.l78)(w).tickSize(-e+b+g.gridLineStartPadding).tickFormat((0,q.DCK)(f)),l=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(d.db.getTickInterval()||g.tickInterval);if(null!==l){let a=parseInt(l[1],10);if(isNaN(a)||a<=0)i.R.warn(`Invalid tick interval value: "${l[1]}". Skipping custom tick interval.`);else{let b=l[2],c=d.db.getWeekday()||g.weekday,e=w.domain(),f=B(e[0],e[1],a,b);if(f>1e4)i.R.warn(`The tick interval "${a}${b}" would generate ${f} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(b){case"millisecond":k.ticks(q.t6C.every(a));break;case"second":k.ticks(q.ucG.every(a));break;case"minute":k.ticks(q.wXd.every(a));break;case"hour":k.ticks(q.Agd.every(a));break;case"day":k.ticks(q.UAC.every(a));break;case"week":k.ticks(aL[c].every(a));break;case"month":k.ticks(q.Ui6.every(a))}}}if(v.append("g").attr("class","grid").attr("transform","translate("+a+", "+(e-50)+")").call(k).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),d.db.topAxisEnabled()||g.topAxis){let c=(0,q.tlR)(w).tickSize(-e+b+g.gridLineStartPadding).tickFormat((0,q.DCK)(f));if(null!==l){let a=parseInt(l[1],10);if(isNaN(a)||a<=0)i.R.warn(`Invalid tick interval value: "${l[1]}". Skipping custom tick interval.`);else{let b=l[2],e=d.db.getWeekday()||g.weekday,f=w.domain();if(1e4>=B(f[0],f[1],a,b))switch(b){case"millisecond":c.ticks(q.t6C.every(a));break;case"second":c.ticks(q.ucG.every(a));break;case"minute":c.ticks(q.wXd.every(a));break;case"hour":c.ticks(q.Agd.every(a));break;case"day":c.ticks(q.UAC.every(a));break;case"week":c.ticks(aL[e].every(a));break;case"month":c.ticks(q.Ui6.every(a))}}}v.append("g").attr("class","grid").attr("transform","translate("+a+", "+b+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function D(a,b){let c=0,d=Object.keys(t).map(a=>[a,t[a]]);v.append("g").selectAll("text").data(d).enter().append(function(a){let b=a[0].split(h.Y2.lineBreakRegex),c=-(b.length-1)/2,d=n.createElementNS("http://www.w3.org/2000/svg","text");for(let[a,e]of(d.setAttribute("dy",c+"em"),b.entries())){let b=n.createElementNS("http://www.w3.org/2000/svg","tspan");b.setAttribute("alignment-baseline","central"),b.setAttribute("x","10"),a>0&&b.setAttribute("dy","1em"),b.textContent=e,d.appendChild(b)}return d}).attr("x",10).attr("y",function(e,f){if(!(f>0))return e[1]*a/2+b;for(let g=0;g<f;g++)return c+=d[f-1][1],e[1]*a/2+c*a+b}).attr("font-size",g.sectionFontSize).attr("class",function(a){for(let[b,c]of s.entries())if(a[0]===c)return"sectionTitle sectionTitle"+b%g.numberSectionStyles;return"sectionTitle"})}function E(a,b,c,e){let f=d.db.getTodayMarker();if("off"===f)return;let h=v.append("g").attr("class","today"),i=new Date,j=h.append("line");j.attr("x1",w(i)+a).attr("x2",w(i)+a).attr("y1",g.titleTopMargin).attr("y2",e-g.titleTopMargin).attr("class","today"),""!==f&&j.attr("style",f.replace(/,/g,";"))}function F(a){let b={},c=[];for(let d=0,e=a.length;d<e;++d)Object.prototype.hasOwnProperty.call(b,a[d])||(b[a[d]]=!0,c.push(a[d]));return c}(0,j.K)(x,"taskCompare"),p.sort(x),y(p,f,u),(0,h.a$)(v,u,f,g.useMaxWidth),v.append("text").text(d.db.getDiagramTitle()).attr("x",f/2).attr("y",g.titleTopMargin).attr("class","titleText"),(0,j.K)(y,"makeGantt"),(0,j.K)(z,"drawRects"),(0,j.K)(A,"drawExcludeDays"),(0,j.K)(B,"getEstimatedTickCount"),(0,j.K)(C,"makeGrid"),(0,j.K)(D,"vertLabels"),(0,j.K)(E,"drawToday"),(0,j.K)(F,"checkUnique")},"draw")},styles:(0,j.K)(a=>`
1
+ exports.id=673,exports.ids=[673],exports.modules={2388:function(a){a.exports=function(a,b){var c=b.prototype,d=c.format;c.format=function(a){var b=this,c=this.$locale();if(!this.isValid())return d.bind(this)(a);var e=this.$utils(),f=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(a){switch(a){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return c.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return c.ordinal(b.week(),"W");case"w":case"ww":return e.s(b.week(),"w"===a?1:2,"0");case"W":case"WW":return e.s(b.isoWeek(),"W"===a?1:2,"0");case"k":case"kk":return e.s(String(0===b.$H?24:b.$H),"k"===a?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return a}});return d.bind(this)(f)}}},13580:function(a){a.exports=function(){"use strict";var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},b=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,c=/\d/,d=/\d\d/,e=/\d\d?/,f=/\d*[^-_:/,()\s\d]+/,g={},h=function(a){return(a*=1)+(a>68?1900:2e3)},i=function(a){return function(b){this[a]=+b}},j=[/[+-]\d\d:?(\d\d)?|Z/,function(a){(this.zone||(this.zone={})).offset=function(a){if(!a||"Z"===a)return 0;var b=a.match(/([+-]|\d\d)/g),c=60*b[1]+(+b[2]||0);return 0===c?0:"+"===b[0]?-c:c}(a)}],k=function(a){var b=g[a];return b&&(b.indexOf?b:b.s.concat(b.f))},l=function(a,b){var c,d=g.meridiem;if(d){for(var e=1;e<=24;e+=1)if(a.indexOf(d(e,0,b))>-1){c=e>12;break}}else c=a===(b?"pm":"PM");return c},m={A:[f,function(a){this.afternoon=l(a,!1)}],a:[f,function(a){this.afternoon=l(a,!0)}],Q:[c,function(a){this.month=3*(a-1)+1}],S:[c,function(a){this.milliseconds=100*a}],SS:[d,function(a){this.milliseconds=10*a}],SSS:[/\d{3}/,function(a){this.milliseconds=+a}],s:[e,i("seconds")],ss:[e,i("seconds")],m:[e,i("minutes")],mm:[e,i("minutes")],H:[e,i("hours")],h:[e,i("hours")],HH:[e,i("hours")],hh:[e,i("hours")],D:[e,i("day")],DD:[d,i("day")],Do:[f,function(a){var b=g.ordinal,c=a.match(/\d+/);if(this.day=c[0],b)for(var d=1;d<=31;d+=1)b(d).replace(/\[|\]/g,"")===a&&(this.day=d)}],w:[e,i("week")],ww:[d,i("week")],M:[e,i("month")],MM:[d,i("month")],MMM:[f,function(a){var b=k("months"),c=(k("monthsShort")||b.map(function(a){return a.slice(0,3)})).indexOf(a)+1;if(c<1)throw Error();this.month=c%12||c}],MMMM:[f,function(a){var b=k("months").indexOf(a)+1;if(b<1)throw Error();this.month=b%12||b}],Y:[/[+-]?\d+/,i("year")],YY:[d,function(a){this.year=h(a)}],YYYY:[/\d{4}/,i("year")],Z:j,ZZ:j};return function(c,d,e){e.p.customParseFormat=!0,c&&c.parseTwoDigitYear&&(h=c.parseTwoDigitYear);var f=d.prototype,i=f.parse;f.parse=function(c){var d=c.date,f=c.utc,h=c.args;this.$u=f;var j=h[1];if("string"==typeof j){var k=!0===h[2],l=!0===h[3],n=h[2];l&&(n=h[2]),g=this.$locale(),!k&&n&&(g=e.Ls[n]),this.$d=function(c,d,e,f){try{if(["x","X"].indexOf(d)>-1)return new Date(("X"===d?1e3:1)*c);var h=(function(c){var d,e;d=c,e=g&&g.formats;for(var f=(c=d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(b,c,d){var f=d&&d.toUpperCase();return c||e[d]||a[d]||e[f].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(a,b,c){return b||c.slice(1)})})).match(b),h=f.length,i=0;i<h;i+=1){var j=f[i],k=m[j],l=k&&k[0],n=k&&k[1];f[i]=n?{regex:l,parser:n}:j.replace(/^\[|\]$/g,"")}return function(a){for(var b={},c=0,d=0;c<h;c+=1){var e=f[c];if("string"==typeof e)d+=e.length;else{var g=e.regex,i=e.parser,j=a.slice(d),k=g.exec(j)[0];i.call(b,k),a=a.replace(k,"")}}return function(a){var b=a.afternoon;if(void 0!==b){var c=a.hours;b?c<12&&(a.hours+=12):12===c&&(a.hours=0),delete a.afternoon}}(b),b}})(d)(c),i=h.year,j=h.month,k=h.day,l=h.hours,n=h.minutes,o=h.seconds,p=h.milliseconds,q=h.zone,r=h.week,s=new Date,t=k||(i||j?1:s.getDate()),u=i||s.getFullYear(),v=0;i&&!j||(v=j>0?j-1:s.getMonth());var w,x=l||0,y=n||0,z=o||0,A=p||0;return q?new Date(Date.UTC(u,v,t,x,y,z,A+60*q.offset*1e3)):e?new Date(Date.UTC(u,v,t,x,y,z,A)):(w=new Date(u,v,t,x,y,z,A),r&&(w=f(w).week(r).toDate()),w)}catch(a){return new Date("")}}(d,j,f,e),this.init(),n&&!0!==n&&(this.$L=this.locale(n).$L),(k||l)&&d!=this.format(j)&&(this.$d=new Date("")),g={}}else if(j instanceof Array)for(var o=j.length,p=1;p<=o;p+=1){h[1]=j[p-1];var q=e.apply(this,h);if(q.isValid()){this.$d=q.$d,this.$L=q.$L,this.init();break}p===o&&(this.$d=new Date(""))}else i.call(this,c)}}}()},41317:function(a){a.exports=function(){"use strict";var a,b,c=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,e={years:31536e6,months:2628e6,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1,weeks:6048e5},f=function(a){return a instanceof l},g=function(a,b,c){return new l(a,c,b.$l)},h=function(a){return b.p(a)+"s"},i=function(a){return a<0},j=function(a){return i(a)?Math.ceil(a):Math.floor(a)},k=function(a,b){return a?i(a)?{negative:!0,format:""+Math.abs(a)+b}:{negative:!1,format:""+a+b}:{negative:!1,format:""}},l=function(){function i(a,b,c){var f=this;if(this.$d={},this.$l=c,void 0===a&&(this.$ms=0,this.parseFromMilliseconds()),b)return g(a*e[h(b)],this);if("number"==typeof a)return this.$ms=a,this.parseFromMilliseconds(),this;if("object"==typeof a)return Object.keys(a).forEach(function(b){f.$d[h(b)]=a[b]}),this.calMilliseconds(),this;if("string"==typeof a){var i=a.match(d);if(i){var j=i.slice(2).map(function(a){return null!=a?Number(a):0});return this.$d.years=j[0],this.$d.months=j[1],this.$d.weeks=j[2],this.$d.days=j[3],this.$d.hours=j[4],this.$d.minutes=j[5],this.$d.seconds=j[6],this.calMilliseconds(),this}}return this}var l=i.prototype;return l.calMilliseconds=function(){var a=this;this.$ms=Object.keys(this.$d).reduce(function(b,c){return b+(a.$d[c]||0)*e[c]},0)},l.parseFromMilliseconds=function(){var a=this.$ms;this.$d.years=j(a/31536e6),a%=31536e6,this.$d.months=j(a/2628e6),a%=2628e6,this.$d.days=j(a/864e5),a%=864e5,this.$d.hours=j(a/36e5),a%=36e5,this.$d.minutes=j(a/6e4),a%=6e4,this.$d.seconds=j(a/1e3),a%=1e3,this.$d.milliseconds=a},l.toISOString=function(){var a=k(this.$d.years,"Y"),b=k(this.$d.months,"M"),c=+this.$d.days||0;this.$d.weeks&&(c+=7*this.$d.weeks);var d=k(c,"D"),e=k(this.$d.hours,"H"),f=k(this.$d.minutes,"M"),g=this.$d.seconds||0;this.$d.milliseconds&&(g+=this.$d.milliseconds/1e3,g=Math.round(1e3*g)/1e3);var h=k(g,"S"),i=a.negative||b.negative||d.negative||e.negative||f.negative||h.negative,j=e.format||f.format||h.format?"T":"",l=(i?"-":"")+"P"+a.format+b.format+d.format+j+e.format+f.format+h.format;return"P"===l||"-P"===l?"P0D":l},l.toJSON=function(){return this.toISOString()},l.format=function(a){var d={Y:this.$d.years,YY:b.s(this.$d.years,2,"0"),YYYY:b.s(this.$d.years,4,"0"),M:this.$d.months,MM:b.s(this.$d.months,2,"0"),D:this.$d.days,DD:b.s(this.$d.days,2,"0"),H:this.$d.hours,HH:b.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:b.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:b.s(this.$d.seconds,2,"0"),SSS:b.s(this.$d.milliseconds,3,"0")};return(a||"YYYY-MM-DDTHH:mm:ss").replace(c,function(a,b){return b||String(d[a])})},l.as=function(a){return this.$ms/e[h(a)]},l.get=function(a){var b=this.$ms,c=h(a);return"milliseconds"===c?b%=1e3:b="weeks"===c?j(b/e[c]):this.$d[c],b||0},l.add=function(a,b,c){var d;return d=b?a*e[h(b)]:f(a)?a.$ms:g(a,this).$ms,g(this.$ms+d*(c?-1:1),this)},l.subtract=function(a,b){return this.add(a,b,!0)},l.locale=function(a){var b=this.clone();return b.$l=a,b},l.clone=function(){return g(this.$ms,this)},l.humanize=function(b){return a().add(this.$ms,"ms").locale(this.$l).fromNow(!b)},l.valueOf=function(){return this.asMilliseconds()},l.milliseconds=function(){return this.get("milliseconds")},l.asMilliseconds=function(){return this.as("milliseconds")},l.seconds=function(){return this.get("seconds")},l.asSeconds=function(){return this.as("seconds")},l.minutes=function(){return this.get("minutes")},l.asMinutes=function(){return this.as("minutes")},l.hours=function(){return this.get("hours")},l.asHours=function(){return this.as("hours")},l.days=function(){return this.get("days")},l.asDays=function(){return this.as("days")},l.weeks=function(){return this.get("weeks")},l.asWeeks=function(){return this.as("weeks")},l.months=function(){return this.get("months")},l.asMonths=function(){return this.as("months")},l.years=function(){return this.get("years")},l.asYears=function(){return this.as("years")},i}(),m=function(a,b,c){return a.add(b.years()*c,"y").add(b.months()*c,"M").add(b.days()*c,"d").add(b.hours()*c,"h").add(b.minutes()*c,"m").add(b.seconds()*c,"s").add(b.milliseconds()*c,"ms")};return function(c,d,e){a=e,b=e().$utils(),e.duration=function(a,b){return g(a,{$l:e.locale()},b)},e.isDuration=f;var h=d.prototype.add,i=d.prototype.subtract;d.prototype.add=function(a,b){return f(a)?m(this,a,1):h.bind(this)(a,b)},d.prototype.subtract=function(a,b){return f(a)?m(this,a,-1):i.bind(this)(a,b)}}}()},60673:(a,b,c)=>{"use strict";c.d(b,{diagram:()=>aN});var d,e,f,g=c(64922),h=c(45313),i=c(58715),j=c(95097),k=c(65207),l=c(29434),m=c(68660),n=c(13580),o=c(2388),p=c(41317),q=c(92718),r=function(){var a=(0,j.K)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],c=[1,26],d=[1,27],e=[1,28],f=[1,29],g=[1,30],h=[1,31],i=[1,32],k=[1,33],l=[1,34],m=[1,9],n=[1,10],o=[1,11],p=[1,12],q=[1,13],r=[1,14],s=[1,15],t=[1,16],u=[1,19],v=[1,20],w=[1,21],x=[1,22],y=[1,23],z=[1,25],A=[1,35],B={trace:(0,j.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:(0,j.K)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:case 6:case 7:this.$=[];break;case 3:f[h-1].push(f[h]),this.$=f[h-1];break;case 4:case 5:this.$=f[h];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(f[h].substr(11)),this.$=f[h].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=f[h].substr(18);break;case 19:d.TopAxis(),this.$=f[h].substr(8);break;case 20:d.setAxisFormat(f[h].substr(11)),this.$=f[h].substr(11);break;case 21:d.setTickInterval(f[h].substr(13)),this.$=f[h].substr(13);break;case 22:d.setExcludes(f[h].substr(9)),this.$=f[h].substr(9);break;case 23:d.setIncludes(f[h].substr(9)),this.$=f[h].substr(9);break;case 24:d.setTodayMarker(f[h].substr(12)),this.$=f[h].substr(12);break;case 27:d.setDiagramTitle(f[h].substr(6)),this.$=f[h].substr(6);break;case 28:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(f[h].substr(8)),this.$=f[h].substr(8);break;case 33:d.addTask(f[h-1],f[h]),this.$="task";break;case 34:this.$=f[h-1],d.setClickEvent(f[h-1],f[h],null);break;case 35:this.$=f[h-2],d.setClickEvent(f[h-2],f[h-1],f[h]);break;case 36:this.$=f[h-2],d.setClickEvent(f[h-2],f[h-1],null),d.setLink(f[h-2],f[h]);break;case 37:this.$=f[h-3],d.setClickEvent(f[h-3],f[h-2],f[h-1]),d.setLink(f[h-3],f[h]);break;case 38:this.$=f[h-2],d.setClickEvent(f[h-2],f[h],null),d.setLink(f[h-2],f[h-1]);break;case 39:this.$=f[h-3],d.setClickEvent(f[h-3],f[h-1],f[h]),d.setLink(f[h-3],f[h-2]);break;case 40:this.$=f[h-1],d.setLink(f[h-1],f[h]);break;case 41:case 47:this.$=f[h-1]+" "+f[h];break;case 42:case 43:case 45:this.$=f[h-2]+" "+f[h-1]+" "+f[h];break;case 44:case 46:this.$=f[h-3]+" "+f[h-2]+" "+f[h-1]+" "+f[h]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},a(b,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:c,13:d,14:e,15:f,16:g,17:h,18:i,19:18,20:k,21:l,22:m,23:n,24:o,25:p,26:q,27:r,28:s,29:t,30:u,31:v,33:w,35:x,36:y,37:24,38:z,40:A},a(b,[2,7],{1:[2,1]}),a(b,[2,3]),{9:36,11:17,12:c,13:d,14:e,15:f,16:g,17:h,18:i,19:18,20:k,21:l,22:m,23:n,24:o,25:p,26:q,27:r,28:s,29:t,30:u,31:v,33:w,35:x,36:y,37:24,38:z,40:A},a(b,[2,5]),a(b,[2,6]),a(b,[2,17]),a(b,[2,18]),a(b,[2,19]),a(b,[2,20]),a(b,[2,21]),a(b,[2,22]),a(b,[2,23]),a(b,[2,24]),a(b,[2,25]),a(b,[2,26]),a(b,[2,27]),{32:[1,37]},{34:[1,38]},a(b,[2,30]),a(b,[2,31]),a(b,[2,32]),{39:[1,39]},a(b,[2,8]),a(b,[2,9]),a(b,[2,10]),a(b,[2,11]),a(b,[2,12]),a(b,[2,13]),a(b,[2,14]),a(b,[2,15]),a(b,[2,16]),{41:[1,40],43:[1,41]},a(b,[2,4]),a(b,[2,28]),a(b,[2,29]),a(b,[2,33]),a(b,[2,34],{42:[1,42],43:[1,43]}),a(b,[2,40],{41:[1,44]}),a(b,[2,35],{43:[1,45]}),a(b,[2,36]),a(b,[2,38],{42:[1,46]}),a(b,[2,37]),a(b,[2,39])],defaultActions:{},parseError:(0,j.K)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,j.K)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",i=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,j.K)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,j.K)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(i+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,i=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,i,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function C(){this.yy={}}return B.lexer={EOF:1,parseError:(0,j.K)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,j.K)(function(a,b){return this.yy=b||this.yy||{},this._input=a,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,j.K)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,j.K)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=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),c.length-1&&(this.yylineno-=c.length-1);var e=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:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,j.K)(function(){return this._more=!0,this},"more"),reject:(0,j.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,j.K)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,j.K)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,j.K)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,j.K)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,j.K)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={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&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,j.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===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,j.K)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,j.K)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,j.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,j.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,j.K)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,j.K)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,j.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,j.K)(function(a,b,c,d){switch(c){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}},(0,j.K)(C,"Parser"),C.prototype=B,B.Parser=C,new C}();r.parser=r,l.extend(m),l.extend(n),l.extend(o);var s={friday:5,saturday:6},t="",u="",v=void 0,w="",x=[],y=[],z=new Map,A=[],B=[],C="",D="",E=["active","done","crit","milestone","vert"],F=[],G="",H=!1,I=!1,J="sunday",K="saturday",L=0,M=(0,j.K)(function(){A=[],B=[],C="",F=[],as=0,d=void 0,e=void 0,aw=[],t="",u="",D="",v=void 0,w="",x=[],y=[],H=!1,I=!1,L=0,z=new Map,G="",(0,h.IU)(),J="sunday",K="saturday"},"clear"),N=(0,j.K)(function(a){G=a},"setDiagramId"),O=(0,j.K)(function(a){u=a},"setAxisFormat"),P=(0,j.K)(function(){return u},"getAxisFormat"),Q=(0,j.K)(function(a){v=a},"setTickInterval"),R=(0,j.K)(function(){return v},"getTickInterval"),S=(0,j.K)(function(a){w=a},"setTodayMarker"),T=(0,j.K)(function(){return w},"getTodayMarker"),U=(0,j.K)(function(a){t=a},"setDateFormat"),V=(0,j.K)(function(){H=!0},"enableInclusiveEndDates"),W=(0,j.K)(function(){return H},"endDatesAreInclusive"),X=(0,j.K)(function(){I=!0},"enableTopAxis"),Y=(0,j.K)(function(){return I},"topAxisEnabled"),Z=(0,j.K)(function(a){D=a},"setDisplayMode"),$=(0,j.K)(function(){return D},"getDisplayMode"),_=(0,j.K)(function(){return t},"getDateFormat"),aa=(0,j.K)((a,b)=>[...new Set([...a,...b.toLowerCase().split(/[\s,]+/).filter(a=>""!==a)])],"mergeTokens"),ab=(0,j.K)(function(a){x=aa(x,a)},"setIncludes"),ac=(0,j.K)(function(){return x},"getIncludes"),ad=(0,j.K)(function(a){y=aa(y,a)},"setExcludes"),ae=(0,j.K)(function(){return y},"getExcludes"),af=(0,j.K)(function(){return z},"getLinks"),ag=(0,j.K)(function(a){C=a,A.push(a)},"addSection"),ah=(0,j.K)(function(){return A},"getSections"),ai=(0,j.K)(function(){let a=aB(),b=0;for(;!a&&b<10;)a=aB(),b++;return B=aw},"getTasks"),aj=(0,j.K)(function(a,b,c,d){let e=a.format(b.trim()),f=a.format("YYYY-MM-DD");return!(d.includes(e)||d.includes(f))&&(!!(c.includes("weekends")&&(a.isoWeekday()===s[K]||a.isoWeekday()===s[K]+1)||c.includes(a.format("dddd").toLowerCase()))||c.includes(e)||c.includes(f))},"isInvalidDate"),ak=(0,j.K)(function(a){J=a},"setWeekday"),al=(0,j.K)(function(){return J},"getWeekday"),am=(0,j.K)(function(a){K=a},"setWeekend"),an=(0,j.K)(function(a,b,c,d){let e;if(!c.length||a.manualEndTime)return;let[f,g]=ao(e=(e=a.startTime instanceof Date?l(a.startTime):l(a.startTime,b,!0)).add(1,"d"),a.endTime instanceof Date?l(a.endTime):l(a.endTime,b,!0),b,c,d);a.endTime=f.toDate(),a.renderEndTime=g},"checkTaskDates"),ao=(0,j.K)(function(a,b,c,d,e){let f=!1,g=null,h=b.add(1e4,"d");for(;a<=b;){if(f||(g=b.toDate()),(f=aj(a,c,d,e))&&(b=b.add(1,"d"))>h)throw Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");a=a.add(1,"d")}return[b,g]},"fixTaskDates"),ap=(0,j.K)(function(a,b,c){if(c=c.trim(),(0,j.K)(a=>{let b=a.trim();return"x"===b||"X"===b},"isTimestampFormat")(b)&&/^\d+$/.test(c))return new Date(Number(c));let d=/^after\s+(?<ids>[\d\w- ]+)/.exec(c);if(null!==d){let a=null;for(let b of d.groups.ids.split(" ")){let c=az(b);void 0!==c&&(!a||c.endTime>a.endTime)&&(a=c)}if(a)return a.endTime;let b=new Date;return b.setHours(0,0,0,0),b}let e=l(c,b.trim(),!0);if(e.isValid())return e.toDate();{i.R.debug("Invalid date:"+c),i.R.debug("With date format:"+b.trim());let a=new Date(c);if(void 0===a||isNaN(a.getTime())||-1e4>a.getFullYear()||a.getFullYear()>1e4)throw Error("Invalid date:"+c);return a}},"getStartDate"),aq=(0,j.K)(function(a){let b=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(a.trim());return null!==b?[Number.parseFloat(b[1]),b[2]]:[NaN,"ms"]},"parseDuration"),ar=(0,j.K)(function(a,b,c,d=!1){c=c.trim();let e=/^until\s+(?<ids>[\d\w- ]+)/.exec(c);if(null!==e){let a=null;for(let b of e.groups.ids.split(" ")){let c=az(b);void 0!==c&&(!a||c.startTime<a.startTime)&&(a=c)}if(a)return a.startTime;let b=new Date;return b.setHours(0,0,0,0),b}let f=l(c,b.trim(),!0);if(f.isValid())return d&&(f=f.add(1,"d")),f.toDate();let g=l(a),[h,i]=aq(c);if(!Number.isNaN(h)){let a=g.add(h,i);a.isValid()&&(g=a)}return g.toDate()},"getEndDate"),as=0,at=(0,j.K)(function(a){return void 0===a?"task"+(as+=1):a},"parseId"),au=(0,j.K)(function(a,b){let c=(":"===b.substr(0,1)?b.substr(1,b.length):b).split(","),d={};aJ(c,d,E);for(let a=0;a<c.length;a++)c[a]=c[a].trim();let e="";switch(c.length){case 1:d.id=at(),d.startTime=a.endTime,e=c[0];break;case 2:d.id=at(),d.startTime=ap(void 0,t,c[0]),e=c[1];break;case 3:d.id=at(c[0]),d.startTime=ap(void 0,t,c[1]),e=c[2]}return e&&(d.endTime=ar(d.startTime,t,e,H),d.manualEndTime=l(e,"YYYY-MM-DD",!0).isValid(),an(d,t,y,x)),d},"compileData"),av=(0,j.K)(function(a,b){let c=(":"===b.substr(0,1)?b.substr(1,b.length):b).split(","),d={};aJ(c,d,E);for(let a=0;a<c.length;a++)c[a]=c[a].trim();switch(c.length){case 1:d.id=at(),d.startTime={type:"prevTaskEnd",id:a},d.endTime={data:c[0]};break;case 2:d.id=at(),d.startTime={type:"getStartDate",startData:c[0]},d.endTime={data:c[1]};break;case 3:d.id=at(c[0]),d.startTime={type:"getStartDate",startData:c[1]},d.endTime={data:c[2]}}return d},"parseData"),aw=[],ax={},ay=(0,j.K)(function(a,b){let c={section:C,type:C,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:b},task:a,classes:[]},d=av(e,b);c.raw.startTime=d.startTime,c.raw.endTime=d.endTime,c.id=d.id,c.prevTaskId=e,c.active=d.active,c.done=d.done,c.crit=d.crit,c.milestone=d.milestone,c.vert=d.vert,c.vert?c.order=-1:(c.order=L,L++);let f=aw.push(c);e=c.id,ax[c.id]=f-1},"addTask"),az=(0,j.K)(function(a){return aw[ax[a]]},"findTaskById"),aA=(0,j.K)(function(a,b){let c={section:C,type:C,description:a,task:a,classes:[]},e=au(d,b);c.startTime=e.startTime,c.endTime=e.endTime,c.id=e.id,c.active=e.active,c.done=e.done,c.crit=e.crit,c.milestone=e.milestone,c.vert=e.vert,d=c,B.push(c)},"addTaskOrg"),aB=(0,j.K)(function(){let a=(0,j.K)(function(a){let b=aw[a],c="";switch(aw[a].raw.startTime.type){case"prevTaskEnd":{let a=az(b.prevTaskId);b.startTime=a.endTime;break}case"getStartDate":(c=ap(void 0,t,aw[a].raw.startTime.startData))&&(aw[a].startTime=c)}return aw[a].startTime&&(aw[a].endTime=ar(aw[a].startTime,t,aw[a].raw.endTime.data,H),aw[a].endTime&&(aw[a].processed=!0,aw[a].manualEndTime=l(aw[a].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),an(aw[a],t,y,x))),aw[a].processed},"compileTask"),b=!0;for(let[c,d]of aw.entries())a(c),b=b&&d.processed;return b},"compileTasks"),aC=(0,j.K)(function(a,b){let c=b;"loose"!==(0,h.D7)().securityLevel&&(c=(0,k.J)(b)),a.split(",").forEach(function(a){void 0!==az(a)&&(aF(a,()=>{window.open(c,"_self")}),z.set(a,c))}),aD(a,"clickable")},"setLink"),aD=(0,j.K)(function(a,b){a.split(",").forEach(function(a){let c=az(a);void 0!==c&&c.classes.push(b)})},"setClass"),aE=(0,j.K)(function(a,b,c){if("loose"!==(0,h.D7)().securityLevel||void 0===b)return;let d=[];if("string"==typeof c){d=c.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a<d.length;a++){let b=d[a].trim();b.startsWith('"')&&b.endsWith('"')&&(b=b.substr(1,b.length-2)),d[a]=b}}0===d.length&&d.push(a),void 0!==az(a)&&aF(a,()=>{g._K.runFunc(b,...d)})},"setClickFun"),aF=(0,j.K)(function(a,b){F.push(function(){let c=G?`${G}-${a}`:a,d=document.querySelector(`[id="${c}"]`);null!==d&&d.addEventListener("click",function(){b()})},function(){let c=G?`${G}-${a}`:a,d=document.querySelector(`[id="${c}-text"]`);null!==d&&d.addEventListener("click",function(){b()})})},"pushFun"),aG=(0,j.K)(function(a,b,c){a.split(",").forEach(function(a){aE(a,b,c)}),aD(a,"clickable")},"setClickEvent"),aH=(0,j.K)(function(a){F.forEach(function(b){b(a)})},"bindFunctions"),aI={getConfig:(0,j.K)(()=>(0,h.D7)().gantt,"getConfig"),clear:M,setDateFormat:U,getDateFormat:_,enableInclusiveEndDates:V,endDatesAreInclusive:W,enableTopAxis:X,topAxisEnabled:Y,setAxisFormat:O,getAxisFormat:P,setTickInterval:Q,getTickInterval:R,setTodayMarker:S,getTodayMarker:T,setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,setDiagramId:N,setDisplayMode:Z,getDisplayMode:$,setAccDescription:h.EI,getAccDescription:h.m7,addSection:ag,getSections:ah,getTasks:ai,addTask:ay,findTaskById:az,addTaskOrg:aA,setIncludes:ab,getIncludes:ac,setExcludes:ad,getExcludes:ae,setClickEvent:aG,setLink:aC,getLinks:af,bindFunctions:aH,parseDuration:aq,isInvalidDate:aj,setWeekday:ak,getWeekday:al,setWeekend:am};function aJ(a,b,c){let d=!0;for(;d;)d=!1,c.forEach(function(c){let e=RegExp("^\\s*"+c+"\\s*$");a[0].match(e)&&(b[c]=!0,a.shift(1),d=!0)})}(0,j.K)(aJ,"getTaskTags"),l.extend(p);var aK=(0,j.K)(function(){i.R.debug("Something is calling, setConf, remove the call")},"setConf"),aL={monday:q.ABi,tuesday:q.PGu,wednesday:q.GuW,thursday:q.Mol,friday:q.TUC,saturday:q.rGn,sunday:q.YPH},aM=(0,j.K)((a,b)=>{let c=[...a].map(()=>-1/0),d=[...a].sort((a,b)=>a.startTime-b.startTime||a.order-b.order),e=0;for(let a of d)for(let d=0;d<c.length;d++)if(a.startTime>=c[d]){c[d]=a.endTime,a.order=d+b,d>e&&(e=d);break}return e},"getMaxIntersections"),aN={parser:r,db:aI,renderer:{setConf:aK,draw:(0,j.K)(function(a,b,c,d){let e,g=(0,h.D7)().gantt;d.db.setDiagramId(b);let k=(0,h.D7)().securityLevel;"sandbox"===k&&(e=(0,q.Ltv)("#i"+b));let m="sandbox"===k?(0,q.Ltv)(e.nodes()[0].contentDocument.body):(0,q.Ltv)("body"),n="sandbox"===k?e.nodes()[0].contentDocument:document,o=n.getElementById(b);void 0===(f=o.parentElement.offsetWidth)&&(f=1200),void 0!==g.useWidth&&(f=g.useWidth);let p=d.db.getTasks(),r=p.filter(a=>!a.vert),s=[];for(let a of r)s.push(a.type);s=F(s);let t={},u=2*g.topPadding;if("compact"===d.db.getDisplayMode()||"compact"===g.displayMode){let a={};for(let b of r)void 0===a[b.section]?a[b.section]=[b]:a[b.section].push(b);let b=0;for(let c of Object.keys(a)){let d=aM(a[c],b)+1;b+=d,u+=d*(g.barHeight+g.barGap),t[c]=d}}else for(let a of(u+=r.length*(g.barHeight+g.barGap),s))t[a]=r.filter(b=>b.type===a).length;o.setAttribute("viewBox","0 0 "+f+" "+u);let v=m.select(`[id="${b}"]`),w=(0,q.w7C)().domain([(0,q.jkA)(p,function(a){return a.startTime}),(0,q.T9B)(p,function(a){return a.endTime})]).rangeRound([0,f-g.leftPadding-g.rightPadding]);function x(a,b){let c=a.startTime,d=b.startTime,e=0;return c>d?e=1:c<d&&(e=-1),e}function y(a,b,c){let e=g.barHeight,f=e+g.barGap,h=g.topPadding,i=g.leftPadding,j=(0,q.m4Y)().domain([0,s.length]).range(["#00B9FA","#F95002"]).interpolate(q.bEH);A(f,h,i,b,c,a,d.db.getExcludes(),d.db.getIncludes()),C(i,h,b,c),z(a,f,h,i,e,j,b),D(f,h),E(i,h,b,c)}function z(a,c,e,f,i,j,k){a.sort((a,b)=>a.vert===b.vert?0:a.vert?1:-1);let l=a.filter(a=>!a.vert),m=[...new Set(l.map(a=>a.order))].map(a=>l.find(b=>b.order===a));v.append("g").selectAll("rect").data(m).enter().append("rect").attr("x",0).attr("y",function(a,b){return a.order*c+e-2}).attr("width",function(){return k-g.rightPadding/2}).attr("height",c).attr("class",function(a){for(let[b,c]of s.entries())if(a.type===c)return"section section"+b%g.numberSectionStyles;return"section section0"}).enter();let n=v.append("g").selectAll("rect").data(a).enter(),o=d.db.getLinks();if(n.append("rect").attr("id",function(a){return b+"-"+a.id}).attr("rx",3).attr("ry",3).attr("x",function(a){return a.milestone?w(a.startTime)+f+.5*(w(a.endTime)-w(a.startTime))-.5*i:w(a.startTime)+f}).attr("y",function(a,b){return(b=a.order,a.vert)?g.gridLineStartPadding:b*c+e}).attr("width",function(a){return a.milestone?i:a.vert?.08*i:w(a.renderEndTime||a.endTime)-w(a.startTime)}).attr("height",function(a){return a.vert?l.length*(g.barHeight+g.barGap)+2*g.barHeight:i}).attr("transform-origin",function(a,b){return b=a.order,(w(a.startTime)+f+.5*(w(a.endTime)-w(a.startTime))).toString()+"px "+(b*c+e+.5*i).toString()+"px"}).attr("class",function(a){let b="";a.classes.length>0&&(b=a.classes.join(" "));let c=0;for(let[b,d]of s.entries())a.type===d&&(c=b%g.numberSectionStyles);let d="";return a.active?a.crit?d+=" activeCrit":d=" active":a.done?d=a.crit?" doneCrit":" done":a.crit&&(d+=" crit"),0===d.length&&(d=" task"),a.milestone&&(d=" milestone "+d),a.vert&&(d=" vert "+d),d+=c,"task"+(d+=" "+b)}),n.append("text").attr("id",function(a){return b+"-"+a.id+"-text"}).text(function(a){return a.task}).attr("font-size",g.fontSize).attr("x",function(a){let b=w(a.startTime),c=w(a.renderEndTime||a.endTime);if(a.milestone&&(b+=.5*(w(a.endTime)-w(a.startTime))-.5*i,c=b+i),a.vert)return w(a.startTime)+f;let d=this.getBBox().width;return d>c-b?c+d+1.5*g.leftPadding>k?b+f-5:c+f+5:(c-b)/2+b+f}).attr("y",function(a,b){return a.vert?g.gridLineStartPadding+l.length*(g.barHeight+g.barGap)+60:a.order*c+g.barHeight/2+(g.fontSize/2-2)+e}).attr("text-height",i).attr("class",function(a){let b=w(a.startTime),c=w(a.endTime);a.milestone&&(c=b+i);let d=this.getBBox().width,e="";a.classes.length>0&&(e=a.classes.join(" "));let f=0;for(let[b,c]of s.entries())a.type===c&&(f=b%g.numberSectionStyles);let h="";return(a.active&&(h=a.crit?"activeCritText"+f:"activeText"+f),a.done?h=a.crit?h+" doneCritText"+f:h+" doneText"+f:a.crit&&(h=h+" critText"+f),a.milestone&&(h+=" milestoneText"),a.vert&&(h+=" vertText"),d>c-b)?c+d+1.5*g.leftPadding>k?e+" taskTextOutsideLeft taskTextOutside"+f+" "+h:e+" taskTextOutsideRight taskTextOutside"+f+" "+h+" width-"+d:e+" taskText taskText"+f+" "+h+" width-"+d}),"sandbox"===(0,h.D7)().securityLevel){let a=(0,q.Ltv)("#i"+b).nodes()[0].contentDocument;n.filter(function(a){return o.has(a.id)}).each(function(c){var d=a.querySelector("#"+CSS.escape(b+"-"+c.id)),e=a.querySelector("#"+CSS.escape(b+"-"+c.id+"-text"));let f=d.parentNode;var g=a.createElement("a");g.setAttribute("xlink:href",o.get(c.id)),g.setAttribute("target","_top"),f.appendChild(g),g.appendChild(d),g.appendChild(e)})}}function A(a,c,e,f,h,j,k,m){let n,o;if(0===k.length&&0===m.length)return;for(let{startTime:a,endTime:b}of j)(void 0===n||a<n)&&(n=a),(void 0===o||b>o)&&(o=b);if(!n||!o)return;if(l(o).diff(l(n),"year")>5)return void i.R.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");let p=d.db.getDateFormat(),q=[],r=null,s=l(n);for(;s.valueOf()<=o;)d.db.isInvalidDate(s,p,k,m)?r?r.end=s:r={start:s,end:s}:r&&(q.push(r),r=null),s=s.add(1,"d");v.append("g").selectAll("rect").data(q).enter().append("rect").attr("id",a=>b+"-exclude-"+a.start.format("YYYY-MM-DD")).attr("x",a=>w(a.start.startOf("day"))+e).attr("y",g.gridLineStartPadding).attr("width",a=>w(a.end.endOf("day"))-w(a.start.startOf("day"))).attr("height",h-c-g.gridLineStartPadding).attr("transform-origin",function(b,c){return(w(b.start)+e+.5*(w(b.end)-w(b.start))).toString()+"px "+(c*a+.5*h).toString()+"px"}).attr("class","exclude-range")}function B(a,b,c,d){if(c<=0||a>b)return 1/0;let e=l.duration({[d??"day"]:c}).asMilliseconds();return e<=0?1/0:Math.ceil((b-a)/e)}function C(a,b,c,e){let f,h=d.db.getDateFormat(),j=d.db.getAxisFormat();f=j||("D"===h?"%d":g.axisFormat??"%Y-%m-%d");let k=(0,q.l78)(w).tickSize(-e+b+g.gridLineStartPadding).tickFormat((0,q.DCK)(f)),l=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(d.db.getTickInterval()||g.tickInterval);if(null!==l){let a=parseInt(l[1],10);if(isNaN(a)||a<=0)i.R.warn(`Invalid tick interval value: "${l[1]}". Skipping custom tick interval.`);else{let b=l[2],c=d.db.getWeekday()||g.weekday,e=w.domain(),f=B(e[0],e[1],a,b);if(f>1e4)i.R.warn(`The tick interval "${a}${b}" would generate ${f} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(b){case"millisecond":k.ticks(q.t6C.every(a));break;case"second":k.ticks(q.ucG.every(a));break;case"minute":k.ticks(q.wXd.every(a));break;case"hour":k.ticks(q.Agd.every(a));break;case"day":k.ticks(q.UAC.every(a));break;case"week":k.ticks(aL[c].every(a));break;case"month":k.ticks(q.Ui6.every(a))}}}if(v.append("g").attr("class","grid").attr("transform","translate("+a+", "+(e-50)+")").call(k).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),d.db.topAxisEnabled()||g.topAxis){let c=(0,q.tlR)(w).tickSize(-e+b+g.gridLineStartPadding).tickFormat((0,q.DCK)(f));if(null!==l){let a=parseInt(l[1],10);if(isNaN(a)||a<=0)i.R.warn(`Invalid tick interval value: "${l[1]}". Skipping custom tick interval.`);else{let b=l[2],e=d.db.getWeekday()||g.weekday,f=w.domain();if(1e4>=B(f[0],f[1],a,b))switch(b){case"millisecond":c.ticks(q.t6C.every(a));break;case"second":c.ticks(q.ucG.every(a));break;case"minute":c.ticks(q.wXd.every(a));break;case"hour":c.ticks(q.Agd.every(a));break;case"day":c.ticks(q.UAC.every(a));break;case"week":c.ticks(aL[e].every(a));break;case"month":c.ticks(q.Ui6.every(a))}}}v.append("g").attr("class","grid").attr("transform","translate("+a+", "+b+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function D(a,b){let c=0,d=Object.keys(t).map(a=>[a,t[a]]);v.append("g").selectAll("text").data(d).enter().append(function(a){let b=a[0].split(h.Y2.lineBreakRegex),c=-(b.length-1)/2,d=n.createElementNS("http://www.w3.org/2000/svg","text");for(let[a,e]of(d.setAttribute("dy",c+"em"),b.entries())){let b=n.createElementNS("http://www.w3.org/2000/svg","tspan");b.setAttribute("alignment-baseline","central"),b.setAttribute("x","10"),a>0&&b.setAttribute("dy","1em"),b.textContent=e,d.appendChild(b)}return d}).attr("x",10).attr("y",function(e,f){if(!(f>0))return e[1]*a/2+b;for(let g=0;g<f;g++)return c+=d[f-1][1],e[1]*a/2+c*a+b}).attr("font-size",g.sectionFontSize).attr("class",function(a){for(let[b,c]of s.entries())if(a[0]===c)return"sectionTitle sectionTitle"+b%g.numberSectionStyles;return"sectionTitle"})}function E(a,b,c,e){let f=d.db.getTodayMarker();if("off"===f)return;let h=v.append("g").attr("class","today"),i=new Date,j=h.append("line");j.attr("x1",w(i)+a).attr("x2",w(i)+a).attr("y1",g.titleTopMargin).attr("y2",e-g.titleTopMargin).attr("class","today"),""!==f&&j.attr("style",f.replace(/,/g,";"))}function F(a){let b={},c=[];for(let d=0,e=a.length;d<e;++d)Object.prototype.hasOwnProperty.call(b,a[d])||(b[a[d]]=!0,c.push(a[d]));return c}(0,j.K)(x,"taskCompare"),p.sort(x),y(p,f,u),(0,h.a$)(v,u,f,g.useMaxWidth),v.append("text").text(d.db.getDiagramTitle()).attr("x",f/2).attr("y",g.titleTopMargin).attr("class","titleText"),(0,j.K)(y,"makeGantt"),(0,j.K)(z,"drawRects"),(0,j.K)(A,"drawExcludeDays"),(0,j.K)(B,"getEstimatedTickCount"),(0,j.K)(C,"makeGrid"),(0,j.K)(D,"vertLabels"),(0,j.K)(E,"drawToday"),(0,j.K)(F,"checkUnique")},"draw")},styles:(0,j.K)(a=>`
2
2
  .mermaid-main-font {
3
3
  font-family: ${a.fontFamily};
4
4
  }
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=6916,exports.ids=[6916],exports.modules={1487:(a,b,c)=>{c.d(b,{P:()=>g});var d=c(45313),e=c(58715),f=c(95097),g=(0,f.K)((a,b,c,f)=>{a.attr("class",c);let{width:g,height:j,x:k,y:l}=h(a,b);(0,d.a$)(a,j,g,f);let m=i(k,l,g,j,b);a.attr("viewBox",m),e.R.debug(`viewBox configured: ${m} with padding: ${b}`)},"setupViewPortForSVG"),h=(0,f.K)((a,b)=>{let c=a.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:c.width+2*b,height:c.height+2*b,x:c.x,y:c.y}},"calculateDimensionsWithPadding"),i=(0,f.K)((a,b,c,d,e)=>`${a-e} ${b-e} ${c} ${d}`,"createViewBox")},16916:(a,b,c)=>{c.d(b,{Zk:()=>o,q7:()=>Q,tM:()=>ag,u4:()=>af});var d=c(30917),e=c(1487),f=c(78832),g=c(87836),h=c(64922),i=c(45313),j=c(58715),k=c(95097),l=c(69085),m=c(11656),n=function(){var a=(0,k.K)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,2],c=[1,3],d=[1,4],e=[2,4],f=[1,9],g=[1,11],h=[1,16],i=[1,17],j=[1,18],l=[1,19],m=[1,33],n=[1,20],o=[1,21],p=[1,22],q=[1,23],r=[1,24],s=[1,26],t=[1,27],u=[1,28],v=[1,29],w=[1,30],x=[1,31],y=[1,32],z=[1,35],A=[1,36],B=[1,37],C=[1,38],D=[1,34],E=[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],F=[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],G=[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],H={trace:(0,k.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,k.K)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 3:return d.setRootDoc(f[h]),f[h];case 4:this.$=[];break;case 5:"nl"!=f[h]&&(f[h-1].push(f[h]),this.$=f[h-1]);break;case 6:case 7:case 12:this.$=f[h];break;case 8:this.$="nl";break;case 13:let i=f[h-1];i.description=d.trimColon(f[h]),this.$=i;break;case 14:this.$={stmt:"relation",state1:f[h-2],state2:f[h]};break;case 15:let j=d.trimColon(f[h]);this.$={stmt:"relation",state1:f[h-3],state2:f[h-1],description:j};break;case 19:this.$={stmt:"state",id:f[h-3],type:"default",description:"",doc:f[h-1]};break;case 20:var k=f[h],l=f[h-2].trim();if(f[h].match(":")){var m=f[h].split(":");k=m[0],l=[l,m[1]]}this.$={stmt:"state",id:k,type:"default",description:l};break;case 21:this.$={stmt:"state",id:f[h-3],type:"default",description:f[h-5],doc:f[h-1]};break;case 22:this.$={stmt:"state",id:f[h],type:"fork"};break;case 23:this.$={stmt:"state",id:f[h],type:"join"};break;case 24:this.$={stmt:"state",id:f[h],type:"choice"};break;case 25:this.$={stmt:"state",id:d.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:f[h-1].trim(),note:{position:f[h-2].trim(),text:f[h].trim()}};break;case 29:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 30:case 31:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:f[h-3],url:f[h-2],tooltip:f[h-1]};break;case 33:this.$={stmt:"click",id:f[h-3],url:f[h-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:f[h-1].trim(),classes:f[h].trim()};break;case 36:this.$={stmt:"style",id:f[h-1].trim(),styleClass:f[h].trim()};break;case 37:this.$={stmt:"applyClass",id:f[h-1].trim(),styleClass:f[h].trim()};break;case 38:d.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:d.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:d.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:d.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:f[h].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:f[h-2].trim(),classes:[f[h].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:b,5:c,6:d},{1:[3]},{3:5,4:b,5:c,6:d},{3:6,4:b,5:c,6:d},a([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],e,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:g,8:8,9:10,10:12,11:13,12:14,13:15,16:h,17:i,19:j,22:l,24:m,25:n,26:o,27:p,28:q,29:r,32:25,33:s,35:t,37:u,38:v,41:w,45:x,48:y,51:z,52:A,53:B,54:C,57:D},a(E,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:h,17:i,19:j,22:l,24:m,25:n,26:o,27:p,28:q,29:r,32:25,33:s,35:t,37:u,38:v,41:w,45:x,48:y,51:z,52:A,53:B,54:C,57:D},a(E,[2,7]),a(E,[2,8]),a(E,[2,9]),a(E,[2,10]),a(E,[2,11]),a(E,[2,12],{14:[1,40],15:[1,41]}),a(E,[2,16]),{18:[1,42]},a(E,[2,18],{20:[1,43]}),{23:[1,44]},a(E,[2,22]),a(E,[2,23]),a(E,[2,24]),a(E,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},a(E,[2,28]),{34:[1,49]},{36:[1,50]},a(E,[2,31]),{13:51,24:m,57:D},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},a(F,[2,44],{58:[1,56]}),a(F,[2,45],{58:[1,57]}),a(E,[2,38]),a(E,[2,39]),a(E,[2,40]),a(E,[2,41]),a(E,[2,6]),a(E,[2,13]),{13:58,24:m,57:D},a(E,[2,17]),a(G,e,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},a(E,[2,29]),a(E,[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]},a(E,[2,14],{14:[1,71]}),{4:f,5:g,8:8,9:10,10:12,11:13,12:14,13:15,16:h,17:i,19:j,21:[1,72],22:l,24:m,25:n,26:o,27:p,28:q,29:r,32:25,33:s,35:t,37:u,38:v,41:w,45:x,48:y,51:z,52:A,53:B,54:C,57:D},a(E,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},a(E,[2,34]),a(E,[2,35]),a(E,[2,36]),a(E,[2,37]),a(F,[2,46]),a(F,[2,47]),a(E,[2,15]),a(E,[2,19]),a(G,e,{7:78}),a(E,[2,26]),a(E,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:g,8:8,9:10,10:12,11:13,12:14,13:15,16:h,17:i,19:j,21:[1,81],22:l,24:m,25:n,26:o,27:p,28:q,29:r,32:25,33:s,35:t,37:u,38:v,41:w,45:x,48:y,51:z,52:A,53:B,54:C,57:D},a(E,[2,32]),a(E,[2,33]),a(E,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,k.K)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,k.K)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",i=0,j=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,k.K)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,k.K)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(i+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(j=n.yyleng,h=n.yytext,i=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,j,i,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function I(){this.yy={}}return H.lexer={EOF:1,parseError:(0,k.K)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,k.K)(function(a,b){return this.yy=b||this.yy||{},this._input=a,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,k.K)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,k.K)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=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),c.length-1&&(this.yylineno-=c.length-1);var e=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:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,k.K)(function(){return this._more=!0,this},"more"),reject:(0,k.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,k.K)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,k.K)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,k.K)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,k.K)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,k.K)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={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&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,k.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===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,k.K)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,k.K)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,k.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,k.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,k.K)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,k.K)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,k.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,k.K)(function(a,b,c,d){function e(){let c=b.yytext.indexOf("%%");if(0===c)return!1;if(c>0){let d=b.yytext.slice(0,c),e=b.yytext.slice(c);e&&a.lexer.unput(e),b.yytext=d}return!0}switch((0,k.K)(e,"processId"),c){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(),b.yytext=b.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),b.yytext=b.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),b.yytext=b.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(!e())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+b.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(!e())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),b.yytext=b.yytext.substr(2).trim(),31;case 68:return this.popState(),b.yytext=b.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!e())return;return 24;case 74:return b.yytext=b.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,k.K)(I,"Parser"),I.prototype=H,H.Parser=I,new I}();n.parser=n;var o=n,p="TB",q="state",r="root",s="relation",t="default",u="divider",v="fill:none",w="fill: #333",x="markdown",y="normal",z="rect",A="rectWithTitle",B="divider",C="roundedWithTitle",D="statediagram",E=`${D}-state`,F="transition",G=`${F} note-edge`,H=`${D}-note`,I=`${D}-cluster`,J=`${D}-cluster-alt`,K="parent",L="note",M="----",N=`${M}${L}`,O=`${M}${K}`,P=(0,k.K)((a,b=p)=>{if(!a.doc)return b;let c=b;for(let b of a.doc)"dir"===b.stmt&&(c=b.value);return c},"getDir"),Q={getClasses:(0,k.K)(function(a,b){return b.db.getClasses()},"getClasses"),draw:(0,k.K)(async function(a,b,c,g){j.R.info("REF0:"),j.R.info("Drawing state diagram (v2)",b);let{securityLevel:k,state:l,layout:m}=(0,i.D7)();g.db.extract(g.db.getRootDocV2());let n=g.db.getData(),o=(0,d.A)(b,k);n.type=g.type,n.layoutAlgorithm=m,n.nodeSpacing=l?.nodeSpacing||50,n.rankSpacing=l?.rankSpacing||50,"neo"===(0,i.D7)().look?n.markers=["barbNeo"]:n.markers=["barb"],n.diagramId=b,await (0,f.XX)(n,o);try{("function"==typeof g.db.getLinks?g.db.getLinks():new Map).forEach((a,b)=>{let c,d="string"==typeof b?b:"string"==typeof b?.id?b.id:"",e=n.nodes.find(a=>a.id===d);if(!d)return void j.R.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(b));let f=o.node()?.querySelectorAll("g.node, g.rough-node");if(f?.forEach(a=>{let b=a.textContent?.trim();(a.id===e?.domId||b===d)&&(c=a)}),!c)return void j.R.warn("⚠️ Could not find node matching text:",d);let g=c.parentNode;if(!g)return void j.R.warn("⚠️ Node has no parent, cannot wrap:",d);let h=document.createElementNS("http://www.w3.org/2000/svg","a"),i=a.url.replace(/^"+|"+$/g,"");if(h.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i),h.setAttribute("target","_blank"),a.tooltip){let b=a.tooltip.replace(/^"+|"+$/g,"");h.setAttribute("title",b),c.setAttribute("title",b)}g.replaceChild(h,c),h.appendChild(c),j.R.info("\uD83D\uDD17 Wrapped node in <a> tag for:",d,a.url)})}catch(a){j.R.error("❌ Error injecting clickable links:",a)}h._K.insertTitle(o,"statediagramTitleText",l?.titleTopMargin??25,g.db.getDiagramTitle()),(0,e.P)(o,8,D,l?.useMaxWidth??!0)},"draw"),getDir:P},R=new Map,S=0;function T(a="",b=0,c="",d=M){let e=null!==c&&c.length>0?`${d}${c}`:"";return`state-${a}${e}-${b}`}(0,k.K)(T,"stateDomId");var U=(0,k.K)((a,b,c,d,e,f,g,h)=>{j.R.trace("items",b),b.forEach(b=>{switch(b.stmt){case q:case t:Z(a,b,c,d,e,f,g,h);break;case s:{Z(a,b.state1,c,d,e,f,g,h),Z(a,b.state2,c,d,e,f,g,h);let j="neo"===g,k={id:"edge"+S,start:b.state1.id,end:b.state2.id,arrowhead:"normal",arrowTypeEnd:j?"arrow_barb_neo":"arrow_barb",style:v,labelStyle:"",label:i.Y2.sanitizeText(b.description??"",(0,i.D7)()),arrowheadStyle:w,labelpos:"c",labelType:x,thickness:y,classes:F,look:g};e.push(k),S++}}})},"setupDoc"),V=(0,k.K)((a,b=p)=>{let c=b;if(a.doc)for(let b of a.doc)"dir"===b.stmt&&(c=b.value);return c},"getDir");function W(a,b,c){if(!b.id||"</join></fork>"===b.id||"</choice>"===b.id)return;b.cssClasses&&(Array.isArray(b.cssCompiledStyles)||(b.cssCompiledStyles=[]),b.cssClasses.split(" ").forEach(a=>{let d=c.get(a);d&&(b.cssCompiledStyles=[...b.cssCompiledStyles??[],...d.styles])}));let d=a.find(a=>a.id===b.id);d?Object.assign(d,b):a.push(b)}function X(a){return a?.classes?.join(" ")??""}function Y(a){return a?.styles??[]}(0,k.K)(W,"insertOrUpdateNode"),(0,k.K)(X,"getClassesFromDbInfo"),(0,k.K)(Y,"getStylesFromDbInfo");var Z=(0,k.K)((a,b,c,d,e,f,g,h)=>{let k=b.id,l=c.get(k),m=X(l),n=Y(l),o=(0,i.D7)();if(j.R.info("dataFetcher parsedItem",b,l,n),"root"!==k){let c=z;!0===b.start?c="stateStart":!1===b.start&&(c="stateEnd"),b.type!==t&&(c=b.type),R.get(k)||R.set(k,{id:k,shape:c,description:i.Y2.sanitizeText(k,o),cssClasses:`${m} ${E}`,cssStyles:n});let l=R.get(k);b.description&&(Array.isArray(l.description)?(l.shape=A,l.description.push(b.description)):l.description?.length&&l.description.length>0?(l.shape=A,l.description===k?l.description=[b.description]:l.description=[l.description,b.description]):(l.shape=z,l.description=b.description),l.description=i.Y2.sanitizeTextOrArray(l.description,o)),l.description?.length===1&&l.shape===A&&("group"===l.type?l.shape=C:l.shape=z),!l.type&&b.doc&&(j.R.info("Setting cluster for XCX",k,V(b)),l.type="group",l.isGroup=!0,l.dir=V(b),l.explicitDir=b.doc.some(a=>"dir"===a.stmt),l.shape=b.type===u?B:C,l.cssClasses=`${l.cssClasses} ${I} ${f?J:""}`);let p={labelStyle:"",shape:l.shape,label:l.description,cssClasses:l.cssClasses,cssCompiledStyles:[],cssStyles:l.cssStyles,id:k,dir:l.dir,domId:T(k,S),type:l.type,isGroup:"group"===l.type,padding:8,rx:10,ry:10,look:g,labelType:"markdown"};if(p.shape===B&&(p.label=""),a&&"root"!==a.id&&(j.R.trace("Setting node ",k," to be child of its parent ",a.id),p.parentId=a.id),p.centerLabel=!0,b.note){let a={labelStyle:"",shape:"note",label:b.note.text,labelType:"markdown",cssClasses:H,cssStyles:[],cssCompiledStyles:[],id:k+N+"-"+S,domId:T(k,S,L),type:l.type,isGroup:"group"===l.type,padding:o.flowchart?.padding,look:g,position:b.note.position},c=k+O,f={labelStyle:"",shape:"noteGroup",label:b.note.text,cssClasses:l.cssClasses,cssStyles:[],id:k+O,domId:T(k,S,K),type:"group",isGroup:!0,padding:16,look:g,position:b.note.position};S++,f.id=c,a.parentId=c,W(d,f,h),W(d,a,h),W(d,p,h);let i=k,j=a.id;"left of"===b.note.position&&(i=a.id,j=k),e.push({id:i+"-"+j,start:i,end:j,arrowhead:"none",arrowTypeEnd:"",style:v,labelStyle:"",classes:G,arrowheadStyle:w,labelpos:"c",labelType:x,thickness:y,look:g})}else W(d,p,h)}b.doc&&(j.R.trace("Adding nodes children "),U(b,b.doc,c,d,e,!f,g,h))},"dataFetcher"),$=(0,k.K)(()=>{R.clear(),S=0},"reset"),_="start",aa="color",ab="fill",ac=(0,k.K)(()=>new Map,"newClassesList"),ad=(0,k.K)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),ae=(0,k.K)(a=>JSON.parse(JSON.stringify(a)),"clone"),af=class{constructor(a){this.version=a,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=ac(),this.documents={root:ad()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=i.iN,this.setAccTitle=i.SV,this.getAccDescription=i.m7,this.setAccDescription=i.EI,this.setDiagramTitle=i.ke,this.getDiagramTitle=i.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,k.K)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(a){for(let b of(this.clear(!0),Array.isArray(a)?a:a.doc))switch(b.stmt){case q:this.addState(b.id.trim(),b.type,b.doc,b.description,b.note);break;case s:this.addRelation(b.state1,b.state2,b.description);break;case"classDef":this.addStyleClass(b.id.trim(),b.classes);break;case"style":this.handleStyleDef(b);break;case"applyClass":this.setCssClass(b.id.trim(),b.styleClass);break;case"click":this.addLink(b.id,b.url,b.tooltip)}let b=this.getStates(),c=(0,i.D7)();for(let a of($(),Z(void 0,this.getRootDocV2(),b,this.nodes,this.edges,!0,c.look,this.classes),this.nodes))if(Array.isArray(a.label)){if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${a.id}]`);a.label=a.label[0]}}handleStyleDef(a){let b=a.id.trim().split(","),c=a.styleClass.split(",");for(let a of b){let b=this.getState(a);if(!b){let c=a.trim();this.addState(c),b=this.getState(c)}b&&(b.styles=c.map(a=>a.replace(/;/g,"")?.trim()))}}setRootDoc(a){j.R.info("Setting root doc",a),this.rootDoc=a,1===this.version?this.extract(a):this.extract(this.getRootDocV2())}docTranslator(a,b,c){if(b.stmt===s){this.docTranslator(a,b.state1,!0),this.docTranslator(a,b.state2,!1);return}if(b.stmt===q&&("[*]"===b.id?(b.id=a.id+(c?"_start":"_end"),b.start=c):b.id=b.id.trim()),b.stmt!==r&&b.stmt!==q||!b.doc)return;let d=[],e=[];for(let a of b.doc)if(a.type===u){let b=ae(a);b.doc=ae(e),d.push(b),e=[]}else e.push(a);if(d.length>0&&e.length>0){let a={stmt:q,id:(0,h.$C)(),type:"divider",doc:ae(e)};d.push(ae(a)),b.doc=d}b.doc.forEach(a=>this.docTranslator(b,a,!0))}getRootDocV2(){return this.docTranslator({id:r,stmt:r},{id:r,stmt:r,doc:this.rootDoc},!0),{id:r,doc:this.rootDoc}}addState(a,b=t,c,d,e,f,g,h){let k=a?.trim();if(this.currentDocument.states.has(k)){let a=this.currentDocument.states.get(k);if(!a)throw Error(`State not found: ${k}`);a.doc||(a.doc=c),a.type||(a.type=b)}else j.R.info("Adding state ",k,d),this.currentDocument.states.set(k,{stmt:q,id:k,descriptions:[],type:b,doc:c,note:e,classes:[],styles:[],textStyles:[]});if(d&&(j.R.info("Setting state description",k,d),(Array.isArray(d)?d:[d]).forEach(a=>this.addDescription(k,a.trim()))),e){let a=this.currentDocument.states.get(k);if(!a)throw Error(`State not found: ${k}`);a.note=e,a.note.text=i.Y2.sanitizeText(a.note.text,(0,i.D7)())}f&&(j.R.info("Setting state classes",k,f),(Array.isArray(f)?f:[f]).forEach(a=>this.setCssClass(k,a.trim()))),g&&(j.R.info("Setting state styles",k,g),(Array.isArray(g)?g:[g]).forEach(a=>this.setStyle(k,a.trim()))),h&&(j.R.info("Setting state styles",k,g),(Array.isArray(h)?h:[h]).forEach(a=>this.setTextStyle(k,a.trim())))}clear(a){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:ad()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=ac(),a||(this.links=new Map,(0,i.IU)())}getState(a){return this.currentDocument.states.get(a)}getStates(){return this.currentDocument.states}logDocuments(){j.R.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(a,b,c){this.links.set(a,{url:b,tooltip:c}),j.R.warn("Adding link",a,b,c)}getLinks(){return this.links}startIdIfNeeded(a=""){return"[*]"===a?(this.startEndCount++,`${_}${this.startEndCount}`):a}startTypeIfNeeded(a="",b=t){return"[*]"===a?_:b}endIdIfNeeded(a=""){return"[*]"===a?(this.startEndCount++,`end${this.startEndCount}`):a}endTypeIfNeeded(a="",b=t){return"[*]"===a?"end":b}addRelationObjs(a,b,c=""){let d=this.startIdIfNeeded(a.id.trim()),e=this.startTypeIfNeeded(a.id.trim(),a.type),f=this.startIdIfNeeded(b.id.trim()),g=this.startTypeIfNeeded(b.id.trim(),b.type);this.addState(d,e,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles),this.addState(f,g,b.doc,b.description,b.note,b.classes,b.styles,b.textStyles),this.currentDocument.relations.push({id1:d,id2:f,relationTitle:i.Y2.sanitizeText(c,(0,i.D7)())})}addRelation(a,b,c){if("object"==typeof a&&"object"==typeof b)this.addRelationObjs(a,b,c);else if("string"==typeof a&&"string"==typeof b){let d=this.startIdIfNeeded(a.trim()),e=this.startTypeIfNeeded(a),f=this.endIdIfNeeded(b.trim()),g=this.endTypeIfNeeded(b);this.addState(d,e),this.addState(f,g),this.currentDocument.relations.push({id1:d,id2:f,relationTitle:c?i.Y2.sanitizeText(c,(0,i.D7)()):void 0})}}addDescription(a,b){let c=this.currentDocument.states.get(a),d=b.startsWith(":")?b.replace(":","").trim():b;c?.descriptions?.push(i.Y2.sanitizeText(d,(0,i.D7)()))}cleanupLabel(a){return a.startsWith(":")?a.slice(2).trim():a.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(a,b=""){this.classes.has(a)||this.classes.set(a,{id:a,styles:[],textStyles:[]});let c=this.classes.get(a);b&&c&&b.split(",").forEach(a=>{let b=a.replace(/([^;]*);/,"$1").trim();if(RegExp(aa).exec(a)){let a=b.replace(ab,"bgFill").replace(aa,ab);c.textStyles.push(a)}c.styles.push(b)})}getClasses(){return this.classes}setupToolTips(a){let b=(0,g.Ck)();(0,l.Ltv)(a).select("svg").selectAll("g.node, g.rough-node").on("mouseover",a=>{let c=(0,l.Ltv)(a.currentTarget),d=c.attr("title");if(null===d)return;let e=a.currentTarget?.getBoundingClientRect();b.transition().duration(200).style("opacity",".9"),b.style("left",window.scrollX+e.left+(e.right-e.left)/2+"px").style("top",window.scrollY+e.bottom+"px"),b.html(m.A.sanitize(d)),c.classed("hover",!0)}).on("mouseout",a=>{b.transition().duration(500).style("opacity",0),(0,l.Ltv)(a.currentTarget).classed("hover",!1)})}setCssClass(a,b){a.split(",").forEach(a=>{let c=this.getState(a);if(!c){let b=a.trim();this.addState(b),c=this.getState(b)}c?.classes?.push(b)})}setStyle(a,b){this.getState(a)?.styles?.push(b)}setTextStyle(a,b){this.getState(a)?.textStyles?.push(b)}bindFunctions(a){this.funs.forEach(b=>{b(a)})}getDirectionStatement(){return this.rootDoc.find(a=>"dir"===a.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(a){let b=this.getDirectionStatement();b?b.value=a:this.rootDoc.unshift({stmt:"dir",value:a})}trimColon(a){return a.startsWith(":")?a.slice(1).trim():a.trim()}getData(){let a=(0,i.D7)();return{nodes:this.nodes,edges:this.edges,other:{},config:a,direction:P(this.getRootDocV2())}}getConfig(){return(0,i.D7)().state}},ag=(0,k.K)(a=>`
1
+ "use strict";exports.id=6916,exports.ids=[6916],exports.modules={1487:(a,b,c)=>{c.d(b,{P:()=>g});var d=c(45313),e=c(58715),f=c(95097),g=(0,f.K)((a,b,c,f)=>{a.attr("class",c);let{width:g,height:j,x:k,y:l}=h(a,b);(0,d.a$)(a,j,g,f);let m=i(k,l,g,j,b);a.attr("viewBox",m),e.R.debug(`viewBox configured: ${m} with padding: ${b}`)},"setupViewPortForSVG"),h=(0,f.K)((a,b)=>{let c=a.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:c.width+2*b,height:c.height+2*b,x:c.x,y:c.y}},"calculateDimensionsWithPadding"),i=(0,f.K)((a,b,c,d,e)=>`${a-e} ${b-e} ${c} ${d}`,"createViewBox")},16916:(a,b,c)=>{c.d(b,{Zk:()=>o,q7:()=>Q,tM:()=>ag,u4:()=>af});var d=c(30917),e=c(1487),f=c(78832),g=c(87836),h=c(64922),i=c(45313),j=c(58715),k=c(95097),l=c(92718),m=c(11656),n=function(){var a=(0,k.K)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,2],c=[1,3],d=[1,4],e=[2,4],f=[1,9],g=[1,11],h=[1,16],i=[1,17],j=[1,18],l=[1,19],m=[1,33],n=[1,20],o=[1,21],p=[1,22],q=[1,23],r=[1,24],s=[1,26],t=[1,27],u=[1,28],v=[1,29],w=[1,30],x=[1,31],y=[1,32],z=[1,35],A=[1,36],B=[1,37],C=[1,38],D=[1,34],E=[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],F=[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],G=[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],H={trace:(0,k.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,k.K)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 3:return d.setRootDoc(f[h]),f[h];case 4:this.$=[];break;case 5:"nl"!=f[h]&&(f[h-1].push(f[h]),this.$=f[h-1]);break;case 6:case 7:case 12:this.$=f[h];break;case 8:this.$="nl";break;case 13:let i=f[h-1];i.description=d.trimColon(f[h]),this.$=i;break;case 14:this.$={stmt:"relation",state1:f[h-2],state2:f[h]};break;case 15:let j=d.trimColon(f[h]);this.$={stmt:"relation",state1:f[h-3],state2:f[h-1],description:j};break;case 19:this.$={stmt:"state",id:f[h-3],type:"default",description:"",doc:f[h-1]};break;case 20:var k=f[h],l=f[h-2].trim();if(f[h].match(":")){var m=f[h].split(":");k=m[0],l=[l,m[1]]}this.$={stmt:"state",id:k,type:"default",description:l};break;case 21:this.$={stmt:"state",id:f[h-3],type:"default",description:f[h-5],doc:f[h-1]};break;case 22:this.$={stmt:"state",id:f[h],type:"fork"};break;case 23:this.$={stmt:"state",id:f[h],type:"join"};break;case 24:this.$={stmt:"state",id:f[h],type:"choice"};break;case 25:this.$={stmt:"state",id:d.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:f[h-1].trim(),note:{position:f[h-2].trim(),text:f[h].trim()}};break;case 29:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 30:case 31:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:f[h-3],url:f[h-2],tooltip:f[h-1]};break;case 33:this.$={stmt:"click",id:f[h-3],url:f[h-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:f[h-1].trim(),classes:f[h].trim()};break;case 36:this.$={stmt:"style",id:f[h-1].trim(),styleClass:f[h].trim()};break;case 37:this.$={stmt:"applyClass",id:f[h-1].trim(),styleClass:f[h].trim()};break;case 38:d.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:d.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:d.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:d.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:f[h].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:f[h-2].trim(),classes:[f[h].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:b,5:c,6:d},{1:[3]},{3:5,4:b,5:c,6:d},{3:6,4:b,5:c,6:d},a([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],e,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:g,8:8,9:10,10:12,11:13,12:14,13:15,16:h,17:i,19:j,22:l,24:m,25:n,26:o,27:p,28:q,29:r,32:25,33:s,35:t,37:u,38:v,41:w,45:x,48:y,51:z,52:A,53:B,54:C,57:D},a(E,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:h,17:i,19:j,22:l,24:m,25:n,26:o,27:p,28:q,29:r,32:25,33:s,35:t,37:u,38:v,41:w,45:x,48:y,51:z,52:A,53:B,54:C,57:D},a(E,[2,7]),a(E,[2,8]),a(E,[2,9]),a(E,[2,10]),a(E,[2,11]),a(E,[2,12],{14:[1,40],15:[1,41]}),a(E,[2,16]),{18:[1,42]},a(E,[2,18],{20:[1,43]}),{23:[1,44]},a(E,[2,22]),a(E,[2,23]),a(E,[2,24]),a(E,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},a(E,[2,28]),{34:[1,49]},{36:[1,50]},a(E,[2,31]),{13:51,24:m,57:D},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},a(F,[2,44],{58:[1,56]}),a(F,[2,45],{58:[1,57]}),a(E,[2,38]),a(E,[2,39]),a(E,[2,40]),a(E,[2,41]),a(E,[2,6]),a(E,[2,13]),{13:58,24:m,57:D},a(E,[2,17]),a(G,e,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},a(E,[2,29]),a(E,[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]},a(E,[2,14],{14:[1,71]}),{4:f,5:g,8:8,9:10,10:12,11:13,12:14,13:15,16:h,17:i,19:j,21:[1,72],22:l,24:m,25:n,26:o,27:p,28:q,29:r,32:25,33:s,35:t,37:u,38:v,41:w,45:x,48:y,51:z,52:A,53:B,54:C,57:D},a(E,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},a(E,[2,34]),a(E,[2,35]),a(E,[2,36]),a(E,[2,37]),a(F,[2,46]),a(F,[2,47]),a(E,[2,15]),a(E,[2,19]),a(G,e,{7:78}),a(E,[2,26]),a(E,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:g,8:8,9:10,10:12,11:13,12:14,13:15,16:h,17:i,19:j,21:[1,81],22:l,24:m,25:n,26:o,27:p,28:q,29:r,32:25,33:s,35:t,37:u,38:v,41:w,45:x,48:y,51:z,52:A,53:B,54:C,57:D},a(E,[2,32]),a(E,[2,33]),a(E,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,k.K)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,k.K)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",i=0,j=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,k.K)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,k.K)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(i+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(j=n.yyleng,h=n.yytext,i=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,j,i,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function I(){this.yy={}}return H.lexer={EOF:1,parseError:(0,k.K)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,k.K)(function(a,b){return this.yy=b||this.yy||{},this._input=a,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,k.K)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,k.K)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=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),c.length-1&&(this.yylineno-=c.length-1);var e=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:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,k.K)(function(){return this._more=!0,this},"more"),reject:(0,k.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,k.K)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,k.K)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,k.K)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,k.K)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,k.K)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={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&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,k.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===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,k.K)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,k.K)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,k.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,k.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,k.K)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,k.K)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,k.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,k.K)(function(a,b,c,d){function e(){let c=b.yytext.indexOf("%%");if(0===c)return!1;if(c>0){let d=b.yytext.slice(0,c),e=b.yytext.slice(c);e&&a.lexer.unput(e),b.yytext=d}return!0}switch((0,k.K)(e,"processId"),c){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(),b.yytext=b.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),b.yytext=b.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),b.yytext=b.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(!e())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+b.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(!e())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),b.yytext=b.yytext.substr(2).trim(),31;case 68:return this.popState(),b.yytext=b.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!e())return;return 24;case 74:return b.yytext=b.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,k.K)(I,"Parser"),I.prototype=H,H.Parser=I,new I}();n.parser=n;var o=n,p="TB",q="state",r="root",s="relation",t="default",u="divider",v="fill:none",w="fill: #333",x="markdown",y="normal",z="rect",A="rectWithTitle",B="divider",C="roundedWithTitle",D="statediagram",E=`${D}-state`,F="transition",G=`${F} note-edge`,H=`${D}-note`,I=`${D}-cluster`,J=`${D}-cluster-alt`,K="parent",L="note",M="----",N=`${M}${L}`,O=`${M}${K}`,P=(0,k.K)((a,b=p)=>{if(!a.doc)return b;let c=b;for(let b of a.doc)"dir"===b.stmt&&(c=b.value);return c},"getDir"),Q={getClasses:(0,k.K)(function(a,b){return b.db.getClasses()},"getClasses"),draw:(0,k.K)(async function(a,b,c,g){j.R.info("REF0:"),j.R.info("Drawing state diagram (v2)",b);let{securityLevel:k,state:l,layout:m}=(0,i.D7)();g.db.extract(g.db.getRootDocV2());let n=g.db.getData(),o=(0,d.A)(b,k);n.type=g.type,n.layoutAlgorithm=m,n.nodeSpacing=l?.nodeSpacing||50,n.rankSpacing=l?.rankSpacing||50,"neo"===(0,i.D7)().look?n.markers=["barbNeo"]:n.markers=["barb"],n.diagramId=b,await (0,f.XX)(n,o);try{("function"==typeof g.db.getLinks?g.db.getLinks():new Map).forEach((a,b)=>{let c,d="string"==typeof b?b:"string"==typeof b?.id?b.id:"",e=n.nodes.find(a=>a.id===d);if(!d)return void j.R.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(b));let f=o.node()?.querySelectorAll("g.node, g.rough-node");if(f?.forEach(a=>{let b=a.textContent?.trim();(a.id===e?.domId||b===d)&&(c=a)}),!c)return void j.R.warn("⚠️ Could not find node matching text:",d);let g=c.parentNode;if(!g)return void j.R.warn("⚠️ Node has no parent, cannot wrap:",d);let h=document.createElementNS("http://www.w3.org/2000/svg","a"),i=a.url.replace(/^"+|"+$/g,"");if(h.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i),h.setAttribute("target","_blank"),a.tooltip){let b=a.tooltip.replace(/^"+|"+$/g,"");h.setAttribute("title",b),c.setAttribute("title",b)}g.replaceChild(h,c),h.appendChild(c),j.R.info("\uD83D\uDD17 Wrapped node in <a> tag for:",d,a.url)})}catch(a){j.R.error("❌ Error injecting clickable links:",a)}h._K.insertTitle(o,"statediagramTitleText",l?.titleTopMargin??25,g.db.getDiagramTitle()),(0,e.P)(o,8,D,l?.useMaxWidth??!0)},"draw"),getDir:P},R=new Map,S=0;function T(a="",b=0,c="",d=M){let e=null!==c&&c.length>0?`${d}${c}`:"";return`state-${a}${e}-${b}`}(0,k.K)(T,"stateDomId");var U=(0,k.K)((a,b,c,d,e,f,g,h)=>{j.R.trace("items",b),b.forEach(b=>{switch(b.stmt){case q:case t:Z(a,b,c,d,e,f,g,h);break;case s:{Z(a,b.state1,c,d,e,f,g,h),Z(a,b.state2,c,d,e,f,g,h);let j="neo"===g,k={id:"edge"+S,start:b.state1.id,end:b.state2.id,arrowhead:"normal",arrowTypeEnd:j?"arrow_barb_neo":"arrow_barb",style:v,labelStyle:"",label:i.Y2.sanitizeText(b.description??"",(0,i.D7)()),arrowheadStyle:w,labelpos:"c",labelType:x,thickness:y,classes:F,look:g};e.push(k),S++}}})},"setupDoc"),V=(0,k.K)((a,b=p)=>{let c=b;if(a.doc)for(let b of a.doc)"dir"===b.stmt&&(c=b.value);return c},"getDir");function W(a,b,c){if(!b.id||"</join></fork>"===b.id||"</choice>"===b.id)return;b.cssClasses&&(Array.isArray(b.cssCompiledStyles)||(b.cssCompiledStyles=[]),b.cssClasses.split(" ").forEach(a=>{let d=c.get(a);d&&(b.cssCompiledStyles=[...b.cssCompiledStyles??[],...d.styles])}));let d=a.find(a=>a.id===b.id);d?Object.assign(d,b):a.push(b)}function X(a){return a?.classes?.join(" ")??""}function Y(a){return a?.styles??[]}(0,k.K)(W,"insertOrUpdateNode"),(0,k.K)(X,"getClassesFromDbInfo"),(0,k.K)(Y,"getStylesFromDbInfo");var Z=(0,k.K)((a,b,c,d,e,f,g,h)=>{let k=b.id,l=c.get(k),m=X(l),n=Y(l),o=(0,i.D7)();if(j.R.info("dataFetcher parsedItem",b,l,n),"root"!==k){let c=z;!0===b.start?c="stateStart":!1===b.start&&(c="stateEnd"),b.type!==t&&(c=b.type),R.get(k)||R.set(k,{id:k,shape:c,description:i.Y2.sanitizeText(k,o),cssClasses:`${m} ${E}`,cssStyles:n});let l=R.get(k);b.description&&(Array.isArray(l.description)?(l.shape=A,l.description.push(b.description)):l.description?.length&&l.description.length>0?(l.shape=A,l.description===k?l.description=[b.description]:l.description=[l.description,b.description]):(l.shape=z,l.description=b.description),l.description=i.Y2.sanitizeTextOrArray(l.description,o)),l.description?.length===1&&l.shape===A&&("group"===l.type?l.shape=C:l.shape=z),!l.type&&b.doc&&(j.R.info("Setting cluster for XCX",k,V(b)),l.type="group",l.isGroup=!0,l.dir=V(b),l.explicitDir=b.doc.some(a=>"dir"===a.stmt),l.shape=b.type===u?B:C,l.cssClasses=`${l.cssClasses} ${I} ${f?J:""}`);let p={labelStyle:"",shape:l.shape,label:l.description,cssClasses:l.cssClasses,cssCompiledStyles:[],cssStyles:l.cssStyles,id:k,dir:l.dir,domId:T(k,S),type:l.type,isGroup:"group"===l.type,padding:8,rx:10,ry:10,look:g,labelType:"markdown"};if(p.shape===B&&(p.label=""),a&&"root"!==a.id&&(j.R.trace("Setting node ",k," to be child of its parent ",a.id),p.parentId=a.id),p.centerLabel=!0,b.note){let a={labelStyle:"",shape:"note",label:b.note.text,labelType:"markdown",cssClasses:H,cssStyles:[],cssCompiledStyles:[],id:k+N+"-"+S,domId:T(k,S,L),type:l.type,isGroup:"group"===l.type,padding:o.flowchart?.padding,look:g,position:b.note.position},c=k+O,f={labelStyle:"",shape:"noteGroup",label:b.note.text,cssClasses:l.cssClasses,cssStyles:[],id:k+O,domId:T(k,S,K),type:"group",isGroup:!0,padding:16,look:g,position:b.note.position};S++,f.id=c,a.parentId=c,W(d,f,h),W(d,a,h),W(d,p,h);let i=k,j=a.id;"left of"===b.note.position&&(i=a.id,j=k),e.push({id:i+"-"+j,start:i,end:j,arrowhead:"none",arrowTypeEnd:"",style:v,labelStyle:"",classes:G,arrowheadStyle:w,labelpos:"c",labelType:x,thickness:y,look:g})}else W(d,p,h)}b.doc&&(j.R.trace("Adding nodes children "),U(b,b.doc,c,d,e,!f,g,h))},"dataFetcher"),$=(0,k.K)(()=>{R.clear(),S=0},"reset"),_="start",aa="color",ab="fill",ac=(0,k.K)(()=>new Map,"newClassesList"),ad=(0,k.K)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),ae=(0,k.K)(a=>JSON.parse(JSON.stringify(a)),"clone"),af=class{constructor(a){this.version=a,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=ac(),this.documents={root:ad()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=i.iN,this.setAccTitle=i.SV,this.getAccDescription=i.m7,this.setAccDescription=i.EI,this.setDiagramTitle=i.ke,this.getDiagramTitle=i.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,k.K)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(a){for(let b of(this.clear(!0),Array.isArray(a)?a:a.doc))switch(b.stmt){case q:this.addState(b.id.trim(),b.type,b.doc,b.description,b.note);break;case s:this.addRelation(b.state1,b.state2,b.description);break;case"classDef":this.addStyleClass(b.id.trim(),b.classes);break;case"style":this.handleStyleDef(b);break;case"applyClass":this.setCssClass(b.id.trim(),b.styleClass);break;case"click":this.addLink(b.id,b.url,b.tooltip)}let b=this.getStates(),c=(0,i.D7)();for(let a of($(),Z(void 0,this.getRootDocV2(),b,this.nodes,this.edges,!0,c.look,this.classes),this.nodes))if(Array.isArray(a.label)){if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${a.id}]`);a.label=a.label[0]}}handleStyleDef(a){let b=a.id.trim().split(","),c=a.styleClass.split(",");for(let a of b){let b=this.getState(a);if(!b){let c=a.trim();this.addState(c),b=this.getState(c)}b&&(b.styles=c.map(a=>a.replace(/;/g,"")?.trim()))}}setRootDoc(a){j.R.info("Setting root doc",a),this.rootDoc=a,1===this.version?this.extract(a):this.extract(this.getRootDocV2())}docTranslator(a,b,c){if(b.stmt===s){this.docTranslator(a,b.state1,!0),this.docTranslator(a,b.state2,!1);return}if(b.stmt===q&&("[*]"===b.id?(b.id=a.id+(c?"_start":"_end"),b.start=c):b.id=b.id.trim()),b.stmt!==r&&b.stmt!==q||!b.doc)return;let d=[],e=[];for(let a of b.doc)if(a.type===u){let b=ae(a);b.doc=ae(e),d.push(b),e=[]}else e.push(a);if(d.length>0&&e.length>0){let a={stmt:q,id:(0,h.$C)(),type:"divider",doc:ae(e)};d.push(ae(a)),b.doc=d}b.doc.forEach(a=>this.docTranslator(b,a,!0))}getRootDocV2(){return this.docTranslator({id:r,stmt:r},{id:r,stmt:r,doc:this.rootDoc},!0),{id:r,doc:this.rootDoc}}addState(a,b=t,c,d,e,f,g,h){let k=a?.trim();if(this.currentDocument.states.has(k)){let a=this.currentDocument.states.get(k);if(!a)throw Error(`State not found: ${k}`);a.doc||(a.doc=c),a.type||(a.type=b)}else j.R.info("Adding state ",k,d),this.currentDocument.states.set(k,{stmt:q,id:k,descriptions:[],type:b,doc:c,note:e,classes:[],styles:[],textStyles:[]});if(d&&(j.R.info("Setting state description",k,d),(Array.isArray(d)?d:[d]).forEach(a=>this.addDescription(k,a.trim()))),e){let a=this.currentDocument.states.get(k);if(!a)throw Error(`State not found: ${k}`);a.note=e,a.note.text=i.Y2.sanitizeText(a.note.text,(0,i.D7)())}f&&(j.R.info("Setting state classes",k,f),(Array.isArray(f)?f:[f]).forEach(a=>this.setCssClass(k,a.trim()))),g&&(j.R.info("Setting state styles",k,g),(Array.isArray(g)?g:[g]).forEach(a=>this.setStyle(k,a.trim()))),h&&(j.R.info("Setting state styles",k,g),(Array.isArray(h)?h:[h]).forEach(a=>this.setTextStyle(k,a.trim())))}clear(a){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:ad()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=ac(),a||(this.links=new Map,(0,i.IU)())}getState(a){return this.currentDocument.states.get(a)}getStates(){return this.currentDocument.states}logDocuments(){j.R.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(a,b,c){this.links.set(a,{url:b,tooltip:c}),j.R.warn("Adding link",a,b,c)}getLinks(){return this.links}startIdIfNeeded(a=""){return"[*]"===a?(this.startEndCount++,`${_}${this.startEndCount}`):a}startTypeIfNeeded(a="",b=t){return"[*]"===a?_:b}endIdIfNeeded(a=""){return"[*]"===a?(this.startEndCount++,`end${this.startEndCount}`):a}endTypeIfNeeded(a="",b=t){return"[*]"===a?"end":b}addRelationObjs(a,b,c=""){let d=this.startIdIfNeeded(a.id.trim()),e=this.startTypeIfNeeded(a.id.trim(),a.type),f=this.startIdIfNeeded(b.id.trim()),g=this.startTypeIfNeeded(b.id.trim(),b.type);this.addState(d,e,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles),this.addState(f,g,b.doc,b.description,b.note,b.classes,b.styles,b.textStyles),this.currentDocument.relations.push({id1:d,id2:f,relationTitle:i.Y2.sanitizeText(c,(0,i.D7)())})}addRelation(a,b,c){if("object"==typeof a&&"object"==typeof b)this.addRelationObjs(a,b,c);else if("string"==typeof a&&"string"==typeof b){let d=this.startIdIfNeeded(a.trim()),e=this.startTypeIfNeeded(a),f=this.endIdIfNeeded(b.trim()),g=this.endTypeIfNeeded(b);this.addState(d,e),this.addState(f,g),this.currentDocument.relations.push({id1:d,id2:f,relationTitle:c?i.Y2.sanitizeText(c,(0,i.D7)()):void 0})}}addDescription(a,b){let c=this.currentDocument.states.get(a),d=b.startsWith(":")?b.replace(":","").trim():b;c?.descriptions?.push(i.Y2.sanitizeText(d,(0,i.D7)()))}cleanupLabel(a){return a.startsWith(":")?a.slice(2).trim():a.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(a,b=""){this.classes.has(a)||this.classes.set(a,{id:a,styles:[],textStyles:[]});let c=this.classes.get(a);b&&c&&b.split(",").forEach(a=>{let b=a.replace(/([^;]*);/,"$1").trim();if(RegExp(aa).exec(a)){let a=b.replace(ab,"bgFill").replace(aa,ab);c.textStyles.push(a)}c.styles.push(b)})}getClasses(){return this.classes}setupToolTips(a){let b=(0,g.Ck)();(0,l.Ltv)(a).select("svg").selectAll("g.node, g.rough-node").on("mouseover",a=>{let c=(0,l.Ltv)(a.currentTarget),d=c.attr("title");if(null===d)return;let e=a.currentTarget?.getBoundingClientRect();b.transition().duration(200).style("opacity",".9"),b.style("left",window.scrollX+e.left+(e.right-e.left)/2+"px").style("top",window.scrollY+e.bottom+"px"),b.html(m.A.sanitize(d)),c.classed("hover",!0)}).on("mouseout",a=>{b.transition().duration(500).style("opacity",0),(0,l.Ltv)(a.currentTarget).classed("hover",!1)})}setCssClass(a,b){a.split(",").forEach(a=>{let c=this.getState(a);if(!c){let b=a.trim();this.addState(b),c=this.getState(b)}c?.classes?.push(b)})}setStyle(a,b){this.getState(a)?.styles?.push(b)}setTextStyle(a,b){this.getState(a)?.textStyles?.push(b)}bindFunctions(a){this.funs.forEach(b=>{b(a)})}getDirectionStatement(){return this.rootDoc.find(a=>"dir"===a.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(a){let b=this.getDirectionStatement();b?b.value=a:this.rootDoc.unshift({stmt:"dir",value:a})}trimColon(a){return a.startsWith(":")?a.slice(1).trim():a.trim()}getData(){let a=(0,i.D7)();return{nodes:this.nodes,edges:this.edges,other:{},config:a,direction:P(this.getRootDocV2())}}getConfig(){return(0,i.D7)().state}},ag=(0,k.K)(a=>`
2
2
  defs [id$="-barbEnd"] {
3
3
  fill: ${a.transitionColor};
4
4
  stroke: ${a.transitionColor};
@@ -223,4 +223,4 @@ g.stateGroup line {
223
223
  ry: ${a.radius}px;
224
224
  filter: ${a.dropShadow?a.dropShadow.replace("url(#drop-shadow)",`url(${a.svgId}-drop-shadow)`):"none"}
225
225
  }
226
- `,"getStyles")},30917:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(95097),e=c(69085),f=(0,d.K)((a,b)=>{let c;return"sandbox"===b&&(c=(0,e.Ltv)("#i"+a)),("sandbox"===b?(0,e.Ltv)(c.nodes()[0].contentDocument.body):(0,e.Ltv)("body")).select(`[id="${a}"]`)},"getDiagramElement")},87836:(a,b,c)=>{c.d(b,{CP:()=>l,Ck:()=>o,HT:()=>n,PB:()=>m,aC:()=>k,lC:()=>i,m:()=>j,tk:()=>h});var d=c(45313),e=c(95097),f=c(65207),g=c(69085),h=(0,e.K)((a,b)=>{let c=a.append("rect");if(c.attr("x",b.x),c.attr("y",b.y),c.attr("fill",b.fill),c.attr("stroke",b.stroke),c.attr("width",b.width),c.attr("height",b.height),b.name&&c.attr("name",b.name),b.rx&&c.attr("rx",b.rx),b.ry&&c.attr("ry",b.ry),void 0!==b.attrs)for(let a in b.attrs)c.attr(a,b.attrs[a]);return b.class&&c.attr("class",b.class),c},"drawRect"),i=(0,e.K)((a,b)=>{h(a,{x:b.startx,y:b.starty,width:b.stopx-b.startx,height:b.stopy-b.starty,fill:b.fill,stroke:b.stroke,class:"rect"}).lower()},"drawBackgroundRect"),j=(0,e.K)((a,b)=>{let c=b.text.replace(d.H1," "),e=a.append("text");e.attr("x",b.x),e.attr("y",b.y),e.attr("class","legend"),e.style("text-anchor",b.anchor),b.class&&e.attr("class",b.class);let f=e.append("tspan");return f.attr("x",b.x+2*b.textMargin),f.text(c),e},"drawText"),k=(0,e.K)((a,b,c,d)=>{let e=a.append("image");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",g)},"drawImage"),l=(0,e.K)((a,b,c,d)=>{let e=a.append("use");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",`#${g}`)},"drawEmbeddedImage"),m=(0,e.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),n=(0,e.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),o=(0,e.K)(()=>{let a=(0,g.Ltv)(".mermaidTooltip");return a.empty()&&(a=(0,g.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")),a},"createTooltip")}};
226
+ `,"getStyles")},30917:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(95097),e=c(92718),f=(0,d.K)((a,b)=>{let c;return"sandbox"===b&&(c=(0,e.Ltv)("#i"+a)),("sandbox"===b?(0,e.Ltv)(c.nodes()[0].contentDocument.body):(0,e.Ltv)("body")).select(`[id="${a}"]`)},"getDiagramElement")},87836:(a,b,c)=>{c.d(b,{CP:()=>l,Ck:()=>o,HT:()=>n,PB:()=>m,aC:()=>k,lC:()=>i,m:()=>j,tk:()=>h});var d=c(45313),e=c(95097),f=c(65207),g=c(92718),h=(0,e.K)((a,b)=>{let c=a.append("rect");if(c.attr("x",b.x),c.attr("y",b.y),c.attr("fill",b.fill),c.attr("stroke",b.stroke),c.attr("width",b.width),c.attr("height",b.height),b.name&&c.attr("name",b.name),b.rx&&c.attr("rx",b.rx),b.ry&&c.attr("ry",b.ry),void 0!==b.attrs)for(let a in b.attrs)c.attr(a,b.attrs[a]);return b.class&&c.attr("class",b.class),c},"drawRect"),i=(0,e.K)((a,b)=>{h(a,{x:b.startx,y:b.starty,width:b.stopx-b.startx,height:b.stopy-b.starty,fill:b.fill,stroke:b.stroke,class:"rect"}).lower()},"drawBackgroundRect"),j=(0,e.K)((a,b)=>{let c=b.text.replace(d.H1," "),e=a.append("text");e.attr("x",b.x),e.attr("y",b.y),e.attr("class","legend"),e.style("text-anchor",b.anchor),b.class&&e.attr("class",b.class);let f=e.append("tspan");return f.attr("x",b.x+2*b.textMargin),f.text(c),e},"drawText"),k=(0,e.K)((a,b,c,d)=>{let e=a.append("image");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",g)},"drawImage"),l=(0,e.K)((a,b,c,d)=>{let e=a.append("use");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",`#${g}`)},"drawEmbeddedImage"),m=(0,e.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),n=(0,e.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),o=(0,e.K)(()=>{let a=(0,g.Ltv)(".mermaidTooltip");return a.empty()&&(a=(0,g.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")),a},"createTooltip")}};
@@ -0,0 +1,43 @@
1
+ "use strict";exports.id=7128,exports.ids=[7128],exports.modules={47128:(a,b,c)=>{c.d(b,{dA:()=>h});var d=c(75384),e=c(65562),f=c(48817);function g(a,b=340,c=160){let d=a.filter(a=>a?.type==="session-card").map(a=>({x:a.position?.x??0,y:a.position?.y??0,w:a.style?.width??b,h:a.style?.height??c})),e=(a,e)=>d.some(d=>a<d.x+d.w+24&&a+b+24>d.x&&e<d.y+d.h+24&&e+c+24>d.y),f=60,h=0;for(;h<2e3;){for(let a=0;a<4;a+=1){let c=60+a*(b+24);if(!e(c,f))return{x:c,y:f}}f+=c+24,h+=1}return{x:60,y:60}}async function h(a){var b;let c,h=(0,d.v$)(a);if(!h?.taskId)return;let i=h.taskId,j=(0,e.gQ)(i),k=(0,f.gN)(a),l=new Set(j);for(let a of k)a.sessionId&&l.add(a.sessionId);await (b=a=>{let b=a.nodes,c=a.edges,d=Array.from(b.values()),e=new Map,h=new Set;for(let a of d){if(a?.type!=="session-card")continue;let b=a.data?.sessionId;if(b){if(function(a){let b=a?.data?.cwd;return!!(a&&"string"==typeof b&&b.length>0)}(a)){h.add(b);continue}e.set(b,a)}}let j=[];for(let[a,b]of e)l.has(a)||b.data?.taskId!==i&&j.push(b.id);for(let a of j)for(let d of(b.delete(a),Array.from(c.values())))(d.source===a||d.target===a)&&c.delete(d.id);{let a=Array.from(b.values());for(let c of l){if(e.has(c)||h.has(c))continue;let d=`session-${c}`,f=g(a);b.set(d,{id:d,type:"session-card",position:{x:f.x,y:f.y},style:{width:340,height:160},data:{sessionId:c,title:"",projectName:"",messageCount:0,lastReply:"",phase:"idle",runningMs:0,endedAt:0,lastActivityAt:0,stale:!1,expanded:!1,cwd:"",taskId:"",w:340,h:160,expandedW:0,expandedH:0,collapsedW:0,collapsedH:0}}),a.push(b.get(d))}}let m=new Map;for(let a of d)a?.type==="task-card"&&a.data?.cardId&&m.set(a.data.cardId,a);let n=new Set(k.map(a=>a.id)),o=[];for(let[a,b]of m)n.has(a)||o.push(b.id);for(let a of o)for(let d of(b.delete(a),Array.from(c.values())))(d.source===a||d.target===a)&&c.delete(d.id);{let a=Array.from(b.values());for(let c of k){if(m.has(c.id))continue;let d=`task-${c.id}`,e=g(a,380,240);b.set(d,{id:d,type:"task-card",position:{x:e.x,y:e.y},style:{width:380,height:240},data:{cardId:c.id,number:c.number,name:c.name,description:c.description,readyStatus:c.readyStatus,execStatus:c.execStatus,priority:c.priority,due:c.due??void 0,expanded:!1,w:380,h:240,expandedW:0,expandedH:0,collapsedW:0,collapsedH:0}}),a.push(b.get(d))}}let p=new Map;for(let a of Array.from(b.values()))a?.type==="task-card"&&a.data?.cardId&&p.set(a.data.cardId,a);let q=new Map;for(let a of Array.from(b.values()))a?.type==="session-card"&&a.data?.sessionId&&q.set(a.data.sessionId,a);let r=new Map;for(let a of Array.from(c.values())){if(!a.data?.execLink)continue;let b=a.source,c=r.get(b)??[];c.push({to:a.target,edgeId:a.id}),r.set(b,c)}for(let a of k){let b=p.get(a.id);if(!b)continue;let d=a.sessionId?q.get(a.sessionId):null,e=r.get(b.id)??[];for(let a of e)a.to!==(d?.id??null)&&c.delete(a.edgeId);if(!d||e.some(a=>a.to===d.id))continue;let f=`exec-${a.id}-${a.sessionId}`;c.set(f,{id:f,source:b.id,target:d.id,type:"default",data:{execLink:!0,cardId:a.id,sessionId:a.sessionId},markerEnd:{type:"arrowclosed"},style:{strokeWidth:1.5,stroke:"#3184f8",strokeDasharray:"6 4"}})}let s=new Map;for(let a of Array.from(c.values())){if(!a.data?.taskLink)continue;let b=a.source,c=a.target,d=a.data.taskLink;b&&c&&d&&s.set(`${b}->${c}:${d}`,a.id)}let t=new Set;for(let a of k){let b=p.get(a.id);if(b)for(let d of(0,f.QA)(a.id)){let a=p.get(d.targetCardId);if(!a)continue;let e=`${b.id}->${a.id}:${d.kind}`;if(t.add(e),!s.has(e)){let e=`link-${b.id}-${a.id}-${d.kind}`;c.set(e,{id:e,source:b.id,target:a.id,type:"default",data:{taskLink:d.kind},markerEnd:{type:"arrowclosed"},style:{strokeWidth:1.5,stroke:"#f59e0b"}})}}}for(let[a,b]of s)t.has(a)||c.delete(b)},!(c=globalThis.__yjsBoard)?Promise.resolve():c.mutateBoard(a,b))}},48817:(a,b,c)=>{c.d(b,{$j:()=>r,BH:()=>u,CU:()=>t,Im:()=>q,Kg:()=>y,O7:()=>v,QA:()=>n,XJ:()=>k,gN:()=>l,hG:()=>x,tZ:()=>s,uZ:()=>p,w0:()=>m});var d=c(55511),e=c(90596);let f=new Set(["draft","todo"]),g=new Set(["not_started","running","review","done","failed","abandoned","waiting_reply"]);function h(a){return{...a,useWorktree:1===a.useWorktree,attachments:JSON.parse(a.attachments)}}let i="id, board_id AS boardId, project_key AS projectKey, number, name, description, ready_status AS readyStatus, exec_status AS execStatus, priority, due, attachments, cwd, use_worktree AS useWorktree, max_retries AS maxRetries, retry_count AS retryCount, session_id AS sessionId, dispatch_token AS dispatchToken, owner, heartbeat, created, updated";function j(a){return(0,e.Lf)().prepare(`SELECT ${i} FROM task_cards WHERE id = ?`).get(a)}function k(a){let b=j(a);return b?h(b):void 0}function l(a){return(0,e.Lf)().prepare(`SELECT ${i} FROM task_cards WHERE board_id = ? ORDER BY number`).all(a).map(h)}function m(a,b){let c=(0,e.Lf)(),d=j(a);if(!d)return null;let i=[],k=[],l=(a,b)=>{i.push(`${a} = ?`),k.push(b)};if(void 0!==b.name){let a=b.name.trim();if(!a)throw Error("name must not be empty");l("name",a)}if(void 0!==b.description&&l("description",b.description),void 0!==b.readyStatus){var m=b.readyStatus;if(void 0!==m&&!f.has(m))throw Error(`invalid readyStatus: ${String(m)}`);l("ready_status",b.readyStatus)}if(void 0!==b.execStatus){var n=b.execStatus;if(void 0!==n&&!g.has(n))throw Error(`invalid execStatus: ${String(n)}`);l("exec_status",b.execStatus)}return(void 0!==b.priority&&l("priority",b.priority),void 0!==b.due&&l("due",b.due),void 0!==b.attachments&&l("attachments",JSON.stringify(b.attachments)),void 0!==b.cwd&&l("cwd",b.cwd),void 0!==b.useWorktree&&l("use_worktree",+!!b.useWorktree),void 0!==b.maxRetries&&l("max_retries",b.maxRetries),void 0!==b.sessionId&&l("session_id",b.sessionId),void 0!==b.retryCount&&l("retry_count",b.retryCount),void 0!==b.owner&&l("owner",b.owner),void 0!==b.heartbeat&&l("heartbeat",b.heartbeat),0===i.length)?h(d):(l("updated",Date.now()),c.prepare(`UPDATE task_cards SET ${i.join(", ")} WHERE id = ?`).run(...k,a),h(j(a)))}function n(a){return(0,e.Lf)().prepare("SELECT id, card_id AS cardId, target_card_id AS targetCardId, kind, created FROM task_card_links WHERE card_id = ? ORDER BY created, rowid").all(a)}function o(a){for(let b of n(a.id)){if("prerequisite"!==b.kind)continue;let a=k(b.targetCardId);if(a&&"done"!==a.execStatus)return!1}return!0}function p(){return(0,e.Lf)().prepare(`SELECT ${i} FROM task_cards
2
+ WHERE ready_status = 'todo' AND (exec_status = 'not_started' OR (exec_status = 'failed' AND retry_count < max_retries))
3
+ AND dispatch_token IS NULL
4
+ ORDER BY priority DESC, number`).all().map(h).filter(o)}function q(a,b){return Number((0,e.Lf)().prepare(`UPDATE task_cards SET dispatch_token = ?1, updated = ?2
5
+ WHERE id = ?3
6
+ AND ready_status = 'todo'
7
+ AND (exec_status = 'not_started' OR (exec_status = 'failed' AND retry_count < max_retries))
8
+ AND dispatch_token IS NULL`).run(b,Date.now(),a).changes)>0}function r(a,b){(0,e.Lf)().prepare("UPDATE task_cards SET dispatch_token = NULL, updated = ?2 WHERE id = ?1 AND dispatch_token = ?3").run(a,Date.now(),b)}function s(a){return Number((0,e.Lf)().prepare(`UPDATE task_cards SET heartbeat = ?1
9
+ WHERE owner = ?2 AND exec_status IN ('running', 'review', 'waiting_reply')`).run(Date.now(),a).changes)}function t(){return(0,e.Lf)().prepare("SELECT COUNT(*) AS n FROM task_cards WHERE exec_status = 'running'").get().n}function u(){return(0,e.Lf)().prepare(`SELECT ${i} FROM task_cards WHERE exec_status = 'running' ORDER BY number`).all().map(h)}function v(a){let b=a.map(()=>"?").join(",");return(0,e.Lf)().prepare(`SELECT ${i} FROM task_cards WHERE exec_status IN (${b}) ORDER BY number`).all(...a).map(h)}function w(a){return{...a}}function x(a,b,c){let f=(0,d.randomUUID)(),g=Date.now();return(0,e.Lf)().prepare("INSERT INTO task_card_questions (id, card_id, session_id, question, status, created) VALUES (?, ?, ?, ?, 'pending', ?)").run(f,a,b,c,g),w((0,e.Lf)().prepare("SELECT id, card_id AS cardId, session_id AS sessionId, question, status, answer, created, answered FROM task_card_questions WHERE id = ?").get(f))}function y(){return(0,e.Lf)().prepare(`SELECT q.id, q.card_id AS cardId, q.session_id AS sessionId, q.question, q.status, q.answer, q.created, q.answered
10
+ FROM task_card_questions q
11
+ JOIN task_cards c ON c.id = q.card_id
12
+ WHERE q.status = 'answered' AND c.exec_status = 'waiting_reply'
13
+ AND q.id = (SELECT q2.id FROM task_card_questions q2 WHERE q2.card_id = q.card_id AND q2.status='answered' ORDER BY q2.answered DESC, q2.created DESC LIMIT 1)
14
+ ORDER BY q.answered`).all().map(w)}},65562:(a,b,c)=>{c.d(b,{gQ:()=>e,mE:()=>f}),c(55511);var d=c(90596);function e(a){return(0,d.Lf)().prepare("SELECT session_id FROM session_meta WHERE task_id = ? ORDER BY pinned DESC, updated DESC, rowid DESC").all(a).map(a=>a.session_id)}function f(a,b){let c=(0,d.Lf)();if(!(0,d.Lf)().prepare("SELECT id, project_key AS projectKey, name, created, updated, pinned, sort_order AS sortOrder FROM tasks WHERE id = ?").get(b))return!1;let e=Date.now();c.exec("BEGIN");try{c.prepare("INSERT INTO session_meta (session_id, task_id, updated) VALUES (?, ?, ?) ON CONFLICT(session_id) DO UPDATE SET task_id = excluded.task_id, updated = excluded.updated").run(a,b,e),c.prepare("UPDATE tasks SET updated = ? WHERE id = ?").run(e,b),c.exec("COMMIT")}catch(a){throw c.exec("ROLLBACK"),a}return!0}c(75384)},75384:(a,b,c)=>{c.d(b,{v$:()=>f}),c(55511);var d=c(90596);c(48817);let e="__running__";function f(a){var b,c;if(a===e)return{id:e,projectKey:"",name:"running",isSystem:!0,taskId:null,sortOrder:0,created:0,updated:0,nodeCount:0};let f=(0,d.Lf)().prepare("SELECT id, project_key AS projectKey, name, is_system AS isSystem, task_id AS taskId, sort_order AS sortOrder, created, updated FROM boards WHERE id = ?").get(a);return f?(b=f.id,c=(0,d.Lf)().prepare("SELECT COUNT(*) AS n FROM board_nodes WHERE board_id = ?").get(b).n,{id:f.id,projectKey:f.projectKey,name:f.name,isSystem:1===f.isSystem,taskId:f.taskId,sortOrder:f.sortOrder,created:f.created,updated:f.updated,nodeCount:c}):void 0}},90596:(a,b,c)=>{c.d(b,{Lf:()=>g});var d=c(80099),e=c(21820),f=c(33873);function g(){var a;if(globalThis.__piWebDb)return globalThis.__piWebDb;let b=new d.DatabaseSync((0,f.join)(function(){let a=process.env.PI_CODING_AGENT_DIR;if(a){let b=a.startsWith("~")?(0,f.join)((0,e.homedir)(),a.slice(1)):a;return(0,f.normalize)(b)}return(0,f.join)((0,e.homedir)(),".pi","agent")}(),"pi-web.db"));return b.exec("PRAGMA journal_mode = WAL;"),b.exec("PRAGMA foreign_keys = ON;"),(a=b).exec(`
15
+ CREATE TABLE IF NOT EXISTS tasks (
16
+ id TEXT PRIMARY KEY,
17
+ project_key TEXT NOT NULL,
18
+ name TEXT NOT NULL,
19
+ created INTEGER NOT NULL,
20
+ updated INTEGER NOT NULL
21
+ );
22
+ CREATE INDEX IF NOT EXISTS idx_tasks_project ON tasks(project_key);
23
+
24
+ CREATE TABLE IF NOT EXISTS session_meta (
25
+ session_id TEXT PRIMARY KEY,
26
+ task_id TEXT,
27
+ updated INTEGER NOT NULL
28
+ );
29
+ CREATE INDEX IF NOT EXISTS idx_meta_task ON session_meta(task_id);
30
+
31
+ CREATE TABLE IF NOT EXISTS search_state (
32
+ session_id TEXT PRIMARY KEY,
33
+ mtime TEXT NOT NULL,
34
+ title TEXT NOT NULL
35
+ );
36
+
37
+ CREATE VIRTUAL TABLE IF NOT EXISTS session_search USING fts5(
38
+ session_id UNINDEXED,
39
+ title,
40
+ body,
41
+ tokenize = 'trigram'
42
+ );
43
+ `),function(a){let b=a.prepare("PRAGMA user_version").get().user_version;for(let c of h)if(!(c.version<=b)){a.exec("BEGIN");try{for(let b of c.statements)try{a.exec(b)}catch(b){let a=b instanceof Error?b.message:String(b);if(!/duplicate column name/i.test(a))throw b}a.exec(`PRAGMA user_version = ${c.version}`),a.exec("COMMIT"),b=c.version}catch(b){throw a.exec("ROLLBACK"),b}}}(a),globalThis.__piWebDb=b,b}let h=[{version:1,name:"pinned columns",statements:["ALTER TABLE tasks ADD COLUMN pinned INTEGER NOT NULL DEFAULT 0;","ALTER TABLE session_meta ADD COLUMN pinned INTEGER NOT NULL DEFAULT 0;"]},{version:2,name:"tasks.sort_order",statements:["ALTER TABLE tasks ADD COLUMN sort_order INTEGER NOT NULL DEFAULT 0;"]},{version:3,name:"session boards",statements:["CREATE TABLE IF NOT EXISTS boards (\n id TEXT PRIMARY KEY,\n project_key TEXT NOT NULL,\n name TEXT NOT NULL,\n is_system INTEGER NOT NULL DEFAULT 0,\n created INTEGER NOT NULL,\n updated INTEGER NOT NULL\n);","CREATE INDEX IF NOT EXISTS idx_boards_project ON boards(project_key);","CREATE TABLE IF NOT EXISTS board_nodes (\n id TEXT PRIMARY KEY,\n board_id TEXT NOT NULL,\n kind TEXT NOT NULL,\n ref_id TEXT,\n x REAL NOT NULL,\n y REAL NOT NULL,\n w REAL NOT NULL DEFAULT 0,\n h REAL NOT NULL DEFAULT 0,\n expanded INTEGER NOT NULL DEFAULT 0,\n props TEXT NOT NULL DEFAULT '{}',\n created INTEGER NOT NULL,\n updated INTEGER NOT NULL\n);","CREATE INDEX IF NOT EXISTS idx_board_nodes_board ON board_nodes(board_id);","CREATE TABLE IF NOT EXISTS board_edges (\n id TEXT PRIMARY KEY,\n board_id TEXT NOT NULL,\n from_id TEXT NOT NULL,\n to_id TEXT NOT NULL,\n label TEXT,\n color TEXT,\n dashed INTEGER NOT NULL DEFAULT 0,\n created INTEGER NOT NULL,\n updated INTEGER NOT NULL\n);","CREATE INDEX IF NOT EXISTS idx_board_edges_board ON board_edges(board_id);","CREATE TABLE IF NOT EXISTS board_view (\n board_id TEXT PRIMARY KEY,\n camera_x REAL NOT NULL DEFAULT 0,\n camera_y REAL NOT NULL DEFAULT 0,\n camera_z REAL NOT NULL DEFAULT 1,\n updated INTEGER NOT NULL\n);"]},{version:4,name:"boards.sort_order",statements:["ALTER TABLE boards ADD COLUMN sort_order INTEGER NOT NULL DEFAULT 0;"]},{version:5,name:"boards.task_id",statements:["ALTER TABLE boards ADD COLUMN task_id TEXT NULL;","CREATE INDEX IF NOT EXISTS idx_boards_task ON boards(task_id);"]},{version:6,name:"boards.task_id unique (防并发重复创建任务看板)",statements:["CREATE UNIQUE INDEX IF NOT EXISTS idx_boards_task_unique ON boards(task_id);"]},{version:7,name:"task cards",statements:["CREATE TABLE IF NOT EXISTS task_cards (\n id TEXT PRIMARY KEY,\n board_id TEXT NOT NULL,\n project_key TEXT NOT NULL,\n number INTEGER NOT NULL,\n name TEXT NOT NULL,\n description TEXT NOT NULL DEFAULT '',\n ready_status TEXT NOT NULL DEFAULT 'draft',\n exec_status TEXT NOT NULL DEFAULT 'not_started',\n priority INTEGER NOT NULL DEFAULT 0,\n due INTEGER,\n attachments TEXT NOT NULL DEFAULT '[]',\n cwd TEXT,\n use_worktree INTEGER NOT NULL DEFAULT 0,\n max_retries INTEGER NOT NULL DEFAULT 3,\n retry_count INTEGER NOT NULL DEFAULT 0,\n session_id TEXT,\n created INTEGER NOT NULL,\n updated INTEGER NOT NULL\n);","CREATE INDEX IF NOT EXISTS idx_task_cards_board ON task_cards(board_id);","CREATE INDEX IF NOT EXISTS idx_task_cards_project ON task_cards(project_key);","CREATE UNIQUE INDEX IF NOT EXISTS idx_task_cards_number ON task_cards(project_key, number);","CREATE INDEX IF NOT EXISTS idx_task_cards_status ON task_cards(ready_status, exec_status);","CREATE TABLE IF NOT EXISTS task_card_links (\n id TEXT PRIMARY KEY,\n card_id TEXT NOT NULL,\n target_card_id TEXT NOT NULL,\n kind TEXT NOT NULL,\n created INTEGER NOT NULL,\n UNIQUE(card_id, target_card_id, kind)\n);","CREATE INDEX IF NOT EXISTS idx_task_links_card ON task_card_links(card_id);","CREATE TABLE IF NOT EXISTS task_card_questions (\n id TEXT PRIMARY KEY,\n card_id TEXT NOT NULL,\n session_id TEXT NOT NULL,\n question TEXT NOT NULL,\n status TEXT NOT NULL DEFAULT 'pending',\n answer TEXT,\n created INTEGER NOT NULL,\n answered INTEGER\n);","CREATE INDEX IF NOT EXISTS idx_task_questions_status ON task_card_questions(status);"]},{version:8,name:"task_cards.dispatch_token (跨进程派发互斥锁)",statements:["ALTER TABLE task_cards ADD COLUMN dispatch_token TEXT NULL;"]},{version:9,name:"task_cards.owner + heartbeat (状态判定实例归属)",statements:["ALTER TABLE task_cards ADD COLUMN owner TEXT NULL;","ALTER TABLE task_cards ADD COLUMN heartbeat INTEGER NOT NULL DEFAULT 0;"]}]}};