commandmate 0.1.5 → 0.1.7

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 (341) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-build-manifest.json +72 -0
  3. package/.next/app-path-routes-manifest.json +1 -0
  4. package/.next/build-manifest.json +32 -0
  5. package/.next/cache/.tsbuildinfo +1 -0
  6. package/.next/cache/config.json +7 -0
  7. package/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/.next/cache/webpack/client-production/1.pack +0 -0
  9. package/.next/cache/webpack/client-production/2.pack +0 -0
  10. package/.next/cache/webpack/client-production/index.pack +0 -0
  11. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  12. package/.next/cache/webpack/edge-server-production/0.pack +0 -0
  13. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  14. package/.next/cache/webpack/server-production/0.pack +0 -0
  15. package/.next/cache/webpack/server-production/index.pack +0 -0
  16. package/.next/export-marker.json +1 -0
  17. package/.next/images-manifest.json +1 -0
  18. package/.next/next-minimal-server.js.nft.json +1 -0
  19. package/.next/next-server.js.nft.json +1 -0
  20. package/.next/package.json +1 -0
  21. package/.next/prerender-manifest.json +1 -0
  22. package/.next/react-loadable-manifest.json +249 -0
  23. package/.next/required-server-files.json +1 -0
  24. package/.next/routes-manifest.json +1 -0
  25. package/.next/server/app/_not-found/page.js +1 -0
  26. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  27. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  28. package/.next/server/app/_not-found.html +1 -0
  29. package/.next/server/app/_not-found.meta +6 -0
  30. package/.next/server/app/_not-found.rsc +10 -0
  31. package/.next/server/app/api/external-apps/[id]/health/route.js +45 -0
  32. package/.next/server/app/api/external-apps/[id]/health/route.js.nft.json +1 -0
  33. package/.next/server/app/api/external-apps/[id]/route.js +45 -0
  34. package/.next/server/app/api/external-apps/[id]/route.js.nft.json +1 -0
  35. package/.next/server/app/api/external-apps/route.js +45 -0
  36. package/.next/server/app/api/external-apps/route.js.nft.json +1 -0
  37. package/.next/server/app/api/hooks/claude-done/route.js +19 -0
  38. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -0
  39. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -0
  40. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -0
  41. package/.next/server/app/api/repositories/clone/route.js +1 -0
  42. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -0
  43. package/.next/server/app/api/repositories/route.js +1 -0
  44. package/.next/server/app/api/repositories/route.js.nft.json +1 -0
  45. package/.next/server/app/api/repositories/scan/route.js +1 -0
  46. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -0
  47. package/.next/server/app/api/repositories/sync/route.js +1 -0
  48. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -0
  49. package/.next/server/app/api/slash-commands/route.js +1 -0
  50. package/.next/server/app/api/slash-commands/route.js.nft.json +1 -0
  51. package/.next/server/app/api/slash-commands.body +1 -0
  52. package/.next/server/app/api/slash-commands.meta +1 -0
  53. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -0
  54. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -0
  55. package/.next/server/app/api/worktrees/[id]/capture/route.js +2 -0
  56. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -0
  57. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -0
  58. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js.nft.json +1 -0
  59. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -0
  60. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -0
  61. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -0
  62. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js.nft.json +1 -0
  63. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -0
  64. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -0
  65. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -0
  66. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -0
  67. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -0
  68. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js.nft.json +1 -0
  69. package/.next/server/app/api/worktrees/[id]/logs/route.js +19 -0
  70. package/.next/server/app/api/worktrees/[id]/logs/route.js.nft.json +1 -0
  71. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -0
  72. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js.nft.json +1 -0
  73. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -0
  74. package/.next/server/app/api/worktrees/[id]/memos/route.js.nft.json +1 -0
  75. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -0
  76. package/.next/server/app/api/worktrees/[id]/messages/route.js.nft.json +1 -0
  77. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -0
  78. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -0
  79. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -0
  80. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -0
  81. package/.next/server/app/api/worktrees/[id]/route.js +1 -0
  82. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -0
  83. package/.next/server/app/api/worktrees/[id]/search/route.js +1 -0
  84. package/.next/server/app/api/worktrees/[id]/search/route.js.nft.json +1 -0
  85. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -0
  86. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -0
  87. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -0
  88. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js.nft.json +1 -0
  89. package/.next/server/app/api/worktrees/[id]/start-polling/route.js +1 -0
  90. package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +1 -0
  91. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -0
  92. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -0
  93. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -0
  94. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js.nft.json +1 -0
  95. package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -0
  96. package/.next/server/app/api/worktrees/[id]/tree/route.js.nft.json +1 -0
  97. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js +1 -0
  98. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js.nft.json +1 -0
  99. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -0
  100. package/.next/server/app/api/worktrees/[id]/viewed/route.js.nft.json +1 -0
  101. package/.next/server/app/api/worktrees/route.js +1 -0
  102. package/.next/server/app/api/worktrees/route.js.nft.json +1 -0
  103. package/.next/server/app/apple-icon.png/route.js +1 -0
  104. package/.next/server/app/apple-icon.png/route.js.nft.json +1 -0
  105. package/.next/server/app/apple-icon.png.body +0 -0
  106. package/.next/server/app/apple-icon.png.meta +1 -0
  107. package/.next/server/app/icon.png/route.js +1 -0
  108. package/.next/server/app/icon.png/route.js.nft.json +1 -0
  109. package/.next/server/app/icon.png.body +0 -0
  110. package/.next/server/app/icon.png.meta +1 -0
  111. package/.next/server/app/index.html +9 -0
  112. package/.next/server/app/index.meta +5 -0
  113. package/.next/server/app/index.rsc +8 -0
  114. package/.next/server/app/page.js +16 -0
  115. package/.next/server/app/page.js.nft.json +1 -0
  116. package/.next/server/app/page_client-reference-manifest.js +1 -0
  117. package/.next/server/app/proxy/[...path]/route.js +45 -0
  118. package/.next/server/app/proxy/[...path]/route.js.nft.json +1 -0
  119. package/.next/server/app/worktrees/[id]/files/[...path]/page.js +1 -0
  120. package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +1 -0
  121. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -0
  122. package/.next/server/app/worktrees/[id]/page.js +21 -0
  123. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -0
  124. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -0
  125. package/.next/server/app/worktrees/[id]/simple-terminal/page.js +4 -0
  126. package/.next/server/app/worktrees/[id]/simple-terminal/page.js.nft.json +1 -0
  127. package/.next/server/app/worktrees/[id]/simple-terminal/page_client-reference-manifest.js +1 -0
  128. package/.next/server/app/worktrees/[id]/terminal/page.js +6 -0
  129. package/.next/server/app/worktrees/[id]/terminal/page.js.nft.json +1 -0
  130. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -0
  131. package/.next/server/app-paths-manifest.json +46 -0
  132. package/.next/server/chunks/1318.js +29 -0
  133. package/.next/server/chunks/1528.js +1 -0
  134. package/.next/server/chunks/1682.js +6 -0
  135. package/.next/server/chunks/2518.js +12 -0
  136. package/.next/server/chunks/3053.js +1 -0
  137. package/.next/server/chunks/3673.js +1 -0
  138. package/.next/server/chunks/3853.js +1 -0
  139. package/.next/server/chunks/434.js +1 -0
  140. package/.next/server/chunks/4471.js +2 -0
  141. package/.next/server/chunks/4893.js +2 -0
  142. package/.next/server/chunks/5972.js +12 -0
  143. package/.next/server/chunks/6550.js +1 -0
  144. package/.next/server/chunks/6621.js +1 -0
  145. package/.next/server/chunks/7213.js +1 -0
  146. package/.next/server/chunks/7425.js +500 -0
  147. package/.next/server/chunks/8585.js +1 -0
  148. package/.next/server/chunks/8887.js +1 -0
  149. package/.next/server/chunks/8948.js +2 -0
  150. package/.next/server/chunks/9703.js +31 -0
  151. package/.next/server/chunks/9723.js +19 -0
  152. package/.next/server/chunks/font-manifest.json +1 -0
  153. package/.next/server/edge-runtime-webpack.js +2 -0
  154. package/.next/server/edge-runtime-webpack.js.map +1 -0
  155. package/.next/server/font-manifest.json +1 -0
  156. package/.next/server/functions-config-manifest.json +1 -0
  157. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  158. package/.next/server/middleware-build-manifest.js +1 -0
  159. package/.next/server/middleware-manifest.json +32 -0
  160. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  161. package/.next/server/next-font-manifest.js +1 -0
  162. package/.next/server/next-font-manifest.json +1 -0
  163. package/.next/server/pages/404.html +1 -0
  164. package/.next/server/pages/500.html +1 -0
  165. package/.next/server/pages/_app.js +1 -0
  166. package/.next/server/pages/_app.js.nft.json +1 -0
  167. package/.next/server/pages/_document.js +1 -0
  168. package/.next/server/pages/_document.js.nft.json +1 -0
  169. package/.next/server/pages/_error.js +1 -0
  170. package/.next/server/pages/_error.js.nft.json +1 -0
  171. package/.next/server/pages-manifest.json +1 -0
  172. package/.next/server/server-reference-manifest.js +1 -0
  173. package/.next/server/server-reference-manifest.json +1 -0
  174. package/.next/server/src/middleware.js +14 -0
  175. package/.next/server/src/middleware.js.map +1 -0
  176. package/.next/server/webpack-runtime.js +1 -0
  177. package/.next/static/3jNZMmFnQhc5G7met-OU4/_buildManifest.js +1 -0
  178. package/.next/static/3jNZMmFnQhc5G7met-OU4/_ssgManifest.js +1 -0
  179. package/.next/static/chunks/0dbeb660.3e800dfbd28be3bd.js +53 -0
  180. package/.next/static/chunks/1015.0eaa4da7f61149bc.js +59 -0
  181. package/.next/static/chunks/1098.49268c9fe1b028fa.js +1 -0
  182. package/.next/static/chunks/13.feeafc7cc620f8c4.js +1 -0
  183. package/.next/static/chunks/1423.7b1e8bf760d28078.js +1 -0
  184. package/.next/static/chunks/1582.9f8590f71ff798ca.js +55 -0
  185. package/.next/static/chunks/1817.a66d96cedb761daa.js +262 -0
  186. package/.next/static/chunks/2117-d845c2cd62e344a6.js +2 -0
  187. package/.next/static/chunks/2398.0b21e4eb7006a230.js +93 -0
  188. package/.next/static/chunks/2526.8ac62b527c9ab703.js +43 -0
  189. package/.next/static/chunks/2626.2125083a1ff3b80a.js +29 -0
  190. package/.next/static/chunks/2689.720a4874b02d4211.js +174 -0
  191. package/.next/static/chunks/2853-d11a80b03c9a1640.js +1 -0
  192. package/.next/static/chunks/2957-327e43ef4c12808f.js +1 -0
  193. package/.next/static/chunks/2cdb6380.35626fc6e41bbba4.js +136 -0
  194. package/.next/static/chunks/30d07d85-393352a92199f695.js +3 -0
  195. package/.next/static/chunks/3559.f073f72c4466ce0e.js +1 -0
  196. package/.next/static/chunks/3574.7a94c27e6a496a56.js +63 -0
  197. package/.next/static/chunks/383.20683891c9a5f2c4.js +4 -0
  198. package/.next/static/chunks/3843.3fdda732987f7bb8.js +1 -0
  199. package/.next/static/chunks/3852.822389f445c9b427.js +1 -0
  200. package/.next/static/chunks/3991.4bc063cb5be3a86c.js +1 -0
  201. package/.next/static/chunks/4212.52c1bb34fc97d0d0.js +131 -0
  202. package/.next/static/chunks/4327.3b84aa049900fdeb.js +60 -0
  203. package/.next/static/chunks/4362.7bd6f0282e49d79b.js +1 -0
  204. package/.next/static/chunks/4721.40615a5f4f32b5fb.js +1 -0
  205. package/.next/static/chunks/4851-45df4d388db5623f.js +1 -0
  206. package/.next/static/chunks/5112.17318d1c6b28044b.js +1 -0
  207. package/.next/static/chunks/5126.93fa4e797d609286.js +56 -0
  208. package/.next/static/chunks/5387.47590ac4ef66c864.js +5 -0
  209. package/.next/static/chunks/5813.4483664ba482beb1.js +1 -0
  210. package/.next/static/chunks/6143.1450875bd03a2366.js +36 -0
  211. package/.next/static/chunks/6406.9653f0d41ab85059.js +1 -0
  212. package/.next/static/chunks/656.d72f25ce819bd77e.js +149 -0
  213. package/.next/static/chunks/6678.492e73ca42b2a273.js +62 -0
  214. package/.next/static/chunks/6725-f7607851b7d57eb1.js +1 -0
  215. package/.next/static/chunks/6792.3c01ac4dda4b5c6d.js +1 -0
  216. package/.next/static/chunks/7004.808cbf327ef5955e.js +1 -0
  217. package/.next/static/chunks/7290.09ef84cf94f90c4d.js +1 -0
  218. package/.next/static/chunks/7415.6b481c2baf363262.js +148 -0
  219. package/.next/static/chunks/7648-325564a6e12a3257.js +1 -0
  220. package/.next/static/chunks/7665.47fccad04449a8f9.js +215 -0
  221. package/.next/static/chunks/7753.6bdce86b7fde3d10.js +166 -0
  222. package/.next/static/chunks/8125.245a9df052d274fb.js +1 -0
  223. package/.next/static/chunks/816-7e340dad784be28c.js +1 -0
  224. package/.next/static/chunks/8288.4883743fa40672e2.js +24 -0
  225. package/.next/static/chunks/8522.1607e96011c66877.js +1 -0
  226. package/.next/static/chunks/8772.863c564498d88487.js +1 -0
  227. package/.next/static/chunks/8841.dadeb1ece8e46004.js +1 -0
  228. package/.next/static/chunks/8885.f8d9912b40d74811.js +1 -0
  229. package/.next/static/chunks/90542734.c1553d0fe7fc14fc.js +1 -0
  230. package/.next/static/chunks/9365-733d8c05712d2888.js +1 -0
  231. package/.next/static/chunks/9552.b7dfb7903ead934b.js +1 -0
  232. package/.next/static/chunks/9834.295b45635ce04f5e.js +24 -0
  233. package/.next/static/chunks/app/_not-found/page-a9d04e58c81115ec.js +1 -0
  234. package/.next/static/chunks/app/layout-37e55f11dcc8b1bf.js +1 -0
  235. package/.next/static/chunks/app/page-9cd00de9cc0abc43.js +1 -0
  236. package/.next/static/chunks/app/worktrees/[id]/files/[...path]/page-9e5adf57cbbbdf05.js +1 -0
  237. package/.next/static/chunks/app/worktrees/[id]/page-8c6676303b63fdaf.js +1 -0
  238. package/.next/static/chunks/app/worktrees/[id]/simple-terminal/page-16feb3e86e42f4d1.js +1 -0
  239. package/.next/static/chunks/app/worktrees/[id]/terminal/page-be802baffc84dbd2.js +1 -0
  240. package/.next/static/chunks/d3ac728e.6c9c508274d4d2d5.js +1 -0
  241. package/.next/static/chunks/fd9d1056-bbe86e4ae099d5cd.js +1 -0
  242. package/.next/static/chunks/framework-8e0e0f4a6b83a956.js +1 -0
  243. package/.next/static/chunks/main-a960f4a5e1a2f598.js +1 -0
  244. package/.next/static/chunks/main-app-420d93e43682fee5.js +1 -0
  245. package/.next/static/chunks/pages/_app-3c9ca398d360b709.js +1 -0
  246. package/.next/static/chunks/pages/_error-cf5ca766ac8f493f.js +1 -0
  247. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  248. package/.next/static/chunks/webpack-3fc79fab9bb738d7.js +1 -0
  249. package/.next/static/css/5eacd01f773eed7f.css +11 -0
  250. package/.next/static/css/85fa6dafca566008.css +1 -0
  251. package/.next/static/css/e174aa24f94ce607.css +3 -0
  252. package/.next/trace +5 -0
  253. package/.next/types/app/api/external-apps/[id]/health/route.ts +343 -0
  254. package/.next/types/app/api/external-apps/[id]/route.ts +343 -0
  255. package/.next/types/app/api/external-apps/route.ts +343 -0
  256. package/.next/types/app/api/hooks/claude-done/route.ts +343 -0
  257. package/.next/types/app/api/repositories/clone/[jobId]/route.ts +343 -0
  258. package/.next/types/app/api/repositories/clone/route.ts +343 -0
  259. package/.next/types/app/api/repositories/route.ts +343 -0
  260. package/.next/types/app/api/repositories/scan/route.ts +343 -0
  261. package/.next/types/app/api/repositories/sync/route.ts +343 -0
  262. package/.next/types/app/api/slash-commands/route.ts +343 -0
  263. package/.next/types/app/api/worktrees/[id]/auto-yes/route.ts +343 -0
  264. package/.next/types/app/api/worktrees/[id]/capture/route.ts +343 -0
  265. package/.next/types/app/api/worktrees/[id]/cli-tool/route.ts +343 -0
  266. package/.next/types/app/api/worktrees/[id]/current-output/route.ts +343 -0
  267. package/.next/types/app/api/worktrees/[id]/files/[...path]/route.ts +343 -0
  268. package/.next/types/app/api/worktrees/[id]/interrupt/route.ts +343 -0
  269. package/.next/types/app/api/worktrees/[id]/kill-session/route.ts +343 -0
  270. package/.next/types/app/api/worktrees/[id]/logs/[filename]/route.ts +343 -0
  271. package/.next/types/app/api/worktrees/[id]/logs/route.ts +343 -0
  272. package/.next/types/app/api/worktrees/[id]/memos/[memoId]/route.ts +343 -0
  273. package/.next/types/app/api/worktrees/[id]/memos/route.ts +343 -0
  274. package/.next/types/app/api/worktrees/[id]/messages/route.ts +343 -0
  275. package/.next/types/app/api/worktrees/[id]/prompt-response/route.ts +343 -0
  276. package/.next/types/app/api/worktrees/[id]/respond/route.ts +343 -0
  277. package/.next/types/app/api/worktrees/[id]/route.ts +343 -0
  278. package/.next/types/app/api/worktrees/[id]/search/route.ts +343 -0
  279. package/.next/types/app/api/worktrees/[id]/send/route.ts +343 -0
  280. package/.next/types/app/api/worktrees/[id]/slash-commands/route.ts +343 -0
  281. package/.next/types/app/api/worktrees/[id]/start-polling/route.ts +343 -0
  282. package/.next/types/app/api/worktrees/[id]/terminal/route.ts +343 -0
  283. package/.next/types/app/api/worktrees/[id]/tree/[...path]/route.ts +343 -0
  284. package/.next/types/app/api/worktrees/[id]/tree/route.ts +343 -0
  285. package/.next/types/app/api/worktrees/[id]/upload/[...path]/route.ts +343 -0
  286. package/.next/types/app/api/worktrees/[id]/viewed/route.ts +343 -0
  287. package/.next/types/app/api/worktrees/route.ts +343 -0
  288. package/.next/types/app/page.ts +79 -0
  289. package/.next/types/app/proxy/[...path]/route.ts +343 -0
  290. package/.next/types/app/worktrees/[id]/files/[...path]/page.ts +79 -0
  291. package/.next/types/app/worktrees/[id]/page.ts +79 -0
  292. package/.next/types/app/worktrees/[id]/simple-terminal/page.ts +79 -0
  293. package/.next/types/app/worktrees/[id]/terminal/page.ts +79 -0
  294. package/.next/types/package.json +1 -0
  295. package/README.md +39 -8
  296. package/dist/cli/commands/init.d.ts +1 -0
  297. package/dist/cli/commands/init.d.ts.map +1 -1
  298. package/dist/cli/commands/init.js +143 -27
  299. package/dist/cli/types/index.d.ts +18 -0
  300. package/dist/cli/types/index.d.ts.map +1 -1
  301. package/dist/cli/utils/env-setup.d.ts +25 -0
  302. package/dist/cli/utils/env-setup.d.ts.map +1 -1
  303. package/dist/cli/utils/env-setup.js +56 -1
  304. package/dist/cli/utils/prompt.d.ts +68 -0
  305. package/dist/cli/utils/prompt.d.ts.map +1 -0
  306. package/dist/cli/utils/prompt.js +208 -0
  307. package/dist/server/server.js +123 -0
  308. package/dist/server/src/lib/claude-output.js +33 -0
  309. package/dist/server/src/lib/claude-session.js +312 -0
  310. package/dist/server/src/lib/cli-patterns.js +137 -0
  311. package/dist/server/src/lib/cli-session.js +73 -0
  312. package/dist/server/src/lib/cli-tools/base.js +51 -0
  313. package/dist/server/src/lib/cli-tools/claude.js +65 -0
  314. package/dist/server/src/lib/cli-tools/codex.js +132 -0
  315. package/dist/server/src/lib/cli-tools/gemini.js +122 -0
  316. package/dist/server/src/lib/cli-tools/index.js +22 -0
  317. package/dist/server/src/lib/cli-tools/manager.js +143 -0
  318. package/dist/server/src/lib/cli-tools/types.js +5 -0
  319. package/dist/server/src/lib/conversation-logger.js +25 -0
  320. package/dist/server/src/lib/db-instance.js +51 -0
  321. package/dist/server/src/lib/db-migrations.js +777 -0
  322. package/dist/server/src/lib/db.js +835 -0
  323. package/dist/server/src/lib/env.js +179 -0
  324. package/dist/server/src/lib/log-manager.js +234 -0
  325. package/dist/server/src/lib/logger.js +232 -0
  326. package/dist/server/src/lib/prompt-detector.js +285 -0
  327. package/dist/server/src/lib/response-poller.js +638 -0
  328. package/dist/server/src/lib/tmux.js +299 -0
  329. package/dist/server/src/lib/worktrees.js +231 -0
  330. package/dist/server/src/lib/ws-server.js +323 -0
  331. package/dist/server/src/types/clone.js +39 -0
  332. package/dist/server/src/types/conversation.js +9 -0
  333. package/dist/server/src/types/external-apps.js +6 -0
  334. package/dist/server/src/types/infinite-messages.js +65 -0
  335. package/dist/server/src/types/markdown-editor.js +94 -0
  336. package/dist/server/src/types/models.js +5 -0
  337. package/dist/server/src/types/sidebar.js +89 -0
  338. package/dist/server/src/types/slash-commands.js +47 -0
  339. package/dist/server/src/types/ui-actions.js +8 -0
  340. package/dist/server/src/types/ui-state.js +62 -0
  341. package/package.json +8 -4
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={},r={};function t(o){var a=r[o];if(void 0!==a)return a.exports;var n=r[o]={exports:{}},u=!0;try{e[o].call(n.exports,n,n.exports,t),u=!1}finally{u&&delete r[o]}return n.exports}t.m=e,t.amdO={},t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},(()=>{var e,r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;t.t=function(o,a){if(1&a&&(o=this(o)),8&a||"object"==typeof o&&o&&(4&a&&o.__esModule||16&a&&"function"==typeof o.then))return o;var n=Object.create(null);t.r(n);var u={};e=e||[null,r({}),r([]),r(r)];for(var f=2&a&&o;"object"==typeof f&&!~e.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach(e=>u[e]=()=>o[e]);return u.default=()=>o,t.d(n,u),n}})(),t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.f={},t.e=e=>Promise.all(Object.keys(t.f).reduce((r,o)=>(t.f[o](e,r),r),[])),t.u=e=>""+e+".js",t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.X=(e,r,o)=>{var a=r;o||(r=e,o=()=>t(t.s=a)),r.map(t.e,t);var n=o();return void 0===n?e:n},(()=>{var e={6658:1},r=r=>{var o=r.modules,a=r.ids,n=r.runtime;for(var u in o)t.o(o,u)&&(t.m[u]=o[u]);n&&n(t);for(var f=0;f<a.length;f++)e[a[f]]=1};t.f.require=(o,a)=>{e[o]||(6658!=o?r(require("./chunks/"+t.u(o))):e[o]=1)},module.exports=t,t.C=r})()})();
@@ -0,0 +1 @@
1
+ self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/_error":["static/chunks/pages/_error-cf5ca766ac8f493f.js"],sortedPages:["/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -0,0 +1 @@
1
+ self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
@@ -0,0 +1,53 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2714],{11866:function(t,e,a){a.d(e,{C1:function(){return c},Lf:function(){return ed},XO:function(){return $},Yn:function(){return ec},ZH:function(){return N},aH:function(){return ey},dW:function(){return eh},gU:function(){return eg},jr:function(){return y},us:function(){return B}});var l=a(10507),r=a(33281),i=a(66691),n=a(94705),s=a(55166),h=a(31954),o=a(84370),d=a(90705),c=(0,h.eW)(async(t,e,a)=>{let l,r;let d=e.useHtmlLabels||(0,s.ku)(s.nV()?.htmlLabels);l=a||"node default";let c=t.insert("g").attr("class",l).attr("id",e.domId||e.id),g=c.insert("g").attr("class","label").attr("style",(0,n.R7)(e.labelStyle));r=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let y=await (0,i.rw)(g,(0,s.oO)((0,n.SH)(r),(0,s.nV)()),{useHtmlLabels:d,width:e.width||s.nV().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),f=y.getBBox(),p=(e?.padding??0)/2;if(d){let t=y.children[0],e=(0,o.Ys)(y),a=t.getElementsByTagName("img");if(a){let t=""===r.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=(0,s.nV)().fontSize?(0,s.nV)().fontSize:window.getComputedStyle(document.body).fontSize,[a=s.vZ.fontSize]=(0,n.VG)(t),l=5*a+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";a(e)}(0,h.eW)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}return d?g.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):g.attr("transform","translate(0, "+-f.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:c,bbox:f,halfPadding:p,label:g}},"labelHelper"),g=(0,h.eW)(async(t,e,a)=>{let l=a.useHtmlLabels||(0,s.ku)(s.nV()?.flowchart?.htmlLabels),r=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,i.rw)(r,(0,s.oO)((0,n.SH)(e),(0,s.nV)()),{useHtmlLabels:l,width:a.width||s.nV()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=h.getBBox(),c=a.padding/2;if((0,s.ku)(s.nV()?.flowchart?.htmlLabels)){let t=h.children[0],e=(0,o.Ys)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):r.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),r.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:r}},"insertLabel"),y=(0,h.eW)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),f=(0,h.eW)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function p(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function u(t,e,a,l,r,i){let n=[],s=a-t,h=2*Math.PI/(s/i),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+r*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function m(t,e,a,l,r,i){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}(0,h.eW)(p,"createPathFromPoints"),(0,h.eW)(u,"generateFullSineWavePoints"),(0,h.eW)(m,"generateCirclePoints");var w=(0,h.eW)((t,e)=>{var a,l,r=t.x,i=t.y,n=e.x-r,s=e.y-i,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:r+a,y:i+l}},"intersectRect");function x(t,e){e&&t.attr("style",e)}async function b(t){let e=(0,o.Ys)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),l=(0,s.nV)(),r=t.label;t.label&&(0,s.l0)(t.label)&&(r=await (0,s.ur)(t.label.replace(s.SY.lineBreakRegex,"\n"),l));let i='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>";return a.html((0,s.oO)(i,l)),x(a,t.labelStyle),a.style("display","inline-block"),a.style("padding-right","1px"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,h.eW)(x,"applyStyle"),(0,h.eW)(b,"addHtmlLabel");var $=(0,h.eW)(async(t,e,a,l)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),(0,s.ku)((0,s.nV)().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"<br />"),h.cM.info("vertexText"+r);let t={isNode:l,label:(0,n.SH)(r).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await b(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof r?r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?r:[]){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),a?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=e.trim(),t.appendChild(l)}return t}},"createLabel"),k=(0,h.eW)((t,e,a,l,r)=>["M",t+r,e,"H",t+a-r,"A",r,r,0,0,1,t+a,e+r,"V",e+l-r,"A",r,r,0,0,1,t+a-r,e+l,"H",t+r,"A",r,r,0,0,1,t,e+l-r,"V",e+r,"A",r,r,0,0,1,t+r,e,"Z"].join(" "),"createRoundedRectPathD"),M=(0,h.eW)(async(t,e)=>{let a;h.cM.info("Creating subgraph rect for ",e.id,e);let n=(0,s.nV)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:x}=(0,r.UG)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s.ku)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0}),D=S.getBBox();if((0,s.ku)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ys)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let W=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(W-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-W/2,B=e.y-v/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg(b),l=(0,r._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:3,seed:g}),i=t.path(k(C,B,W,v,0),l);(a=b.insert(()=>(h.cM.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",x.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",B).attr("width",W).attr("height",v);let{subGraphTitleTopMargin:N}=(0,l.L)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+N})`),p){let t=M.select("span");t&&t.attr("style",p)}let A=a.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return w(e,t)},{cluster:b,labelBBox:D}},"rect"),S=(0,h.eW)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.id),l=a.insert("rect",":first-child"),r=0*e.padding,i=r/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return w(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),D=(0,h.eW)(async(t,e)=>{let a;let l=(0,s.nV)(),{themeVariables:r,handDrawnSeed:i}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=r,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),p=y.insert("g").attr("class","cluster-label"),u=y.append("rect"),m=p.node().appendChild(await $(e.label,e.labelStyle,void 0,!0)),x=m.getBBox();if((0,s.ku)(l.flowchart.htmlLabels)){let t=m.children[0],e=(0,o.Ys)(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}let b=0*e.padding,M=(e.width<=x.width+e.padding?x.width+e.padding:e.width)+b;e.width<=x.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+b,D=e.height+b-x.height-6,W=e.x-M/2,v=e.y-S/2;e.width=M;let C=e.y-e.height/2-b/2+x.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.Z.svg(y),r=e.rx||e.ry?l.path(k(W,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:i}):l.rectangle(W,v,M,S,{seed:i});a=y.insert(()=>r,":first-child");let s=l.rectangle(W,C,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:i});a=y.insert(()=>r,":first-child"),u=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",W).attr("y",v).attr("width",M).attr("height",S).attr("data-look",e.look),u.attr("class","inner").attr("x",W).attr("y",C).attr("width",M).attr("height",D);p.attr("transform",`translate(${e.x-x.width/2}, ${v+1-((0,s.ku)(l.flowchart.htmlLabels)?0:3)})`);let B=a.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=x.height-e.padding/2,e.labelBBox=x,e.intersect=function(t){return w(e,t)},{cluster:y,labelBBox:x}},"roundedWithTitle"),W=(0,h.eW)(async(t,e)=>{let a;h.cM.info("Creating subgraph rect for ",e.id,e);let n=(0,s.nV)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:x}=(0,r.UG)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s.ku)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0,width:e.width}),D=S.getBBox();if((0,s.ku)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ys)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let W=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(W-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-W/2,B=e.y-v/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg(b),l=(0,r._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),i=t.path(k(C,B,W,v,e.rx),l);(a=b.insert(()=>(h.cM.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",x.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",B).attr("width",W).attr("height",v);let{subGraphTitleTopMargin:N}=(0,l.L)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+N})`),p){let t=M.select("span");t&&t.attr("style",p)}let A=a.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return w(e,t)},{cluster:b,labelBBox:D}},"kanbanSection"),v={rect:M,squareRect:M,roundedWithTitle:D,noteGroup:S,divider:(0,h.eW)((t,e)=>{let a;let{themeVariables:l,handDrawnSeed:r}=(0,s.nV)(),{nodeBorder:i}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),h=n.insert("g",":first-child"),o=0*e.padding,c=e.width+o;e.diff=-e.padding;let g=e.height+o,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=d.Z.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:r});a=n.insert(()=>t,":first-child")}else(a=h.insert("rect",":first-child")).attr("class","divider").attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look);let p=a.node().getBBox();return e.height=p.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return w(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:W},C=new Map,B=(0,h.eW)(async(t,e)=>{let a=e.shape||"rect",l=await v[a](t,e);return C.set(e.id,l),l},"insertCluster"),N=(0,h.eW)(()=>{C=new Map},"clear");function A(t,e,a,l){var r=t.x,i=t.y,n=r-l.x,s=i-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<r&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<i&&(d=-d),{x:r+o,y:i+d}}function q(t,e,a){return A(t,e,e,a)}function R(t,e,a,l){{let r=e.y-t.y,i=t.x-e.x,n=e.x*t.y-t.x*e.y,s=r*a.x+i*a.y+n,h=r*l.x+i*l.y+n;if(0!==s&&0!==h&&_(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&_(g,y))return;let f=r*d-o*i;if(0===f)return;let p=Math.abs(f/2),u=i*c-d*n;return{x:u<0?(u-p)/f:(u+p)/f,y:(u=o*n-r*c)<0?(u-p)/f:(u+p)/f}}}function _(t,e){return t*e>0}function L(t,e,a){let l=t.x,r=t.y,i=[],n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=r-t.height/2-s;for(let l=0;l<e.length;l++){let r=e[l],n=e[l<e.length-1?l+1:0],s=R(t,a,{x:h+r.x,y:o+r.y},{x:h+n.x,y:o+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let l=t.x-a.x,r=t.y-a.y,i=Math.sqrt(l*l+r*r),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return i<h?-1:i===h?0:1}),i[0]):t}(0,h.eW)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.eW)(A,"intersectEllipse"),(0,h.eW)(q,"intersectCircle"),(0,h.eW)(R,"intersectLine"),(0,h.eW)(_,"sameSign"),(0,h.eW)(L,"intersectPolygon");var P={circle:q,polygon:L,rect:w};function Z(t,e){let{labelStyles:a}=(0,r.UG)(e);e.labelStyle=a;let l=f(e),i=l;l||(i="anchor");let s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.Z.svg(s),g=(0,r._q)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=c.circle(0,0,2,g),u=s.insert(()=>p,":first-child");return u.attr("class","anchor").attr("style",(0,n.R7)(o)),y(e,u),e.intersect=function(t){return h.cM.info("Circle intersect",e,1,t),P.circle(e,1,t)},s}function U(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function G(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.width+e.padding+20,h=n.height+e.padding,o=h/2,g=o/(2.5+h/50),{cssStyles:u}=e,m=[{x:s/2,y:-h/2},{x:-s/2,y:-h/2},...U(-s/2,-h/2,-s/2,h/2,g,o,!1),{x:s/2,y:h/2},...U(s/2,h/2,s/2,-h/2,g,o,!0)],w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=p(m),$=w.path(b,x),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(${g/2}, 0)`),y(e,k),e.intersect=function(t){return P.polygon(e,m,t)},i}function I(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function T(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.height+e.padding,o=s.width+e.padding+12,g=-h,u=[{x:12,y:g},{x:o,y:g},{x:o,y:0},{x:0,y:0},{x:0,y:g+12},{x:12,y:g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(u),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${h/2})`),m&&a.attr("style",m)}else a=I(n,o,h,u);return i&&a.attr("style",i),y(e,a),e.intersect=function(t){return P.polygon(e,u,t)},n}function E(t,e){let{nodeStyles:a}=(0,r.UG)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=d.Z.svg(l),o=(0,r._q)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=p(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return P.polygon(e,s,t)},l}async function H(t,e,a){let l;let{labelStyles:i,nodeStyles:s}=(0,r.UG)(e);e.labelStyle=i;let{shapeSvg:o,bbox:g,halfPadding:p}=await c(t,e,f(e)),u=a?.padding??p,m=g.width/2+u,{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,r._q)(e,{}),i=t.circle(0,0,2*m,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(w))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return P.circle(t,a,e)},e.intersect=function(t){return h.cM.info("Circle intersect",e,m,t),P.circle(e,m,t)},o}function V(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,r={x:l/2*e,y:l/2*a},i={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y}
2
+ M ${r.x},${r.y} L ${n.x},${n.y}`}function Y(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a,e.label="";let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=d.Z.svg(i),c=(0,r._q)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=o.circle(0,0,2*n,c),p=V(n),u=o.path(p,c),m=i.insert(()=>g,":first-child");return m.insert(()=>u),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",l),y(e,m),e.intersect=function(t){return h.cM.info("crossedCircle intersect",e,{radius:n,point:t}),P.circle(e,n,t)},i}function j(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function O(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...j(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...j(h/2+2*g,-g,g,20,-180,-270),...j(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...j(h/2,o/2,g,20,0,90)],w=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...j(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...j(h/2+.1*h,-g,g,20,-180,-270),...j(h/2+.1*h,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...j(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2,y:o/2+g}],x=d.Z.svg(i),b=(0,r._q)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=x.path($,b),M=p(w),S=x.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${g}, 0)`),s.attr("transform",`translate(${-h/2+g-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,w,t)},i}function z(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:i,y:o})}return n}async function F(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...z(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...z(h/2+2*g,-g,g,20,-180,-270),...z(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...z(h/2,o/2,g,20,0,90)],w=[{x:-h/2,y:-o/2-g},{x:h/2,y:-o/2-g},...z(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...z(h/2+2*g,-g,g,20,-180,-270),...z(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...z(h/2,o/2,g,20,0,90),{x:h/2,y:o/2+g},{x:-h/2,y:o/2+g}],x=d.Z.svg(i),b=(0,r._q)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=x.path($,b),M=p(w),S=x.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${-g}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,w,t)},i}function X(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function J(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...X(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...X(h/2+2*g,-g,g,20,-180,-270),...X(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...X(h/2,o/2,g,20,0,90)],w=[...X(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...X(-h/2-g/2,-g,g,20,0,90),...X(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...X(-h/2+g+g/2,o/2,g,30,-180,-270)],x=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...X(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...X(h/2+2*g,-g,g,20,-180,-270),...X(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...X(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2-g-g/2,y:o/2+g},...X(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...X(-h/2-g/2,-g,g,20,0,90),...X(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...X(-h/2+g+g/2,o/2,g,30,-180,-270)],b=d.Z.svg(i),$=(0,r._q)(e,{fill:"none"});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(m).replace("Z",""),M=b.path(k,$),S=p(w).replace("Z",""),D=b.path(S,$),W=p(x),v=b.path(W,{...$}),C=i.insert("g",":first-child");return C.insert(()=>v,":first-child").attr("stroke-opacity",0),C.insert(()=>M,":first-child"),C.insert(()=>D,":first-child"),C.attr("class","text"),u&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(${g-g/4}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,C),e.intersect=function(t){return P.polygon(e,x,t)},i}async function K(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,(n.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),o=h/2,{cssStyles:g}=e,u=d.Z.svg(i),w=(0,r._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let x=s-o,b=h/4,$=[{x:x,y:0},{x:b,y:0},{x:0,y:h/2},{x:b,y:h},{x:x,y:h},...m(-x,-h/2,o,50,270,90)],k=p($),M=u.path(k,w),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),S.attr("transform",`translate(${-s/2}, ${-h/2})`),y(e,S),e.intersect=function(t){return P.polygon(e,$,t)},i}(0,h.eW)(Z,"anchor"),(0,h.eW)(U,"generateArcPoints"),(0,h.eW)(G,"bowTieRect"),(0,h.eW)(I,"insertPolygonShape"),(0,h.eW)(T,"card"),(0,h.eW)(E,"choice"),(0,h.eW)(H,"circle"),(0,h.eW)(V,"createLine"),(0,h.eW)(Y,"crossedCircle"),(0,h.eW)(j,"generateCirclePoints"),(0,h.eW)(O,"curlyBraceLeft"),(0,h.eW)(z,"generateCirclePoints"),(0,h.eW)(F,"curlyBraceRight"),(0,h.eW)(X,"generateCirclePoints"),(0,h.eW)(J,"curlyBraces"),(0,h.eW)(K,"curvedTrapezoid");var Q=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),tt=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),te=(0,h.eW)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function ta(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+e.padding,e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+e.padding,e.height??0),{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=tt(0,0,g,m,p,u),i=te(0,u,g,m,p,u),n=t.path(l,(0,r._q)(e,{})),h=t.path(i,(0,r._q)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),w&&a.attr("style",w)}else{let t=Q(0,0,g,m,p,u);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.R7)(w)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(e.padding??0)/1.5-(h.y-(h.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tl(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+e.padding,o=n.height+e.padding,g=.2*o,p=-h/2,u=-o/2-g/2,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=w.polygon([{x:p,y:u+g},{x:-p,y:u+g},{x:-p,y:-u},{x:p,y:-u},{x:p,y:u},{x:-p,y:u},{x:-p,y:u+g}].map(t=>[t.x,t.y]),x),$=i.insert(()=>b,":first-child");return $.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",l),s.attr("transform",`translate(${p+(e.padding??0)/2-(n.x-(n.left??0))}, ${u+g+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,$),e.intersect=function(t){return P.rect(e,t)},i}async function tr(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g}=await c(t,e,f(e)),p=o.width/2+g+5,u=o.width/2+g,{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=(0,r._q)(e,{roughness:.2,strokeWidth:2.5}),i=(0,r._q)(e,{roughness:.2,strokeWidth:1.5}),h=t.circle(0,0,2*p,l),o=t.circle(0,0,2*u,i);(a=s.insert("g",":first-child")).attr("class",(0,n.R7)(e.cssClasses)).attr("style",(0,n.R7)(m)),a.node()?.appendChild(h),a.node()?.appendChild(o)}else{let t=(a=s.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0)}return y(e,a),e.intersect=function(t){return h.cM.info("DoubleCircle intersect",e,p,t),P.circle(e,p,t)},s}function ti(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.label="",e.labelStyle=l;let n=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=d.Z.svg(n),{nodeBorder:c}=a,g=(0,r._q)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=o.circle(0,0,14,g),u=n.insert(()=>p,":first-child");return u.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),y(e,u),e.intersect=function(t){return h.cM.info("filledCircle intersect",e,{radius:7,point:t}),P.circle(e,7,t)},n}async function tn(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),o=n.width+(e.padding??0),g=o+n.height,u=o+n.height,m=[{x:0,y:-g},{x:u,y:-g},{x:u/2,y:0}],{cssStyles:w}=e,x=d.Z.svg(i),b=(0,r._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m),k=x.path($,b),M=i.insert(()=>k,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`);return w&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",w),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),e.width=o,e.height=g,y(e,M),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-g/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return h.cM.info("Triangle intersect",e,m,t),P.polygon(e,m,t)},i}function ts(t,e,{dir:a,config:{state:l,themeVariables:i}}){let{nodeStyles:n}=(0,r.UG)(e);e.label="";let s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,o=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===a&&(o=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));let g=-1*o/2,p=-1*c/2,u=d.Z.svg(s),m=(0,r._q)(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let w=u.rectangle(g,p,o,c,m),x=s.insert(()=>w,":first-child");h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),y(e,x);let b=l?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return P.rect(e,t)},s}async function th(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,n.width+(e.padding??0)*2,e?.width??0),o=Math.max(50,n.height+(e.padding??0)*2,e?.height??0),g=o/2,{cssStyles:u}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-s/2,y:-o/2},{x:s/2-g,y:-o/2},...m(-s/2+g,0,g,50,90,270),{x:s/2-g,y:o/2},{x:-s/2,y:o/2}],$=p(b),k=w.path($,x),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),y(e,M),e.intersect=function(t){return h.cM.info("Pill intersect",e,{radius:g,point:t}),P.polygon(e,b,t)},i}async function to(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+(e.padding??0),h=n.width+(e.padding??0)*2.5,{cssStyles:o}=e,g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=h/2,w=m/6,x=s/2,b=(m+=w)-x/2,$=[{x:-b,y:-x},{x:0,y:-x},{x:b,y:-x},{x:m,y:0},{x:b,y:x},{x:0,y:x},{x:-b,y:x},{x:-m,y:0}],k=p($),M=g.path(k,u),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),e.width=h,e.height=s,y(e,S),e.intersect=function(t){return P.polygon(e,$,t)},i}async function td(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.label="",e.labelStyle=a;let{shapeSvg:i}=await c(t,e,f(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],w=p(m),x=g.path(w,u),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),b.attr("transform",`translate(${-n/2}, ${-s/2})`),y(e,b),e.intersect=function(t){return h.cM.info("Pill intersect",e,{points:m}),P.polygon(e,m,t)},i}async function tc(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,label:p}=await c(t,e,"icon-shape default"),u="t"===e.pos,{nodeBorder:m}=a,{stylesMap:w}=(0,r.dT)(e),x=-s/2,b=-s/2,$=e.label?8:0,k=d.Z.svg(g),M=(0,r._q)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(x,b,s,s,M),D=Math.max(s,f.width),W=s+f.height+$,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"transparent",stroke:"none"}),C=g.insert(()=>S,":first-child"),B=g.insert(()=>v);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${u?f.height/2+$/2-r/2-h:-f.height/2-$/2-r/2-h})`),t.attr("style",`color: ${w.get("stroke")??m};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${u?-W/2:W/2-f.height})`),C.attr("transform",`translate(0,${u?f.height/2+$/2:-f.height/2-$/2})`),y(e,B),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=u?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+$},{x:a+s/2,y:l-r/2+f.height+$},{x:a+s/2,y:l+r/2},{x:a-s/2,y:l+r/2},{x:a-s/2,y:l-r/2+f.height+$},{x:a-f.width/2,y:l-r/2+f.height+$}]:[{x:a-s/2,y:l-r/2},{x:a+s/2,y:l-r/2},{x:a+s/2,y:l-r/2+s},{x:a+f.width/2,y:l-r/2+s},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+s},{x:a-s/2,y:l-r/2+s}],P.polygon(e,i,t)},g}async function tg(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,label:p}=await c(t,e,"icon-shape default"),u=e.label?8:0,m="t"===e.pos,{nodeBorder:w,mainBkg:x}=a,{stylesMap:b}=(0,r.dT)(e),$=d.Z.svg(g),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=b.get("fill");k.stroke=M??x;let S=g.append("g");e.icon&&S.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let D=S.node().getBBox(),W=D.width,v=D.height,C=D.x,B=D.y,N=Math.max(W,v)*Math.SQRT2+40,A=$.circle(0,0,N,k),q=Math.max(N,f.width),R=N+f.height+u,_=$.rectangle(-q/2,-R/2,q,R,{...k,fill:"transparent",stroke:"none"}),L=g.insert(()=>A,":first-child"),Z=g.insert(()=>_);return S.attr("transform",`translate(${-W/2-C},${m?f.height/2+u/2-v/2-B:-f.height/2-u/2-v/2-B})`),S.attr("style",`color: ${b.get("stroke")??w};`),p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-R/2:R/2-f.height})`),L.attr("transform",`translate(0,${m?f.height/2+u/2:-f.height/2-u/2})`),y(e,Z),e.intersect=function(t){return h.cM.info("iconSquare intersect",e,t),P.rect(e,t)},g}async function ty(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,halfPadding:p,label:u}=await c(t,e,"icon-shape default"),m="t"===e.pos,w=s+2*p,x=s+2*p,{nodeBorder:b,mainBkg:$}=a,{stylesMap:M}=(0,r.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,r._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??$;let C=D.path(k(-x/2,-w/2,x,w,5),W),B=Math.max(x,f.width),N=w+f.height+S,A=D.rectangle(-B/2,-N/2,B,N,{...W,fill:"transparent",stroke:"none"}),q=g.insert(()=>C,":first-child").attr("class","icon-shape2"),R=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${m?f.height/2+S/2-r/2-h:-f.height/2-S/2-r/2-h})`),t.attr("style",`color: ${M.get("stroke")??b};`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-N/2:N/2-f.height})`),q.attr("transform",`translate(0,${m?f.height/2+S/2:-f.height/2-S/2})`),y(e,R),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=m?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+S},{x:a+x/2,y:l-r/2+f.height+S},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+f.height+S},{x:a-f.width/2,y:l-r/2+f.height+S}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+w},{x:a+f.width/2,y:l-r/2+w},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+w},{x:a-x/2,y:l-r/2+w}],P.polygon(e,i,t)},g}async function tf(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,halfPadding:p,label:u}=await c(t,e,"icon-shape default"),m="t"===e.pos,w=s+2*p,x=s+2*p,{nodeBorder:b,mainBkg:$}=a,{stylesMap:M}=(0,r.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,r._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??$;let C=D.path(k(-x/2,-w/2,x,w,.1),W),B=Math.max(x,f.width),N=w+f.height+S,A=D.rectangle(-B/2,-N/2,B,N,{...W,fill:"transparent",stroke:"none"}),q=g.insert(()=>C,":first-child"),R=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${m?f.height/2+S/2-r/2-h:-f.height/2-S/2-r/2-h})`),t.attr("style",`color: ${M.get("stroke")??b};`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-N/2:N/2-f.height})`),q.attr("transform",`translate(0,${m?f.height/2+S/2:-f.height/2-S/2})`),y(e,R),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=m?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+S},{x:a+x/2,y:l-r/2+f.height+S},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+f.height+S},{x:a-f.width/2,y:l-r/2+f.height+S}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+w},{x:a+f.width/2,y:l-r/2+w},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+w},{x:a-x/2,y:l-r/2+w}],P.polygon(e,i,t)},g}async function tp(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let i=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/n;let{labelStyles:s}=(0,r.UG)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let g=Math.max(e.label?o??0:0,e?.assetWidth??i),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:g,p="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(f,o??0);let{shapeSvg:u,bbox:m,label:w}=await c(t,e,"image-shape default"),x="t"===e.pos,b=-f/2,$=e.label?8:0,k=d.Z.svg(u),M=(0,r._q)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(b,-p/2,f,p,M),D=Math.max(f,m.width),W=p+m.height+$,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"none",stroke:"none"}),C=u.insert(()=>S,":first-child"),B=u.insert(()=>v);if(e.img){let t=u.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",p),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${x?W/2-p:-W/2})`)}return w.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-p/2-m.height/2-$/2:p/2-m.height/2+$/2})`),C.attr("transform",`translate(0,${x?m.height/2+$/2:-m.height/2-$/2})`),y(e,B),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=x?[{x:a-m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2+m.height+$},{x:a+f/2,y:l-r/2+m.height+$},{x:a+f/2,y:l+r/2},{x:a-f/2,y:l+r/2},{x:a-f/2,y:l-r/2+m.height+$},{x:a-m.width/2,y:l-r/2+m.height+$}]:[{x:a-f/2,y:l-r/2},{x:a+f/2,y:l-r/2},{x:a+f/2,y:l-r/2+p},{x:a+m.width/2,y:l-r/2+p},{x:a+m.width/2/2,y:l+r/2},{x:a-m.width/2,y:l+r/2},{x:a-m.width/2,y:l-r/2+p},{x:a-f/2,y:l-r/2+p}],P.polygon(e,i,t)},u}async function tu(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0)*2,e?.width??0),o=Math.max(s.height+(e.padding??0)*2,e?.height??0),g=[{x:0,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:-3*o/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}async function tm(t,e,a){let l;let{labelStyles:i,nodeStyles:s}=(0,r.UG)(e);e.labelStyle=i;let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+2*a.labelPaddingX,e?.width||0),p=Math.max(o.height+2*a.labelPaddingY,e?.height||0),u=-g/2,m=-p/2,{rx:w,ry:x}=e,{cssStyles:b}=e;if(a?.rx&&a.ry&&(w=a.rx,x=a.ry),"handDrawn"===e.look){let t=d.Z.svg(h),a=(0,r._q)(e,{}),i=w||x?t.path(k(u,m,g,p,w||0),a):t.rectangle(u,m,g,p,a);(l=h.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(b))}else(l=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.R7)(w)).attr("ry",(0,n.R7)(x)).attr("x",u).attr("y",m).attr("width",g).attr("height",p);return y(e,l),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return P.rect(e,t)},h}async function tw(t,e){let{shapeSvg:a,bbox:l,label:r}=await c(t,e,"label"),i=a.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),r.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),y(e,i),e.intersect=function(t){return P.rect(e,t)},a}async function tx(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:0,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:-(3*o)/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}async function tb(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:-3*o/6,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:0,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}function t$(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.label="",e.labelStyle=a;let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),c=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=p(c),w=g.path(m,u),x=i.insert(()=>w,":first-child");return n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),x.attr("transform",`translate(-${s/2},${-o})`),y(e,x),e.intersect=function(t){return h.cM.info("lightningBolt intersect",e,t),P.polygon(e,c,t)},i}(0,h.eW)(ta,"cylinder"),(0,h.eW)(tl,"dividedRectangle"),(0,h.eW)(tr,"doublecircle"),(0,h.eW)(ti,"filledCircle"),(0,h.eW)(tn,"flippedTriangle"),(0,h.eW)(ts,"forkJoin"),(0,h.eW)(th,"halfRoundedRectangle"),(0,h.eW)(to,"hexagon"),(0,h.eW)(td,"hourglass"),(0,h.eW)(tc,"icon"),(0,h.eW)(tg,"iconCircle"),(0,h.eW)(ty,"iconRounded"),(0,h.eW)(tf,"iconSquare"),(0,h.eW)(tp,"imageSquare"),(0,h.eW)(tu,"inv_trapezoid"),(0,h.eW)(tm,"drawRect"),(0,h.eW)(tw,"labelRect"),(0,h.eW)(tx,"lean_left"),(0,h.eW)(tb,"lean_right"),(0,h.eW)(t$,"lightningBolt");var tk=(0,h.eW)((t,e,a,l,r,i,n)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createCylinderPathD"),tM=(0,h.eW)((t,e,a,l,r,i,n)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tS=(0,h.eW)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tD(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0),e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+(e.padding??0),e.height??0),w=.1*m,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=tM(0,0,g,m,p,u,w),i=tS(0,u,g,m,p,u),n=(0,r._q)(e,{}),h=t.path(l,n),o=t.path(i,n);s.insert(()=>o,":first-child").attr("class","line"),(a=s.insert(()=>h,":first-child")).attr("class","basic label-container"),x&&a.attr("style",x)}else{let t=tk(0,0,g,m,p,u,w);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.R7)(x)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+u-(h.y-(h.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tW(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,p=o+g,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-h/2-h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:p/2},...u(-h/2-h/2*.1,p/2,h/2+h/2*.1,p/2,g,.8),{x:h/2+h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:-p/2},{x:-h/2,y:-p/2},{x:-h/2,y:p/2*1.1},{x:-h/2,y:-p/2}],$=w.polygon(b.map(t=>[t.x,t.y]),x),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)+h/2*.1/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,k),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tv(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{}),b=[{x:g-5,y:u+5},{x:g-5,y:u+o+5},{x:g+h-5,y:u+o+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u+o-5},{x:g+h+5,y:u+o-5},{x:g+h+5,y:u-5},{x:g+5,y:u-5},{x:g+5,y:u},{x:g,y:u},{x:g,y:u+5}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=p(b),k=w.path($,x),M=p([{x:g,y:u+5},{x:g+h-5,y:u+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u},{x:g,y:u}]),S=w.path(M,{...x,fill:"none"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tC(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=o+g,w=-h/2,x=-m/2,{cssStyles:b}=e,$=u(w-5,x+m+5,w+h-5,x+m+5,g,.8),k=$?.[$.length-1],M=[{x:w-5,y:x+5},{x:w-5,y:x+m+5},...$,{x:w+h-5,y:k.y-5},{x:w+h,y:k.y-5},{x:w+h,y:k.y-10},{x:w+h+5,y:k.y-10},{x:w+h+5,y:x-5},{x:w+5,y:x-5},{x:w+5,y:x},{x:w,y:x},{x:w,y:x+5}],S=[{x:w,y:x+5},{x:w+h-5,y:x+5},{x:w+h-5,y:k.y-5},{x:w+h,y:k.y-5},{x:w+h,y:x},{x:w,y:x}],D=d.Z.svg(i),W=(0,r._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=p(M),C=D.path(v,W),B=p(S),N=D.path(B,W),A=i.insert(()=>C,":first-child");return A.insert(()=>N),A.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-g/2-(n.y-(n.top??0))})`),y(e,A),e.intersect=function(t){return P.polygon(e,M,t)},i}async function tB(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l,e.useHtmlLabels||s.iE().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:n,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0)*2,e?.width??0),p=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:u}=e,m=d.Z.svg(n),w=(0,r._q)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let x=m.rectangle(-g/2,-p/2,g,p,w),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,b),e.intersect=function(t){return P.rect(e,t)},n}(0,h.eW)(tD,"linedCylinder"),(0,h.eW)(tW,"linedWaveEdgedRect"),(0,h.eW)(tv,"multiRect"),(0,h.eW)(tC,"multiWaveEdgedRectangle"),(0,h.eW)(tB,"note");var tN=(0,h.eW)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function tA(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+e.padding+(s.height+e.padding),o=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],{cssStyles:g}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=tN(0,0,h),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),g&&a.attr("style",g)}else(a=I(n,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return i&&a.attr("style",i),y(e,a),e.calcIntersect=function(t,e){let a=t.width,l=P.polygon(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e);return{x:l.x-.5,y:l.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function tq(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0),e?.width??0),o=Math.max(n.height+(e.padding??0),e?.height??0),g=-h/2,u=-o/2,m=u/2,w=[{x:g+m,y:u},{x:g,y:0},{x:g+m,y:-u},{x:-g,y:-u},{x:-g,y:u}],{cssStyles:x}=e,b=d.Z.svg(i),$=(0,r._q)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(w),M=b.path(k,$),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),S.attr("transform",`translate(${-m/2},0)`),s.attr("transform",`translate(${-m/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),y(e,S),e.intersect=function(t){return P.polygon(e,w,t)},i}async function tR(t,e){let a,l,i;let{labelStyles:n,nodeStyles:c}=(0,r.UG)(e);e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";let g=t.insert("g").attr("class",a).attr("id",e.domId||e.id),f=g.insert("g"),p=g.insert("g").attr("class","label").attr("style",c),u=e.description,m=e.label,w=p.node().appendChild(await $(m,e.labelStyle,!0,!0)),x={width:0,height:0};if((0,s.ku)(s.nV()?.flowchart?.htmlLabels)){let t=w.children[0],e=(0,o.Ys)(w);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}h.cM.info("Text 2",u);let b=u||[],M=w.getBBox(),S=p.node().appendChild(await $(b.join?b.join("<br/>"):b,e.labelStyle,!0,!0)),D=S.children[0],W=(0,o.Ys)(S);x=D.getBoundingClientRect(),W.attr("width",x.width),W.attr("height",x.height);let v=(e.padding||0)/2;(0,o.Ys)(S).attr("transform","translate( "+(x.width>M.width?0:(M.width-x.width)/2)+", "+(M.height+v+5)+")"),(0,o.Ys)(w).attr("transform","translate( "+(x.width<M.width?0:-(M.width-x.width)/2)+", 0)"),x=p.node().getBBox(),p.attr("transform","translate("+-x.width/2+", "+(-x.height/2-v+3)+")");let C=x.width+(e.padding||0),B=x.height+(e.padding||0),N=-x.width/2-v,A=-x.height/2-v;if("handDrawn"===e.look){let t=d.Z.svg(g),a=(0,r._q)(e,{}),n=t.path(k(N,A,C,B,e.rx||0),a),s=t.line(-x.width/2-v,-x.height/2-v+M.height+v,x.width/2+v,-x.height/2-v+M.height+v,a);i=g.insert(()=>(h.cM.debug("Rough node insert CXC",n),s),":first-child"),l=g.insert(()=>(h.cM.debug("Rough node insert CXC",n),n),":first-child")}else l=f.insert("rect",":first-child"),i=f.insert("line"),l.attr("class","outer title-state").attr("style",c).attr("x",-x.width/2-v).attr("y",-x.height/2-v).attr("width",x.width+(e.padding||0)).attr("height",x.height+(e.padding||0)),i.attr("class","divider").attr("x1",-x.width/2-v).attr("x2",x.width/2+v).attr("y1",-x.height/2-v+M.height+v).attr("y2",-x.height/2-v+M.height+v);return y(e,l),e.intersect=function(t){return P.rect(e,t)},g}function t_(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function tL(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=e?.padding??0,h=e?.padding??0,o=(e?.width?e?.width:n.width)+2*s,g=(e?.height?e?.height:n.height)+2*h,u=e.radius||5,m=e.taper||5,{cssStyles:w}=e,x=d.Z.svg(i),b=(0,r._q)(e,{});e.stroke&&(b.stroke=e.stroke),"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=[{x:-o/2+m,y:-g/2},{x:o/2-m,y:-g/2},...t_(o/2-m,-g/2,o/2,-g/2+m,u,u,!0),{x:o/2,y:-g/2+m},{x:o/2,y:g/2-m},...t_(o/2,g/2-m,o/2-m,g/2,u,u,!0),{x:o/2-m,y:g/2},{x:-o/2+m,y:g/2},...t_(-o/2+m,g/2,-o/2,g/2-m,u,u,!0),{x:-o/2,y:g/2-m},{x:-o/2,y:-g/2+m},...t_(-o/2,-g/2+m,-o/2+m,-g/2,u,u,!0)],k=p($),M=x.path(k,b),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",w),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),y(e,S),e.intersect=function(t){return P.polygon(e,$,t)},i}async function tP(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s,label:h}=await c(t,e,f(e)),o=e?.padding??0,g=Math.max(s.width+(e.padding??0)*2,e?.width??0),p=Math.max(s.height+(e.padding??0)*2,e?.height??0),u=-s.width/2-o,m=-s.height/2-o,{cssStyles:w}=e,x=d.Z.svg(i),b=(0,r._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=x.polygon([{x:u,y:m},{x:u+g+8,y:m},{x:u+g+8,y:m+p},{x:u-8,y:m+p},{x:u-8,y:m},{x:u,y:m},{x:u,y:m+p}].map(t=>[t.x,t.y]),b),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container").attr("style",(0,n.R7)(w)),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),w&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),h.attr("transform",`translate(${-g/2+4+(e.padding??0)-(s.x-(s.left??0))},${-p/2+(e.padding??0)-(s.y-(s.top??0))})`),y(e,k),e.intersect=function(t){return P.rect(e,t)},i}async function tZ(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=[{x:g,y:u},{x:g,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u-o/2}],$=p(b),k=w.path($,x),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",m),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),M.attr("transform",`translate(0, ${o/4})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))}, ${-o/4+(e.padding??0)-(n.y-(n.top??0))})`),y(e,M),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tU(t,e){let a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)};return tm(t,e,a)}async function tG(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+e.padding,h=n.width+s/4+e.padding,o=s/2,{cssStyles:g}=e,u=d.Z.svg(i),w=(0,r._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let x=[{x:-h/2+o,y:-s/2},{x:h/2-o,y:-s/2},...m(-h/2+o,0,o,50,90,270),{x:h/2-o,y:s/2},...m(h/2-o,0,o,50,270,450)],b=p(x),$=u.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",l),y(e,k),e.intersect=function(t){return P.polygon(e,x,t)},i}async function tI(t,e){return tm(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function tT(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:o}=a,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),g=d.Z.svg(c),f=(0,r._q)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=g.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),u=h??o,m=g.circle(0,0,5,{...f,fill:u,stroke:u,strokeWidth:2,fillStyle:"solid"}),w=c.insert(()=>p,":first-child");return w.insert(()=>m),n&&w.selectAll("path").attr("style",n),i&&w.selectAll("path").attr("style",i),y(e,w),e.intersect=function(t){return P.circle(e,7,t)},c}function tE(t,e,{config:{themeVariables:a}}){let l;let{lineColor:i}=a,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=d.Z.svg(n).circle(0,0,14,(0,r.TA)(i));(l=n.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(l=n.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return y(e,l),e.intersect=function(t){return P.circle(e,7,t)},n}async function tH(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s}=await c(t,e,f(e)),h=(e?.padding||0)/2,o=s.width+e.padding,g=s.height+e.padding,p=-s.width/2-h,u=-s.height/2-h,m=[{x:0,y:0},{x:o,y:0},{x:o,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if("handDrawn"===e.look){let t=d.Z.svg(i),a=(0,r._q)(e,{}),l=t.rectangle(p-8,u,o+16,g,a),s=t.line(p,u,p,u+g,a),h=t.line(p+o,u,p+o,u+g,a);i.insert(()=>s,":first-child"),i.insert(()=>h,":first-child");let c=i.insert(()=>l,":first-child"),{cssStyles:f}=e;c.attr("class","basic label-container").attr("style",(0,n.R7)(f)),y(e,c)}else{let t=I(i,o,g,m);l&&t.attr("style",l),y(e,t)}return e.intersect=function(t){return P.polygon(e,m,t)},i}async function tV(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),o=-s/2,g=-h/2,u=.2*h,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{}),b=[{x:o-u/2,y:g},{x:o+s+u/2,y:g},{x:o+s+u/2,y:g+h},{x:o-u/2,y:g+h}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=p(b),k=w.path($,x),M=p([{x:o+s-u/2,y:g+h},{x:o+s+u/2,y:g+h},{x:o+s+u/2,y:g+h-.2*h}]),S=w.path(M,{...x,fillStyle:"solid"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),y(e,D),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tY(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=.2*h,w=.2*o,x=o+g,{cssStyles:b}=e,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-h/2*.1,y:x/2},...u(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,g,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],S=-h/2+h/2*.1,D=-x/2-.4*w,W=[{x:S+h-m,y:(D+o)*1.4},{x:S+h,y:D+o-w},{x:S+h,y:(D+o)*.9},...u(S+h,(D+o)*1.3,S+h-m,(D+o)*1.5,-(.03*o),.5)],v=p(M),C=$.path(v,k),B=p(W),N=$.path(B,{...k,fillStyle:"solid"}),A=i.insert(()=>N,":first-child");return A.insert(()=>C,":first-child"),A.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,A),e.intersect=function(t){return P.polygon(e,M,t)},i}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+e.padding,e?.width||0),h=Math.max(n.height+e.padding,e?.height||0),o=i.insert("rect",":first-child");return o.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),y(e,o),e.intersect=function(t){return P.rect(e,t)},i}(0,h.eW)(tA,"question"),(0,h.eW)(tq,"rect_left_inv_arrow"),(0,h.eW)(tR,"rectWithTitle"),(0,h.eW)(t_,"generateArcPoints"),(0,h.eW)(tL,"roundedRect"),(0,h.eW)(tP,"shadedProcess"),(0,h.eW)(tZ,"slopedRect"),(0,h.eW)(tU,"squareRect"),(0,h.eW)(tG,"stadium"),(0,h.eW)(tI,"state"),(0,h.eW)(tT,"stateEnd"),(0,h.eW)(tE,"stateStart"),(0,h.eW)(tH,"subroutine"),(0,h.eW)(tV,"taggedRect"),(0,h.eW)(tY,"taggedWaveEdgedRectangle"),(0,h.eW)(tj,"text");var tO=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e}
3
+ a${r},${i} 0,0,1 0,${-l}
4
+ l${a},0
5
+ a${r},${i} 0,0,1 0,${l}
6
+ M${a},${-l}
7
+ a${r},${i} 0,0,0 0,${l}
8
+ l${-a},0`,"createCylinderPathD"),tz=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e} M${t+a},${e} a${r},${i} 0,0,0 0,${-l} l${-a},0 a${r},${i} 0,0,0 0,${l} l${a},0`,"createOuterCylinderPathD"),tF=(0,h.eW)((t,e,a,l,r,i)=>`M${t+a/2},${-l/2} a${r},${i} 0,0,0 0,${l}`,"createInnerCylinderPathD");async function tX(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o,halfPadding:g}=await c(t,e,f(e)),p="neo"===e.look?2*g:g,u=h.height+p,m=u/2,w=m/(2.5+u/50),x=h.width+w+p,{cssStyles:b}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=tz(0,0,x,u,w,m),i=tF(0,0,x,u,w,m),n=t.path(l,(0,r._q)(e,{})),h=t.path(i,(0,r._q)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),b&&a.attr("style",b)}else{let t=tO(0,0,x,u,w,m);(a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.R7)(b)).attr("style",i)).attr("class","basic label-container"),b&&a.selectAll("path").attr("style",b),i&&a.selectAll("path").attr("style",i)}return a.attr("label-offset-x",w),a.attr("transform",`translate(${-x/2}, ${u/2} )`),o.attr("transform",`translate(${-(h.width/2)-w-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,a),e.intersect=function(t){let a=P.rect(e,t),l=a.y-(e.y??0);if(0!=m&&(Math.abs(l)<(e.height??0)/2||Math.abs(l)==(e.height??0)/2&&Math.abs(a.x-(e.x??0))>(e.width??0)/2-w)){let r=w*w*(1-l*l/(m*m));0!=r&&(r=Math.sqrt(Math.abs(r))),r=w-r,t.x-(e.x??0)>0&&(r=-r),a.x+=r}return a},s}async function tJ(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+e.padding,o=s.height+e.padding,g=[{x:-3*o/6,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:0,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}async function tK(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(60,n.width+(e.padding??0)*2,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),{cssStyles:o}=e,g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=[{x:-s/2*.8,y:-h/2},{x:s/2*.8,y:-h/2},{x:s/2,y:-h/2*.6},{x:s/2,y:h/2},{x:-s/2,y:h/2},{x:-s/2,y:-h/2*.6}],w=p(m),x=g.path(w,u),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),y(e,b),e.intersect=function(t){return P.polygon(e,m,t)},i}async function tQ(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:o}=await c(t,e,f(e)),g=(0,s.ku)(s.nV().flowchart?.htmlLabels),u=n.width+(e.padding??0),m=u+n.height,w=u+n.height,x=[{x:0,y:0},{x:w,y:0},{x:w/2,y:-m}],{cssStyles:b}=e,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=p(x),S=$.path(M,k),D=i.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`);return b&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",b),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),e.width=u,e.height=m,y(e,D),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${m/2-(n.height+(e.padding??0)/(g?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(t){return h.cM.info("Triangle intersect",e,x,t),P.polygon(e,x,t)},i}async function t0(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/8,m=o+g,{cssStyles:w}=e,x=70-h,b=x>0?x/2:0,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-b,y:m/2},...u(-h/2-b,m/2,h/2+b,m/2,g,.8),{x:h/2+b,y:-m/2},{x:-h/2-b,y:-m/2}],S=p(M),D=$.path(S,k),W=i.insert(()=>D,":first-child");return W.attr("class","basic label-container"),w&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",w),l&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",l),W.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g-(n.y-(n.top??0))})`),y(e,W),e.intersect=function(t){return P.polygon(e,M,t)},i}async function t2(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),o=s/h,g=s,m=h;g>m*o?m=g/o:g=m*o,g=Math.max(g,100);let w=Math.min(.2*(m=Math.max(m,50)),m/4),x=m+2*w,{cssStyles:b}=e,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-g/2,y:x/2},...u(-g/2,x/2,g/2,x/2,w,1),{x:g/2,y:-x/2},...u(g/2,-x/2,-g/2,-x/2,w,-1)],S=p(M),D=$.path(S,k),W=i.insert(()=>D,":first-child");return W.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",l),y(e,W),e.intersect=function(t){return P.polygon(e,M,t)},i}async function t1(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,p=-o/2,{cssStyles:u}=e,m=d.Z.svg(i),w=(0,r._q)(e,{}),x=[{x:g-5,y:p-5},{x:g-5,y:p+o},{x:g+h,y:p+o},{x:g+h,y:p-5}],b=`M${g-5},${p-5} L${g+h},${p-5} L${g+h},${p+o} L${g-5},${p+o} L${g-5},${p-5}
9
+ M${g-5},${p} L${g+h},${p}
10
+ M${g},${p-5} L${g},${p+o}`;"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let $=m.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("transform","translate(2.5, 2.5)"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)+2.5-(n.x-(n.left??0))}, ${-(n.height/2)+2.5-(n.y-(n.top??0))})`),y(e,k),e.intersect=function(t){return P.polygon(e,x,t)},i}async function t5(t,e){if(e.alias&&(e.label=e.alias),"handDrawn"===e.look){let{themeVariables:a}=(0,s.iE)(),{background:l}=a,r={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${l}`]};await t5(t,r)}let a=(0,s.iE)();e.useHtmlLabels=a.htmlLabels;let l=a.er?.diagramPadding??10,i=a.er?.entityPadding??6,{cssStyles:h}=e,{labelStyles:c,nodeStyles:g}=(0,r.UG)(e);if(0===e.attributes.length&&e.label){let r={rx:0,ry:0,labelPaddingX:l,labelPaddingY:1.5*l,classes:""};(0,n.Cq)(e.label,a)+2*r.labelPaddingX<a.er.minEntityWidth&&(e.width=a.er.minEntityWidth);let i=await tm(t,e,r);if(!(0,s.ku)(a.htmlLabels)){let t=i.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return i}a.htmlLabels||(l*=1.25,i*=1.25);let p=f(e);p||(p="node default");let u=t.insert("g").attr("class",p).attr("id",e.domId||e.id),m=await t8(u,e.label??"",a,0,0,["name"],c);m.height+=i;let w=0,x=[],b=[],$=0,k=0,M=0,S=0,D=!0,W=!0;for(let t of e.attributes){let e=await t8(u,t.type,a,0,w,["attribute-type"],c);$=Math.max($,e.width+l);let r=await t8(u,t.name,a,0,w,["attribute-name"],c);k=Math.max(k,r.width+l);let n=await t8(u,t.keys.join(),a,0,w,["attribute-keys"],c);M=Math.max(M,n.width+l);let s=await t8(u,t.comment,a,0,w,["attribute-comment"],c);S=Math.max(S,s.width+l);let h=Math.max(e.height,r.height,n.height,s.height)+i;b.push({yOffset:w,rowHeight:h}),w+=h}let v=4;M<=l&&(D=!1,M=0,v--),S<=l&&(W=!1,S=0,v--);let C=u.node().getBBox();if(m.width+2*l-($+k+M+S)>0){let t=m.width+2*l-($+k+M+S);$+=t/v,k+=t/v,M>0&&(M+=t/v),S>0&&(S+=t/v)}let B=$+k+M+S,N=d.Z.svg(u),A=(0,r._q)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let q=0;b.length>0&&(q=b.reduce((t,e)=>t+(e?.rowHeight??0),0));let R=Math.max(C.width+2*l,e?.width||0,B),_=Math.max((q??0)+m.height,e?.height||0),L=-R/2,Z=-_/2;u.selectAll("g:not(:first-child)").each((t,e,a)=>{let r=(0,o.Ys)(a[e]),n=r.attr("transform"),s=0,h=0;if(n){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(s=parseFloat(t[1]),h=parseFloat(t[2]),r.attr("class").includes("attribute-name")?s+=$:r.attr("class").includes("attribute-keys")?s+=$+k:r.attr("class").includes("attribute-comment")&&(s+=$+k+M))}r.attr("transform",`translate(${L+l/2+s}, ${h+Z+m.height+i/2})`)}),u.select(".name").attr("transform","translate("+-m.width/2+", "+(Z+i/2)+")");let U=N.rectangle(L,Z,R,_,A),G=u.insert(()=>U,":first-child").attr("style",h.join("")),{themeVariables:I}=(0,s.iE)(),{rowEven:T,rowOdd:E,nodeBorder:H}=I;for(let[t,e]of(x.push(0),b.entries())){let a=(t+1)%2==0&&0!==e.yOffset,l=N.rectangle(L,m.height+Z+e?.yOffset,R,e?.rowHeight,{...A,fill:a?T:E,stroke:H});u.insert(()=>l,"g.label").attr("style",h.join("")).attr("class",`row-rect-${a?"even":"odd"}`)}let V=N.line(L,m.height+Z,R+L,m.height+Z,A);for(let t of(u.insert(()=>V).attr("class","divider"),V=N.line($+L,m.height+Z,$+L,_+Z,A),u.insert(()=>V).attr("class","divider"),D&&(V=N.line($+k+L,m.height+Z,$+k+L,_+Z,A),u.insert(()=>V).attr("class","divider")),W&&(V=N.line($+k+M+L,m.height+Z,$+k+M+L,_+Z,A),u.insert(()=>V).attr("class","divider")),x))V=N.line(L,m.height+Z+t,R+L,m.height+Z+t,A),u.insert(()=>V).attr("class","divider");if(y(e,G),g&&"handDrawn"!==e.look){let t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");u.selectAll("path").attr("style",e??""),u.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return P.rect(e,t)},u}async function t8(t,e,a,l=0,r=0,h=[],d=""){let c=t.insert("g").attr("class",`label ${h.join(" ")}`).attr("transform",`translate(${l}, ${r})`).attr("style",d);e!==(0,s.UO)(e)&&(e=(e=(0,s.UO)(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));let g=c.node().appendChild(await (0,i.rw)(c,e,{width:(0,n.Cq)(e,a)+100,style:d,useHtmlLabels:a.htmlLabels},a));if(e.includes("&lt;")||e.includes("&gt;")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let y=g.getBBox();if((0,s.ku)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,o.Ys)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return y}async function t3(t,e,a,l,r=a.class.padding??12){let i=l?0:3,n=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id),s=null,h=null,o=null,d=null,c=0,g=0,y=0;if(s=n.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await t4(s,{text:`\xab${t}\xbb`},0),c=s.node().getBBox().height}h=n.insert("g").attr("class","label-group text"),await t4(h,e,0,["font-weight: bolder"]);let p=h.node().getBBox();g=p.height,o=n.insert("g").attr("class","members-group text");let u=0;for(let t of e.members){let e=await t4(o,t,u,[t.parseClassifier()]);u+=e+i}(y=o.node().getBBox().height)<=0&&(y=r/2),d=n.insert("g").attr("class","methods-group text");let m=0;for(let t of e.methods){let e=await t4(d,t,m,[t.parseClassifier()]);m+=e+i}let w=n.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return h.attr("transform",`translate(${-p.width/2}, ${c})`),w=n.node().getBBox(),o.attr("transform",`translate(0, ${c+g+2*r})`),w=n.node().getBBox(),d.attr("transform",`translate(0, ${c+g+(y?y+4*r:2*r)})`),w=n.node().getBBox(),{shapeSvg:n,bbox:w}}async function t4(t,e,a,l=[]){let r;let d=t.insert("g").attr("class","label").attr("style",l.join("; ")),c=(0,s.iE)(),g="useHtmlLabels"in e?e.useHtmlLabels:(0,s.ku)(c.htmlLabels)??!0,y="";y="text"in e?e.text:e.label,!g&&y.startsWith("\\")&&(y=y.substring(1)),(0,s.l0)(y)&&(g=!0);let f=await (0,i.rw)(d,(0,s.uX)((0,n.SH)(y)),{width:(0,n.Cq)(y,c)+50,classes:"markdown-node-label",useHtmlLabels:g},c),p=1;if(g){let t=f.children[0],e=(0,o.Ys)(f);p=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(p+=t.innerHTML.split("<mrow>").length-1);let a=t.getElementsByTagName("img");if(a){let t=""===y.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt(c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,h.eW)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}r=t.getBoundingClientRect(),e.attr("width",r.width),e.attr("height",r.height)}else{l.includes("font-weight: bolder")&&(0,o.Ys)(f).selectAll("tspan").attr("font-weight",""),p=f.children.length;let t=f.children[0];(""===f.textContent||f.textContent.includes("&gt"))&&(t.textContent=y[0]+y.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim()," "===y[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),r=f.getBBox()}return d.attr("transform","translate(0,"+(-r.height/(2*p)+a)+")"),r.height}async function t7(t,e){let a=(0,s.nV)(),l=a.class.padding??12,i=e.useHtmlLabels??(0,s.ku)(a.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:n,bbox:h}=await t3(t,e,a,i,l),{labelStyles:c,nodeStyles:g}=(0,r.UG)(e);e.labelStyle=c,e.cssStyles=e.styles||"";let f=e.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));let p=0===e.members.length&&0===e.methods.length&&!a.class?.hideEmptyMembersBox,u=d.Z.svg(n),m=(0,r._q)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let w=h.width,x=h.height;0===e.members.length&&0===e.methods.length?x+=l:e.members.length>0&&0===e.methods.length&&(x+=2*l);let b=-w/2,$=-x/2,k=u.rectangle(b-l,$-l-(p?l:0===e.members.length&&0===e.methods.length?-l/2:0),w+2*l,x+2*l+(p?2*l:0===e.members.length&&0===e.methods.length?-l:0),m),M=n.insert(()=>k,":first-child");M.attr("class","basic label-container");let S=M.node().getBBox();n.selectAll(".text").each((t,a,r)=>{let s=(0,o.Ys)(r[a]),h=s.attr("transform"),d=0;if(h){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(h);t&&(d=parseFloat(t[2]))}let c=d+$+l-(p?l:0===e.members.length&&0===e.methods.length?-l/2:0);i||(c-=4);let g=b;(s.attr("class").includes("label-group")||s.attr("class").includes("annotation-group"))&&(g=-s.node()?.getBBox().width/2||0,n.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(g=0)})),s.attr("transform",`translate(${g}, ${c})`)});let D=n.select(".annotation-group").node().getBBox().height-(p?l/2:0)||0,W=n.select(".label-group").node().getBBox().height-(p?l/2:0)||0,v=n.select(".members-group").node().getBBox().height-(p?l/2:0)||0;if(e.members.length>0||e.methods.length>0||p){let t=u.line(S.x,D+W+$+l,S.x+S.width,D+W+$+l,m);n.insert(()=>t).attr("class","divider").attr("style",f)}if(p||e.members.length>0||e.methods.length>0){let t=u.line(S.x,D+W+v+$+2*l+l,S.x+S.width,D+W+v+$+l+2*l,m);n.insert(()=>t).attr("class","divider").attr("style",f)}if("handDrawn"!==e.look&&n.selectAll("path").attr("style",f),M.select(":nth-child(2)").attr("style",f),n.selectAll(".divider").select("path").attr("style",f),e.labelStyle?n.selectAll("span").attr("style",e.labelStyle):n.selectAll("span").attr("style",f),!i){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(f);if(e){let t=e[0].replace("color","fill");n.selectAll("tspan").attr("style",t)}else if(c){let e=t.exec(c);if(e){let t=e[0].replace("color","fill");n.selectAll("tspan").attr("style",t)}}}return y(e,M),e.intersect=function(t){return P.rect(e,t)},n}async function t9(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let n="verifyMethod"in e,s=f(e),h=t.insert("g").attr("class",s).attr("id",e.domId??e.id),c=a=n?await t6(h,`&lt;&lt;${e.type}&gt;&gt;`,0,e.labelStyle):await t6(h,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle),g=await t6(h,e.name,c,e.labelStyle+"; font-weight: bold;");if(c+=g+20,n){let t=await t6(h,`${e.requirementId?`ID: ${e.requirementId}`:""}`,c,e.labelStyle);c+=t;let a=await t6(h,`${e.text?`Text: ${e.text}`:""}`,c,e.labelStyle);c+=a;let l=await t6(h,`${e.risk?`Risk: ${e.risk}`:""}`,c,e.labelStyle);c+=l,await t6(h,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,c,e.labelStyle)}else{let t=await t6(h,`${e.type?`Type: ${e.type}`:""}`,c,e.labelStyle);c+=t,await t6(h,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,c,e.labelStyle)}let p=(h.node()?.getBBox().width??200)+20,u=(h.node()?.getBBox().height??200)+20,m=-p/2,w=-u/2,x=d.Z.svg(h),b=(0,r._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=x.rectangle(m,w,p,u,b),k=h.insert(()=>$,":first-child");if(k.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((t,e,a)=>{let l=(0,o.Ys)(a[e]),r=l.attr("transform"),i=0,n=0;if(r){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(r);t&&(i=parseFloat(t[1]),n=parseFloat(t[2]))}let s=n-u/2,h=m+10;(0===e||1===e)&&(h=i),l.attr("transform",`translate(${h}, ${s+20})`)}),c>a+g+20){let t=x.line(m,w+a+g+20,m+p,w+a+g+20,b);h.insert(()=>t).attr("style",i)}return y(e,k),e.intersect=function(t){return P.rect(e,t)},h}async function t6(t,e,a,l=""){let r;if(""===e)return 0;let h=t.insert("g").attr("class","label").attr("style",l),d=(0,s.nV)(),c=d.htmlLabels??!0,g=await (0,i.rw)(h,(0,s.uX)((0,n.SH)(e)),{width:(0,n.Cq)(e,d)+50,classes:"markdown-node-label",useHtmlLabels:c,style:l},d);if(c){let t=g.children[0],e=(0,o.Ys)(g);r=t.getBoundingClientRect(),e.attr("width",r.width),e.attr("height",r.height)}else{for(let t of g.children[0].children)t.textContent=t.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),l&&t.setAttribute("style",l);r=g.getBBox(),r.height+=6}return h.attr("transform",`translate(${-r.width/2},${-r.height/2+a})`),r.height}(0,h.eW)(tX,"tiltedCylinder"),(0,h.eW)(tJ,"trapezoid"),(0,h.eW)(tK,"trapezoidalPentagon"),(0,h.eW)(tQ,"triangle"),(0,h.eW)(t0,"waveEdgedRectangle"),(0,h.eW)(t2,"waveRectangle"),(0,h.eW)(t1,"windowPane"),(0,h.eW)(t5,"erBox"),(0,h.eW)(t8,"addText"),(0,h.eW)(t3,"textHelper"),(0,h.eW)(t4,"addText"),(0,h.eW)(t7,"classBox"),(0,h.eW)(t9,"requirementBox"),(0,h.eW)(t6,"addText");var et=(0,h.eW)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ee(t,e,{config:a}){let l,i,n,s;let{labelStyles:h,nodeStyles:o}=(0,r.UG)(e);e.labelStyle=h||"";let p=e.width;e.width=(e.width??200)-10;let{shapeSvg:u,bbox:m,label:w}=await c(t,e,f(e)),x=e.padding||10,b="";"ticket"in e&&e.ticket&&a?.kanban?.ticketBaseUrl&&(b=a?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),l=u.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",b).attr("target","_blank"));let $={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};l?{label:i,bbox:n}=await g(l,"ticket"in e&&e.ticket||"",$):{label:i,bbox:n}=await g(u,"ticket"in e&&e.ticket||"",$);let{label:M,bbox:S}=await g(u,"assigned"in e&&e.assigned||"",$);e.width=p;let D=e?.width||0,W=Math.max(n.height,S.height)/2,v=Math.max(m.height+20,e?.height||0)+W,C=-D/2,B=-v/2;w.attr("transform","translate("+(x-D/2)+", "+(-W-m.height/2)+")"),i.attr("transform","translate("+(x-D/2)+", "+(-W+m.height/2)+")"),M.attr("transform","translate("+(x+D/2-S.width-20)+", "+(-W+m.height/2)+")");let{rx:N,ry:A}=e,{cssStyles:q}=e;if("handDrawn"===e.look){let t=d.Z.svg(u),a=(0,r._q)(e,{}),l=N||A?t.path(k(C,B,D,v,N||0),a):t.rectangle(C,B,D,v,a);(s=u.insert(()=>l,":first-child")).attr("class","basic label-container").attr("style",q||null)}else{(s=u.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",o).attr("rx",N??5).attr("ry",A??5).attr("x",C).attr("y",B).attr("width",D).attr("height",v);let t="priority"in e&&e.priority;if(t){let e=u.append("line"),a=C+2,l=B+Math.floor((N??0)/2),r=B+v-Math.floor((N??0)/2);e.attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",r).attr("stroke-width","4").attr("stroke",et(t))}}return y(e,s),e.height=v,e.intersect=function(t){return P.rect(e,t)},u}async function ea(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:p}=await c(t,e,f(e)),u=o.width+10*g,m=o.height+8*g,w=.15*u,{cssStyles:x}=e,b=o.width+20,$=o.height+20,k=Math.max(u,b),M=Math.max(m,$);p.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let S=`M0 0
11
+ a${w},${w} 1 0,0 ${.25*k},${-1*M*.1}
12
+ a${w},${w} 1 0,0 ${.25*k},0
13
+ a${w},${w} 1 0,0 ${.25*k},0
14
+ a${w},${w} 1 0,0 ${.25*k},${.1*M}
15
+
16
+ a${w},${w} 1 0,0 ${.15*k},${.33*M}
17
+ a${.8*w},${.8*w} 1 0,0 0,${.34*M}
18
+ a${w},${w} 1 0,0 ${-1*k*.15},${.33*M}
19
+
20
+ a${w},${w} 1 0,0 ${-1*k*.25},${.15*M}
21
+ a${w},${w} 1 0,0 ${-1*k*.25},0
22
+ a${w},${w} 1 0,0 ${-1*k*.25},0
23
+ a${w},${w} 1 0,0 ${-1*k*.25},${-1*M*.15}
24
+
25
+ a${w},${w} 1 0,0 ${-1*k*.1},${-1*M*.33}
26
+ a${.8*w},${.8*w} 1 0,0 0,${-1*M*.34}
27
+ a${w},${w} 1 0,0 ${.1*k},${-1*M*.33}
28
+ H0 V0 Z`;if("handDrawn"===e.look){let t=d.Z.svg(s),l=(0,r._q)(e,{}),i=t.path(S,l);(a=s.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(x))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",S);return a.attr("transform",`translate(${-k/2}, ${-M/2})`),y(e,a),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return h.cM.info("Bang intersect",e,t),P.rect(e,t)},s}async function el(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:p}=await c(t,e,f(e)),u=o.width+2*g,m=o.height+2*g,w=.15*u,x=.25*u,b=.35*u,$=.2*u,{cssStyles:k}=e,M=`M0 0
29
+ a${w},${w} 0 0,1 ${.25*u},${-1*u*.1}
30
+ a${b},${b} 1 0,1 ${.4*u},${-1*u*.1}
31
+ a${x},${x} 1 0,1 ${.35*u},${.2*u}
32
+
33
+ a${w},${w} 1 0,1 ${.15*u},${.35*m}
34
+ a${$},${$} 1 0,1 ${-1*u*.15},${.65*m}
35
+
36
+ a${x},${w} 1 0,1 ${-1*u*.25},${.15*u}
37
+ a${b},${b} 1 0,1 ${-1*u*.5},0
38
+ a${w},${w} 1 0,1 ${-1*u*.25},${-1*u*.15}
39
+
40
+ a${w},${w} 1 0,1 ${-1*u*.1},${-1*m*.35}
41
+ a${$},${$} 1 0,1 ${.1*u},${-1*m*.65}
42
+ H0 V0 Z`;if("handDrawn"===e.look){let t=d.Z.svg(s),l=(0,r._q)(e,{}),i=t.path(M,l);(a=s.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(k))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",M);return p.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.attr("transform",`translate(${-u/2}, ${-m/2})`),y(e,a),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return h.cM.info("Cloud intersect",e,t),P.rect(e,t)},s}async function er(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,halfPadding:s,label:h}=await c(t,e,f(e)),o=n.width+8*s,d=n.height+2*s,g=`
43
+ M${-o/2} ${d/2-5}
44
+ v${-d+10}
45
+ q0,-5 5,-5
46
+ h${o-10}
47
+ q5,0 5,5
48
+ v${d-10}
49
+ q0,5 -5,5
50
+ h${-o+10}
51
+ q-5,0 -5,-5
52
+ Z
53
+ `,p=i.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",l).attr("d",g);return i.append("line").attr("class","node-line-").attr("x1",-o/2).attr("y1",d/2).attr("x2",o/2).attr("y2",d/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),i.append(()=>h.node()),y(e,p),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return P.rect(e,t)},i}async function ei(t,e){let a={padding:e.padding??0};return H(t,e,a)}(0,h.eW)(ee,"kanbanItem"),(0,h.eW)(ea,"bang"),(0,h.eW)(el,"cloud"),(0,h.eW)(er,"defaultMindmapNode"),(0,h.eW)(ei,"mindmapCircle");var en=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tU},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tL},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tG},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:tH},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ta},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:H},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ea},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:el},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:tA},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:to},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tb},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tx},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tJ},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:tu},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tr},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tj},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:T},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tP},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:tE},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:tT},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ts},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:td},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:O},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:F},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:J},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:t$},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:t0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:th},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tX},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tD},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:K},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tl},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tQ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:t1},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ti},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:tK},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tn},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tZ},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tC},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tv},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:G},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Y},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tY},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tV},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:t2},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tq},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tW}],es=(0,h.eW)(()=>Object.fromEntries([...Object.entries({state:tI,choice:E,note:tB,rectWithTitle:tR,labelRect:tw,iconSquare:tf,iconCircle:tg,icon:tc,iconRounded:ty,imageSquare:tp,anchor:Z,kanbanItem:ee,mindmapCircle:ei,defaultMindmapNode:er,classBox:t7,erBox:t5,requirementBox:t9}),...en.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function eh(t){return t in es}(0,h.eW)(eh,"isValidShape");var eo=new Map;async function ed(t,e,a){let l,r;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let i=e.shape?es[e.shape]:void 0;if(!i)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===a.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),l=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n??null),r=await i(l,e,a)}else l=r=await i(t,e,a);return e.tooltip&&r.attr("title",e.tooltip),eo.set(e.id,l),e.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}(0,h.eW)(ed,"insertNode");var ec=(0,h.eW)((t,e)=>{eo.set(e.id,t)},"setNodeElem"),eg=(0,h.eW)(()=>{eo.clear()},"clear"),ey=(0,h.eW)(t=>{let e=eo.get(t.id);h.cM.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode")}}]);
@@ -0,0 +1,59 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1015],{34577:function(e,t,s){s.d(t,{q:function(){return r}});var i=s(31954),n=s(84370),r=(0,i.eW)((e,t)=>{let s;return"sandbox"===t&&(s=(0,n.Ys)("#i"+e)),("sandbox"===t?(0,n.Ys)(s.nodes()[0].contentDocument.body):(0,n.Ys)("body")).select(`[id="${e}"]`)},"getDiagramElement")},23919:function(e,t,s){s.d(t,{j:function(){return r}});var i=s(55166),n=s(31954),r=(0,n.eW)((e,t,s,r)=>{e.attr("class",s);let{width:c,height:o,x:h,y:u}=a(e,t);(0,i.v2)(e,o,c,r);let y=l(h,u,c,o,t);e.attr("viewBox",y),n.cM.debug(`viewBox configured: ${y} with padding: ${t}`)},"setupViewPortForSVG"),a=(0,n.eW)((e,t)=>{let s=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*t,height:s.height+2*t,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,n.eW)((e,t,s,i,n)=>`${e-n} ${t-n} ${s} ${i}`,"createViewBox")},71015:function(e,t,s){s.d(t,{diagram:function(){return E}});var i=s(34577),n=s(23919),r=s(63025);s(19328),s(54973),s(11866),s(10507),s(33281),s(66691);var a=s(94705),l=s(55166),c=s(31954),o=function(){var e=(0,c.eW)(function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s},"o"),t=[1,3],s=[1,4],i=[1,5],n=[1,6],r=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],a=[1,22],l=[2,7],o=[1,26],h=[1,27],u=[1,28],y=[1,29],m=[1,33],E=[1,34],d=[1,35],p=[1,36],R=[1,37],f=[1,38],_=[1,24],g=[1,31],S=[1,32],I=[1,30],b=[1,39],T=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],N=[1,61],q=[89,90],C=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],A=[27,29],v=[1,70],x=[1,71],w=[1,72],L=[1,73],M=[1,74],O=[1,75],$=[1,76],D=[1,83],F=[1,80],P=[1,84],W=[1,85],V=[1,86],U=[1,87],Y=[1,88],B=[1,89],Q=[1,90],H=[1,91],K=[1,92],j=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],G=[63,64],z=[1,101],X=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],Z=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],J=[1,110],ee=[1,106],et=[1,107],es=[1,108],ei=[1,109],en=[1,111],er=[1,116],ea=[1,117],el=[1,114],ec=[1,115],eo={trace:(0,c.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:(0,c.eW)(function(e,t,s,i,n,r,a){var l=r.length-1;switch(n){case 4:this.$=r[l].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=r[l].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(r[l-3],r[l-4]);break;case 22:i.addRequirement(r[l-5],r[l-6]),i.setClass([r[l-5]],r[l-3]);break;case 23:i.setNewReqId(r[l-2]);break;case 24:i.setNewReqText(r[l-2]);break;case 25:i.setNewReqRisk(r[l-2]);break;case 26:i.setNewReqVerifyMethod(r[l-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(r[l-3]);break;case 43:i.addElement(r[l-5]),i.setClass([r[l-5]],r[l-3]);break;case 44:i.setNewElementType(r[l-2]);break;case 45:i.setNewElementDocRef(r[l-2]);break;case 48:i.addRelationship(r[l-2],r[l],r[l-4]);break;case 49:i.addRelationship(r[l-2],r[l-4],r[l]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=r[l-2],i.defineClass(r[l-1],r[l]);break;case 58:i.setClass(r[l-1],r[l]);break;case 59:i.setClass([r[l-2]],r[l]);break;case 60:case 62:case 65:this.$=[r[l]];break;case 61:case 63:this.$=r[l-2].concat([r[l]]);break;case 64:this.$=r[l-2],i.setCssStyle(r[l-1],r[l]);break;case 66:r[l-2].push(r[l]),this.$=r[l-2];break;case 68:this.$=r[l-1]+r[l]}},"anonymous"),table:[{3:1,4:2,6:t,9:s,11:i,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:s,11:i,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(r,[2,6]),{3:12,4:2,6:t,9:s,11:i,13:n},{1:[2,2]},{4:17,5:a,7:13,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:d,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},e(r,[2,4]),e(r,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:a,7:42,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:d,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:43,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:d,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:44,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:d,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:45,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:d,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:46,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:d,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:47,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:d,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:48,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:d,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:49,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:d,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:50,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:d,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),{30:60,33:62,75:N,89:b,90:T},{30:63,33:62,75:N,89:b,90:T},{30:64,33:62,75:N,89:b,90:T},e(q,[2,29]),e(q,[2,30]),e(q,[2,31]),e(q,[2,32]),e(q,[2,33]),e(q,[2,34]),e(C,[2,81]),e(C,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(A,[2,79]),e(A,[2,80]),{27:[1,67],29:[1,68]},e(A,[2,85]),e(A,[2,86]),{62:69,65:v,66:x,67:w,68:L,69:M,70:O,71:$},{62:77,65:v,66:x,67:w,68:L,69:M,70:O,71:$},{30:78,33:62,75:N,89:b,90:T},{73:79,75:D,76:F,78:81,79:82,80:P,81:W,82:V,83:U,84:Y,85:B,86:Q,87:H,88:K},e(j,[2,60]),e(j,[2,62]),{73:93,75:D,76:F,78:81,79:82,80:P,81:W,82:V,83:U,84:Y,85:B,86:Q,87:H,88:K},{30:94,33:62,75:N,76:F,89:b,90:T},{5:[1,95]},{30:96,33:62,75:N,89:b,90:T},{5:[1,97]},{30:98,33:62,75:N,89:b,90:T},{63:[1,99]},e(G,[2,50]),e(G,[2,51]),e(G,[2,52]),e(G,[2,53]),e(G,[2,54]),e(G,[2,55]),e(G,[2,56]),{64:[1,100]},e(k,[2,59],{76:F}),e(k,[2,64],{76:z}),{33:103,75:[1,102],89:b,90:T},e(X,[2,65],{79:104,75:D,80:P,81:W,82:V,83:U,84:Y,85:B,86:Q,87:H,88:K}),e(Z,[2,67]),e(Z,[2,69]),e(Z,[2,70]),e(Z,[2,71]),e(Z,[2,72]),e(Z,[2,73]),e(Z,[2,74]),e(Z,[2,75]),e(Z,[2,76]),e(Z,[2,77]),e(Z,[2,78]),e(k,[2,57],{76:z}),e(k,[2,58],{76:F}),{5:J,28:105,31:ee,34:et,36:es,38:ei,40:en},{27:[1,112],76:F},{5:er,40:ea,56:113,57:el,59:ec},{27:[1,118],76:F},{33:119,89:b,90:T},{33:120,89:b,90:T},{75:D,78:121,79:82,80:P,81:W,82:V,83:U,84:Y,85:B,86:Q,87:H,88:K},e(j,[2,61]),e(j,[2,63]),e(Z,[2,68]),e(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:J,28:126,31:ee,34:et,36:es,38:ei,40:en},e(k,[2,28]),{5:[1,127]},e(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:er,40:ea,56:130,57:el,59:ec},e(k,[2,47]),{5:[1,131]},e(k,[2,48]),e(k,[2,49]),e(X,[2,66],{79:104,75:D,80:P,81:W,82:V,83:U,84:Y,85:B,86:Q,87:H,88:K}),{33:132,89:b,90:T},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(k,[2,27]),{5:J,28:145,31:ee,34:et,36:es,38:ei,40:en},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(k,[2,46]),{5:er,40:ea,56:152,57:el,59:ec},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(k,[2,43]),{5:J,28:159,31:ee,34:et,36:es,38:ei,40:en},{5:J,28:160,31:ee,34:et,36:es,38:ei,40:en},{5:J,28:161,31:ee,34:et,36:es,38:ei,40:en},{5:J,28:162,31:ee,34:et,36:es,38:ei,40:en},{5:er,40:ea,56:163,57:el,59:ec},{5:er,40:ea,56:164,57:el,59:ec},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,44]),e(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:(0,c.eW)(function(e,t){if(t.recoverable)this.trace(e);else{var s=Error(e);throw s.hash=t,s}},"parseError"),parse:(0,c.eW)(function(e){var t=this,s=[0],i=[],n=[null],r=[],a=this.table,l="",o=0,h=0,u=0,y=r.slice.call(arguments,1),m=Object.create(this.lexer),E={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(E.yy[d]=this.yy[d]);m.setInput(e,E.yy),E.yy.lexer=m,E.yy.parser=this,void 0===m.yylloc&&(m.yylloc={});var p=m.yylloc;r.push(p);var R=m.options&&m.options.ranges;function f(){var e;return"number"!=typeof(e=i.pop()||m.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof E.yy.parseError?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.eW)(function(e){s.length=s.length-2*e,n.length=n.length-e,r.length=r.length-e},"popStack"),(0,c.eW)(f,"lex");for(var _,g,S,I,b,T,k,N,q,C={};;){if(S=s[s.length-1],this.defaultActions[S]?I=this.defaultActions[S]:(null==_&&(_=f()),I=a[S]&&a[S][_]),void 0===I||!I.length||!I[0]){var A="";for(T in q=[],a[S])this.terminals_[T]&&T>2&&q.push("'"+this.terminals_[T]+"'");A=m.showPosition?"Parse error on line "+(o+1)+":\n"+m.showPosition()+"\nExpecting "+q.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(A,{text:m.match,token:this.terminals_[_]||_,line:m.yylineno,loc:p,expected:q})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+S+", token: "+_);switch(I[0]){case 1:s.push(_),n.push(m.yytext),r.push(m.yylloc),s.push(I[1]),_=null,g?(_=g,g=null):(h=m.yyleng,l=m.yytext,o=m.yylineno,p=m.yylloc,u>0&&u--);break;case 2:if(k=this.productions_[I[1]][1],C.$=n[n.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},R&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[l,h,o,E.yy,I[1],n,r].concat(y))))return b;k&&(s=s.slice(0,-1*k*2),n=n.slice(0,-1*k),r=r.slice(0,-1*k)),s.push(this.productions_[I[1]][0]),n.push(C.$),r.push(C._$),N=a[s[s.length-2]][s[s.length-1]],s.push(N);break;case 3:return!0}}return!0},"parse")},eh={EOF:1,parseError:(0,c.eW)(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},"parseError"),setInput:(0,c.eW)(function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},"input"),unput:(0,c.eW)(function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,c.eW)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.eW)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.eW)(function(){var e=this.pastInput(),t=Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,c.eW)(function(e,t){var s,i,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var r in n)this[r]=n[r];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 e,t,s,i,n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!t||s[0].length>t[0].length)){if(t=s,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,n[r])))return e;if(!this._backtrack)return!1;t=!1;continue}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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(e){this.conditionStack.push(e)},"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(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,c.eW)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,c.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.eW)(function(e,t,s,i){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return t.yytext=t.yytext.trim(),89;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};function eu(){this.yy={}}return eo.lexer=eh,(0,c.eW)(eu,"Parser"),eu.prototype=eo,eo.Parser=eu,new eu}();o.parser=o;var h=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=l.GN,this.getAccTitle=l.eu,this.setAccDescription=l.U$,this.getAccDescription=l.Mx,this.setDiagramTitle=l.g2,this.getDiagramTitle=l.Kr,this.getConfig=(0,c.eW)(()=>(0,l.nV)().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,c.eW)(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),c.cM.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(this.latestElement.docRef=e)}addRelationship(e,t,s){this.relations.push({type:e,src:t,dst:s})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,(0,l.ZH)()}setCssStyle(e,t){for(let s of e){let e=this.requirements.get(s)??this.elements.get(s);if(!t||!e)return;for(let s of t)s.includes(",")?e.cssStyles.push(...s.split(",")):e.cssStyles.push(s)}}setClass(e,t){for(let s of e){let e=this.requirements.get(s)??this.elements.get(s);if(e)for(let s of t){e.classes.push(s);let t=this.classes.get(s)?.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(let s of e){let e=this.classes.get(s);void 0===e&&(e={id:s,styles:[],textStyles:[]},this.classes.set(s,e)),t&&t.forEach(function(t){if(/color/.exec(t)){let s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)}),this.requirements.forEach(e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap(e=>e.split(",")))}),this.elements.forEach(e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap(e=>e.split(",")))})}}getClasses(){return this.classes}getData(){let e=(0,l.nV)(),t=[],s=[];for(let s of this.requirements.values())s.id=s.name,s.cssStyles=s.cssStyles,s.cssClasses=s.classes.join(" "),s.shape="requirementBox",s.look=e.look,t.push(s);for(let s of this.elements.values())s.shape="requirementBox",s.look=e.look,s.id=s.name,s.cssStyles=s.cssStyles,s.cssClasses=s.classes.join(" "),t.push(s);for(let t of this.relations){let i=0,n=t.type===this.Relationships.CONTAINS,r={id:`${t.src}-${t.dst}-${i}`,start:this.requirements.get(t.src)?.name??this.elements.get(t.src)?.name,end:this.requirements.get(t.dst)?.name??this.elements.get(t.dst)?.name,label:`&lt;&lt;${t.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",n?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:n?"normal":"dashed",arrowTypeStart:n?"requirement_contains":"",arrowTypeEnd:n?"":"requirement_arrow",look:e.look};s.push(r),i++}return{nodes:t,edges:s,other:{},config:e,direction:this.getDirection()}}},u=(0,c.eW)(e=>`
2
+
3
+ marker {
4
+ fill: ${e.relationColor};
5
+ stroke: ${e.relationColor};
6
+ }
7
+
8
+ marker.cross {
9
+ stroke: ${e.lineColor};
10
+ }
11
+
12
+ svg {
13
+ font-family: ${e.fontFamily};
14
+ font-size: ${e.fontSize};
15
+ }
16
+
17
+ .reqBox {
18
+ fill: ${e.requirementBackground};
19
+ fill-opacity: 1.0;
20
+ stroke: ${e.requirementBorderColor};
21
+ stroke-width: ${e.requirementBorderSize};
22
+ }
23
+
24
+ .reqTitle, .reqLabel{
25
+ fill: ${e.requirementTextColor};
26
+ }
27
+ .reqLabelBox {
28
+ fill: ${e.relationLabelBackground};
29
+ fill-opacity: 1.0;
30
+ }
31
+
32
+ .req-title-line {
33
+ stroke: ${e.requirementBorderColor};
34
+ stroke-width: ${e.requirementBorderSize};
35
+ }
36
+ .relationshipLine {
37
+ stroke: ${e.relationColor};
38
+ stroke-width: 1;
39
+ }
40
+ .relationshipLabel {
41
+ fill: ${e.relationLabelColor};
42
+ }
43
+ .divider {
44
+ stroke: ${e.nodeBorder};
45
+ stroke-width: 1;
46
+ }
47
+ .label {
48
+ font-family: ${e.fontFamily};
49
+ color: ${e.nodeTextColor||e.textColor};
50
+ }
51
+ .label text,span {
52
+ fill: ${e.nodeTextColor||e.textColor};
53
+ color: ${e.nodeTextColor||e.textColor};
54
+ }
55
+ .labelBkg {
56
+ background-color: ${e.edgeLabelBackground};
57
+ }
58
+
59
+ `,"getStyles"),y={};(0,c.r2)(y,{draw:()=>m});var m=(0,c.eW)(async function(e,t,s,o){c.cM.info("REF0:"),c.cM.info("Drawing requirement diagram (unified)",t);let{securityLevel:h,state:u,layout:y}=(0,l.nV)(),m=o.db.getData(),E=(0,i.q)(t,h);m.type=o.type,m.layoutAlgorithm=(0,r._b)(y),m.nodeSpacing=u?.nodeSpacing??50,m.rankSpacing=u?.rankSpacing??50,m.markers=["requirement_contains","requirement_arrow"],m.diagramId=t,await (0,r.sY)(m,E),a.w8.insertTitle(E,"requirementDiagramTitleText",u?.titleTopMargin??25,o.db.getDiagramTitle()),(0,n.j)(E,8,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),E={parser:o,get db(){return new h},renderer:y,styles:u}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1098],{41098:function(e,c,n){n.d(c,{createGitGraphServices:function(){return r.z}});var r=n(75794);n(78985)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[13],{70013:function(e,r,t){t.r(r),t.d(r,{MermaidDiagram:function(){return l}});var a=t(57437),i=t(2265),s=t(50656);let n={securityLevel:"strict",startOnLoad:!1,theme:"default"},d=!1;function l(e){let{code:r,id:t}=e,[l,c]=(0,i.useState)(""),[m,u]=(0,i.useState)(null),[o,f]=(0,i.useState)(!0),g=(0,i.useRef)(null),h=(0,i.useId)(),p=t||"mermaid-".concat(h.replace(/:/g,"-"));return((0,i.useEffect)(()=>{let e=!0;return(async()=>{f(!0),u(null),c("");let t=(null==r?void 0:r.trim())||"";if(!t){e&&(u("Diagram code is empty"),f(!1));return}try{!function(){if(!d){if("strict"!==n.securityLevel)throw Error("[SECURITY] mermaid securityLevel must be 'strict', but got '".concat(n.securityLevel,"'. ")+"This is a security requirement to prevent XSS attacks.");s.Z.initialize(n),d=!0}}();let{svg:r}=await s.Z.render(p,t);e&&(c(r),f(!1))}catch(r){e&&(u(r instanceof Error?r.message:"Failed to render diagram"),f(!1))}})(),()=>{e=!1}},[r,p]),o)?(0,a.jsx)("div",{"data-testid":"mermaid-loading",className:"flex items-center justify-center p-4 text-gray-500",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"inline-block animate-spin rounded-full h-4 w-4 border-2 border-gray-300 border-t-blue-600"}),(0,a.jsx)("span",{children:"Rendering diagram..."})]})}):m?(0,a.jsxs)("div",{"data-testid":"mermaid-error",className:"bg-red-50 border border-red-200 p-4 rounded",children:[(0,a.jsx)("p",{className:"text-red-600 font-medium",children:"Diagram Error"}),(0,a.jsx)("pre",{className:"text-sm text-red-500 mt-2 whitespace-pre-wrap break-words",children:m})]}):(0,a.jsx)("div",{ref:g,"data-testid":"mermaid-container",className:"mermaid-container max-w-full overflow-x-auto",dangerouslySetInnerHTML:{__html:l}})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1423],{57098:function(t,r,e){e.d(r,{A:function(){return n}});var a=e(31954),n=class{constructor(t){this.init=t,this.records=this.init()}static{(0,a.eW)(this,"ImperativeState")}reset(){this.records=this.init()}}},74464:function(t,r,e){e.d(r,{AD:function(){return u},AE:function(){return h},Mu:function(){return i},O:function(){return c},kc:function(){return x},rB:function(){return o},yU:function(){return l}});var a=e(55166),n=e(31954),s=e(59543),i=(0,n.eW)((t,r)=>{let e=t.append("rect");if(e.attr("x",r.x),e.attr("y",r.y),e.attr("fill",r.fill),e.attr("stroke",r.stroke),e.attr("width",r.width),e.attr("height",r.height),r.name&&e.attr("name",r.name),r.rx&&e.attr("rx",r.rx),r.ry&&e.attr("ry",r.ry),void 0!==r.attrs)for(let t in r.attrs)e.attr(t,r.attrs[t]);return r.class&&e.attr("class",r.class),e},"drawRect"),c=(0,n.eW)((t,r)=>{i(t,{x:r.startx,y:r.starty,width:r.stopx-r.startx,height:r.stopy-r.starty,fill:r.fill,stroke:r.stroke,class:"rect"}).lower()},"drawBackgroundRect"),l=(0,n.eW)((t,r)=>{let e=r.text.replace(a.Vw," "),n=t.append("text");n.attr("x",r.x),n.attr("y",r.y),n.attr("class","legend"),n.style("text-anchor",r.anchor),r.class&&n.attr("class",r.class);let s=n.append("tspan");return s.attr("x",r.x+2*r.textMargin),s.text(e),n},"drawText"),h=(0,n.eW)((t,r,e,a)=>{let n=t.append("image");n.attr("x",r),n.attr("y",e);let i=(0,s.N)(a);n.attr("xlink:href",i)},"drawImage"),o=(0,n.eW)((t,r,e,a)=>{let n=t.append("use");n.attr("x",r),n.attr("y",e);let i=(0,s.N)(a);n.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),x=(0,n.eW)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),u=(0,n.eW)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}}]);
@@ -0,0 +1,55 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1582],{26160:function(t,e,i){var s=i(51778),n=i(29534);e.Z=(t,e)=>s.Z.lang.round(n.Z.parse(t)[e])},34577:function(t,e,i){i.d(e,{q:function(){return r}});var s=i(31954),n=i(84370),r=(0,s.eW)((t,e)=>{let i;return"sandbox"===e&&(i=(0,n.Ys)("#i"+t)),("sandbox"===e?(0,n.Ys)(i.nodes()[0].contentDocument.body):(0,n.Ys)("body")).select(`[id="${t}"]`)},"getDiagramElement")},23919:function(t,e,i){i.d(e,{j:function(){return r}});var s=i(55166),n=i(31954),r=(0,n.eW)((t,e,i,r)=>{t.attr("class",i);let{width:l,height:o,x:h,y:u}=a(t,e);(0,s.v2)(t,o,l,r);let y=c(h,u,l,o,e);t.attr("viewBox",y),n.cM.debug(`viewBox configured: ${y} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,n.eW)((t,e)=>{let i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+2*e,height:i.height+2*e,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),c=(0,n.eW)((t,e,i,s,n)=>`${t-n} ${e-n} ${i} ${s}`,"createViewBox")},51582:function(t,e,i){i.d(e,{diagram:function(){return b}});var s=i(34577),n=i(23919),r=i(63025);i(19328),i(54973),i(11866),i(10507),i(33281),i(66691);var a=i(94705),c=i(55166),l=i(31954),o=i(84370),h=i(26160),u=i(835),y=function(){var t=(0,l.eW)(function(t,e,i,s){for(i=i||{},s=t.length;s--;i[t[s]]=e);return i},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],i=[1,10],s=[1,11],n=[1,12],r=[1,13],a=[1,20],c=[1,21],o=[1,22],h=[1,23],u=[1,24],y=[1,19],d=[1,25],p=[1,26],_=[1,18],g=[1,33],b=[1,34],f=[1,35],m=[1,36],E=[1,37],k=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],O=[1,42],S=[1,43],T=[1,52],N=[40,50,68,69],A=[1,63],R=[1,61],I=[1,58],C=[1,62],x=[1,64],$=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],D=[63,64,65,66,67],v=[1,81],w=[1,80],M=[1,78],W=[1,79],L=[6,10,42,47],B=[6,10,13,41,42,47,48,49],F=[1,89],Y=[1,88],P=[1,87],Z=[19,56],G=[1,98],K=[1,97],z=[19,56,58,60],U={trace:(0,l.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:(0,l.eW)(function(t,e,i,s,n,r,a){var c=r.length-1;switch(n){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:r[c-1].push(r[c]),this.$=r[c-1];break;case 4:case 5:case 55:case 78:case 62:case 63:case 66:this.$=r[c];break;case 8:s.addEntity(r[c-4]),s.addEntity(r[c-2]),s.addRelationship(r[c-4],r[c],r[c-2],r[c-3]);break;case 9:s.addEntity(r[c-8]),s.addEntity(r[c-4]),s.addRelationship(r[c-8],r[c],r[c-4],r[c-5]),s.setClass([r[c-8]],r[c-6]),s.setClass([r[c-4]],r[c-2]);break;case 10:s.addEntity(r[c-6]),s.addEntity(r[c-2]),s.addRelationship(r[c-6],r[c],r[c-2],r[c-3]),s.setClass([r[c-6]],r[c-4]);break;case 11:s.addEntity(r[c-6]),s.addEntity(r[c-4]),s.addRelationship(r[c-6],r[c],r[c-4],r[c-5]),s.setClass([r[c-4]],r[c-2]);break;case 12:s.addEntity(r[c-3]),s.addAttributes(r[c-3],r[c-1]);break;case 13:s.addEntity(r[c-5]),s.addAttributes(r[c-5],r[c-1]),s.setClass([r[c-5]],r[c-3]);break;case 14:s.addEntity(r[c-2]);break;case 15:s.addEntity(r[c-4]),s.setClass([r[c-4]],r[c-2]);break;case 16:s.addEntity(r[c]);break;case 17:s.addEntity(r[c-2]),s.setClass([r[c-2]],r[c]);break;case 18:s.addEntity(r[c-6],r[c-4]),s.addAttributes(r[c-6],r[c-1]);break;case 19:s.addEntity(r[c-8],r[c-6]),s.addAttributes(r[c-8],r[c-1]),s.setClass([r[c-8]],r[c-3]);break;case 20:s.addEntity(r[c-5],r[c-3]);break;case 21:s.addEntity(r[c-7],r[c-5]),s.setClass([r[c-7]],r[c-2]);break;case 22:s.addEntity(r[c-3],r[c-1]);break;case 23:s.addEntity(r[c-5],r[c-3]),s.setClass([r[c-5]],r[c]);break;case 24:case 25:this.$=r[c].trim(),s.setAccTitle(this.$);break;case 26:case 27:this.$=r[c].trim(),s.setAccDescription(this.$);break;case 32:s.setDirection("TB");break;case 33:s.setDirection("BT");break;case 34:s.setDirection("RL");break;case 35:s.setDirection("LR");break;case 36:this.$=r[c-3],s.addClass(r[c-2],r[c-1]);break;case 37:case 38:case 56:case 64:case 43:this.$=[r[c]];break;case 39:case 40:this.$=r[c-2].concat([r[c]]);break;case 41:this.$=r[c-2],s.setClass(r[c-1],r[c]);break;case 42:this.$=r[c-3],s.addCssStyles(r[c-2],r[c-1]);break;case 44:case 65:r[c-2].push(r[c]),this.$=r[c-2];break;case 46:this.$=r[c-1]+r[c];break;case 54:case 76:case 77:case 67:this.$=r[c].replace(/"/g,"");break;case 57:r[c].push(r[c-1]),this.$=r[c];break;case 58:this.$={type:r[c-1],name:r[c]};break;case 59:this.$={type:r[c-2],name:r[c-1],keys:r[c]};break;case 60:this.$={type:r[c-2],name:r[c-1],comment:r[c]};break;case 61:this.$={type:r[c-3],name:r[c-2],keys:r[c-1],comment:r[c]};break;case 68:this.$={cardA:r[c],relType:r[c-1],cardB:r[c-2]};break;case 69:this.$=s.Cardinality.ZERO_OR_ONE;break;case 70:this.$=s.Cardinality.ZERO_OR_MORE;break;case 71:this.$=s.Cardinality.ONE_OR_MORE;break;case 72:this.$=s.Cardinality.ONLY_ONE;break;case 73:this.$=s.Cardinality.MD_PARENT;break;case 74:this.$=s.Identification.NON_IDENTIFYING;break;case 75:this.$=s.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:i,24:s,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:c,35:o,36:h,37:u,40:y,43:d,44:p,50:_},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:i,24:s,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:c,35:o,36:h,37:u,40:y,43:d,44:p,50:_},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:g,64:b,65:f,66:m,67:E}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(k,[2,54]),t(k,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:O,41:S},{16:44,40:O,41:S},{16:45,40:O,41:S},t(e,[2,4]),{11:46,40:y,50:_},{16:47,40:O,41:S},{18:48,19:[1,49],51:50,52:51,56:T},{11:53,40:y,50:_},{62:54,68:[1,55],69:[1,56]},t(N,[2,69]),t(N,[2,70]),t(N,[2,71]),t(N,[2,72]),t(N,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:A,38:57,41:R,42:I,45:59,46:60,48:C,49:x},t($,[2,37]),t($,[2,38]),{16:65,40:O,41:S,42:I},{13:A,38:66,41:R,42:I,45:59,46:60,48:C,49:x},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:I,63:g,64:b,65:f,66:m,67:E}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:T},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:g,64:b,65:f,66:m,67:E},t(D,[2,74]),t(D,[2,75]),{6:v,10:w,39:77,42:M,47:W},{40:[1,82],41:[1,83]},t(L,[2,43],{46:84,13:A,41:R,48:C,49:x}),t(B,[2,45]),t(B,[2,50]),t(B,[2,51]),t(B,[2,52]),t(B,[2,53]),t(e,[2,41],{42:I}),{6:v,10:w,39:85,42:M,47:W},{14:86,40:F,50:Y,70:P},{16:90,40:O,41:S},{11:91,40:y,50:_},{18:92,19:[1,93],51:50,52:51,56:T},t(e,[2,12]),{19:[2,57]},t(Z,[2,58],{54:94,55:95,57:96,59:G,60:K}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:A,41:R,45:101,46:60,48:C,49:x},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t($,[2,39]),t($,[2,40]),t(B,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:I},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(Z,[2,59],{55:106,58:[1,107],60:K}),t(Z,[2,60]),t(z,[2,64]),t(Z,[2,67]),t(z,[2,66]),{18:108,19:[1,109],51:50,52:51,56:T},{16:110,40:O,41:S},t(L,[2,44],{46:84,13:A,41:R,48:C,49:x}),{14:111,40:F,50:Y,70:P},{16:112,40:O,41:S},{14:113,40:F,50:Y,70:P},t(e,[2,13]),t(Z,[2,61]),{57:114,59:G},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:I}),t(e,[2,11]),{13:[1,117],42:I},t(e,[2,10]),t(z,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:T},{14:120,40:F,50:Y,70:P},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:(0,l.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,l.eW)(function(t){var e=this,i=[0],s=[],n=[null],r=[],a=this.table,c="",o=0,h=0,u=0,y=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var b=d.options&&d.options.ranges;function f(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.eW)(function(t){i.length=i.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,l.eW)(f,"lex");for(var m,E,k,O,S,T,N,A,R,I={};;){if(k=i[i.length-1],this.defaultActions[k]?O=this.defaultActions[k]:(null==m&&(m=f()),O=a[k]&&a[k][m]),void 0===O||!O.length||!O[0]){var C="";for(T in R=[],a[k])this.terminals_[T]&&T>2&&R.push("'"+this.terminals_[T]+"'");C=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:g,expected:R})}if(O[0]instanceof Array&&O.length>1)throw Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(O[0]){case 1:i.push(m),n.push(d.yytext),r.push(d.yylloc),i.push(O[1]),m=null,E?(m=E,E=null):(h=d.yyleng,c=d.yytext,o=d.yylineno,g=d.yylloc,u>0&&u--);break;case 2:if(N=this.productions_[O[1]][1],I.$=n[n.length-N],I._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},b&&(I._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),void 0!==(S=this.performAction.apply(I,[c,h,o,p.yy,O[1],n,r].concat(y))))return S;N&&(i=i.slice(0,-1*N*2),n=n.slice(0,-1*N),r=r.slice(0,-1*N)),i.push(this.productions_[O[1]][0]),n.push(I.$),r.push(I._$),A=a[i[i.length-2]][i[i.length-1]],i.push(A);break;case 3:return!0}}return!0},"parse")},j={EOF:1,parseError:(0,l.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,l.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,l.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,l.eW)(function(t){var e=t.length,i=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 s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=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:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.eW)(function(){return this._more=!0,this},"more"),reject:(0,l.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,l.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.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,l.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,l.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.eW)(function(t,e){var i,s,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var r in n)this[r]=n[r];return!1},"test_match"),next:(0,l.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,s,n=this._currentRules(),r=0;r<n.length;r++)if((i=this._input.match(this.rules[n[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,l.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.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,l.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.eW)(function(t,e,i,s){switch(i){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 59;case 25:case 26:return 56;case 27:return 60;case 29:return this.popState(),19;case 30:case 73:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 59:return 63;case 42:case 43:case 44:case 52:case 54:case 61:return 65;case 47:case 48:case 49:case 50:case 51:case 53:case 60:return 64;case 55:case 56:case 57:case 58:return 66;case 62:return 67;case 63:case 66:case 67:case 68:return 68;case 64:case 65:return 69;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};function V(){this.yy={}}return U.lexer=j,(0,l.eW)(V,"Parser"),V.prototype=U,U.Parser=V,new V}();y.parser=y;var d=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=c.GN,this.getAccTitle=c.eu,this.setAccDescription=c.U$,this.getAccDescription=c.Mx,this.setDiagramTitle=c.g2,this.getDiagramTitle=c.Kr,this.getConfig=(0,l.eW)(()=>(0,c.nV)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,l.eW)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,l.cM.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,c.nV)().look??"default",cssClasses:"default",cssStyles:[]}),l.cM.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){let i;let s=this.addEntity(t);for(i=e.length-1;i>=0;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),l.cM.debug("Added attribute ",e[i].name)}addRelationship(t,e,i,s){let n=this.entities.get(t),r=this.entities.get(i);if(!n||!r)return;let a={entityA:n.id,roleA:e,entityB:r.id,relSpec:s};this.relationships.push(a),l.cM.debug("Added new relationship :",a)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(let i of t){let t=this.classes.get(i);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(let i of t){let t=this.entities.get(i);if(!e||!t)return;for(let i of e)t.cssStyles.push(i)}}addClass(t,e){t.forEach(t=>{let i=this.classes.get(t);void 0===i&&(i={id:t,styles:[],textStyles:[]},this.classes.set(t,i)),e&&e.forEach(function(t){if(/color/.exec(t)){let e=t.replace("fill","bgFill");i.textStyles.push(e)}i.styles.push(t)})})}setClass(t,e){for(let i of t){let t=this.entities.get(i);if(t)for(let i of e)t.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,c.ZH)()}getData(){let t=[],e=[],i=(0,c.nV)();for(let e of this.entities.keys()){let i=this.entities.get(e);i&&(i.cssCompiledStyles=this.getCompiledStyles(i.cssClasses.split(" ")),t.push(i))}let s=0;for(let t of this.relationships){let n={id:(0,a.Ln)(t.entityA,t.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:i.look};e.push(n)}return{nodes:t,edges:e,other:{},config:i,direction:"TB"}}},p={};(0,l.r2)(p,{draw:()=>_});var _=(0,l.eW)(async function(t,e,i,h){l.cM.info("REF0:"),l.cM.info("Drawing er diagram (unified)",e);let{securityLevel:u,er:y,layout:d}=(0,c.nV)(),p=h.db.getData(),_=(0,s.q)(e,u);p.type=h.type,p.layoutAlgorithm=(0,r._b)(d),p.config.flowchart.nodeSpacing=y?.nodeSpacing||140,p.config.flowchart.rankSpacing=y?.rankSpacing||80,p.direction=h.db.getDirection(),p.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],p.diagramId=e,await (0,r.sY)(p,_),"elk"===p.layoutAlgorithm&&_.select(".edges").lower();let g=_.selectAll('[id*="-background"]');Array.from(g).length>0&&g.each(function(){let t=(0,o.Ys)(this),e=t.attr("id").replace("-background",""),i=_.select(`#${CSS.escape(e)}`);if(!i.empty()){let e=i.attr("transform");t.attr("transform",e)}}),a.w8.insertTitle(_,"erDiagramTitleText",y?.titleTopMargin??25,h.db.getDiagramTitle()),(0,n.j)(_,8,"erDiagram",y?.useMaxWidth??!0)},"draw"),g=(0,l.eW)((t,e)=>{let i=h.Z,s=i(t,"r"),n=i(t,"g"),r=i(t,"b");return u.Z(s,n,r,e)},"fade"),b={parser:y,get db(){return new d},renderer:p,styles:(0,l.eW)(t=>`
2
+ .entityBox {
3
+ fill: ${t.mainBkg};
4
+ stroke: ${t.nodeBorder};
5
+ }
6
+
7
+ .relationshipLabelBox {
8
+ fill: ${t.tertiaryColor};
9
+ opacity: 0.7;
10
+ background-color: ${t.tertiaryColor};
11
+ rect {
12
+ opacity: 0.5;
13
+ }
14
+ }
15
+
16
+ .labelBkg {
17
+ background-color: ${g(t.tertiaryColor,.5)};
18
+ }
19
+
20
+ .edgeLabel .label {
21
+ fill: ${t.nodeBorder};
22
+ font-size: 14px;
23
+ }
24
+
25
+ .label {
26
+ font-family: ${t.fontFamily};
27
+ color: ${t.nodeTextColor||t.textColor};
28
+ }
29
+
30
+ .edge-pattern-dashed {
31
+ stroke-dasharray: 8,8;
32
+ }
33
+
34
+ .node rect,
35
+ .node circle,
36
+ .node ellipse,
37
+ .node polygon
38
+ {
39
+ fill: ${t.mainBkg};
40
+ stroke: ${t.nodeBorder};
41
+ stroke-width: 1px;
42
+ }
43
+
44
+ .relationshipLine {
45
+ stroke: ${t.lineColor};
46
+ stroke-width: 1;
47
+ fill: none;
48
+ }
49
+
50
+ .marker {
51
+ fill: none !important;
52
+ stroke: ${t.lineColor} !important;
53
+ stroke-width: 1;
54
+ }
55
+ `,"getStyles")}}}]);