cli-claw-kit 0.0.1

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 (295) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +245 -0
  3. package/config/default-groups.json +1 -0
  4. package/config/global-agents-md.template.md +37 -0
  5. package/config/mount-allowlist.json +11 -0
  6. package/container/Dockerfile +160 -0
  7. package/container/agent-runner/dist/.tsbuildinfo +1 -0
  8. package/container/agent-runner/dist/agent-definitions.js +22 -0
  9. package/container/agent-runner/dist/channel-prefixes.js +16 -0
  10. package/container/agent-runner/dist/codex-config.js +29 -0
  11. package/container/agent-runner/dist/image-detector.js +96 -0
  12. package/container/agent-runner/dist/index.js +2587 -0
  13. package/container/agent-runner/dist/mcp-tools.js +1076 -0
  14. package/container/agent-runner/dist/stream-event.types.js +5 -0
  15. package/container/agent-runner/dist/stream-processor.js +867 -0
  16. package/container/agent-runner/dist/types.js +6 -0
  17. package/container/agent-runner/dist/utils.js +115 -0
  18. package/container/agent-runner/package.json +36 -0
  19. package/container/agent-runner/prompts/security-rules.md +31 -0
  20. package/container/agent-runner/src/agent-definitions.ts +27 -0
  21. package/container/agent-runner/src/channel-prefixes.ts +16 -0
  22. package/container/agent-runner/src/codex-config.ts +40 -0
  23. package/container/agent-runner/src/image-detector.ts +116 -0
  24. package/container/agent-runner/src/index.ts +3107 -0
  25. package/container/agent-runner/src/mcp-tools.ts +1295 -0
  26. package/container/agent-runner/src/stream-event.types.ts +10 -0
  27. package/container/agent-runner/src/stream-processor.ts +932 -0
  28. package/container/agent-runner/src/types.ts +75 -0
  29. package/container/agent-runner/src/utils.ts +114 -0
  30. package/container/agent-runner/tsconfig.json +17 -0
  31. package/container/build.sh +28 -0
  32. package/container/entrypoint.sh +64 -0
  33. package/container/skills/agent-browser/SKILL.md +159 -0
  34. package/container/skills/install-skill/SKILL.md +64 -0
  35. package/container/skills/post-test-cleanup/SKILL.md +121 -0
  36. package/dist/.tsbuildinfo +1 -0
  37. package/dist/agent-output-parser.js +459 -0
  38. package/dist/app-root.js +52 -0
  39. package/dist/assistant-meta-footer.js +1 -0
  40. package/dist/auth.js +91 -0
  41. package/dist/billing.js +694 -0
  42. package/dist/channel-prefixes.js +16 -0
  43. package/dist/cli.js +86 -0
  44. package/dist/commands.js +79 -0
  45. package/dist/config.js +120 -0
  46. package/dist/container-runner.js +981 -0
  47. package/dist/daily-summary.js +210 -0
  48. package/dist/db.js +3683 -0
  49. package/dist/dingtalk.js +1347 -0
  50. package/dist/feishu-markdown-style.js +97 -0
  51. package/dist/feishu-streaming-card.js +1875 -0
  52. package/dist/feishu.js +1628 -0
  53. package/dist/file-manager.js +270 -0
  54. package/dist/group-queue.js +1070 -0
  55. package/dist/group-runtime.js +35 -0
  56. package/dist/host-workspace-cwd.js +85 -0
  57. package/dist/im-channel.js +384 -0
  58. package/dist/im-command-utils.js +142 -0
  59. package/dist/im-downloader.js +45 -0
  60. package/dist/im-manager.js +527 -0
  61. package/dist/im-utils.js +53 -0
  62. package/dist/image-detector.js +96 -0
  63. package/dist/index.js +5828 -0
  64. package/dist/logger.js +22 -0
  65. package/dist/mcp-utils.js +66 -0
  66. package/dist/message-attachments.js +69 -0
  67. package/dist/message-notifier.js +36 -0
  68. package/dist/middleware/auth.js +85 -0
  69. package/dist/mount-security.js +315 -0
  70. package/dist/permissions.js +67 -0
  71. package/dist/project-memory.js +6 -0
  72. package/dist/provider-pool.js +189 -0
  73. package/dist/qq.js +826 -0
  74. package/dist/reset-admin.js +42 -0
  75. package/dist/routes/admin.js +543 -0
  76. package/dist/routes/agent-definitions.js +241 -0
  77. package/dist/routes/agents.js +533 -0
  78. package/dist/routes/auth.js +675 -0
  79. package/dist/routes/billing.js +490 -0
  80. package/dist/routes/browse.js +210 -0
  81. package/dist/routes/bug-report.js +387 -0
  82. package/dist/routes/config.js +1868 -0
  83. package/dist/routes/files.js +671 -0
  84. package/dist/routes/groups.js +1367 -0
  85. package/dist/routes/mcp-servers.js +320 -0
  86. package/dist/routes/memory.js +523 -0
  87. package/dist/routes/monitor.js +307 -0
  88. package/dist/routes/skills.js +777 -0
  89. package/dist/routes/tasks.js +509 -0
  90. package/dist/routes/usage.js +64 -0
  91. package/dist/routes/workspace-config.js +458 -0
  92. package/dist/runtime-build.js +112 -0
  93. package/dist/runtime-command-handler.js +189 -0
  94. package/dist/runtime-command-registry.js +1 -0
  95. package/dist/runtime-config.js +1777 -0
  96. package/dist/runtime-identity.js +52 -0
  97. package/dist/schemas.js +590 -0
  98. package/dist/script-runner.js +64 -0
  99. package/dist/sdk-query.js +82 -0
  100. package/dist/skill-utils.js +145 -0
  101. package/dist/sqlite-compat.js +19 -0
  102. package/dist/stream-event.types.js +5 -0
  103. package/dist/streaming-runtime-meta.js +29 -0
  104. package/dist/task-scheduler.js +695 -0
  105. package/dist/task-utils.js +13 -0
  106. package/dist/telegram-pairing.js +59 -0
  107. package/dist/telegram.js +897 -0
  108. package/dist/terminal-manager.js +307 -0
  109. package/dist/tool-step-display.js +1 -0
  110. package/dist/types.js +1 -0
  111. package/dist/utils.js +85 -0
  112. package/dist/web-context.js +161 -0
  113. package/dist/web.js +1377 -0
  114. package/dist/wechat-crypto.js +182 -0
  115. package/dist/wechat.js +589 -0
  116. package/dist/workspace-runtime-reset.js +35 -0
  117. package/package.json +107 -0
  118. package/shared/assistant-meta-footer.ts +127 -0
  119. package/shared/channel-prefixes.ts +16 -0
  120. package/shared/dist/assistant-meta-footer.d.ts +29 -0
  121. package/shared/dist/assistant-meta-footer.js +85 -0
  122. package/shared/dist/channel-prefixes.d.ts +4 -0
  123. package/shared/dist/channel-prefixes.js +16 -0
  124. package/shared/dist/image-detector.d.ts +20 -0
  125. package/shared/dist/image-detector.js +96 -0
  126. package/shared/dist/runtime-command-registry.d.ts +38 -0
  127. package/shared/dist/runtime-command-registry.js +185 -0
  128. package/shared/dist/stream-event.d.ts +65 -0
  129. package/shared/dist/stream-event.js +8 -0
  130. package/shared/dist/tool-step-display.d.ts +4 -0
  131. package/shared/dist/tool-step-display.js +11 -0
  132. package/shared/image-detector.ts +116 -0
  133. package/shared/runtime-command-registry.ts +252 -0
  134. package/shared/stream-event.ts +67 -0
  135. package/shared/tool-step-display.ts +21 -0
  136. package/shared/tsconfig.json +24 -0
  137. package/web/dist/assets/BillingPage-B1wBR_o-.js +52 -0
  138. package/web/dist/assets/ChatPage-6GBZ9nXN.css +32 -0
  139. package/web/dist/assets/ChatPage-BOJcXtaj.js +161 -0
  140. package/web/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  141. package/web/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  142. package/web/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  143. package/web/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  144. package/web/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  145. package/web/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  146. package/web/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  147. package/web/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  148. package/web/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  149. package/web/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  150. package/web/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  151. package/web/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  152. package/web/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  153. package/web/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  154. package/web/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  155. package/web/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  156. package/web/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  157. package/web/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  158. package/web/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  159. package/web/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  160. package/web/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  161. package/web/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  162. package/web/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  163. package/web/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  164. package/web/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  165. package/web/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  166. package/web/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  167. package/web/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  168. package/web/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  169. package/web/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  170. package/web/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  171. package/web/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  172. package/web/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  173. package/web/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  174. package/web/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  175. package/web/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  176. package/web/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  177. package/web/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  178. package/web/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  179. package/web/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  180. package/web/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  181. package/web/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  182. package/web/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  183. package/web/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  184. package/web/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  185. package/web/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  186. package/web/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  187. package/web/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  188. package/web/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  189. package/web/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  190. package/web/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  191. package/web/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  192. package/web/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  193. package/web/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  194. package/web/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  195. package/web/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  196. package/web/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  197. package/web/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  198. package/web/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  199. package/web/dist/assets/SettingsPage-DoY7FoZ_.js +153 -0
  200. package/web/dist/assets/ShareImageDialog-C1ga8b7l.js +22 -0
  201. package/web/dist/assets/TasksPage-CRivnNsx.js +14 -0
  202. package/web/dist/assets/_basePickBy-Bf-bSoS9.js +1 -0
  203. package/web/dist/assets/_baseUniq-zAOaCuKw.js +1 -0
  204. package/web/dist/assets/arc-Dm9mVQ9U.js +1 -0
  205. package/web/dist/assets/architectureDiagram-2XIMDMQ5-BLmzX1wr.js +36 -0
  206. package/web/dist/assets/band-CquvqAHh.js +1 -0
  207. package/web/dist/assets/blockDiagram-WCTKOSBZ-B9pcqm3j.js +132 -0
  208. package/web/dist/assets/c4Diagram-IC4MRINW-Cytx1q3b.js +10 -0
  209. package/web/dist/assets/channel-BOVj73LR.js +1 -0
  210. package/web/dist/assets/channel-meta-CQD0Pei-.js +41 -0
  211. package/web/dist/assets/chunk-4BX2VUAB-0ToDr6RE.js +1 -0
  212. package/web/dist/assets/chunk-55IACEB6-DQDjnXfS.js +1 -0
  213. package/web/dist/assets/chunk-FMBD7UC4-Di8ABm6c.js +15 -0
  214. package/web/dist/assets/chunk-JSJVCQXG-BZQN6rnX.js +1 -0
  215. package/web/dist/assets/chunk-KX2RTZJC-zBbcpaN_.js +1 -0
  216. package/web/dist/assets/chunk-NQ4KR5QH-BCrLoU88.js +220 -0
  217. package/web/dist/assets/chunk-QZHKN3VN-Bqk8juan.js +1 -0
  218. package/web/dist/assets/chunk-WL4C6EOR-D2YX-MHY.js +189 -0
  219. package/web/dist/assets/classDiagram-VBA2DB6C-DUUoMyaK.js +1 -0
  220. package/web/dist/assets/classDiagram-v2-RAHNMMFH-DUUoMyaK.js +1 -0
  221. package/web/dist/assets/clone-BmaCesfa.js +1 -0
  222. package/web/dist/assets/cose-bilkent-S5V4N54A-CTsv6qQA.js +1 -0
  223. package/web/dist/assets/cytoscape.esm-BQaXIfA_.js +331 -0
  224. package/web/dist/assets/dagre-KLK3FWXG-Ci4Jh9nu.js +4 -0
  225. package/web/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  226. package/web/dist/assets/diagram-E7M64L7V-BFRnfTI2.js +24 -0
  227. package/web/dist/assets/diagram-IFDJBPK2-B7Zhnp0b.js +43 -0
  228. package/web/dist/assets/diagram-P4PSJMXO-BVyP7nwq.js +24 -0
  229. package/web/dist/assets/erDiagram-INFDFZHY-NorKdTOF.js +70 -0
  230. package/web/dist/assets/error-CGD5mp5f.js +1 -0
  231. package/web/dist/assets/flowDiagram-PKNHOUZH-Ch97nABF.js +162 -0
  232. package/web/dist/assets/ganttDiagram-A5KZAMGK-BQ2pLWsy.js +292 -0
  233. package/web/dist/assets/gitGraphDiagram-K3NZZRJ6-bcvnBsD2.js +65 -0
  234. package/web/dist/assets/graph-CeAEckur.js +1 -0
  235. package/web/dist/assets/index-CPnL1_qC.js +768 -0
  236. package/web/dist/assets/index-DVevCbcO.css +10 -0
  237. package/web/dist/assets/infoDiagram-LFFYTUFH-CcsrFdj-.js +2 -0
  238. package/web/dist/assets/init-Dmth1JHB.js +1 -0
  239. package/web/dist/assets/ishikawaDiagram-PHBUUO56-1upyMfHN.js +70 -0
  240. package/web/dist/assets/journeyDiagram-4ABVD52K-CKUi-V0c.js +139 -0
  241. package/web/dist/assets/kanban-definition-K7BYSVSG-DOnQwXfL.js +89 -0
  242. package/web/dist/assets/layout-BmMMqTnJ.js +1 -0
  243. package/web/dist/assets/linear-DiaJloY5.js +1 -0
  244. package/web/dist/assets/mermaid.core-BWLV1B2v.js +254 -0
  245. package/web/dist/assets/mindmap-definition-YRQLILUH-BeAKHVWP.js +68 -0
  246. package/web/dist/assets/ordinal-DILIJJjt.js +1 -0
  247. package/web/dist/assets/pieDiagram-SKSYHLDU-DfiMSfWo.js +30 -0
  248. package/web/dist/assets/quadrantDiagram-337W2JSQ-wZxZOJxd.js +7 -0
  249. package/web/dist/assets/requirementDiagram-Z7DCOOCP-BK4HHm17.js +73 -0
  250. package/web/dist/assets/sankeyDiagram-WA2Y5GQK-BX6t2avX.js +10 -0
  251. package/web/dist/assets/sequenceDiagram-2WXFIKYE-BPQlkbAa.js +145 -0
  252. package/web/dist/assets/sheet-rI0FfB1g.js +6 -0
  253. package/web/dist/assets/sliders-horizontal-CuijWFNK.js +6 -0
  254. package/web/dist/assets/sparkles-BsMYXJoT.js +11 -0
  255. package/web/dist/assets/square-0CqMX1Q3.js +11 -0
  256. package/web/dist/assets/stateDiagram-RAJIS63D-DxkV0Vwd.js +1 -0
  257. package/web/dist/assets/stateDiagram-v2-FVOUBMTO-qLYoiOPe.js +1 -0
  258. package/web/dist/assets/step-D51IIHGA.js +1 -0
  259. package/web/dist/assets/tasks-D8JjBTwx.js +1 -0
  260. package/web/dist/assets/time-O8zIGux3.js +1 -0
  261. package/web/dist/assets/timeline-definition-YZTLITO2-kNp1DyFc.js +61 -0
  262. package/web/dist/assets/treemap-KZPCXAKY-CkrClVhk.js +162 -0
  263. package/web/dist/assets/utils-KGAn0XTg.js +11 -0
  264. package/web/dist/assets/vennDiagram-LZ73GAT5-CgdzEZz4.js +34 -0
  265. package/web/dist/assets/xychartDiagram-JWTSCODW-DfYGPfNB.js +7 -0
  266. package/web/dist/assets/zap-_hKJYy7J.js +6 -0
  267. package/web/dist/favicon.svg +332 -0
  268. package/web/dist/fonts/AlibabaPuHuiTi-3-55-Regular.woff2 +0 -0
  269. package/web/dist/fonts/AlibabaPuHuiTi-3-65-Medium.woff2 +0 -0
  270. package/web/dist/fonts/AlibabaPuHuiTi-3-75-SemiBold.woff2 +0 -0
  271. package/web/dist/fonts/DMSans-latin-ext.woff2 +0 -0
  272. package/web/dist/fonts/DMSans-latin.woff2 +0 -0
  273. package/web/dist/icons/README.md +20 -0
  274. package/web/dist/icons/apple-touch-icon-180.png +0 -0
  275. package/web/dist/icons/icon-128.png +0 -0
  276. package/web/dist/icons/icon-144.png +0 -0
  277. package/web/dist/icons/icon-152.png +0 -0
  278. package/web/dist/icons/icon-192.png +0 -0
  279. package/web/dist/icons/icon-192.svg +332 -0
  280. package/web/dist/icons/icon-384.png +0 -0
  281. package/web/dist/icons/icon-48.png +0 -0
  282. package/web/dist/icons/icon-512-maskable.png +0 -0
  283. package/web/dist/icons/icon-512.png +0 -0
  284. package/web/dist/icons/icon-512.svg +332 -0
  285. package/web/dist/icons/icon-72.png +0 -0
  286. package/web/dist/icons/icon-96.png +0 -0
  287. package/web/dist/icons/loading-logo.svg +332 -0
  288. package/web/dist/icons/logo-1024.png +0 -0
  289. package/web/dist/icons/logo-icon.svg +332 -0
  290. package/web/dist/icons/logo-text.svg +332 -0
  291. package/web/dist/index.html +30 -0
  292. package/web/dist/manifest.webmanifest +1 -0
  293. package/web/dist/registerSW.js +1 -0
  294. package/web/dist/sw.js +1 -0
  295. package/web/dist/workbox-08d6266a.js +1 -0
