hex-audit 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/DEMO.md +13 -0
  2. package/README.md +60 -6
  3. package/dashboard/.next/BUILD_ID +1 -1
  4. package/dashboard/.next/app-build-manifest.json +100 -89
  5. package/dashboard/.next/app-path-routes-manifest.json +1 -1
  6. package/dashboard/.next/build-manifest.json +14 -14
  7. package/dashboard/.next/next-minimal-server.js.nft.json +1 -1
  8. package/dashboard/.next/next-server.js.nft.json +1 -1
  9. package/dashboard/.next/prerender-manifest.js +1 -1
  10. package/dashboard/.next/prerender-manifest.json +1 -1
  11. package/dashboard/.next/react-loadable-manifest.json +118 -118
  12. package/dashboard/.next/routes-manifest.json +1 -1
  13. package/dashboard/.next/server/app/_not-found/page.js +1 -1
  14. package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/dashboard/.next/server/app/access/page.js +1 -1
  16. package/dashboard/.next/server/app/access/page.js.nft.json +1 -1
  17. package/dashboard/.next/server/app/access/page_client-reference-manifest.js +1 -1
  18. package/dashboard/.next/server/app/calls/page.js +1 -1
  19. package/dashboard/.next/server/app/calls/page.js.nft.json +1 -1
  20. package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +1 -1
  21. package/dashboard/.next/server/app/changes/page.js +20 -0
  22. package/dashboard/.next/server/app/changes/page.js.nft.json +1 -0
  23. package/dashboard/.next/server/app/changes/page_client-reference-manifest.js +1 -0
  24. package/dashboard/.next/server/app/conformance/page.js +1 -1
  25. package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +1 -1
  26. package/dashboard/.next/server/app/diagram/page.js +1 -1
  27. package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +1 -1
  28. package/dashboard/.next/server/app/flows/page.js +1 -1
  29. package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +1 -1
  30. package/dashboard/.next/server/app/functions/page.js +1 -1
  31. package/dashboard/.next/server/app/functions/page.js.nft.json +1 -1
  32. package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +1 -1
  33. package/dashboard/.next/server/app/issues/page.js +6 -6
  34. package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -1
  35. package/dashboard/.next/server/app/notes/page.js +3 -3
  36. package/dashboard/.next/server/app/notes/page_client-reference-manifest.js +1 -1
  37. package/dashboard/.next/server/app/page.js +2 -2
  38. package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  39. package/dashboard/.next/server/app/progress/page.js +1 -1
  40. package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +1 -1
  41. package/dashboard/.next/server/app/report/page.js +1 -1
  42. package/dashboard/.next/server/app/report/page_client-reference-manifest.js +1 -1
  43. package/dashboard/.next/server/app/stats/page.js +1 -1
  44. package/dashboard/.next/server/app/stats/page.js.nft.json +1 -1
  45. package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +1 -1
  46. package/dashboard/.next/server/app-paths-manifest.json +8 -7
  47. package/dashboard/.next/server/chunks/42.js +1 -1
  48. package/dashboard/.next/server/chunks/530.js +1 -1
  49. package/dashboard/.next/server/chunks/649.js +1 -1
  50. package/dashboard/.next/server/chunks/939.js +1 -0
  51. package/dashboard/.next/server/functions-config-manifest.json +1 -1
  52. package/dashboard/.next/server/middleware-build-manifest.js +1 -1
  53. package/dashboard/.next/server/middleware-react-loadable-manifest.js +1 -1
  54. package/dashboard/.next/server/next-font-manifest.js +1 -1
  55. package/dashboard/.next/server/next-font-manifest.json +1 -1
  56. package/dashboard/.next/server/pages/500.html +1 -1
  57. package/dashboard/.next/server/pages-manifest.json +1 -1
  58. package/dashboard/.next/server/server-reference-manifest.js +1 -1
  59. package/dashboard/.next/server/server-reference-manifest.json +1 -1
  60. package/dashboard/.next/static/chunks/{1.8868c4d131111be7.js → 1.a666047ea18866fb.js} +2 -2
  61. package/dashboard/.next/static/chunks/1015.39008440ab15e196.js +226 -0
  62. package/dashboard/.next/static/chunks/1151.497fa63c5b9eba52.js +1 -0
  63. package/dashboard/.next/static/chunks/1199.f30cbfa151e56076.js +148 -0
  64. package/dashboard/.next/static/chunks/1375.64c20f1064a38a10.js +43 -0
  65. package/dashboard/.next/static/chunks/1799.8dc56017eede704e.js +9 -0
  66. package/dashboard/.next/static/chunks/20154aaa.e87f69fe10483f8b.js +1 -0
  67. package/dashboard/.next/static/chunks/2077.5603adeb156c7d10.js +1 -0
  68. package/dashboard/.next/static/chunks/2166.9f6592b9399eadd8.js +215 -0
  69. package/dashboard/.next/static/chunks/{2291.85a70cb0c228157b.js → 2291.584b42ccad079b99.js} +1 -1
  70. package/dashboard/.next/static/chunks/2325.7decd077edfb81d9.js +24 -0
  71. package/dashboard/.next/static/chunks/{2383.62c035a052272594.js → 2383.ca81f980ce6528a4.js} +1 -1
  72. package/dashboard/.next/static/chunks/2694.7dfa5fef28851903.js +1 -0
  73. package/dashboard/.next/static/chunks/275.38af87389c1d33d7.js +34 -0
  74. package/dashboard/.next/static/chunks/2781.fba46046dbf2693b.js +93 -0
  75. package/dashboard/.next/static/chunks/2805.35b4cd8a94978aaf.js +1 -0
  76. package/dashboard/.next/static/chunks/{2879.51436986f93981d9.js → 2879.74d65e33e60505ee.js} +1 -1
  77. package/dashboard/.next/static/chunks/3017.4a5312e3c20a173f.js +1 -0
  78. package/dashboard/.next/static/chunks/3205-47d09be47325709f.js +2 -0
  79. package/dashboard/.next/static/chunks/3236.eac9855778a54518.js +1 -0
  80. package/dashboard/.next/static/chunks/3480.853a445a3784642a.js +1 -0
  81. package/dashboard/.next/static/chunks/3626.c5dacee11c8fbc4d.js +64 -0
  82. package/dashboard/.next/static/chunks/3865.5e6d2d501380e03b.js +90 -0
  83. package/dashboard/.next/static/chunks/3887.073cece834a4eae2.js +1 -0
  84. package/dashboard/.next/static/chunks/3924-88d849290406ee6f.js +1 -0
  85. package/dashboard/.next/static/chunks/3948.74201b9f0672234d.js +287 -0
  86. package/dashboard/.next/static/chunks/4728.e69372b5e5b61b8d.js +24 -0
  87. package/dashboard/.next/static/chunks/4787.821a6ad2816cdc60.js +23 -0
  88. package/dashboard/.next/static/chunks/5060.47402abc10273699.js +1 -0
  89. package/dashboard/.next/static/chunks/5284.334c7c0587d5d47a.js +1 -0
  90. package/dashboard/.next/static/chunks/5715.e16b1230cc4b4652.js +115 -0
  91. package/dashboard/.next/static/chunks/6014.641a2c53ba506241.js +104 -0
  92. package/dashboard/.next/static/chunks/6024.f099c15f75aa6722.js +79 -0
  93. package/dashboard/.next/static/chunks/{6052.033a6f1013c666eb.js → 6052.3001318955e5b36c.js} +2 -2
  94. package/dashboard/.next/static/chunks/6177.a01cf0a03734cf09.js +1 -0
  95. package/dashboard/.next/static/chunks/618f8807-69fc7bb97c2b87c1.js +1 -0
  96. package/dashboard/.next/static/chunks/6434.f560693253fea8de.js +1 -0
  97. package/dashboard/.next/static/chunks/6468.976d89ba133185f1.js +77 -0
  98. package/dashboard/.next/static/chunks/6540.6f3c4f2c6877ed89.js +1 -0
  99. package/dashboard/.next/static/chunks/6549.e3c4c1766cff1449.js +1 -0
  100. package/dashboard/.next/static/chunks/690f35d0.ab57e02a04c7e9e0.js +119 -0
  101. package/dashboard/.next/static/chunks/{7020.831e16e26d91abc1.js → 7020.b718b1b9cea36e60.js} +2 -2
  102. package/dashboard/.next/static/chunks/7397-37adf76cad543297.js +1 -0
  103. package/dashboard/.next/static/chunks/7498-d1814d68ba346d13.js +1 -0
  104. package/dashboard/.next/static/chunks/7802.f0134c792fccd382.js +80 -0
  105. package/dashboard/.next/static/chunks/7973.e34032723285a616.js +79 -0
  106. package/dashboard/.next/static/chunks/{7a04ac15.1c6cea694301806c.js → 7a04ac15.e49de94ece135900.js} +1 -1
  107. package/dashboard/.next/static/chunks/8216.1138ec313908a708.js +5 -0
  108. package/dashboard/.next/static/chunks/{8233babc.780b8e272eda298f.js → 8233babc.09872dcb3ff44064.js} +1 -1
  109. package/dashboard/.next/static/chunks/{8452-e616b5f43bceb95f.js → 8452-6d77fa353402422c.js} +2 -2
  110. package/dashboard/.next/static/chunks/8645.98a43217d406500e.js +1 -0
  111. package/dashboard/.next/static/chunks/8928-fc049decdfbdaa6d.js +1 -0
  112. package/dashboard/.next/static/chunks/9173.a7160f7d0b685fa7.js +1 -0
  113. package/dashboard/.next/static/chunks/9178.998a8c49996de8e4.js +1 -0
  114. package/dashboard/.next/static/chunks/9466.a914ce0de7d3bb84.js +1 -0
  115. package/dashboard/.next/static/chunks/9660.b1c8deae2c449d14.js +1 -0
  116. package/dashboard/.next/static/chunks/{9717.6cf5c8c89403b651.js → 9717.bba51b78ebd8fd29.js} +1 -1
  117. package/dashboard/.next/static/chunks/9720.d63a0696776bcc60.js +1 -0
  118. package/dashboard/.next/static/chunks/9811.2993c4cbd28e8d1b.js +1 -0
  119. package/dashboard/.next/static/chunks/app/_not-found/page-c299b935209993df.js +1 -0
  120. package/dashboard/.next/static/chunks/app/access/page-f8403cbdfc1c176b.js +1 -0
  121. package/dashboard/.next/static/chunks/app/calls/page-41f20d01e12382ef.js +1 -0
  122. package/dashboard/.next/static/chunks/app/changes/page-82bf8b6f48cdc506.js +1 -0
  123. package/dashboard/.next/static/chunks/app/conformance/page-6bb8e3b372e38098.js +1 -0
  124. package/dashboard/.next/static/chunks/app/diagram/page-469cd7a6f183efba.js +1 -0
  125. package/dashboard/.next/static/chunks/app/flows/page-7872dd9141ba0b07.js +1 -0
  126. package/dashboard/.next/static/chunks/app/functions/page-5847bcb77a8e7edf.js +1 -0
  127. package/dashboard/.next/static/chunks/app/issues/page-1ffc64fe40439002.js +1 -0
  128. package/dashboard/.next/static/chunks/app/layout-6c6d2a0fd7c989d3.js +1 -0
  129. package/dashboard/.next/static/chunks/app/notes/page-8bcaa52304500098.js +1 -0
  130. package/dashboard/.next/static/chunks/app/page-d63800ddb072b77b.js +1 -0
  131. package/dashboard/.next/static/chunks/app/progress/page-e26554f655a62eef.js +1 -0
  132. package/dashboard/.next/static/chunks/app/report/page-18c04fb2f193b020.js +1 -0
  133. package/dashboard/.next/static/chunks/app/stats/page-67ff59fd69bed651.js +1 -0
  134. package/dashboard/.next/static/chunks/{b7167ec1.7afbab6f609e3326.js → b7167ec1.708a3d61698ca2e6.js} +1 -1
  135. package/dashboard/.next/static/chunks/c7ea4e13.3073a2f551aa5ac8.js +1 -0
  136. package/dashboard/.next/static/chunks/framework-a117d81bf1b91f9a.js +33 -0
  137. package/dashboard/.next/static/chunks/main-app-5662c64b50ba40d1.js +1 -0
  138. package/dashboard/.next/static/chunks/main-cc3a889b25e9aa68.js +1 -0
  139. package/dashboard/.next/static/chunks/pages/_app-308fef0bf9b328f2.js +1 -0
  140. package/dashboard/.next/static/chunks/pages/_error-c91b5eabd7ac9382.js +1 -0
  141. package/dashboard/.next/static/chunks/webpack-4de0e79bdd6a0418.js +1 -0
  142. package/dashboard/.next/static/css/1112cea2260b3926.css +3 -0
  143. package/dashboard/.next/static/media/39f449c8730c2295-s.woff2 +0 -0
  144. package/dashboard/.next/static/media/86f65e8637cc94e3-s.woff2 +0 -0
  145. package/dashboard/.next/static/media/8760c4774489e4ba-s.p.woff2 +0 -0
  146. package/dashboard/.next/static/media/9fabb9c65b63d798-s.woff2 +0 -0
  147. package/dashboard/.next/static/media/a1f87af3f44fadbb-s.woff2 +0 -0
  148. package/dashboard/.next/static/media/f9e1dbe9676d9bb6-s.woff2 +0 -0
  149. package/dashboard/.next/static/z5XBev05xDAkDrxWxAjNu/_buildManifest.js +1 -0
  150. package/dashboard/app/changes/ChangesClient.tsx +464 -0
  151. package/dashboard/app/changes/page.tsx +36 -0
  152. package/dashboard/app/issues/IssuesBoardClient.tsx +11 -1
  153. package/dashboard/app/layout.tsx +13 -1
  154. package/dashboard/app/notes/NotesClient.tsx +5 -0
  155. package/dashboard/app/page.tsx +42 -0
  156. package/dashboard/components/DashboardLayout.tsx +43 -18
  157. package/dist/analysis/code-model.d.ts +113 -0
  158. package/dist/analysis/code-model.d.ts.map +1 -0
  159. package/dist/analysis/code-model.js +529 -0
  160. package/dist/analysis/code-model.js.map +1 -0
  161. package/dist/analysis/diff.d.ts +64 -0
  162. package/dist/analysis/diff.d.ts.map +1 -0
  163. package/dist/analysis/diff.js +644 -0
  164. package/dist/analysis/diff.js.map +1 -0
  165. package/dist/commands/analyze.d.ts.map +1 -1
  166. package/dist/commands/analyze.js +18 -2
  167. package/dist/commands/analyze.js.map +1 -1
  168. package/dist/commands/diff.d.ts +26 -0
  169. package/dist/commands/diff.d.ts.map +1 -0
  170. package/dist/commands/diff.js +218 -0
  171. package/dist/commands/diff.js.map +1 -0
  172. package/dist/commands/init.d.ts.map +1 -1
  173. package/dist/commands/init.js +66 -6
  174. package/dist/commands/init.js.map +1 -1
  175. package/dist/commands/issue.d.ts.map +1 -1
  176. package/dist/commands/issue.js +4 -4
  177. package/dist/commands/issue.js.map +1 -1
  178. package/dist/commands/note.d.ts.map +1 -1
  179. package/dist/commands/note.js +30 -2
  180. package/dist/commands/note.js.map +1 -1
  181. package/dist/core/config.d.ts +9 -0
  182. package/dist/core/config.d.ts.map +1 -1
  183. package/dist/core/config.js +18 -0
  184. package/dist/core/config.js.map +1 -1
  185. package/dist/core/errors.d.ts +1 -1
  186. package/dist/core/errors.d.ts.map +1 -1
  187. package/dist/core/errors.js +16 -0
  188. package/dist/core/errors.js.map +1 -1
  189. package/dist/core/git.d.ts +24 -0
  190. package/dist/core/git.d.ts.map +1 -0
  191. package/dist/core/git.js +115 -0
  192. package/dist/core/git.js.map +1 -0
  193. package/dist/core/issues.d.ts +4 -2
  194. package/dist/core/issues.d.ts.map +1 -1
  195. package/dist/core/issues.js +67 -28
  196. package/dist/core/issues.js.map +1 -1
  197. package/dist/core/notes.d.ts +25 -1
  198. package/dist/core/notes.d.ts.map +1 -1
  199. package/dist/core/notes.js +34 -2
  200. package/dist/core/notes.js.map +1 -1
  201. package/dist/core/schema.d.ts +750 -53
  202. package/dist/core/schema.d.ts.map +1 -1
  203. package/dist/core/schema.js +153 -1
  204. package/dist/core/schema.js.map +1 -1
  205. package/dist/core/skills.d.ts +10 -4
  206. package/dist/core/skills.d.ts.map +1 -1
  207. package/dist/core/skills.js +100 -37
  208. package/dist/core/skills.js.map +1 -1
  209. package/dist/index.js +2 -0
  210. package/dist/index.js.map +1 -1
  211. package/dist/skills/ai-audit/LICENSE +21 -0
  212. package/dist/skills/ai-audit/SKILL.md +476 -0
  213. package/dist/skills/ai-audit/UPSTREAM.md +46 -0
  214. package/dist/skills/ai-audit/references/agent-prompts.md +133 -0
  215. package/dist/skills/ai-audit/references/assemble.sh +357 -0
  216. package/dist/skills/ai-audit/references/dedup-and-assembly.md +420 -0
  217. package/dist/skills/ai-audit/references/hacking-agents/access-control-agent.md +27 -0
  218. package/dist/skills/ai-audit/references/hacking-agents/asymmetry-agent.md +77 -0
  219. package/dist/skills/ai-audit/references/hacking-agents/boundary-agent.md +79 -0
  220. package/dist/skills/ai-audit/references/hacking-agents/economic-security-agent.md +35 -0
  221. package/dist/skills/ai-audit/references/hacking-agents/execution-trace-agent.md +33 -0
  222. package/dist/skills/ai-audit/references/hacking-agents/first-principles-agent.md +36 -0
  223. package/dist/skills/ai-audit/references/hacking-agents/flow-gap-agent.md +49 -0
  224. package/dist/skills/ai-audit/references/hacking-agents/invariant-agent.md +44 -0
  225. package/dist/skills/ai-audit/references/hacking-agents/math-precision-agent.md +48 -0
  226. package/dist/skills/ai-audit/references/hacking-agents/numerical-gap-agent.md +46 -0
  227. package/dist/skills/ai-audit/references/hacking-agents/periphery-agent.md +27 -0
  228. package/dist/skills/ai-audit/references/hacking-agents/shared-rules.md +61 -0
  229. package/dist/skills/ai-audit/references/hacking-agents/trust-gap-agent.md +40 -0
  230. package/dist/skills/ai-audit/references/hex-board.md +223 -0
  231. package/dist/skills/ai-audit/references/hex-export.sh +71 -0
  232. package/dist/skills/ai-audit/references/judging.md +75 -0
  233. package/dist/skills/ai-audit/references/report-formatting.md +385 -0
  234. package/dist/skills/ai-audit/references/report-language.md +151 -0
  235. package/dist/skills/ai-audit/references/senior-auditor-sop.md +63 -0
  236. package/dist/skills/generate-report.md +7 -3
  237. package/dist/skills/init-audit.md +104 -2
  238. package/dist/skills/validate-all-findings.md +1 -1
  239. package/dist/skills/validate-finding.md +8 -4
  240. package/dist/types/index.d.ts +7 -1
  241. package/dist/types/index.d.ts.map +1 -1
  242. package/package.json +2 -1
  243. package/dashboard/.next/server/app/_not-found.html +0 -1
  244. package/dashboard/.next/server/app/_not-found.meta +0 -6
  245. package/dashboard/.next/server/app/_not-found.rsc +0 -12
  246. package/dashboard/.next/server/app/diagram.html +0 -1
  247. package/dashboard/.next/server/app/diagram.meta +0 -5
  248. package/dashboard/.next/server/app/diagram.rsc +0 -10
  249. package/dashboard/.next/server/app/flows.html +0 -1
  250. package/dashboard/.next/server/app/flows.meta +0 -5
  251. package/dashboard/.next/server/app/flows.rsc +0 -10
  252. package/dashboard/.next/server/chunks/44.js +0 -1
  253. package/dashboard/.next/server/pages/404.html +0 -1
  254. package/dashboard/.next/static/AyrRAwu4mazjp8iX4Yjbb/_buildManifest.js +0 -1
  255. package/dashboard/.next/static/chunks/1015.3ab89142e5f44120.js +0 -226
  256. package/dashboard/.next/static/chunks/1151.b6ef5c786e587ed7.js +0 -1
  257. package/dashboard/.next/static/chunks/1199.a072929dbec89965.js +0 -148
  258. package/dashboard/.next/static/chunks/1375.d4d2f7fc9c9c2ff1.js +0 -43
  259. package/dashboard/.next/static/chunks/1799.83206776abbbf1fc.js +0 -9
  260. package/dashboard/.next/static/chunks/20154aaa.ccc347c04ab5ad4a.js +0 -1
  261. package/dashboard/.next/static/chunks/2077.7011a570c87aa7b1.js +0 -1
  262. package/dashboard/.next/static/chunks/2166.cc0fabeb2e89b840.js +0 -215
  263. package/dashboard/.next/static/chunks/2325.2c55cb9a6282ae3f.js +0 -24
  264. package/dashboard/.next/static/chunks/2694.92bbe252063e4786.js +0 -1
  265. package/dashboard/.next/static/chunks/275.0d761aa0e5b030b8.js +0 -34
  266. package/dashboard/.next/static/chunks/2781.8536b644a480aede.js +0 -93
  267. package/dashboard/.next/static/chunks/2805.a8d71d2f92bb6ba9.js +0 -1
  268. package/dashboard/.next/static/chunks/3017.e55781da9dd32d37.js +0 -1
  269. package/dashboard/.next/static/chunks/3205-728c260fbb4f89c6.js +0 -2
  270. package/dashboard/.next/static/chunks/3236.dff44fa7961d9d5e.js +0 -1
  271. package/dashboard/.next/static/chunks/3480.9451396ad7ee7613.js +0 -1
  272. package/dashboard/.next/static/chunks/3626.ba1cf848a9f2e93d.js +0 -64
  273. package/dashboard/.next/static/chunks/3865.a432a7910a2f5281.js +0 -90
  274. package/dashboard/.next/static/chunks/3887.c22cbfa3f095826c.js +0 -1
  275. package/dashboard/.next/static/chunks/3924-4a05057b5450abe1.js +0 -1
  276. package/dashboard/.next/static/chunks/3948.fe3c7d758568d98b.js +0 -287
  277. package/dashboard/.next/static/chunks/4728.07d87640a3e7dd0d.js +0 -24
  278. package/dashboard/.next/static/chunks/4787.4e5f6a0e0e40a583.js +0 -23
  279. package/dashboard/.next/static/chunks/5060.baca226af35ed016.js +0 -1
  280. package/dashboard/.next/static/chunks/5284.f949ac90c95ff143.js +0 -1
  281. package/dashboard/.next/static/chunks/5715.1524bcc9591e180b.js +0 -115
  282. package/dashboard/.next/static/chunks/6014.700ae4969b64d728.js +0 -104
  283. package/dashboard/.next/static/chunks/6024.4d23707c65514679.js +0 -79
  284. package/dashboard/.next/static/chunks/6177.e5c84cfc4c0dea51.js +0 -1
  285. package/dashboard/.next/static/chunks/618f8807-547c5614e1318888.js +0 -1
  286. package/dashboard/.next/static/chunks/6434.9481771c33195d29.js +0 -1
  287. package/dashboard/.next/static/chunks/6468.f4a3e8fa6accc6da.js +0 -77
  288. package/dashboard/.next/static/chunks/6540.86f367d7390738d4.js +0 -1
  289. package/dashboard/.next/static/chunks/6549.4d0d472df96429a5.js +0 -1
  290. package/dashboard/.next/static/chunks/690f35d0.3e40ca0930e4bbdb.js +0 -119
  291. package/dashboard/.next/static/chunks/7397-f6f4dddc7a20bfc1.js +0 -1
  292. package/dashboard/.next/static/chunks/7498-ea83cb9e30ec5491.js +0 -1
  293. package/dashboard/.next/static/chunks/7802.89aec9ee11680850.js +0 -80
  294. package/dashboard/.next/static/chunks/7973.8b526f589aca5d84.js +0 -79
  295. package/dashboard/.next/static/chunks/8216.1bead812eb126c35.js +0 -5
  296. package/dashboard/.next/static/chunks/8645.a5ca76f11edc9633.js +0 -1
  297. package/dashboard/.next/static/chunks/8928-60c623ee89d2e6ad.js +0 -1
  298. package/dashboard/.next/static/chunks/9173.2486ffca31131ec5.js +0 -1
  299. package/dashboard/.next/static/chunks/9178.469341860bf8caec.js +0 -1
  300. package/dashboard/.next/static/chunks/9466.e904660d38c03eea.js +0 -1
  301. package/dashboard/.next/static/chunks/9660.84a85811380c5f33.js +0 -1
  302. package/dashboard/.next/static/chunks/9720.67d4d0d15a96d691.js +0 -1
  303. package/dashboard/.next/static/chunks/9811.65e1d080c2d256af.js +0 -1
  304. package/dashboard/.next/static/chunks/app/_not-found/page-548ab392d0e890d1.js +0 -1
  305. package/dashboard/.next/static/chunks/app/access/page-3668562e7464eb5d.js +0 -1
  306. package/dashboard/.next/static/chunks/app/calls/page-d07f5b8664cc8303.js +0 -1
  307. package/dashboard/.next/static/chunks/app/conformance/page-2fede1d7b5f9265d.js +0 -1
  308. package/dashboard/.next/static/chunks/app/diagram/page-b228444265546495.js +0 -1
  309. package/dashboard/.next/static/chunks/app/flows/page-fa67783d8cd79cab.js +0 -1
  310. package/dashboard/.next/static/chunks/app/functions/page-686f0296639133a3.js +0 -1
  311. package/dashboard/.next/static/chunks/app/issues/page-98a298e1c1045c91.js +0 -1
  312. package/dashboard/.next/static/chunks/app/layout-49f2496c7637d931.js +0 -1
  313. package/dashboard/.next/static/chunks/app/notes/page-17af94c67ba79c00.js +0 -1
  314. package/dashboard/.next/static/chunks/app/page-24bac51dfe007c66.js +0 -1
  315. package/dashboard/.next/static/chunks/app/progress/page-427fb18da3afb061.js +0 -1
  316. package/dashboard/.next/static/chunks/app/report/page-796f2f4a8a5ac8f7.js +0 -1
  317. package/dashboard/.next/static/chunks/app/stats/page-db81f600a086f252.js +0 -1
  318. package/dashboard/.next/static/chunks/c7ea4e13.5effeeba6618bdb7.js +0 -1
  319. package/dashboard/.next/static/chunks/framework-cf6f5bdca6ba0184.js +0 -33
  320. package/dashboard/.next/static/chunks/main-63ff429eab01f5bf.js +0 -1
  321. package/dashboard/.next/static/chunks/main-app-9d2f6b8a47133e9b.js +0 -1
  322. package/dashboard/.next/static/chunks/pages/_app-6ad2b50514c24ab4.js +0 -1
  323. package/dashboard/.next/static/chunks/pages/_error-d5eb11c5c4626811.js +0 -1
  324. package/dashboard/.next/static/chunks/webpack-08869f2b18792e51.js +0 -1
  325. package/dashboard/.next/static/css/4a38d8f6f6b7a68f.css +0 -3
  326. package/dashboard/.next/static/media/438aa629764e75f3-s.woff2 +0 -0
  327. package/dashboard/.next/static/media/4c9affa5bc8f420e-s.p.woff2 +0 -0
  328. package/dashboard/.next/static/media/51251f8b9793cdb3-s.woff2 +0 -0
  329. package/dashboard/.next/static/media/875ae681bfde4580-s.woff2 +0 -0
  330. package/dashboard/.next/static/media/cc978ac5ee68c2b6-s.woff2 +0 -0
  331. package/dashboard/.next/static/media/e857b654a2caa584-s.woff2 +0 -0
  332. /package/dashboard/.next/static/{AyrRAwu4mazjp8iX4Yjbb → z5XBev05xDAkDrxWxAjNu}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6629],{1674:function(t,e,a){a.d(e,{C1:function(){return c},Lf:function(){return ef},XO:function(){return $},Yn:function(){return eu},ZH:function(){return B},aH:function(){return ep},dW:function(){return eg},gU:function(){return ew},jr:function(){return y},us:function(){return N}});var l=a(4994),i=a(3984),r=a(7062),n=a(778),s=a(9125),h=a(7632),o=a(8859),d=a(1648),c=(0,h.eW)(async(t,e,a)=>{let i,h;let d=e.useHtmlLabels||(0,s.ku)(s.nV()?.htmlLabels);i=a||"node default";let c=t.insert("g").attr("class",i).attr("id",e.domId||e.id),g=c.insert("g").attr("class","label").attr("style",(0,n.R7)(e.labelStyle));h=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let y=!!e.icon||!!e.img,f="markdown"===e.labelType,u=await (0,r.rw)(g,(0,s.oO)((0,n.SH)(h),(0,s.nV)()),{useHtmlLabels:d,width:e.width||s.nV().flowchart?.wrappingWidth,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:y,markdown:f},(0,s.nV)()),w=u.getBBox(),p=(e?.padding??0)/2;if(d){let t=u.children[0],e=(0,o.Ys)(u);await (0,l.i)(t,h),w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}return d?g.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"):g.attr("transform","translate(0, "+-w.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:c,bbox:w,halfPadding:p,label:g}},"labelHelper"),g=(0,h.eW)(async(t,e,a)=>{let l=a.useHtmlLabels??(0,s._X)((0,s.nV)()),i=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,r.rw)(i,(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._X)((0,s.nV)())){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?i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):i.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:i}},"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 u(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function w(t,e,a,l,i,r){let n=[],s=a-t,h=2*Math.PI/(s/r),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+i*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function p(t,e,a,l,i,r){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}function m(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),a=document.createElementNS("http://www.w3.org/2000/svg","path"),l=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");a.setAttribute("d",l);let i=e.find(t=>"none"!==t.getAttribute("fill")),r=e.find(t=>"none"!==t.getAttribute("stroke")),n=(0,h.eW)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");i&&Object.entries({fill:n(i,"fill"),"fill-opacity":n(i,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)}),r&&Object.entries({stroke:n(r,"stroke"),"stroke-width":n(r,"stroke-width")??"1","stroke-opacity":n(r,"stroke-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)});let s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(a),s}(0,h.eW)(u,"createPathFromPoints"),(0,h.eW)(w,"generateFullSineWavePoints"),(0,h.eW)(p,"generateCirclePoints"),(0,h.eW)(m,"mergePaths");var x=(0,h.eW)((t,e)=>{var a,l,i=t.x,r=t.y,n=e.x-i,s=e.y-r,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:i+a,y:r+l}},"intersectRect"),$=(0,h.eW)(async(t,e,a,l=!1,i=!1)=>{let n=e||"";"object"==typeof n&&(n=n[0]);let h=(0,s.nV)(),o=(0,s._X)(h);return await (0,r.rw)(t,n,{style:a,isTitle:l,useHtmlLabels:o,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},h)},"createLabel"),b=(0,h.eW)((t,e,a,l,i)=>["M",t+i,e,"H",t+a-i,"A",i,i,0,0,1,t+a,e+i,"V",e+l-i,"A",i,i,0,0,1,t+a-i,e+l,"H",t+i,"A",i,i,0,0,1,t,e+l-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),k=(0,h.eW)(async(t,e)=>{let a,n;h.cM.info("Creating subgraph rect for ",e.id,e);let c=(0,s.nV)(),{themeVariables:g,handDrawnSeed:y}=c,{clusterBkg:f,clusterBorder:u}=g,{labelStyles:w,nodeStyles:p,borderStyles:m,backgroundStyles:k}=(0,i.UG)(e),M=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),S=(0,s._X)(c),D=M.insert("g").attr("class","cluster-label "),W=(a="markdown"===e.labelType?await (0,r.rw)(D,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width}):await $(D,e.label,e.labelStyle||"",!1,!0)).getBBox();if((0,s._X)(c)){let t=a.children[0],e=(0,o.Ys)(a);W=t.getBoundingClientRect(),e.attr("width",W.width),e.attr("height",W.height)}let v=e.width<=W.width+e.padding?W.width+e.padding:e.width;e.width<=W.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let N=e.height,B=e.x-v/2,C=e.y-N/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg(M),a=(0,i._q)(e,{roughness:.7,fill:f,stroke:u,fillWeight:3,seed:y}),l=t.path(b(B,C,v,N,0),a);(n=M.insert(()=>(h.cM.debug("Rough node insert CXC",l),l),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),n.select("path").attr("style",k.join(";").replace("fill","stroke"))}else(n=M.insert("rect",":first-child")).attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",B).attr("y",C).attr("width",v).attr("height",N);let{subGraphTitleTopMargin:A}=(0,l.L)(c);if(D.attr("transform",`translate(${e.x-W.width/2}, ${e.y-e.height/2+A})`),w){let t=D.select("span");t&&t.attr("style",w)}let _=n.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=W.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:M,labelBBox:W}},"rect"),M=(0,h.eW)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.domId),l=a.insert("rect",":first-child"),i=0*e.padding,r=i/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-r).attr("y",e.y-e.height/2-r).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),S=(0,h.eW)(async(t,e)=>{let a;let l=(0,s.nV)(),{themeVariables:i,handDrawnSeed:r}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=i,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),u=y.insert("g").attr("class","cluster-label"),w=y.append("rect"),p=await $(u,e.label,e.labelStyle,void 0,!0),m=p.getBBox();if((0,s._X)(l)){let t=p.children[0],e=(0,o.Ys)(p);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}let k=0*e.padding,M=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+k;e.width<=m.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+k,D=e.height+k-m.height-6,W=e.x-M/2,v=e.y-S/2;e.width=M;let N=e.y-e.height/2-k/2+m.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.Z.svg(y),i=e.rx||e.ry?l.path(b(W,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:r}):l.rectangle(W,v,M,S,{seed:r});a=y.insert(()=>i,":first-child");let s=l.rectangle(W,N,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:r});a=y.insert(()=>i,":first-child"),w=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),w.attr("class","inner").attr("x",W).attr("y",N).attr("width",M).attr("height",D);u.attr("transform",`translate(${e.x-m.width/2}, ${v+1-((0,s._X)(l)?0:3)})`);let B=a.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:y,labelBBox:m}},"roundedWithTitle"),D=(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:u,nodeStyles:w,borderStyles:p,backgroundStyles:m}=(0,i.UG)(e),$=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),k=(0,s._X)(n),M=$.insert("g").attr("class","cluster-label "),S=await (0,r.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width}),D=S.getBBox();if((0,s._X)(n)){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,N=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($),l=(0,i._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),r=t.path(b(N,B,W,v,e.rx),l);(a=$.insert(()=>(h.cM.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",p.join(";")),a.select("path").attr("style",m.join(";").replace("fill","stroke"))}else(a=$.insert("rect",":first-child")).attr("style",w).attr("rx",e.rx).attr("ry",e.ry).attr("x",N).attr("y",B).attr("width",W).attr("height",v);let{subGraphTitleTopMargin:C}=(0,l.L)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+C})`),u){let t=M.select("span");t&&t.attr("style",u)}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 x(e,t)},{cluster:$,labelBBox:D}},"kanbanSection"),W={rect:k,squareRect:k,roundedWithTitle:S,noteGroup:M,divider:(0,h.eW)((t,e)=>{let a;let{themeVariables:l,handDrawnSeed:i}=(0,s.nV)(),{nodeBorder:r}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).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:r,seed:i});a=n.insert(()=>t,":first-child")}else{a=h.insert("rect",":first-child");let t="outer";e.look,t="divider",a.attr("class",t).attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look)}let u=a.node().getBBox();return e.height=u.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:D},v=new Map,N=(0,h.eW)(async(t,e)=>{let a=e.shape||"rect",l=await W[a](t,e);return v.set(e.id,l),l},"insertCluster"),B=(0,h.eW)(()=>{v=new Map},"clear");function C(t,e,a,l){var i=t.x,r=t.y,n=i-l.x,s=r-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<i&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<r&&(d=-d),{x:i+o,y:r+d}}function A(t,e,a){return C(t,e,e,a)}function _(t,e,a,l){{let i=e.y-t.y,r=t.x-e.x,n=e.x*t.y-t.x*e.y,s=i*a.x+r*a.y+n,h=i*l.x+r*l.y+n;if(0!==s&&0!==h&&q(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)&&q(g,y))return;let f=i*d-o*r;if(0===f)return;let u=Math.abs(f/2),w=r*c-d*n;return{x:w<0?(w-u)/f:(w+u)/f,y:(w=o*n-i*c)<0?(w-u)/f:(w+u)/f}}}function q(t,e){return t*e>0}function R(t,e,a){let l=t.x,i=t.y,r=[],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=i-t.height/2-s;for(let l=0;l<e.length;l++){let i=e[l],n=e[l<e.length-1?l+1:0],s=_(t,a,{x:h+i.x,y:o+i.y},{x:h+n.x,y:o+n.y});s&&r.push(s)}return r.length?(r.length>1&&r.sort(function(t,e){let l=t.x-a.x,i=t.y-a.y,r=Math.sqrt(l*l+i*i),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return r<h?-1:r===h?0:1}),r[0]):t}(0,h.eW)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.eW)(C,"intersectEllipse"),(0,h.eW)(A,"intersectCircle"),(0,h.eW)(_,"intersectLine"),(0,h.eW)(q,"sameSign"),(0,h.eW)(R,"intersectPolygon");var P={circle:A,polygon:R,rect:x};function I(t,e){let{labelStyles:a}=(0,i.UG)(e);e.labelStyle=a;let l=f(e),r=l;l||(r="anchor");let s=t.insert("g").attr("class",r).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.Z.svg(s),g=(0,i._q)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let u=c.circle(0,0,2,g),w=s.insert(()=>u,":first-child");return w.attr("class","anchor").attr("style",(0,n.R7)(o)),y(e,w),e.intersect=function(t){return h.cM.info("Circle intersect",e,1,t),P.circle(e,1,t)},s}function L(t,e,a,l,i,r,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/i)**2+((l-e)/2/r)**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*r*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*i*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/r,(t-d)/i),y=Math.atan2((l-c)/r,(a-d)/i)-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+i*Math.cos(e),l=c+r*Math.sin(e);f.push({x:a,y:l})}return f}function Z(t,e,a){let[l,i]=[e,a].sort((t,e)=>e-t);return i*(1-Math.sqrt(1-(t/l/2)**2))}async function G(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,o=(0,h.eW)(t=>t+s,"calcTotalHeight"),g=(0,h.eW)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:w,bbox:p}=await c(t,e,f(e)),m=o(e?.height?e?.height:p.height),[x,$]=g(m),b=Z(m,x,$),k=(e?.width?e?.width:p.width)+2*n+b-b,{cssStyles:M}=e,S=[{x:k/2,y:-m/2},{x:-k/2,y:-m/2},...L(-k/2,-m/2,-k/2,m/2,x,$,!1),{x:k/2,y:m/2},...L(k/2,m/2,k/2,-m/2,x,$,!0)],D=d.Z.svg(w),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=u(S),N=D.path(v,W),B=w.insert(()=>N,":first-child");return B.attr("class","basic label-container outer-path"),M&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",M),l&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",l),B.attr("transform",`translate(${x/2}, 0)`),y(e,B),e.intersect=function(t){return P.polygon(e,S,t)},w}function U(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:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?28:n,h="neo"===e.look?24:n,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),w=(e?.width??g.width)+("neo"===e.look?2*s:s+12),p=(e?.height??g.height)+("neo"===e.look?2*h:h),m=-p,x=[{x:12,y:m},{x:w,y:m},{x:w,y:0},{x:0,y:0},{x:0,y:m+12},{x:12,y:m}],{cssStyles:$}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),l=(0,i._q)(e,{}),r=u(x),n=t.path(r,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${p/2})`),$&&a.attr("style",$)}else a=U(o,w,p,x);return r&&a.attr("style",r),y(e,a),e.intersect=function(t){return P.polygon(e,x,t)},o}function E(t,e){let{nodeStyles:a}=(0,i.UG)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:r}=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,i._q)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=u(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),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:r,nodeStyles:s}=(0,i.UG)(e);e.labelStyle=r;let{shapeSvg:o,bbox:g,halfPadding:u}=await c(t,e,f(e)),w=a?.padding??u,p="neo"===e.look?g.width/2+32:g.width/2+w,{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,i._q)(e,{}),r=t.circle(0,0,2*p,a);(l=o.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(m))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",p).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,p,t),P.circle(e,p,t)},o}function V(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,i={x:l/2*e,y:l/2*a},r={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 ${r.x},${r.y} L ${s.x},${s.y}
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6629],{51674:function(t,e,a){a.d(e,{C1:function(){return c},Lf:function(){return ef},XO:function(){return $},Yn:function(){return eu},ZH:function(){return B},aH:function(){return ep},dW:function(){return eg},gU:function(){return ew},jr:function(){return y},us:function(){return N}});var l=a(64994),i=a(43984),r=a(47062),n=a(40778),s=a(49125),h=a(17632),o=a(68859),d=a(61648),c=(0,h.eW)(async(t,e,a)=>{let i,h;let d=e.useHtmlLabels||(0,s.ku)(s.nV()?.htmlLabels);i=a||"node default";let c=t.insert("g").attr("class",i).attr("id",e.domId||e.id),g=c.insert("g").attr("class","label").attr("style",(0,n.R7)(e.labelStyle));h=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let y=!!e.icon||!!e.img,f="markdown"===e.labelType,u=await (0,r.rw)(g,(0,s.oO)((0,n.SH)(h),(0,s.nV)()),{useHtmlLabels:d,width:e.width||s.nV().flowchart?.wrappingWidth,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:y,markdown:f},(0,s.nV)()),w=u.getBBox(),p=(e?.padding??0)/2;if(d){let t=u.children[0],e=(0,o.Ys)(u);await (0,l.i)(t,h),w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}return d?g.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"):g.attr("transform","translate(0, "+-w.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:c,bbox:w,halfPadding:p,label:g}},"labelHelper"),g=(0,h.eW)(async(t,e,a)=>{let l=a.useHtmlLabels??(0,s._X)((0,s.nV)()),i=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,r.rw)(i,(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._X)((0,s.nV)())){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?i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):i.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&i.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:i}},"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 u(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function w(t,e,a,l,i,r){let n=[],s=a-t,h=2*Math.PI/(s/r),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+i*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function p(t,e,a,l,i,r){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}function m(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),a=document.createElementNS("http://www.w3.org/2000/svg","path"),l=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");a.setAttribute("d",l);let i=e.find(t=>"none"!==t.getAttribute("fill")),r=e.find(t=>"none"!==t.getAttribute("stroke")),n=(0,h.eW)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");i&&Object.entries({fill:n(i,"fill"),"fill-opacity":n(i,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)}),r&&Object.entries({stroke:n(r,"stroke"),"stroke-width":n(r,"stroke-width")??"1","stroke-opacity":n(r,"stroke-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)});let s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(a),s}(0,h.eW)(u,"createPathFromPoints"),(0,h.eW)(w,"generateFullSineWavePoints"),(0,h.eW)(p,"generateCirclePoints"),(0,h.eW)(m,"mergePaths");var x=(0,h.eW)((t,e)=>{var a,l,i=t.x,r=t.y,n=e.x-i,s=e.y-r,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:i+a,y:r+l}},"intersectRect"),$=(0,h.eW)(async(t,e,a,l=!1,i=!1)=>{let n=e||"";"object"==typeof n&&(n=n[0]);let h=(0,s.nV)(),o=(0,s._X)(h);return await (0,r.rw)(t,n,{style:a,isTitle:l,useHtmlLabels:o,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},h)},"createLabel"),b=(0,h.eW)((t,e,a,l,i)=>["M",t+i,e,"H",t+a-i,"A",i,i,0,0,1,t+a,e+i,"V",e+l-i,"A",i,i,0,0,1,t+a-i,e+l,"H",t+i,"A",i,i,0,0,1,t,e+l-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),k=(0,h.eW)(async(t,e)=>{let a,n;h.cM.info("Creating subgraph rect for ",e.id,e);let c=(0,s.nV)(),{themeVariables:g,handDrawnSeed:y}=c,{clusterBkg:f,clusterBorder:u}=g,{labelStyles:w,nodeStyles:p,borderStyles:m,backgroundStyles:k}=(0,i.UG)(e),M=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),S=(0,s._X)(c),D=M.insert("g").attr("class","cluster-label "),W=(a="markdown"===e.labelType?await (0,r.rw)(D,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width}):await $(D,e.label,e.labelStyle||"",!1,!0)).getBBox();if((0,s._X)(c)){let t=a.children[0],e=(0,o.Ys)(a);W=t.getBoundingClientRect(),e.attr("width",W.width),e.attr("height",W.height)}let v=e.width<=W.width+e.padding?W.width+e.padding:e.width;e.width<=W.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let N=e.height,B=e.x-v/2,C=e.y-N/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg(M),a=(0,i._q)(e,{roughness:.7,fill:f,stroke:u,fillWeight:3,seed:y}),l=t.path(b(B,C,v,N,0),a);(n=M.insert(()=>(h.cM.debug("Rough node insert CXC",l),l),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),n.select("path").attr("style",k.join(";").replace("fill","stroke"))}else(n=M.insert("rect",":first-child")).attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",B).attr("y",C).attr("width",v).attr("height",N);let{subGraphTitleTopMargin:A}=(0,l.L)(c);if(D.attr("transform",`translate(${e.x-W.width/2}, ${e.y-e.height/2+A})`),w){let t=D.select("span");t&&t.attr("style",w)}let _=n.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=W.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:M,labelBBox:W}},"rect"),M=(0,h.eW)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.domId),l=a.insert("rect",":first-child"),i=0*e.padding,r=i/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-r).attr("y",e.y-e.height/2-r).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return x(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),S=(0,h.eW)(async(t,e)=>{let a;let l=(0,s.nV)(),{themeVariables:i,handDrawnSeed:r}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=i,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),u=y.insert("g").attr("class","cluster-label"),w=y.append("rect"),p=await $(u,e.label,e.labelStyle,void 0,!0),m=p.getBBox();if((0,s._X)(l)){let t=p.children[0],e=(0,o.Ys)(p);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}let k=0*e.padding,M=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+k;e.width<=m.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+k,D=e.height+k-m.height-6,W=e.x-M/2,v=e.y-S/2;e.width=M;let N=e.y-e.height/2-k/2+m.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.Z.svg(y),i=e.rx||e.ry?l.path(b(W,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:r}):l.rectangle(W,v,M,S,{seed:r});a=y.insert(()=>i,":first-child");let s=l.rectangle(W,N,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:r});a=y.insert(()=>i,":first-child"),w=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),w.attr("class","inner").attr("x",W).attr("y",N).attr("width",M).attr("height",D);u.attr("transform",`translate(${e.x-m.width/2}, ${v+1-((0,s._X)(l)?0:3)})`);let B=a.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:y,labelBBox:m}},"roundedWithTitle"),D=(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:u,nodeStyles:w,borderStyles:p,backgroundStyles:m}=(0,i.UG)(e),$=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),k=(0,s._X)(n),M=$.insert("g").attr("class","cluster-label "),S=await (0,r.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width}),D=S.getBBox();if((0,s._X)(n)){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,N=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($),l=(0,i._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),r=t.path(b(N,B,W,v,e.rx),l);(a=$.insert(()=>(h.cM.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",p.join(";")),a.select("path").attr("style",m.join(";").replace("fill","stroke"))}else(a=$.insert("rect",":first-child")).attr("style",w).attr("rx",e.rx).attr("ry",e.ry).attr("x",N).attr("y",B).attr("width",W).attr("height",v);let{subGraphTitleTopMargin:C}=(0,l.L)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+C})`),u){let t=M.select("span");t&&t.attr("style",u)}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 x(e,t)},{cluster:$,labelBBox:D}},"kanbanSection"),W={rect:k,squareRect:k,roundedWithTitle:S,noteGroup:M,divider:(0,h.eW)((t,e)=>{let a;let{themeVariables:l,handDrawnSeed:i}=(0,s.nV)(),{nodeBorder:r}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).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:r,seed:i});a=n.insert(()=>t,":first-child")}else{a=h.insert("rect",":first-child");let t="outer";e.look,t="divider",a.attr("class",t).attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look)}let u=a.node().getBBox();return e.height=u.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:D},v=new Map,N=(0,h.eW)(async(t,e)=>{let a=e.shape||"rect",l=await W[a](t,e);return v.set(e.id,l),l},"insertCluster"),B=(0,h.eW)(()=>{v=new Map},"clear");function C(t,e,a,l){var i=t.x,r=t.y,n=i-l.x,s=r-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<i&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<r&&(d=-d),{x:i+o,y:r+d}}function A(t,e,a){return C(t,e,e,a)}function _(t,e,a,l){{let i=e.y-t.y,r=t.x-e.x,n=e.x*t.y-t.x*e.y,s=i*a.x+r*a.y+n,h=i*l.x+r*l.y+n;if(0!==s&&0!==h&&q(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)&&q(g,y))return;let f=i*d-o*r;if(0===f)return;let u=Math.abs(f/2),w=r*c-d*n;return{x:w<0?(w-u)/f:(w+u)/f,y:(w=o*n-i*c)<0?(w-u)/f:(w+u)/f}}}function q(t,e){return t*e>0}function R(t,e,a){let l=t.x,i=t.y,r=[],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=i-t.height/2-s;for(let l=0;l<e.length;l++){let i=e[l],n=e[l<e.length-1?l+1:0],s=_(t,a,{x:h+i.x,y:o+i.y},{x:h+n.x,y:o+n.y});s&&r.push(s)}return r.length?(r.length>1&&r.sort(function(t,e){let l=t.x-a.x,i=t.y-a.y,r=Math.sqrt(l*l+i*i),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return r<h?-1:r===h?0:1}),r[0]):t}(0,h.eW)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.eW)(C,"intersectEllipse"),(0,h.eW)(A,"intersectCircle"),(0,h.eW)(_,"intersectLine"),(0,h.eW)(q,"sameSign"),(0,h.eW)(R,"intersectPolygon");var P={circle:A,polygon:R,rect:x};function I(t,e){let{labelStyles:a}=(0,i.UG)(e);e.labelStyle=a;let l=f(e),r=l;l||(r="anchor");let s=t.insert("g").attr("class",r).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.Z.svg(s),g=(0,i._q)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let u=c.circle(0,0,2,g),w=s.insert(()=>u,":first-child");return w.attr("class","anchor").attr("style",(0,n.R7)(o)),y(e,w),e.intersect=function(t){return h.cM.info("Circle intersect",e,1,t),P.circle(e,1,t)},s}function L(t,e,a,l,i,r,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/i)**2+((l-e)/2/r)**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*r*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*i*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/r,(t-d)/i),y=Math.atan2((l-c)/r,(a-d)/i)-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+i*Math.cos(e),l=c+r*Math.sin(e);f.push({x:a,y:l})}return f}function Z(t,e,a){let[l,i]=[e,a].sort((t,e)=>e-t);return i*(1-Math.sqrt(1-(t/l/2)**2))}async function G(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,o=(0,h.eW)(t=>t+s,"calcTotalHeight"),g=(0,h.eW)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:w,bbox:p}=await c(t,e,f(e)),m=o(e?.height?e?.height:p.height),[x,$]=g(m),b=Z(m,x,$),k=(e?.width?e?.width:p.width)+2*n+b-b,{cssStyles:M}=e,S=[{x:k/2,y:-m/2},{x:-k/2,y:-m/2},...L(-k/2,-m/2,-k/2,m/2,x,$,!1),{x:k/2,y:m/2},...L(k/2,m/2,k/2,-m/2,x,$,!0)],D=d.Z.svg(w),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=u(S),N=D.path(v,W),B=w.insert(()=>N,":first-child");return B.attr("class","basic label-container outer-path"),M&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",M),l&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",l),B.attr("transform",`translate(${x/2}, 0)`),y(e,B),e.intersect=function(t){return P.polygon(e,S,t)},w}function U(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:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?28:n,h="neo"===e.look?24:n,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),w=(e?.width??g.width)+("neo"===e.look?2*s:s+12),p=(e?.height??g.height)+("neo"===e.look?2*h:h),m=-p,x=[{x:12,y:m},{x:w,y:m},{x:w,y:0},{x:0,y:0},{x:0,y:m+12},{x:12,y:m}],{cssStyles:$}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),l=(0,i._q)(e,{}),r=u(x),n=t.path(r,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${p/2})`),$&&a.attr("style",$)}else a=U(o,w,p,x);return r&&a.attr("style",r),y(e,a),e.intersect=function(t){return P.polygon(e,x,t)},o}function E(t,e){let{nodeStyles:a}=(0,i.UG)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:r}=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,i._q)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=u(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),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:r,nodeStyles:s}=(0,i.UG)(e);e.labelStyle=r;let{shapeSvg:o,bbox:g,halfPadding:u}=await c(t,e,f(e)),w=a?.padding??u,p="neo"===e.look?g.width/2+32:g.width/2+w,{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,i._q)(e,{}),r=t.circle(0,0,2*p,a);(l=o.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(m))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",p).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,p,t),P.circle(e,p,t)},o}function V(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,i={x:l/2*e,y:l/2*a},r={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 ${r.x},${r.y} L ${s.x},${s.y}
2
2
  M ${i.x},${i.y} L ${n.x},${n.y}`}function X(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a,e.label="";let r=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(r),c=(0,i._q)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=o.circle(0,0,2*n,c),u=V(n),w=o.path(u,c),p=r.insert(()=>g,":first-child");return p.insert(()=>w),p.attr("class","outer-path"),s&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),y(e,p),e.intersect=function(t){return h.cM.info("crossedCircle intersect",e,{radius:n,point:t}),P.circle(e,n,t)},r}function Y(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function j(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+h,w=n.height+o,p=Math.max(5,.1*w),{cssStyles:m}=e,x=[...Y(g/2,-w/2,p,30,-90,0),{x:-g/2-p,y:p},...Y(g/2+2*p,-p,p,20,-180,-270),...Y(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:-w/2},...Y(g/2,w/2,p,20,0,90)],$=[{x:g/2,y:-w/2-p},{x:-g/2,y:-w/2-p},...Y(g/2,-w/2,p,20,-90,0),{x:-g/2-p,y:-p},...Y(g/2+.1*g,-p,p,20,-180,-270),...Y(g/2+.1*g,p,p,20,-90,-180),{x:-g/2-p,y:w/2},...Y(g/2,w/2,p,20,0,90),{x:-g/2,y:w/2+p},{x:g/2,y:w/2+p}],b=d.Z.svg(r),k=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=u(x).replace("Z",""),S=b.path(M,k),D=u($),W=b.path(D,{...k}),v=r.insert("g",":first-child");return v.insert(()=>W,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),m&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${p}, 0)`),s.attr("transform",`translate(${-g/2+p-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,v),e.intersect=function(t){return P.polygon(e,$,t)},r}function O(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:r,y:o})}return n}async function F(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+("neo"===e.look?2*h:h),w=n.height+("neo"===e.look?2*o:o),p=Math.max(5,.1*w),{cssStyles:m}=e,x=[...O(g/2,-w/2,p,20,-90,0),{x:g/2+p,y:-p},...O(g/2+2*p,-p,p,20,-180,-270),...O(g/2+2*p,p,p,20,-90,-180),{x:g/2+p,y:w/2},...O(g/2,w/2,p,20,0,90)],$=[{x:-g/2,y:-w/2-p},{x:g/2,y:-w/2-p},...O(g/2,-w/2,p,20,-90,0),{x:g/2+p,y:-p},...O(g/2+2*p,-p,p,20,-180,-270),...O(g/2+2*p,p,p,20,-90,-180),{x:g/2+p,y:w/2},...O(g/2,w/2,p,20,0,90),{x:g/2,y:w/2+p},{x:-g/2,y:w/2+p}],b=d.Z.svg(r),k=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=u(x).replace("Z",""),S=b.path(M,k),D=u($),W=b.path(D,{...k}),v=r.insert("g",":first-child");return v.insert(()=>W,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),m&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${-p}, 0)`),s.attr("transform",`translate(${-g/2+(e.padding??0)/2-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,v),e.intersect=function(t){return P.polygon(e,$,t)},r}function z(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function J(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,g=n.width+("neo"===e.look?2*h:h),w=n.height+("neo"===e.look?2*o:o),p=Math.max(5,.1*w),{cssStyles:m}=e,x=[...z(g/2,-w/2,p,30,-90,0),{x:-g/2-p,y:p},...z(g/2+2*p,-p,p,20,-180,-270),...z(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:-w/2},...z(g/2,w/2,p,20,0,90)],$=[...z(-g/2+p+p/2,-w/2,p,20,-90,-180),{x:g/2-p/2,y:p},...z(-g/2-p/2,-p,p,20,0,90),...z(-g/2-p/2,p,p,20,-90,0),{x:g/2-p/2,y:-p},...z(-g/2+p+p/2,w/2,p,30,-180,-270)],b=[{x:g/2,y:-w/2-p},{x:-g/2,y:-w/2-p},...z(g/2,-w/2,p,20,-90,0),{x:-g/2-p,y:-p},...z(g/2+2*p,-p,p,20,-180,-270),...z(g/2+2*p,p,p,20,-90,-180),{x:-g/2-p,y:w/2},...z(g/2,w/2,p,20,0,90),{x:-g/2,y:w/2+p},{x:g/2-p-p/2,y:w/2+p},...z(-g/2+p+p/2,-w/2,p,20,-90,-180),{x:g/2-p/2,y:p},...z(-g/2-p/2,-p,p,20,0,90),...z(-g/2-p/2,p,p,20,-90,0),{x:g/2-p/2,y:-p},...z(-g/2+p+p/2,w/2,p,30,-180,-270)],k=d.Z.svg(r),M=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=u(x).replace("Z",""),D=k.path(S,M),W=u($).replace("Z",""),v=k.path(W,M),N=u(b),B=k.path(N,{...M}),C=r.insert("g",":first-child");return C.insert(()=>B,":first-child").attr("stroke-opacity",0),C.insert(()=>D,":first-child"),C.insert(()=>v,":first-child"),C.attr("class","text"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(${p-p/4}, 0)`),s.attr("transform",`translate(${-g/2+(e.padding??0)/2-(n.x-(n.left??0))},${-w/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,C),e.intersect=function(t){return P.polygon(e,b,t)},r}async function K(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(20,(o.width+2*n)*1.25,e?.width??0),w=Math.max(5,o.height+2*s,e?.height??0),m=w/2,{cssStyles:x}=e,$=d.Z.svg(h),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=g-m,M=w/4,S=[{x:k,y:0},{x:M,y:0},{x:0,y:w/2},{x:M,y:w},{x:k,y:w},...p(-k,-w/2,m,50,270,90)],D=u(S),W=$.path(D,b),v=h.insert(()=>W,":first-child");return v.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",l),v.attr("transform",`translate(${-g/2}, ${-w/2})`),y(e,v),e.intersect=function(t){return P.polygon(e,S,t)},h}(0,h.eW)(I,"anchor"),(0,h.eW)(L,"generateArcPoints"),(0,h.eW)(Z,"calculateArcSagitta"),(0,h.eW)(G,"bowTieRect"),(0,h.eW)(U,"insertPolygonShape"),(0,h.eW)(T,"card"),(0,h.eW)(E,"choice"),(0,h.eW)(H,"circle"),(0,h.eW)(V,"createLine"),(0,h.eW)(X,"crossedCircle"),(0,h.eW)(Y,"generateCirclePoints"),(0,h.eW)(j,"curlyBraceLeft"),(0,h.eW)(O,"generateCirclePoints"),(0,h.eW)(F,"curlyBraceRight"),(0,h.eW)(z,"generateCirclePoints"),(0,h.eW)(J,"curlyBraces"),(0,h.eW)(K,"curvedTrapezoid");var Q=(0,h.eW)((t,e,a,l,i,r)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),tt=(0,h.eW)((t,e,a,l,i,r)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),te=(0,h.eW)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function ta(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?24:s,o="neo"===e.look?24:s;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-o,e.width<8&&(e.width=8),e.height=(e.height??0)-h-t/2/(2.5+t/50)*3,e.height<8&&(e.height=8)}let{shapeSvg:g,bbox:u,label:w}=await c(t,e,f(e)),p=(e.width?e.width:u.width)+o,m=p/2,x=m/(2.5+p/50),$=(e.height?e.height:u.height)+h+x,{cssStyles:b}=e;if("handDrawn"===e.look){let t=d.Z.svg(g),l=tt(0,0,p,$,m,x),r=te(0,x,p,$,m,x),n=(0,i._q)(e,{}),s=t.path(l,n),h=t.path(r,(0,i._q)(e,{fill:"none"}));a=g.insert(()=>h,":first-child"),(a=g.insert(()=>s,":first-child")).attr("class","basic label-container"),b&&a.attr("style",b)}else{let t=Q(0,0,p,$,m,x);a=g.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,n.R7)(b)).attr("style",r)}return a.attr("label-offset-y",x),a.attr("transform",`translate(${-p/2}, ${-($/2+x)})`),y(e,a),w.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=m&&(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-x)){let i=x*x*(1-l*l/(m*m));i>0&&(i=Math.sqrt(i)),i=x-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},g}async function tl(t,e,a){let l;let{labelStyles:r,nodeStyles:s}=(0,i.UG)(e);e.labelStyle=r;let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+2*a.labelPaddingX,e?.width||0),u=Math.max(o.height+2*a.labelPaddingY,e?.height||0),w=-g/2,p=-u/2,{rx:m,ry:x}=e,{cssStyles:$}=e;if(a?.rx&&a.ry&&(m=a.rx,x=a.ry),"handDrawn"===e.look){let t=d.Z.svg(h),a=(0,i._q)(e,{}),r=m||x?t.path(b(w,p,g,u,m||0),a):t.rectangle(w,p,g,u,a);(l=h.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)($))}else(l=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.R7)(m)).attr("ry",(0,n.R7)(x)).attr("x",w).attr("y",p).attr("width",g).attr("height",u);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 ti(t,e){let{cssClasses:a,labelPaddingX:l,labelPaddingY:r,padding:n,width:s,height:h}=e,o=await tl(t,e,{rx:0,ry:0,classes:a??"",labelPaddingX:l??(n??0)*2,labelPaddingY:r??n??0});if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,i._q)(e,{}),l=o.select(".basic.label-container > path:nth-child(2)"),r=l.node();if(!r)return o;let n=null;return r instanceof SVGGraphicsElement&&(n=r.getBBox(),o.insert(()=>t.line(n.x,n.y,n.x+n.width,n.y,a),".basic.label-container g.label"),o.insert(()=>t.line(n.x,n.y+n.height,n.x+n.width,n.y+n.height,a),".basic.label-container g.label"),l.remove()),o}let c=o.select(".basic.label-container"),g=(Number(c.attr("width"))||s)??0,y=(Number(c.attr("height"))||h)??0;return g>0&&y>0&&c.attr("stroke-dasharray",`${g} ${y}`),o}async function tr(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=h.width+r,u=h.height+n,w=.2*u,p=-g/2,m=-u/2-w/2,{cssStyles:x}=e,$=d.Z.svg(s),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=$.polygon([{x:p,y:m+w},{x:-p,y:m+w},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+w}].map(t=>[t.x,t.y]),b),M=s.insert(()=>k,":first-child");return M.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",x),l&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",l),o.attr("transform",`translate(${p+(e.padding??0)/2-(h.x-(h.left??0))}, ${m+w+(e.padding??0)/2-(h.y-(h.top??0))})`),y(e,M),e.intersect=function(t){return P.rect(e,t)},s}async function tn(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e),s="neo"===e.look?12:5;e.labelStyle=l;let o=e.padding??0,g="neo"===e.look?16:o,{shapeSvg:u,bbox:w}=await c(t,e,f(e)),p=(e?.width?e?.width/2:w.width/2)+(g??0),m=p-s,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.Z.svg(u),l=(0,i._q)(e,{roughness:.2,strokeWidth:2.5}),r=(0,i._q)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*p,l),h=t.circle(0,0,2*m,r);(a=u.insert("g",":first-child")).attr("class",(0,n.R7)(e.cssClasses)).attr("style",(0,n.R7)(x)),a.node()?.appendChild(s),a.node()?.appendChild(h)}else{let t=(a=u.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",r),t.attr("class","outer-circle").attr("style",r).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",r).attr("r",m).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)},u}function ts(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.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,i._q)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let u=o.circle(0,0,14,g),w=n.insert(()=>u,":first-child");return w.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",s),r&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",r),y(e,w),e.intersect=function(t){return h.cM.info("filledCircle intersect",e,{radius:7,point:t}),P.circle(e,7,t)},n}async function th(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?2*r:r;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-n-n/2,e.width<10&&(e.width=10));let{shapeSvg:s,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width?e?.width:o.width)+(n??0),p=e?.height?e?.height:w+o.height,m=[{x:0,y:-p},{x:p,y:-p},{x:p/2,y:0}],{cssStyles:x}=e,$=d.Z.svg(s),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=u(m),M=$.path(k,b),S=s.insert(()=>M,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),e.width=w,e.height=p,y(e,S),g.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-p/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return h.cM.info("Triangle intersect",e,m,t),P.polygon(e,m,t)},s}function to(t,e,{dir:a,config:{state:l,themeVariables:r}}){let{nodeStyles:n}=(0,i.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,u=-1*c/2,w=d.Z.svg(s),p=(0,i._q)(e,{stroke:r.lineColor,fill:r.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let m=w.rectangle(g,u,o,c,p),x=s.insert(()=>m,":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 $=l?.padding??0;return e.width&&e.height&&(e.width+=$/2||0,e.height+=$/2||0),e.intersect=function(t){return P.rect(e,t)},s}async function td(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*n,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*r,e.width<15&&(e.width=15));let{shapeSvg:s,bbox:o}=await c(t,e,f(e)),g=(e?.width?e?.width:Math.max(15,o.width))+2*r,w=(e?.height?e?.height:Math.max(10,o.height))+2*n,m=w/2,{cssStyles:x}=e,$=d.Z.svg(s),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-g/2,y:-w/2},{x:g/2-m,y:-w/2},...p(-g/2+m,0,m,50,90,270),{x:g/2-m,y:w/2},{x:-g/2,y:w/2}],M=u(k),S=$.path(M,b),D=s.insert(()=>S,":first-child");return D.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),y(e,D),e.intersect=function(t){return h.cM.info("Pill intersect",e,{radius:m,point:t}),P.polygon(e,k,t)},s}(0,h.eW)(ta,"cylinder"),(0,h.eW)(tl,"drawRect"),(0,h.eW)(ti,"datastore"),(0,h.eW)(tr,"dividedRectangle"),(0,h.eW)(tn,"doublecircle"),(0,h.eW)(ts,"filledCircle"),(0,h.eW)(th,"flippedTriangle"),(0,h.eW)(to,"forkJoin"),(0,h.eW)(td,"halfRoundedRectangle");var tc=(0,h.eW)((t,e,a,l,i)=>`M${t+i},${e} L${t+a-i},${e} L${t+a},${e-l/2} L${t+a-i},${e-l} L${t+i},${e-l} L${t},${e-l/2} Z`,"createHexagonPathD");async function tg(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e),n="neo"===e.look?3.5:4;e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?70:s,o="neo"===e.look?32:s;if(e.width||e.height){let t=e.height??0;e.width=(e?.width??0)-t/n*2-o,e.height=(e.height??0)-h}let{shapeSvg:g,bbox:u}=await c(t,e,f(e)),w=(e?.height?e?.height:u.height)+h,p=w/n,m=(e?.width?e?.width:u.width)+2*p+o,x=[{x:p,y:0},{x:m-p,y:0},{x:m,y:-w/2},{x:m-p,y:-w},{x:p,y:-w},{x:0,y:-w/2}],{cssStyles:$}=e;if("handDrawn"===e.look){let t=d.Z.svg(g),l=(0,i._q)(e,{}),r=tc(0,0,m,w,p),n=t.path(r,l);a=g.insert(()=>n,":first-child").attr("transform",`translate(${-m/2}, ${w/2})`),$&&a.attr("style",$)}else a=U(g,m,w,x);return r&&a.attr("style",r),e.width=m,e.height=w,y(e,a),e.intersect=function(t){return P.polygon(e,x,t)},g}async function ty(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.label="",e.labelStyle=a;let{shapeSvg:r}=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(r),w=(0,i._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let p=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],m=u(p),x=g.path(m,w),$=r.insert(()=>x,":first-child");return $.attr("class","basic label-container outer-path"),o&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",l),$.attr("transform",`translate(${-n/2}, ${-s/2})`),y(e,$),e.intersect=function(t){return h.cM.info("Pill intersect",e,{points:p}),P.polygon(e,p,t)},r}async function tf(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.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:u}=await c(t,e,"icon-shape default"),w="t"===e.pos,{nodeBorder:p}=a,{stylesMap:m}=(0,i.dT)(e),x=-s/2,$=-s/2,b=e.label?8:0,k=d.Z.svg(g),M=(0,i._q)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(x,$,s,s,M),D=Math.max(s,f.width),W=s+f.height+b,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"transparent",stroke:"none"}),N=g.insert(()=>S,":first-child"),B=g.insert(()=>v);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${w?f.height/2+b/2-i/2-h:-f.height/2-b/2-i/2-h})`),t.attr("style",`color: ${m.get("stroke")??p};`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${w?-W/2:W/2-f.height})`),N.attr("transform",`translate(0,${w?f.height/2+b/2:-f.height/2-b/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,i=e.height??0,r=[];return r=w?[{x:a-f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2+f.height+b},{x:a+s/2,y:l-i/2+f.height+b},{x:a+s/2,y:l+i/2},{x:a-s/2,y:l+i/2},{x:a-s/2,y:l-i/2+f.height+b},{x:a-f.width/2,y:l-i/2+f.height+b}]:[{x:a-s/2,y:l-i/2},{x:a+s/2,y:l-i/2},{x:a+s/2,y:l-i/2+s},{x:a+f.width/2,y:l-i/2+s},{x:a+f.width/2/2,y:l+i/2},{x:a-f.width/2,y:l+i/2},{x:a-f.width/2,y:l-i/2+s},{x:a-s/2,y:l-i/2+s}],P.polygon(e,r,t)},g}async function tu(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.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:u}=await c(t,e,"icon-shape default"),w=e.label?8:0,p="t"===e.pos,{nodeBorder:m,mainBkg:x}=a,{stylesMap:$}=(0,i.dT)(e),b=d.Z.svg(g),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$.get("fill");k.stroke=M??x;let S=g.append("g");e.icon&&S.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let D=S.node().getBBox(),W=D.width,v=D.height,N=D.x,B=D.y,C=Math.max(W,v)*Math.SQRT2+40,A=b.circle(0,0,C,k),_=Math.max(C,f.width),q=C+f.height+w,R=b.rectangle(-_/2,-q/2,_,q,{...k,fill:"transparent",stroke:"none"}),I=g.insert(()=>A,":first-child"),L=g.insert(()=>R);return S.attr("transform",`translate(${-W/2-N},${p?f.height/2+w/2-v/2-B:-f.height/2-w/2-v/2-B})`),S.attr("style",`color: ${$.get("stroke")??m};`),u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-q/2:q/2-f.height})`),I.attr("transform",`translate(0,${p?f.height/2+w/2:-f.height/2-w/2})`),y(e,L),e.intersect=function(t){return h.cM.info("iconSquare intersect",e,t),P.rect(e,t)},g}async function tw(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.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:u,label:w}=await c(t,e,"icon-shape default"),p="t"===e.pos,m=s+2*u,x=s+2*u,{nodeBorder:$,mainBkg:k}=a,{stylesMap:M}=(0,i.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??k;let N=D.path(b(-x/2,-m/2,x,m,5),W),B=Math.max(x,f.width),C=m+f.height+S,A=D.rectangle(-B/2,-C/2,B,C,{...W,fill:"transparent",stroke:"none"}),_=g.insert(()=>N,":first-child").attr("class","icon-shape2"),q=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${p?f.height/2+S/2-i/2-h:-f.height/2-S/2-i/2-h})`),t.attr("style",`color: ${M.get("stroke")??$};`)}return w.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-C/2:C/2-f.height})`),_.attr("transform",`translate(0,${p?f.height/2+S/2:-f.height/2-S/2})`),y(e,q),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,i=e.height??0,r=[];return r=p?[{x:a-f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2+f.height+S},{x:a+x/2,y:l-i/2+f.height+S},{x:a+x/2,y:l+i/2},{x:a-x/2,y:l+i/2},{x:a-x/2,y:l-i/2+f.height+S},{x:a-f.width/2,y:l-i/2+f.height+S}]:[{x:a-x/2,y:l-i/2},{x:a+x/2,y:l-i/2},{x:a+x/2,y:l-i/2+m},{x:a+f.width/2,y:l-i/2+m},{x:a+f.width/2/2,y:l+i/2},{x:a-f.width/2,y:l+i/2},{x:a-f.width/2,y:l-i/2+m},{x:a-x/2,y:l-i/2+m}],P.polygon(e,r,t)},g}async function tp(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,i.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:u,label:w}=await c(t,e,"icon-shape default"),p="t"===e.pos,m=s+2*u,x=s+2*u,{nodeBorder:$,mainBkg:k}=a,{stylesMap:M}=(0,i.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,i._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??k;let N=D.path(b(-x/2,-m/2,x,m,.1),W),B=Math.max(x,f.width),C=m+f.height+S,A=D.rectangle(-B/2,-C/2,B,C,{...W,fill:"transparent",stroke:"none"}),_=g.insert(()=>N,":first-child"),q=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,r.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${p?f.height/2+S/2-i/2-h:-f.height/2-S/2-i/2-h})`),t.attr("style",`color: ${M.get("stroke")??$};`)}return w.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-C/2:C/2-f.height})`),_.attr("transform",`translate(0,${p?f.height/2+S/2:-f.height/2-S/2})`),y(e,q),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,i=e.height??0,r=[];return r=p?[{x:a-f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2},{x:a+f.width/2,y:l-i/2+f.height+S},{x:a+x/2,y:l-i/2+f.height+S},{x:a+x/2,y:l+i/2},{x:a-x/2,y:l+i/2},{x:a-x/2,y:l-i/2+f.height+S},{x:a-f.width/2,y:l-i/2+f.height+S}]:[{x:a-x/2,y:l-i/2},{x:a+x/2,y:l-i/2},{x:a+x/2,y:l-i/2+m},{x:a+f.width/2,y:l-i/2+m},{x:a+f.width/2/2,y:l+i/2},{x:a-f.width/2,y:l+i/2},{x:a-f.width/2,y:l-i/2+m},{x:a-x/2,y:l-i/2+m}],P.polygon(e,r,t)},g}async function tm(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let r=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=r/n;let{labelStyles:s}=(0,i.UG)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let g=Math.max(e.label?o??0:0,e?.assetWidth??r),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:g,u="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(f,o??0);let{shapeSvg:w,bbox:p,label:m}=await c(t,e,"image-shape default"),x="t"===e.pos,$=-f/2,b=e.label?8:0,k=d.Z.svg(w),M=(0,i._q)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle($,-u/2,f,u,M),D=Math.max(f,p.width),W=u+p.height+b,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"none",stroke:"none"}),N=w.insert(()=>S,":first-child"),B=w.insert(()=>v);if(e.img){let t=w.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",u),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${x?W/2-u:-W/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-u/2-p.height/2-b/2:u/2-p.height/2+b/2})`),N.attr("transform",`translate(0,${x?p.height/2+b/2:-p.height/2-b/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,i=e.height??0,r=[];return r=x?[{x:a-p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2+p.height+b},{x:a+f/2,y:l-i/2+p.height+b},{x:a+f/2,y:l+i/2},{x:a-f/2,y:l+i/2},{x:a-f/2,y:l-i/2+p.height+b},{x:a-p.width/2,y:l-i/2+p.height+b}]:[{x:a-f/2,y:l-i/2},{x:a+f/2,y:l-i/2},{x:a+f/2,y:l-i/2+u},{x:a+p.width/2,y:l-i/2+u},{x:a+p.width/2/2,y:l+i/2},{x:a-p.width/2,y:l+i/2},{x:a-p.width/2,y:l-i/2+u},{x:a-f/2,y:l-i/2+u}],P.polygon(e,r,t)},w}async function tx(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+(s??0)*2,e?.width??0),w=Math.max(o.height+(n??0)*2,e?.height??0),p=[{x:0,y:0},{x:g,y:0},{x:g+3*w/6,y:-w},{x:-3*w/6,y:-w}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(h),l=(0,i._q)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-g/2}, ${w/2})`),m&&a.attr("style",m)}else a=U(h,g,w,p);return r&&a.attr("style",r),e.width=g,e.height=w,y(e,a),e.intersect=function(t){return P.polygon(e,p,t)},h}async function t$(t,e){let{shapeSvg:a,bbox:l,label:i}=await c(t,e,"label"),r=a.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),y(e,r),e.intersect=function(t){return P.rect(e,t)},a}async function tb(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height??o.height)+n,w=(e?.width??o.width)+s,p=[{x:0,y:0},{x:w+3*g/6,y:0},{x:w,y:-g},{x:-(3*g)/6,y:-g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(h),l=(0,i._q)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${g/2})`),m&&a.attr("style",m)}else a=U(h,w,g,p);return r&&a.attr("style",r),e.width=w,e.height=g,y(e,a),e.intersect=function(t){return P.polygon(e,p,t)},h}async function tk(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height??o.height)+n,w=(e?.width??o.width)+s,p=[{x:-3*g/6,y:0},{x:w,y:0},{x:w+3*g/6,y:-g},{x:0,y:-g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(h),l=(0,i._q)(e,{}),r=u(p),n=t.path(r,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-w/2}, ${g/2})`),m&&a.attr("style",m)}else a=U(h,w,g,p);return r&&a.attr("style",r),e.width=w,e.height=g,y(e,a),e.intersect=function(t){return P.polygon(e,p,t)},h}function tM(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.label="",e.labelStyle=a;let r=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(r),w=(0,i._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let p=u(c),m=g.path(p,w),x=r.insert(()=>m,":first-child");return x.attr("class","outer-path"),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)},r}(0,h.eW)(tg,"hexagon"),(0,h.eW)(ty,"hourglass"),(0,h.eW)(tf,"icon"),(0,h.eW)(tu,"iconCircle"),(0,h.eW)(tw,"iconRounded"),(0,h.eW)(tp,"iconSquare"),(0,h.eW)(tm,"imageSquare"),(0,h.eW)(tx,"inv_trapezoid"),(0,h.eW)(t$,"labelRect"),(0,h.eW)(tb,"lean_left"),(0,h.eW)(tk,"lean_right"),(0,h.eW)(tM,"lightningBolt");var tS=(0,h.eW)((t,e,a,l,i,r,n)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createCylinderPathD"),tD=(0,h.eW)((t,e,a,l,i,r,n)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tW=(0,h.eW)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tv(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let s=e.padding??0,h="neo"===e.look?16:s,o="neo"===e.look?24:s;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-h,e.width<10&&(e.width=10),e.height=(e.height??0)-o-t/2/(2.5+t/50)*3,e.height<10&&(e.height=10)}let{shapeSvg:g,bbox:u,label:w}=await c(t,e,f(e)),p=(e?.width?e?.width:u.width)+2*h,m=p/2,x=m/(2.5+p/50),$=(e?.height?e?.height:u.height)+x+2*o,b=.1*$,{cssStyles:k}=e;if("handDrawn"===e.look){let t=d.Z.svg(g),l=tD(0,0,p,$,m,x,b),r=tW(0,x,p,$,m,x),n=(0,i._q)(e,{}),s=t.path(l,n),h=t.path(r,n);g.insert(()=>h,":first-child").attr("class","line"),(a=g.insert(()=>s,":first-child")).attr("class","basic label-container"),k&&a.attr("style",k)}else{let t=tS(0,0,p,$,m,x,b);a=g.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,n.R7)(k)).attr("style",r)}return a.attr("label-offset-y",x),a.attr("transform",`translate(${-p/2}, ${-($/2+x)})`),y(e,a),w.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+x-(u.y-(u.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=m&&(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-x)){let i=x*x*(1-l*l/(m*m));i>0&&(i=Math.sqrt(i)),i=x-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},g}async function tN(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;if(e.width||e.height){let t=e.width;e.width=(t??0)*10/11-2*n,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}let{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),u=(e?.width?e?.width:o.width)+(n??0)*2,p=(e?.height?e?.height:o.height)+(s??0)*2,m="neo"===e.look?p/4:p/8,x=p+m,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-u/2-u/2*.1,y:-x/2},{x:-u/2-u/2*.1,y:x/2},...w(-u/2-u/2*.1,x/2,u/2+u/2*.1,x/2,m,.8),{x:u/2+u/2*.1,y:-x/2},{x:-u/2-u/2*.1,y:-x/2},{x:-u/2,y:-x/2},{x:-u/2,y:x/2*1.1},{x:-u/2,y:-x/2}],S=b.polygon(M.map(t=>[t.x,t.y]),k),D=h.insert(()=>S,":first-child");return D.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(0,${-m/2})`),g.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*.1/2-(o.x-(o.left??0))},${-p/2+(e.padding??0)-m/2-(o.y-(o.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,M,t)},h}async function tB(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,h="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-2*h,10),e.height=Math.max((e?.height??0)-2*s-2*h,10));let{shapeSvg:o,bbox:g,label:w}=await c(t,e,f(e)),p=(e?.width?e?.width:g.width)+2*n+2*h,x=(e?.height?e?.height:g.height)+2*s+2*h,$=p-2*h,b=x-2*h,k=-$/2,M=-b/2,{cssStyles:S}=e,D=d.Z.svg(o),W=(0,i._q)(e,{}),v=[{x:k-h,y:M+h},{x:k-h,y:M+b+h},{x:k+$-h,y:M+b+h},{x:k+$-h,y:M+b},{x:k+$,y:M+b},{x:k+$,y:M+b-h},{x:k+$+h,y:M+b-h},{x:k+$+h,y:M-h},{x:k+h,y:M-h},{x:k+h,y:M},{x:k,y:M},{x:k,y:M+h}];"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let N=u(v),B=D.path(N,W),C=u([{x:k,y:M+h},{x:k+$-h,y:M+h},{x:k+$-h,y:M+b},{x:k+$,y:M+b},{x:k+$,y:M},{x:k,y:M}]),A=D.path(C,W);"handDrawn"!==e.look&&(B=m(B),A=m(A));let _=o.insert("g",":first-child");return _.insert(()=>B),_.insert(()=>A),_.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",S),l&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",l),w.attr("transform",`translate(${-(g.width/2)-h-(g.x-(g.left??0))}, ${-(g.height/2)+h-(g.y-(g.top??0))})`),y(e,_),e.intersect=function(t){return P.polygon(e,v,t)},o}async function tC(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await c(t,e,f(e)),h=e.padding??0,o="neo"===e.look?16:h,g="neo"===e.look?12:h,p=!0;(e.width||e.height)&&(p=!1,e.width=(e?.width??0)-2*o,e.height=(e?.height??0)-3*g);let m=Math.max(n.width,e?.width??0)+2*o,x=Math.max(n.height,e?.height??0)+3*g,$="neo"===e.look?x/4:x/8,b=x+(p?$/2:-$/2),k=-m/2,M=-b/2,{cssStyles:S}=e,D=w(k-10,M+b+10,k+m-10,M+b+10,$,.8),W=D?.[D.length-1],v=[{x:k-10,y:M+10},{x:k-10,y:M+b+10},...D,{x:k+m-10,y:W.y-10},{x:k+m,y:W.y-10},{x:k+m,y:W.y-20},{x:k+m+10,y:W.y-20},{x:k+m+10,y:M-10},{x:k+10,y:M-10},{x:k+10,y:M},{x:k,y:M},{x:k,y:M+10}],N=[{x:k,y:M+10},{x:k+m-10,y:M+10},{x:k+m-10,y:W.y-10},{x:k+m,y:W.y-10},{x:k+m,y:M},{x:k,y:M}],B=d.Z.svg(r),C=(0,i._q)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let A=u(v),_=B.path(A,C),q=u(N),R=B.path(q,C),I=r.insert(()=>_,":first-child");return I.insert(()=>R),I.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",S),l&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",l),I.attr("transform",`translate(0,${-$/2})`),s.attr("transform",`translate(${-(n.width/2)-10-(n.x-(n.left??0))}, ${-(n.height/2)+10-$/2-(n.y-(n.top??0))})`),y(e,I),e.intersect=function(t){return P.polygon(e,v,t)},r}async function tA(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l,e.useHtmlLabels||(0,s._X)((0,s.iE)())||(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),u=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:w}=e,p=d.Z.svg(n),m=(0,i._q)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=p.rectangle(-g/2,-u/2,g,u,m),$=n.insert(()=>x,":first-child");return $.attr("class","basic label-container outer-path"),o.attr("class","label noteLabel"),w&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",w),r&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",r),o.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,$),e.intersect=function(t){return P.rect(e,t)},n}(0,h.eW)(tv,"linedCylinder"),(0,h.eW)(tN,"linedWaveEdgedRect"),(0,h.eW)(tB,"multiRect"),(0,h.eW)(tC,"multiWaveEdgedRectangle"),(0,h.eW)(tA,"note");var t_=(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 tq(t,e){let a;let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+(e.padding??0)+(s.height+(e.padding??0)),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,i._q)(e,{}),r=t_(0,0,h),s=t.path(r,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),g&&a.attr("style",g)}else(a=U(n,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return r&&a.attr("style",r),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 tR(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?21:r??0,s="neo"===e.look?12:r??0,{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width??o.width)+("neo"===e.look?2*n:n),p=(e?.height??o.height)+("neo"===e.look?2*s:s),m=-w/2,x=-p/2,$=x/2,b=[{x:m+$,y:x},{x:m,y:0},{x:m+$,y:-x},{x:-m,y:-x},{x:-m,y:x}],{cssStyles:k}=e,M=d.Z.svg(h),S=(0,i._q)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let D=u(b),W=M.path(D,S),v=h.insert(()=>W,":first-child");return v.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",k),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${-$/2},0)`),g.attr("transform",`translate(${-$/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),y(e,v),e.intersect=function(t){return P.polygon(e,b,t)},h}async function tP(t,e){let a,l,r;let{labelStyles:n,nodeStyles:c}=(0,i.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"),u=g.insert("g").attr("class","label").attr("style",c),w=e.description,p=e.label,m=await $(u,p,e.labelStyle,!0,!0),x={width:0,height:0};if((0,s._X)((0,s.nV)())){let t=m.children[0],e=(0,o.Ys)(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}h.cM.info("Text 2",w);let k=w||[],M=m.getBBox(),S=await $(u,Array.isArray(k)?k.join("<br/>"):k,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)(m).attr("transform","translate( "+(x.width<M.width?0:-(M.width-x.width)/2)+", 0)"),x=u.node().getBBox(),u.attr("transform","translate("+-x.width/2+", "+(-x.height/2-v+3)+")");let N=x.width+(e.padding||0),B=x.height+(e.padding||0),C=-x.width/2-v,A=-x.height/2-v;if("handDrawn"===e.look){let t=d.Z.svg(g),a=(0,i._q)(e,{}),n=t.path(b(C,A,N,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);r=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"),r=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)),r.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}async function tI(t,e,{config:{themeVariables:a}}){let l=a?.radius??5,i={rx:l,ry:l,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return tl(t,e,i)}async function tL(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0,{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),u=(e?.width??o.width)+2*r+("neo"===e.look?8:16),w=(e?.height??o.height)+2*s,p=u-8,m=8-u/2,x=-w/2,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=b.polygon([{x:m,y:x},{x:m+p,y:x},{x:m+p,y:x+w},{x:m-8,y:x+w},{x:m-8,y:x},{x:m,y:x},{x:m,y:x+w}].map(t=>[t.x,t.y]),k),S=h.insert(()=>M,":first-child");return S.attr("class","basic label-container outer-path").attr("style",(0,n.R7)($)),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),$&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),g.attr("transform",`translate(${4-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),y(e,S),e.intersect=function(t){return P.rect(e,t)},h}async function tZ(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));let{shapeSvg:h,bbox:o,label:g}=await c(t,e,f(e)),w=(e?.width?e?.width:o.width)+2*n,p=((e?.height?e?.height:o.height)+2*s)*1.5/1.5,m=-w/2,x=-p/2,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:m,y:x},{x:m,y:x+p},{x:m+w,y:x+p},{x:m+w,y:x-p/2}],S=u(M),D=b.path(S,k),W=h.insert(()=>D,":first-child");return W.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",$),l&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",l),W.attr("transform",`translate(0, ${p/4})`),g.attr("transform",`translate(${-w/2+(e.padding??0)-(o.x-(o.left??0))}, ${-p/4+(e.padding??0)-(o.y-(o.top??0))})`),y(e,W),e.intersect=function(t){return P.polygon(e,M,t)},h}async function tG(t,e){let a=e.padding??0,l="neo"===e.look?16:2*a,i="neo"===e.look?12:a,r={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??l,labelPaddingY:i};return tl(t,e,r)}async function tU(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?20:r,s="neo"===e.look?12:r,{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=o.height+("neo"===e.look?2*s:s),w=o.width+g/4+("neo"===e.look?2*n:n),m=g/2,{cssStyles:x}=e,$=d.Z.svg(h),b=(0,i._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-w/2+m,y:-g/2},{x:w/2-m,y:-g/2},...p(-w/2+m,0,m,50,90,270),{x:w/2-m,y:g/2},...p(w/2-m,0,m,50,270,450)],M=u(k),S=$.path(M,b),D=h.insert(()=>S,":first-child");return D.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),y(e,D),e.intersect=function(t){return P.polygon(e,k,t)},h}async function tT(t,e){let a={rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"};return tl(t,e,a)}function tE(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:o,nodeShadow:c}=a;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let g=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),f=d.Z.svg(g),u=(0,i._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let w=f.circle(0,0,e.width,{...u,stroke:s,strokeWidth:2}),p=h??o,m=(e.width??0)*5/14,x=f.circle(0,0,m,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),$=g.insert(()=>w,":first-child");if($.insert(()=>x),"handDrawn"!==e.look&&$.attr("class","outer-path"),n&&$.selectAll("path").attr("style",n),r&&$.selectAll("path").attr("style",r),e.width<25&&c&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";$.attr("style",`filter:url(#${a})`)}return y(e,$),e.intersect=function(t){return P.circle(e,(e.width??0)/2,t)},g}function tH(t,e,{config:{themeVariables:a}}){let l;let{lineColor:r,nodeShadow:n}=a;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=d.Z.svg(s).circle(0,0,e.width,(0,i.TA)(r));(l=s.insert(()=>t)).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else(l=s.insert("circle",":first-child")).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&n&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";l.attr("style",`filter:url(#${a})`)}return y(e,l),e.intersect=function(t){return P.circle(e,(e.width??7)/2,t)},s}async function tV(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e?.padding??8,s="neo"===e.look?28:r,h="neo"===e.look?12:r,{shapeSvg:o,bbox:g}=await c(t,e,f(e)),u=(e?.width??g.width)+16+s,w=(e?.height??g.height)+h,p=u-16,m=-u/2,x=-w/2,$=[{x:0,y:0},{x:p,y:0},{x:p,y:-w},{x:0,y:-w},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-w},{x:-8,y:-w},{x:-8,y:0}];if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,i._q)(e,{}),l=t.rectangle(m,x,p+16,w,a),r=t.line(m+8,x,m+8,x+w,a),s=t.line(m+8+p,x,m+8+p,x+w,a);o.insert(()=>r,":first-child"),o.insert(()=>s,":first-child");let h=o.insert(()=>l,":first-child"),{cssStyles:c}=e;h.attr("class","basic label-container").attr("style",(0,n.R7)(c)),y(e,h)}else{let t=U(o,p,w,$);l&&t.attr("style",l),y(e,t)}return e.intersect=function(t){return P.polygon(e,$,t)},o}async function tX(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*n-.2*(e.height+2*s),10));let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=(e?.height?e?.height:o.height)+2*s,w=.2*g,p=(e?.width?e?.width:o.width)+2*n+w-w,m=-p/2,x=-g/2,{cssStyles:$}=e,b=d.Z.svg(h),k=(0,i._q)(e,{}),M=[{x:m-w/2,y:x},{x:m+p+w/2,y:x},{x:m+p+w/2,y:x+g},{x:m-w/2,y:x+g}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=u(M),D=b.path(S,k),W=u([{x:m+p-w/2,y:x+g},{x:m+p+w/2,y:x+g},{x:m+p+w/2,y:x+g-.2*g}]),v=b.path(W,{...k,fillStyle:"solid"}),N=h.insert(()=>v,":first-child");return N.insert(()=>D,":first-child"),N.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",$),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),y(e,N),e.intersect=function(t){return P.polygon(e,M,t)},h}async function tY(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,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,p=.2*h,m=.2*o,x=o+g,{cssStyles:$}=e,b=d.Z.svg(r),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-h/2*.1,y:x/2},...w(-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*m,W=[{x:S+h-p,y:(D+o)*1.3},{x:S+h,y:D+o-m},{x:S+h,y:(D+o)*.9},...w(S+h,(D+o)*1.25,S+h-p,(D+o)*1.3,-(.02*o),.5)],v=u(M),N=b.path(v,k),B=u(W),C=b.path(B,{...k,fillStyle:"solid"}),A=r.insert(()=>C,":first-child");return A.insert(()=>N,":first-child"),A.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",$),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)},r}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0),e?.width||0),h=Math.max(n.height+(e.padding??0),e?.height||0),o=r.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)},r}(0,h.eW)(tq,"question"),(0,h.eW)(tR,"rect_left_inv_arrow"),(0,h.eW)(tP,"rectWithTitle"),(0,h.eW)(tI,"roundedRect"),(0,h.eW)(tL,"shadedProcess"),(0,h.eW)(tZ,"slopedRect"),(0,h.eW)(tG,"squareRect"),(0,h.eW)(tU,"stadium"),(0,h.eW)(tT,"state"),(0,h.eW)(tE,"stateEnd"),(0,h.eW)(tH,"stateStart"),(0,h.eW)(tV,"subroutine"),(0,h.eW)(tX,"taggedRect"),(0,h.eW)(tY,"taggedWaveEdgedRectangle"),(0,h.eW)(tj,"text");var tO=(0,h.eW)((t,e,a,l,i,r)=>`M${t},${e}
3
3
  a${i},${r} 0,0,1 0,${-l}
4
4
  l${a},0
@@ -0,0 +1,5 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8216],{28216:function(t,e,a){a.d(e,{diagram:function(){return tR}});var n,i=a(13589),r=a(40778),s=a(49125),l=a(17632),o=a(68859),h=a(95612),d=function(){var t=(0,l.eW)(function(t,e,a,n){for(a=a||{},n=t.length;n--;a[t[n]]=e);return a},"o"),e=[1,24],a=[1,25],n=[1,26],i=[1,27],r=[1,28],s=[1,63],o=[1,64],h=[1,65],d=[1,66],u=[1,67],p=[1,68],y=[1,69],f=[1,29],b=[1,30],g=[1,31],x=[1,32],_=[1,33],m=[1,34],E=[1,35],A=[1,36],S=[1,37],C=[1,38],k=[1,39],O=[1,40],w=[1,41],T=[1,42],v=[1,43],R=[1,44],D=[1,45],N=[1,46],W=[1,47],P=[1,48],M=[1,50],B=[1,51],Y=[1,52],j=[1,53],I=[1,54],L=[1,55],U=[1,56],F=[1,57],X=[1,58],z=[1,59],Q=[1,60],$=[14,42],q=[14,34,36,37,38,39,40,41,42,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,69,70,71,72,73,74],V=[12,14,34,36,37,38,39,40,41,42,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,69,70,71,72,73,74],H=[1,82],G=[1,83],K=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],te=[12,14,33,42,76,77,79,80],ta=[12,33],tn=[34,36,37,38,39,40,41,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,69,70,71,72,73,74],ti={trace:(0,l.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:(0,l.eW)(function(t,e,a,n,i,r,s){var l=r.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(r[l-3]);break;case 19:n.setTitle(r[l].substring(6)),this.$=r[l].substring(6);break;case 20:n.setAccDescription(r[l].substring(15)),this.$=r[l].substring(15);break;case 21:this.$=r[l].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=r[l].trim(),n.setAccDescription(this.$);break;case 28:r[l].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 29:r[l].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 30:n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 31:r[l].splice(2,0,"CONTAINER"),n.addContainerBoundary(...r[l]),this.$=r[l];break;case 32:n.addDeploymentNode("node",...r[l]),this.$=r[l];break;case 33:n.addDeploymentNode("nodeL",...r[l]),this.$=r[l];break;case 34:n.addDeploymentNode("nodeR",...r[l]),this.$=r[l];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...r[l]),this.$=r[l];break;case 40:n.addPersonOrSystem("external_person",...r[l]),this.$=r[l];break;case 41:n.addPersonOrSystem("system",...r[l]),this.$=r[l];break;case 42:n.addPersonOrSystem("system_db",...r[l]),this.$=r[l];break;case 43:n.addPersonOrSystem("system_queue",...r[l]),this.$=r[l];break;case 44:n.addPersonOrSystem("external_system",...r[l]),this.$=r[l];break;case 45:n.addPersonOrSystem("external_system_db",...r[l]),this.$=r[l];break;case 46:n.addPersonOrSystem("external_system_queue",...r[l]),this.$=r[l];break;case 47:n.addContainer("container",...r[l]),this.$=r[l];break;case 48:n.addContainer("container_db",...r[l]),this.$=r[l];break;case 49:n.addContainer("container_queue",...r[l]),this.$=r[l];break;case 50:n.addContainer("external_container",...r[l]),this.$=r[l];break;case 51:n.addContainer("external_container_db",...r[l]),this.$=r[l];break;case 52:n.addContainer("external_container_queue",...r[l]),this.$=r[l];break;case 53:n.addComponent("component",...r[l]),this.$=r[l];break;case 54:n.addComponent("component_db",...r[l]),this.$=r[l];break;case 55:n.addComponent("component_queue",...r[l]),this.$=r[l];break;case 56:n.addComponent("external_component",...r[l]),this.$=r[l];break;case 57:n.addComponent("external_component_db",...r[l]),this.$=r[l];break;case 58:n.addComponent("external_component_queue",...r[l]),this.$=r[l];break;case 60:n.addRel("rel",...r[l]),this.$=r[l];break;case 61:n.addRel("birel",...r[l]),this.$=r[l];break;case 62:n.addRel("rel_u",...r[l]),this.$=r[l];break;case 63:n.addRel("rel_d",...r[l]),this.$=r[l];break;case 64:n.addRel("rel_l",...r[l]),this.$=r[l];break;case 65:n.addRel("rel_r",...r[l]),this.$=r[l];break;case 66:n.addRel("rel_b",...r[l]),this.$=r[l];break;case 67:r[l].splice(0,1),n.addRel("rel",...r[l]),this.$=r[l];break;case 68:n.updateElStyle("update_el_style",...r[l]),this.$=r[l];break;case 69:n.updateRelStyle("update_rel_style",...r[l]),this.$=r[l];break;case 70:n.updateLayoutConfig("update_layout_config",...r[l]),this.$=r[l];break;case 71:this.$=[r[l]];break;case 72:r[l].unshift(r[l-1]),this.$=r[l];break;case 73:case 75:this.$=r[l].trim();break;case 74:let o={};o[r[l-1].trim()]=r[l].trim(),this.$=o;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:Y,67:j,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{13:70,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:Y,67:j,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{13:71,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:Y,67:j,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{13:72,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:Y,67:j,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{13:73,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:Y,67:j,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{14:[1,74]},t($,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:o,37:h,38:d,39:u,40:p,41:y,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:Y,67:j,68:I,69:L,70:U,71:F,72:X,73:z,74:Q}),t($,[2,14]),t(q,[2,16],{12:[1,76]}),t($,[2,36],{12:[1,77]}),t(V,[2,19]),t(V,[2,20]),{25:[1,78]},{27:[1,79]},t(V,[2,23]),{35:80,75:81,76:H,77:G,79:K,80:J},{35:86,75:81,76:H,77:G,79:K,80:J},{35:87,75:81,76:H,77:G,79:K,80:J},{35:88,75:81,76:H,77:G,79:K,80:J},{35:89,75:81,76:H,77:G,79:K,80:J},{35:90,75:81,76:H,77:G,79:K,80:J},{35:91,75:81,76:H,77:G,79:K,80:J},{35:92,75:81,76:H,77:G,79:K,80:J},{35:93,75:81,76:H,77:G,79:K,80:J},{35:94,75:81,76:H,77:G,79:K,80:J},{35:95,75:81,76:H,77:G,79:K,80:J},{35:96,75:81,76:H,77:G,79:K,80:J},{35:97,75:81,76:H,77:G,79:K,80:J},{35:98,75:81,76:H,77:G,79:K,80:J},{35:99,75:81,76:H,77:G,79:K,80:J},{35:100,75:81,76:H,77:G,79:K,80:J},{35:101,75:81,76:H,77:G,79:K,80:J},{35:102,75:81,76:H,77:G,79:K,80:J},{35:103,75:81,76:H,77:G,79:K,80:J},{35:104,75:81,76:H,77:G,79:K,80:J},t(Z,[2,59]),{35:105,75:81,76:H,77:G,79:K,80:J},{35:106,75:81,76:H,77:G,79:K,80:J},{35:107,75:81,76:H,77:G,79:K,80:J},{35:108,75:81,76:H,77:G,79:K,80:J},{35:109,75:81,76:H,77:G,79:K,80:J},{35:110,75:81,76:H,77:G,79:K,80:J},{35:111,75:81,76:H,77:G,79:K,80:J},{35:112,75:81,76:H,77:G,79:K,80:J},{35:113,75:81,76:H,77:G,79:K,80:J},{35:114,75:81,76:H,77:G,79:K,80:J},{35:115,75:81,76:H,77:G,79:K,80:J},{20:116,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:Y,67:j,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{12:[1,118],33:[1,117]},{35:119,75:81,76:H,77:G,79:K,80:J},{35:120,75:81,76:H,77:G,79:K,80:J},{35:121,75:81,76:H,77:G,79:K,80:J},{35:122,75:81,76:H,77:G,79:K,80:J},{35:123,75:81,76:H,77:G,79:K,80:J},{35:124,75:81,76:H,77:G,79:K,80:J},{35:125,75:81,76:H,77:G,79:K,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t($,[2,15]),t(q,[2,17],{21:22,19:130,22:e,23:a,24:n,26:i,28:r}),t($,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:n,26:i,28:r,34:s,36:o,37:h,38:d,39:u,40:p,41:y,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:Y,67:j,68:I,69:L,70:U,71:F,72:X,73:z,74:Q}),t(V,[2,21]),t(V,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:H,77:G,79:K,80:J}),t(te,[2,73]),{78:[1,133]},t(te,[2,75]),t(te,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ta,[2,28]),t(ta,[2,29]),t(ta,[2,30]),t(ta,[2,31]),t(ta,[2,32]),t(ta,[2,33]),t(ta,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(q,[2,18]),t($,[2,38]),t(tt,[2,72]),t(te,[2,74]),t(Z,[2,24]),t(Z,[2,35]),t(tn,[2,25]),t(tn,[2,26],{12:[1,138]}),t(tn,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:(0,l.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=e,a}},"parseError"),parse:(0,l.eW)(function(t){var e=this,a=[0],n=[],i=[null],r=[],s=this.table,o="",h=0,d=0,u=0,p=r.slice.call(arguments,1),y=Object.create(this.lexer),f={yy:{}};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(f.yy[b]=this.yy[b]);y.setInput(t,f.yy),f.yy.lexer=y,f.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;r.push(g);var x=y.options&&y.options.ranges;function _(){var t;return"number"!=typeof(t=n.pop()||y.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.eW)(function(t){a.length=a.length-2*t,i.length=i.length-t,r.length=r.length-t},"popStack"),(0,l.eW)(_,"lex");for(var m,E,A,S,C,k,O,w,T,v={};;){if(A=a[a.length-1],this.defaultActions[A]?S=this.defaultActions[A]:(null==m&&(m=_()),S=s[A]&&s[A][m]),void 0===S||!S.length||!S[0]){var R="";for(k in T=[],s[A])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");R=y.showPosition?"Parse error on line "+(h+1)+":\n"+y.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(R,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:g,expected:T})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(S[0]){case 1:a.push(m),i.push(y.yytext),r.push(y.yylloc),a.push(S[1]),m=null,E?(m=E,E=null):(d=y.yyleng,o=y.yytext,h=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(O=this.productions_[S[1]][1],v.$=i[i.length-O],v._$={first_line:r[r.length-(O||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(O||1)].first_column,last_column:r[r.length-1].last_column},x&&(v._$.range=[r[r.length-(O||1)].range[0],r[r.length-1].range[1]]),void 0!==(C=this.performAction.apply(v,[o,d,h,f.yy,S[1],i,r].concat(p))))return C;O&&(a=a.slice(0,-1*O*2),i=i.slice(0,-1*O),r=r.slice(0,-1*O)),a.push(this.productions_[S[1]][0]),i.push(v.$),r.push(v._$),w=s[a[a.length-2]][a[a.length-1]],a.push(w);break;case 3:return!0}}return!0},"parse")},tr={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,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[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 a,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var r in i)this[r]=i[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,a,n,i=this._currentRules(),r=0;r<i.length;r++)if((a=this._input.match(this.rules[i[r]]))&&(!e||a[0].length>e[0].length)){if(e=a,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&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:{},performAction:(0,l.eW)(function(t,e,a,n){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,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,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};function ts(){this.yy={}}return ti.lexer=tr,(0,l.eW)(ts,"Parser"),ts.prototype=ti,ti.Parser=ts,new ts}();d.parser=d;var u=[],p=[""],y="global",f="",b=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],g=[],x="",_=!1,m=4,E=2,A=(0,l.eW)(function(){return n},"getC4Type"),S=(0,l.eW)(function(t){n=(0,s.oO)(t,(0,s.nV)())},"setC4Type"),C=(0,l.eW)(function(t,e,a,n,i,r,s,l,o){if(null==t||null==e||null==a||null==n)return;let h={},d=g.find(t=>t.from===e&&t.to===a);if(d?h=d:g.push(h),h.type=t,h.from=e,h.to=a,h.label={text:n},null==i)h.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];h[t]={text:e}}else h.techn={text:i};if(null==r)h.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];h[t]={text:e}}else h.descr={text:r};if("object"==typeof s){let[t,e]=Object.entries(s)[0];h[t]=e}else h.sprite=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];h[t]=e}else h.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];h[t]=e}else h.link=o;h.wrap=$()},"addRel"),k=(0,l.eW)(function(t,e,a,n,i,r,s){if(null===e||null===a)return;let l={},o=u.find(t=>t.alias===e);if(o&&e===o.alias?l=o:(l.alias=e,u.push(l)),null==a?l.label={text:""}:l.label={text:a},null==n)l.descr={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.descr={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.tags=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.link=s;l.typeC4Shape={text:t},l.parentBoundary=y,l.wrap=$()},"addPersonOrSystem"),O=(0,l.eW)(function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={},h=u.find(t=>t.alias===e);if(h&&e===h.alias?o=h:(o.alias=e,u.push(o)),null==a?o.label={text:""}:o.label={text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y},"addContainer"),w=(0,l.eW)(function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={},h=u.find(t=>t.alias===e);if(h&&e===h.alias?o=h:(o.alias=e,u.push(o)),null==a?o.label={text:""}:o.label={text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y},"addComponent"),T=(0,l.eW)(function(t,e,a,n,i){if(null===t||null===e)return;let r={},s=b.find(e=>e.alias===t);if(s&&t===s.alias?r=s:(r.alias=t,b.push(r)),null==e?r.label={text:""}:r.label={text:e},null==a)r.type={text:"system"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),f=y,y=t,p.push(f)},"addPersonOrSystemBoundary"),v=(0,l.eW)(function(t,e,a,n,i){if(null===t||null===e)return;let r={},s=b.find(e=>e.alias===t);if(s&&t===s.alias?r=s:(r.alias=t,b.push(r)),null==e?r.label={text:""}:r.label={text:e},null==a)r.type={text:"container"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),f=y,y=t,p.push(f)},"addContainerBoundary"),R=(0,l.eW)(function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={},h=b.find(t=>t.alias===e);if(h&&e===h.alias?o=h:(o.alias=e,b.push(o)),null==a?o.label={text:""}:o.label={text:a},null==n)o.type={text:"node"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.type={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=y,o.wrap=$(),f=y,y=e,p.push(f)},"addDeploymentNode"),D=(0,l.eW)(function(){y=f,p.pop(),f=p.pop(),p.push(f)},"popBoundaryParseStack"),N=(0,l.eW)(function(t,e,a,n,i,r,s,l,o,h,d){let p=u.find(t=>t.alias===e);if(void 0!==p||void 0!==(p=b.find(t=>t.alias===e))){if(null!=a){if("object"==typeof a){let[t,e]=Object.entries(a)[0];p[t]=e}else p.bgColor=a}if(null!=n){if("object"==typeof n){let[t,e]=Object.entries(n)[0];p[t]=e}else p.fontColor=n}if(null!=i){if("object"==typeof i){let[t,e]=Object.entries(i)[0];p[t]=e}else p.borderColor=i}if(null!=r){if("object"==typeof r){let[t,e]=Object.entries(r)[0];p[t]=e}else p.shadowing=r}if(null!=s){if("object"==typeof s){let[t,e]=Object.entries(s)[0];p[t]=e}else p.shape=s}if(null!=l){if("object"==typeof l){let[t,e]=Object.entries(l)[0];p[t]=e}else p.sprite=l}if(null!=o){if("object"==typeof o){let[t,e]=Object.entries(o)[0];p[t]=e}else p.techn=o}if(null!=h){if("object"==typeof h){let[t,e]=Object.entries(h)[0];p[t]=e}else p.legendText=h}if(null!=d){if("object"==typeof d){let[t,e]=Object.entries(d)[0];p[t]=e}else p.legendSprite=d}}},"updateElStyle"),W=(0,l.eW)(function(t,e,a,n,i,r,s){let l=g.find(t=>t.from===e&&t.to===a);if(void 0!==l){if(null!=n){if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]=e}else l.textColor=n}if(null!=i){if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i}if(null!=r){if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(r)}if(null!=s){if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(s)}}},"updateRelStyle"),P=(0,l.eW)(function(t,e,a){let n=m,i=E;n="object"==typeof e?parseInt(Object.values(e)[0]):parseInt(e),i="object"==typeof a?parseInt(Object.values(a)[0]):parseInt(a),n>=1&&(m=n),i>=1&&(E=i)},"updateLayoutConfig"),M=(0,l.eW)(function(){return m},"getC4ShapeInRow"),B=(0,l.eW)(function(){return E},"getC4BoundaryInRow"),Y=(0,l.eW)(function(){return y},"getCurrentBoundaryParse"),j=(0,l.eW)(function(){return f},"getParentBoundaryParse"),I=(0,l.eW)(function(t){return null==t?u:u.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),L=(0,l.eW)(function(t){return u.find(e=>e.alias===t)},"getC4Shape"),U=(0,l.eW)(function(t){return Object.keys(I(t))},"getC4ShapeKeys"),F=(0,l.eW)(function(t){return null==t?b:b.filter(e=>e.parentBoundary===t)},"getBoundaries"),X=(0,l.eW)(function(){return g},"getRels"),z=(0,l.eW)(function(){return x},"getTitle"),Q=(0,l.eW)(function(t){_=t},"setWrap"),$=(0,l.eW)(function(){return _},"autoWrap"),q=(0,l.eW)(function(){u=[],b=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],f="",y="global",p=[""],g=[],p=[""],x="",_=!1,m=4,E=2},"clear"),V=(0,l.eW)(function(t){x=(0,s.oO)(t,(0,s.nV)())},"setTitle"),H={addPersonOrSystem:k,addPersonOrSystemBoundary:T,addContainer:O,addContainerBoundary:v,addComponent:w,addDeploymentNode:R,popBoundaryParseStack:D,addRel:C,updateElStyle:N,updateRelStyle:W,updateLayoutConfig:P,autoWrap:$,setWrap:Q,getC4ShapeArray:I,getC4Shape:L,getC4ShapeKeys:U,getBoundaries:F,getBoundarys:F,getCurrentBoundaryParse:Y,getParentBoundaryParse:j,getRels:X,getTitle:z,getC4Type:A,getC4ShapeInRow:M,getC4BoundaryInRow:B,setAccTitle:s.GN,getAccTitle:s.eu,getAccDescription:s.Mx,setAccDescription:s.U$,getConfig:(0,l.eW)(()=>(0,s.nV)().c4,"getConfig"),clear:q,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:V,setC4Type:S},G=(0,l.eW)(function(t,e){return(0,i.Mu)(t,e)},"drawRect"),K=(0,l.eW)(function(t,e,a,n,i,r){let s=t.append("image");s.attr("width",e),s.attr("height",a),s.attr("x",n),s.attr("y",i);let l=r.startsWith("data:image/png;base64")?r:(0,h.N)(r);s.attr("xlink:href",l)},"drawImage"),J=(0,l.eW)((t,e,a,n)=>{let i=t.append("g"),r=0;for(let t of e){let e=t.textColor?t.textColor:"#444444",s=t.lineColor?t.lineColor:"#444444",l=t.offsetX?parseInt(t.offsetX):0,o=t.offsetY?parseInt(t.offsetY):0;if(0===r){let e=i.append("line");e.attr("x1",t.startPoint.x),e.attr("y1",t.startPoint.y),e.attr("x2",t.endPoint.x),e.attr("y2",t.endPoint.y),e.attr("stroke-width","1"),e.attr("stroke",s),e.style("fill","none"),"rel_b"!==t.type&&e.attr("marker-end","url(#"+n+"-arrowhead)"),("birel"===t.type||"rel_b"===t.type)&&e.attr("marker-start","url(#"+n+"-arrowend)"),r=-1}else{let e=i.append("path");e.attr("fill","none").attr("stroke-width","1").attr("stroke",s).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",t.startPoint.x).replaceAll("starty",t.startPoint.y).replaceAll("controlx",t.startPoint.x+(t.endPoint.x-t.startPoint.x)/2-(t.endPoint.x-t.startPoint.x)/4).replaceAll("controly",t.startPoint.y+(t.endPoint.y-t.startPoint.y)/2).replaceAll("stopx",t.endPoint.x).replaceAll("stopy",t.endPoint.y)),"rel_b"!==t.type&&e.attr("marker-end","url(#"+n+"-arrowhead)"),("birel"===t.type||"rel_b"===t.type)&&e.attr("marker-start","url(#"+n+"-arrowend)")}let h=a.messageFont();tc(a)(t.label.text,i,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+l,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+o,t.label.width,t.label.height,{fill:e},h),t.techn&&""!==t.techn.text&&(h=a.messageFont(),tc(a)("["+t.techn.text+"]",i,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+l,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+a.messageFontSize+5+o,Math.max(t.label.width,t.techn.width),t.techn.height,{fill:e,"font-style":"italic"},h))}},"drawRels"),Z=(0,l.eW)(function(t,e,a){let n=t.append("g"),i=e.bgColor?e.bgColor:"none",r=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1}),G(n,{x:e.x,y:e.y,fill:i,stroke:r,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l});let o=a.boundaryFont();o.fontWeight="bold",o.fontSize=o.fontSize+2,o.fontColor=s,tc(a)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},o),e.type&&""!==e.type.text&&((o=a.boundaryFont()).fontColor=s,tc(a)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},o)),e.descr&&""!==e.descr.text&&((o=a.boundaryFont()).fontSize=o.fontSize-2,o.fontColor=s,tc(a)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},o))},"drawBoundary"),tt=(0,l.eW)(function(t,e,a){let n=e.bgColor?e.bgColor:a[e.typeC4Shape.text+"_bg_color"],r=e.borderColor?e.borderColor:a[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}let o=t.append("g");o.attr("class","person-man");let h=(0,i.kc)();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=e.x,h.y=e.y,h.fill=n,h.width=e.width,h.height=e.height,h.stroke=r,h.rx=2.5,h.ry=2.5,h.attrs={"stroke-width":.5},G(o,h);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let d=to(a,e.typeC4Shape.text);switch(o.append("text").attr("fill",s).attr("font-family",d.fontFamily).attr("font-size",d.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":K(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,l)}let u=a[e.typeC4Shape.text+"Font"]();return u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,tc(a)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},u),(u=a[e.typeC4Shape.text+"Font"]()).fontColor=s,e.techn&&e.techn?.text!==""?tc(a)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:s,"font-style":"italic"},u):e.type&&""!==e.type.text&&tc(a)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},u),e.descr&&""!==e.descr.text&&((u=a.personFont()).fontColor=s,tc(a)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},u)),e.height},"drawC4Shape"),te=(0,l.eW)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),ta=(0,l.eW)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),tn=(0,l.eW)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),ti=(0,l.eW)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),tr=(0,l.eW)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),ts=(0,l.eW)(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),tl=(0,l.eW)(function(t,e){let a=t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);a.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),a.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),to=(0,l.eW)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),tc=function(){function t(t,e,a,i,r,s,l){n(e.append("text").attr("x",a+r/2).attr("y",i+s/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,a,i,r,l,o,h){let{fontSize:d,fontFamily:u,fontWeight:p}=h,y=t.split(s.SY.lineBreakRegex);for(let t=0;t<y.length;t++){let s=t*d-d*(y.length-1)/2,l=e.append("text").attr("x",a+r/2).attr("y",i).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",d).style("font-weight",p).style("font-family",u);l.append("tspan").attr("dy",s).text(y[t]).attr("alignment-baseline","mathematical"),n(l,o)}}function a(t,a,i,r,s,l,o,h){let d=a.append("switch"),u=d.append("foreignObject").attr("x",i).attr("y",r).attr("width",s).attr("height",l).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,i,r,s,l,o,h),n(u,o)}function n(t,e){for(let a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return(0,l.eW)(t,"byText"),(0,l.eW)(e,"byTspan"),(0,l.eW)(a,"byFo"),(0,l.eW)(n,"_setTextAttrs"),function(n){return"fo"===n.textPlacement?a:"old"===n.textPlacement?t:e}}(),th={drawBoundary:Z,drawC4Shape:tt,drawRels:J,insertArrowHead:ti,insertArrowEnd:tr,insertArrowFilledHead:ts,insertArrowCrossHead:tl,insertDatabaseIcon:te,insertComputerIcon:ta,insertClockIcon:tn},td=0,tu=0,tp=4,ty=2;d.yy=H;var tf={},tb=class{static{(0,l.eW)(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,tg(t.db.getConfig())}setData(t,e,a,n){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=a,this.nextData.stopy=this.data.stopy=n}updateVal(t,e,a,n){void 0===t[e]?t[e]=a:t[e]=n(a,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,a=e+t.width,n=this.nextData.starty+2*t.margin,i=n+t.height;(e>=this.data.widthLimit||a>=this.data.widthLimit||this.nextData.cnt>tp)&&(e=this.nextData.startx+t.margin+tf.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=a=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",a,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",a,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},tg(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},tg=(0,l.eW)(function(t){(0,s.Yc)(tf,t),t.fontFamily&&(tf.personFontFamily=tf.systemFontFamily=tf.messageFontFamily=t.fontFamily),t.fontSize&&(tf.personFontSize=tf.systemFontSize=tf.messageFontSize=t.fontSize),t.fontWeight&&(tf.personFontWeight=tf.systemFontWeight=tf.messageFontWeight=t.fontWeight)},"setConf"),tx=(0,l.eW)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),t_=(0,l.eW)(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),tm=(0,l.eW)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function tE(t,e,a,n,i){if(!e[t].width){if(a)e[t].text=(0,r.X4)(e[t].text,i,n),e[t].textLines=e[t].text.split(s.SY.lineBreakRegex).length,e[t].width=i,e[t].height=(0,r.XD)(e[t].text,n);else{let a=e[t].text.split(s.SY.lineBreakRegex);e[t].textLines=a.length;let i=0;for(let s of(e[t].height=0,e[t].width=0,a))e[t].width=Math.max((0,r.Cq)(s,n),e[t].width),i=(0,r.XD)(s,n),e[t].height=e[t].height+i}}}(0,l.eW)(tE,"calcC4ShapeTextWH");var tA=(0,l.eW)(function(t,e,a){e.x=a.data.startx,e.y=a.data.starty,e.width=a.data.stopx-a.data.startx,e.height=a.data.stopy-a.data.starty,e.label.y=tf.c4ShapeMargin-35;let n=e.wrap&&tf.wrap,i=t_(tf);i.fontSize=i.fontSize+2,i.fontWeight="bold";let s=(0,r.Cq)(e.label.text,i);tE("label",e,n,i,s),th.drawBoundary(t,e,tf)},"drawBoundary"),tS=(0,l.eW)(function(t,e,a,n){let i=0;for(let s of n){i=0;let n=a[s],l=tx(tf,n.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,n.typeC4Shape.width=(0,r.Cq)("\xab"+n.typeC4Shape.text+"\xbb",l),n.typeC4Shape.height=l.fontSize+2,n.typeC4Shape.Y=tf.c4ShapePadding,i=n.typeC4Shape.Y+n.typeC4Shape.height-4,n.image={width:0,height:0,Y:0},n.typeC4Shape.text){case"person":case"external_person":n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height}n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height);let o=n.wrap&&tf.wrap,h=tf.width-2*tf.c4ShapePadding,d=tx(tf,n.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",tE("label",n,o,d,h),n.label.Y=i+8,i=n.label.Y+n.label.height,n.type&&""!==n.type.text){n.type.text="["+n.type.text+"]";let t=tx(tf,n.typeC4Shape.text);tE("type",n,o,t,h),n.type.Y=i+5,i=n.type.Y+n.type.height}else if(n.techn&&""!==n.techn.text){n.techn.text="["+n.techn.text+"]";let t=tx(tf,n.techn.text);tE("techn",n,o,t,h),n.techn.Y=i+5,i=n.techn.Y+n.techn.height}let u=i,p=n.label.width;if(n.descr&&""!==n.descr.text){let t=tx(tf,n.typeC4Shape.text);tE("descr",n,o,t,h),n.descr.Y=i+20,i=n.descr.Y+n.descr.height,p=Math.max(n.label.width,n.descr.width),u=i-5*n.descr.textLines}p+=tf.c4ShapePadding,n.width=Math.max(n.width||tf.width,p,tf.width),n.height=Math.max(n.height||tf.height,u,tf.height),n.margin=n.margin||tf.c4ShapeMargin,t.insert(n),th.drawC4Shape(e,n,tf)}t.bumpLastMargin(tf.c4ShapeMargin)},"drawC4ShapeArray"),tC=class{static{(0,l.eW)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},tk=(0,l.eW)(function(t,e){let a=t.x,n=t.y,i=e.x,r=e.y,s=a+t.width/2,l=n+t.height/2,o=Math.abs(a-i),h=Math.abs(n-r),d=h/o,u=t.height/t.width,p=null;return n==r&&a<i?p=new tC(a+t.width,l):n==r&&a>i?p=new tC(a,l):a==i&&n<r?p=new tC(s,n+t.height):a==i&&n>r&&(p=new tC(s,n)),a>i&&n<r?p=u>=d?new tC(a,l+d*t.width/2):new tC(s-o/h*t.height/2,n+t.height):a<i&&n<r?p=u>=d?new tC(a+t.width,l+d*t.width/2):new tC(s+o/h*t.height/2,n+t.height):a<i&&n>r?p=u>=d?new tC(a+t.width,l-d*t.width/2):new tC(s+t.height/2*o/h,n):a>i&&n>r&&(p=u>=d?new tC(a,l-t.width/2*d):new tC(s-t.height/2*o/h,n)),p},"getIntersectPoint"),tO=(0,l.eW)(function(t,e){let a={x:0,y:0};a.x=e.x+e.width/2,a.y=e.y+e.height/2;let n=tk(t,a);return a.x=t.x+t.width/2,a.y=t.y+t.height/2,{startPoint:n,endPoint:tk(e,a)}},"getIntersectPoints"),tw=(0,l.eW)(function(t,e,a,n,i){let s=0;for(let t of e){s+=1;let e=t.wrap&&tf.wrap,i=tm(tf);"C4Dynamic"===n.db.getC4Type()&&(t.label.text=s+": "+t.label.text);let l=(0,r.Cq)(t.label.text,i);tE("label",t,e,i,l),t.techn&&""!==t.techn.text&&(l=(0,r.Cq)(t.techn.text,i),tE("techn",t,e,i,l)),t.descr&&""!==t.descr.text&&(l=(0,r.Cq)(t.descr.text,i),tE("descr",t,e,i,l));let o=tO(a(t.from),a(t.to));t.startPoint=o.startPoint,t.endPoint=o.endPoint}th.drawRels(t,e,tf,i)},"drawRels");function tT(t,e,a,n,i){let r=new tb(i);for(let[s,l]of(r.data.widthLimit=a.data.widthLimit/Math.min(ty,n.length),n.entries())){let n=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=n,n=l.image.Y+l.image.height);let o=l.wrap&&tf.wrap,h=t_(tf);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",tE("label",l,o,h,r.data.widthLimit),l.label.Y=n+8,n=l.label.Y+l.label.height,l.type&&""!==l.type.text&&(l.type.text="["+l.type.text+"]",tE("type",l,o,t_(tf),r.data.widthLimit),l.type.Y=n+5,n=l.type.Y+l.type.height),l.descr&&""!==l.descr.text){let t=t_(tf);t.fontSize=t.fontSize-2,tE("descr",l,o,t,r.data.widthLimit),l.descr.Y=n+20,n=l.descr.Y+l.descr.height}if(0==s||s%ty==0){let t=a.data.startx+tf.diagramMarginX,e=a.data.stopy+tf.diagramMarginY+n;r.setData(t,t,e,e)}else{let t=r.data.stopx!==r.data.startx?r.data.stopx+tf.diagramMarginX:r.data.startx,e=r.data.starty;r.setData(t,t,e,e)}r.name=l.alias;let d=i.db.getC4ShapeArray(l.alias),u=i.db.getC4ShapeKeys(l.alias);u.length>0&&tS(r,t,d,u),e=l.alias;let p=i.db.getBoundaries(e);p.length>0&&tT(t,e,r,p,i),"global"!==l.alias&&tA(t,l,r),a.data.stopy=Math.max(r.data.stopy+tf.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(r.data.stopx+tf.c4ShapeMargin,a.data.stopx),td=Math.max(td,a.data.stopx),tu=Math.max(tu,a.data.stopy)}}(0,l.eW)(tT,"drawInsideBoundary");var tv={drawPersonOrSystemArray:tS,drawBoundary:tA,setConf:tg,draw:(0,l.eW)(function(t,e,a,n){let i;tf=(0,s.nV)().c4;let r=(0,s.nV)().securityLevel;"sandbox"===r&&(i=(0,o.Ys)("#i"+e));let h="sandbox"===r?(0,o.Ys)(i.nodes()[0].contentDocument.body):(0,o.Ys)("body"),d=n.db;n.db.setWrap(tf.wrap),tp=d.getC4ShapeInRow(),ty=d.getC4BoundaryInRow(),l.cM.debug(`C:${JSON.stringify(tf,null,2)}`);let u="sandbox"===r?h.select(`[id="${e}"]`):(0,o.Ys)(`[id="${e}"]`);th.insertComputerIcon(u,e),th.insertDatabaseIcon(u,e),th.insertClockIcon(u,e);let p=new tb(n);p.setData(tf.diagramMarginX,tf.diagramMarginX,tf.diagramMarginY,tf.diagramMarginY),p.data.widthLimit=screen.availWidth,td=tf.diagramMarginX,tu=tf.diagramMarginY;let y=n.db.getTitle();tT(u,"",p,n.db.getBoundaries(""),n),th.insertArrowHead(u,e),th.insertArrowEnd(u,e),th.insertArrowCrossHead(u,e),th.insertArrowFilledHead(u,e),tw(u,n.db.getRels(),n.db.getC4Shape,n,e),p.data.stopx=td,p.data.stopy=tu;let f=p.data,b=f.stopy-f.starty+2*tf.diagramMarginY,g=f.stopx-f.startx+2*tf.diagramMarginX;y&&u.append("text").text(y).attr("x",(f.stopx-f.startx)/2-4*tf.diagramMarginX).attr("y",f.starty+tf.diagramMarginY),(0,s.v2)(u,b,g,tf.useMaxWidth);let x=y?60:0;u.attr("viewBox",f.startx-tf.diagramMarginX+" -"+(tf.diagramMarginY+x)+" "+g+" "+(b+x)),l.cM.debug("models:",f)},"draw")},tR={parser:d,db:H,renderer:tv,styles:(0,l.eW)(t=>`.person {
2
+ stroke: ${t.personBorder};
3
+ fill: ${t.personBkg};
4
+ }
5
+ `,"getStyles"),init:(0,l.eW)(({c4:t,wrap:e})=>{tv.setConf(t),H.setWrap(e)},"init")}},13589:function(t,e,a){a.d(e,{AD:function(){return y},AE:function(){return d},Mu:function(){return l},N6:function(){return f},O:function(){return o},kc:function(){return p},rB:function(){return u},yU:function(){return h}});var n=a(49125),i=a(17632),r=a(95612),s=a(68859),l=(0,i.eW)((t,e)=>{let a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a},"drawRect"),o=(0,i.eW)((t,e)=>{l(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),h=(0,i.eW)((t,e)=>{let a=e.text.replace(n.Vw," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class&&i.attr("class",e.class);let r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(a),i},"drawText"),d=(0,i.eW)((t,e,a,n)=>{let i=t.append("image");i.attr("x",e),i.attr("y",a);let s=(0,r.N)(n);i.attr("xlink:href",s)},"drawImage"),u=(0,i.eW)((t,e,a,n)=>{let i=t.append("use");i.attr("x",e),i.attr("y",a);let s=(0,r.N)(n);i.attr("xlink:href",`#${s}`)},"drawEmbeddedImage"),p=(0,i.eW)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),y=(0,i.eW)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),f=(0,i.eW)(()=>{let t=(0,s.Ys)(".mermaidTooltip");return t.empty()&&(t=(0,s.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")}}]);