hex-audit 0.6.2 → 0.7.0

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 (333) hide show
  1. package/DEMO.md +13 -0
  2. package/README.md +60 -6
  3. package/dashboard/.next/BUILD_ID +1 -1
  4. package/dashboard/.next/app-build-manifest.json +100 -89
  5. package/dashboard/.next/app-path-routes-manifest.json +1 -1
  6. package/dashboard/.next/build-manifest.json +14 -14
  7. package/dashboard/.next/next-server.js.nft.json +1 -1
  8. package/dashboard/.next/prerender-manifest.js +1 -1
  9. package/dashboard/.next/prerender-manifest.json +1 -1
  10. package/dashboard/.next/react-loadable-manifest.json +118 -118
  11. package/dashboard/.next/routes-manifest.json +1 -1
  12. package/dashboard/.next/server/app/_not-found/page.js +1 -1
  13. package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/dashboard/.next/server/app/access/page.js +1 -1
  15. package/dashboard/.next/server/app/access/page.js.nft.json +1 -1
  16. package/dashboard/.next/server/app/access/page_client-reference-manifest.js +1 -1
  17. package/dashboard/.next/server/app/calls/page.js +1 -1
  18. package/dashboard/.next/server/app/calls/page.js.nft.json +1 -1
  19. package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +1 -1
  20. package/dashboard/.next/server/app/changes/page.js +20 -0
  21. package/dashboard/.next/server/app/changes/page.js.nft.json +1 -0
  22. package/dashboard/.next/server/app/changes/page_client-reference-manifest.js +1 -0
  23. package/dashboard/.next/server/app/conformance/page.js +1 -1
  24. package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +1 -1
  25. package/dashboard/.next/server/app/diagram/page.js +1 -1
  26. package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +1 -1
  27. package/dashboard/.next/server/app/flows/page.js +1 -1
  28. package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +1 -1
  29. package/dashboard/.next/server/app/functions/page.js +1 -1
  30. package/dashboard/.next/server/app/functions/page.js.nft.json +1 -1
  31. package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +1 -1
  32. package/dashboard/.next/server/app/issues/page.js +6 -6
  33. package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -1
  34. package/dashboard/.next/server/app/notes/page.js +3 -3
  35. package/dashboard/.next/server/app/notes/page_client-reference-manifest.js +1 -1
  36. package/dashboard/.next/server/app/page.js +2 -2
  37. package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  38. package/dashboard/.next/server/app/progress/page.js +1 -1
  39. package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +1 -1
  40. package/dashboard/.next/server/app/report/page.js +1 -1
  41. package/dashboard/.next/server/app/report/page_client-reference-manifest.js +1 -1
  42. package/dashboard/.next/server/app/stats/page.js +1 -1
  43. package/dashboard/.next/server/app/stats/page.js.nft.json +1 -1
  44. package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +1 -1
  45. package/dashboard/.next/server/app-paths-manifest.json +9 -8
  46. package/dashboard/.next/server/chunks/42.js +1 -1
  47. package/dashboard/.next/server/chunks/530.js +1 -1
  48. package/dashboard/.next/server/chunks/649.js +1 -1
  49. package/dashboard/.next/server/chunks/939.js +1 -0
  50. package/dashboard/.next/server/functions-config-manifest.json +1 -1
  51. package/dashboard/.next/server/middleware-build-manifest.js +1 -1
  52. package/dashboard/.next/server/middleware-react-loadable-manifest.js +1 -1
  53. package/dashboard/.next/server/next-font-manifest.js +1 -1
  54. package/dashboard/.next/server/next-font-manifest.json +1 -1
  55. package/dashboard/.next/server/pages/500.html +1 -1
  56. package/dashboard/.next/server/pages-manifest.json +1 -1
  57. package/dashboard/.next/server/server-reference-manifest.js +1 -1
  58. package/dashboard/.next/server/server-reference-manifest.json +1 -1
  59. package/dashboard/.next/static/chunks/{1.8868c4d131111be7.js → 1.a666047ea18866fb.js} +2 -2
  60. package/dashboard/.next/static/chunks/1015.39008440ab15e196.js +226 -0
  61. package/dashboard/.next/static/chunks/1151.497fa63c5b9eba52.js +1 -0
  62. package/dashboard/.next/static/chunks/1199.f30cbfa151e56076.js +148 -0
  63. package/dashboard/.next/static/chunks/1375.64c20f1064a38a10.js +43 -0
  64. package/dashboard/.next/static/chunks/1799.8dc56017eede704e.js +9 -0
  65. package/dashboard/.next/static/chunks/20154aaa.e87f69fe10483f8b.js +1 -0
  66. package/dashboard/.next/static/chunks/2077.5603adeb156c7d10.js +1 -0
  67. package/dashboard/.next/static/chunks/2166.9f6592b9399eadd8.js +215 -0
  68. package/dashboard/.next/static/chunks/{2291.85a70cb0c228157b.js → 2291.584b42ccad079b99.js} +1 -1
  69. package/dashboard/.next/static/chunks/2325.7decd077edfb81d9.js +24 -0
  70. package/dashboard/.next/static/chunks/{2383.62c035a052272594.js → 2383.ca81f980ce6528a4.js} +1 -1
  71. package/dashboard/.next/static/chunks/2694.7dfa5fef28851903.js +1 -0
  72. package/dashboard/.next/static/chunks/275.38af87389c1d33d7.js +34 -0
  73. package/dashboard/.next/static/chunks/2781.fba46046dbf2693b.js +93 -0
  74. package/dashboard/.next/static/chunks/2805.35b4cd8a94978aaf.js +1 -0
  75. package/dashboard/.next/static/chunks/{2879.51436986f93981d9.js → 2879.74d65e33e60505ee.js} +1 -1
  76. package/dashboard/.next/static/chunks/3017.4a5312e3c20a173f.js +1 -0
  77. package/dashboard/.next/static/chunks/3205-47d09be47325709f.js +2 -0
  78. package/dashboard/.next/static/chunks/3236.eac9855778a54518.js +1 -0
  79. package/dashboard/.next/static/chunks/3480.853a445a3784642a.js +1 -0
  80. package/dashboard/.next/static/chunks/3626.c5dacee11c8fbc4d.js +64 -0
  81. package/dashboard/.next/static/chunks/3865.5e6d2d501380e03b.js +90 -0
  82. package/dashboard/.next/static/chunks/3887.073cece834a4eae2.js +1 -0
  83. package/dashboard/.next/static/chunks/3924-88d849290406ee6f.js +1 -0
  84. package/dashboard/.next/static/chunks/3948.74201b9f0672234d.js +287 -0
  85. package/dashboard/.next/static/chunks/4728.e69372b5e5b61b8d.js +24 -0
  86. package/dashboard/.next/static/chunks/4787.821a6ad2816cdc60.js +23 -0
  87. package/dashboard/.next/static/chunks/5060.47402abc10273699.js +1 -0
  88. package/dashboard/.next/static/chunks/5284.334c7c0587d5d47a.js +1 -0
  89. package/dashboard/.next/static/chunks/5715.e16b1230cc4b4652.js +115 -0
  90. package/dashboard/.next/static/chunks/6014.641a2c53ba506241.js +104 -0
  91. package/dashboard/.next/static/chunks/6024.f099c15f75aa6722.js +79 -0
  92. package/dashboard/.next/static/chunks/{6052.033a6f1013c666eb.js → 6052.3001318955e5b36c.js} +2 -2
  93. package/dashboard/.next/static/chunks/6177.a01cf0a03734cf09.js +1 -0
  94. package/dashboard/.next/static/chunks/618f8807-69fc7bb97c2b87c1.js +1 -0
  95. package/dashboard/.next/static/chunks/6434.f560693253fea8de.js +1 -0
  96. package/dashboard/.next/static/chunks/6468.976d89ba133185f1.js +77 -0
  97. package/dashboard/.next/static/chunks/6540.6f3c4f2c6877ed89.js +1 -0
  98. package/dashboard/.next/static/chunks/6549.e3c4c1766cff1449.js +1 -0
  99. package/dashboard/.next/static/chunks/690f35d0.ab57e02a04c7e9e0.js +119 -0
  100. package/dashboard/.next/static/chunks/{7020.831e16e26d91abc1.js → 7020.b718b1b9cea36e60.js} +2 -2
  101. package/dashboard/.next/static/chunks/7397-37adf76cad543297.js +1 -0
  102. package/dashboard/.next/static/chunks/7498-d1814d68ba346d13.js +1 -0
  103. package/dashboard/.next/static/chunks/7802.f0134c792fccd382.js +80 -0
  104. package/dashboard/.next/static/chunks/7973.e34032723285a616.js +79 -0
  105. package/dashboard/.next/static/chunks/{7a04ac15.1c6cea694301806c.js → 7a04ac15.e49de94ece135900.js} +1 -1
  106. package/dashboard/.next/static/chunks/8216.1138ec313908a708.js +5 -0
  107. package/dashboard/.next/static/chunks/{8233babc.780b8e272eda298f.js → 8233babc.09872dcb3ff44064.js} +1 -1
  108. package/dashboard/.next/static/chunks/{8452-e616b5f43bceb95f.js → 8452-6d77fa353402422c.js} +2 -2
  109. package/dashboard/.next/static/chunks/8645.98a43217d406500e.js +1 -0
  110. package/dashboard/.next/static/chunks/8928-fc049decdfbdaa6d.js +1 -0
  111. package/dashboard/.next/static/chunks/9173.a7160f7d0b685fa7.js +1 -0
  112. package/dashboard/.next/static/chunks/9178.998a8c49996de8e4.js +1 -0
  113. package/dashboard/.next/static/chunks/9466.a914ce0de7d3bb84.js +1 -0
  114. package/dashboard/.next/static/chunks/9660.b1c8deae2c449d14.js +1 -0
  115. package/dashboard/.next/static/chunks/{9717.6cf5c8c89403b651.js → 9717.bba51b78ebd8fd29.js} +1 -1
  116. package/dashboard/.next/static/chunks/9720.d63a0696776bcc60.js +1 -0
  117. package/dashboard/.next/static/chunks/9811.2993c4cbd28e8d1b.js +1 -0
  118. package/dashboard/.next/static/chunks/app/_not-found/page-c299b935209993df.js +1 -0
  119. package/dashboard/.next/static/chunks/app/access/page-f8403cbdfc1c176b.js +1 -0
  120. package/dashboard/.next/static/chunks/app/calls/page-41f20d01e12382ef.js +1 -0
  121. package/dashboard/.next/static/chunks/app/changes/page-82bf8b6f48cdc506.js +1 -0
  122. package/dashboard/.next/static/chunks/app/conformance/page-6bb8e3b372e38098.js +1 -0
  123. package/dashboard/.next/static/chunks/app/diagram/page-469cd7a6f183efba.js +1 -0
  124. package/dashboard/.next/static/chunks/app/flows/page-7872dd9141ba0b07.js +1 -0
  125. package/dashboard/.next/static/chunks/app/functions/page-5847bcb77a8e7edf.js +1 -0
  126. package/dashboard/.next/static/chunks/app/issues/page-1ffc64fe40439002.js +1 -0
  127. package/dashboard/.next/static/chunks/app/layout-6c6d2a0fd7c989d3.js +1 -0
  128. package/dashboard/.next/static/chunks/app/notes/page-8bcaa52304500098.js +1 -0
  129. package/dashboard/.next/static/chunks/app/page-d63800ddb072b77b.js +1 -0
  130. package/dashboard/.next/static/chunks/app/progress/page-e26554f655a62eef.js +1 -0
  131. package/dashboard/.next/static/chunks/app/report/page-18c04fb2f193b020.js +1 -0
  132. package/dashboard/.next/static/chunks/app/stats/page-67ff59fd69bed651.js +1 -0
  133. package/dashboard/.next/static/chunks/{b7167ec1.7afbab6f609e3326.js → b7167ec1.708a3d61698ca2e6.js} +1 -1
  134. package/dashboard/.next/static/chunks/c7ea4e13.3073a2f551aa5ac8.js +1 -0
  135. package/dashboard/.next/static/chunks/framework-a117d81bf1b91f9a.js +33 -0
  136. package/dashboard/.next/static/chunks/main-app-5662c64b50ba40d1.js +1 -0
  137. package/dashboard/.next/static/chunks/main-cc3a889b25e9aa68.js +1 -0
  138. package/dashboard/.next/static/chunks/pages/_app-308fef0bf9b328f2.js +1 -0
  139. package/dashboard/.next/static/chunks/pages/_error-c91b5eabd7ac9382.js +1 -0
  140. package/dashboard/.next/static/chunks/webpack-4de0e79bdd6a0418.js +1 -0
  141. package/dashboard/.next/static/css/1112cea2260b3926.css +3 -0
  142. package/dashboard/.next/static/media/39f449c8730c2295-s.woff2 +0 -0
  143. package/dashboard/.next/static/media/86f65e8637cc94e3-s.woff2 +0 -0
  144. package/dashboard/.next/static/media/8760c4774489e4ba-s.p.woff2 +0 -0
  145. package/dashboard/.next/static/media/9fabb9c65b63d798-s.woff2 +0 -0
  146. package/dashboard/.next/static/media/a1f87af3f44fadbb-s.woff2 +0 -0
  147. package/dashboard/.next/static/media/f9e1dbe9676d9bb6-s.woff2 +0 -0
  148. package/dashboard/.next/static/z5XBev05xDAkDrxWxAjNu/_buildManifest.js +1 -0
  149. package/dashboard/app/changes/ChangesClient.tsx +464 -0
  150. package/dashboard/app/changes/page.tsx +36 -0
  151. package/dashboard/app/issues/IssuesBoardClient.tsx +11 -1
  152. package/dashboard/app/layout.tsx +13 -1
  153. package/dashboard/app/notes/NotesClient.tsx +5 -0
  154. package/dashboard/app/page.tsx +42 -0
  155. package/dashboard/components/DashboardLayout.tsx +43 -18
  156. package/dist/analysis/code-model.d.ts +113 -0
  157. package/dist/analysis/code-model.d.ts.map +1 -0
  158. package/dist/analysis/code-model.js +529 -0
  159. package/dist/analysis/code-model.js.map +1 -0
  160. package/dist/analysis/diff.d.ts +64 -0
  161. package/dist/analysis/diff.d.ts.map +1 -0
  162. package/dist/analysis/diff.js +644 -0
  163. package/dist/analysis/diff.js.map +1 -0
  164. package/dist/commands/analyze.d.ts.map +1 -1
  165. package/dist/commands/analyze.js +18 -2
  166. package/dist/commands/analyze.js.map +1 -1
  167. package/dist/commands/diff.d.ts +26 -0
  168. package/dist/commands/diff.d.ts.map +1 -0
  169. package/dist/commands/diff.js +218 -0
  170. package/dist/commands/diff.js.map +1 -0
  171. package/dist/commands/init.d.ts.map +1 -1
  172. package/dist/commands/init.js +72 -9
  173. package/dist/commands/init.js.map +1 -1
  174. package/dist/commands/issue.d.ts.map +1 -1
  175. package/dist/commands/issue.js +4 -4
  176. package/dist/commands/issue.js.map +1 -1
  177. package/dist/commands/note.d.ts.map +1 -1
  178. package/dist/commands/note.js +30 -2
  179. package/dist/commands/note.js.map +1 -1
  180. package/dist/core/config.d.ts +9 -0
  181. package/dist/core/config.d.ts.map +1 -1
  182. package/dist/core/config.js +18 -0
  183. package/dist/core/config.js.map +1 -1
  184. package/dist/core/errors.d.ts +1 -1
  185. package/dist/core/errors.d.ts.map +1 -1
  186. package/dist/core/errors.js +16 -0
  187. package/dist/core/errors.js.map +1 -1
  188. package/dist/core/git.d.ts +24 -0
  189. package/dist/core/git.d.ts.map +1 -0
  190. package/dist/core/git.js +115 -0
  191. package/dist/core/git.js.map +1 -0
  192. package/dist/core/issues.d.ts +4 -2
  193. package/dist/core/issues.d.ts.map +1 -1
  194. package/dist/core/issues.js +67 -28
  195. package/dist/core/issues.js.map +1 -1
  196. package/dist/core/notes.d.ts +25 -1
  197. package/dist/core/notes.d.ts.map +1 -1
  198. package/dist/core/notes.js +34 -2
  199. package/dist/core/notes.js.map +1 -1
  200. package/dist/core/schema.d.ts +750 -53
  201. package/dist/core/schema.d.ts.map +1 -1
  202. package/dist/core/schema.js +153 -1
  203. package/dist/core/schema.js.map +1 -1
  204. package/dist/core/skills.d.ts +10 -4
  205. package/dist/core/skills.d.ts.map +1 -1
  206. package/dist/core/skills.js +100 -37
  207. package/dist/core/skills.js.map +1 -1
  208. package/dist/index.js +2 -0
  209. package/dist/index.js.map +1 -1
  210. package/dist/skills/ai-audit/LICENSE +21 -0
  211. package/dist/skills/ai-audit/SKILL.md +476 -0
  212. package/dist/skills/ai-audit/UPSTREAM.md +46 -0
  213. package/dist/skills/ai-audit/references/agent-prompts.md +133 -0
  214. package/dist/skills/ai-audit/references/assemble.sh +357 -0
  215. package/dist/skills/ai-audit/references/dedup-and-assembly.md +420 -0
  216. package/dist/skills/ai-audit/references/hacking-agents/access-control-agent.md +27 -0
  217. package/dist/skills/ai-audit/references/hacking-agents/asymmetry-agent.md +77 -0
  218. package/dist/skills/ai-audit/references/hacking-agents/boundary-agent.md +79 -0
  219. package/dist/skills/ai-audit/references/hacking-agents/economic-security-agent.md +35 -0
  220. package/dist/skills/ai-audit/references/hacking-agents/execution-trace-agent.md +33 -0
  221. package/dist/skills/ai-audit/references/hacking-agents/first-principles-agent.md +36 -0
  222. package/dist/skills/ai-audit/references/hacking-agents/flow-gap-agent.md +49 -0
  223. package/dist/skills/ai-audit/references/hacking-agents/invariant-agent.md +44 -0
  224. package/dist/skills/ai-audit/references/hacking-agents/math-precision-agent.md +48 -0
  225. package/dist/skills/ai-audit/references/hacking-agents/numerical-gap-agent.md +46 -0
  226. package/dist/skills/ai-audit/references/hacking-agents/periphery-agent.md +27 -0
  227. package/dist/skills/ai-audit/references/hacking-agents/shared-rules.md +61 -0
  228. package/dist/skills/ai-audit/references/hacking-agents/trust-gap-agent.md +40 -0
  229. package/dist/skills/ai-audit/references/hex-board.md +223 -0
  230. package/dist/skills/ai-audit/references/hex-export.sh +71 -0
  231. package/dist/skills/ai-audit/references/judging.md +75 -0
  232. package/dist/skills/ai-audit/references/report-formatting.md +385 -0
  233. package/dist/skills/ai-audit/references/report-language.md +151 -0
  234. package/dist/skills/ai-audit/references/senior-auditor-sop.md +63 -0
  235. package/dist/skills/generate-report.md +9 -3
  236. package/dist/skills/ingest-aa-report.md +11 -2
  237. package/dist/skills/init-audit.md +104 -2
  238. package/dist/skills/validate-all-findings.md +1 -1
  239. package/dist/skills/validate-finding.md +12 -7
  240. package/dist/skills/write-finding.md +8 -6
  241. package/dist/types/index.d.ts +7 -1
  242. package/dist/types/index.d.ts.map +1 -1
  243. package/package.json +2 -1
  244. package/dashboard/.next/server/app/_not-found.html +0 -1
  245. package/dashboard/.next/server/app/_not-found.meta +0 -6
  246. package/dashboard/.next/server/app/_not-found.rsc +0 -12
  247. package/dashboard/.next/server/app/diagram.html +0 -1
  248. package/dashboard/.next/server/app/diagram.meta +0 -5
  249. package/dashboard/.next/server/app/diagram.rsc +0 -10
  250. package/dashboard/.next/server/app/flows.html +0 -1
  251. package/dashboard/.next/server/app/flows.meta +0 -5
  252. package/dashboard/.next/server/app/flows.rsc +0 -10
  253. package/dashboard/.next/server/chunks/44.js +0 -1
  254. package/dashboard/.next/server/pages/404.html +0 -1
  255. package/dashboard/.next/static/ZYqkgvjnS38aMxfanyctA/_buildManifest.js +0 -1
  256. package/dashboard/.next/static/chunks/1015.3ab89142e5f44120.js +0 -226
  257. package/dashboard/.next/static/chunks/1151.b6ef5c786e587ed7.js +0 -1
  258. package/dashboard/.next/static/chunks/1199.a072929dbec89965.js +0 -148
  259. package/dashboard/.next/static/chunks/1375.d4d2f7fc9c9c2ff1.js +0 -43
  260. package/dashboard/.next/static/chunks/1799.83206776abbbf1fc.js +0 -9
  261. package/dashboard/.next/static/chunks/20154aaa.ccc347c04ab5ad4a.js +0 -1
  262. package/dashboard/.next/static/chunks/2077.7011a570c87aa7b1.js +0 -1
  263. package/dashboard/.next/static/chunks/2166.cc0fabeb2e89b840.js +0 -215
  264. package/dashboard/.next/static/chunks/2325.2c55cb9a6282ae3f.js +0 -24
  265. package/dashboard/.next/static/chunks/2694.92bbe252063e4786.js +0 -1
  266. package/dashboard/.next/static/chunks/275.0d761aa0e5b030b8.js +0 -34
  267. package/dashboard/.next/static/chunks/2781.8536b644a480aede.js +0 -93
  268. package/dashboard/.next/static/chunks/2805.a8d71d2f92bb6ba9.js +0 -1
  269. package/dashboard/.next/static/chunks/3017.e55781da9dd32d37.js +0 -1
  270. package/dashboard/.next/static/chunks/3205-728c260fbb4f89c6.js +0 -2
  271. package/dashboard/.next/static/chunks/3236.dff44fa7961d9d5e.js +0 -1
  272. package/dashboard/.next/static/chunks/3480.9451396ad7ee7613.js +0 -1
  273. package/dashboard/.next/static/chunks/3626.ba1cf848a9f2e93d.js +0 -64
  274. package/dashboard/.next/static/chunks/3865.a432a7910a2f5281.js +0 -90
  275. package/dashboard/.next/static/chunks/3887.c22cbfa3f095826c.js +0 -1
  276. package/dashboard/.next/static/chunks/3924-4a05057b5450abe1.js +0 -1
  277. package/dashboard/.next/static/chunks/3948.fe3c7d758568d98b.js +0 -287
  278. package/dashboard/.next/static/chunks/4728.07d87640a3e7dd0d.js +0 -24
  279. package/dashboard/.next/static/chunks/4787.4e5f6a0e0e40a583.js +0 -23
  280. package/dashboard/.next/static/chunks/5060.baca226af35ed016.js +0 -1
  281. package/dashboard/.next/static/chunks/5284.f949ac90c95ff143.js +0 -1
  282. package/dashboard/.next/static/chunks/5715.1524bcc9591e180b.js +0 -115
  283. package/dashboard/.next/static/chunks/6014.700ae4969b64d728.js +0 -104
  284. package/dashboard/.next/static/chunks/6024.4d23707c65514679.js +0 -79
  285. package/dashboard/.next/static/chunks/6177.e5c84cfc4c0dea51.js +0 -1
  286. package/dashboard/.next/static/chunks/618f8807-547c5614e1318888.js +0 -1
  287. package/dashboard/.next/static/chunks/6434.9481771c33195d29.js +0 -1
  288. package/dashboard/.next/static/chunks/6468.f4a3e8fa6accc6da.js +0 -77
  289. package/dashboard/.next/static/chunks/6540.86f367d7390738d4.js +0 -1
  290. package/dashboard/.next/static/chunks/6549.4d0d472df96429a5.js +0 -1
  291. package/dashboard/.next/static/chunks/690f35d0.3e40ca0930e4bbdb.js +0 -119
  292. package/dashboard/.next/static/chunks/7397-f6f4dddc7a20bfc1.js +0 -1
  293. package/dashboard/.next/static/chunks/7498-ea83cb9e30ec5491.js +0 -1
  294. package/dashboard/.next/static/chunks/7802.89aec9ee11680850.js +0 -80
  295. package/dashboard/.next/static/chunks/7973.8b526f589aca5d84.js +0 -79
  296. package/dashboard/.next/static/chunks/8216.1bead812eb126c35.js +0 -5
  297. package/dashboard/.next/static/chunks/8645.a5ca76f11edc9633.js +0 -1
  298. package/dashboard/.next/static/chunks/8928-60c623ee89d2e6ad.js +0 -1
  299. package/dashboard/.next/static/chunks/9173.2486ffca31131ec5.js +0 -1
  300. package/dashboard/.next/static/chunks/9178.469341860bf8caec.js +0 -1
  301. package/dashboard/.next/static/chunks/9466.e904660d38c03eea.js +0 -1
  302. package/dashboard/.next/static/chunks/9660.84a85811380c5f33.js +0 -1
  303. package/dashboard/.next/static/chunks/9720.67d4d0d15a96d691.js +0 -1
  304. package/dashboard/.next/static/chunks/9811.65e1d080c2d256af.js +0 -1
  305. package/dashboard/.next/static/chunks/app/_not-found/page-548ab392d0e890d1.js +0 -1
  306. package/dashboard/.next/static/chunks/app/access/page-3668562e7464eb5d.js +0 -1
  307. package/dashboard/.next/static/chunks/app/calls/page-d07f5b8664cc8303.js +0 -1
  308. package/dashboard/.next/static/chunks/app/conformance/page-2fede1d7b5f9265d.js +0 -1
  309. package/dashboard/.next/static/chunks/app/diagram/page-b228444265546495.js +0 -1
  310. package/dashboard/.next/static/chunks/app/flows/page-fa67783d8cd79cab.js +0 -1
  311. package/dashboard/.next/static/chunks/app/functions/page-686f0296639133a3.js +0 -1
  312. package/dashboard/.next/static/chunks/app/issues/page-98a298e1c1045c91.js +0 -1
  313. package/dashboard/.next/static/chunks/app/layout-49f2496c7637d931.js +0 -1
  314. package/dashboard/.next/static/chunks/app/notes/page-17af94c67ba79c00.js +0 -1
  315. package/dashboard/.next/static/chunks/app/page-24bac51dfe007c66.js +0 -1
  316. package/dashboard/.next/static/chunks/app/progress/page-427fb18da3afb061.js +0 -1
  317. package/dashboard/.next/static/chunks/app/report/page-796f2f4a8a5ac8f7.js +0 -1
  318. package/dashboard/.next/static/chunks/app/stats/page-db81f600a086f252.js +0 -1
  319. package/dashboard/.next/static/chunks/c7ea4e13.5effeeba6618bdb7.js +0 -1
  320. package/dashboard/.next/static/chunks/framework-cf6f5bdca6ba0184.js +0 -33
  321. package/dashboard/.next/static/chunks/main-63ff429eab01f5bf.js +0 -1
  322. package/dashboard/.next/static/chunks/main-app-9d2f6b8a47133e9b.js +0 -1
  323. package/dashboard/.next/static/chunks/pages/_app-6ad2b50514c24ab4.js +0 -1
  324. package/dashboard/.next/static/chunks/pages/_error-d5eb11c5c4626811.js +0 -1
  325. package/dashboard/.next/static/chunks/webpack-08869f2b18792e51.js +0 -1
  326. package/dashboard/.next/static/css/4a38d8f6f6b7a68f.css +0 -3
  327. package/dashboard/.next/static/media/438aa629764e75f3-s.woff2 +0 -0
  328. package/dashboard/.next/static/media/4c9affa5bc8f420e-s.p.woff2 +0 -0
  329. package/dashboard/.next/static/media/51251f8b9793cdb3-s.woff2 +0 -0
  330. package/dashboard/.next/static/media/875ae681bfde4580-s.woff2 +0 -0
  331. package/dashboard/.next/static/media/cc978ac5ee68c2b6-s.woff2 +0 -0
  332. package/dashboard/.next/static/media/e857b654a2caa584-s.woff2 +0 -0
  333. /package/dashboard/.next/static/{ZYqkgvjnS38aMxfanyctA → z5XBev05xDAkDrxWxAjNu}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6805],{16674:function(e,t,r){Promise.resolve().then(r.bind(r,3443))},3443:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return l}});var a=r(37821),s=r(58078),n=r(6870);function l(){var e;let[t,r]=(0,s.useState)([]),[l,o]=(0,s.useState)(0),[i,c]=(0,s.useState)(null),[d,u]=(0,s.useState)(!0);return((0,s.useEffect)(()=>{fetch("/api/flows").then(e=>e.json()).then(e=>{var t;r(null!==(t=e.flows)&&void 0!==t?t:[]),u(!1)}).catch(()=>u(!1))},[]),(0,s.useEffect)(()=>{if(0===t.length)return;let e=t[l];e&&(c(null),fetch("/api/mermaid?file=".concat(encodeURIComponent(e.filename))).then(e=>{if(!e.ok)throw Error("Failed to load flow");return e.json()}).then(e=>{var t;return c(null!==(t=e.syntax)&&void 0!==t?t:null)}).catch(()=>c(null)))},[t,l]),d)?(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"mb-sp-5 text-title font-semibold text-text-primary",children:"Flows"}),(0,a.jsx)("div",{className:"flex h-[600px] items-center justify-center rounded-md border border-border-default bg-surface-1",children:(0,a.jsx)(n.T,{label:"Loading flows..."})})]}):0===t.length?(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"mb-sp-5 text-title font-semibold text-text-primary",children:"Flows"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-md border border-dashed border-border-emphasis bg-surface-1 py-sp-8",children:[(0,a.jsx)("p",{className:"mb-2 text-heading font-medium text-text-primary",children:"Not Yet Generated"}),(0,a.jsx)("p",{className:"text-body text-text-tertiary",children:"Use the flows skill to generate flow diagrams"})]})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"mb-sp-5 text-title font-semibold text-text-primary",children:"Flows"}),t.length>1&&(0,a.jsx)("div",{className:"mb-sp-4 inline-flex overflow-x-auto rounded-md bg-surface-3 p-1",children:t.map((e,t)=>(0,a.jsx)("button",{type:"button",onClick:()=>o(t),className:"whitespace-nowrap rounded-sm px-sp-3 py-1.5 text-body font-medium ".concat(l===t?"bg-surface-2 text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"),children:e.name},e.filename))}),i?(0,a.jsx)(n.D,{syntax:i},null===(e=t[l])||void 0===e?void 0:e.filename):(0,a.jsx)("div",{className:"flex h-[600px] items-center justify-center rounded-md border border-border-default bg-surface-1",children:(0,a.jsx)(n.T,{label:"Loading flow diagram..."})})]})}},6870:function(e,t,r){"use strict";r.d(t,{D:function(){return l},T:function(){return n}});var a=r(37821),s=r(58078);function n(e){let{label:t="loading..."}=e;return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-sp-8",children:[(0,a.jsxs)("svg",{className:"h-5 w-5 animate-spin text-accent",viewBox:"0 0 24 24",fill:"none",children:[(0,a.jsx)("circle",{className:"opacity-20",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,a.jsx)("span",{className:"text-body text-text-secondary",children:t})]})}function l(e){let{syntax:t}=e,l=(0,s.useRef)(null),o=(0,s.useRef)(null),[i,c]=(0,s.useState)(null),[d,u]=(0,s.useState)(!0),[x,m]=(0,s.useState)(1),[f,h]=(0,s.useState)({x:0,y:0}),[b,p]=(0,s.useState)(!1),y=(0,s.useRef)({x:0,y:0}),g=(0,s.useRef)({x:0,y:0}),v=(0,s.useMemo)(()=>(function(e){let t=e.split("\n"),r=[],a=[],s=[],n=!1;for(let e of t){if(n){e.startsWith("%%")&&a.push(e.replace(/^%%\s*/,""));continue}if(e.trim().startsWith("%% --- Legend")){n=!0;continue}e.startsWith("%%")&&0===s.length?r.push(e.replace(/^%%\s*/,"")):s.push(e)}return{overview:r.join(" ").trim(),legend:a.filter(e=>e.trim()).map(e=>e.trim()),syntax:s.join("\n")}})(t),[t]);(0,s.useEffect)(()=>{let e=!1;return u(!0),async function(){try{let t=(await Promise.all([r.e(8382),r.e(6629),r.e(7973)]).then(r.bind(r,84282))).default;t.initialize({startOnLoad:!1,theme:"base",themeVariables:{background:"#1c1c1e",mainBkg:"#27272a",primaryColor:"#27272a",primaryBorderColor:"rgba(91,108,240,0.35)",primaryTextColor:"#ecedf0",lineColor:"rgba(91,108,240,0.45)",secondaryColor:"#313135",tertiaryColor:"#3c3c42",clusterBkg:"#222225",clusterBorder:"rgba(91,108,240,0.15)",edgeLabelBackground:"#1c1c1e",titleColor:"#9b9ca6",fontFamily:"Manrope, system-ui, sans-serif",fontSize:"12px",labelTextColor:"#ecedf0",nodeBorder:"rgba(91,108,240,0.35)",actorBkg:"#27272a",actorBorder:"rgba(91,108,240,0.35)",actorTextColor:"#ecedf0",actorLineColor:"rgba(91,108,240,0.25)",signalColor:"rgba(91,108,240,0.45)",signalTextColor:"#9b9ca6"},securityLevel:"loose",fontFamily:"Manrope, system-ui, sans-serif"});let a="mermaid-".concat(Date.now()),{svg:s}=await t.render(a,v.syntax);if(!e&&o.current){o.current.innerHTML=s;let e=o.current.querySelector("svg");if(e&&(e.style.maxWidth="none",e.style.height="auto",l.current)){let t=l.current.clientWidth-48,r=l.current.clientHeight-48,a=e.width.baseVal.value||e.getBoundingClientRect().width,s=e.height.baseVal.value||e.getBoundingClientRect().height;a>0&&s>0&&(m(Math.min(t/a,r/s,1)),h({x:0,y:0}))}u(!1)}}catch(t){e||(c(t instanceof Error?t.message:String(t)),u(!1))}}(),()=>{e=!0}},[v.syntax]);let j=(0,s.useCallback)(e=>{m(t=>Math.min(Math.max(.25,t+e),4))},[]),w=(0,s.useCallback)(()=>{m(1),h({x:0,y:0})},[]),N=(0,s.useCallback)(e=>{e.preventDefault(),j(e.deltaY>0?-.1:.1)},[j]),C=(0,s.useCallback)(e=>{0===e.button&&(p(!0),y.current={x:e.clientX,y:e.clientY},g.current={...f})},[f]),k=(0,s.useCallback)(e=>{b&&h({x:g.current.x+(e.clientX-y.current.x),y:g.current.y+(e.clientY-y.current.y)})},[b]),M=(0,s.useCallback)(()=>{p(!1)},[]);return i?(0,a.jsx)("div",{className:"flex h-[600px] items-center justify-center rounded-md border border-severity-critical/30 bg-severity-critical/5",children:(0,a.jsxs)("div",{className:"max-w-lg text-center",children:[(0,a.jsx)("p",{className:"mb-2 text-severity-critical",children:"Failed to render diagram"}),(0,a.jsx)("pre",{className:"whitespace-pre-wrap text-caption text-severity-critical/60",children:i})]})}):(0,a.jsxs)("div",{children:[v.overview&&(0,a.jsx)("p",{className:"mb-2 text-body text-text-secondary",children:v.overview}),(0,a.jsxs)("div",{className:"relative rounded-md border border-border-default bg-surface-1",children:[d&&(0,a.jsx)("div",{className:"absolute inset-0 z-20 flex items-center justify-center bg-surface-1",children:(0,a.jsx)(n,{label:"rendering diagram"})}),(0,a.jsx)("div",{ref:l,className:"h-[700px] overflow-hidden cursor-grab active:cursor-grabbing",onWheel:N,onMouseDown:C,onMouseMove:k,onMouseUp:M,onMouseLeave:M,children:(0,a.jsx)("div",{ref:o,className:"flex h-full w-full items-center justify-center p-sp-6",style:{transform:"translate(".concat(f.x,"px, ").concat(f.y,"px) scale(").concat(x,")"),transformOrigin:"center center",transition:b?"none":"transform 0.1s ease-out"}})}),(0,a.jsxs)("div",{className:"absolute bottom-3 right-3 z-10 flex items-center gap-1 rounded-md bg-surface-2 p-1 shadow-lg border border-border-default",children:[(0,a.jsx)("button",{type:"button",onClick:()=>j(.2),"aria-label":"Zoom in",className:"rounded px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:"+"}),(0,a.jsx)("button",{type:"button",onClick:()=>j(-.2),"aria-label":"Zoom out",className:"rounded px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:"−"}),(0,a.jsx)("button",{type:"button",onClick:w,"aria-label":"Reset zoom",className:"rounded px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:"⟳"}),(0,a.jsxs)("span",{className:"px-2 text-caption text-text-tertiary",children:[Math.round(100*x),"%"]})]}),v.legend.length>0&&(0,a.jsx)("div",{className:"absolute bottom-3 left-3 z-10 flex flex-wrap gap-x-3 gap-y-1 rounded-md bg-surface-2 px-3 py-2 text-caption font-mono text-text-tertiary border border-border-default",children:v.legend.map((e,t)=>(0,a.jsx)("span",{children:e},t))})]})]})}}},function(e){e.O(0,[7115,3205,1744],function(){return e(e.s=16674)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5419],{38750:function(e,t,a){Promise.resolve().then(a.bind(a,37780))},37780:function(e,t,a){"use strict";a.d(t,{FunctionsClient:function(){return d}});var n=a(37821),i=a(35640),l=a(93775);let r={external:"bg-[var(--critical)]/15 text-[var(--critical)]",public:"bg-[var(--high)]/15 text-[var(--high)]",internal:"bg-[var(--low)]/15 text-[var(--low)]",private:"bg-[var(--neutral)]/15 text-[var(--neutral)]"};function c(e){var t;let{visibility:a}=e,i=null!==(t=r[a])&&void 0!==t?t:"bg-[var(--neutral)]/15 text-[var(--neutral)]";return(0,n.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(i),children:a})}function s(e){let{items:t,color:a="default"}=e;if(0===t.length)return(0,n.jsx)("span",{className:"text-text-tertiary",children:"--"});let i="yellow"===a?"bg-[var(--medium)]/10 text-[var(--medium)]":"red"===a?"bg-[var(--critical)]/10 text-[var(--critical)]":"bg-surface-3 text-text-secondary";return(0,n.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>(0,n.jsx)("span",{className:"inline-flex items-center rounded-sm px-1.5 py-0.5 font-mono text-caption ".concat(i),children:e},e))})}let o=[{id:"contract",header:"Contract",accessorKey:"contract",enableColumnFilter:!0,cell:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"font-medium text-text-primary",children:e.contract}),e.inherited_from&&(0,n.jsxs)("span",{className:"ml-1.5 text-caption text-text-tertiary",children:["← ",e.inherited_from]})]})},{id:"name",header:"Function",accessorKey:"name",cell:e=>(0,n.jsx)("span",{className:"font-mono text-body text-text-secondary",children:e.name})},{id:"visibility",header:"Visibility",accessorKey:"visibility",enableColumnFilter:!0,cell:e=>(0,n.jsx)(c,{visibility:e.visibility})},{id:"state",header:"State",accessorKey:"state",enableColumnFilter:!0,cell:e=>{let t="writable"===e.state?"bg-[var(--high)]/15 text-[var(--high)]":"bg-[var(--low)]/15 text-[var(--low)]";return(0,n.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(t),children:e.state})}},{id:"payable",header:"Payable",accessorKey:"payable",enableColumnFilter:!0,cell:e=>{let t="payable"===e.payable?"bg-[var(--success)]/15 text-[var(--success)]":"bg-[var(--neutral)]/15 text-[var(--neutral)]";return(0,n.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(t),children:e.payable})}},{id:"modifiers",header:"Modifiers",accessorKey:"modifiers",cell:e=>(0,n.jsx)(s,{items:e.modifiers})},{id:"external_calls",header:"External Calls",accessorKey:"external_calls",cell:e=>(0,n.jsx)(s,{items:e.external_calls,color:"red"})},{id:"location",header:"Location",accessorKey:"evidence",cell:e=>(0,n.jsx)(l.i,{file:e.evidence.file,lineStart:e.evidence.line_start,lineEnd:e.evidence.line_end,snippet:e.evidence.snippet})}];function d(e){let{rows:t}=e;return(0,n.jsx)(i.v,{columns:o,data:t,defaultOpen:!0})}}},function(e){e.O(0,[8452,8928,7115,3205,1744],function(){return e(e.s=38750)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4521],{84260:function(e,t,n){Promise.resolve().then(n.bind(n,99754))},99754:function(e,t,n){"use strict";n.d(t,{IssuesBoardClient:function(){return p}});var r=n(37821),a=n(58078),o=n(63924),s=n(32952),i=n(29487);function c(e,t){var n;let r=new Set,a=e.code_locations.map(e=>e.file).filter(e=>e&&!r.has(e)&&r.add(e)).map(e=>(function(e,t){if(t.repositoryUrl&&t.commit){let n=t.repositoryUrl.replace(/\/+$/,"");return"[`".concat(e,"`](").concat(n,"/blob/").concat(t.commit,"/").concat(e,")")}return"[`".concat(e,"`]()")})(e,t)).join(", "),o=e.resolution||"Unresolved",s=null!==(n=e.update_from_client)&&void 0!==n?n:"";return["**File(s)**: ".concat(a),"","**Description**: ".concat(function(e){if(!e)return e;let t=!1,n="";return e.split("\n").map(e=>{let r=e.match(/^\s*(```+|~~~+)/);if(r)return t?r[1][0]===n&&(t=!1,n=""):(t=!0,n=r[1][0]),e;if(t)return e;let a=e.match(/^\s*#{1,6}\s+(.*\S)\s*$/);return a?"**".concat(a[1],"**"):/^\s*(-{3,}|\*{3,}|_{3,})\s*$/.test(e)?"":e}).join("\n")}(e.description)),"","**Recommendation(s)**: ".concat(e.recommendation),"","**Status**: ".concat(o),"","**Update from the client**: ".concat(s)].join("\n")}let l=[{id:"potential",label:"Potential",description:"Awaiting validation"},{id:"verified",label:"Verified",description:"Confirmed, ready to push"},{id:"synced",label:"Synced to GitHub",description:"On GitHub — edit there, not here"},{id:"invalid",label:"Rejected",description:"Not in the report — incorrect, or valid-but-by-design"},{id:"duplicate",label:"Duplicate",description:"Covered by another entry"}],d={Critical:0,High:1,Medium:2,Low:3,Info:4},u=["Critical","High","Medium","Low","Info"],x=["Fixed","Mitigated","Acknowledged","Not Fixed","Unresolved"];function p(e){var t;let{issues:n,formatCtx:s={}}=e,[i,c]=(0,a.useState)(n),[u,x]=(0,a.useState)(null),[p,f]=(0,a.useState)("all");(0,a.useEffect)(()=>{c(n)},[n]);let h=(0,o.Dy)((0,o.VT)(o.we,{activationConstraint:{distance:4}})),y=(0,a.useMemo)(()=>"all"===p?i:i.filter(e=>e.source===p),[i,p]),g=(0,a.useMemo)(()=>{let e={potential:[],verified:[],synced:[],invalid:[],duplicate:[]};for(let t of y)e[t.column].push(t);for(let t of Object.values(e))t.sort((e,t)=>{var n,r;return(null!==(n=d[e.severity])&&void 0!==n?n:5)-(null!==(r=d[t.severity])&&void 0!==r?r:5)||e.id.localeCompare(t.id)});return e},[y]),j=(0,a.useMemo)(()=>{let e={potential:0,verified:0,synced:0,invalid:0,duplicate:0};for(let t of i)e[t.column]++;return e},[i]),N=(0,a.useCallback)(async(e,t)=>{c(n=>n.map(n=>n.id===e?{...n,column:t,status:function(e){switch(e){case"potential":return"pending_validation";case"verified":return"verified";case"synced":return"synced";case"invalid":return"rejected";case"duplicate":return"duplicate"}}(t),duplicate_of:"duplicate"===t?n.duplicate_of:null}:n));try{let n=await fetch("/api/issues/".concat(encodeURIComponent(e),"/move"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({column:t})});if(!n.ok){var r;let e=await n.json().catch(()=>({}));throw Error(null!==(r=e.error)&&void 0!==r?r:"move failed")}}catch(t){console.error(t),c(t=>t.map(t=>{var r;return t.id===e&&null!==(r=n.find(t=>t.id===e))&&void 0!==r?r:t}))}},[n]),w=(0,a.useCallback)(async(e,t)=>{c(n=>n.map(n=>n.id===e?{...n,...t}:n));try{let r=await fetch("/api/issues/".concat(encodeURIComponent(e)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){var n;let e=await r.json().catch(()=>({}));throw Error(null!==(n=e.error)&&void 0!==n?n:"update failed")}}catch(e){console.error(e)}},[]),_=null!==(t=i.find(e=>e.id===u))&&void 0!==t?t:null;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("header",{className:"mb-6 flex flex-wrap items-end justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-title font-semibold text-text-primary",children:"Issues"}),(0,r.jsxs)("p",{className:"mt-1 text-body text-text-secondary",children:[i.length," total — ",j.potential," potential, ",j.verified," verified,"," ",j.synced," synced, ",j.invalid," invalid, ",j.duplicate," duplicate. Drag a card between columns; click to edit. Synced cards are read-only (edit on GitHub)."]})]}),(0,r.jsx)(m,{value:p,onChange:f})]}),(0,r.jsx)(o.LB,{sensors:h,onDragEnd:e=>{let{active:t,over:n}=e;if(!n)return;let r=n.id,a=t.id,o=i.find(e=>e.id===a);o&&o.column!==r&&"synced"!==r&&"synced"!==o.column&&N(a,r)},children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-5",children:l.map(e=>(0,r.jsx)(b,{column:e,issues:g[e.id],onOpen:x},e.id))})}),_&&(0,r.jsx)(v,{issue:_,formatCtx:s,onClose:()=>x(null),onSave:e=>w(_.id,e)})]})}function m(e){let{value:t,onChange:n}=e;return(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:[{id:"all",label:"All sources"},{id:"manual",label:"Manual"},{id:"ai-audit",label:"AI audit"},{id:"auditagent",label:"AuditAgent"},{id:"conformance",label:"Conformance"},{id:"github",label:"GitHub"},{id:"prior-audit",label:"Prior audit"}].map(e=>{let a=t===e.id;return(0,r.jsx)("button",{type:"button",onClick:()=>n(e.id),className:"rounded-md px-2.5 py-1 text-caption font-medium ".concat(a?"bg-accent text-surface-0":"bg-surface-2 text-text-secondary hover:text-text-primary"),children:e.label},e.id)})})}function b(e){let{column:t,issues:n,onOpen:a}=e,{isOver:s,setNodeRef:i}=(0,o.Zj)({id:t.id,disabled:"synced"===t.id});return(0,r.jsxs)("section",{ref:i,"aria-label":t.label,className:"flex flex-col gap-2 rounded-lg border bg-surface-1 p-3 transition-colors ".concat(s?"border-accent bg-surface-2":"border-border-subtle"),children:[(0,r.jsxs)("header",{className:"flex items-baseline justify-between",children:[(0,r.jsx)("h2",{className:"text-heading font-medium text-text-primary",children:t.label}),(0,r.jsx)("span",{className:"text-caption text-text-tertiary",children:n.length})]}),(0,r.jsx)("p",{className:"text-caption text-text-tertiary",children:t.description}),(0,r.jsxs)("div",{className:"mt-1 flex flex-col gap-2",children:[n.map(e=>(0,r.jsx)(f,{issue:e,onOpen:a},e.id)),0===n.length&&(0,r.jsx)("div",{className:"rounded-md border border-dashed border-border-subtle py-6 text-center text-caption text-text-tertiary",children:"Empty"})]})]})}function f(e){let{issue:t,onOpen:n}=e,a="synced"===t.column,{attributes:i,listeners:c,setNodeRef:l,isDragging:d,transform:u}=(0,o.O1)({id:t.id,disabled:a}),x=u?{transform:"translate3d(".concat(u.x,"px, ").concat(u.y,"px, 0)"),zIndex:30}:{};return(0,r.jsxs)("article",{ref:l,style:x,...a?{}:i,...a?{}:c,onClick:e=>{u||(e.stopPropagation(),n(t.id))},className:"group rounded-md border bg-surface-0 p-3 text-left ".concat(a?"cursor-pointer":"cursor-grab active:cursor-grabbing"," ").concat(d?"border-accent shadow-lg":"border-border-subtle hover:border-border-default"),children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,r.jsx)("span",{className:"font-mono text-caption text-text-tertiary",children:t.id}),(0,r.jsx)(s.$,{severity:t.severity})]}),(0,r.jsx)("h3",{title:t.title,className:"mt-1 text-body font-medium text-text-primary line-clamp-3",children:t.title}),(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5 text-caption",children:[(0,r.jsx)(h,{source:t.source}),(0,r.jsx)(y,{issue:t}),"invalid"===t.column&&(0,r.jsx)("span",{className:"rounded-md px-1.5 py-0.5 ".concat("Acknowledged"===t.resolution?"bg-[var(--medium)]/15 text-[var(--medium)]":"bg-surface-2 text-text-secondary"),title:"Acknowledged"===t.resolution?"Valid but by-design / not a security issue":"Factually incorrect (false positive)",children:"Acknowledged"===t.resolution?"By-design":"Invalid"}),t.duplicate_of&&(0,r.jsxs)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-secondary",children:["dup of ",t.duplicate_of]}),"passing"===t.poc_status&&(0,r.jsx)("span",{className:"rounded-md bg-[var(--low)]/15 px-1.5 py-0.5 text-[var(--low)]",children:"PoC ✓"}),"failing"===t.poc_status&&(0,r.jsx)("span",{className:"rounded-md bg-[var(--critical)]/15 px-1.5 py-0.5 text-[var(--critical)]",children:"PoC ✕"}),t.resolution&&"invalid"!==t.column&&(0,r.jsx)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-secondary",children:t.resolution})]}),t.match_signals&&(0,r.jsx)("div",{className:"mt-2 text-caption text-text-tertiary",children:(0,r.jsx)("span",{className:"font-mono",children:[t.match_signals.contract?"contract":null,t.match_signals.function?"function":null,"different"!==t.match_signals.root_cause?"rc:".concat(t.match_signals.root_cause):null,"different"!==t.match_signals.attack_vector?"av:".concat(t.match_signals.attack_vector):null].filter(Boolean).join(" \xb7 ")})})]})}function h(e){var t;let{source:n}=e;return(0,r.jsx)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-tertiary",children:null!==(t=({manual:"Manual",auditagent:"AuditAgent","ai-audit":"AI audit",conformance:"Conformance",github:"GitHub","prior-audit":"Prior audit"})[n])&&void 0!==t?t:n})}function y(e){var t,n;let{issue:a}=e,o=null!==(t=a.sync_state)&&void 0!==t?t:"none";if("none"===o)return null;if("unsynced"===o)return(0,r.jsx)("span",{title:"Run /sync-issues to push verified findings to GitHub.",className:"rounded-md border border-dashed border-border-default px-1.5 py-0.5 text-text-tertiary",children:"GH unsynced"});if("conflict"===o)return(0,r.jsx)("span",{title:"Local and remote diverged. Re-run /sync-issues to reconcile.",className:"rounded-md bg-[var(--critical)]/15 px-1.5 py-0.5 text-[var(--critical)]",children:"GH conflict"});let s="synced_closed"===o,i="GH #".concat(null!==(n=a.github_issue_number)&&void 0!==n?n:"?"," ").concat(s?"closed":"open"),c=s?"bg-surface-2 text-text-tertiary":"bg-[var(--low)]/15 text-[var(--low)]";return a.github_issue_url?(0,r.jsx)("a",{href:a.github_issue_url,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"rounded-md px-1.5 py-0.5 hover:underline ".concat(c),children:i}):(0,r.jsx)("span",{className:"rounded-md px-1.5 py-0.5 ".concat(c),children:i})}function v(e){var t,n,o;let{issue:s,formatCtx:l,onClose:d,onSave:p}=e,[m,b]=(0,a.useState)(s.title),[f,v]=(0,a.useState)(s.severity),[j,N]=(0,a.useState)(s.description),[w,_]=(0,a.useState)(s.recommendation),[C,k]=(0,a.useState)(null!==(t=s.resolution)&&void 0!==t?t:""),[S,H]=(0,a.useState)(null!==(n=s.update_from_client)&&void 0!==n?n:""),[M,G]=(0,a.useState)(!1),[I,A]=(0,a.useState)(!1),[P,E]=(0,a.useState)(!1),R=(0,a.useRef)(null),T="synced"===s.status;(0,a.useEffect)(()=>{var e;null===(e=R.current)||void 0===e||e.focus()},[]);let O=async()=>{let e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"## [".concat(e.severity,"] ").concat(e.title,"\n\n").concat(c(e,t),"\n\n---\n")}({...s,title:m,severity:f,description:j,recommendation:w,resolution:C||void 0,update_from_client:S||void 0},l);try{await navigator.clipboard.writeText(e),A(!0),setTimeout(()=>A(!1),1500)}catch(e){}},U=async()=>{G(!0),await p({title:m,severity:f,description:j,recommendation:w,resolution:C||void 0,update_from_client:S||void 0}),G(!1),E(!1)};return(0,r.jsx)("div",{ref:R,tabIndex:-1,className:"fixed inset-0 z-50 flex items-center justify-center p-4 outline-none",style:{background:"var(--overlay-bg)"},onClick:d,onKeyDown:e=>{"Escape"===e.key&&d()},children:(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Issue ".concat(s.id),className:"relative flex h-[85vh] w-full max-w-4xl flex-col overflow-hidden border border-border-emphasis bg-surface-1 shadow-2xl",style:{borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-accent)"},onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-border-default bg-surface-2 px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-caption",children:[(0,r.jsx)("span",{className:"font-mono text-body text-text-tertiary",children:s.id}),(0,r.jsx)(h,{source:s.source}),(0,r.jsx)(y,{issue:s})]}),(0,r.jsx)("button",{type:"button",onClick:d,"aria-label":"Close",className:"rounded p-1 text-text-tertiary hover:bg-surface-3 hover:text-text-primary",children:(0,r.jsx)("svg",{className:"h-5 w-5","aria-hidden":"true",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:[T&&(0,r.jsxs)("div",{className:"mb-4 rounded-md border border-border-default bg-surface-2 px-3 py-2 text-caption text-text-secondary",children:["This issue is synced to GitHub and is read-only here. Edit it on GitHub, then run"," ",(0,r.jsx)("span",{className:"font-mono",children:"/sync-issues"})," to pull the changes back."]}),P?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g,{label:"Title",children:(0,r.jsx)("input",{type:"text",value:m,onChange:e=>b(e.target.value),disabled:T,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-3",children:[(0,r.jsx)(g,{label:"Severity",children:(0,r.jsx)("select",{value:f,onChange:e=>v(e.target.value),disabled:T,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60",children:u.map(e=>(0,r.jsx)("option",{value:e,children:e},e))})}),(0,r.jsx)(g,{label:"Resolution (verified only)",children:(0,r.jsxs)("select",{value:C,onChange:e=>k(e.target.value),disabled:T,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60",children:[(0,r.jsx)("option",{value:"",children:"— none —"}),x.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})})]}),(0,r.jsx)(g,{label:"Description",className:"mt-3",children:(0,r.jsx)("textarea",{value:j,onChange:e=>N(e.target.value),rows:8,disabled:T,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsx)(g,{label:"Recommendation",className:"mt-3",children:(0,r.jsx)("textarea",{value:w,onChange:e=>_(e.target.value),rows:4,disabled:T,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsx)(g,{label:"Update from the client",className:"mt-3",children:(0,r.jsx)("textarea",{value:S,onChange:e=>H(e.target.value),rows:4,disabled:T,placeholder:"How the client responded — used by /generate-report.",className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(i.MarkdownRenderer,{content:"**Title**: ".concat(s.title,"\n\n**Severity**: ").concat(s.severity,"\n\n").concat(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(e,t)}(s,l))})}),s.code_locations.length>0&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption font-medium text-text-tertiary",children:"Code locations"}),(0,r.jsx)("ul",{className:"space-y-1 font-mono text-caption text-text-secondary",children:s.code_locations.map((e,t)=>(0,r.jsx)("li",{children:e.file},"".concat(e.file,"-").concat(t)))})]}),s.match_signals&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption font-medium text-text-tertiary",children:"Duplicate signals"}),(0,r.jsx)("p",{className:"text-caption text-text-secondary",children:null!==(o=s.reasoning)&&void 0!==o?o:"Matched against another entry."}),(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap gap-1.5 font-mono text-caption text-text-tertiary",children:[(0,r.jsxs)("span",{children:["contract: ",s.match_signals.contract?"✓":"—"]}),(0,r.jsxs)("span",{children:["function: ",s.match_signals.function?"✓":"—"]}),(0,r.jsxs)("span",{children:["root_cause: ",s.match_signals.root_cause]}),(0,r.jsxs)("span",{children:["attack_vector: ",s.match_signals.attack_vector]})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 border-t border-border-default bg-surface-2 px-4 py-3",children:[(0,r.jsx)("button",{type:"button",onClick:O,className:"rounded-md border border-border-default px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:I?"Copied!":"Copy as HackMD"}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:P?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>E(!1),className:"rounded-md px-3 py-1.5 text-body text-text-secondary hover:text-text-primary",children:"Cancel"}),(0,r.jsx)("button",{type:"button",onClick:U,disabled:M,className:"rounded-md bg-accent px-3 py-1.5 text-body font-medium text-surface-0 hover:bg-accent-secondary disabled:opacity-50",children:M?"Saving…":"Save"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:d,className:"rounded-md px-3 py-1.5 text-body text-text-secondary hover:text-text-primary",children:"Close"}),(0,r.jsx)("button",{type:"button",onClick:()=>E(!0),disabled:T,title:T?"Synced to GitHub — edit it there, then run /sync-issues to pull the changes back.":void 0,className:"rounded-md bg-accent px-3 py-1.5 text-body font-medium text-surface-0 hover:bg-accent-secondary disabled:cursor-not-allowed disabled:opacity-40",children:"Edit"})]})})]})]})})}function g(e){let{label:t,className:n,children:a}=e;return(0,r.jsxs)("label",{className:"block ".concat(null!=n?n:""),children:[(0,r.jsx)("span",{className:"mb-1 block text-caption font-medium text-text-tertiary",children:t}),a]})}},29487:function(e,t,n){"use strict";n.d(t,{MarkdownRenderer:function(){return s},T:function(){return i}});var r=n(37821),a=n(48525),o=n(45592);function s(e){let{content:t,className:n}=e;return(0,r.jsx)("div",{className:"prose max-w-none\n prose-headings:text-text-primary\n prose-p:text-text-secondary\n prose-strong:text-text-primary\n prose-code:text-accent\n prose-code:before:content-none\n prose-code:after:content-none\n prose-pre:bg-surface-0\n prose-pre:border\n prose-pre:border-border-default\n prose-a:text-accent\n prose-a:no-underline\n hover:prose-a:underline\n prose-th:text-text-primary\n prose-td:text-text-secondary\n prose-hr:border-border-default\n prose-blockquote:border-border-emphasis\n prose-blockquote:text-text-secondary\n prose-li:text-text-secondary\n ".concat(null!=n?n:""),children:(0,r.jsx)(a.UG,{remarkPlugins:[o.Z],children:t})})}function i(e){let{children:t}=e;return(0,r.jsx)(a.UG,{remarkPlugins:[o.Z],components:{p:e=>{let{children:t}=e;return(0,r.jsx)(r.Fragment,{children:t})},code:e=>{let{children:t}=e;return(0,r.jsx)("code",{className:"rounded bg-surface-0 px-1 py-0.5 font-mono text-[0.85em] text-accent",children:t})},strong:e=>{let{children:t}=e;return(0,r.jsx)("strong",{className:"font-semibold text-text-primary",children:t})},a:e=>{let{href:t,children:n}=e;return(0,r.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",className:"text-accent hover:underline",children:n})}},children:t})}},32952:function(e,t,n){"use strict";n.d(t,{$:function(){return o}});var r=n(37821);let a={Critical:"bg-[var(--critical)]/18 text-[var(--critical)]",High:"bg-[var(--high)]/18 text-[var(--high)]",Medium:"bg-[var(--medium)]/18 text-[var(--medium)]",Low:"bg-[var(--low)]/18 text-[var(--low)]",Info:"bg-[var(--info)]/18 text-[var(--info)]"};function o(e){var t;let{severity:n}=e,o=null!==(t=a[n])&&void 0!==t?t:a.Info;return(0,r.jsx)("span",{className:"inline-flex items-center rounded-md px-2 py-0.5 text-caption font-medium ".concat(o),children:n})}}},function(e){e.O(0,[7397,3924,7115,3205,1744],function(){return e(e.s=84260)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{69640:function(e,t,r){Promise.resolve().then(r.t.bind(r,13812,23)),Promise.resolve().then(r.bind(r,92198)),Promise.resolve().then(r.bind(r,30274)),Promise.resolve().then(r.bind(r,4595)),Promise.resolve().then(r.t.bind(r,41600,23)),Promise.resolve().then(r.t.bind(r,55256,23))},92198:function(e,t,r){"use strict";r.d(t,{CommandPalette:function(){return i}});var n=r(37821),a=r(58078),s=r(90168);let o=r(30274).p.flatMap(e=>e.items.map(t=>({href:t.href,label:"".concat(e.label," / ").concat(t.label)})));function i(){let[e,t]=(0,a.useState)(!1),[r,i]=(0,a.useState)(""),[l,c]=(0,a.useState)(0),d=(0,a.useRef)(null),u=(0,s.useRouter)(),h=r.trim()?o.filter(e=>e.label.toLowerCase().includes(r.toLowerCase())||e.href.includes(r.toLowerCase())):o;(0,a.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),t(e=>!e),i(""),c(0)),"Escape"===e.key&&t(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),(0,a.useEffect)(()=>{e&&setTimeout(()=>{var e;return null===(e=d.current)||void 0===e?void 0:e.focus()},50)},[e]),(0,a.useEffect)(()=>c(0),[r]);let m=e=>{u.push(e),t(!1),i("")};return e?(0,n.jsx)("div",{className:"fixed inset-0 z-[9000] flex items-start justify-center px-4 pt-[12vh]",style:{background:"var(--overlay-bg)"},onClick:()=>t(!1),children:(0,n.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Quick navigation",className:"w-full max-w-lg rounded-lg border border-border-default bg-surface-1 shadow-lg",onClick:e=>e.stopPropagation(),children:[(0,n.jsxs)("div",{className:"flex items-center border-b border-border-default px-4 py-3 gap-2",children:[(0,n.jsx)("span",{className:"text-accent text-body font-medium shrink-0","aria-hidden":"true",children:">"}),(0,n.jsx)("input",{ref:d,type:"text",value:r,onChange:e=>i(e.target.value),placeholder:"search pages...","aria-label":"Search pages",className:"flex-1 bg-transparent text-body text-text-primary placeholder-text-tertiary outline-none",onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),c(e=>Math.min(e+1,h.length-1))):"ArrowUp"===e.key?(e.preventDefault(),c(e=>Math.max(e-1,0))):"Enter"===e.key&&h[l]?m(h[l].href):"Tab"===e.key&&e.preventDefault()}}),(0,n.jsx)("kbd",{className:"shrink-0 border border-border-default px-1.5 py-0.5 text-caption text-text-tertiary",style:{borderRadius:"var(--radius-sm)"},children:"ESC"})]}),(0,n.jsx)("div",{className:"max-h-72 overflow-y-auto py-1",children:0===h.length?(0,n.jsx)("div",{className:"px-4 py-3 text-body text-text-tertiary",children:"no results"}):h.map((e,t)=>(0,n.jsxs)("button",{type:"button",className:"flex w-full items-center gap-3 px-4 py-2.5 text-left text-body focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent ".concat(t===l?"bg-accent-subtle text-accent":"text-text-secondary hover:bg-surface-2 hover:text-text-primary"),onClick:()=>m(e.href),onMouseEnter:()=>c(t),children:[(0,n.jsx)("span",{className:"text-text-tertiary text-caption shrink-0",children:t===l?">":" "}),(0,n.jsx)("span",{children:e.label}),(0,n.jsx)("span",{className:"ml-auto text-caption text-text-tertiary shrink-0",children:e.href})]},e.href))})]})}):null}},30274:function(e,t,r){"use strict";r.d(t,{DashboardLayout:function(){return x},p:function(){return m}});var n=r(37821),a=r(14233),s=r(90168),o=r(4595),i=r(58078);function l(e,t){let r=Math.round((t.getTime()-e.getTime())/1e3);return r<5?"just now":r<60?"".concat(r,"s ago"):r<3600?"".concat(Math.round(r/60),"m ago"):"".concat(Math.round(r/3600),"h ago")}function c(){let e=(0,s.useRouter)(),[t,r]=(0,i.useState)(()=>new Date),[a,o]=(0,i.useState)(!1),[c,d]=(0,i.useState)(()=>new Date),[u,h]=(0,i.useState)(null),m=(0,i.useRef)(null),f=()=>{fetch("/api/github-status",{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{if(e&&"string"==typeof e.last_synced_at){var t;h({repo:null!==(t=e.repo)&&void 0!==t?t:"",last_synced_at:e.last_synced_at})}else h(null)}).catch(()=>h(null))};(0,i.useEffect)(()=>{f();let e=new EventSource("/api/watch");return e.onopen=()=>o(!0),e.onmessage=()=>{r(new Date),f()},e.onerror=()=>o(!1),()=>e.close()},[e]),(0,i.useEffect)(()=>{let e=setInterval(()=>d(new Date),3e4);return()=>clearInterval(e)},[]),(0,i.useEffect)(()=>()=>{m.current&&clearTimeout(m.current)},[]);let x=a?"Updated ".concat(l(t,c)):"Reconnecting…";return(0,n.jsxs)("div",{className:"px-3 py-1 text-caption text-text-tertiary","aria-live":"polite",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",title:"Last refresh ".concat(t.toLocaleTimeString()).concat(a?"":" — watcher disconnected"),children:[(0,n.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full ".concat(a?"bg-[var(--success)]":"bg-[var(--medium)]"),"aria-hidden":"true"}),(0,n.jsx)("span",{children:x})]}),u&&(0,n.jsxs)("div",{className:"mt-1 flex items-center gap-2",title:"GitHub sync with ".concat(u.repo," at ").concat(new Date(u.last_synced_at).toLocaleTimeString()),children:[(0,n.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-accent","aria-hidden":"true"}),(0,n.jsxs)("span",{children:["GitHub ",l(new Date(u.last_synced_at),c)]})]})]})}function d(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})}function u(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})})}function h(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})})}let m=[{label:"Recon",items:[{href:"/",label:"Home",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955a1.126 1.126 0 0 1 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})})}},{href:"/changes",label:"Changes",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"})})},diffOnly:!0},{href:"/progress",label:"Progress",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15a2.25 2.25 0 0 1 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"})})}},{href:"/stats",label:"Stats",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"})})}}]},{label:"Analysis",items:[{href:"/access",label:"Access Control",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"})})}},{href:"/functions",label:"Functions",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"})})}},{href:"/calls",label:"Ext Calls",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"})})}}]},{label:"Reasoning",items:[{href:"/conformance",label:"Spec Conformance",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375"})})}},{href:"/notes",label:"Notes",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"})})}}]},{label:"Visual",items:[{href:"/diagram",label:"Diagram",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 3.75H6A2.25 2.25 0 0 0 3.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0 1 20.25 6v1.5m0 9V18A2.25 2.25 0 0 1 18 20.25h-1.5m-9 0H6A2.25 2.25 0 0 1 3.75 18v-1.5M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})})}},{href:"/flows",label:"Flows",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5"})})}}]},{label:"Issues",items:[{href:"/issues",label:"Board",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})})}},{href:"/report",label:"Report",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})})}}]}];function f(){let{theme:e,setTheme:t}=(0,o.F)(),[r,a]=(0,i.useState)(!1);return((0,i.useEffect)(()=>a(!0),[]),r)?(0,n.jsxs)("button",{type:"button",onClick:()=>t("dark"===e?"light":"dark"),"aria-label":"Switch to ".concat("dark"===e?"light":"dark"," mode"),className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary",children:[(0,n.jsx)("light"===e?u:h,{className:"h-4 w-4 shrink-0"}),(0,n.jsx)("span",{children:"light"===e?"Light":"Dark"})]}):(0,n.jsx)("div",{className:"h-9"})}function x(e){let{children:t,version:r,diffMode:o=!1}=e,l=(0,s.usePathname)(),[u,h]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{h(!1)},[l]),(0,n.jsxs)("div",{className:"min-h-screen",children:[(0,n.jsx)("button",{type:"button","aria-label":"Toggle navigation",onClick:()=>h(!u),className:"fixed left-3 top-3 z-[60] flex h-10 w-10 items-center justify-center rounded-md bg-surface-1 border border-border-default text-text-secondary hover:text-text-primary md:hidden",children:(0,n.jsx)(d,{className:"h-5 w-5"})}),u&&(0,n.jsx)("div",{className:"fixed inset-0 z-40 md:hidden",style:{background:"var(--overlay-bg)"},onClick:()=>h(!1)}),(0,n.jsxs)("nav",{"aria-label":"Main navigation",className:"fixed left-0 top-0 z-50 flex h-screen w-[220px] flex-col border-r border-border-subtle bg-surface-1 transition-transform duration-200 ".concat(u?"translate-x-0":"-translate-x-full"," md:translate-x-0"),children:[(0,n.jsx)("div",{className:"px-5 pb-4 pt-6",children:(0,n.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,n.jsx)("span",{className:"text-title font-semibold text-text-primary",children:"Hex"}),(0,n.jsxs)("span",{className:"text-caption text-text-tertiary",children:["v",r]})]})}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto px-3 pb-4",children:m.map(e=>(0,n.jsxs)("div",{className:"mt-6 first:mt-0",children:[(0,n.jsx)("div",{className:"mb-1.5 px-3 text-caption font-medium text-text-tertiary",children:e.label}),e.items.filter(e=>o||!e.diffOnly).map(e=>{let t=l===e.href;return(0,n.jsxs)(a.default,{href:e.href,"aria-current":t?"page":void 0,className:"group flex items-center gap-2.5 rounded-md px-3 py-2 text-body ".concat(t?"bg-accent-subtle text-accent font-medium":"text-text-secondary hover:bg-surface-2 hover:text-text-primary"),children:[(0,n.jsx)(e.icon,{className:"h-4 w-4 shrink-0"}),(0,n.jsx)("span",{children:e.label})]},e.href)})]},e.label))}),(0,n.jsxs)("div",{className:"border-t border-border-subtle px-3 py-3 space-y-1",children:[(0,n.jsx)(c,{}),(0,n.jsx)(f,{}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1 text-caption text-text-tertiary",children:[(0,n.jsx)("kbd",{className:"rounded border border-border-default bg-surface-2 px-1.5 py-0.5 text-[11px]",children:"⌘K"}),(0,n.jsx)("span",{children:"Quick nav"})]})]})]}),(0,n.jsx)("main",{className:"min-h-screen bg-surface-0 p-6 pt-16 md:ml-[220px] md:pt-6",children:(0,n.jsx)("div",{className:"mx-auto ".concat("/issues"===l?"max-w-none":"max-w-6xl"),children:t})})]})}},14233:function(e,t,r){"use strict";r.d(t,{default:function(){return a.a}});var n=r(67498),a=r.n(n)},90168:function(e,t,r){"use strict";var n=r(87462);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}})},13812:function(){},55256:function(e){e.exports={style:{fontFamily:"'__JetBrains_Mono_4dc837', '__JetBrains_Mono_Fallback_4dc837'",fontStyle:"normal"},className:"__className_4dc837",variable:"__variable_4dc837"}},41600:function(e){e.exports={style:{fontFamily:"'__Manrope_855f89', '__Manrope_Fallback_855f89'",fontStyle:"normal"},className:"__className_855f89",variable:"__variable_855f89"}},4595:function(e,t,r){"use strict";r.d(t,{F:function(){return d},ThemeProvider:function(){return u}});var n=r(58078),a=(e,t,r,n,a,s,o,i)=>{let l=document.documentElement,c=["light","dark"];function d(t){(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&s?a.map(e=>s[e]||e):a;r?(l.classList.remove(...n),l.classList.add(s&&s[t]?s[t]:t)):l.setAttribute(e,t)}),i&&c.includes(t)&&(l.style.colorScheme=t)}if(n)d(n);else try{let e=localStorage.getItem(t)||r,n=o&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(n)}catch(e){}},s=["light","dark"],o="(prefers-color-scheme: dark)",i="undefined"==typeof window,l=n.createContext(void 0),c={setTheme:e=>{},themes:[]},d=()=>{var e;return null!=(e=n.useContext(l))?e:c},u=e=>n.useContext(l)?n.createElement(n.Fragment,null,e.children):n.createElement(m,{...e}),h=["light","dark"],m=e=>{let{forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:a=!0,enableColorScheme:i=!0,storageKey:c="theme",themes:d=h,defaultTheme:u=a?"system":"light",attribute:m="data-theme",value:b,children:k,nonce:y,scriptProps:g}=e,[j,w]=n.useState(()=>x(c,u)),[L,M]=n.useState(()=>"system"===j?v():j),C=b?Object.values(b):d,N=n.useCallback(e=>{let t=e;if(!t)return;"system"===e&&a&&(t=v());let n=b?b[t]:t,o=r?p(y):null,l=document.documentElement,c=e=>{"class"===e?(l.classList.remove(...C),n&&l.classList.add(n)):e.startsWith("data-")&&(n?l.setAttribute(e,n):l.removeAttribute(e))};if(Array.isArray(m)?m.forEach(c):c(m),i){let e=s.includes(u)?u:null,r=s.includes(t)?t:e;l.style.colorScheme=r}null==o||o()},[y]),_=n.useCallback(e=>{let t="function"==typeof e?e(j):e;w(t);try{localStorage.setItem(c,t)}catch(e){}},[j]),S=n.useCallback(e=>{M(v(e)),"system"===j&&a&&!t&&N("system")},[j,t]);n.useEffect(()=>{let e=window.matchMedia(o);return e.addListener(S),S(e),()=>e.removeListener(S)},[S]),n.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?w(e.newValue):_(u))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[_]),n.useEffect(()=>{N(null!=t?t:j)},[t,j]);let E=n.useMemo(()=>({theme:j,setTheme:_,forcedTheme:t,resolvedTheme:"system"===j?L:j,themes:a?[...d,"system"]:d,systemTheme:a?L:void 0}),[j,_,t,L,a,d]);return n.createElement(l.Provider,{value:E},n.createElement(f,{forcedTheme:t,storageKey:c,attribute:m,enableSystem:a,enableColorScheme:i,defaultTheme:u,value:b,themes:d,nonce:y,scriptProps:g}),k)},f=n.memo(e=>{let{forcedTheme:t,storageKey:r,attribute:s,enableSystem:o,enableColorScheme:i,defaultTheme:l,value:c,themes:d,nonce:u,scriptProps:h}=e,m=JSON.stringify([s,r,l,t,d,c,o,i]).slice(1,-1);return n.createElement("script",{...h,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?u:"",dangerouslySetInnerHTML:{__html:"(".concat(a.toString(),")(").concat(m,")")}})}),x=(e,t)=>{let r;if(!i){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},p=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},v=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light")}},function(e){e.O(0,[5116,7498,7115,3205,1744],function(){return e(e.s=69640)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9151],{3152:function(e,t,r){Promise.resolve().then(r.bind(r,72024))},72024:function(e,t,r){"use strict";r.d(t,{NotesClient:function(){return l}});var s=r(37821),n=r(58078),a=r(90168),o=r(29487);let i="__other__",c="general";function l(e){var t,r;let{general:o,contractNotes:l,contractOptions:x,activeContract:p,unprocessedCount:m}=e,h=(0,a.useRouter)(),b=(0,n.useMemo)(()=>[{key:c,label:"General"},...l.map(e=>({key:e.contract,label:e.contract}))],[l]),y=p&&b.some(e=>e.key===p)?p:c,[f,j]=(0,n.useState)(y),g=null!==(t=l.find(e=>e.contract===f))&&void 0!==t?t:null,[N,v]=(0,n.useState)("idle"),[k,w]=(0,n.useState)(null!==(r=null!=p?p:x[0])&&void 0!==r?r:i),[C,S]=(0,n.useState)(""),[R,T]=(0,n.useState)(0),[q,_]=(0,n.useState)(null),P=(0,n.useRef)(null),E=(0,n.useRef)([]),M=(0,n.useRef)(null),L=(0,n.useRef)(null),O=(k===i?C:k).trim(),I=(0,n.useCallback)(async()=>{v("transcribing"),_("Transcribing locally…");try{let t=new Blob(E.current,{type:"audio/webm"}),r=new FormData;r.append("audio",t,"narration.webm"),r.append("contract",O||"general");let s=await fetch("/api/notes/record",{method:"POST",body:r}),n=await s.json().catch(()=>({}));if(422===s.status&&n.whisperMissing)_("Audio saved (".concat(n.audioSaved,") but no local Whisper engine is installed. ").concat(n.error));else if(s.ok)_("Session saved for ".concat(n.contract,". Run /diane in Claude Code to process it.")),h.refresh();else{var e;_(null!==(e=n.error)&&void 0!==e?e:"Recording failed")}}catch(e){_(e instanceof Error?e.message:"Recording failed")}finally{v("idle")}},[O,h]),B=(0,n.useCallback)(async()=>{_(null);try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});M.current=e,E.current=[];let t=new MediaRecorder(e);t.ondataavailable=e=>{e.data.size>0&&E.current.push(e.data)},t.onstop=()=>{var e;null===(e=M.current)||void 0===e||e.getTracks().forEach(e=>e.stop()),L.current&&clearInterval(L.current),I()},P.current=t,t.start(),T(0),L.current=setInterval(()=>T(e=>e+1),1e3),v("recording")}catch(e){_("Could not access the microphone. Grant permission and try again.")}},[I]),G=(0,n.useCallback)(()=>{var e;null===(e=P.current)||void 0===e||e.stop()},[]),A="idle"===N&&O.length>0;return(0,s.jsxs)("div",{className:"space-y-sp-5",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-1 p-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)("span",{className:"text-heading font-medium text-text-primary",children:"Record narration"}),(0,s.jsxs)("select",{value:k,onChange:e=>w(e.target.value),disabled:"idle"!==N,className:"rounded-md border border-border-default bg-surface-2 px-3 py-1.5 text-body text-text-primary focus:outline-none focus:ring-2 focus:ring-accent disabled:opacity-50",children:[x.map(e=>(0,s.jsx)("option",{value:e,children:e},e)),(0,s.jsx)("option",{value:i,children:"Other…"})]}),k===i&&(0,s.jsx)("input",{type:"text",placeholder:"Contract name",value:C,onChange:e=>S(e.target.value),disabled:"idle"!==N,className:"rounded-md border border-border-default bg-surface-2 px-3 py-1.5 text-body text-text-primary focus:outline-none focus:ring-2 focus:ring-accent disabled:opacity-50"}),"recording"===N?(0,s.jsxs)("button",{type:"button",onClick:G,className:"flex items-center gap-2 rounded-md bg-severity-critical px-3 py-1.5 text-body font-medium text-surface-0",children:[(0,s.jsx)("span",{className:"h-2.5 w-2.5 rounded-sm bg-surface-0"}),"Stop \xb7 ","".concat(Math.floor(R/60),":").concat(String(R%60).padStart(2,"0"))]}):(0,s.jsxs)("button",{type:"button",onClick:B,disabled:!A,className:"flex items-center gap-2 rounded-md bg-accent px-3 py-1.5 text-body font-medium text-surface-0 transition-opacity duration-200 hover:opacity-90 disabled:opacity-40",children:[(0,s.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-surface-0"}),"transcribing"===N?"Transcribing…":"Record"]})]}),q&&(0,s.jsx)("p",{className:"mt-3 text-caption text-text-secondary",children:q}),m>0&&(0,s.jsxs)("p",{className:"mt-2 text-caption text-accent",children:[m," narration session",m>1?"s":""," waiting — run"," ",(0,s.jsx)("code",{className:"font-mono",children:"/diane"})," in Claude Code to process."]})]}),(0,s.jsxs)("div",{className:"flex gap-sp-5",children:[(0,s.jsx)("nav",{className:"w-44 shrink-0 space-y-0.5",children:b.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>j(e.key),className:"block w-full truncate rounded-md px-3 py-1.5 text-left text-body transition-colors duration-200 ".concat(e.key===f?"bg-accent-subtle font-medium text-accent":"text-text-secondary hover:bg-surface-2 hover:text-text-primary"),children:e.label},e.key))}),(0,s.jsx)("div",{className:"min-w-0 flex-1",children:f===c?(0,s.jsx)(d,{body:o}):(0,s.jsx)(u,{note:g,contract:f,onMutate:()=>h.refresh()})})]})]})}function d(e){let{body:t}=e;return(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-1 p-5",children:[(0,s.jsx)("div",{className:"mb-3 text-heading font-medium text-text-primary",children:"General"}),t.trim()?(0,s.jsx)(o.MarkdownRenderer,{content:t}):(0,s.jsxs)("p",{className:"text-body text-text-tertiary",children:["No protocol-wide notes yet. Record a narration above against"," ",(0,s.jsx)("span",{className:"font-medium",children:"Other…"})," as ",(0,s.jsx)("code",{className:"font-mono",children:"general"})," and run ",(0,s.jsx)("code",{className:"font-mono",children:"/diane"}),"."]})]})}let x=[{id:"leads",label:"Leads"},{id:"description",label:"Description"},{id:"questions",label:"Questions"}];function u(e){let{note:t,contract:r,onMutate:a}=e,[o,i]=(0,n.useState)(!1),c=(0,n.useCallback)(async(e,t)=>{i(!0);try{var r;let s=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok)throw Error(null!==(r=(await s.json().catch(()=>({}))).error)&&void 0!==r?r:"request failed");a()}catch(e){}finally{i(!1)}},[a]),l=!t||0===t.leads.length&&0===t.questions.length&&0===t.description.purpose.length&&0===t.description.inheritance.length&&0===t.description.storage.length&&0===t.description.roles.length&&0===t.description.functions.length;return(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-1 p-5",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-heading font-medium text-text-primary",children:r}),(null==t?void 0:t.file)&&(0,s.jsx)("span",{className:"font-mono text-caption text-text-tertiary",children:t.file})]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-caption text-text-secondary",children:[(0,s.jsx)("input",{type:"checkbox",checked:!!(null==t?void 0:t.marked_done),disabled:o||!t,onChange:e=>c("/api/notes/done",{contract:r,done:e.target.checked}),className:"h-4 w-4 rounded border-border-emphasis bg-surface-1 accent-[var(--accent)]"}),"Mark done reading"]})]}),l?(0,s.jsxs)("p",{className:"text-body text-text-tertiary",children:["No notes yet — record a narration above and run ",(0,s.jsx)("code",{className:"font-mono",children:"/diane"}),"."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("nav",{className:"mb-5 flex flex-wrap items-center gap-1 border-b border-border-subtle pb-3 text-caption",children:x.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>{var t,r;return t=e.id,void(null===(r=document.getElementById("note-".concat(t)))||void 0===r||r.scrollIntoView({behavior:"smooth",block:"start"}))},className:"rounded-md px-2 py-1 text-text-secondary transition-colors duration-200 hover:bg-surface-2 hover:text-text-primary",children:e.label},e.id))}),(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(p,{leads:t.leads,contract:r,busy:o,post:c}),(0,s.jsx)(h,{note:t}),(0,s.jsx)(y,{questions:t.questions,contract:r,busy:o,post:c})]})]})]})}function p(e){let{leads:t,contract:r,busy:a,post:i}=e,c=t.filter(e=>"open"===e.status),l=t.filter(e=>"open"!==e.status),[d,x]=(0,n.useState)(!1);return(0,s.jsxs)("section",{id:"note-leads",children:[(0,s.jsx)("h3",{className:"mb-2 text-heading font-medium text-text-primary",children:"Leads"}),0===c.length?(0,s.jsx)("p",{className:"text-body text-text-tertiary",children:"No open leads."}):(0,s.jsx)("ul",{className:"space-y-2",children:c.map(e=>(0,s.jsxs)("li",{className:"flex items-start justify-between gap-3 rounded-md border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,s.jsxs)("span",{className:"min-w-0 flex-1 text-body text-text-primary",children:["ai-audit"===e.source&&(0,s.jsx)("span",{className:"mr-2 rounded-md bg-surface-3 px-1.5 py-0.5 text-caption text-text-tertiary",children:"AI audit"}),(0,s.jsx)(o.T,{children:e.text})]}),(0,s.jsx)("button",{type:"button",disabled:a,onClick:()=>i("/api/notes/lead",{contract:r,id:e.id,action:"close",status:"dismissed"}),className:"shrink-0 rounded-md border border-border-default px-2.5 py-1 text-caption text-text-secondary transition-colors duration-200 hover:bg-surface-3 hover:text-text-primary disabled:opacity-50",children:"Close"})]},e.id))}),l.length>0&&(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>x(e=>!e),className:"flex items-center gap-1.5 text-caption text-text-tertiary transition-colors duration-200 hover:text-text-secondary",children:[(0,s.jsx)("svg",{className:"h-3.5 w-3.5 transition-transform duration-200 ".concat(d?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 5 7 7-7 7"})}),"Closed (",l.length,")"]}),d&&(0,s.jsx)("ul",{className:"mt-2 space-y-1.5",children:l.map(e=>(0,s.jsxs)("li",{className:"flex items-start justify-between gap-3 rounded-md px-3 py-1.5",children:[(0,s.jsxs)("span",{className:"min-w-0 flex-1 text-caption text-text-tertiary",children:[(0,s.jsx)("span",{className:"line-through",children:(0,s.jsx)(o.T,{children:e.text})}),"logged"===e.status&&e.ref&&(0,s.jsxs)("span",{className:"ml-2 font-mono text-text-secondary",children:["→ ",e.ref]}),"dismissed"===e.status&&(0,s.jsx)("span",{className:"ml-2 text-text-tertiary",children:"dismissed"})]}),(0,s.jsx)("button",{type:"button",disabled:a,onClick:()=>i("/api/notes/lead",{contract:r,id:e.id,action:"reopen"}),className:"shrink-0 rounded-md px-2 py-0.5 text-caption text-text-secondary transition-colors duration-200 hover:text-accent disabled:opacity-50",children:"Reopen"})]},e.id))})]})]})}function m(e){let{label:t,items:r}=e;return 0===r.length?null:(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"mb-1 text-body font-medium text-text-secondary",children:t}),(0,s.jsx)("ul",{className:"list-disc space-y-0.5 pl-5 text-body text-text-primary",children:r.map((e,t)=>(0,s.jsx)("li",{children:(0,s.jsx)(o.T,{children:e})},t))})]})}function h(e){let{note:t}=e,{purpose:r,inheritance:n,storage:a,roles:o,functions:i}=t.description,c=r.length>0||n.length>0||a.length>0||o.length>0||i.length>0;return(0,s.jsxs)("section",{id:"note-description",children:[(0,s.jsx)("h3",{className:"mb-3 text-heading font-medium text-text-primary",children:"Description"}),c?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(m,{label:"Purpose",items:r}),(0,s.jsx)(m,{label:"Inheritance",items:n}),(0,s.jsx)(m,{label:"Storage",items:a}),(0,s.jsx)(m,{label:"Roles & modifiers",items:o}),i.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"mb-1.5 text-body font-medium text-text-secondary",children:"Functions"}),(0,s.jsx)("div",{className:"space-y-1.5",children:i.map(e=>(0,s.jsx)(b,{fn:e},e.id))})]})]}):(0,s.jsx)("p",{className:"text-body text-text-tertiary",children:"No description recorded yet."})]})}function b(e){let{fn:t}=e,[r,a]=(0,n.useState)(!1),i=[["Purpose",t.purpose],["Access",t.access],["Effects",t.effects]];return(0,s.jsxs)("div",{className:"rounded-md border border-border-subtle",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>a(e=>!e),className:"flex w-full items-center gap-2 rounded-md bg-surface-2 px-3 py-2 text-left transition-colors duration-200 hover:bg-surface-3",children:[(0,s.jsx)("svg",{className:"h-4 w-4 shrink-0 text-text-tertiary transition-transform duration-200 ".concat(r?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 5 7 7-7 7"})}),(0,s.jsx)("span",{className:"min-w-0 truncate font-mono text-body text-text-primary",children:t.sig}),t.warnings.length>0&&(0,s.jsxs)("span",{className:"ml-auto shrink-0 text-caption text-[var(--high)]",children:["⚠ ",t.warnings.length]})]}),r&&(0,s.jsxs)("div",{className:"space-y-2 px-3 py-2.5",children:[i.filter(e=>{let[,t]=e;return t&&t.trim()}).map(e=>{let[t,r]=e;return(0,s.jsxs)("p",{className:"text-body text-text-primary",children:[(0,s.jsxs)("span",{className:"text-text-secondary",children:[t,": "]}),(0,s.jsx)(o.T,{children:r})]},t)}),t.notes.length>0&&(0,s.jsx)("ul",{className:"list-disc space-y-0.5 pl-5 text-body text-text-primary",children:t.notes.map((e,t)=>(0,s.jsx)("li",{children:(0,s.jsx)(o.T,{children:e})},t))}),t.warnings.length>0&&(0,s.jsx)("ul",{className:"space-y-1",children:t.warnings.map((e,t)=>(0,s.jsxs)("li",{className:"flex items-start gap-1.5 rounded-md bg-[var(--high)]/10 px-2 py-1 text-body text-[var(--high)]",children:[(0,s.jsx)("span",{"aria-hidden":!0,children:"⚠"}),(0,s.jsx)("span",{className:"min-w-0 flex-1",children:(0,s.jsx)(o.T,{children:e})})]},t))})]})]})}function y(e){let{questions:t,contract:r,busy:n,post:a}=e;return(0,s.jsxs)("section",{id:"note-questions",children:[(0,s.jsx)("h3",{className:"mb-2 text-heading font-medium text-text-primary",children:"Questions"}),0===t.length?(0,s.jsx)("p",{className:"text-body text-text-tertiary",children:"No questions recorded yet."}):(0,s.jsx)("div",{className:"space-y-1.5",children:t.map(e=>(0,s.jsx)(f,{question:e,contract:r,busy:n,post:a},e.id))})]})}function f(e){var t;let{question:r,contract:a,busy:i,post:c}=e,l=!!(r.answer&&r.answer.trim()),[d,x]=(0,n.useState)(!1),[u,p]=(0,n.useState)(!1),[m,h]=(0,n.useState)(null!==(t=r.answer)&&void 0!==t?t:"");return(0,s.jsxs)("div",{className:"rounded-md border border-border-subtle",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>x(e=>!e),className:"flex w-full items-center gap-2 rounded-md bg-surface-2 px-3 py-2 text-left transition-colors duration-200 hover:bg-surface-3",children:[(0,s.jsx)("svg",{className:"h-4 w-4 shrink-0 text-text-tertiary transition-transform duration-200 ".concat(d?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 5 7 7-7 7"})}),(0,s.jsx)("span",{className:"min-w-0 flex-1 text-body ".concat(l?"text-text-primary":"text-text-tertiary"),children:(0,s.jsx)(o.T,{children:r.q})}),!l&&(0,s.jsx)("span",{className:"shrink-0 text-caption text-text-tertiary",children:"open"})]}),d&&(0,s.jsx)("div",{className:"space-y-2 px-3 py-2.5",children:u?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("textarea",{value:m,onChange:e=>h(e.target.value),rows:3,className:"w-full resize-y rounded-md border border-border-default bg-surface-0 p-2 text-body text-text-primary focus:outline-none focus:ring-2 focus:ring-accent"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>{var e;p(!1),h(null!==(e=r.answer)&&void 0!==e?e:"")},className:"rounded-md px-2.5 py-1 text-caption text-text-secondary transition-colors duration-200 hover:text-text-primary",children:"Cancel"}),(0,s.jsx)("button",{type:"button",disabled:i||!m.trim(),onClick:async()=>{await c("/api/notes/question",{contract:a,id:r.id,answer:m.trim()}),p(!1)},className:"rounded-md bg-accent px-2.5 py-1 text-caption font-medium text-surface-0 transition-opacity duration-200 hover:opacity-90 disabled:opacity-50",children:"Save answer"})]})]}):(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsx)("p",{className:"min-w-0 flex-1 text-body ".concat(l?"text-text-primary":"text-text-tertiary"),children:l?(0,s.jsx)(o.T,{children:r.answer}):"— open"}),(0,s.jsx)("button",{type:"button",onClick:()=>p(!0),className:"shrink-0 rounded-md border border-border-default px-2.5 py-1 text-caption text-text-secondary transition-colors duration-200 hover:bg-surface-3 hover:text-text-primary",children:l?"Edit":"Answer"})]})})]})}},29487:function(e,t,r){"use strict";r.d(t,{MarkdownRenderer:function(){return o},T:function(){return i}});var s=r(37821),n=r(48525),a=r(45592);function o(e){let{content:t,className:r}=e;return(0,s.jsx)("div",{className:"prose max-w-none\n prose-headings:text-text-primary\n prose-p:text-text-secondary\n prose-strong:text-text-primary\n prose-code:text-accent\n prose-code:before:content-none\n prose-code:after:content-none\n prose-pre:bg-surface-0\n prose-pre:border\n prose-pre:border-border-default\n prose-a:text-accent\n prose-a:no-underline\n hover:prose-a:underline\n prose-th:text-text-primary\n prose-td:text-text-secondary\n prose-hr:border-border-default\n prose-blockquote:border-border-emphasis\n prose-blockquote:text-text-secondary\n prose-li:text-text-secondary\n ".concat(null!=r?r:""),children:(0,s.jsx)(n.UG,{remarkPlugins:[a.Z],children:t})})}function i(e){let{children:t}=e;return(0,s.jsx)(n.UG,{remarkPlugins:[a.Z],components:{p:e=>{let{children:t}=e;return(0,s.jsx)(s.Fragment,{children:t})},code:e=>{let{children:t}=e;return(0,s.jsx)("code",{className:"rounded bg-surface-0 px-1 py-0.5 font-mono text-[0.85em] text-accent",children:t})},strong:e=>{let{children:t}=e;return(0,s.jsx)("strong",{className:"font-semibold text-text-primary",children:t})},a:e=>{let{href:t,children:r}=e;return(0,s.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",className:"text-accent hover:underline",children:r})}},children:t})}},90168:function(e,t,r){"use strict";var s=r(87462);r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}})}},function(e){e.O(0,[7397,7115,3205,1744],function(){return e(e.s=3152)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{19778:function(e,r,n){Promise.resolve().then(n.bind(n,29487)),Promise.resolve().then(n.t.bind(n,67498,23))},29487:function(e,r,n){"use strict";n.d(r,{MarkdownRenderer:function(){return c},T:function(){return a}});var t=n(37821),o=n(48525),s=n(45592);function c(e){let{content:r,className:n}=e;return(0,t.jsx)("div",{className:"prose max-w-none\n prose-headings:text-text-primary\n prose-p:text-text-secondary\n prose-strong:text-text-primary\n prose-code:text-accent\n prose-code:before:content-none\n prose-code:after:content-none\n prose-pre:bg-surface-0\n prose-pre:border\n prose-pre:border-border-default\n prose-a:text-accent\n prose-a:no-underline\n hover:prose-a:underline\n prose-th:text-text-primary\n prose-td:text-text-secondary\n prose-hr:border-border-default\n prose-blockquote:border-border-emphasis\n prose-blockquote:text-text-secondary\n prose-li:text-text-secondary\n ".concat(null!=n?n:""),children:(0,t.jsx)(o.UG,{remarkPlugins:[s.Z],children:r})})}function a(e){let{children:r}=e;return(0,t.jsx)(o.UG,{remarkPlugins:[s.Z],components:{p:e=>{let{children:r}=e;return(0,t.jsx)(t.Fragment,{children:r})},code:e=>{let{children:r}=e;return(0,t.jsx)("code",{className:"rounded bg-surface-0 px-1 py-0.5 font-mono text-[0.85em] text-accent",children:r})},strong:e=>{let{children:r}=e;return(0,t.jsx)("strong",{className:"font-semibold text-text-primary",children:r})},a:e=>{let{href:r,children:n}=e;return(0,t.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",className:"text-accent hover:underline",children:n})}},children:r})}}},function(e){e.O(0,[7397,7498,7115,3205,1744],function(){return e(e.s=19778)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7092],{25534:function(e,t,s){Promise.resolve().then(s.bind(s,77701))},77701:function(e,t,s){"use strict";s.d(t,{ProgressClient:function(){return x}});var a=s(37821),r=s(58078);function i(e){return"".concat(e.file,"::").concat(e.contract)}function n(e){return e>=67?"text-[var(--success)]":e>=34?"text-[var(--medium)]":"text-[var(--critical)]"}let l={contract:0,abstract:1,library:2,interface:3},c={contract:"bg-[var(--low)]/15 text-[var(--low)]",interface:"bg-[var(--info)]/15 text-[var(--info)]",library:"bg-[var(--info)]/15 text-[var(--info)]",abstract:"bg-[var(--high)]/15 text-[var(--high)]"},d=["Critical","High","Medium","Low","Info","Gas"],o={Critical:"bg-[var(--critical)]/15 text-[var(--critical)]",High:"bg-[var(--high)]/15 text-[var(--high)]",Medium:"bg-[var(--medium)]/15 text-[var(--medium)]",Low:"bg-[var(--low)]/15 text-[var(--low)]",Info:"bg-[var(--info)]/15 text-[var(--info)]",Gas:"bg-surface-3 text-text-secondary"};function x(e){let{contracts:t,totalsNsloc:s,reviewedContracts:x,dianeReviewed:p,auditSteps:m,findingsTotal:u,findingsBySeverity:h,findingsTracked:v}=e,[f,b]=(0,r.useState)(x),[g,j]=(0,r.useState)("all"),y=e=>!!f[e]||!!p[e],N=(0,r.useMemo)(()=>t.filter(e=>y(i(e))).reduce((e,t)=>e+t.nsloc,0),[t,f,p]),w=(0,r.useMemo)(()=>t.filter(e=>y(i(e))).length,[t,f,p]),C=s>0?N/s*100:0,k=m.filter(e=>e.completed).length/m.length*100,M=u>0?v/u*100:100,O=.7*C+.2*k+.1*M,S=(0,r.useMemo)(()=>{let e=[...t].sort((e,t)=>{var s,a;let r=null!==(s=l[e.type])&&void 0!==s?s:99,i=null!==(a=l[t.type])&&void 0!==a?a:99;return r!==i?r-i:t.nsloc-e.nsloc});return"all"===g?e:e.filter(e=>{let t=y(i(e));return"checked"===g?t:!t})},[t,g,f,p]),L=(0,r.useMemo)(()=>Math.max(...t.map(e=>e.nsloc),1),[t]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-sp-5 rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-baseline justify-between gap-sp-2",children:[(0,a.jsxs)("span",{className:"text-display font-semibold ".concat(n(O)),children:[O.toFixed(0),"%"]}),(0,a.jsxs)("span",{className:"text-caption text-text-tertiary inline-flex items-center gap-1.5",title:"Overall progress is a weighted average: 70% nSLOC reviewed (contract review), 20% audit-step completion, 10% findings triage.","aria-label":"Overall progress formula: 70% contract review by nSLOC, 20% step completion, 10% findings triage",children:["Contract Review ",C.toFixed(0),"% \xb7 Steps ",k.toFixed(0),"% \xb7 Triage ",M.toFixed(0),"%",(0,a.jsx)("svg",{className:"h-3.5 w-3.5 text-text-tertiary","aria-hidden":"true",viewBox:"0 0 16 16",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13zM7.25 7.25a.75.75 0 0 1 1.5 0v3.5a.75.75 0 0 1-1.5 0v-3.5zM8 4.5a.875.875 0 1 1 0 1.75A.875.875 0 0 1 8 4.5z"})})]})]}),(0,a.jsx)("div",{className:"h-3 w-full overflow-hidden rounded-full bg-surface-3",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all duration-300 ".concat(O>=67?"bg-[var(--success)]":O>=34?"bg-[var(--medium)]":"bg-[var(--critical)]"),style:{width:"".concat(Math.min(O,100),"%")},role:"progressbar","aria-valuenow":Math.round(O),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Overall audit progress"})}),(0,a.jsx)("p",{className:"mt-2 text-caption text-text-tertiary",children:"Weighted: 70% nSLOC reviewed \xb7 20% audit steps \xb7 10% findings triage. Hover the breakdown for details."})]}),(0,a.jsxs)("div",{className:"mb-sp-5 grid grid-cols-2 gap-sp-3 lg:grid-cols-4",children:[(0,a.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,a.jsxs)("div",{className:"text-display ".concat(n(O)),children:[O.toFixed(0),"%"]}),(0,a.jsx)("div",{className:"mt-1 text-caption text-text-secondary",children:"Overall Progress"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,a.jsxs)("div",{className:"text-display text-text-primary",children:[w," / ",t.length]}),(0,a.jsx)("div",{className:"mt-1 text-caption text-text-secondary",children:"Contracts Reviewed"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,a.jsxs)("div",{className:"text-display text-text-primary",children:[N.toLocaleString()," / ",s.toLocaleString()]}),(0,a.jsx)("div",{className:"mt-1 text-caption text-text-secondary",children:"nSLOC Reviewed"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,a.jsx)("div",{className:"text-display text-text-primary",children:u}),(0,a.jsx)("div",{className:"mt-1 text-caption text-text-secondary",children:"Findings"}),Object.keys(h).length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:d.filter(e=>h[e]).map(e=>{var t;return(0,a.jsxs)("span",{className:"inline-flex items-center rounded-md px-2 py-0.5 text-caption font-medium ".concat(null!==(t=o[e])&&void 0!==t?t:"bg-surface-3 text-text-secondary"),children:[h[e]," ",e]},e)})})]})]}),(0,a.jsxs)("div",{className:"mb-sp-5",children:[(0,a.jsx)("h3",{className:"mb-sp-2 text-heading font-medium text-text-primary",children:"Audit Steps"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:m.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-caption font-medium ".concat(e.completed?"bg-[var(--success)]/15 text-[var(--success)]":"bg-surface-3 text-text-tertiary"),children:[e.completed?(0,a.jsx)("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"})}):(0,a.jsx)("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z",clipRule:"evenodd"})}),e.label]},e.label))})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-sp-2 flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-heading font-medium text-text-primary",children:"Contract Checklist"}),(0,a.jsx)("div",{className:"inline-flex rounded-md bg-surface-3 p-0.5",children:["all","unchecked","checked"].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>j(e),className:"rounded-sm px-2.5 py-1 text-caption font-medium ".concat(g===e?"bg-surface-2 text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"),children:"all"===e?"All (".concat(t.length,")"):"checked"===e?"Reviewed (".concat(w,")"):"Remaining (".concat(t.length-w,")")},e))})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-border-default",children:(0,a.jsxs)("table",{className:"w-full text-left text-body",children:[(0,a.jsx)("thead",{className:"border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"w-10 px-sp-3 py-sp-2"}),(0,a.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Contract"}),(0,a.jsx)("th",{className:"px-sp-4 py-sp-2",children:"File"}),(0,a.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Type"}),(0,a.jsx)("th",{className:"px-sp-4 py-sp-2 text-right",children:"nSLOC"}),(0,a.jsx)("th",{className:"w-32 px-sp-4 py-sp-2",children:"Weight"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle",children:S.map(e=>{var t;let s=i(e),r=!!f[s],n=!!p[s],l=r||n,d=n&&!r,o=e.nsloc/L*100;return(0,a.jsxs)("tr",{className:"h-9 transition-colors ".concat(l?"bg-[var(--success)]/5":"bg-surface-1"," hover:bg-surface-3"),children:[(0,a.jsx)("td",{className:"px-sp-3 py-sp-2",children:(0,a.jsx)("button",{type:"button",onClick:()=>(function(e){let t=i(e),s=!f[t];b(e=>({...e,[t]:s})),fetch("/api/progress",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reviewed_contracts:{[t]:s}})}).catch(()=>{})})(e),className:"flex h-5 w-5 items-center justify-center rounded border transition-colors ".concat(l?"border-[var(--accent)] bg-[var(--accent)] text-surface-0":"border-border-emphasis bg-surface-1 hover:border-[var(--accent)]"),children:l&&(0,a.jsx)("svg",{className:"h-3 w-3",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.5 6l2.5 2.5 4.5-5"})})})}),(0,a.jsx)("td",{className:"px-sp-4 py-sp-2 font-medium text-text-primary",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-2",children:[e.contract,d&&(0,a.jsx)("span",{className:"inline-flex items-center rounded-md bg-accent-subtle px-1.5 py-0.5 text-caption font-medium text-accent",title:"Auto-reviewed from Diane notes: done + no open leads + no unanswered questions",children:"auto"})]})}),(0,a.jsx)("td",{className:"max-w-[200px] truncate px-sp-4 py-sp-2 font-mono text-caption text-text-tertiary",children:e.file}),(0,a.jsx)("td",{className:"px-sp-4 py-sp-2",children:(0,a.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(null!==(t=c[e.type])&&void 0!==t?t:"bg-surface-3 text-text-secondary"),children:e.type})}),(0,a.jsx)("td",{className:"px-sp-4 py-sp-2 text-right font-mono tabular-nums text-text-secondary",children:e.nsloc}),(0,a.jsx)("td",{className:"px-sp-4 py-sp-2",children:(0,a.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-surface-3",children:(0,a.jsx)("div",{className:"h-full rounded-full bg-[var(--accent)]",style:{width:"".concat(o,"%")}})})})]},s)})})]})})]})]})}}},function(e){e.O(0,[7115,3205,1744],function(){return e(e.s=25534)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9420],{12748:function(e,t,s){Promise.resolve().then(s.bind(s,56902))},56902:function(e,t,s){"use strict";s.d(t,{ReportClient:function(){return r}});var a=s(37821),n=s(58078);let i=[{key:"executive_summary",label:"Executive Summary",file:"executive_summary.txt"},{key:"audited_files",label:"Audited Files",file:"audited_files.txt"},{key:"summary_of_findings",label:"Summary of Issues",file:"summary_of_findings.txt"},{key:"system_overview",label:"System Overview",file:"system_overview.txt"},{key:"findings",label:"Issues",file:"findings.txt"},{key:"documentation_eval",label:"Documentation Eval",file:"documentation_eval.txt"},{key:"test_suite",label:"Test Suite",file:"test_suite.txt"}];function r(e){var t;let{sections:s}=e,[r,o]=(0,n.useState)("executive_summary"),[l,c]=(0,n.useState)(!1),d=s[r],x=async()=>{if(d)try{await navigator.clipboard.writeText(d),c(!0),setTimeout(()=>c(!1),1500)}catch(e){}};return(0,a.jsxs)("div",{children:[(0,a.jsxs)("header",{className:"mb-6",children:[(0,a.jsx)("h1",{className:"text-title font-semibold text-text-primary",children:"Report"}),(0,a.jsxs)("p",{className:"mt-1 text-body text-text-secondary",children:["LaTeX report sections from ",(0,a.jsx)("span",{className:"font-mono text-caption",children:".hex/report/"}),". Copy each into the matching slot of the Nethermind Overleaf template, or"," ",(0,a.jsx)("span",{className:"font-mono text-caption",children:"\\input"})," the matching"," ",(0,a.jsx)("span",{className:"font-mono text-caption",children:".tex"})," files."]})]}),(0,a.jsx)("div",{className:"mb-4 flex flex-wrap gap-1.5",children:i.map(e=>{let t=e.key===r,n=!!s[e.key];return(0,a.jsx)("button",{type:"button",onClick:()=>o(e.key),className:"rounded-md px-3 py-1.5 text-caption font-medium ".concat(t?"bg-accent text-surface-0":"bg-surface-2 text-text-secondary hover:text-text-primary"," ").concat(n?"":"opacity-50"),children:e.label},e.key)})}),(0,a.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle px-4 py-2.5",children:[(0,a.jsx)("span",{className:"font-mono text-caption text-text-tertiary",children:null===(t=i.find(e=>e.key===r))||void 0===t?void 0:t.file}),(0,a.jsx)("button",{type:"button",onClick:x,disabled:!d,className:"rounded-md border border-border-default px-2.5 py-1 text-caption text-text-secondary hover:bg-surface-2 hover:text-text-primary disabled:opacity-50",children:l?"Copied!":"Copy"})]}),d?(0,a.jsx)("pre",{className:"max-h-[70vh] overflow-auto p-4 font-mono text-caption leading-relaxed text-text-secondary whitespace-pre-wrap break-words",children:d}):(0,a.jsxs)("p",{className:"p-4 text-body text-text-tertiary",children:["This section has not been generated yet. Run"," ",(0,a.jsx)("span",{className:"font-mono text-caption",children:"/generate-report"}),"."]})]})]})}}},function(e){e.O(0,[7115,3205,1744],function(){return e(e.s=12748)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2740],{58908:function(e,t,s){Promise.resolve().then(s.bind(s,9922))},9922:function(e,t,s){"use strict";s.d(t,{StatsClient:function(){return o}});var r=s(37821),a=s(58078),n=s(35640);function l(e){return e>=80?"bg-[var(--success)]":e>=50?"bg-[var(--medium)]":"bg-[var(--critical)]"}let c={contract:"bg-[var(--low)]/15 text-[var(--low)]",interface:"bg-[var(--info)]/15 text-[var(--info)]",library:"bg-[var(--info)]/15 text-[var(--info)]",abstract:"bg-[var(--high)]/15 text-[var(--high)]"},i=["Summary","Per-Contract","Coverage","Dependencies"];function o(e){let{totals:t,per_contract:s,erc_eip_usage:n,dependencies:l,test_coverage:c}=e,[o,p]=(0,a.useState)("Summary");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-sp-5 inline-flex overflow-x-auto rounded-md bg-surface-3 p-1",children:i.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>p(e),className:"whitespace-nowrap rounded-sm px-sp-3 py-1.5 text-body font-medium ".concat(o===e?"bg-surface-2 text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"),children:e},e))}),"Summary"===o&&(0,r.jsx)(d,{totals:t,per_contract:s,erc_eip_usage:n}),"Per-Contract"===o&&(0,r.jsx)(x,{per_contract:s}),"Coverage"===o&&(0,r.jsx)(u,{test_coverage:c}),"Dependencies"===o&&(0,r.jsx)(m,{dependencies:l})]})}function d(e){let{totals:t,per_contract:s,erc_eip_usage:a}=e;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-sp-6 grid grid-cols-2 gap-sp-3 sm:grid-cols-3 lg:grid-cols-6",children:[(0,r.jsx)(p,{label:"Contracts",value:t.contracts}),(0,r.jsx)(p,{label:"nSLOC",value:t.nsloc.toLocaleString()}),(0,r.jsx)(p,{label:"Functions",value:s.reduce((e,t)=>e+t.functions,0)}),(0,r.jsx)(p,{label:"Modifiers",value:s.reduce((e,t)=>e+t.modifiers,0)}),(0,r.jsx)(p,{label:"Events",value:s.reduce((e,t)=>e+t.events,0)}),(0,r.jsx)(p,{label:"Assembly",value:t.assembly_lines})]}),a.length>0&&(0,r.jsxs)("div",{className:"mb-sp-6",children:[(0,r.jsx)("h3",{className:"mb-sp-2 text-heading font-medium text-text-primary",children:"ERC / EIP Usage"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>(0,r.jsx)("span",{className:"inline-flex items-center rounded-sm bg-[var(--info)]/15 px-2.5 py-1 text-caption font-medium text-[var(--info)]",children:e},e))})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-sp-4 text-caption text-text-tertiary",children:[(0,r.jsxs)("span",{children:["Total Lines: ",t.total_lines.toLocaleString()]}),(0,r.jsxs)("span",{children:["Comments: ",t.comment_lines.toLocaleString()]}),(0,r.jsxs)("span",{children:["Blank: ",t.blank_lines.toLocaleString()]}),(0,r.jsxs)("span",{children:["Files: ",t.files]}),(0,r.jsxs)("span",{children:["Interfaces: ",t.interfaces]}),(0,r.jsxs)("span",{children:["Libraries: ",t.libraries]}),(0,r.jsxs)("span",{children:["Abstract: ",t.abstract_contracts]})]})]})}function x(e){let{per_contract:t}=e,s=(0,a.useMemo)(()=>[{id:"file",header:"File",accessorKey:"file",cell:e=>(0,r.jsx)("span",{className:"max-w-[200px] truncate font-mono text-caption text-text-tertiary",children:e.file})},{id:"contract",header:"Contract",accessorKey:"contract",enableColumnFilter:!0,cell:e=>(0,r.jsx)("span",{className:"font-medium text-text-primary",children:e.contract})},{id:"type",header:"Type",accessorKey:"type",enableColumnFilter:!0,cell:e=>{var t;return(0,r.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(null!==(t=c[e.type])&&void 0!==t?t:"bg-surface-3 text-text-secondary"),children:e.type})}},{id:"nsloc",header:"nSLOC",accessorKey:"nsloc",cell:e=>(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-secondary",children:e.nsloc})},{id:"functions",header:"Functions",accessorKey:"functions",cell:e=>(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-secondary",children:e.functions})},{id:"modifiers",header:"Modifiers",accessorKey:"modifiers",cell:e=>(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-secondary",children:e.modifiers})},{id:"events",header:"Events",accessorKey:"events",cell:e=>(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-secondary",children:e.events})},{id:"errors",header:"Errors",accessorKey:"errors",cell:e=>(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-secondary",children:e.errors})},{id:"assembly_lines",header:"Assembly",accessorKey:"assembly_lines",cell:e=>e.assembly_lines>0?(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-[var(--medium)]",children:e.assembly_lines}):(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-tertiary",children:"0"})},{id:"inherits",header:"Inherits",accessorKey:"inherits",cell:e=>(0,r.jsx)("span",{className:"max-w-[200px] truncate text-caption text-text-tertiary",children:e.inherits.length>0?e.inherits.join(", "):"--"})}],[]),l=(0,a.useMemo)(()=>({nsloc:t.reduce((e,t)=>e+t.nsloc,0),functions:t.reduce((e,t)=>e+t.functions,0),modifiers:t.reduce((e,t)=>e+t.modifiers,0),events:t.reduce((e,t)=>e+t.events,0),errors:t.reduce((e,t)=>e+t.errors,0),assembly:t.reduce((e,t)=>e+t.assembly_lines,0)}),[t]);return(0,r.jsxs)("div",{children:[(0,r.jsx)(n.v,{columns:s,data:t,defaultOpen:!0}),(0,r.jsxs)("div",{className:"mt-sp-3 flex flex-wrap gap-sp-4 rounded-md border border-border-default bg-surface-2 px-sp-4 py-sp-3 text-body font-medium text-text-primary",children:[(0,r.jsxs)("span",{children:["Total (",t.length," contracts)"]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["nSLOC: ",l.nsloc]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["Functions: ",l.functions]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["Modifiers: ",l.modifiers]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["Events: ",l.events]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["Errors: ",l.errors]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["Assembly: ",l.assembly]})]})]})}function u(e){let{test_coverage:t}=e;return t&&"available"===t.status?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-sp-3 grid grid-cols-2 gap-sp-3 sm:grid-cols-4",children:[null!=t.overall_line_pct&&(0,r.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption text-text-secondary",children:"Line Coverage"}),(0,r.jsxs)("div",{className:"text-display text-text-primary",children:[t.overall_line_pct.toFixed(1),"%"]}),(0,r.jsx)("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-full bg-surface-3",children:(0,r.jsx)("div",{className:"h-full rounded-full ".concat(l(t.overall_line_pct)),style:{width:"".concat(Math.min(t.overall_line_pct,100),"%")}})})]}),null!=t.overall_branch_pct&&(0,r.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption text-text-secondary",children:"Branch Coverage"}),(0,r.jsxs)("div",{className:"text-display text-text-primary",children:[t.overall_branch_pct.toFixed(1),"%"]}),(0,r.jsx)("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-full bg-surface-3",children:(0,r.jsx)("div",{className:"h-full rounded-full ".concat(l(t.overall_branch_pct)),style:{width:"".concat(Math.min(t.overall_branch_pct,100),"%")}})})]})]}),t.per_contract.length>0&&(0,r.jsx)("div",{className:"overflow-x-auto rounded-md border border-border-default",children:(0,r.jsxs)("table",{className:"w-full text-left text-body",children:[(0,r.jsx)("thead",{className:"border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Contract"}),(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"File"}),(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Line %"}),(0,r.jsx)("th",{className:"w-48 px-sp-4 py-sp-2",children:"Line Coverage"}),(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Branch %"}),(0,r.jsx)("th",{className:"w-48 px-sp-4 py-sp-2",children:"Branch Coverage"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border-subtle",children:t.per_contract.map(e=>(0,r.jsxs)("tr",{className:"h-9 bg-surface-1 hover:bg-surface-3",children:[(0,r.jsx)("td",{className:"px-sp-4 py-sp-2 font-medium text-text-primary",children:e.contract}),(0,r.jsx)("td",{className:"max-w-[200px] truncate px-sp-4 py-sp-2 font-mono text-caption text-text-tertiary",children:e.file}),(0,r.jsxs)("td",{className:"px-sp-4 py-sp-2 font-mono tabular-nums text-text-secondary",children:[e.line_pct.toFixed(1),"%"]}),(0,r.jsx)("td",{className:"px-sp-4 py-sp-2",children:(0,r.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-surface-3",children:(0,r.jsx)("div",{className:"h-full rounded-full ".concat(l(e.line_pct)),style:{width:"".concat(Math.min(e.line_pct,100),"%")}})})}),(0,r.jsxs)("td",{className:"px-sp-4 py-sp-2 font-mono tabular-nums text-text-secondary",children:[e.branch_pct.toFixed(1),"%"]}),(0,r.jsx)("td",{className:"px-sp-4 py-sp-2",children:(0,r.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-surface-3",children:(0,r.jsx)("div",{className:"h-full rounded-full ".concat(l(e.branch_pct)),style:{width:"".concat(Math.min(e.branch_pct,100),"%")}})})})]},"".concat(e.file,":").concat(e.contract)))})]})})]}):(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-md border border-dashed border-border-emphasis bg-surface-1 py-sp-8",children:[(0,r.jsx)("p",{className:"mb-2 text-heading font-medium text-text-primary",children:"No Coverage Data"}),(0,r.jsx)("p",{className:"text-body text-text-tertiary",children:"Run tests with coverage enabled to see results here."})]})}function m(e){let{dependencies:t}=e;return 0===t.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-md border border-dashed border-border-emphasis bg-surface-1 py-sp-8",children:[(0,r.jsx)("p",{className:"mb-2 text-heading font-medium text-text-primary",children:"No Dependencies"}),(0,r.jsx)("p",{className:"text-body text-text-tertiary",children:"No external dependencies were detected."})]}):(0,r.jsx)("div",{className:"overflow-x-auto rounded-md border border-border-default",children:(0,r.jsxs)("table",{className:"w-full text-left text-body",children:[(0,r.jsx)("thead",{className:"border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Package"}),(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Version"}),(0,r.jsx)("th",{className:"px-sp-4 py-sp-2 text-right",children:"Imports"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border-subtle",children:t.map(e=>{var t;return(0,r.jsxs)("tr",{className:"h-9 bg-surface-1 hover:bg-surface-3",children:[(0,r.jsx)("td",{className:"px-sp-4 py-sp-2 font-medium text-text-primary",children:e.package}),(0,r.jsx)("td",{className:"px-sp-4 py-sp-2 font-mono text-body text-text-tertiary",children:null!==(t=e.version)&&void 0!==t?t:"--"}),(0,r.jsx)("td",{className:"px-sp-4 py-sp-2 text-right font-mono tabular-nums text-text-secondary",children:e.imports})]},e.package)})})]})})}function p(e){let{label:t,value:s}=e;return(0,r.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,r.jsx)("div",{className:"text-display text-text-primary",children:s}),(0,r.jsx)("div",{className:"mt-1 text-caption text-text-secondary",children:t})]})}},35640:function(e,t,s){"use strict";s.d(t,{v:function(){return c}});var r=s(37821),a=s(58078),n=s(18452),l=s(73299);function c(e){let{columns:t,data:s,title:c,defaultOpen:i=!0,rowClassName:o,onRowClick:d,expandedRow:x}=e,[u,m]=(0,a.useState)(i),[p,h]=(0,a.useState)([]),[f,b]=(0,a.useState)([]),[v,y]=(0,a.useState)(null),j=(0,a.useMemo)(()=>t.map(e=>{var t;return{id:e.id,accessorKey:e.accessorKey,header:e.header,enableColumnFilter:null!==(t=e.enableColumnFilter)&&void 0!==t&&t,filterFn:e.enableColumnFilter?"equalsString":void 0,...e.sortingFn?{sortingFn:e.sortingFn}:{},cell:e.cell?t=>{let{row:s}=t;return e.cell(s.original)}:e=>{var t;let{getValue:s}=e;return(0,r.jsx)("span",{className:"text-text-primary",children:String(null!==(t=s())&&void 0!==t?t:"")})}}}),[t]),g=(0,n.b7)({data:s,columns:j,state:{sorting:p,columnFilters:f},onSortingChange:h,onColumnFiltersChange:b,getCoreRowModel:(0,l.sC)(),getFilteredRowModel:(0,l.vL)(),getSortedRowModel:(0,l.tj)()}),N=(0,a.useMemo)(()=>{let e={};for(let r of t){if(!r.enableColumnFilter)continue;let t=new Set;for(let e of s){let s=e[r.accessorKey];null!=s&&t.add(String(s))}let a=[...t];if(r.filterOrder){let e=r.filterOrder;a.sort((t,s)=>{let r=e.indexOf(t),a=e.indexOf(s);return(-1===r?999:r)-(-1===a?999:a)})}else a.sort();e[r.id]=a}return e},[t,s]),w=t.filter(e=>e.enableColumnFilter);return(0,r.jsxs)("div",{className:"overflow-hidden border border-border-default",style:{borderRadius:"var(--radius-sm)"},children:[c&&(0,r.jsxs)("button",{type:"button",onClick:()=>m(!u),"aria-expanded":u,className:"flex w-full items-center justify-between bg-surface-2 px-sp-4 py-sp-3 text-left hover:bg-surface-3",children:[(0,r.jsxs)("span",{className:"text-heading font-medium text-text-primary",children:[c," (",s.length,")"]}),(0,r.jsx)("svg",{className:"h-4 w-4 text-text-tertiary ".concat(u?"rotate-180":""),"aria-hidden":"true",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19 9-7 7-7-7"})})]}),u&&(0,r.jsxs)(r.Fragment,{children:[w.length>0&&(0,r.jsx)("div",{className:"flex flex-wrap gap-2 border-b border-border-subtle bg-surface-1 px-sp-4 py-sp-2",children:w.map(e=>{var t;let a=f.find(t=>t.id===e.id);return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>b(t=>t.filter(t=>t.id!==e.id)),"aria-pressed":!(null==a?void 0:a.value),className:"rounded-md px-3 py-1.5 text-caption font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ".concat((null==a?void 0:a.value)?"bg-surface-3 text-text-secondary hover:text-text-primary":"bg-accent text-surface-0"),children:["All ",e.header]}),(null!==(t=N[e.id])&&void 0!==t?t:[]).map(t=>{let n=s.filter(s=>String(s[e.accessorKey])===t).length,l=(null==a?void 0:a.value)===t;return(0,r.jsxs)("button",{type:"button",onClick:()=>b(s=>{let r=s.filter(t=>t.id!==e.id);return l?r:[...r,{id:e.id,value:t}]}),"aria-pressed":l,className:"rounded-md px-3 py-1.5 text-caption font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ".concat(l?"bg-accent text-surface-0":"bg-surface-3 text-text-secondary hover:text-text-primary"),children:[t,(0,r.jsx)("span",{className:"ml-1 opacity-60",children:n})]},t)})]},e.id)})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-left text-body",children:[(0,r.jsx)("thead",{className:"border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary",children:(0,r.jsx)("tr",{children:g.getHeaderGroups().map(e=>e.headers.map(e=>(0,r.jsx)("th",{scope:"col","aria-sort":"asc"===e.column.getIsSorted()?"ascending":"desc"===e.column.getIsSorted()?"descending":void 0,className:"cursor-pointer select-none px-sp-4 py-sp-2 hover:text-text-secondary",onClick:e.column.getToggleSortingHandler(),children:(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.ie)(e.column.columnDef.header,e.getContext()),"asc"===e.column.getIsSorted()&&(0,r.jsx)("svg",{className:"h-3 w-3","aria-hidden":"true",viewBox:"0 0 12 12",fill:"currentColor",children:(0,r.jsx)("path",{d:"M6 2l4 5H2z"})}),"desc"===e.column.getIsSorted()&&(0,r.jsx)("svg",{className:"h-3 w-3","aria-hidden":"true",viewBox:"0 0 12 12",fill:"currentColor",children:(0,r.jsx)("path",{d:"M6 10l4-5H2z"})})]})},e.id)))})}),(0,r.jsx)("tbody",{className:"divide-y divide-border-subtle",children:g.getRowModel().rows.map(e=>{let s=e.original,l=s.id?String(s.id):e.id,c=v===l,i=!!d||!!x;return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("tr",{className:"".concat(o?o(s):"bg-surface-1 hover:bg-surface-3"," ").concat(i?"cursor-pointer":""),role:i?"button":void 0,tabIndex:i?0:void 0,"aria-expanded":x?c:void 0,onClick:()=>{x&&y(c?null:l),null==d||d(s)},onKeyDown:i?e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),x&&y(c?null:l),null==d||d(s))}:void 0,children:e.getVisibleCells().map(e=>(0,r.jsx)("td",{className:"h-9 px-sp-4 py-sp-2",children:(0,n.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),x&&c&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:t.length,className:"bg-surface-0 px-sp-5 py-sp-4",children:x(s)})})]},e.id)})})]})})]})]})}}},function(e){e.O(0,[8452,7115,3205,1744],function(){return e(e.s=58908)}),_N_E=e.O()}]);
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5868],{1643:function(t,e,a){a.d(e,{diagram:function(){return tC}});var r=a(5454),s=a(3589),i=a(751),n=a(778),o=a(9125),c=a(7632),l=a(8859),d=a(5612),h=function(){var t=(0,c.eW)(function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],n=[1,11],o=[1,12],l=[1,14],d=[1,15],h=[1,17],p=[1,18],T=[1,19],E=[1,25],g=[1,26],u=[1,27],y=[1,28],O=[1,29],_=[1,30],x=[1,31],b=[1,32],m=[1,33],I=[1,34],f=[1,35],L=[1,36],R=[1,37],S=[1,38],P=[1,39],w=[1,40],N=[1,42],D=[1,43],A=[1,44],k=[1,45],M=[1,46],C=[1,47],W=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Y=[1,74],v=[1,80],B=[1,81],$=[1,82],V=[1,83],F=[1,84],K=[1,85],q=[1,86],H=[1,87],z=[1,88],U=[1,89],j=[1,90],G=[1,91],X=[1,92],J=[1,93],Z=[1,94],Q=[1,95],tt=[1,96],te=[1,97],ta=[1,98],tr=[1,99],ts=[1,100],ti=[1,101],tn=[1,102],to=[1,103],tc=[1,104],tl=[1,105],td=[2,78],th=[4,5,17,51,53,54],tp=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],tT=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],tE=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],tg=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],tu=[5,52],ty=[70,71,72,73],tO=[1,151],t_={trace:(0,c.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:(0,c.eW)(function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 10:case 8:case 9:case 14:this.$=[];break;case 5:case 11:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 12:case 13:case 67:this.$=i[o];break;case 16:i[o].type="createParticipant",this.$=i[o];break;case 17:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 30:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 31:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 32:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 35:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 42:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 44:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 46:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 48:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 49:case 54:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 50:case 55:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 51:case 56:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 52:case 57:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 53:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 58:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 59:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 60:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 62:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 63:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 66:this.$=[i[o-2],i[o]];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 71:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 72:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:i[o-1].actor}];break;case 73:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:i[o-4].actor}];break;case 74:this.$=[i[o-5],i[o-1],{type:"addMessage",from:i[o-5].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:i[o-1].actor},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:i[o-5].actor}];break;case 75:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 76:this.$={type:"addParticipant",actor:i[o-1],config:i[o]};break;case 77:this.$=i[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:i[o]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(i[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},t(W,[2,5]),{9:48,13:13,14:l,15:d,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},t(W,[2,7]),t(W,[2,8]),t(W,[2,9]),t(W,[2,15]),{13:49,51:S,53:P,54:w},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:C},{23:56,73:C},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(W,[2,30]),t(W,[2,31]),{33:[1,62]},{35:[1,63]},t(W,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Y},{23:75,55:76,73:Y},{23:77,73:C},{69:78,72:[1,79],78:v,79:B,80:$,81:V,82:F,83:K,84:q,85:H,86:z,87:U,88:j,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:te,96:ta,97:tr,98:ts,99:ti,100:tn,101:to,102:tc,103:tl},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:C},{23:111,73:C},{23:112,73:C},{23:113,73:C},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],td),t(W,[2,6]),t(W,[2,16]),t(th,[2,10],{11:114}),t(W,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(W,[2,22]),{5:[1,118]},{5:[1,119]},t(W,[2,25]),t(W,[2,26]),t(W,[2,27]),t(W,[2,28]),t(W,[2,29]),t(W,[2,32]),t(W,[2,33]),t(tp,s,{7:120}),t(tp,s,{7:121}),t(tp,s,{7:122}),t(tT,s,{41:123,7:124}),t(tE,s,{43:125,7:126}),t(tE,s,{7:126,43:127}),t(tg,s,{46:128,7:129}),t(tp,s,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(tu,td,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:C},{69:146,78:v,79:B,80:$,81:V,82:F,83:K,84:q,85:H,86:z,87:U,88:j,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:te,96:ta,97:tr,98:ts,99:ti,100:tn,101:to,102:tc,103:tl},t(ty,[2,79]),t(ty,[2,80]),t(ty,[2,81]),t(ty,[2,82]),t(ty,[2,83]),t(ty,[2,84]),t(ty,[2,85]),t(ty,[2,86]),t(ty,[2,87]),t(ty,[2,88]),t(ty,[2,89]),t(ty,[2,90]),t(ty,[2,91]),t(ty,[2,92]),t(ty,[2,93]),t(ty,[2,94]),t(ty,[2,95]),t(ty,[2,96]),t(ty,[2,97]),t(ty,[2,98]),t(ty,[2,99]),t(ty,[2,100]),t(ty,[2,101]),t(ty,[2,102]),t(ty,[2,103]),t(ty,[2,104]),{23:147,73:C},{23:149,60:148,73:C},{73:[2,68]},{73:[2,69]},{58:150,104:tO},{58:152,104:tO},{58:153,104:tO},{58:154,104:tO},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:S,53:P,54:w},{5:[1,160]},t(W,[2,20]),t(W,[2,21]),t(W,[2,23]),t(W,[2,24]),{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,161],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,162],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,163],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{17:[1,164]},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[2,47],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,50:[1,165],51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{17:[1,166]},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[2,45],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,49:[1,167],51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{17:[1,168]},{17:[1,169]},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[2,43],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,48:[1,170],51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,171],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{16:[1,172]},t(W,[2,50]),{16:[1,173]},t(W,[2,55]),t(tu,[2,76]),{76:[1,174]},{16:[1,175]},t(W,[2,52]),{16:[1,176]},t(W,[2,57]),t(W,[2,53]),{23:177,73:C},{23:178,73:C},{23:179,73:C},{58:180,104:tO},{23:181,72:[1,182],73:C},{58:183,104:tO},{58:184,104:tO},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(W,[2,17]),t(th,[2,11]),{13:186,51:S,53:P,54:w},t(th,[2,13]),t(th,[2,14]),t(W,[2,19]),t(W,[2,35]),t(W,[2,36]),t(W,[2,37]),t(W,[2,38]),{16:[1,187]},t(W,[2,39]),{16:[1,188]},t(W,[2,40]),t(W,[2,41]),{16:[1,189]},t(W,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:tO},{58:196,104:tO},{58:197,104:tO},{5:[2,75]},{58:198,104:tO},{23:199,73:C},{5:[2,58]},{5:[2,59]},{23:200,73:C},t(th,[2,12]),t(tT,s,{7:124,41:201}),t(tE,s,{7:126,43:202}),t(tg,s,{7:129,46:203}),t(W,[2,49]),t(W,[2,54]),t(tu,[2,77]),t(W,[2,51]),t(W,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:tO},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:(0,c.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=e,a}},"parseError"),parse:(0,c.eW)(function(t){var e=this,a=[0],r=[],s=[null],i=[],n=this.table,o="",l=0,d=0,h=0,p=i.slice.call(arguments,1),T=Object.create(this.lexer),E={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(E.yy[g]=this.yy[g]);T.setInput(t,E.yy),E.yy.lexer=T,E.yy.parser=this,void 0===T.yylloc&&(T.yylloc={});var u=T.yylloc;i.push(u);var y=T.options&&T.options.ranges;function O(){var t;return"number"!=typeof(t=r.pop()||T.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof E.yy.parseError?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.eW)(function(t){a.length=a.length-2*t,s.length=s.length-t,i.length=i.length-t},"popStack"),(0,c.eW)(O,"lex");for(var _,x,b,m,I,f,L,R,S,P={};;){if(b=a[a.length-1],this.defaultActions[b]?m=this.defaultActions[b]:(null==_&&(_=O()),m=n[b]&&n[b][_]),void 0===m||!m.length||!m[0]){var w="";for(f in S=[],n[b])this.terminals_[f]&&f>2&&S.push("'"+this.terminals_[f]+"'");w=T.showPosition?"Parse error on line "+(l+1)+":\n"+T.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(w,{text:T.match,token:this.terminals_[_]||_,line:T.yylineno,loc:u,expected:S})}if(m[0]instanceof Array&&m.length>1)throw Error("Parse Error: multiple actions possible at state: "+b+", token: "+_);switch(m[0]){case 1:a.push(_),s.push(T.yytext),i.push(T.yylloc),a.push(m[1]),_=null,x?(_=x,x=null):(d=T.yyleng,o=T.yytext,l=T.yylineno,u=T.yylloc,h>0&&h--);break;case 2:if(L=this.productions_[m[1]][1],P.$=s[s.length-L],P._$={first_line:i[i.length-(L||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(L||1)].first_column,last_column:i[i.length-1].last_column},y&&(P._$.range=[i[i.length-(L||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(P,[o,d,l,E.yy,m[1],s,i].concat(p))))return I;L&&(a=a.slice(0,-1*L*2),s=s.slice(0,-1*L),i=i.slice(0,-1*L)),a.push(this.productions_[m[1]][0]),s.push(P.$),i.push(P._$),R=n[a[a.length-2]][a[a.length-1]],a.push(R);break;case 3:return!0}}return!0},"parse")},tx={EOF:1,parseError:(0,c.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,c.eW)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.eW)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.eW)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=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:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.eW)(function(){return this._more=!0,this},"more"),reject:(0,c.eW)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.eW)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.eW)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.eW)(function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var i in s)this[i]=s[i];return!1},"test_match"),next:(0,c.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,r,s=this._currentRules(),i=0;i<s.length;i++)if((a=this._input.match(this.rules[s[i]]))&&(!e||a[0].length>e[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,c.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.eW)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.eW)(function(t,e,a,r){switch(a){case 0:case 59:case 92:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:case 60:return e.yytext=e.yytext.trim(),73;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 13:return e.yytext=e.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return e.yytext=e.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};function tb(){this.yy={}}return t_.lexer=tx,(0,c.eW)(tb,"Parser"),tb.prototype=t_,t_.Parser=tb,new tb}();h.parser=h;var p={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},T={FILLED:0,OPEN:1},E={LEFTOF:0,RIGHTOF:1,OVER:2},g=class{constructor(){this.state=new i.A(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=o.GN,this.setAccDescription=o.U$,this.setDiagramTitle=o.g2,this.getAccTitle=o.eu,this.getAccDescription=o.Mx,this.getDiagramTitle=o.Kr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,o.nV)().wrap),this.LINETYPE=p,this.ARROWTYPE=T,this.PLACEMENT=E}static{(0,c.eW)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,a,s,i){let n,o=this.state.records.currentBox;if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}",n=(0,r.z)(t,{schema:r.A})}s=n?.type??s,n?.alias&&(!a||a.text===e)&&(a={text:n.alias,wrap:a?.wrap,type:s});let c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==a)return}if(a?.text==null&&(a={text:e,type:s}),(null==s||null==a.text)&&(a={text:e,type:s}),this.state.records.actors.set(t,{box:o,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:s??"participant"}),this.state.records.prevActor){let e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e;let a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:r})}addSignal(t,e,a,r,s=!1,i){if(r===this.LINETYPE.ACTIVE_END&&1>this.activationCount(t??"")){let e=Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:s,centralConnection:i??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();let e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:o.nV().sequence?.wrap??!1}clear(){this.state.reset(),(0,o.ZH)()}parseMessage(t){let e=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(e),s={text:r,wrap:a};return c.cM.debug(`parseMessage: ${JSON.stringify(s)}`),s}parseBoxData(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{let e=new Option().style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}let{wrap:s,cleanedText:i}=this.extractWrap(r);return{text:i?(0,o.oO)(i,(0,o.nV)()):void 0,color:a,wrap:s}}addNote(t,e,a){let r={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},s=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:s[0],to:s[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){let a=this.getActor(t);try{let t=(0,o.oO)(e.text,(0,o.nV)());t=(t=t.replace(/&equals;/g,"=")).replace(/&amp;/g,"&");let r=JSON.parse(t);this.insertLinks(a,r)}catch(t){c.cM.error("error while parsing actor link text",t)}}addALink(t,e){let a=this.getActor(t);try{let t={},r=(0,o.oO)(e.text,(0,o.nV)()),s=r.indexOf("@"),i=(r=(r=r.replace(/&equals;/g,"=")).replace(/&amp;/g,"&")).slice(0,s-1).trim(),n=r.slice(s+1).trim();t[i]=n,this.insertLinks(a,t)}catch(t){c.cM.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(let a in e)t.links[a]=e[a]}addProperties(t,e){let a=this.getActor(t);try{let t=(0,o.oO)(e.text,(0,o.nV)()),r=JSON.parse(t);this.insertProperties(a,r)}catch(t){c.cM.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(let a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){let a=this.getActor(t),r=document.getElementById(e.text);try{let t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(t){c.cM.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(t?.properties!==void 0)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,o.GN)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,o.nV)().sequence}},u=(0,c.eW)(t=>{let e=t.dropShadow??"none",{look:a}=(0,o.nV)();return`.actor {
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5868],{11643:function(t,e,a){a.d(e,{diagram:function(){return tC}});var r=a(41425),s=a(13589),i=a(30751),n=a(40778),o=a(49125),c=a(17632),l=a(68859),d=a(95612),h=function(){var t=(0,c.eW)(function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],n=[1,11],o=[1,12],l=[1,14],d=[1,15],h=[1,17],p=[1,18],T=[1,19],E=[1,25],g=[1,26],u=[1,27],y=[1,28],O=[1,29],_=[1,30],x=[1,31],b=[1,32],m=[1,33],I=[1,34],f=[1,35],L=[1,36],R=[1,37],S=[1,38],P=[1,39],w=[1,40],N=[1,42],D=[1,43],A=[1,44],k=[1,45],M=[1,46],C=[1,47],W=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Y=[1,74],v=[1,80],B=[1,81],$=[1,82],V=[1,83],F=[1,84],K=[1,85],q=[1,86],H=[1,87],z=[1,88],U=[1,89],j=[1,90],G=[1,91],X=[1,92],J=[1,93],Z=[1,94],Q=[1,95],tt=[1,96],te=[1,97],ta=[1,98],tr=[1,99],ts=[1,100],ti=[1,101],tn=[1,102],to=[1,103],tc=[1,104],tl=[1,105],td=[2,78],th=[4,5,17,51,53,54],tp=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],tT=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],tE=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],tg=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],tu=[5,52],ty=[70,71,72,73],tO=[1,151],t_={trace:(0,c.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:(0,c.eW)(function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 10:case 8:case 9:case 14:this.$=[];break;case 5:case 11:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 12:case 13:case 67:this.$=i[o];break;case 16:i[o].type="createParticipant",this.$=i[o];break;case 17:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 30:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 31:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 32:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 35:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 42:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 44:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 46:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 48:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 49:case 54:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 50:case 55:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 51:case 56:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 52:case 57:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 53:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 58:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 59:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 60:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 62:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 63:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 66:this.$=[i[o-2],i[o]];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 71:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 72:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:i[o-1].actor}];break;case 73:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:i[o-4].actor}];break;case 74:this.$=[i[o-5],i[o-1],{type:"addMessage",from:i[o-5].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:i[o-1].actor},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:i[o-5].actor}];break;case 75:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 76:this.$={type:"addParticipant",actor:i[o-1],config:i[o]};break;case 77:this.$=i[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:i[o]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(i[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},t(W,[2,5]),{9:48,13:13,14:l,15:d,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},t(W,[2,7]),t(W,[2,8]),t(W,[2,9]),t(W,[2,15]),{13:49,51:S,53:P,54:w},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:C},{23:56,73:C},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(W,[2,30]),t(W,[2,31]),{33:[1,62]},{35:[1,63]},t(W,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Y},{23:75,55:76,73:Y},{23:77,73:C},{69:78,72:[1,79],78:v,79:B,80:$,81:V,82:F,83:K,84:q,85:H,86:z,87:U,88:j,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:te,96:ta,97:tr,98:ts,99:ti,100:tn,101:to,102:tc,103:tl},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:C},{23:111,73:C},{23:112,73:C},{23:113,73:C},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],td),t(W,[2,6]),t(W,[2,16]),t(th,[2,10],{11:114}),t(W,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(W,[2,22]),{5:[1,118]},{5:[1,119]},t(W,[2,25]),t(W,[2,26]),t(W,[2,27]),t(W,[2,28]),t(W,[2,29]),t(W,[2,32]),t(W,[2,33]),t(tp,s,{7:120}),t(tp,s,{7:121}),t(tp,s,{7:122}),t(tT,s,{41:123,7:124}),t(tE,s,{43:125,7:126}),t(tE,s,{7:126,43:127}),t(tg,s,{46:128,7:129}),t(tp,s,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(tu,td,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:C},{69:146,78:v,79:B,80:$,81:V,82:F,83:K,84:q,85:H,86:z,87:U,88:j,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:te,96:ta,97:tr,98:ts,99:ti,100:tn,101:to,102:tc,103:tl},t(ty,[2,79]),t(ty,[2,80]),t(ty,[2,81]),t(ty,[2,82]),t(ty,[2,83]),t(ty,[2,84]),t(ty,[2,85]),t(ty,[2,86]),t(ty,[2,87]),t(ty,[2,88]),t(ty,[2,89]),t(ty,[2,90]),t(ty,[2,91]),t(ty,[2,92]),t(ty,[2,93]),t(ty,[2,94]),t(ty,[2,95]),t(ty,[2,96]),t(ty,[2,97]),t(ty,[2,98]),t(ty,[2,99]),t(ty,[2,100]),t(ty,[2,101]),t(ty,[2,102]),t(ty,[2,103]),t(ty,[2,104]),{23:147,73:C},{23:149,60:148,73:C},{73:[2,68]},{73:[2,69]},{58:150,104:tO},{58:152,104:tO},{58:153,104:tO},{58:154,104:tO},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:S,53:P,54:w},{5:[1,160]},t(W,[2,20]),t(W,[2,21]),t(W,[2,23]),t(W,[2,24]),{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,161],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,162],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,163],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{17:[1,164]},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[2,47],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,50:[1,165],51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{17:[1,166]},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[2,45],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,49:[1,167],51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{17:[1,168]},{17:[1,169]},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[2,43],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,48:[1,170],51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{4:i,5:n,8:8,9:10,10:o,13:13,14:l,15:d,17:[1,171],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:O,37:_,38:x,39:b,40:m,42:I,44:f,45:L,47:R,51:S,53:P,54:w,56:N,61:D,62:A,63:k,64:M,73:C},{16:[1,172]},t(W,[2,50]),{16:[1,173]},t(W,[2,55]),t(tu,[2,76]),{76:[1,174]},{16:[1,175]},t(W,[2,52]),{16:[1,176]},t(W,[2,57]),t(W,[2,53]),{23:177,73:C},{23:178,73:C},{23:179,73:C},{58:180,104:tO},{23:181,72:[1,182],73:C},{58:183,104:tO},{58:184,104:tO},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(W,[2,17]),t(th,[2,11]),{13:186,51:S,53:P,54:w},t(th,[2,13]),t(th,[2,14]),t(W,[2,19]),t(W,[2,35]),t(W,[2,36]),t(W,[2,37]),t(W,[2,38]),{16:[1,187]},t(W,[2,39]),{16:[1,188]},t(W,[2,40]),t(W,[2,41]),{16:[1,189]},t(W,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:tO},{58:196,104:tO},{58:197,104:tO},{5:[2,75]},{58:198,104:tO},{23:199,73:C},{5:[2,58]},{5:[2,59]},{23:200,73:C},t(th,[2,12]),t(tT,s,{7:124,41:201}),t(tE,s,{7:126,43:202}),t(tg,s,{7:129,46:203}),t(W,[2,49]),t(W,[2,54]),t(tu,[2,77]),t(W,[2,51]),t(W,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:tO},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:(0,c.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=e,a}},"parseError"),parse:(0,c.eW)(function(t){var e=this,a=[0],r=[],s=[null],i=[],n=this.table,o="",l=0,d=0,h=0,p=i.slice.call(arguments,1),T=Object.create(this.lexer),E={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(E.yy[g]=this.yy[g]);T.setInput(t,E.yy),E.yy.lexer=T,E.yy.parser=this,void 0===T.yylloc&&(T.yylloc={});var u=T.yylloc;i.push(u);var y=T.options&&T.options.ranges;function O(){var t;return"number"!=typeof(t=r.pop()||T.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof E.yy.parseError?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.eW)(function(t){a.length=a.length-2*t,s.length=s.length-t,i.length=i.length-t},"popStack"),(0,c.eW)(O,"lex");for(var _,x,b,m,I,f,L,R,S,P={};;){if(b=a[a.length-1],this.defaultActions[b]?m=this.defaultActions[b]:(null==_&&(_=O()),m=n[b]&&n[b][_]),void 0===m||!m.length||!m[0]){var w="";for(f in S=[],n[b])this.terminals_[f]&&f>2&&S.push("'"+this.terminals_[f]+"'");w=T.showPosition?"Parse error on line "+(l+1)+":\n"+T.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(w,{text:T.match,token:this.terminals_[_]||_,line:T.yylineno,loc:u,expected:S})}if(m[0]instanceof Array&&m.length>1)throw Error("Parse Error: multiple actions possible at state: "+b+", token: "+_);switch(m[0]){case 1:a.push(_),s.push(T.yytext),i.push(T.yylloc),a.push(m[1]),_=null,x?(_=x,x=null):(d=T.yyleng,o=T.yytext,l=T.yylineno,u=T.yylloc,h>0&&h--);break;case 2:if(L=this.productions_[m[1]][1],P.$=s[s.length-L],P._$={first_line:i[i.length-(L||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(L||1)].first_column,last_column:i[i.length-1].last_column},y&&(P._$.range=[i[i.length-(L||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(P,[o,d,l,E.yy,m[1],s,i].concat(p))))return I;L&&(a=a.slice(0,-1*L*2),s=s.slice(0,-1*L),i=i.slice(0,-1*L)),a.push(this.productions_[m[1]][0]),s.push(P.$),i.push(P._$),R=n[a[a.length-2]][a[a.length-1]],a.push(R);break;case 3:return!0}}return!0},"parse")},tx={EOF:1,parseError:(0,c.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,c.eW)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.eW)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.eW)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=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:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.eW)(function(){return this._more=!0,this},"more"),reject:(0,c.eW)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.eW)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.eW)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.eW)(function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var i in s)this[i]=s[i];return!1},"test_match"),next:(0,c.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,r,s=this._currentRules(),i=0;i<s.length;i++)if((a=this._input.match(this.rules[s[i]]))&&(!e||a[0].length>e[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,c.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.eW)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.eW)(function(t,e,a,r){switch(a){case 0:case 59:case 92:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:case 60:return e.yytext=e.yytext.trim(),73;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 13:return e.yytext=e.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return e.yytext=e.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};function tb(){this.yy={}}return t_.lexer=tx,(0,c.eW)(tb,"Parser"),tb.prototype=t_,t_.Parser=tb,new tb}();h.parser=h;var p={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},T={FILLED:0,OPEN:1},E={LEFTOF:0,RIGHTOF:1,OVER:2},g=class{constructor(){this.state=new i.A(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=o.GN,this.setAccDescription=o.U$,this.setDiagramTitle=o.g2,this.getAccTitle=o.eu,this.getAccDescription=o.Mx,this.getDiagramTitle=o.Kr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,o.nV)().wrap),this.LINETYPE=p,this.ARROWTYPE=T,this.PLACEMENT=E}static{(0,c.eW)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,a,s,i){let n,o=this.state.records.currentBox;if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}",n=(0,r.z)(t,{schema:r.A})}s=n?.type??s,n?.alias&&(!a||a.text===e)&&(a={text:n.alias,wrap:a?.wrap,type:s});let c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==a)return}if(a?.text==null&&(a={text:e,type:s}),(null==s||null==a.text)&&(a={text:e,type:s}),this.state.records.actors.set(t,{box:o,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:s??"participant"}),this.state.records.prevActor){let e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e;let a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:r})}addSignal(t,e,a,r,s=!1,i){if(r===this.LINETYPE.ACTIVE_END&&1>this.activationCount(t??"")){let e=Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:s,centralConnection:i??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();let e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:o.nV().sequence?.wrap??!1}clear(){this.state.reset(),(0,o.ZH)()}parseMessage(t){let e=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(e),s={text:r,wrap:a};return c.cM.debug(`parseMessage: ${JSON.stringify(s)}`),s}parseBoxData(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{let e=new Option().style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}let{wrap:s,cleanedText:i}=this.extractWrap(r);return{text:i?(0,o.oO)(i,(0,o.nV)()):void 0,color:a,wrap:s}}addNote(t,e,a){let r={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},s=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:s[0],to:s[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){let a=this.getActor(t);try{let t=(0,o.oO)(e.text,(0,o.nV)());t=(t=t.replace(/&equals;/g,"=")).replace(/&amp;/g,"&");let r=JSON.parse(t);this.insertLinks(a,r)}catch(t){c.cM.error("error while parsing actor link text",t)}}addALink(t,e){let a=this.getActor(t);try{let t={},r=(0,o.oO)(e.text,(0,o.nV)()),s=r.indexOf("@"),i=(r=(r=r.replace(/&equals;/g,"=")).replace(/&amp;/g,"&")).slice(0,s-1).trim(),n=r.slice(s+1).trim();t[i]=n,this.insertLinks(a,t)}catch(t){c.cM.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(let a in e)t.links[a]=e[a]}addProperties(t,e){let a=this.getActor(t);try{let t=(0,o.oO)(e.text,(0,o.nV)()),r=JSON.parse(t);this.insertProperties(a,r)}catch(t){c.cM.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(let a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){let a=this.getActor(t),r=document.getElementById(e.text);try{let t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(t){c.cM.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(t?.properties!==void 0)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,o.GN)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,o.nV)().sequence}},u=(0,c.eW)(t=>{let e=t.dropShadow??"none",{look:a}=(0,o.nV)();return`.actor {
2
2
  stroke: ${t.actorBorder};
3
3
  fill: ${t.actorBkg};
4
4
  stroke-width: ${t.strokeWidth??1};