@@ -0,0 +1,292 @@
1
+ import{g as ze,s as Ve,q as Re,p as He,a as qe,b as Be,_ as c,c as dt,d as Tt,e as Ge,av as j,l as ot,k as je,j as Xe,y as Ue,u as Ze}from"./mermaid.core-BWLV1B2v.js";import{G as Ft}from"./index-CPnL1_qC.js";import{t as Qe,m as Ke,a as Je,b as se,c as ae,d as tr,e as er,f as rr,g as ir,h as nr,i as sr,j as ar,k as oe,l as ce,n as le,s as ue,o as de}from"./time-O8zIGux3.js";import{l as or}from"./linear-DiaJloY5.js";import{R as xe,r as cr,o as Te,q as be,C as we,u as Lt,v as lr}from"./step-D51IIHGA.js";import"./init-Dmth1JHB.js";import"./defaultLocale-DX6XiGOO.js";function ur(t){return t}var wt=1,Ot=2,Rt=3,bt=4,fe=1e-6;function dr(t){return"translate("+t+",0)"}function fr(t){return"translate(0,"+t+")"}function hr(t){return r=>+t(r)}function mr(t,r){return r=Math.max(0,t.bandwidth()-r*2)/2,t.round()&&(r=Math.round(r)),i=>+t(i)+r}function kr(){return!this.__axis}function _e(t,r){var i=[],n=null,a=null,f=6,d=6,T=3,E=typeof window<"u"&&window.devicePixelRatio>1?0:.5,A=t===wt||t===bt?-1:1,b=t===bt||t===Ot?"x":"y",L=t===wt||t===Rt?dr:fr;function S(D){var V=n??(r.ticks?r.ticks.apply(r,i):r.domain()),I=a??(r.tickFormat?r.tickFormat.apply(r,i):ur),C=Math.max(f,0)+T,M=r.range(),W=+M[0]+E,Y=+M[M.length-1]+E,R=(r.bandwidth?mr:hr)(r.copy(),E),H=D.selection?D.selection():D,$=H.selectAll(".domain").data([null]),p=H.selectAll(".tick").data(V,r).order(),h=p.exit(),u=p.enter().append("g").attr("class","tick"),x=p.select("line"),v=p.select("text");$=$.merge($.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),p=p.merge(u),x=x.merge(u.append("line").attr("stroke","currentColor").attr(b+"2",A*f)),v=v.merge(u.append("text").attr("fill","currentColor").attr(b,A*C).attr("dy",t===wt?"0em":t===Rt?"0.71em":"0.32em")),D!==H&&($=$.transition(D),p=p.transition(D),x=x.transition(D),v=v.transition(D),h=h.transition(D).attr("opacity",fe).attr("transform",function(k){return isFinite(k=R(k))?L(k+E):this.getAttribute("transform")}),u.attr("opacity",fe).attr("transform",function(k){var m=this.parentNode.__axis;return L((m&&isFinite(m=m(k))?m:R(k))+E)})),h.remove(),$.attr("d",t===bt||t===Ot?d?"M"+A*d+","+W+"H"+E+"V"+Y+"H"+A*d:"M"+E+","+W+"V"+Y:d?"M"+W+","+A*d+"V"+E+"H"+Y+"V"+A*d:"M"+W+","+E+"H"+Y),p.attr("opacity",1).attr("transform",function(k){return L(R(k)+E)}),x.attr(b+"2",A*f),v.attr(b,A*C).text(I),H.filter(kr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Ot?"start":t===bt?"end":"middle"),H.each(function(){this.__axis=R})}return S.scale=function(D){return arguments.length?(r=D,S):r},S.ticks=function(){return i=Array.from(arguments),S},S.tickArguments=function(D){return arguments.length?(i=D==null?[]:Array.from(D),S):i.slice()},S.tickValues=function(D){return arguments.length?(n=D==null?null:Array.from(D),S):n&&n.slice()},S.tickFormat=function(D){return arguments.length?(a=D,S):a},S.tickSize=function(D){return arguments.length?(f=d=+D,S):f},S.tickSizeInner=function(D){return arguments.length?(f=+D,S):f},S.tickSizeOuter=function(D){return arguments.length?(d=+D,S):d},S.tickPadding=function(D){return arguments.length?(T=+D,S):T},S.offset=function(D){return arguments.length?(E=+D,S):E},S}function yr(t){return _e(wt,t)}function gr(t){return _e(Rt,t)}const pr=Math.PI/180,vr=180/Math.PI,It=18,De=.96422,Ce=1,Se=.82521,Me=4/29,ft=6/29,Ee=3*ft*ft,xr=ft*ft*ft;function Ie(t){if(t instanceof et)return new et(t.l,t.a,t.b,t.opacity);if(t instanceof it)return $e(t);t instanceof xe||(t=cr(t));var r=zt(t.r),i=zt(t.g),n=zt(t.b),a=Wt((.2225045*r+.7168786*i+.0606169*n)/Ce),f,d;return r===i&&i===n?f=d=a:(f=Wt((.4360747*r+.3850649*i+.1430804*n)/De),d=Wt((.0139322*r+.0971045*i+.7141733*n)/Se)),new et(116*a-16,500*(f-a),200*(a-d),t.opacity)}function Tr(t,r,i,n){return arguments.length===1?Ie(t):new et(t,r,i,n??1)}function et(t,r,i,n){this.l=+t,this.a=+r,this.b=+i,this.opacity=+n}Te(et,Tr,be(we,{brighter(t){return new et(this.l+It*(t??1),this.a,this.b,this.opacity)},darker(t){return new et(this.l-It*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,r=isNaN(this.a)?t:t+this.a/500,i=isNaN(this.b)?t:t-this.b/200;return r=De*Pt(r),t=Ce*Pt(t),i=Se*Pt(i),new xe(Nt(3.1338561*r-1.6168667*t-.4906146*i),Nt(-.9787684*r+1.9161415*t+.033454*i),Nt(.0719453*r-.2289914*t+1.4052427*i),this.opacity)}}));function Wt(t){return t>xr?Math.pow(t,1/3):t/Ee+Me}function Pt(t){return t>ft?t*t*t:Ee*(t-Me)}function Nt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function zt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function br(t){if(t instanceof it)return new it(t.h,t.c,t.l,t.opacity);if(t instanceof et||(t=Ie(t)),t.a===0&&t.b===0)return new it(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var r=Math.atan2(t.b,t.a)*vr;return new it(r<0?r+360:r,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Ht(t,r,i,n){return arguments.length===1?br(t):new it(t,r,i,n??1)}function it(t,r,i,n){this.h=+t,this.c=+r,this.l=+i,this.opacity=+n}function $e(t){if(isNaN(t.h))return new et(t.l,0,0,t.opacity);var r=t.h*pr;return new et(t.l,Math.cos(r)*t.c,Math.sin(r)*t.c,t.opacity)}Te(it,Ht,be(we,{brighter(t){return new it(this.h,this.c,this.l+It*(t??1),this.opacity)},darker(t){return new it(this.h,this.c,this.l-It*(t??1),this.opacity)},rgb(){return $e(this).rgb()}}));function wr(t){return function(r,i){var n=t((r=Ht(r)).h,(i=Ht(i)).h),a=Lt(r.c,i.c),f=Lt(r.l,i.l),d=Lt(r.opacity,i.opacity);return function(T){return r.h=n(T),r.c=a(T),r.l=f(T),r.opacity=d(T),r+""}}}const _r=wr(lr);var _t={exports:{}},Dr=_t.exports,he;function Cr(){return he||(he=1,(function(t,r){(function(i,n){t.exports=n()})(Dr,(function(){var i="day";return function(n,a,f){var d=function(A){return A.add(4-A.isoWeekday(),i)},T=a.prototype;T.isoWeekYear=function(){return d(this).year()},T.isoWeek=function(A){if(!this.$utils().u(A))return this.add(7*(A-this.isoWeek()),i);var b,L,S,D,V=d(this),I=(b=this.isoWeekYear(),L=this.$u,S=(L?f.utc:f)().year(b).startOf("year"),D=4-S.isoWeekday(),S.isoWeekday()>4&&(D+=7),S.add(D,i));return V.diff(I,"week")+1},T.isoWeekday=function(A){return this.$utils().u(A)?this.day()||7:this.day(this.day()%7?A:A-7)};var E=T.startOf;T.startOf=function(A,b){var L=this.$utils(),S=!!L.u(b)||b;return L.p(A)==="isoweek"?S?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):E.bind(this)(A,b)}}}))})(_t)),_t.exports}var Sr=Cr();const Mr=Ft(Sr);var Dt={exports:{}},Er=Dt.exports,me;function Ir(){return me||(me=1,(function(t,r){(function(i,n){t.exports=n()})(Er,(function(){var i={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"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,f=/\d\d/,d=/\d\d?/,T=/\d*[^-_:/,()\s\d]+/,E={},A=function(C){return(C=+C)+(C>68?1900:2e3)},b=function(C){return function(M){this[C]=+M}},L=[/[+-]\d\d:?(\d\d)?|Z/,function(C){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var W=M.match(/([+-]|\d\d)/g),Y=60*W[1]+(+W[2]||0);return Y===0?0:W[0]==="+"?-Y:Y})(C)}],S=function(C){var M=E[C];return M&&(M.indexOf?M:M.s.concat(M.f))},D=function(C,M){var W,Y=E.meridiem;if(Y){for(var R=1;R<=24;R+=1)if(C.indexOf(Y(R,0,M))>-1){W=R>12;break}}else W=C===(M?"pm":"PM");return W},V={A:[T,function(C){this.afternoon=D(C,!1)}],a:[T,function(C){this.afternoon=D(C,!0)}],Q:[a,function(C){this.month=3*(C-1)+1}],S:[a,function(C){this.milliseconds=100*+C}],SS:[f,function(C){this.milliseconds=10*+C}],SSS:[/\d{3}/,function(C){this.milliseconds=+C}],s:[d,b("seconds")],ss:[d,b("seconds")],m:[d,b("minutes")],mm:[d,b("minutes")],H:[d,b("hours")],h:[d,b("hours")],HH:[d,b("hours")],hh:[d,b("hours")],D:[d,b("day")],DD:[f,b("day")],Do:[T,function(C){var M=E.ordinal,W=C.match(/\d+/);if(this.day=W[0],M)for(var Y=1;Y<=31;Y+=1)M(Y).replace(/\[|\]/g,"")===C&&(this.day=Y)}],w:[d,b("week")],ww:[f,b("week")],M:[d,b("month")],MM:[f,b("month")],MMM:[T,function(C){var M=S("months"),W=(S("monthsShort")||M.map((function(Y){return Y.slice(0,3)}))).indexOf(C)+1;if(W<1)throw new Error;this.month=W%12||W}],MMMM:[T,function(C){var M=S("months").indexOf(C)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,b("year")],YY:[f,function(C){this.year=A(C)}],YYYY:[/\d{4}/,b("year")],Z:L,ZZ:L};function I(C){var M,W;M=C,W=E&&E.formats;for(var Y=(C=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,v,k){var m=k&&k.toUpperCase();return v||W[k]||i[k]||W[m].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(o,l,y){return l||y.slice(1)}))}))).match(n),R=Y.length,H=0;H<R;H+=1){var $=Y[H],p=V[$],h=p&&p[0],u=p&&p[1];Y[H]=u?{regex:h,parser:u}:$.replace(/^\[|\]$/g,"")}return function(x){for(var v={},k=0,m=0;k<R;k+=1){var o=Y[k];if(typeof o=="string")m+=o.length;else{var l=o.regex,y=o.parser,g=x.slice(m),w=l.exec(g)[0];y.call(v,w),x=x.replace(w,"")}}return(function(s){var z=s.afternoon;if(z!==void 0){var e=s.hours;z?e<12&&(s.hours+=12):e===12&&(s.hours=0),delete s.afternoon}})(v),v}}return function(C,M,W){W.p.customParseFormat=!0,C&&C.parseTwoDigitYear&&(A=C.parseTwoDigitYear);var Y=M.prototype,R=Y.parse;Y.parse=function(H){var $=H.date,p=H.utc,h=H.args;this.$u=p;var u=h[1];if(typeof u=="string"){var x=h[2]===!0,v=h[3]===!0,k=x||v,m=h[2];v&&(m=h[2]),E=this.$locale(),!x&&m&&(E=W.Ls[m]),this.$d=(function(g,w,s,z){try{if(["x","X"].indexOf(w)>-1)return new Date((w==="X"?1e3:1)*g);var e=I(w)(g),_=e.year,N=e.month,P=e.day,O=e.hours,G=e.minutes,F=e.seconds,Q=e.milliseconds,nt=e.zone,lt=e.week,kt=new Date,yt=P||(_||N?1:kt.getDate()),ut=_||kt.getFullYear(),q=0;_&&!N||(q=N>0?N-1:kt.getMonth());var Z,X=O||0,at=G||0,K=F||0,st=Q||0;return nt?new Date(Date.UTC(ut,q,yt,X,at,K,st+60*nt.offset*1e3)):s?new Date(Date.UTC(ut,q,yt,X,at,K,st)):(Z=new Date(ut,q,yt,X,at,K,st),lt&&(Z=z(Z).week(lt).toDate()),Z)}catch{return new Date("")}})($,u,p,W),this.init(),m&&m!==!0&&(this.$L=this.locale(m).$L),k&&$!=this.format(u)&&(this.$d=new Date("")),E={}}else if(u instanceof Array)for(var o=u.length,l=1;l<=o;l+=1){h[1]=u[l-1];var y=W.apply(this,h);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}l===o&&(this.$d=new Date(""))}else R.call(this,H)}}}))})(Dt)),Dt.exports}var $r=Ir();const Ar=Ft($r);var Ct={exports:{}},Fr=Ct.exports,ke;function Yr(){return ke||(ke=1,(function(t,r){(function(i,n){t.exports=n()})(Fr,(function(){return function(i,n){var a=n.prototype,f=a.format;a.format=function(d){var T=this,E=this.$locale();if(!this.isValid())return f.bind(this)(d);var A=this.$utils(),b=(d||"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(L){switch(L){case"Q":return Math.ceil((T.$M+1)/3);case"Do":return E.ordinal(T.$D);case"gggg":return T.weekYear();case"GGGG":return T.isoWeekYear();case"wo":return E.ordinal(T.week(),"W");case"w":case"ww":return A.s(T.week(),L==="w"?1:2,"0");case"W":case"WW":return A.s(T.isoWeek(),L==="W"?1:2,"0");case"k":case"kk":return A.s(String(T.$H===0?24:T.$H),L==="k"?1:2,"0");case"X":return Math.floor(T.$d.getTime()/1e3);case"x":return T.$d.getTime();case"z":return"["+T.offsetName()+"]";case"zzz":return"["+T.offsetName("long")+"]";default:return L}}));return f.bind(this)(b)}}}))})(Ct)),Ct.exports}var Lr=Yr();const Or=Ft(Lr);var St={exports:{}},Wr=St.exports,ye;function Pr(){return ye||(ye=1,(function(t,r){(function(i,n){t.exports=n()})(Wr,(function(){var i,n,a=1e3,f=6e4,d=36e5,T=864e5,E=/\[([^\]]+)]|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,A=31536e6,b=2628e6,L=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,S={years:A,months:b,days:T,hours:d,minutes:f,seconds:a,milliseconds:1,weeks:6048e5},D=function($){return $ instanceof R},V=function($,p,h){return new R($,h,p.$l)},I=function($){return n.p($)+"s"},C=function($){return $<0},M=function($){return C($)?Math.ceil($):Math.floor($)},W=function($){return Math.abs($)},Y=function($,p){return $?C($)?{negative:!0,format:""+W($)+p}:{negative:!1,format:""+$+p}:{negative:!1,format:""}},R=(function(){function $(h,u,x){var v=this;if(this.$d={},this.$l=x,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),u)return V(h*S[I(u)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(o){v.$d[I(o)]=h[o]})),this.calMilliseconds(),this;if(typeof h=="string"){var k=h.match(L);if(k){var m=k.slice(2).map((function(o){return o!=null?Number(o):0}));return this.$d.years=m[0],this.$d.months=m[1],this.$d.weeks=m[2],this.$d.days=m[3],this.$d.hours=m[4],this.$d.minutes=m[5],this.$d.seconds=m[6],this.calMilliseconds(),this}}return this}var p=$.prototype;return p.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(u,x){return u+(h.$d[x]||0)*S[x]}),0)},p.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/A),h%=A,this.$d.months=M(h/b),h%=b,this.$d.days=M(h/T),h%=T,this.$d.hours=M(h/d),h%=d,this.$d.minutes=M(h/f),h%=f,this.$d.seconds=M(h/a),h%=a,this.$d.milliseconds=h},p.toISOString=function(){var h=Y(this.$d.years,"Y"),u=Y(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var v=Y(x,"D"),k=Y(this.$d.hours,"H"),m=Y(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var l=Y(o,"S"),y=h.negative||u.negative||v.negative||k.negative||m.negative||l.negative,g=k.format||m.format||l.format?"T":"",w=(y?"-":"")+"P"+h.format+u.format+v.format+g+k.format+m.format+l.format;return w==="P"||w==="-P"?"P0D":w},p.toJSON=function(){return this.toISOString()},p.format=function(h){var u=h||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return u.replace(E,(function(v,k){return k||String(x[v])}))},p.as=function(h){return this.$ms/S[I(h)]},p.get=function(h){var u=this.$ms,x=I(h);return x==="milliseconds"?u%=1e3:u=x==="weeks"?M(u/S[x]):this.$d[x],u||0},p.add=function(h,u,x){var v;return v=u?h*S[I(u)]:D(h)?h.$ms:V(h,this).$ms,V(this.$ms+v*(x?-1:1),this)},p.subtract=function(h,u){return this.add(h,u,!0)},p.locale=function(h){var u=this.clone();return u.$l=h,u},p.clone=function(){return V(this.$ms,this)},p.humanize=function(h){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},$})(),H=function($,p,h){return $.add(p.years()*h,"y").add(p.months()*h,"M").add(p.days()*h,"d").add(p.hours()*h,"h").add(p.minutes()*h,"m").add(p.seconds()*h,"s").add(p.milliseconds()*h,"ms")};return function($,p,h){i=h,n=h().$utils(),h.duration=function(v,k){var m=h.locale();return V(v,{$l:m},k)},h.isDuration=D;var u=p.prototype.add,x=p.prototype.subtract;p.prototype.add=function(v,k){return D(v)?H(this,v,1):u.bind(this)(v,k)},p.prototype.subtract=function(v,k){return D(v)?H(this,v,-1):x.bind(this)(v,k)}}}))})(St)),St.exports}var Nr=Pr();const zr=Ft(Nr);var qt=(function(){var t=c(function(m,o,l,y){for(l=l||{},y=m.length;y--;l[m[y]]=o);return l},"o"),r=[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],i=[1,26],n=[1,27],a=[1,28],f=[1,29],d=[1,30],T=[1,31],E=[1,32],A=[1,33],b=[1,34],L=[1,9],S=[1,10],D=[1,11],V=[1,12],I=[1,13],C=[1,14],M=[1,15],W=[1,16],Y=[1,19],R=[1,20],H=[1,21],$=[1,22],p=[1,23],h=[1,25],u=[1,35],x={trace:c(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:c(function(o,l,y,g,w,s,z){var e=s.length-1;switch(w){case 1:return s[e-1];case 2:this.$=[];break;case 3:s[e-1].push(s[e]),this.$=s[e-1];break;case 4:case 5:this.$=s[e];break;case 6:case 7:this.$=[];break;case 8:g.setWeekday("monday");break;case 9:g.setWeekday("tuesday");break;case 10:g.setWeekday("wednesday");break;case 11:g.setWeekday("thursday");break;case 12:g.setWeekday("friday");break;case 13:g.setWeekday("saturday");break;case 14:g.setWeekday("sunday");break;case 15:g.setWeekend("friday");break;case 16:g.setWeekend("saturday");break;case 17:g.setDateFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 18:g.enableInclusiveEndDates(),this.$=s[e].substr(18);break;case 19:g.TopAxis(),this.$=s[e].substr(8);break;case 20:g.setAxisFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 21:g.setTickInterval(s[e].substr(13)),this.$=s[e].substr(13);break;case 22:g.setExcludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 23:g.setIncludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 24:g.setTodayMarker(s[e].substr(12)),this.$=s[e].substr(12);break;case 27:g.setDiagramTitle(s[e].substr(6)),this.$=s[e].substr(6);break;case 28:this.$=s[e].trim(),g.setAccTitle(this.$);break;case 29:case 30:this.$=s[e].trim(),g.setAccDescription(this.$);break;case 31:g.addSection(s[e].substr(8)),this.$=s[e].substr(8);break;case 33:g.addTask(s[e-1],s[e]),this.$="task";break;case 34:this.$=s[e-1],g.setClickEvent(s[e-1],s[e],null);break;case 35:this.$=s[e-2],g.setClickEvent(s[e-2],s[e-1],s[e]);break;case 36:this.$=s[e-2],g.setClickEvent(s[e-2],s[e-1],null),g.setLink(s[e-2],s[e]);break;case 37:this.$=s[e-3],g.setClickEvent(s[e-3],s[e-2],s[e-1]),g.setLink(s[e-3],s[e]);break;case 38:this.$=s[e-2],g.setClickEvent(s[e-2],s[e],null),g.setLink(s[e-2],s[e-1]);break;case 39:this.$=s[e-3],g.setClickEvent(s[e-3],s[e-1],s[e]),g.setLink(s[e-3],s[e-2]);break;case 40:this.$=s[e-1],g.setLink(s[e-1],s[e]);break;case 41:case 47:this.$=s[e-1]+" "+s[e];break;case 42:case 43:case 45:this.$=s[e-2]+" "+s[e-1]+" "+s[e];break;case 44:case 46:this.$=s[e-3]+" "+s[e-2]+" "+s[e-1]+" "+s[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:n,14:a,15:f,16:d,17:T,18:E,19:18,20:A,21:b,22:L,23:S,24:D,25:V,26:I,27:C,28:M,29:W,30:Y,31:R,33:H,35:$,36:p,37:24,38:h,40:u},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:i,13:n,14:a,15:f,16:d,17:T,18:E,19:18,20:A,21:b,22:L,23:S,24:D,25:V,26:I,27:C,28:M,29:W,30:Y,31:R,33:H,35:$,36:p,37:24,38:h,40:u},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:c(function(o,l){if(l.recoverable)this.trace(o);else{var y=new Error(o);throw y.hash=l,y}},"parseError"),parse:c(function(o){var l=this,y=[0],g=[],w=[null],s=[],z=this.table,e="",_=0,N=0,P=2,O=1,G=s.slice.call(arguments,1),F=Object.create(this.lexer),Q={yy:{}};for(var nt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,nt)&&(Q.yy[nt]=this.yy[nt]);F.setInput(o,Q.yy),Q.yy.lexer=F,Q.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var lt=F.yylloc;s.push(lt);var kt=F.options&&F.options.ranges;typeof Q.yy.parseError=="function"?this.parseError=Q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(U){y.length=y.length-2*U,w.length=w.length-U,s.length=s.length-U}c(yt,"popStack");function ut(){var U;return U=g.pop()||F.lex()||O,typeof U!="number"&&(U instanceof Array&&(g=U,U=g.pop()),U=l.symbols_[U]||U),U}c(ut,"lex");for(var q,Z,X,at,K={},st,J,ne,xt;;){if(Z=y[y.length-1],this.defaultActions[Z]?X=this.defaultActions[Z]:((q===null||typeof q>"u")&&(q=ut()),X=z[Z]&&z[Z][q]),typeof X>"u"||!X.length||!X[0]){var Yt="";xt=[];for(st in z[Z])this.terminals_[st]&&st>P&&xt.push("'"+this.terminals_[st]+"'");F.showPosition?Yt="Parse error on line "+(_+1)+`:
2
+ `+F.showPosition()+`
3
+ Expecting `+xt.join(", ")+", got '"+(this.terminals_[q]||q)+"'":Yt="Parse error on line "+(_+1)+": Unexpected "+(q==O?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(Yt,{text:F.match,token:this.terminals_[q]||q,line:F.yylineno,loc:lt,expected:xt})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+q);switch(X[0]){case 1:y.push(q),w.push(F.yytext),s.push(F.yylloc),y.push(X[1]),q=null,N=F.yyleng,e=F.yytext,_=F.yylineno,lt=F.yylloc;break;case 2:if(J=this.productions_[X[1]][1],K.$=w[w.length-J],K._$={first_line:s[s.length-(J||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(J||1)].first_column,last_column:s[s.length-1].last_column},kt&&(K._$.range=[s[s.length-(J||1)].range[0],s[s.length-1].range[1]]),at=this.performAction.apply(K,[e,N,_,Q.yy,X[1],w,s].concat(G)),typeof at<"u")return at;J&&(y=y.slice(0,-1*J*2),w=w.slice(0,-1*J),s=s.slice(0,-1*J)),y.push(this.productions_[X[1]][0]),w.push(K.$),s.push(K._$),ne=z[y[y.length-2]][y[y.length-1]],y.push(ne);break;case 3:return!0}}return!0},"parse")},v=(function(){var m={EOF:1,parseError:c(function(l,y){if(this.yy.parser)this.yy.parser.parseError(l,y);else throw new Error(l)},"parseError"),setInput:c(function(o,l){return this.yy=l||this.yy||{},this._input=o,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:c(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:c(function(o){var l=o.length,y=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var g=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),y.length-1&&(this.yylineno-=y.length-1);var w=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:y?(y.length===g.length?this.yylloc.first_column:0)+g[g.length-y.length].length-y[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(o){this.unput(this.match.slice(o))},"less"),pastInput:c(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
+ `+l+"^"},"showPosition"),test_match:c(function(o,l){var y,g,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),g=o[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],y=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var s in w)this[s]=w[s];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,l,y,g;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),s=0;s<w.length;s++)if(y=this._input.match(this.rules[w[s]]),y&&(!l||y[0].length>l[0].length)){if(l=y,g=s,this.options.backtrack_lexer){if(o=this.test_match(y,w[s]),o!==!1)return o;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(o=this.test_match(l,w[g]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:c(function(){var l=this.next();return l||this.lex()},"lex"),begin:c(function(l){this.conditionStack.push(l)},"begin"),popState:c(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:c(function(l){this.begin(l)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(l,y,g,w){switch(g){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:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();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}}};return m})();x.lexer=v;function k(){this.yy={}}return c(k,"Parser"),k.prototype=x,x.Parser=k,new k})();qt.parser=qt;var Vr=qt;j.extend(Mr);j.extend(Ar);j.extend(Or);var ge={friday:5,saturday:6},tt="",Xt="",Ut=void 0,Zt="",gt=[],pt=[],Qt=new Map,Kt=[],$t=[],mt="",Jt="",Ae=["active","done","crit","milestone","vert"],te=[],vt=!1,ee=!1,re="sunday",At="saturday",Bt=0,Rr=c(function(){Kt=[],$t=[],mt="",te=[],Mt=0,jt=void 0,Et=void 0,B=[],tt="",Xt="",Jt="",Ut=void 0,Zt="",gt=[],pt=[],vt=!1,ee=!1,Bt=0,Qt=new Map,Ue(),re="sunday",At="saturday"},"clear"),Hr=c(function(t){Xt=t},"setAxisFormat"),qr=c(function(){return Xt},"getAxisFormat"),Br=c(function(t){Ut=t},"setTickInterval"),Gr=c(function(){return Ut},"getTickInterval"),jr=c(function(t){Zt=t},"setTodayMarker"),Xr=c(function(){return Zt},"getTodayMarker"),Ur=c(function(t){tt=t},"setDateFormat"),Zr=c(function(){vt=!0},"enableInclusiveEndDates"),Qr=c(function(){return vt},"endDatesAreInclusive"),Kr=c(function(){ee=!0},"enableTopAxis"),Jr=c(function(){return ee},"topAxisEnabled"),ti=c(function(t){Jt=t},"setDisplayMode"),ei=c(function(){return Jt},"getDisplayMode"),ri=c(function(){return tt},"getDateFormat"),ii=c(function(t){gt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),ni=c(function(){return gt},"getIncludes"),si=c(function(t){pt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),ai=c(function(){return pt},"getExcludes"),oi=c(function(){return Qt},"getLinks"),ci=c(function(t){mt=t,Kt.push(t)},"addSection"),li=c(function(){return Kt},"getSections"),ui=c(function(){let t=pe();const r=10;let i=0;for(;!t&&i<r;)t=pe(),i++;return $t=B,$t},"getTasks"),Fe=c(function(t,r,i,n){const a=t.format(r.trim()),f=t.format("YYYY-MM-DD");return n.includes(a)||n.includes(f)?!1:i.includes("weekends")&&(t.isoWeekday()===ge[At]||t.isoWeekday()===ge[At]+1)||i.includes(t.format("dddd").toLowerCase())?!0:i.includes(a)||i.includes(f)},"isInvalidDate"),di=c(function(t){re=t},"setWeekday"),fi=c(function(){return re},"getWeekday"),hi=c(function(t){At=t},"setWeekend"),Ye=c(function(t,r,i,n){if(!i.length||t.manualEndTime)return;let a;t.startTime instanceof Date?a=j(t.startTime):a=j(t.startTime,r,!0),a=a.add(1,"d");let f;t.endTime instanceof Date?f=j(t.endTime):f=j(t.endTime,r,!0);const[d,T]=mi(a,f,r,i,n);t.endTime=d.toDate(),t.renderEndTime=T},"checkTaskDates"),mi=c(function(t,r,i,n,a){let f=!1,d=null;for(;t<=r;)f||(d=r.toDate()),f=Fe(t,i,n,a),f&&(r=r.add(1,"d")),t=t.add(1,"d");return[r,d]},"fixTaskDates"),Gt=c(function(t,r,i){if(i=i.trim(),c(T=>{const E=T.trim();return E==="x"||E==="X"},"isTimestampFormat")(r)&&/^\d+$/.test(i))return new Date(Number(i));const f=/^after\s+(?<ids>[\d\w- ]+)/.exec(i);if(f!==null){let T=null;for(const A of f.groups.ids.split(" ")){let b=ct(A);b!==void 0&&(!T||b.endTime>T.endTime)&&(T=b)}if(T)return T.endTime;const E=new Date;return E.setHours(0,0,0,0),E}let d=j(i,r.trim(),!0);if(d.isValid())return d.toDate();{ot.debug("Invalid date:"+i),ot.debug("With date format:"+r.trim());const T=new Date(i);if(T===void 0||isNaN(T.getTime())||T.getFullYear()<-1e4||T.getFullYear()>1e4)throw new Error("Invalid date:"+i);return T}},"getStartDate"),Le=c(function(t){const r=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return r!==null?[Number.parseFloat(r[1]),r[2]]:[NaN,"ms"]},"parseDuration"),Oe=c(function(t,r,i,n=!1){i=i.trim();const f=/^until\s+(?<ids>[\d\w- ]+)/.exec(i);if(f!==null){let b=null;for(const S of f.groups.ids.split(" ")){let D=ct(S);D!==void 0&&(!b||D.startTime<b.startTime)&&(b=D)}if(b)return b.startTime;const L=new Date;return L.setHours(0,0,0,0),L}let d=j(i,r.trim(),!0);if(d.isValid())return n&&(d=d.add(1,"d")),d.toDate();let T=j(t);const[E,A]=Le(i);if(!Number.isNaN(E)){const b=T.add(E,A);b.isValid()&&(T=b)}return T.toDate()},"getEndDate"),Mt=0,ht=c(function(t){return t===void 0?(Mt=Mt+1,"task"+Mt):t},"parseId"),ki=c(function(t,r){let i;r.substr(0,1)===":"?i=r.substr(1,r.length):i=r;const n=i.split(","),a={};ie(n,a,Ae);for(let d=0;d<n.length;d++)n[d]=n[d].trim();let f="";switch(n.length){case 1:a.id=ht(),a.startTime=t.endTime,f=n[0];break;case 2:a.id=ht(),a.startTime=Gt(void 0,tt,n[0]),f=n[1];break;case 3:a.id=ht(n[0]),a.startTime=Gt(void 0,tt,n[1]),f=n[2];break}return f&&(a.endTime=Oe(a.startTime,tt,f,vt),a.manualEndTime=j(f,"YYYY-MM-DD",!0).isValid(),Ye(a,tt,pt,gt)),a},"compileData"),yi=c(function(t,r){let i;r.substr(0,1)===":"?i=r.substr(1,r.length):i=r;const n=i.split(","),a={};ie(n,a,Ae);for(let f=0;f<n.length;f++)n[f]=n[f].trim();switch(n.length){case 1:a.id=ht(),a.startTime={type:"prevTaskEnd",id:t},a.endTime={data:n[0]};break;case 2:a.id=ht(),a.startTime={type:"getStartDate",startData:n[0]},a.endTime={data:n[1]};break;case 3:a.id=ht(n[0]),a.startTime={type:"getStartDate",startData:n[1]},a.endTime={data:n[2]};break}return a},"parseData"),jt,Et,B=[],We={},gi=c(function(t,r){const i={section:mt,type:mt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:r},task:t,classes:[]},n=yi(Et,r);i.raw.startTime=n.startTime,i.raw.endTime=n.endTime,i.id=n.id,i.prevTaskId=Et,i.active=n.active,i.done=n.done,i.crit=n.crit,i.milestone=n.milestone,i.vert=n.vert,i.order=Bt,Bt++;const a=B.push(i);Et=i.id,We[i.id]=a-1},"addTask"),ct=c(function(t){const r=We[t];return B[r]},"findTaskById"),pi=c(function(t,r){const i={section:mt,type:mt,description:t,task:t,classes:[]},n=ki(jt,r);i.startTime=n.startTime,i.endTime=n.endTime,i.id=n.id,i.active=n.active,i.done=n.done,i.crit=n.crit,i.milestone=n.milestone,i.vert=n.vert,jt=i,$t.push(i)},"addTaskOrg"),pe=c(function(){const t=c(function(i){const n=B[i];let a="";switch(B[i].raw.startTime.type){case"prevTaskEnd":{const f=ct(n.prevTaskId);n.startTime=f.endTime;break}case"getStartDate":a=Gt(void 0,tt,B[i].raw.startTime.startData),a&&(B[i].startTime=a);break}return B[i].startTime&&(B[i].endTime=Oe(B[i].startTime,tt,B[i].raw.endTime.data,vt),B[i].endTime&&(B[i].processed=!0,B[i].manualEndTime=j(B[i].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Ye(B[i],tt,pt,gt))),B[i].processed},"compileTask");let r=!0;for(const[i,n]of B.entries())t(i),r=r&&n.processed;return r},"compileTasks"),vi=c(function(t,r){let i=r;dt().securityLevel!=="loose"&&(i=Xe.sanitizeUrl(r)),t.split(",").forEach(function(n){ct(n)!==void 0&&(Ne(n,()=>{window.open(i,"_self")}),Qt.set(n,i))}),Pe(t,"clickable")},"setLink"),Pe=c(function(t,r){t.split(",").forEach(function(i){let n=ct(i);n!==void 0&&n.classes.push(r)})},"setClass"),xi=c(function(t,r,i){if(dt().securityLevel!=="loose"||r===void 0)return;let n=[];if(typeof i=="string"){n=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let f=0;f<n.length;f++){let d=n[f].trim();d.startsWith('"')&&d.endsWith('"')&&(d=d.substr(1,d.length-2)),n[f]=d}}n.length===0&&n.push(t),ct(t)!==void 0&&Ne(t,()=>{Ze.runFunc(r,...n)})},"setClickFun"),Ne=c(function(t,r){te.push(function(){const i=document.querySelector(`[id="${t}"]`);i!==null&&i.addEventListener("click",function(){r()})},function(){const i=document.querySelector(`[id="${t}-text"]`);i!==null&&i.addEventListener("click",function(){r()})})},"pushFun"),Ti=c(function(t,r,i){t.split(",").forEach(function(n){xi(n,r,i)}),Pe(t,"clickable")},"setClickEvent"),bi=c(function(t){te.forEach(function(r){r(t)})},"bindFunctions"),wi={getConfig:c(()=>dt().gantt,"getConfig"),clear:Rr,setDateFormat:Ur,getDateFormat:ri,enableInclusiveEndDates:Zr,endDatesAreInclusive:Qr,enableTopAxis:Kr,topAxisEnabled:Jr,setAxisFormat:Hr,getAxisFormat:qr,setTickInterval:Br,getTickInterval:Gr,setTodayMarker:jr,getTodayMarker:Xr,setAccTitle:Be,getAccTitle:qe,setDiagramTitle:He,getDiagramTitle:Re,setDisplayMode:ti,getDisplayMode:ei,setAccDescription:Ve,getAccDescription:ze,addSection:ci,getSections:li,getTasks:ui,addTask:gi,findTaskById:ct,addTaskOrg:pi,setIncludes:ii,getIncludes:ni,setExcludes:si,getExcludes:ai,setClickEvent:Ti,setLink:vi,getLinks:oi,bindFunctions:bi,parseDuration:Le,isInvalidDate:Fe,setWeekday:di,getWeekday:fi,setWeekend:hi};function ie(t,r,i){let n=!0;for(;n;)n=!1,i.forEach(function(a){const f="^\\s*"+a+"\\s*$",d=new RegExp(f);t[0].match(d)&&(r[a]=!0,t.shift(1),n=!0)})}c(ie,"getTaskTags");j.extend(zr);var _i=c(function(){ot.debug("Something is calling, setConf, remove the call")},"setConf"),ve={monday:ar,tuesday:sr,wednesday:nr,thursday:ir,friday:rr,saturday:er,sunday:tr},Di=c((t,r)=>{let i=[...t].map(()=>-1/0),n=[...t].sort((f,d)=>f.startTime-d.startTime||f.order-d.order),a=0;for(const f of n)for(let d=0;d<i.length;d++)if(f.startTime>=i[d]){i[d]=f.endTime,f.order=d+r,d>a&&(a=d);break}return a},"getMaxIntersections"),rt,Vt=1e4,Ci=c(function(t,r,i,n){const a=dt().gantt,f=dt().securityLevel;let d;f==="sandbox"&&(d=Tt("#i"+r));const T=f==="sandbox"?Tt(d.nodes()[0].contentDocument.body):Tt("body"),E=f==="sandbox"?d.nodes()[0].contentDocument:document,A=E.getElementById(r);rt=A.parentElement.offsetWidth,rt===void 0&&(rt=1200),a.useWidth!==void 0&&(rt=a.useWidth);const b=n.db.getTasks();let L=[];for(const u of b)L.push(u.type);L=h(L);const S={};let D=2*a.topPadding;if(n.db.getDisplayMode()==="compact"||a.displayMode==="compact"){const u={};for(const v of b)u[v.section]===void 0?u[v.section]=[v]:u[v.section].push(v);let x=0;for(const v of Object.keys(u)){const k=Di(u[v],x)+1;x+=k,D+=k*(a.barHeight+a.barGap),S[v]=k}}else{D+=b.length*(a.barHeight+a.barGap);for(const u of L)S[u]=b.filter(x=>x.type===u).length}A.setAttribute("viewBox","0 0 "+rt+" "+D);const V=T.select(`[id="${r}"]`),I=Qe().domain([Ke(b,function(u){return u.startTime}),Je(b,function(u){return u.endTime})]).rangeRound([0,rt-a.leftPadding-a.rightPadding]);function C(u,x){const v=u.startTime,k=x.startTime;let m=0;return v>k?m=1:v<k&&(m=-1),m}c(C,"taskCompare"),b.sort(C),M(b,rt,D),Ge(V,D,rt,a.useMaxWidth),V.append("text").text(n.db.getDiagramTitle()).attr("x",rt/2).attr("y",a.titleTopMargin).attr("class","titleText");function M(u,x,v){const k=a.barHeight,m=k+a.barGap,o=a.topPadding,l=a.leftPadding,y=or().domain([0,L.length]).range(["#00B9FA","#F95002"]).interpolate(_r);Y(m,o,l,x,v,u,n.db.getExcludes(),n.db.getIncludes()),H(l,o,x,v),W(u,m,o,l,k,y,x),$(m,o),p(l,o,x,v)}c(M,"makeGantt");function W(u,x,v,k,m,o,l){u.sort((e,_)=>e.vert===_.vert?0:e.vert?1:-1);const g=[...new Set(u.map(e=>e.order))].map(e=>u.find(_=>_.order===e));V.append("g").selectAll("rect").data(g).enter().append("rect").attr("x",0).attr("y",function(e,_){return _=e.order,_*x+v-2}).attr("width",function(){return l-a.rightPadding/2}).attr("height",x).attr("class",function(e){for(const[_,N]of L.entries())if(e.type===N)return"section section"+_%a.numberSectionStyles;return"section section0"}).enter();const w=V.append("g").selectAll("rect").data(u).enter(),s=n.db.getLinks();if(w.append("rect").attr("id",function(e){return e.id}).attr("rx",3).attr("ry",3).attr("x",function(e){return e.milestone?I(e.startTime)+k+.5*(I(e.endTime)-I(e.startTime))-.5*m:I(e.startTime)+k}).attr("y",function(e,_){return _=e.order,e.vert?a.gridLineStartPadding:_*x+v}).attr("width",function(e){return e.milestone?m:e.vert?.08*m:I(e.renderEndTime||e.endTime)-I(e.startTime)}).attr("height",function(e){return e.vert?b.length*(a.barHeight+a.barGap)+a.barHeight*2:m}).attr("transform-origin",function(e,_){return _=e.order,(I(e.startTime)+k+.5*(I(e.endTime)-I(e.startTime))).toString()+"px "+(_*x+v+.5*m).toString()+"px"}).attr("class",function(e){const _="task";let N="";e.classes.length>0&&(N=e.classes.join(" "));let P=0;for(const[G,F]of L.entries())e.type===F&&(P=G%a.numberSectionStyles);let O="";return e.active?e.crit?O+=" activeCrit":O=" active":e.done?e.crit?O=" doneCrit":O=" done":e.crit&&(O+=" crit"),O.length===0&&(O=" task"),e.milestone&&(O=" milestone "+O),e.vert&&(O=" vert "+O),O+=P,O+=" "+N,_+O}),w.append("text").attr("id",function(e){return e.id+"-text"}).text(function(e){return e.task}).attr("font-size",a.fontSize).attr("x",function(e){let _=I(e.startTime),N=I(e.renderEndTime||e.endTime);if(e.milestone&&(_+=.5*(I(e.endTime)-I(e.startTime))-.5*m,N=_+m),e.vert)return I(e.startTime)+k;const P=this.getBBox().width;return P>N-_?N+P+1.5*a.leftPadding>l?_+k-5:N+k+5:(N-_)/2+_+k}).attr("y",function(e,_){return e.vert?a.gridLineStartPadding+b.length*(a.barHeight+a.barGap)+60:(_=e.order,_*x+a.barHeight/2+(a.fontSize/2-2)+v)}).attr("text-height",m).attr("class",function(e){const _=I(e.startTime);let N=I(e.endTime);e.milestone&&(N=_+m);const P=this.getBBox().width;let O="";e.classes.length>0&&(O=e.classes.join(" "));let G=0;for(const[Q,nt]of L.entries())e.type===nt&&(G=Q%a.numberSectionStyles);let F="";return e.active&&(e.crit?F="activeCritText"+G:F="activeText"+G),e.done?e.crit?F=F+" doneCritText"+G:F=F+" doneText"+G:e.crit&&(F=F+" critText"+G),e.milestone&&(F+=" milestoneText"),e.vert&&(F+=" vertText"),P>N-_?N+P+1.5*a.leftPadding>l?O+" taskTextOutsideLeft taskTextOutside"+G+" "+F:O+" taskTextOutsideRight taskTextOutside"+G+" "+F+" width-"+P:O+" taskText taskText"+G+" "+F+" width-"+P}),dt().securityLevel==="sandbox"){let e;e=Tt("#i"+r);const _=e.nodes()[0].contentDocument;w.filter(function(N){return s.has(N.id)}).each(function(N){var P=_.querySelector("#"+N.id),O=_.querySelector("#"+N.id+"-text");const G=P.parentNode;var F=_.createElement("a");F.setAttribute("xlink:href",s.get(N.id)),F.setAttribute("target","_top"),G.appendChild(F),F.appendChild(P),F.appendChild(O)})}}c(W,"drawRects");function Y(u,x,v,k,m,o,l,y){if(l.length===0&&y.length===0)return;let g,w;for(const{startTime:P,endTime:O}of o)(g===void 0||P<g)&&(g=P),(w===void 0||O>w)&&(w=O);if(!g||!w)return;if(j(w).diff(j(g),"year")>5){ot.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const s=n.db.getDateFormat(),z=[];let e=null,_=j(g);for(;_.valueOf()<=w;)n.db.isInvalidDate(_,s,l,y)?e?e.end=_:e={start:_,end:_}:e&&(z.push(e),e=null),_=_.add(1,"d");V.append("g").selectAll("rect").data(z).enter().append("rect").attr("id",P=>"exclude-"+P.start.format("YYYY-MM-DD")).attr("x",P=>I(P.start.startOf("day"))+v).attr("y",a.gridLineStartPadding).attr("width",P=>I(P.end.endOf("day"))-I(P.start.startOf("day"))).attr("height",m-x-a.gridLineStartPadding).attr("transform-origin",function(P,O){return(I(P.start)+v+.5*(I(P.end)-I(P.start))).toString()+"px "+(O*u+.5*m).toString()+"px"}).attr("class","exclude-range")}c(Y,"drawExcludeDays");function R(u,x,v,k){if(v<=0||u>x)return 1/0;const m=x-u,o=j.duration({[k??"day"]:v}).asMilliseconds();return o<=0?1/0:Math.ceil(m/o)}c(R,"getEstimatedTickCount");function H(u,x,v,k){const m=n.db.getDateFormat(),o=n.db.getAxisFormat();let l;o?l=o:m==="D"?l="%d":l=a.axisFormat??"%Y-%m-%d";let y=gr(I).tickSize(-k+x+a.gridLineStartPadding).tickFormat(se(l));const w=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||a.tickInterval);if(w!==null){const s=parseInt(w[1],10);if(isNaN(s)||s<=0)ot.warn(`Invalid tick interval value: "${w[1]}". Skipping custom tick interval.`);else{const z=w[2],e=n.db.getWeekday()||a.weekday,_=I.domain(),N=_[0],P=_[1],O=R(N,P,s,z);if(O>Vt)ot.warn(`The tick interval "${s}${z}" would generate ${O} ticks, which exceeds the maximum allowed (${Vt}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(z){case"millisecond":y.ticks(de.every(s));break;case"second":y.ticks(ue.every(s));break;case"minute":y.ticks(le.every(s));break;case"hour":y.ticks(ce.every(s));break;case"day":y.ticks(oe.every(s));break;case"week":y.ticks(ve[e].every(s));break;case"month":y.ticks(ae.every(s));break}}}if(V.append("g").attr("class","grid").attr("transform","translate("+u+", "+(k-50)+")").call(y).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||a.topAxis){let s=yr(I).tickSize(-k+x+a.gridLineStartPadding).tickFormat(se(l));if(w!==null){const z=parseInt(w[1],10);if(isNaN(z)||z<=0)ot.warn(`Invalid tick interval value: "${w[1]}". Skipping custom tick interval.`);else{const e=w[2],_=n.db.getWeekday()||a.weekday,N=I.domain(),P=N[0],O=N[1];if(R(P,O,z,e)<=Vt)switch(e){case"millisecond":s.ticks(de.every(z));break;case"second":s.ticks(ue.every(z));break;case"minute":s.ticks(le.every(z));break;case"hour":s.ticks(ce.every(z));break;case"day":s.ticks(oe.every(z));break;case"week":s.ticks(ve[_].every(z));break;case"month":s.ticks(ae.every(z));break}}}V.append("g").attr("class","grid").attr("transform","translate("+u+", "+x+")").call(s).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}c(H,"makeGrid");function $(u,x){let v=0;const k=Object.keys(S).map(m=>[m,S[m]]);V.append("g").selectAll("text").data(k).enter().append(function(m){const o=m[0].split(je.lineBreakRegex),l=-(o.length-1)/2,y=E.createElementNS("http://www.w3.org/2000/svg","text");y.setAttribute("dy",l+"em");for(const[g,w]of o.entries()){const s=E.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttribute("alignment-baseline","central"),s.setAttribute("x","10"),g>0&&s.setAttribute("dy","1em"),s.textContent=w,y.appendChild(s)}return y}).attr("x",10).attr("y",function(m,o){if(o>0)for(let l=0;l<o;l++)return v+=k[o-1][1],m[1]*u/2+v*u+x;else return m[1]*u/2+x}).attr("font-size",a.sectionFontSize).attr("class",function(m){for(const[o,l]of L.entries())if(m[0]===l)return"sectionTitle sectionTitle"+o%a.numberSectionStyles;return"sectionTitle"})}c($,"vertLabels");function p(u,x,v,k){const m=n.db.getTodayMarker();if(m==="off")return;const o=V.append("g").attr("class","today"),l=new Date,y=o.append("line");y.attr("x1",I(l)+u).attr("x2",I(l)+u).attr("y1",a.titleTopMargin).attr("y2",k-a.titleTopMargin).attr("class","today"),m!==""&&y.attr("style",m.replace(/,/g,";"))}c(p,"drawToday");function h(u){const x={},v=[];for(let k=0,m=u.length;k<m;++k)Object.prototype.hasOwnProperty.call(x,u[k])||(x[u[k]]=!0,v.push(u[k]));return v}c(h,"checkUnique")},"draw"),Si={setConf:_i,draw:Ci},Mi=c(t=>`
7
+ .mermaid-main-font {
8
+ font-family: ${t.fontFamily};
9
+ }
10
+
11
+ .exclude-range {
12
+ fill: ${t.excludeBkgColor};
13
+ }
14
+
15
+ .section {
16
+ stroke: none;
17
+ opacity: 0.2;
18
+ }
19
+
20
+ .section0 {
21
+ fill: ${t.sectionBkgColor};
22
+ }
23
+
24
+ .section2 {
25
+ fill: ${t.sectionBkgColor2};
26
+ }
27
+
28
+ .section1,
29
+ .section3 {
30
+ fill: ${t.altSectionBkgColor};
31
+ opacity: 0.2;
32
+ }
33
+
34
+ .sectionTitle0 {
35
+ fill: ${t.titleColor};
36
+ }
37
+
38
+ .sectionTitle1 {
39
+ fill: ${t.titleColor};
40
+ }
41
+
42
+ .sectionTitle2 {
43
+ fill: ${t.titleColor};
44
+ }
45
+
46
+ .sectionTitle3 {
47
+ fill: ${t.titleColor};
48
+ }
49
+
50
+ .sectionTitle {
51
+ text-anchor: start;
52
+ font-family: ${t.fontFamily};
53
+ }
54
+
55
+
56
+ /* Grid and axis */
57
+
58
+ .grid .tick {
59
+ stroke: ${t.gridColor};
60
+ opacity: 0.8;
61
+ shape-rendering: crispEdges;
62
+ }
63
+
64
+ .grid .tick text {
65
+ font-family: ${t.fontFamily};
66
+ fill: ${t.textColor};
67
+ }
68
+
69
+ .grid path {
70
+ stroke-width: 0;
71
+ }
72
+
73
+
74
+ /* Today line */
75
+
76
+ .today {
77
+ fill: none;
78
+ stroke: ${t.todayLineColor};
79
+ stroke-width: 2px;
80
+ }
81
+
82
+
83
+ /* Task styling */
84
+
85
+ /* Default task */
86
+
87
+ .task {
88
+ stroke-width: 2;
89
+ }
90
+
91
+ .taskText {
92
+ text-anchor: middle;
93
+ font-family: ${t.fontFamily};
94
+ }
95
+
96
+ .taskTextOutsideRight {
97
+ fill: ${t.taskTextDarkColor};
98
+ text-anchor: start;
99
+ font-family: ${t.fontFamily};
100
+ }
101
+
102
+ .taskTextOutsideLeft {
103
+ fill: ${t.taskTextDarkColor};
104
+ text-anchor: end;
105
+ }
106
+
107
+
108
+ /* Special case clickable */
109
+
110
+ .task.clickable {
111
+ cursor: pointer;
112
+ }
113
+
114
+ .taskText.clickable {
115
+ cursor: pointer;
116
+ fill: ${t.taskTextClickableColor} !important;
117
+ font-weight: bold;
118
+ }
119
+
120
+ .taskTextOutsideLeft.clickable {
121
+ cursor: pointer;
122
+ fill: ${t.taskTextClickableColor} !important;
123
+ font-weight: bold;
124
+ }
125
+
126
+ .taskTextOutsideRight.clickable {
127
+ cursor: pointer;
128
+ fill: ${t.taskTextClickableColor} !important;
129
+ font-weight: bold;
130
+ }
131
+
132
+
133
+ /* Specific task settings for the sections*/
134
+
135
+ .taskText0,
136
+ .taskText1,
137
+ .taskText2,
138
+ .taskText3 {
139
+ fill: ${t.taskTextColor};
140
+ }
141
+
142
+ .task0,
143
+ .task1,
144
+ .task2,
145
+ .task3 {
146
+ fill: ${t.taskBkgColor};
147
+ stroke: ${t.taskBorderColor};
148
+ }
149
+
150
+ .taskTextOutside0,
151
+ .taskTextOutside2
152
+ {
153
+ fill: ${t.taskTextOutsideColor};
154
+ }
155
+
156
+ .taskTextOutside1,
157
+ .taskTextOutside3 {
158
+ fill: ${t.taskTextOutsideColor};
159
+ }
160
+
161
+
162
+ /* Active task */
163
+
164
+ .active0,
165
+ .active1,
166
+ .active2,
167
+ .active3 {
168
+ fill: ${t.activeTaskBkgColor};
169
+ stroke: ${t.activeTaskBorderColor};
170
+ }
171
+
172
+ .activeText0,
173
+ .activeText1,
174
+ .activeText2,
175
+ .activeText3 {
176
+ fill: ${t.taskTextDarkColor} !important;
177
+ }
178
+
179
+
180
+ /* Completed task */
181
+
182
+ .done0,
183
+ .done1,
184
+ .done2,
185
+ .done3 {
186
+ stroke: ${t.doneTaskBorderColor};
187
+ fill: ${t.doneTaskBkgColor};
188
+ stroke-width: 2;
189
+ }
190
+
191
+ .doneText0,
192
+ .doneText1,
193
+ .doneText2,
194
+ .doneText3 {
195
+ fill: ${t.taskTextDarkColor} !important;
196
+ }
197
+
198
+ /* Done task text displayed outside the bar sits against the diagram background,
199
+ not against the done-task bar, so it must use the outside/contrast color. */
200
+ .doneText0.taskTextOutsideLeft,
201
+ .doneText0.taskTextOutsideRight,
202
+ .doneText1.taskTextOutsideLeft,
203
+ .doneText1.taskTextOutsideRight,
204
+ .doneText2.taskTextOutsideLeft,
205
+ .doneText2.taskTextOutsideRight,
206
+ .doneText3.taskTextOutsideLeft,
207
+ .doneText3.taskTextOutsideRight {
208
+ fill: ${t.taskTextOutsideColor} !important;
209
+ }
210
+
211
+
212
+ /* Tasks on the critical line */
213
+
214
+ .crit0,
215
+ .crit1,
216
+ .crit2,
217
+ .crit3 {
218
+ stroke: ${t.critBorderColor};
219
+ fill: ${t.critBkgColor};
220
+ stroke-width: 2;
221
+ }
222
+
223
+ .activeCrit0,
224
+ .activeCrit1,
225
+ .activeCrit2,
226
+ .activeCrit3 {
227
+ stroke: ${t.critBorderColor};
228
+ fill: ${t.activeTaskBkgColor};
229
+ stroke-width: 2;
230
+ }
231
+
232
+ .doneCrit0,
233
+ .doneCrit1,
234
+ .doneCrit2,
235
+ .doneCrit3 {
236
+ stroke: ${t.critBorderColor};
237
+ fill: ${t.doneTaskBkgColor};
238
+ stroke-width: 2;
239
+ cursor: pointer;
240
+ shape-rendering: crispEdges;
241
+ }
242
+
243
+ .milestone {
244
+ transform: rotate(45deg) scale(0.8,0.8);
245
+ }
246
+
247
+ .milestoneText {
248
+ font-style: italic;
249
+ }
250
+ .doneCritText0,
251
+ .doneCritText1,
252
+ .doneCritText2,
253
+ .doneCritText3 {
254
+ fill: ${t.taskTextDarkColor} !important;
255
+ }
256
+
257
+ /* Done-crit task text outside the bar — same reasoning as doneText above. */
258
+ .doneCritText0.taskTextOutsideLeft,
259
+ .doneCritText0.taskTextOutsideRight,
260
+ .doneCritText1.taskTextOutsideLeft,
261
+ .doneCritText1.taskTextOutsideRight,
262
+ .doneCritText2.taskTextOutsideLeft,
263
+ .doneCritText2.taskTextOutsideRight,
264
+ .doneCritText3.taskTextOutsideLeft,
265
+ .doneCritText3.taskTextOutsideRight {
266
+ fill: ${t.taskTextOutsideColor} !important;
267
+ }
268
+
269
+ .vert {
270
+ stroke: ${t.vertLineColor};
271
+ }
272
+
273
+ .vertText {
274
+ font-size: 15px;
275
+ text-anchor: middle;
276
+ fill: ${t.vertLineColor} !important;
277
+ }
278
+
279
+ .activeCritText0,
280
+ .activeCritText1,
281
+ .activeCritText2,
282
+ .activeCritText3 {
283
+ fill: ${t.taskTextDarkColor} !important;
284
+ }
285
+
286
+ .titleText {
287
+ text-anchor: middle;
288
+ font-size: 18px;
289
+ fill: ${t.titleColor||t.textColor};
290
+ font-family: ${t.fontFamily};
291
+ }
292
+ `,"getStyles"),Ei=Mi,Wi={parser:Vr,db:wi,renderer:Si,styles:Ei};export{Wi as diagram};
@@ -0,0 +1,65 @@
1
+ import{p as V}from"./chunk-4BX2VUAB-0ToDr6RE.js";import{I as X}from"./chunk-QZHKN3VN-Bqk8juan.js";import{q as J,p as Q,s as Z,g as rr,a as er,b as tr,_ as $,l as m,d as ar,u as sr,C as nr,y as or,k as E,D as cr,E as ir,F as dr,G as hr}from"./mermaid.core-BWLV1B2v.js";import{p as lr}from"./treemap-KZPCXAKY-CkrClVhk.js";import"./index-CPnL1_qC.js";import"./step-D51IIHGA.js";import"./_baseUniq-zAOaCuKw.js";import"./_basePickBy-Bf-bSoS9.js";import"./clone-BmaCesfa.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},$r=ir.gitGraph,q=$(()=>cr({...$r,...dr().gitGraph}),"getConfig"),i=new X(()=>{const t=q(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function z(){return hr({length:7})}$(z,"getID");function W(t,r){const a=Object.create(null);return t.reduce((n,e)=>{const s=r(e);return a[s]||(a[s]=!0,n.push(e)),n},[])}$(W,"uniqBy");var fr=$(function(t){i.records.direction=t},"setDirection"),yr=$(function(t){m.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(r){m.error("error while parsing gitGraph options",r.message)}},"setOptions"),gr=$(function(){return i.records.options},"getOptions"),xr=$(function(t){let r=t.msg,a=t.id;const n=t.type;let e=t.tags;m.info("commit",r,a,n,e),m.debug("Entering commit:",r,a,n,e);const s=q();a=E.sanitizeText(a,s),r=E.sanitizeText(r,s),e=e==null?void 0:e.map(c=>E.sanitizeText(c,s));const o={id:a||i.records.seq+"-"+z(),message:r,seq:i.records.seq++,type:n??p.NORMAL,tags:e??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=o,m.info("main branch",s.mainBranchName),i.records.commits.has(o.id)&&m.warn(`Commit ID ${o.id} already exists`),i.records.commits.set(o.id,o),i.records.branches.set(i.records.currBranch,o.id),m.debug("in pushCommit "+o.id)},"commit"),ur=$(function(t){let r=t.name;const a=t.order;if(r=E.sanitizeText(r,q()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:a}),S(r),m.debug("in createBranch")},"branch"),pr=$(t=>{let r=t.branch,a=t.id;const n=t.type,e=t.tags,s=q();r=E.sanitizeText(r,s),a&&(a=E.sanitizeText(a,s));const o=i.records.branches.get(i.records.currBranch),c=i.records.branches.get(r),d=o?i.records.commits.get(o):void 0,h=c?i.records.commits.get(c):void 0;if(d&&h&&d.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const l=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},l}if(d===void 0||!d){const l=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},l}if(!i.records.branches.has(r)){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},l}if(h===void 0||!h){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},l}if(d===h){const l=new Error('Incorrect usage of "merge". Both branches have same head');throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},l}if(a&&i.records.commits.has(a)){const l=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw l.hash={text:`merge ${r} ${a} ${n} ${e==null?void 0:e.join(" ")}`,token:`merge ${r} ${a} ${n} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${n} ${e==null?void 0:e.join(" ")}`]},l}const f=c||"",y={id:a||`${i.records.seq}-${z()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:p.MERGE,customType:n,customId:!!a,tags:e??[]};i.records.head=y,i.records.commits.set(y.id,y),i.records.branches.set(i.records.currBranch,y.id),m.debug(i.records.branches),m.debug("in mergeBranch")},"merge"),br=$(function(t){let r=t.id,a=t.targetId,n=t.tags,e=t.parent;m.debug("Entering cherryPick:",r,a,n);const s=q();if(r=E.sanitizeText(r,s),a=E.sanitizeText(a,s),n=n==null?void 0:n.map(d=>E.sanitizeText(d,s)),e=E.sanitizeText(e,s),!r||!i.records.commits.has(r)){const d=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw d.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},d}const o=i.records.commits.get(r);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(o.parents)&&o.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const c=o.branch;if(o.type===p.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(c===i.records.currBranch){const y=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const d=i.records.branches.get(i.records.currBranch);if(d===void 0||!d){const y=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const h=i.records.commits.get(d);if(h===void 0||!h){const y=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const f={id:i.records.seq+"-"+z(),message:`cherry-picked ${o==null?void 0:o.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,o.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${o.id}${o.type===p.MERGE?`|parent:${e}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),m.debug(i.records.branches),m.debug("in cherryPick")}},"cherryPick"),S=$(function(t){if(t=E.sanitizeText(t,q()),i.records.branches.has(t)){i.records.currBranch=t;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function D(t,r,a){const n=t.indexOf(r);n===-1?t.push(a):t.splice(n,1,a)}$(D,"upsert");function F(t){const r=t.reduce((e,s)=>e.seq>s.seq?e:s,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const n=[a,r.id,r.seq];for(const e in i.records.branches)i.records.branches.get(e)===r.id&&n.push(e);if(m.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=i.records.commits.get(r.parents[0]);D(t,r,e),r.parents[1]&&t.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=i.records.commits.get(r.parents[0]);D(t,r,e)}}t=W(t,e=>e.id),F(t)}$(F,"prettyPrintCommitHistory");var mr=$(function(){m.debug(i.records.commits);const t=j()[0];F([t])},"prettyPrint"),wr=$(function(){i.reset(),or()},"clear"),vr=$(function(){return[...i.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Cr=$(function(){return i.records.branches},"getBranches"),Er=$(function(){return i.records.commits},"getCommits"),j=$(function(){const t=[...i.records.commits.values()];return t.forEach(function(r){m.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),Br=$(function(){return i.records.currBranch},"getCurrentBranch"),Tr=$(function(){return i.records.direction},"getDirection"),Lr=$(function(){return i.records.head},"getHead"),Y={commitType:p,getConfig:q,setDirection:fr,setOptions:yr,getOptions:gr,commit:xr,branch:ur,merge:pr,cherryPick:br,checkout:S,prettyPrint:mr,clear:wr,getBranchesAsObjArray:vr,getBranches:Cr,getCommits:Er,getCommitsArray:j,getCurrentBranch:Br,getDirection:Tr,getHead:Lr,setAccTitle:tr,getAccTitle:er,getAccDescription:rr,setAccDescription:Z,setDiagramTitle:Q,getDiagramTitle:J},kr=$((t,r)=>{V(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)Mr(a,r)},"populate"),Mr=$((t,r)=>{const n={Commit:$(e=>r.commit(Ir(e)),"Commit"),Branch:$(e=>r.branch(Rr(e)),"Branch"),Merge:$(e=>r.merge(Gr(e)),"Merge"),Checkout:$(e=>r.checkout(Or(e)),"Checkout"),CherryPicking:$(e=>r.cherryPick(qr(e)),"CherryPicking")}[t.$type];n?n(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Ir=$(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?p[t.type]:p.NORMAL,tags:t.tags??void 0}),"parseCommit"),Rr=$(t=>({name:t.name,order:t.order??0}),"parseBranch"),Gr=$(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?p[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Or=$(t=>t.branch,"parseCheckout"),qr=$(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Ar={parse:$(async t=>{const r=await lr("gitGraph",t);m.debug(r),kr(r,Y)},"parse")},I=10,R=40,B=4,L=2,O=8,v=new Map,C=new Map,P=30,A=new Map,_=[],M=0,x="LR",Hr=$(()=>{v.clear(),C.clear(),A.clear(),M=0,_=[],x="LR"},"clear"),K=$(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(n=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=n.trim(),r.appendChild(e)}),r},"drawText"),U=$(t=>{let r,a,n;return x==="BT"?(a=$((e,s)=>e<=s,"comparisonFunc"),n=1/0):(a=$((e,s)=>e>=s,"comparisonFunc"),n=0),t.forEach(e=>{var o,c;const s=x==="TB"||x=="BT"?(o=C.get(e))==null?void 0:o.y:(c=C.get(e))==null?void 0:c.x;s!==void 0&&a(s,n)&&(r=e,n=s)}),r},"findClosestParent"),Pr=$(t=>{let r="",a=1/0;return t.forEach(n=>{const e=C.get(n).y;e<=a&&(r=n,a=e)}),r||void 0},"findClosestParentBT"),_r=$((t,r,a)=>{let n=a,e=a;const s=[];t.forEach(o=>{const c=r.get(o);if(!c)throw new Error(`Commit not found for key ${o}`);c.parents.length?(n=Dr(c),e=Math.max(n,e)):s.push(c),Fr(c,n)}),n=e,s.forEach(o=>{Nr(o,n,a)}),t.forEach(o=>{const c=r.get(o);if(c!=null&&c.parents.length){const d=Pr(c.parents);n=C.get(d).y-R,n<=e&&(e=n);const h=v.get(c.branch).pos,f=n-I;C.set(c.id,{x:h,y:f})}})},"setParallelBTPos"),zr=$(t=>{var n;const r=U(t.parents.filter(e=>e!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(n=C.get(r))==null?void 0:n.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Dr=$(t=>zr(t)+R,"calculateCommitPosition"),Fr=$((t,r)=>{const a=v.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const n=a.pos,e=r+I;return C.set(t.id,{x:n,y:e}),{x:n,y:e}},"setCommitPosition"),Nr=$((t,r,a)=>{const n=v.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,s=n.pos;C.set(t.id,{x:s,y:e})},"setRootPosition"),Wr=$((t,r,a,n,e,s)=>{if(s===p.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%O} ${n}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%O} ${n}-inner`);else if(s===p.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const o=t.append("circle");if(o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",r.type===p.MERGE?9:10),o.attr("class",`commit ${r.id} commit${e%O}`),s===p.MERGE){const c=t.append("circle");c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",6),c.attr("class",`commit ${n} ${r.id} commit${e%O}`)}s===p.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${n} ${r.id} commit${e%O}`)}},"drawCommitBullet"),Sr=$((t,r,a,n,e)=>{var s;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&e.showCommitLabel){const o=t.append("g"),c=o.insert("rect").attr("class","commit-label-bkg"),d=o.append("text").attr("x",n).attr("y",a.y+25).attr("class","commit-label").text(r.id),h=(s=d.node())==null?void 0:s.getBBox();if(h&&(c.attr("x",a.posWithOffset-h.width/2-L).attr("y",a.y+13.5).attr("width",h.width+2*L).attr("height",h.height+2*L),x==="TB"||x==="BT"?(c.attr("x",a.x-(h.width+4*B+5)).attr("y",a.y-12),d.attr("x",a.x-(h.width+4*B)).attr("y",a.y+h.height-12)):d.attr("x",a.posWithOffset-h.width/2),e.rotateCommitLabel))if(x==="TB"||x==="BT")d.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const f=-7.5-(h.width+10)/25*9.5,y=10+h.width/25*8.5;o.attr("transform","translate("+f+", "+y+") rotate(-45, "+n+", "+a.y+")")}}},"drawCommitLabel"),jr=$((t,r,a,n)=>{var e;if(r.tags.length>0){let s=0,o=0,c=0;const d=[];for(const h of r.tags.reverse()){const f=t.insert("polygon"),y=t.append("circle"),l=t.append("text").attr("y",a.y-16-s).attr("class","tag-label").text(h),g=(e=l.node())==null?void 0:e.getBBox();if(!g)throw new Error("Tag bbox not found");o=Math.max(o,g.width),c=Math.max(c,g.height),l.attr("x",a.posWithOffset-g.width/2),d.push({tag:l,hole:y,rect:f,yOffset:s}),s+=20}for(const{tag:h,hole:f,rect:y,yOffset:l}of d){const g=c/2,u=a.y-19.2-l;if(y.attr("class","tag-label-bkg").attr("points",`
2
+ ${n-o/2-B/2},${u+L}
3
+ ${n-o/2-B/2},${u-L}
4
+ ${a.posWithOffset-o/2-B},${u-g-L}
5
+ ${a.posWithOffset+o/2+B},${u-g-L}
6
+ ${a.posWithOffset+o/2+B},${u+g+L}
7
+ ${a.posWithOffset-o/2-B},${u+g+L}`),f.attr("cy",u).attr("cx",n-o/2+B/2).attr("r",1.5).attr("class","tag-hole"),x==="TB"||x==="BT"){const b=n+l;y.attr("class","tag-label-bkg").attr("points",`
8
+ ${a.x},${b+2}
9
+ ${a.x},${b-2}
10
+ ${a.x+I},${b-g-2}
11
+ ${a.x+I+o+4},${b-g-2}
12
+ ${a.x+I+o+4},${b+g+2}
13
+ ${a.x+I},${b+g+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+n+")"),f.attr("cx",a.x+B/2).attr("cy",b).attr("transform","translate(12,12) rotate(45, "+a.x+","+n+")"),h.attr("x",a.x+5).attr("y",b+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+n+")")}}}},"drawCommitTags"),Yr=$(t=>{switch(t.customType??t.type){case p.NORMAL:return"commit-normal";case p.REVERSE:return"commit-reverse";case p.HIGHLIGHT:return"commit-highlight";case p.MERGE:return"commit-merge";case p.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Kr=$((t,r,a,n)=>{const e={x:0,y:0};if(t.parents.length>0){const s=U(t.parents);if(s){const o=n.get(s)??e;return r==="TB"?o.y+R:r==="BT"?(n.get(t.id)??e).y-R:o.x+R}}else return r==="TB"?P:r==="BT"?(n.get(t.id)??e).y-R:0;return 0},"calculatePosition"),Ur=$((t,r,a)=>{var o,c;const n=x==="BT"&&a?r:r+I,e=x==="TB"||x==="BT"?n:(o=v.get(t.branch))==null?void 0:o.pos,s=x==="TB"||x==="BT"?(c=v.get(t.branch))==null?void 0:c.pos:n;if(s===void 0||e===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:s,y:e,posWithOffset:n}},"getCommitPosition"),N=$((t,r,a,n)=>{const e=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let o=x==="TB"||x==="BT"?P:0;const c=[...r.keys()],d=n.parallelCommits??!1,h=$((y,l)=>{var b,T;const g=(b=r.get(y))==null?void 0:b.seq,u=(T=r.get(l))==null?void 0:T.seq;return g!==void 0&&u!==void 0?g-u:0},"sortKeys");let f=c.sort(h);x==="BT"&&(d&&_r(f,r,o),f=f.reverse()),f.forEach(y=>{var u;const l=r.get(y);if(!l)throw new Error(`Commit not found for key ${y}`);d&&(o=Kr(l,x,o,C));const g=Ur(l,o,d);if(a){const b=Yr(l),T=l.customType??l.type,G=((u=v.get(l.branch))==null?void 0:u.index)??0;Wr(e,l,g,b,G,T),Sr(s,l,g,o,n),jr(s,l,g,o)}x==="TB"||x==="BT"?C.set(l.id,{x:g.x,y:g.posWithOffset}):C.set(l.id,{x:g.posWithOffset,y:g.y}),o=x==="BT"&&d?o+R:o+R+I,o>M&&(M=o)})},"drawCommits"),Vr=$((t,r,a,n,e)=>{const o=(x==="TB"||x==="BT"?a.x<n.x:a.y<n.y)?r.branch:t.branch,c=$(h=>h.branch===o,"isOnBranchToGetCurve"),d=$(h=>h.seq>t.seq&&h.seq<r.seq,"isBetweenCommits");return[...e.values()].some(h=>d(h)&&c(h))},"shouldRerouteArrow"),H=$((t,r,a=0)=>{const n=t+Math.abs(t-r)/2;if(a>5)return n;if(_.every(o=>Math.abs(o-n)>=10))return _.push(n),n;const s=Math.abs(t-r);return H(t,r-s/5,a+1)},"findLane"),Xr=$((t,r,a,n)=>{var g,u,b,T,G;const e=C.get(r.id),s=C.get(a.id);if(e===void 0||s===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${a.id}`);const o=Vr(r,a,e,s,n);let c="",d="",h=0,f=0,y=(g=v.get(a.branch))==null?void 0:g.index;a.type===p.MERGE&&r.id!==a.parents[0]&&(y=(u=v.get(r.branch))==null?void 0:u.index);let l;if(o){c="A 10 10, 0, 0, 0,",d="A 10 10, 0, 0, 1,",h=10,f=10;const k=e.y<s.y?H(e.y,s.y):H(s.y,e.y),w=e.x<s.x?H(e.x,s.x):H(s.x,e.x);x==="TB"?e.x<s.x?l=`M ${e.x} ${e.y} L ${w-h} ${e.y} ${d} ${w} ${e.y+f} L ${w} ${s.y-h} ${c} ${w+f} ${s.y} L ${s.x} ${s.y}`:(y=(b=v.get(r.branch))==null?void 0:b.index,l=`M ${e.x} ${e.y} L ${w+h} ${e.y} ${c} ${w} ${e.y+f} L ${w} ${s.y-h} ${d} ${w-f} ${s.y} L ${s.x} ${s.y}`):x==="BT"?e.x<s.x?l=`M ${e.x} ${e.y} L ${w-h} ${e.y} ${c} ${w} ${e.y-f} L ${w} ${s.y+h} ${d} ${w+f} ${s.y} L ${s.x} ${s.y}`:(y=(T=v.get(r.branch))==null?void 0:T.index,l=`M ${e.x} ${e.y} L ${w+h} ${e.y} ${d} ${w} ${e.y-f} L ${w} ${s.y+h} ${c} ${w-f} ${s.y} L ${s.x} ${s.y}`):e.y<s.y?l=`M ${e.x} ${e.y} L ${e.x} ${k-h} ${c} ${e.x+f} ${k} L ${s.x-h} ${k} ${d} ${s.x} ${k+f} L ${s.x} ${s.y}`:(y=(G=v.get(r.branch))==null?void 0:G.index,l=`M ${e.x} ${e.y} L ${e.x} ${k+h} ${d} ${e.x+f} ${k} L ${s.x-h} ${k} ${c} ${s.x} ${k-f} L ${s.x} ${s.y}`)}else c="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",h=20,f=20,x==="TB"?(e.x<s.x&&(a.type===p.MERGE&&r.id!==a.parents[0]?l=`M ${e.x} ${e.y} L ${e.x} ${s.y-h} ${c} ${e.x+f} ${s.y} L ${s.x} ${s.y}`:l=`M ${e.x} ${e.y} L ${s.x-h} ${e.y} ${d} ${s.x} ${e.y+f} L ${s.x} ${s.y}`),e.x>s.x&&(c="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",h=20,f=20,a.type===p.MERGE&&r.id!==a.parents[0]?l=`M ${e.x} ${e.y} L ${e.x} ${s.y-h} ${d} ${e.x-f} ${s.y} L ${s.x} ${s.y}`:l=`M ${e.x} ${e.y} L ${s.x+h} ${e.y} ${c} ${s.x} ${e.y+f} L ${s.x} ${s.y}`),e.x===s.x&&(l=`M ${e.x} ${e.y} L ${s.x} ${s.y}`)):x==="BT"?(e.x<s.x&&(a.type===p.MERGE&&r.id!==a.parents[0]?l=`M ${e.x} ${e.y} L ${e.x} ${s.y+h} ${d} ${e.x+f} ${s.y} L ${s.x} ${s.y}`:l=`M ${e.x} ${e.y} L ${s.x-h} ${e.y} ${c} ${s.x} ${e.y-f} L ${s.x} ${s.y}`),e.x>s.x&&(c="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",h=20,f=20,a.type===p.MERGE&&r.id!==a.parents[0]?l=`M ${e.x} ${e.y} L ${e.x} ${s.y+h} ${c} ${e.x-f} ${s.y} L ${s.x} ${s.y}`:l=`M ${e.x} ${e.y} L ${s.x+h} ${e.y} ${d} ${s.x} ${e.y-f} L ${s.x} ${s.y}`),e.x===s.x&&(l=`M ${e.x} ${e.y} L ${s.x} ${s.y}`)):(e.y<s.y&&(a.type===p.MERGE&&r.id!==a.parents[0]?l=`M ${e.x} ${e.y} L ${s.x-h} ${e.y} ${d} ${s.x} ${e.y+f} L ${s.x} ${s.y}`:l=`M ${e.x} ${e.y} L ${e.x} ${s.y-h} ${c} ${e.x+f} ${s.y} L ${s.x} ${s.y}`),e.y>s.y&&(a.type===p.MERGE&&r.id!==a.parents[0]?l=`M ${e.x} ${e.y} L ${s.x-h} ${e.y} ${c} ${s.x} ${e.y-f} L ${s.x} ${s.y}`:l=`M ${e.x} ${e.y} L ${e.x} ${s.y+h} ${d} ${e.x+f} ${s.y} L ${s.x} ${s.y}`),e.y===s.y&&(l=`M ${e.x} ${e.y} L ${s.x} ${s.y}`));if(l===void 0)throw new Error("Line definition not found");t.append("path").attr("d",l).attr("class","arrow arrow"+y%O)},"drawArrow"),Jr=$((t,r)=>{const a=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(n=>{const e=r.get(n);e.parents&&e.parents.length>0&&e.parents.forEach(s=>{Xr(a,r.get(s),e,r)})})},"drawArrows"),Qr=$((t,r,a)=>{const n=t.append("g");r.forEach((e,s)=>{var b;const o=s%O,c=(b=v.get(e.name))==null?void 0:b.pos;if(c===void 0)throw new Error(`Position not found for branch ${e.name}`);const d=n.append("line");d.attr("x1",0),d.attr("y1",c),d.attr("x2",M),d.attr("y2",c),d.attr("class","branch branch"+o),x==="TB"?(d.attr("y1",P),d.attr("x1",c),d.attr("y2",M),d.attr("x2",c)):x==="BT"&&(d.attr("y1",M),d.attr("x1",c),d.attr("y2",P),d.attr("x2",c)),_.push(c);const h=e.name,f=K(h),y=n.insert("rect"),g=n.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+o);g.node().appendChild(f);const u=f.getBBox();y.attr("class","branchLabelBkg label"+o).attr("rx",4).attr("ry",4).attr("x",-u.width-4-(a.rotateCommitLabel===!0?30:0)).attr("y",-u.height/2+8).attr("width",u.width+18).attr("height",u.height+4),g.attr("transform","translate("+(-u.width-14-(a.rotateCommitLabel===!0?30:0))+", "+(c-u.height/2-1)+")"),x==="TB"?(y.attr("x",c-u.width/2-10).attr("y",0),g.attr("transform","translate("+(c-u.width/2-5)+", 0)")):x==="BT"?(y.attr("x",c-u.width/2-10).attr("y",M),g.attr("transform","translate("+(c-u.width/2-5)+", "+M+")")):y.attr("transform","translate(-19, "+(c-u.height/2)+")")})},"drawBranches"),Zr=$(function(t,r,a,n,e){return v.set(t,{pos:r,index:a}),r+=50+(e?40:0)+(x==="TB"||x==="BT"?n.width/2:0),r},"setBranchPosition"),re=$(function(t,r,a,n){Hr(),m.debug("in gitgraph renderer",t+`
14
+ `,"id:",r,a);const e=n.db;if(!e.getConfig){m.error("getConfig method is not available on db");return}const s=e.getConfig(),o=s.rotateCommitLabel??!1;A=e.getCommits();const c=e.getBranchesAsObjArray();x=e.getDirection();const d=ar(`[id="${r}"]`);let h=0;c.forEach((f,y)=>{var G;const l=K(f.name),g=d.append("g"),u=g.insert("g").attr("class","branchLabel"),b=u.insert("g").attr("class","label branch-label");(G=b.node())==null||G.appendChild(l);const T=l.getBBox();h=Zr(f.name,h,y,T,o),b.remove(),u.remove(),g.remove()}),N(d,A,!1,s),s.showBranches&&Qr(d,c,s),Jr(d,A),N(d,A,!0,s),sr.insertTitle(d,"gitTitleText",s.titleTopMargin??0,e.getDiagramTitle()),nr(void 0,d,s.diagramPadding,s.useMaxWidth)},"draw"),ee={draw:re},te=$(t=>`
15
+ .commit-id,
16
+ .commit-msg,
17
+ .branch-label {
18
+ fill: lightgrey;
19
+ color: lightgrey;
20
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
21
+ font-family: var(--mermaid-font-family);
22
+ }
23
+ ${[0,1,2,3,4,5,6,7].map(r=>`
24
+ .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; }
25
+ .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }
26
+ .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }
27
+ .label${r} { fill: ${t["git"+r]}; }
28
+ .arrow${r} { stroke: ${t["git"+r]}; }
29
+ `).join(`
30
+ `)}
31
+
32
+ .branch {
33
+ stroke-width: 1;
34
+ stroke: ${t.lineColor};
35
+ stroke-dasharray: 2;
36
+ }
37
+ .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
38
+ .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
39
+ .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
40
+ .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
41
+ .tag-hole { fill: ${t.textColor}; }
42
+
43
+ .commit-merge {
44
+ stroke: ${t.primaryColor};
45
+ fill: ${t.primaryColor};
46
+ }
47
+ .commit-reverse {
48
+ stroke: ${t.primaryColor};
49
+ fill: ${t.primaryColor};
50
+ stroke-width: 3;
51
+ }
52
+ .commit-highlight-outer {
53
+ }
54
+ .commit-highlight-inner {
55
+ stroke: ${t.primaryColor};
56
+ fill: ${t.primaryColor};
57
+ }
58
+
59
+ .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
60
+ .gitTitleText {
61
+ text-anchor: middle;
62
+ font-size: 18px;
63
+ fill: ${t.textColor};
64
+ }
65
+ `,"getStyles"),ae=te,fe={parser:Ar,db:Y,renderer:ee,styles:ae};export{fe as diagram};
@@ -0,0 +1 @@
1
+ import{ac as N,ad as j,ae as f,af as b,ag as E}from"./mermaid.core-BWLV1B2v.js";import{a as v,c as P,k as _,f as g,d,i as l,v as p,r as D}from"./_baseUniq-zAOaCuKw.js";var w=N(function(o){return v(P(o,1,j,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return d(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),d(_(this._in[e]),t),delete this._in[e],delete this._preds[e],d(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return w(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),d(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&d(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return D(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,y(this._preds[t],e),y(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],C(this._preds[t],e),C(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function y(o,e){o[e]?o[e]++:o[e]=1}function C(o,e){--o[e]||delete o[e]}function c(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(o,e){return c(o,e.v,e.w,e.name)}export{L as G};