@elliemae/pui-cli 9.0.0-alpha.1 → 9.0.0-alpha.10

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 (279) hide show
  1. package/README.md +43 -0
  2. package/app.tsconfig.json +1 -1
  3. package/build/docs/404.html +16 -0
  4. package/build/docs/api/functions/loadRoutes/index.html +22 -0
  5. package/build/docs/api/index.html +22 -0
  6. package/build/docs/api/type-aliases/LIB_NAME/index.html +17 -0
  7. package/build/docs/api/variables/babelConfig/index.html +40 -0
  8. package/build/docs/api/variables/commitlintConfig/index.html +20 -0
  9. package/build/docs/api/variables/eslintBaseConfig/index.html +132 -0
  10. package/build/docs/api/variables/eslintConfig/index.html +180 -0
  11. package/build/docs/api/variables/eslintFlatBaseConfig/index.html +18 -0
  12. package/build/docs/api/variables/eslintFlatBaseConfigStrict/index.html +18 -0
  13. package/build/docs/api/variables/eslintFlatConfig/index.html +18 -0
  14. package/build/docs/api/variables/eslintFlatConfigStrict/index.html +18 -0
  15. package/build/docs/api/variables/jestConfig/index.html +98 -0
  16. package/build/docs/api/variables/jestNodeConfig/index.html +98 -0
  17. package/build/docs/api/variables/lintStagedConfig/index.html +24 -0
  18. package/build/docs/api/variables/prettierConfig/index.html +30 -0
  19. package/build/docs/api/variables/stylelintConfig/index.html +17 -0
  20. package/build/docs/api/variables/vitestConfig/index.html +17 -0
  21. package/build/docs/assets/css/styles.74603f39.css +1 -0
  22. package/build/docs/assets/js/04ee7372.eaa386ed.js +1 -0
  23. package/build/docs/assets/js/0551d4dd.ebb18f4f.js +1 -0
  24. package/build/docs/assets/js/0a1d0315.fc8f91a7.js +1 -0
  25. package/build/docs/assets/js/1126.fa547e9c.js +1 -0
  26. package/build/docs/assets/js/1127.f28430e6.js +1 -0
  27. package/build/docs/assets/js/1298.fb0939c9.js +1 -0
  28. package/build/docs/assets/js/13097d8d.c1821d28.js +1 -0
  29. package/build/docs/assets/js/1617.b2623271.js +1 -0
  30. package/build/docs/assets/js/16b7bc88.c3779e27.js +1 -0
  31. package/build/docs/assets/js/1700.4f7a9007.js +1 -0
  32. package/build/docs/assets/js/17896441.84339068.js +1 -0
  33. package/build/docs/assets/js/1b9df811.aaa95da1.js +1 -0
  34. package/build/docs/assets/js/213.e69351b3.js +1 -0
  35. package/build/docs/assets/js/2297.e63290f4.js +1 -0
  36. package/build/docs/assets/js/232a0286.33b2782b.js +1 -0
  37. package/build/docs/assets/js/2399.cc5803e0.js +1 -0
  38. package/build/docs/assets/js/242.73516ab6.js +1 -0
  39. package/build/docs/assets/js/247.e1522e52.js +1 -0
  40. package/build/docs/assets/js/2673.da75a556.js +1 -0
  41. package/build/docs/assets/js/2805.f0505f8c.js +1 -0
  42. package/build/docs/assets/js/3395.eb3dad5b.js +1 -0
  43. package/build/docs/assets/js/3499.2d5c6821.js +1 -0
  44. package/build/docs/assets/js/3552.9272c0d9.js +1 -0
  45. package/build/docs/assets/js/3720.8e7f36d4.js +2 -0
  46. package/build/docs/assets/js/3720.8e7f36d4.js.LICENSE.txt +9 -0
  47. package/build/docs/assets/js/37d86055.47211796.js +1 -0
  48. package/build/docs/assets/js/3992.0ac29b2f.js +2 -0
  49. package/build/docs/assets/js/3992.0ac29b2f.js.LICENSE.txt +1 -0
  50. package/build/docs/assets/js/4069.301f1115.js +1 -0
  51. package/build/docs/assets/js/4134.553b3645.js +1 -0
  52. package/build/docs/assets/js/4257.9afce6ac.js +1 -0
  53. package/build/docs/assets/js/4772.6294b364.js +1 -0
  54. package/build/docs/assets/js/4884.9dbe23e5.js +1 -0
  55. package/build/docs/assets/js/4fb6949f.369cc1b9.js +1 -0
  56. package/build/docs/assets/js/5196.98f7e06a.js +1 -0
  57. package/build/docs/assets/js/5248.ee436cea.js +1 -0
  58. package/build/docs/assets/js/5428.71752e9a.js +1 -0
  59. package/build/docs/assets/js/5964.0728ed91.js +1 -0
  60. package/build/docs/assets/js/5968.5f4ccba7.js +1 -0
  61. package/build/docs/assets/js/5befad71.5f19afb5.js +1 -0
  62. package/build/docs/assets/js/5d5f1db0.c5aa5afa.js +1 -0
  63. package/build/docs/assets/js/5e8c322a.ef3b894b.js +1 -0
  64. package/build/docs/assets/js/5e95c892.f550b901.js +1 -0
  65. package/build/docs/assets/js/5fb3c522.da5628e8.js +1 -0
  66. package/build/docs/assets/js/6486.68ae0007.js +1 -0
  67. package/build/docs/assets/js/6704.2615a5c6.js +1 -0
  68. package/build/docs/assets/js/6bd11e52.08b95209.js +1 -0
  69. package/build/docs/assets/js/6e96545e.30c1b801.js +1 -0
  70. package/build/docs/assets/js/7080.efd5ba6c.js +1 -0
  71. package/build/docs/assets/js/71f6d02b.cfd98385.js +1 -0
  72. package/build/docs/assets/js/7201.e90ba636.js +1 -0
  73. package/build/docs/assets/js/7344.95656e38.js +1 -0
  74. package/build/docs/assets/js/7516.b6668d60.js +1 -0
  75. package/build/docs/assets/js/7525.a8d0db87.js +1 -0
  76. package/build/docs/assets/js/7540.7a4353cf.js +1 -0
  77. package/build/docs/assets/js/7985.8c6943d6.js +1 -0
  78. package/build/docs/assets/js/8049.8ba75278.js +1 -0
  79. package/build/docs/assets/js/80e87108.f9507b95.js +1 -0
  80. package/build/docs/assets/js/8152.f2bebb2f.js +1 -0
  81. package/build/docs/assets/js/821.8d4e2a80.js +1 -0
  82. package/build/docs/assets/js/8290.a4f7a2ca.js +1 -0
  83. package/build/docs/assets/js/8355.864847a1.js +1 -0
  84. package/build/docs/assets/js/8389.26a9caca.js +1 -0
  85. package/build/docs/assets/js/8585.3cb09ff7.js +1 -0
  86. package/build/docs/assets/js/8788.03856709.js +1 -0
  87. package/build/docs/assets/js/9178.50ac2954.js +1 -0
  88. package/build/docs/assets/js/9210.1ac21da8.js +1 -0
  89. package/build/docs/assets/js/9354.37ad86f9.js +1 -0
  90. package/build/docs/assets/js/936.c151b43f.js +1 -0
  91. package/build/docs/assets/js/9574.b172d607.js +1 -0
  92. package/build/docs/assets/js/97.70eddfb5.js +1 -0
  93. package/build/docs/assets/js/9852.f77caf52.js +1 -0
  94. package/build/docs/assets/js/9953.f6278635.js +1 -0
  95. package/build/docs/assets/js/a7bd4aaa.30ffad02.js +1 -0
  96. package/build/docs/assets/js/a94703ab.f1796514.js +1 -0
  97. package/build/docs/assets/js/aba21aa0.3bbcf0cc.js +1 -0
  98. package/build/docs/assets/js/b7b585d8.6d53e73f.js +1 -0
  99. package/build/docs/assets/js/b8ac1d98.62684003.js +1 -0
  100. package/build/docs/assets/js/bde5209a.f5bca8b2.js +1 -0
  101. package/build/docs/assets/js/c377a04b.0f8625c6.js +1 -0
  102. package/build/docs/assets/js/dfd75424.51c4e2cb.js +1 -0
  103. package/build/docs/assets/js/e5f79924.c793a74d.js +1 -0
  104. package/build/docs/assets/js/f736c962.dbd0d004.js +1 -0
  105. package/build/docs/assets/js/main.00e13c37.js +2 -0
  106. package/build/docs/assets/js/main.00e13c37.js.LICENSE.txt +51 -0
  107. package/build/docs/assets/js/runtime~main.cb214d1a.js +1 -0
  108. package/build/docs/eslint-rules-migration/index.html +135 -0
  109. package/build/docs/img/favicon.ico +0 -0
  110. package/build/docs/img/logo.jpeg +0 -0
  111. package/build/docs/img/logo.svg +22 -0
  112. package/build/docs/img/readme.md +1 -0
  113. package/build/docs/index.html +179 -0
  114. package/build/docs/pui-cli-9-migration/index.html +150 -0
  115. package/build/docs/readme.md +1 -0
  116. package/build/docs/sitemap.xml +1 -0
  117. package/build/docs/ssl-certificate-setup/index.html +284 -0
  118. package/build/docs/stylelint-migration/index.html +57 -0
  119. package/build/docs/usage-guide/index.html +439 -0
  120. package/dist/cjs/cli.js +3 -13
  121. package/dist/cjs/commands/build.js +1 -2
  122. package/dist/cjs/commands/buildcdn.js +1 -2
  123. package/dist/cjs/commands/codemod.js +1 -12
  124. package/dist/cjs/commands/gendoc.js +1 -2
  125. package/dist/cjs/commands/lint.js +11 -9
  126. package/dist/cjs/commands/pack.js +1 -2
  127. package/dist/cjs/commands/skills.js +206 -0
  128. package/dist/cjs/commands/start.js +1 -2
  129. package/dist/cjs/commands/storybook.js +1 -12
  130. package/dist/cjs/commands/test.js +1 -13
  131. package/dist/cjs/commands/tscheck.js +1 -2
  132. package/dist/cjs/commands/utils.js +16 -12
  133. package/dist/cjs/commands/version.js +1 -12
  134. package/dist/cjs/commands/vitest.js +1 -13
  135. package/dist/cjs/index.cjs +13 -1
  136. package/dist/cjs/index.js +8 -2
  137. package/dist/cjs/lint-config/eslint/common.cjs +1 -1
  138. package/dist/cjs/lint-config/eslint/flat/common.mjs +169 -0
  139. package/dist/cjs/lint-config/eslint/flat/compat.mjs +27 -0
  140. package/dist/cjs/lint-config/eslint/flat/index.mjs +21 -0
  141. package/dist/cjs/lint-config/eslint/flat/non-react-export.mjs +10 -0
  142. package/dist/cjs/lint-config/eslint/flat/non-react.mjs +6 -0
  143. package/dist/cjs/lint-config/eslint/flat/presets.mjs +96 -0
  144. package/dist/cjs/lint-config/eslint/flat/react-export.mjs +7 -0
  145. package/dist/cjs/lint-config/eslint/flat/react.mjs +59 -0
  146. package/dist/cjs/lint-config/eslint/flat/rules.mjs +185 -0
  147. package/dist/cjs/lint-config/eslint/typescript/non-react.cjs +1 -1
  148. package/dist/cjs/lint-config/eslint/typescript/react.cjs +1 -1
  149. package/dist/cjs/lint-config/stylelint/config.mjs +27 -0
  150. package/dist/cjs/lint-config/stylelint/export.mjs +1 -0
  151. package/dist/cjs/lint-config/stylelint.config.cjs +3 -19
  152. package/dist/cjs/monorepo/utils.cjs +16 -8
  153. package/dist/cjs/monorepo/utils.js +5 -8
  154. package/dist/cjs/{release.config.cjs → release.config.mjs} +3 -2
  155. package/dist/cjs/{semantic-release-plugin.cjs → semantic-release-plugin.mjs} +3 -3
  156. package/dist/cjs/skills/migrate-to-pui-cli-9/SKILL.md +271 -0
  157. package/dist/cjs/testing/jest.config.cjs +4 -4
  158. package/dist/cjs/testing/resolver.cjs +1 -1
  159. package/dist/cjs/testing/setup-react-env.js +1 -1
  160. package/dist/cjs/testing/vitest.config.js +2 -1
  161. package/dist/cjs/transpile/esbuild.js +1 -1
  162. package/dist/cjs/webpack/csp-plugin.js +2 -4
  163. package/dist/cjs/webpack/prop-types-shim.js +0 -1
  164. package/dist/cjs/webpack/webpack.lib.base.babel.js +0 -8
  165. package/dist/esm/cli.js +3 -13
  166. package/dist/esm/commands/build.js +1 -2
  167. package/dist/esm/commands/buildcdn.js +1 -2
  168. package/dist/esm/commands/codemod.js +1 -2
  169. package/dist/esm/commands/gendoc.js +1 -2
  170. package/dist/esm/commands/lint.js +11 -9
  171. package/dist/esm/commands/pack.js +1 -2
  172. package/dist/esm/commands/skills.js +175 -0
  173. package/dist/esm/commands/start.js +1 -2
  174. package/dist/esm/commands/storybook.js +1 -2
  175. package/dist/esm/commands/test.js +1 -3
  176. package/dist/esm/commands/tscheck.js +1 -2
  177. package/dist/esm/commands/utils.js +17 -13
  178. package/dist/esm/commands/version.js +1 -2
  179. package/dist/esm/commands/vitest.js +1 -3
  180. package/dist/esm/index.cjs +13 -1
  181. package/dist/esm/index.js +13 -1
  182. package/dist/esm/lint-config/eslint/common.cjs +1 -1
  183. package/dist/esm/lint-config/eslint/flat/common.mjs +169 -0
  184. package/dist/esm/lint-config/eslint/flat/compat.mjs +27 -0
  185. package/dist/esm/lint-config/eslint/flat/index.mjs +21 -0
  186. package/dist/esm/lint-config/eslint/flat/non-react-export.mjs +10 -0
  187. package/dist/esm/lint-config/eslint/flat/non-react.mjs +6 -0
  188. package/dist/esm/lint-config/eslint/flat/presets.mjs +96 -0
  189. package/dist/esm/lint-config/eslint/flat/react-export.mjs +7 -0
  190. package/dist/esm/lint-config/eslint/flat/react.mjs +59 -0
  191. package/dist/esm/lint-config/eslint/flat/rules.mjs +185 -0
  192. package/dist/esm/lint-config/eslint/typescript/non-react.cjs +1 -1
  193. package/dist/esm/lint-config/eslint/typescript/react.cjs +1 -1
  194. package/dist/esm/lint-config/stylelint/config.mjs +27 -0
  195. package/dist/esm/lint-config/stylelint/export.mjs +1 -0
  196. package/dist/esm/lint-config/stylelint.config.cjs +3 -19
  197. package/dist/esm/monorepo/utils.cjs +16 -8
  198. package/dist/esm/monorepo/utils.js +5 -8
  199. package/dist/esm/{release.config.cjs → release.config.mjs} +3 -2
  200. package/dist/esm/{semantic-release-plugin.cjs → semantic-release-plugin.mjs} +3 -3
  201. package/dist/esm/skills/migrate-to-pui-cli-9/SKILL.md +271 -0
  202. package/dist/esm/testing/jest.config.cjs +4 -4
  203. package/dist/esm/testing/resolver.cjs +1 -1
  204. package/dist/esm/testing/setup-react-env.js +1 -1
  205. package/dist/esm/testing/vitest.config.js +2 -1
  206. package/dist/esm/transpile/esbuild.js +1 -1
  207. package/dist/esm/webpack/csp-plugin.js +2 -4
  208. package/dist/esm/webpack/prop-types-shim.js +0 -1
  209. package/dist/esm/webpack/webpack.lib.base.babel.js +0 -8
  210. package/dist/types/lib/commands/build.d.ts +1 -1
  211. package/dist/types/lib/commands/buildcdn.d.ts +1 -1
  212. package/dist/types/lib/commands/codemod.d.ts +1 -1
  213. package/dist/types/lib/commands/gendoc.d.ts +1 -1
  214. package/dist/types/lib/commands/lint.d.ts +1 -1
  215. package/dist/types/lib/commands/pack.d.ts +1 -1
  216. package/dist/types/lib/commands/skills.d.ts +11 -0
  217. package/dist/types/lib/commands/start.d.ts +1 -1
  218. package/dist/types/lib/commands/storybook.d.ts +1 -1
  219. package/dist/types/lib/commands/test.d.ts +1 -1
  220. package/dist/types/lib/commands/tscheck.d.ts +1 -1
  221. package/dist/types/lib/commands/utils.d.ts +43 -2
  222. package/dist/types/lib/commands/version.d.ts +1 -1
  223. package/dist/types/lib/commands/vitest.d.ts +1 -1
  224. package/dist/types/lib/index.d.cts +6 -2
  225. package/dist/types/lib/index.d.ts +5 -1
  226. package/dist/types/lib/lint-config/eslint/flat/common.d.mts +6 -0
  227. package/dist/types/lib/lint-config/eslint/flat/compat.d.mts +9 -0
  228. package/dist/types/lib/lint-config/eslint/flat/index.d.mts +6 -0
  229. package/dist/types/lib/lint-config/eslint/flat/non-react-export.d.mts +4 -0
  230. package/dist/types/lib/lint-config/eslint/flat/non-react.d.mts +3 -0
  231. package/dist/types/lib/lint-config/eslint/flat/presets.d.mts +34 -0
  232. package/dist/types/lib/lint-config/eslint/flat/react-export.d.mts +4 -0
  233. package/dist/types/lib/lint-config/eslint/flat/react.d.mts +4 -0
  234. package/dist/types/lib/lint-config/eslint/flat/rules.d.mts +361 -0
  235. package/dist/types/lib/lint-config/stylelint/config.d.mts +3 -0
  236. package/dist/types/lib/lint-config/stylelint/export.d.mts +1 -0
  237. package/dist/types/lib/lint-config/stylelint.config.d.cts +2 -10
  238. package/dist/types/lib/release.config.d.mts +10 -0
  239. package/dist/types/lib/semantic-release-plugin.d.mts +4 -0
  240. package/dist/types/lib/server/appRoutes.d.ts +1 -1
  241. package/dist/types/lib/server/csp.d.ts +1 -1
  242. package/dist/types/lib/server/middlewares.d.ts +1 -1
  243. package/dist/types/lib/webpack/csp-plugin.d.ts +3 -3
  244. package/dist/types/lib/webpack/helpers.d.ts +1 -1
  245. package/dist/types/lib/webpack/interceptor-middleware.d.ts +2 -2
  246. package/dist/types/lib/webpack/webpack.base.babel.d.ts +1 -1
  247. package/dist/types/lib/webpack/webpack.lib.base.babel.d.ts +1 -1
  248. package/dist/types/lib/webpack/webpack.lib.prod.babel.d.ts +1 -1
  249. package/dist/types/lib/webpack/webpack.prod.babel.d.ts +1 -1
  250. package/dist/types/lib/webpack/webpack.storybook.d.ts +1 -1
  251. package/dist/types/tsconfig.tsbuildinfo +1 -1
  252. package/lib/lint-config/commitlint.config.cjs +1 -0
  253. package/lib/lint-config/eslint/common.cjs +164 -0
  254. package/lib/lint-config/eslint/flat/common.mjs +169 -0
  255. package/lib/lint-config/eslint/flat/compat.mjs +27 -0
  256. package/lib/lint-config/eslint/flat/index.mjs +21 -0
  257. package/lib/lint-config/eslint/flat/non-react-export.mjs +10 -0
  258. package/lib/lint-config/eslint/flat/non-react.mjs +6 -0
  259. package/lib/lint-config/eslint/flat/presets.mjs +96 -0
  260. package/lib/lint-config/eslint/flat/react-export.mjs +7 -0
  261. package/lib/lint-config/eslint/flat/react.mjs +59 -0
  262. package/lib/lint-config/eslint/flat/rules.mjs +185 -0
  263. package/lib/lint-config/eslint/non-react.cjs +14 -0
  264. package/lib/lint-config/eslint/react.cjs +26 -0
  265. package/lib/lint-config/eslint/typescript/common.cjs +49 -0
  266. package/lib/lint-config/eslint/typescript/non-react.cjs +12 -0
  267. package/lib/lint-config/eslint/typescript/react.cjs +19 -0
  268. package/lib/lint-config/lint-staged.config.js +15 -0
  269. package/lib/lint-config/prettier.config.cjs +8 -0
  270. package/lib/lint-config/stylelint/config.mjs +27 -0
  271. package/lib/lint-config/stylelint/export.mjs +1 -0
  272. package/lib/lint-config/stylelint.config.cjs +3 -0
  273. package/lib/release.config.mjs +28 -0
  274. package/lib/semantic-release-plugin.mjs +30 -0
  275. package/lib/skills/migrate-to-pui-cli-9/SKILL.md +271 -0
  276. package/library.tsconfig.json +1 -1
  277. package/package.json +92 -86
  278. package/dist/types/lib/release.config.d.cts +0 -7
  279. package/dist/types/lib/semantic-release-plugin.d.cts +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[8389],{8208(t,e,a){a.d(e,{CP:()=>h,Ck:()=>E,HT:()=>T,PB:()=>p,aC:()=>l,lC:()=>c,m:()=>d,tk:()=>o});var r=a(3316),s=a(7970),i=a(4674),n=a(7012),o=(0,s.K2)((t,e)=>{const 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(const r in e.attrs)a.attr(r,e.attrs[r]);return e.class&&a.attr("class",e.class),a},"drawRect"),c=(0,s.K2)((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};o(t,a).lower()},"drawBackgroundRect"),d=(0,s.K2)((t,e)=>{const a=e.text.replace(r.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const i=s.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(a),s},"drawText"),l=(0,s.K2)((t,e,a,r)=>{const s=t.append("image");s.attr("x",e),s.attr("y",a);const n=(0,i.J)(r);s.attr("xlink:href",n)},"drawImage"),h=(0,s.K2)((t,e,a,r)=>{const s=t.append("use");s.attr("x",e),s.attr("y",a);const n=(0,i.J)(r);s.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),p=(0,s.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),T=(0,s.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),E=(0,s.K2)(()=>{let t=(0,n.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},6733(t,e,a){a.d(e,{m:()=>s});var r=a(7970),s=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},8389(t,e,a){a.d(e,{diagram:()=>Vt});var r=a(9164),s=a(8208),i=a(6733),n=a(1546),o=a(3316),c=a(7970),d=a(7012),l=a(4674),h=function(){var t=(0,c.K2)(function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],n=[1,11],o=[1,12],d=[1,14],l=[1,15],h=[1,17],p=[1,18],T=[1,19],E=[1,25],g=[1,26],u=[1,27],y=[1,28],_=[1,29],O=[1,30],x=[1,31],m=[1,32],b=[1,33],I=[1,34],f=[1,35],R=[1,36],L=[1,37],w=[1,38],P=[1,39],N=[1,40],D=[1,42],S=[1,43],A=[1,44],k=[1,45],C=[1,46],M=[1,47],v=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Y=[1,74],B=[1,80],K=[1,81],$=[1,82],V=[1,83],W=[1,84],F=[1,85],H=[1,86],q=[1,87],z=[1,88],j=[1,89],U=[1,90],G=[1,91],X=[1,92],J=[1,93],Z=[1,94],Q=[1,95],tt=[1,96],et=[1,97],at=[1,98],rt=[1,99],st=[1,100],it=[1,101],nt=[1,102],ot=[1,103],ct=[1,104],dt=[1,105],lt=[2,78],ht=[4,5,17,51,53,54],pt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Tt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Et=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],gt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],ut=[5,52],yt=[70,71,72,73],_t=[1,151],Ot={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:(0,c.K2)(function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 10:case 8:case 9:case 14:this.$=[];break;case 5:case 11:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 12:case 13:case 67:this.$=i[o];break;case 16:i[o].type="createParticipant",this.$=i[o];break;case 17:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 30:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 31:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 32:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 35:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 42:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 44:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 46:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 48:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 49:case 54:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 50:case 55:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 51:case 56:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 52:case 57:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 53:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 58:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 59:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 60:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 62:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 63:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 66:this.$=[i[o-2],i[o]];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 71:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 72:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:i[o-1].actor}];break;case 73:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:i[o-4].actor}];break;case 74:this.$=[i[o-5],i[o-1],{type:"addMessage",from:i[o-5].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:i[o-1].actor},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:i[o-5].actor}];break;case 75:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 76:this.$={type:"addParticipant",actor:i[o-1],config:i[o]};break;case 77:this.$=i[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:i[o]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(i[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},t(v,[2,5]),{9:48,13:13,14:d,15:l,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},t(v,[2,7]),t(v,[2,8]),t(v,[2,9]),t(v,[2,15]),{13:49,51:w,53:P,54:N},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:M},{23:56,73:M},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(v,[2,30]),t(v,[2,31]),{33:[1,62]},{35:[1,63]},t(v,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Y},{23:75,55:76,73:Y},{23:77,73:M},{69:78,72:[1,79],78:B,79:K,80:$,81:V,82:W,83:F,84:H,85:q,86:z,87:j,88:U,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:et,96:at,97:rt,98:st,99:it,100:nt,101:ot,102:ct,103:dt},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:M},{23:111,73:M},{23:112,73:M},{23:113,73:M},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],lt),t(v,[2,6]),t(v,[2,16]),t(ht,[2,10],{11:114}),t(v,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(v,[2,22]),{5:[1,118]},{5:[1,119]},t(v,[2,25]),t(v,[2,26]),t(v,[2,27]),t(v,[2,28]),t(v,[2,29]),t(v,[2,32]),t(v,[2,33]),t(pt,s,{7:120}),t(pt,s,{7:121}),t(pt,s,{7:122}),t(Tt,s,{41:123,7:124}),t(Et,s,{43:125,7:126}),t(Et,s,{7:126,43:127}),t(gt,s,{46:128,7:129}),t(pt,s,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(ut,lt,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:M},{69:146,78:B,79:K,80:$,81:V,82:W,83:F,84:H,85:q,86:z,87:j,88:U,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:et,96:at,97:rt,98:st,99:it,100:nt,101:ot,102:ct,103:dt},t(yt,[2,79]),t(yt,[2,80]),t(yt,[2,81]),t(yt,[2,82]),t(yt,[2,83]),t(yt,[2,84]),t(yt,[2,85]),t(yt,[2,86]),t(yt,[2,87]),t(yt,[2,88]),t(yt,[2,89]),t(yt,[2,90]),t(yt,[2,91]),t(yt,[2,92]),t(yt,[2,93]),t(yt,[2,94]),t(yt,[2,95]),t(yt,[2,96]),t(yt,[2,97]),t(yt,[2,98]),t(yt,[2,99]),t(yt,[2,100]),t(yt,[2,101]),t(yt,[2,102]),t(yt,[2,103]),t(yt,[2,104]),{23:147,73:M},{23:149,60:148,73:M},{73:[2,68]},{73:[2,69]},{58:150,104:_t},{58:152,104:_t},{58:153,104:_t},{58:154,104:_t},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:w,53:P,54:N},{5:[1,160]},t(v,[2,20]),t(v,[2,21]),t(v,[2,23]),t(v,[2,24]),{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[1,161],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[1,162],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[1,163],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{17:[1,164]},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[2,47],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,50:[1,165],51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{17:[1,166]},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[2,45],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,49:[1,167],51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{17:[1,168]},{17:[1,169]},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[2,43],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,48:[1,170],51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[1,171],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{16:[1,172]},t(v,[2,50]),{16:[1,173]},t(v,[2,55]),t(ut,[2,76]),{76:[1,174]},{16:[1,175]},t(v,[2,52]),{16:[1,176]},t(v,[2,57]),t(v,[2,53]),{23:177,73:M},{23:178,73:M},{23:179,73:M},{58:180,104:_t},{23:181,72:[1,182],73:M},{58:183,104:_t},{58:184,104:_t},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(v,[2,17]),t(ht,[2,11]),{13:186,51:w,53:P,54:N},t(ht,[2,13]),t(ht,[2,14]),t(v,[2,19]),t(v,[2,35]),t(v,[2,36]),t(v,[2,37]),t(v,[2,38]),{16:[1,187]},t(v,[2,39]),{16:[1,188]},t(v,[2,40]),t(v,[2,41]),{16:[1,189]},t(v,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:_t},{58:196,104:_t},{58:197,104:_t},{5:[2,75]},{58:198,104:_t},{23:199,73:M},{5:[2,58]},{5:[2,59]},{23:200,73:M},t(ht,[2,12]),t(Tt,s,{7:124,41:201}),t(Et,s,{7:126,43:202}),t(gt,s,{7:129,46:203}),t(v,[2,49]),t(v,[2,54]),t(ut,[2,77]),t(v,[2,51]),t(v,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:_t},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,a=[0],r=[],s=[null],i=[],n=this.table,o="",d=0,l=0,h=0,p=i.slice.call(arguments,1),T=Object.create(this.lexer),E={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(E.yy[g]=this.yy[g]);T.setInput(t,E.yy),E.yy.lexer=T,E.yy.parser=this,void 0===T.yylloc&&(T.yylloc={});var u=T.yylloc;i.push(u);var y=T.options&&T.options.ranges;function _(){var t;return"number"!=typeof(t=r.pop()||T.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof E.yy.parseError?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){a.length=a.length-2*t,s.length=s.length-t,i.length=i.length-t},"popStack"),(0,c.K2)(_,"lex");for(var O,x,m,b,I,f,R,L,w,P={};;){if(m=a[a.length-1],this.defaultActions[m]?b=this.defaultActions[m]:(null==O&&(O=_()),b=n[m]&&n[m][O]),void 0===b||!b.length||!b[0]){var N="";for(f in w=[],n[m])this.terminals_[f]&&f>2&&w.push("'"+this.terminals_[f]+"'");N=T.showPosition?"Parse error on line "+(d+1)+":\n"+T.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(d+1)+": Unexpected "+(1==O?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(N,{text:T.match,token:this.terminals_[O]||O,line:T.yylineno,loc:u,expected:w})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+O);switch(b[0]){case 1:a.push(O),s.push(T.yytext),i.push(T.yylloc),a.push(b[1]),O=null,x?(O=x,x=null):(l=T.yyleng,o=T.yytext,d=T.yylineno,u=T.yylloc,h>0&&h--);break;case 2:if(R=this.productions_[b[1]][1],P.$=s[s.length-R],P._$={first_line:i[i.length-(R||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(R||1)].first_column,last_column:i[i.length-1].last_column},y&&(P._$.range=[i[i.length-(R||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(P,[o,l,d,E.yy,b[1],s,i].concat(p))))return I;R&&(a=a.slice(0,-1*R*2),s=s.slice(0,-1*R),i=i.slice(0,-1*R)),a.push(this.productions_[b[1]][0]),s.push(P.$),i.push(P._$),L=n[a[a.length-2]][a[a.length-1]],a.push(L);break;case 3:return!0}}return!0},"parse")},xt=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in s)this[i]=s[i];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,a,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),i=0;i<s.length;i++)if((a=this._input.match(this.rules[s[i]]))&&(!e||a[0].length>e[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(t,e,a,r){switch(a){case 0:case 59:case 92:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:case 60:return e.yytext=e.yytext.trim(),73;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 13:return e.yytext=e.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return e.yytext=e.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}}}();function mt(){this.yy={}}return Ot.lexer=xt,(0,c.K2)(mt,"Parser"),mt.prototype=Ot,Ot.Parser=mt,new mt}();h.parser=h;var p=h,T={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},E={FILLED:0,OPEN:1},g={LEFTOF:0,RIGHTOF:1,OVER:2},u="actor",y="control",_="database",O="entity",x=class{constructor(){this.state=new i.m(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=o.SV,this.setAccDescription=o.EI,this.setDiagramTitle=o.ke,this.getAccTitle=o.iN,this.getAccDescription=o.m7,this.getDiagramTitle=o.ab,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,o.D7)().wrap),this.LINETYPE=T,this.ARROWTYPE=E,this.PLACEMENT=g}static{(0,c.K2)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,a,s,i){let n,o=this.state.records.currentBox;if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}",n=(0,r.H)(t,{schema:r.r})}s=n?.type??s,!n?.alias||a&&a.text!==e||(a={text:n.alias,wrap:a?.wrap,type:s});const c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw new Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==a)return}if(null==a?.text&&(a={text:e,type:s}),null!=s&&null!=a.text||(a={text:e,type:s}),this.state.records.actors.set(t,{box:o,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:s??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:r})}addSignal(t,e,a,r,s=!1,i){if(r===this.LINETYPE.ACTIVE_END){if(this.activationCount(t??"")<1){const e=new Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:s,centralConnection:i??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(0,o.D7)().sequence?.wrap??!1}clear(){this.state.reset(),(0,o.IU)()}parseMessage(t){const e=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(e),s={text:r,wrap:a};return c.Rm.debug(`parseMessage: ${JSON.stringify(s)}`),s}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}const{wrap:s,cleanedText:i}=this.extractWrap(r);return{text:i?(0,o.jZ)(i,(0,o.D7)()):void 0,color:a,wrap:s}}addNote(t,e,a){const r={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},s=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:s[0],to:s[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const a=this.getActor(t);try{let t=(0,o.jZ)(e.text,(0,o.D7)());t=t.replace(/&equals;/g,"="),t=t.replace(/&amp;/g,"&");const r=JSON.parse(t);this.insertLinks(a,r)}catch(r){c.Rm.error("error while parsing actor link text",r)}}addALink(t,e){const a=this.getActor(t);try{const t={};let r=(0,o.jZ)(e.text,(0,o.D7)());const s=r.indexOf("@");r=r.replace(/&equals;/g,"="),r=r.replace(/&amp;/g,"&");const i=r.slice(0,s-1).trim(),n=r.slice(s+1).trim();t[i]=n,this.insertLinks(a,t)}catch(r){c.Rm.error("error while parsing actor link text",r)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}addProperties(t,e){const a=this.getActor(t);try{const t=(0,o.jZ)(e.text,(0,o.D7)()),r=JSON.parse(t);this.insertProperties(a,r)}catch(r){c.Rm.error("error while parsing actor properties text",r)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const a=this.getActor(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(s){c.Rm.error("error while parsing actor details text",s)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,o.SV)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,o.D7)().sequence}},m=(0,c.K2)(t=>{const e=t.dropShadow??"none",{look:a}=(0,o.D7)();return`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: ${t.strokeWidth??1};\n }\n\n rect.actor.outer-path[data-look="neo"] {\n filter: ${e};\n }\n\n rect.note[data-look="neo"] {\n stroke:${t.noteBorderColor};\n fill:${t.noteBkgColor};\n filter: ${e};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .innerArc {\n stroke-width: 1.5;\n stroke-dasharray: none;\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n [id$="-arrowhead"] path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n [id$="-sequencenumber"] {\n fill: ${t.signalColor};\n }\n\n [id$="-crosshead"] path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n filter: ${"neo"===a?e:"none"};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .sectionTitle, .sectionTitle > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n ${t.noteFontWeight?`font-weight: ${t.noteFontWeight};`:""}\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man circle, line {\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n\n g rect.rect {\n filter: ${e};\n stroke: ${t.nodeBorder};\n }\n`},"getStyles"),b="actor-top",I="actor-bottom",f="actor-box",R="actor-man",L=new Set(["redux-color","redux-dark-color"]),w=(0,c.K2)(function(t,e){const a=(0,s.tk)(t,e);return"neo"===(0,o.zj)().look&&a.attr("data-look","neo"),a},"drawRect"),P=(0,c.K2)(function(t,e,a,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,n=e.actorCnt,o=e.rectData;var c="none";s&&(c="block !important");const d=t.append("g");d.attr("id","actor"+n+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",c);var h="";void 0!==o.class&&(h=" "+o.class);let p=o.width>a?o.width:a;const T=d.append("rect");if(T.attr("class","actorPopupMenuPanel"+h),T.attr("x",o.x),T.attr("y",o.height),T.attr("fill",o.fill),T.attr("stroke",o.stroke),T.attr("width",p),T.attr("height",o.height),T.attr("rx",o.rx),T.attr("ry",o.ry),null!=i){var E=20;for(let t in i){var g=d.append("a"),u=(0,l.J)(i[t]);g.attr("xlink:href",u),g.attr("target","_blank"),nt(r)(t,g,o.x+10,o.height+E,p,20,{class:"actor"},r),E+=30}}return T.attr("height",E),{height:o.height+E,width:p}},"drawPopup"),N=(0,c.K2)(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),D=(0,c.K2)(async function(t,e,a=null){let r=t.append("foreignObject");const s=await(0,o.dj)(e.text,(0,o.zj)()),i=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(r.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);const s=a.getBBox();r.attr("x",Math.round(s.x+s.width/2-i.width/2)).attr("y",Math.round(s.y+s.height/2-i.height/2))}else if(a){let{startx:t,stopx:s,starty:n}=a;if(t>s){const e=t;t=s,s=e}r.attr("x",Math.round(t+Math.abs(t-s)/2-i.width/2)),"loopText"===e.class?r.attr("y",Math.round(n)):r.attr("y",Math.round(n-i.height))}return[r]},"drawKatex"),S=(0,c.K2)(function(t,e){let a=0,r=0;const s=e.text.split(o.Y2.lineBreakRegex),[i,d]=(0,n.I5)(e.fontSize);let l=[],h=0,p=(0,c.K2)(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":p=(0,c.K2)(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":p=(0,c.K2)(()=>Math.round(e.y+(a+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":p=(0,c.K2)(()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[o,c]of s.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==i&&(h=o*i);const s=t.append("text");s.attr("x",e.x),s.attr("y",p()),void 0!==e.anchor&&s.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&s.style("font-family",e.fontFamily),void 0!==d&&s.style("font-size",d),void 0!==e.fontWeight&&s.style("font-weight",e.fontWeight),void 0!==e.fill&&s.attr("fill",e.fill),void 0!==e.class&&s.attr("class",e.class),void 0!==e.dy?s.attr("dy",e.dy):0!==h&&s.attr("dy",h);const T=c||n.pe;if(e.tspan){const t=s.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(T)}else s.text(T);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(s._groups||s)[0][0].getBBox().height,a=r),l.push(s)}return l},"drawText"),A=(0,c.K2)(function(t,e){function a(t,e,a,r,s){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+r-s)+" "+(t+a-1.2*s)+","+(e+r)+" "+t+","+(e+r)}(0,c.K2)(a,"genPoints");const r=t.append("polygon");return r.attr("points",a(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,S(t,e),r},"drawLabel"),k=-1,C=(0,c.K2)((t,e,a,r)=>{t.select&&a.forEach(a=>{const s=e.get(a),i=t.select("#actor"+s.actorCnt);!r.mirrorActors&&s.stopy?i.attr("y2",s.stopy+s.height/2):r.mirrorActors&&i.attr("y2",s.stopy)})},"fixLifeLineHeights"),M=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower();var u=g;r||(k++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",N(`actor${k}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=k,null!=e.links&&u.attr("id","root-"+k),"neo"===l&&u.attr("data-look","neo"));const y=(0,s.PB)();var _="actor";e.properties?.class?_=e.properties.class:y.fill="#eaeaea",_+=r?` ${I}`:` ${b}`,y.x=e.x,y.y=n,y.width=e.width,y.height=e.height,y.class=_,y.rx=3,y.ry=3,y.name=e.name,"neo"===l&&(y.rx=6,y.ry=6);const O=w(u,y),x=i.get(e.name)??0;if(L.has(h)&&(O.style("stroke",E[x%E.length]),O.style("fill",T[x%E.length])),"neo"===l&&O.attr("filter","url(#drop-shadow)"),e.rectData=y,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,s.CP)(u,y.x+y.width-20,y.y+10,t.substr(1)):(0,s.aC)(u,y.x+y.width-20,y.y+10,t)}r||(u.attr("data-et","participant"),u.attr("data-type","participant"),u.attr("data-id",e.name)),it(a,(0,o.Wi)(e.description))(e.description,u,y.x,y.y,y.width,y.height,{class:`actor ${f}`},a);let m=e.height;if(O.node){const t=O.node().getBBox();e.height=t.height,m=t.height}return m},"drawActorTypeParticipant"),v=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower();var u=g;r||(k++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",N(`actor${k}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=k,null!=e.links&&u.attr("id","root-"+k),"neo"===l&&u.attr("data-look","neo"));const y=(0,s.PB)();var _="actor";e.properties?.class?_=e.properties.class:y.fill="#eaeaea",_+=r?` ${I}`:` ${b}`,y.x=e.x,y.y=n,y.width=e.width,y.height=e.height,y.class=_,y.name=e.name;const O={...y,x:y.x+-6,y:y.y+6,class:"actor"},x=w(u,y),m=w(u,O);e.rectData=y,"neo"===l&&u.attr("filter","url(#drop-shadow)");const R=i.get(e.name)??0;if(L.has(h)&&(x.style("stroke",E[R%E.length]),x.style("fill",T[R%E.length]),m.style("stroke",E[R%E.length]),m.style("fill",T[R%E.length])),e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,s.CP)(u,y.x+y.width-20,y.y+10,t.substr(1)):(0,s.aC)(u,y.x+y.width-20,y.y+10,t)}it(a,(0,o.Wi)(e.description))(e.description,u,y.x-6,y.y+6,y.width,y.height,{class:`actor ${f}`},a);let P=e.height;if(x.node){const t=x.node().getBBox();e.height=t.height,P=t.height}return r||(u.attr("data-et","participant"),u.attr("data-type","collections"),u.attr("data-id",e.name)),P},"drawActorTypeCollections"),Y=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower();let u=g;r||(k++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",N(`actor${k}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=k,null!=e.links&&u.attr("id","root-"+k),"neo"===l&&u.attr("data-look","neo"));const y=(0,s.PB)();let _="actor";e.properties?.class?_=e.properties.class:y.fill="#eaeaea",_+=r?` ${I}`:` ${b}`,u.attr("class",_),y.x=e.x,y.y=n,y.width=e.width,y.height=e.height,y.name=e.name;const O=y.height/2,x=O/(2.5+y.height/50),m=u.append("g"),R=u.append("g"),w=`M ${y.x},${y.y+O}\n a ${x},${O} 0 0 0 0,${y.height}\n h ${y.width-2*x}\n a ${x},${O} 0 0 0 0,-${y.height}\n Z\n `;m.append("path").attr("d",w),R.append("path").attr("d",`M ${y.x},${y.y+O}\n a ${x},${O} 0 0 0 0,${y.height}`),m.attr("transform",`translate(${x}, ${-y.height/2})`),R.attr("transform",`translate(${y.width-x}, ${-y.height/2})`),e.rectData=y,"neo"===l&&m.attr("filter","url(#drop-shadow)");const P=i.get(e.name)??0;if(L.has(h)&&(m.style("stroke",E[P%E.length]),m.style("fill",T[P%E.length]),R.style("stroke",E[P%E.length]),R.style("fill",T[P%E.length])),e.properties?.icon){const t=e.properties.icon.trim(),a=y.x+y.width-20,r=y.y+10;"@"===t.charAt(0)?(0,s.CP)(u,a,r,t.substr(1)):(0,s.aC)(u,a,r,t)}it(a,(0,o.Wi)(e.description))(e.description,u,y.x,y.y,y.width,y.height,{class:`actor ${f}`},a);let D=e.height;const S=m.select("path:last-child");if(S.node()){const t=S.node().getBBox();e.height=t.height,D=t.height}return r||(u.attr("data-et","participant"),u.attr("data-type","queue"),u.attr("data-id",e.name)),D},"drawActorTypeQueue"),B=(0,c.K2)(function(t,e,a,r,i,n){const c=r?e.stopy:e.starty,d=e.x+e.width/2,l=c+75,{look:h,theme:p,themeVariables:T}=a,{bkgColorArray:E,borderColorArray:g,actorBorder:u,actorBkg:y}=T,_=t.append("g").lower();r||(k++,_.append("line").attr("id","actor"+k).attr("x1",d).attr("y1",l).attr("x2",d).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=k);const O=t.append("g");let x=R;x+=r?` ${I}`:` ${b}`,O.attr("class",x),O.attr("name",e.name);const m=(0,s.PB)();m.x=e.x,m.y=c,m.fill="#eaeaea",m.width=e.width,m.height=e.height,m.class="actor";const f=e.x+e.width/2,w=c+32;O.append("defs").append("marker").attr("id",i+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),O.append("circle").attr("cx",f).attr("cy",w).attr("r",22).attr("filter",""+("neo"===h?"url(#drop-shadow)":"")),O.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${f}, ${w-22})`);const P=n.get(e.name)??0;L.has(p)?(O.style("stroke",g[P%g.length]),O.style("fill",E[P%g.length])):(O.style("stroke",u),O.style("fill",y));const N=O.node().getBBox();return e.height=N.height+2*(a?.sequence?.labelBoxHeight??0),it(a,(0,o.Wi)(e.description))(e.description,O,m.x,m.y+22+(r?5:12),m.width,m.height,{class:`actor ${R}`},a),r||(O.attr("data-et","participant"),O.attr("data-type","control"),O.attr("data-id",e.name)),e.height},"drawActorTypeControl"),K=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+75,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower(),u=t.append("g");let y="actor";y+=r?` ${I}`:` ${b}`,u.attr("class",y),u.attr("name",e.name);const _=(0,s.PB)();_.x=e.x,_.y=n,_.fill="#eaeaea",_.width=e.width,_.height=e.height,_.class="actor";const O=e.x+e.width/2,x=n+(r?10:25),m=22;u.append("circle").attr("cx",O).attr("cy",x).attr("r",m).attr("width",e.width).attr("height",e.height),u.append("line").attr("x1",O-m).attr("x2",O+m).attr("y1",x+m).attr("y2",x+m).attr("stroke-width",2),"neo"===l&&u.attr("filter","url(#drop-shadow)");const f=i.get(e.name)??0;L.has(h)&&(u.style("stroke",E[f%E.length]),u.style("fill",T[f%E.length]));const w=u.node().getBBox();return e.height=w.height+(a?.sequence?.labelBoxHeight??0),r||(k++,g.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=k),it(a,(0,o.Wi)(e.description))(e.description,u,_.x,_.y+(r?15:30),_.width,_.height,{class:`actor ${R}`},a),r?u.attr("transform","translate(0, 22)"):(u.attr("transform","translate(0, 6)"),u.attr("data-et","participant"),u.attr("data-type","entity"),u.attr("data-id",e.name)),e.height},"drawActorTypeEntity"),$=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height+2*a.boxTextMargin,{theme:l,themeVariables:h,look:p}=a,{bkgColorArray:T,borderColorArray:E,actorBorder:g}=h,u=t.append("g").lower();let y=u;r||(k++,Object.keys(e.links||{}).length&&!a.forceMenus&&y.attr("onclick",N(`actor${k}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),y=u.append("g"),e.actorCnt=k,null!=e.links&&y.attr("id","root-"+k),"neo"===p&&y.attr("data-look","neo"));const _=(0,s.PB)();let O="actor";e.properties?.class?O=e.properties.class:_.fill="#eaeaea",O+=r?` ${I}`:` ${b}`,_.x=e.x,_.y=n,_.width=e.width,_.height=e.height,_.class=O,_.name=e.name,_.x=e.x,_.y=n;const x=_.width/3,m=_.width/3,R=x/2,w=R/(2.5+x/50),P=y.append("g");P.attr("class",O);const D=`\n M ${_.x},${_.y+w}\n a ${R},${w} 0 0 0 ${x},0\n a ${R},${w} 0 0 0 -${x},0\n l 0,${m-2*w}\n a ${R},${w} 0 0 0 ${x},0\n l 0,-${m-2*w}\n`;P.append("path").attr("d",D),"neo"===p&&P.attr("filter","url(#drop-shadow)");const S=i.get(e.name)??0;L.has(l)?(P.style("stroke",E[S%E.length]),P.style("fill",T[S%E.length])):P.style("stroke",g),P.attr("transform",`translate(${x}, ${w})`),e.rectData=_,it(a,(0,o.Wi)(e.description))(e.description,y,_.x,_.y+35,_.width,_.height,{class:`actor ${f}`},a);const A=P.select("path:last-child");if(A.node()){const t=A.node().getBBox();e.height=t.height+(a.sequence.labelBoxHeight??0)}return r||(y.attr("data-et","participant"),y.attr("data-type","database"),y.attr("data-id",e.name)),e.height},"drawActorTypeDatabase"),V=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+80,l=t.append("g").lower(),{look:h,theme:p,themeVariables:T}=a,{bkgColorArray:E,borderColorArray:g,actorBorder:u}=T;r||(k++,l.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=k);const y=t.append("g");let _=R;_+=r?` ${I}`:` ${b}`,y.attr("class",_),y.attr("name",e.name);const O=(0,s.PB)();O.x=e.x,O.y=n,O.fill="#eaeaea",O.width=e.width,O.height=e.height,O.class="actor",y.append("line").attr("id","actor-man-torso"+k).attr("x1",e.x+e.width/2-55).attr("y1",n+12).attr("x2",e.x+e.width/2-15).attr("y2",n+12),y.append("line").attr("id","actor-man-arms"+k).attr("x1",e.x+e.width/2-55).attr("y1",n+2).attr("x2",e.x+e.width/2-55).attr("y2",n+22),y.append("circle").attr("cx",e.x+e.width/2).attr("cy",n+12).attr("r",22),"neo"===h&&y.attr("filter","url(#drop-shadow)");const x=i.get(e.name)??0;L.has(p)?(y.style("stroke",g[x%g.length]),y.style("fill",E[x%g.length])):y.style("stroke",u);const m=y.node().getBBox();return e.height=m.height+(a.sequence.labelBoxHeight??0),it(a,(0,o.Wi)(e.description))(e.description,y,O.x,O.y+15,O.width,O.height,{class:`actor ${R}`},a),y.attr("transform","translate(0,21)"),r||(y.attr("data-et","participant"),y.attr("data-type","boundary"),y.attr("data-id",e.name)),e.height},"drawActorTypeBoundary"),W=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+80,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E,actorBorder:g}=p,u=t.append("g").lower();r||(k++,u.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=k);const y=t.append("g");let _=R;_+=r?` ${I}`:` ${b}`,y.attr("class",_),y.attr("name",e.name),r||y.attr("data-et","participant").attr("data-type","actor").attr("data-id",e.name);const O="neo"===l?.5:1,x="neo"===l?n+30*(1-O):n;y.append("line").attr("id","actor-man-torso"+k).attr("x1",c).attr("y1",x+25*O).attr("x2",c).attr("y2",x+45*O),y.append("line").attr("id","actor-man-arms"+k).attr("x1",c-18*O).attr("y1",x+33*O).attr("x2",c+18*O).attr("y2",x+33*O),y.append("line").attr("x1",c-18*O).attr("y1",x+60*O).attr("x2",c).attr("y2",x+45*O),y.append("line").attr("x1",c).attr("y1",x+45*O).attr("x2",c+16*O).attr("y2",x+60*O);const m=y.append("circle");m.attr("cx",e.x+e.width/2),m.attr("cy",x+10*O),m.attr("r",15*O),m.attr("width",e.width*O),m.attr("height",e.height*O);const f=y.node().getBBox();e.height=f.height;const w=(0,s.PB)();w.x=e.x,w.y=x,w.fill="#eaeaea",w.width=e.width,w.height=e.height/O,w.class="actor",w.rx=3,w.ry=3;const P=i.get(e.name)??0;return L.has(h)?(y.style("stroke",E[P%E.length]),y.style("fill",T[P%E.length])):y.style("stroke",g),it(a,(0,o.Wi)(e.description))(e.description,y,w.x,x+35*O-("neo"===l?10:0),w.width,w.height,{class:`actor ${R}`},a),e.height},"drawActorTypeActor"),F=(0,c.K2)(async function(t,e,a,r,s,i,n){const o=n??new Map([...i.db.getActors().values()].map((t,e)=>[t.name,e]));switch(e.type){case"actor":return await W(t,e,a,r,o);case"participant":return await M(t,e,a,r,o);case"boundary":return await V(t,e,a,r,o);case"control":return await B(t,e,a,r,s,o);case"entity":return await K(t,e,a,r,o);case"database":return await $(t,e,a,r,o);case"collections":return await v(t,e,a,r,o);case"queue":return await Y(t,e,a,r,o)}},"drawActor"),H=(0,c.K2)(function(t,e,a){const r=t.append("g");U(r,e),e.name&&it(a)(e.name,r,e.x,e.y+a.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()},"drawBox"),q=(0,c.K2)(function(t){return t.append("g")},"anchorElement"),z=(0,c.K2)(function(t,e,a,r,i,n,o){const{theme:c,themeVariables:d}=r,{bkgColorArray:l,borderColorArray:h,mainBkg:p}=d,T=(0,s.PB)(),E=e.anchored,g=e.actor;T.x=e.startx,T.y=e.starty,T.class="activation"+i%3,T.width=e.stopx-e.startx,T.height=a-e.starty;const u=w(E,T),y=(o??new Map([...n.db.getActors().values()].map((t,e)=>[t.name,e]))).get(g)??0;L.has(c)&&(u.style("stroke",h[y%h.length]),u.style("fill",l[y%h.length]??p))},"drawActivation"),j=(0,c.K2)(async function(t,e,a,r,i){const{boxMargin:n,boxTextMargin:d,labelBoxHeight:l,labelBoxWidth:h,messageFontFamily:p,messageFontSize:T,messageFontWeight:E}=r,g=t.append("g").attr("data-et","control-structure").attr("data-id","i"+i.id),u=(0,c.K2)(function(t,e,a,r){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")},"drawLoopLine");u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")});let y=(0,s.HT)();y.text=a,y.x=e.startx,y.y=e.starty,y.fontFamily=p,y.fontSize=T,y.fontWeight=E,y.anchor="middle",y.valign="middle",y.tspan=!1,y.width=Math.max(h??0,50),y.height=l+("neo"===r.look?15:0)||20,y.textMargin=d,y.class="labelText",A(g,y),y=rt(),y.text=e.title,y.x=e.startx+h/2+(e.stopx-e.startx)/2,y.y=e.starty+n+d,y.anchor="middle",y.valign="middle",y.textMargin=d,y.class="loopText",y.fontFamily=p,y.fontSize=T,y.fontWeight=E,y.wrap=!0;let _=(0,o.Wi)(y.text)?await D(g,y,e):S(g,y);if(void 0!==e.sectionTitles)for(const[s,c]of Object.entries(e.sectionTitles))if(c.message){y.text=c.message,y.x=e.startx+(e.stopx-e.startx)/2,y.y=e.sections[s].y+n+d,y.class="sectionTitle",y.anchor="middle",y.valign="middle",y.tspan=!1,y.fontFamily=p,y.fontSize=T,y.fontWeight=E,y.wrap=e.wrap,(0,o.Wi)(y.text)?(e.starty=e.sections[s].y,await D(g,y,e)):S(g,y);let t=Math.round(_.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));e.sections[s].height+=t-(n+d)}return e.height=Math.round(e.stopy-e.starty),g},"drawLoop"),U=(0,c.K2)(function(t,e){(0,s.lC)(t,e)},"drawBackgroundRect"),G=(0,c.K2)(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"),X=(0,c.K2)(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"),J=(0,c.K2)(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"),Z=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Q=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",15.5).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"),tt=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),et=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),at=(0,c.K2)(function(t,e){const{theme:a}=e;t.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+("redux"===a||"redux-color"===a?"#000000":"#FFFFFF"))},"insertDropShadow"),rt=(0,c.K2)(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),st=(0,c.K2)(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),it=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a+i/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,r,i,c,d,l){const{actorFontSize:h,actorFontFamily:p,actorFontWeight:T}=l,[E,g]=(0,n.I5)(h),u=t.split(o.Y2.lineBreakRegex);for(let n=0;n<u.length;n++){const t=n*E-E*(u.length-1)/2,o=e.append("text").attr("x",a+i/2).attr("y",r).style("text-anchor","middle").style("font-size",g).style("font-weight",T).style("font-family",p);o.append("tspan").attr("x",a+i/2).attr("dy",t).text(u[n]),o.attr("y",r+c/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(o,d)}}function a(t,a,r,i,n,o,c,d){const l=a.append("switch"),h=l.append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,r,i,n,o,c,d),s(h,c)}async function r(t,a,r,i,n,c,d,l){const h=await(0,o.Dl)(t,(0,o.zj)()),p=a.append("switch"),T=p.append("foreignObject").attr("x",r+n/2-h.width/2).attr("y",i+c/2-h.height/2).attr("width",h.width).attr("height",h.height).append("xhtml:div").style("height","100%").style("width","100%");T.append("div").style("text-align","center").style("vertical-align","middle").html(await(0,o.dj)(t,(0,o.zj)())),e(t,p,r,i,n,c,d,l),s(T,d)}function s(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return(0,c.K2)(t,"byText"),(0,c.K2)(e,"byTspan"),(0,c.K2)(a,"byFo"),(0,c.K2)(r,"byKatex"),(0,c.K2)(s,"_setTextAttrs"),function(s,i=!1){return i?r:"fo"===s.textPlacement?a:"old"===s.textPlacement?t:e}}(),nt=function(){function t(t,e,a,s,i,n,o){r(e.append("text").attr("x",a).attr("y",s).style("text-anchor","start").text(t),o)}function e(t,e,a,s,i,n,c,d){const{actorFontSize:l,actorFontFamily:h,actorFontWeight:p}=d,T=t.split(o.Y2.lineBreakRegex);for(let o=0;o<T.length;o++){const t=o*l-l*(T.length-1)/2,i=e.append("text").attr("x",a).attr("y",s).style("text-anchor","start").style("font-size",l).style("font-weight",p).style("font-family",h);i.append("tspan").attr("x",a).attr("dy",t).text(T[o]),i.attr("y",s+n/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(i,c)}}function a(t,a,s,i,n,o,c,d){const l=a.append("switch"),h=l.append("foreignObject").attr("x",s).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,s,i,0,o,c,d),r(h,c)}function r(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return(0,c.K2)(t,"byText"),(0,c.K2)(e,"byTspan"),(0,c.K2)(a,"byFo"),(0,c.K2)(r,"_setTextAttrs"),function(r){return"fo"===r.textPlacement?a:"old"===r.textPlacement?t:e}}(),ot=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),ct=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),dt=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),lt=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),ht={drawRect:w,drawText:S,drawLabel:A,drawActor:F,drawBox:H,drawPopup:P,anchorElement:q,drawActivation:z,drawLoop:j,drawBackgroundRect:U,insertArrowHead:Z,insertArrowFilledHead:Q,insertSequenceNumber:tt,insertArrowCrossHead:et,insertDatabaseIcon:G,insertComputerIcon:X,insertClockIcon:J,getTextObj:rt,getNoteRect:st,fixLifeLineHeights:C,sanitizeUrl:l.J,insertDropShadow:at,insertSolidTopArrowHead:ot,insertSolidBottomArrowHead:ct,insertStickTopArrowHead:dt,insertStickBottomArrowHead:lt},pt={},Tt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:(0,c.K2)(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:(0,c.K2)(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:(0,c.K2)(function(t){this.boxes.push(t)},"addBox"),addActor:(0,c.K2)(function(t){this.actors.push(t)},"addActor"),addLoop:(0,c.K2)(function(t){this.loops.push(t)},"addLoop"),addMessage:(0,c.K2)(function(t){this.messages.push(t)},"addMessage"),addNote:(0,c.K2)(function(t){this.notes.push(t)},"addNote"),lastActor:(0,c.K2)(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:(0,c.K2)(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:(0,c.K2)(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:(0,c.K2)(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,c.K2)(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,ft((0,o.D7)())},"init"),updateVal:(0,c.K2)(function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])},"updateVal"),updateBounds:(0,c.K2)(function(t,e,a,r){const s=this;let i=0;function n(n){return(0,c.K2)(function(o){i++;const c=s.sequenceItems.length-i+1;s.updateVal(o,"starty",e-c*pt.boxMargin,Math.min),s.updateVal(o,"stopy",r+c*pt.boxMargin,Math.max),s.updateVal(Tt.data,"startx",t-c*pt.boxMargin,Math.min),s.updateVal(Tt.data,"stopx",a+c*pt.boxMargin,Math.max),"activation"!==n&&(s.updateVal(o,"startx",t-c*pt.boxMargin,Math.min),s.updateVal(o,"stopx",a+c*pt.boxMargin,Math.max),s.updateVal(Tt.data,"starty",e-c*pt.boxMargin,Math.min),s.updateVal(Tt.data,"stopy",r+c*pt.boxMargin,Math.max))},"updateItemBounds")}(0,c.K2)(n,"updateFn"),this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))},"updateBounds"),insert:(0,c.K2)(function(t,e,a,r){const s=o.Y2.getMin(t,a),i=o.Y2.getMax(t,a),n=o.Y2.getMin(e,r),c=o.Y2.getMax(e,r);this.updateVal(Tt.data,"startx",s,Math.min),this.updateVal(Tt.data,"starty",n,Math.min),this.updateVal(Tt.data,"stopx",i,Math.max),this.updateVal(Tt.data,"stopy",c,Math.max),this.updateBounds(s,n,i,c)},"insert"),newActivation:(0,c.K2)(function(t,e,a){const r=a.get(t.from),s=Rt(t.from).length||0,i=r.x+r.width/2+(s-1)*pt.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+pt.activationWidth,stopy:void 0,actor:t.from,anchored:ht.anchorElement(e)})},"newActivation"),endActivation:(0,c.K2)(function(t){const e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:(0,c.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:(0,c.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:(0,c.K2)(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:(0,c.K2)(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:(0,c.K2)(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Tt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:(0,c.K2)(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:(0,c.K2)(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:(0,c.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=o.Y2.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:(0,c.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,c.K2)(function(){return{bounds:this.data,models:this.models}},"getBounds")},Et=(0,c.K2)(async function(t,e,a){Tt.bumpVerticalPos(pt.boxMargin),e.height=pt.boxMargin,e.starty=Tt.getVerticalPos();const r=(0,s.PB)();r.x=e.startx,r.y=e.starty,r.width=e.width||pt.width,r.class="note";const i=t.append("g");i.attr("data-et","note"),i.attr("data-id","i"+a);const n=ht.drawRect(i,r),c=(0,s.HT)();c.x=e.startx,c.y=e.starty,c.width=r.width,c.dy="1em",c.text=e.message,c.class="noteText",c.fontFamily=pt.noteFontFamily,c.fontSize=pt.noteFontSize,c.fontWeight=pt.noteFontWeight,c.anchor=pt.noteAlign,c.textMargin=pt.noteMargin,c.valign="center";const d=(0,o.Wi)(c.text)?await D(i,c):S(i,c),l=Math.round(d.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));n.attr("height",l+2*pt.noteMargin),e.height+=l+2*pt.noteMargin,Tt.bumpVerticalPos(l+2*pt.noteMargin),e.stopy=e.starty+l+2*pt.noteMargin,e.stopx=e.startx+r.width,Tt.insert(e.startx,e.starty,e.stopx,e.stopy),Tt.models.addNote(e)},"drawNote"),gt=(0,c.K2)(function(t,e,a,r,s,i,n){const o=r.db.getActors(),d=o.get(e.from),l=o.get(e.to),h=a.sequenceVisible;let p=d.x+d.width/2,T=l.x+l.width/2;const E=p<=T,g=vt(e,r),u=t.append("g"),y=(0,c.K2)((t,e)=>{const a=t?16.5:-16.5;return e?-a:a},"getCircleOffset"),_=(0,c.K2)(t=>{u.append("circle").attr("cx",t).attr("cy",n).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:O,CENTRAL_CONNECTION_REVERSE:x,CENTRAL_CONNECTION_DUAL:m}=r.db.LINETYPE;if(h)switch(e.centralConnection){case O:g&&(T+=y(E,!0));break;case x:g||(p+=y(E,!1));break;case m:g?T+=y(E,!0):p+=y(E,!1)}switch(e.centralConnection){case O:_(T);break;case x:_(p);break;case m:_(p),_(T)}},"drawCentralConnection"),ut=(0,c.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),yt=(0,c.K2)(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),_t=(0,c.K2)(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function Ot(t,e){Tt.bumpVerticalPos(10);const{startx:a,stopx:r,message:s}=e,i=o.Y2.splitBreaks(s).length,c=(0,o.Wi)(s),d=c?await(0,o.Dl)(s,(0,o.D7)()):n._K.calculateTextDimensions(s,ut(pt));if(!c){const t=d.height/i;e.height+=t,Tt.bumpVerticalPos(t)}let l,h=d.height-10;const p=d.width;if(a===r){l=Tt.getVerticalPos()+h,pt.rightAngles||(h+=pt.boxMargin,l=Tt.getVerticalPos()+h),h+=30;const t=o.Y2.getMax(p/2,pt.width/2);Tt.insert(a-t,Tt.getVerticalPos()-10+h,r+t,Tt.getVerticalPos()+30+h)}else h+=pt.boxMargin,l=Tt.getVerticalPos()+h,Tt.insert(a,l-10,r,l);return Tt.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,Tt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}(0,c.K2)(Ot,"boundMessage");var xt=(0,c.K2)(async function(t,e,a,r,i,c){const{startx:d,stopx:l,starty:h,message:p,type:T,sequenceIndex:E,sequenceVisible:g}=e,u=n._K.calculateTextDimensions(p,ut(pt)),y=(0,s.HT)();y.x=Math.min(d,l),y.y=h+10,y.width=Math.abs(l-d),y.class="messageText",y.dy="1em",y.text=p,y.fontFamily=pt.messageFontFamily,y.fontSize=pt.messageFontSize,y.fontWeight=pt.messageFontWeight,y.anchor=pt.messageAlign,y.valign="center",y.textMargin=pt.wrapPadding,y.tspan=!1,(0,o.Wi)(y.text)?await D(t,y,{startx:d,stopx:l,starty:a}):S(t,y);const _=u.width;let O;if(d===l){const s=g||pt.showSequenceNumbers,n=vt(i,r),c=Yt(i,r),h=d+(s&&(n||c)?10:0);O=pt.rightAngles?t.append("path").attr("d",`M ${h},${a} H ${d+o.Y2.getMax(pt.width/2,_/2)} V ${a+25} H ${d}`):t.append("path").attr("d","M "+h+","+a+" C "+(h+60)+","+(a-10)+" "+(d+60)+","+(a+30)+" "+d+","+(a+20)),Ct(i,r)&&gt(t,i,e,r,d,l,a)}else O=t.append("line"),O.attr("x1",d),O.attr("y1",a),O.attr("x2",l),O.attr("y2",a),Ct(i,r)&&gt(t,i,e,r,d,l,a);T===r.db.LINETYPE.DOTTED||T===r.db.LINETYPE.DOTTED_CROSS||T===r.db.LINETYPE.DOTTED_POINT||T===r.db.LINETYPE.DOTTED_OPEN||T===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||T===r.db.LINETYPE.SOLID_TOP_DOTTED||T===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||T===r.db.LINETYPE.STICK_TOP_DOTTED||T===r.db.LINETYPE.STICK_BOTTOM_DOTTED||T===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(O.style("stroke-dasharray","3, 3"),O.attr("class","messageLine1")):O.attr("class","messageLine0"),O.attr("data-et","message"),O.attr("data-id","i"+e.id),O.attr("data-from",e.from),O.attr("data-to",e.to);let x="";if(pt.arrowMarkerAbsolute&&(x=(0,o.ID)(!0)),O.attr("stroke-width",2),O.attr("stroke","none"),O.style("fill","none"),T!==r.db.LINETYPE.SOLID_TOP&&T!==r.db.LINETYPE.SOLID_TOP_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-solidTopArrowHead)"),T!==r.db.LINETYPE.SOLID_BOTTOM&&T!==r.db.LINETYPE.SOLID_BOTTOM_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-solidBottomArrowHead)"),T!==r.db.LINETYPE.STICK_TOP&&T!==r.db.LINETYPE.STICK_TOP_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-stickTopArrowHead)"),T!==r.db.LINETYPE.STICK_BOTTOM&&T!==r.db.LINETYPE.STICK_BOTTOM_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-stickBottomArrowHead)"),T!==r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE&&T!==r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-solidBottomArrowHead)"),T!==r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE&&T!==r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-solidTopArrowHead)"),T!==r.db.LINETYPE.STICK_ARROW_TOP_REVERSE&&T!==r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-stickBottomArrowHead)"),T!==r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE&&T!==r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-stickTopArrowHead)"),T!==r.db.LINETYPE.SOLID&&T!==r.db.LINETYPE.DOTTED||O.attr("marker-end","url("+x+"#"+c+"-arrowhead)"),T!==r.db.LINETYPE.BIDIRECTIONAL_SOLID&&T!==r.db.LINETYPE.BIDIRECTIONAL_DOTTED||(O.attr("marker-start","url("+x+"#"+c+"-arrowhead)"),O.attr("marker-end","url("+x+"#"+c+"-arrowhead)")),T!==r.db.LINETYPE.SOLID_POINT&&T!==r.db.LINETYPE.DOTTED_POINT||O.attr("marker-end","url("+x+"#"+c+"-filled-head)"),T!==r.db.LINETYPE.SOLID_CROSS&&T!==r.db.LINETYPE.DOTTED_CROSS||O.attr("marker-end","url("+x+"#"+c+"-crosshead)"),g||pt.showSequenceNumbers){const s=T===r.db.LINETYPE.BIDIRECTIONAL_SOLID||T===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,n=T===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||T===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||T===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||T===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||T===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,o=6,h=Ct(i,r);let p=d,g=l;s?(d<l?p=d+2*o:(p=d-o+(h?-5:0),p+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),O.attr("x1",p)):n?(l>d?g=l-2*o:(g=l-o,p+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),g+=h?15:0,O.attr("x2",g),O.attr("x1",p)):O.attr("x1",d+o);let u=0;const y=d<=l;u=d===l?e.fromBounds+1:n?y?e.toBounds-1:e.fromBounds+1:y?e.fromBounds+1:e.toBounds-1;let _="12px";const m=E.toString().length;m>5?_="7px":m>3&&(_="9px"),t.append("line").attr("x1",u).attr("y1",a).attr("x2",u).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+x+"#"+c+"-sequencenumber)"),t.append("text").attr("x",u).attr("y",a+4).attr("font-family","sans-serif").attr("font-size",_).attr("text-anchor","middle").attr("class","sequenceNumber").text(E)}},"drawMessage"),mt=(0,c.K2)(function(t,e,a,r,s,i,n){let c,d=0,l=0,h=0;for(const p of r){const t=e.get(p),r=t.box;c&&c!=r&&(n||Tt.models.addBox(c),l+=pt.boxMargin+c.margin),r&&r!=c&&(n||(r.x=d+l,r.y=s),l+=r.margin),t.width=o.Y2.getMax(t.width||pt.width,pt.width),t.height=o.Y2.getMax(t.height||pt.height,pt.height),t.margin=t.margin||pt.actorMargin,h=o.Y2.getMax(h,t.height),a.get(t.name)&&(l+=t.width/2),t.x=d+l,t.starty=Tt.getVerticalPos(),Tt.insert(t.x,s,t.x+t.width,t.height),d+=t.width+l,t.box&&(t.box.width=d+r.margin-t.box.x),l=t.margin,c=t.box,Tt.models.addActor(t)}c&&!n&&Tt.models.addBox(c),Tt.bumpVerticalPos(h)},"addActorRenderingData"),bt=(0,c.K2)(async function(t,e,a,r,s,i,n){if(r){let r=0;Tt.bumpVerticalPos(2*pt.boxMargin);for(const c of a){const a=e.get(c);a.stopy||(a.stopy=Tt.getVerticalPos());const d=await ht.drawActor(t,a,pt,!0,s,i,n);r=o.Y2.getMax(r,d)}Tt.bumpVerticalPos(r+pt.boxMargin)}else for(const o of a){const a=e.get(o);await ht.drawActor(t,a,pt,!1,s,i,n)}},"drawActors"),It=(0,c.K2)(function(t,e,a,r){let s=0,i=0;for(const n of a){const a=e.get(n),o=St(a),c=ht.drawPopup(t,a,o,pt,pt.forceMenus,r);c.height>s&&(s=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:s,maxWidth:i}},"drawActorsPopup"),ft=(0,c.K2)(function(t){(0,o.hH)(pt,t),t.fontFamily&&(pt.actorFontFamily=pt.noteFontFamily=pt.messageFontFamily=t.fontFamily),t.fontSize&&(pt.actorFontSize=pt.noteFontSize=pt.messageFontSize=t.fontSize),t.fontWeight&&(pt.actorFontWeight=pt.noteFontWeight=pt.messageFontWeight=t.fontWeight)},"setConf"),Rt=(0,c.K2)(function(t){return Tt.activations.filter(function(e){return e.actor===t})},"actorActivations"),Lt=(0,c.K2)(function(t,e){const a=e.get(t),r=Rt(t);return[r.reduce(function(t,e){return o.Y2.getMin(t,e.startx)},a.x+a.width/2-1),r.reduce(function(t,e){return o.Y2.getMax(t,e.stopx)},a.x+a.width/2+1)]},"activationBounds");function wt(t,e,a,r,s){Tt.bumpVerticalPos(a);let i=r;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,s=ut(pt);e.message=n._K.wrapLabel(`[${e.message}]`,a-2*pt.wrapPadding,s),e.width=a,e.wrap=!0;const d=n._K.calculateTextDimensions(e.message,s),l=o.Y2.getMax(d.height,pt.labelBoxHeight);i=r+l,c.Rm.debug(`${l} - ${e.message}`)}s(e),Tt.bumpVerticalPos(i)}function Pt(t,e,a,r,s,i,n){function o(a,r){a.x<s.get(t.from).x?(Tt.insert(e.stopx-r,e.starty,e.startx,e.stopy+a.height/2+pt.noteMargin),e.stopx=e.stopx+r):(Tt.insert(e.startx,e.starty,e.stopx+r,e.stopy+a.height/2+pt.noteMargin),e.stopx=e.stopx-r)}function d(a,r){a.x<s.get(t.to).x?(Tt.insert(e.startx-r,e.starty,e.stopx,e.stopy+a.height/2+pt.noteMargin),e.startx=e.startx+r):(Tt.insert(e.stopx,e.starty,e.startx+r,e.stopy+a.height/2+pt.noteMargin),e.startx=e.startx-r)}(0,c.K2)(o,"receiverAdjustment"),(0,c.K2)(d,"senderAdjustment");const l=[u,y,O,_];if(i.get(t.to)==r){const e=s.get(t.to);o(e,l.includes(e.type)?21:e.width/2+3),e.starty=a-e.height/2,Tt.bumpVerticalPos(e.height/2)}else if(n.get(t.from)==r){const e=s.get(t.from);if(pt.mirrorActors){d(e,l.includes(e.type)?18:e.width/2)}e.stopy=a-e.height/2,Tt.bumpVerticalPos(e.height/2)}else if(n.get(t.to)==r){const e=s.get(t.to);if(pt.mirrorActors){o(e,l.includes(e.type)?21:e.width/2+3)}e.stopy=a-e.height/2,Tt.bumpVerticalPos(e.height/2)}}(0,c.K2)(wt,"adjustLoopHeightForWrap"),(0,c.K2)(Pt,"adjustCreatedDestroyedData");var Nt=(0,c.K2)(async function(t,e,a,r){const{securityLevel:s,sequence:i,look:n}=(0,o.D7)();let l;pt=i,"sandbox"===s&&(l=(0,d.Ltv)("#i"+e));const h="sandbox"===s?(0,d.Ltv)(l.nodes()[0].contentDocument.body):(0,d.Ltv)("body"),p="sandbox"===s?l.nodes()[0].contentDocument:document;Tt.init(),c.Rm.debug(r.db);const T="sandbox"===s?h.select(`[id="${e}"]`):(0,d.Ltv)(`[id="${e}"]`),E=r.db.getActors(),g=r.db.getCreatedActors(),u=r.db.getDestroyedActors(),y=r.db.getBoxes();let _=r.db.getActorKeys();const O=r.db.getMessages(),x=r.db.getDiagramTitle(),m=r.db.hasAtLeastOneBox(),b=r.db.hasAtLeastOneBoxWithTitle(),I=await Dt(E,O,r);if(pt.height=await At(E,I,y),ht.insertComputerIcon(T,e),ht.insertDatabaseIcon(T,e),ht.insertClockIcon(T,e),m&&(Tt.bumpVerticalPos(pt.boxMargin),b&&Tt.bumpVerticalPos(y[0].textMaxHeight)),!0===pt.hideUnusedParticipants){const t=new Set;O.forEach(e=>{t.add(e.from),t.add(e.to)}),_=_.filter(e=>t.has(e))}const f=new Map(_.map((t,e)=>[E.get(t)?.name??t,e]));mt(T,E,g,_,0,O,!1);const R=await Kt(O,E,I,r);function L(t,e){const a=Tt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),ht.drawActivation(T,a,e,pt,Rt(t.from).length,r,f),Tt.insert(a.startx,e-10,a.stopx,e)}ht.insertArrowHead(T,e),ht.insertArrowCrossHead(T,e),ht.insertArrowFilledHead(T,e),ht.insertSequenceNumber(T,e),ht.insertSolidTopArrowHead(T,e),ht.insertSolidBottomArrowHead(T,e),ht.insertStickTopArrowHead(T,e),ht.insertStickBottomArrowHead(T,e),"neo"===n&&ht.insertDropShadow(T,pt),(0,c.K2)(L,"activeEnd");let w=1,P=1;const N=[],D=[];let S=0;for(const o of O){let t,e,a;switch(o.type){case r.db.LINETYPE.NOTE:Tt.resetVerticalPos(),e=o.noteModel,await Et(T,e,o.id);break;case r.db.LINETYPE.ACTIVE_START:case r.db.LINETYPE.CENTRAL_CONNECTION:case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Tt.newActivation(o,T,E);break;case r.db.LINETYPE.ACTIVE_END:L(o,Tt.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t));break;case r.db.LINETYPE.LOOP_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"loop",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:wt(R,o,pt.boxMargin,pt.boxMargin,t=>Tt.newLoop(void 0,t.message));break;case r.db.LINETYPE.RECT_END:t=Tt.endLoop(),D.push(t),Tt.models.addLoop(t),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos());break;case r.db.LINETYPE.OPT_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t));break;case r.db.LINETYPE.OPT_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"opt",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t));break;case r.db.LINETYPE.ALT_ELSE:wt(R,o,pt.boxMargin+pt.boxTextMargin,pt.boxMargin,t=>Tt.addSectionToLoop(t));break;case r.db.LINETYPE.ALT_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"alt",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t)),Tt.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:wt(R,o,pt.boxMargin+pt.boxTextMargin,pt.boxMargin,t=>Tt.addSectionToLoop(t));break;case r.db.LINETYPE.PAR_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"par",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:w=o.message.start||w,P=o.message.step||P,o.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t));break;case r.db.LINETYPE.CRITICAL_OPTION:wt(R,o,pt.boxMargin+pt.boxTextMargin,pt.boxMargin,t=>Tt.addSectionToLoop(t));break;case r.db.LINETYPE.CRITICAL_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"critical",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t));break;case r.db.LINETYPE.BREAK_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"break",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;default:try{a=o.msgModel,a.starty=Tt.getVerticalPos(),a.sequenceIndex=w,a.sequenceVisible=r.db.showSequenceNumbers(),a.id=o.id,a.from=o.from,a.to=o.to;const t=await Ot(0,a);Pt(o,a,t,S,E,g,u),N.push({messageModel:a,lineStartY:t,msg:o}),Tt.models.addMessage(a)}catch(V){c.Rm.error("error while drawing message",V)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(o.type)&&(w=Math.round(100*(w+P))/100),S++}c.Rm.debug("createdActors",g),c.Rm.debug("destroyedActors",u),await bt(T,E,_,!1,e,r,f);for(const o of N)await xt(T,o.messageModel,o.lineStartY,r,o.msg,e);pt.mirrorActors&&await bt(T,E,_,!0,e,r,f),D.forEach(t=>ht.drawBackgroundRect(T,t)),C(T,E,_,pt);for(const o of Tt.models.boxes){o.height=Tt.getVerticalPos()-o.y,Tt.insert(o.x,o.y,o.x+o.width,o.height);const t=2*pt.boxMargin;o.startx=o.x-t,o.starty=o.y-.25*t,o.stopx=o.startx+o.width+2*t,o.stopy=o.starty+o.height+.75*t,o.stroke="rgb(0,0,0, 0.5)",ht.drawBox(T,o,pt)}m&&Tt.bumpVerticalPos(pt.boxMargin);const A=It(T,E,_,p),{bounds:k}=Tt.getBounds();void 0===k.startx&&(k.startx=0),void 0===k.starty&&(k.starty=0),void 0===k.stopx&&(k.stopx=0),void 0===k.stopy&&(k.stopy=0);let M=k.stopy-k.starty;M<A.maxHeight&&(M=A.maxHeight);let v=M+2*pt.diagramMarginY;pt.mirrorActors&&(v=v-pt.boxMargin+pt.bottomMarginAdj);let Y=k.stopx-k.startx;Y<A.maxWidth&&(Y=A.maxWidth);const B=Y+2*pt.diagramMarginX;x&&T.append("text").text(x).attr("x",(k.stopx-k.startx)/2-2*pt.diagramMarginX).attr("y",-25),(0,o.a$)(T,v,B,pt.useMaxWidth);const K=x?40:0,$=E.size&&"neo"===n?30:0;T.attr("viewBox",k.startx-pt.diagramMarginX+" -"+(pt.diagramMarginY+K)+" "+B+" "+(v+K+$)),c.Rm.debug("models:",Tt.models)},"draw");async function Dt(t,e,a){const r={};for(const s of e)if(t.get(s.to)&&t.get(s.from)){const e=t.get(s.to);if(s.placement===a.db.PLACEMENT.LEFTOF&&!e.prevActor)continue;if(s.placement===a.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;const i=void 0!==s.placement,c=!i,d=i?yt(pt):ut(pt),l=s.wrap?n._K.wrapLabel(s.message,pt.width-2*pt.wrapPadding,d):s.message,h=((0,o.Wi)(l)?await(0,o.Dl)(s.message,(0,o.D7)()):n._K.calculateTextDimensions(l,d)).width+2*pt.wrapPadding;c&&s.from===e.nextActor?r[s.to]=o.Y2.getMax(r[s.to]||0,h):c&&s.from===e.prevActor?r[s.from]=o.Y2.getMax(r[s.from]||0,h):c&&s.from===s.to?(r[s.from]=o.Y2.getMax(r[s.from]||0,h/2),r[s.to]=o.Y2.getMax(r[s.to]||0,h/2)):s.placement===a.db.PLACEMENT.RIGHTOF?r[s.from]=o.Y2.getMax(r[s.from]||0,h):s.placement===a.db.PLACEMENT.LEFTOF?r[e.prevActor]=o.Y2.getMax(r[e.prevActor]||0,h):s.placement===a.db.PLACEMENT.OVER&&(e.prevActor&&(r[e.prevActor]=o.Y2.getMax(r[e.prevActor]||0,h/2)),e.nextActor&&(r[s.from]=o.Y2.getMax(r[s.from]||0,h/2)))}return c.Rm.debug("maxMessageWidthPerActor:",r),r}(0,c.K2)(Dt,"getMaxMessageWidthPerActor");var St=(0,c.K2)(function(t){let e=0;const a=_t(pt);for(const r in t.links){const t=n._K.calculateTextDimensions(r,a).width+2*pt.wrapPadding+2*pt.boxMargin;e<t&&(e=t)}return e},"getRequiredPopupWidth");async function At(t,e,a){let r=0;for(const i of t.keys()){const e=t.get(i);e.wrap&&(e.description=n._K.wrapLabel(e.description,pt.width-2*pt.wrapPadding,_t(pt)));const a=(0,o.Wi)(e.description)?await(0,o.Dl)(e.description,(0,o.D7)()):n._K.calculateTextDimensions(e.description,_t(pt));e.width=e.wrap?pt.width:o.Y2.getMax(pt.width,a.width+2*pt.wrapPadding),e.height=e.wrap?o.Y2.getMax(a.height,pt.height):pt.height,r=o.Y2.getMax(r,e.height)}for(const i in e){const a=t.get(i);if(!a)continue;const r=t.get(a.nextActor);if(!r){const t=e[i]+pt.actorMargin-a.width/2;a.margin=o.Y2.getMax(t,pt.actorMargin);continue}const s=e[i]+pt.actorMargin-a.width/2-r.width/2;a.margin=o.Y2.getMax(s,pt.actorMargin)}let s=0;return a.forEach(e=>{const a=ut(pt);let r=e.actorKeys.reduce((e,a)=>e+(t.get(a).width+(t.get(a).margin||0)),0);r+=8*pt.boxMargin,r-=2*pt.boxTextMargin,e.wrap&&(e.name=n._K.wrapLabel(e.name,r-2*pt.wrapPadding,a));const i=n._K.calculateTextDimensions(e.name,a);s=o.Y2.getMax(i.height,s);const c=o.Y2.getMax(r,i.width+2*pt.wrapPadding);if(e.margin=pt.boxTextMargin,r<c){const t=(c-r)/2;e.margin+=t}}),a.forEach(t=>t.textMaxHeight=s),o.Y2.getMax(r,pt.height)}(0,c.K2)(At,"calculateActorMargins");var kt=(0,c.K2)(async function(t,e,a){const r=e.get(t.from),s=e.get(t.to),i=r.x,d=s.x,l=t.wrap&&t.message;let h=(0,o.Wi)(t.message)?await(0,o.Dl)(t.message,(0,o.D7)()):n._K.calculateTextDimensions(l?n._K.wrapLabel(t.message,pt.width,yt(pt)):t.message,yt(pt));const p={width:l?pt.width:o.Y2.getMax(pt.width,h.width+2*pt.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(p.width=l?o.Y2.getMax(pt.width,h.width):o.Y2.getMax(r.width/2+s.width/2,h.width+2*pt.noteMargin),p.startx=i+(r.width+pt.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(p.width=l?o.Y2.getMax(pt.width,h.width+2*pt.noteMargin):o.Y2.getMax(r.width/2+s.width/2,h.width+2*pt.noteMargin),p.startx=i-p.width+(r.width-pt.actorMargin)/2):t.to===t.from?(h=n._K.calculateTextDimensions(l?n._K.wrapLabel(t.message,o.Y2.getMax(pt.width,r.width),yt(pt)):t.message,yt(pt)),p.width=l?o.Y2.getMax(pt.width,r.width):o.Y2.getMax(r.width,pt.width,h.width+2*pt.noteMargin),p.startx=i+(r.width-p.width)/2):(p.width=Math.abs(i+r.width/2-(d+s.width/2))+pt.actorMargin,p.startx=i<d?i+r.width/2-pt.actorMargin/2:d+s.width/2-pt.actorMargin/2),l&&(p.message=n._K.wrapLabel(t.message,p.width-2*pt.wrapPadding,yt(pt))),c.Rm.debug(`NM:[${p.startx},${p.stopx},${p.starty},${p.stopy}:${p.width},${p.height}=${t.message}]`),p},"buildNoteModel"),Ct=(0,c.K2)(function(t,e){const{CENTRAL_CONNECTION:a,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:s}=e.db.LINETYPE;return[a,r,s].includes(t.centralConnection)},"hasCentralConnection"),Mt=(0,c.K2)(function(t,e,a){const{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:s,BIDIRECTIONAL_SOLID:i,BIDIRECTIONAL_DOTTED:n}=e.db.LINETYPE;let o=0;return t.centralConnection!==r&&t.centralConnection!==s||(o+=4),t.centralConnection!==r&&t.centralConnection!==s||t.type!==i&&t.type!==n||(o+=a?0:-6),o},"calculateCentralConnectionOffset"),vt=(0,c.K2)(function(t,e){const{SOLID_ARROW_TOP_REVERSE:a,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:s,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:i,STICK_ARROW_TOP_REVERSE:n,STICK_ARROW_TOP_REVERSE_DOTTED:o,STICK_ARROW_BOTTOM_REVERSE:c,STICK_ARROW_BOTTOM_REVERSE_DOTTED:d}=e.db.LINETYPE;return[a,r,s,i,n,o,c,d].includes(t.type)},"isReverseArrowType"),Yt=(0,c.K2)(function(t,e){const{BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:r}=e.db.LINETYPE;return[a,r].includes(t.type)},"isBidirectionalArrowType"),Bt=(0,c.K2)(function(t,e,a){const{look:r}=(0,o.D7)();if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.SOLID_TOP,a.db.LINETYPE.SOLID_BOTTOM,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.SOLID_TOP_DOTTED,a.db.LINETYPE.SOLID_BOTTOM_DOTTED,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT,a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};const[s,i]=Lt(t.from,e),[d,l]=Lt(t.to,e),h=s<=d;let p=h?i:s,T=h?d:l;if("neo"===r){const e=3;t.type!==a.db.LINETYPE.SOLID_OPEN&&(T+=h?-e:e),t.type!==a.db.LINETYPE.BIDIRECTIONAL_SOLID&&t.type!==a.db.LINETYPE.BIDIRECTIONAL_DOTTED||(p+=h?e:-e)}p+=Mt(t,a,h);const E=Math.abs(d-l)>2,g=(0,c.K2)(t=>h?-t:t,"adjustValue");t.from===t.to?T=p:(t.activate&&!E&&(T+=g(pt.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)||(T+=g(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)&&(p-=g(3)));const u=[s,i,d,l],y=Math.abs(p-T);t.wrap&&t.message&&(t.message=n._K.wrapLabel(t.message,o.Y2.getMax(y+2*pt.wrapPadding,pt.width),ut(pt)));const _=n._K.calculateTextDimensions(t.message,ut(pt));return{width:o.Y2.getMax(t.wrap?0:_.width+2*pt.wrapPadding,y+2*pt.wrapPadding,pt.width),height:0,startx:p,stopx:T,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,u),toBounds:Math.max.apply(null,u)}},"buildMessageModel"),Kt=(0,c.K2)(async function(t,e,a,r){const s={},i=[];let n,d,l;for(const c of t){switch(c.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:i.push({id:c.id,msg:c.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:c.message&&(n=i.pop(),s[n.id]=n,s[c.id]=n,i.push(n));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:n=i.pop(),s[n.id]=n;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(c.from?c.from:c.to.actor),a=Rt(c.from?c.from:c.to.actor).length,r=t.x+t.width/2+(a-1)*pt.activationWidth/2,s={startx:r,stopx:r+pt.activationWidth,actor:c.from,enabled:!0};Tt.activations.push(s)}break;case r.db.LINETYPE.ACTIVE_END:{const t=Tt.activations.map(t=>t.actor).lastIndexOf(c.from);Tt.activations.splice(t,1).splice(0,1)}}void 0!==c.placement?(d=await kt(c,e,r),c.noteModel=d,i.forEach(t=>{n=t,n.from=o.Y2.getMin(n.from,d.startx),n.to=o.Y2.getMax(n.to,d.startx+d.width),n.width=o.Y2.getMax(n.width,Math.abs(n.from-n.to))-pt.labelBoxWidth})):(l=Bt(c,e,r),c.msgModel=l,l.startx&&l.stopx&&i.length>0&&i.forEach(t=>{if(n=t,l.startx===l.stopx){const t=e.get(c.from),a=e.get(c.to);n.from=o.Y2.getMin(t.x-l.width/2,t.x-t.width/2,n.from),n.to=o.Y2.getMax(a.x+l.width/2,a.x+t.width/2,n.to),n.width=o.Y2.getMax(n.width,Math.abs(n.to-n.from))-pt.labelBoxWidth}else n.from=o.Y2.getMin(l.startx,n.from),n.to=o.Y2.getMax(l.stopx,n.to),n.width=o.Y2.getMax(n.width,l.width)-pt.labelBoxWidth}))}return Tt.activations=[],c.Rm.debug("Loop type widths:",s),s},"calculateLoopBounds"),$t={bounds:Tt,drawActors:bt,drawActorsPopup:It,setConf:ft,draw:Nt},Vt={parser:p,get db(){return new x},renderer:$t,styles:m,init:(0,c.K2)(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,(0,o.XV)({sequence:{wrap:t.wrap}}))},"init")}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[8585],{8585(e,n,r){r.d(n,{Zp:()=>Lr});var t=r(9344),o=r(224),i=0;const u=function(e){var n=++i;return(0,o.A)(e)+n};var a=r(8076),c=r(4722);const f=function(e){return(null==e?0:e.length)?(0,c.A)(e,1):[]};var d=r(3336),s=Math.ceil,v=Math.max;const l=function(e,n,r,t){for(var o=-1,i=v(s((n-e)/(r||1)),0),u=Array(i);i--;)u[t?i:++o]=e,e+=r;return u};var h=r(778),g=r(527),A=r(1143),p=r(115);const b=function(e,n,r){if(!(0,p.A)(r))return!1;var t=typeof n;return!!("number"==t?(0,g.A)(r)&&(0,A.A)(n,r.length):"string"==t&&n in r)&&(0,h.A)(r[n],e)};var w=/\s/;const y=function(e){for(var n=e.length;n--&&w.test(e.charAt(n)););return n};var m=/^\s+/;const j=function(e){return e?e.slice(0,y(e)+1).replace(m,""):e};var x=r(7332),O=/^[-+]0x[0-9a-f]+$/i,k=/^0b[01]+$/i,E=/^0o[0-7]+$/i,N=parseInt;const _=function(e){if("number"==typeof e)return e;if((0,x.A)(e))return NaN;if((0,p.A)(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=(0,p.A)(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=j(e);var r=k.test(e);return r||E.test(e)?N(e.slice(2),r?2:8):O.test(e)?NaN:+e};var I=1/0;const P=function(e){return e?(e=_(e))===I||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};const T=function(e){return function(n,r,t){return t&&"number"!=typeof t&&b(n,r,t)&&(r=t=void 0),n=P(n),void 0===r?(r=n,n=0):r=P(r),t=void 0===t?n<r?1:-1:P(t),l(n,r,t,e)}}();var M=r(2399);class R{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return L(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&L(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,r=n._prev;r!==n;)e.push(JSON.stringify(r,C)),r=r._prev;return"["+e.join(", ")+"]"}}function L(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function C(e,n){if("_next"!==e&&"_prev"!==e)return n}var S=a.A(1);function F(e,n){if(e.nodeCount()<=1)return[];var r=function(e,n){var r=new M.T,o=0,i=0;t.A(e.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),t.A(e.edges(),function(e){var t=r.edge(e.v,e.w)||0,u=n(e),a=t+u;r.setEdge(e.v,e.w,a),i=Math.max(i,r.node(e.v).out+=u),o=Math.max(o,r.node(e.w).in+=u)});var u=T(i+o+3).map(function(){return new R}),a=o+1;return t.A(r.nodes(),function(e){V(u,a,r.node(e))}),{graph:r,buckets:u,zeroIdx:a}}(e,n||S),o=function(e,n,r){var t,o=[],i=n[n.length-1],u=n[0];for(;e.nodeCount();){for(;t=u.dequeue();)B(e,n,r,t);for(;t=i.dequeue();)B(e,n,r,t);if(e.nodeCount())for(var a=n.length-2;a>0;--a)if(t=n[a].dequeue()){o=o.concat(B(e,n,r,t,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return f(d.A(o,function(n){return e.outEdges(n.v,n.w)}))}function B(e,n,r,o,i){var u=i?[]:void 0;return t.A(e.inEdges(o.v),function(t){var o=e.edge(t),a=e.node(t.v);i&&u.push({v:t.v,w:t.w}),a.out-=o,V(n,r,a)}),t.A(e.outEdges(o.v),function(t){var o=e.edge(t),i=t.w,u=e.node(i);u.in-=o,V(n,r,u)}),e.removeNode(o.v),u}function V(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function G(e){var n="greedy"===e.graph().acyclicer?F(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],r={},o={};function i(u){Object.prototype.hasOwnProperty.call(o,u)||(o[u]=!0,r[u]=!0,t.A(e.outEdges(u),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):i(e.w)}),delete r[u])}return t.A(e.nodes(),i),n}(e);t.A(n,function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,u("rev"))})}var U=r(7464),q=r(4738);const D=function(e,n,r){(void 0!==r&&!(0,h.A)(e[n],r)||void 0===r&&!(n in e))&&(0,q.A)(e,n,r)};var Y=r(8024),z=r(7060),$=r(3907),J=r(5749),W=r(7140),Z=r(7388),H=r(5635),K=r(3963),Q=r(9118),X=r(8132),ee=r(4302),ne=r(2545),re=r(620),te=Function.prototype,oe=Object.prototype,ie=te.toString,ue=oe.hasOwnProperty,ae=ie.call(Object);const ce=function(e){if(!(0,re.A)(e)||"[object Object]"!=(0,ee.A)(e))return!1;var n=(0,ne.A)(e);if(null===n)return!0;var r=ue.call(n,"constructor")&&n.constructor;return"function"==typeof r&&r instanceof r&&ie.call(r)==ae};var fe=r(4672);const de=function(e,n){if(("constructor"!==n||"function"!=typeof e[n])&&"__proto__"!=n)return e[n]};var se=r(1857),ve=r(353);const le=function(e){return(0,se.A)(e,(0,ve.A)(e))};const he=function(e,n,r,t,o,i,u){var a=de(e,r),c=de(n,r),f=u.get(c);if(f)D(e,r,f);else{var d=i?i(a,c,r+"",e,n,u):void 0,s=void 0===d;if(s){var v=(0,H.A)(c),l=!v&&(0,Q.A)(c),h=!v&&!l&&(0,fe.A)(c);d=c,v||l||h?(0,H.A)(a)?d=a:(0,K.A)(a)?d=(0,J.A)(a):l?(s=!1,d=(0,z.A)(c,!0)):h?(s=!1,d=(0,$.A)(c,!0)):d=[]:ce(c)||(0,Z.A)(c)?(d=a,(0,Z.A)(a)?d=le(a):(0,p.A)(a)&&!(0,X.A)(a)||(d=(0,W.A)(c))):s=!1}s&&(u.set(c,d),o(d,c,t,i,u),u.delete(c)),D(e,r,d)}};const ge=function e(n,r,t,o,i){n!==r&&(0,Y.A)(r,function(u,a){if(i||(i=new U.A),(0,p.A)(u))he(n,r,a,t,e,o,i);else{var c=o?o(de(n,a),u,a+"",n,r,i):void 0;void 0===c&&(c=u),D(n,a,c)}},ve.A)};var Ae=r(5376);const pe=function(e){return(0,Ae.A)(function(n,r){var t=-1,o=r.length,i=o>1?r[o-1]:void 0,u=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,u&&b(r[0],r[1],u)&&(i=o<3?void 0:i,o=1),n=Object(n);++t<o;){var a=r[t];a&&e(n,a,t,i)}return n})}(function(e,n,r){ge(e,n,r)});var be=r(416),we=r(8533),ye=r(4696),me=r(3019);const je=function(e,n,r,t){if(!(0,p.A)(e))return e;for(var o=-1,i=(n=(0,ye.A)(n,e)).length,u=i-1,a=e;null!=a&&++o<i;){var c=(0,me.A)(n[o]),f=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=u){var d=a[c];void 0===(f=t?t(d,c,a):void 0)&&(f=(0,p.A)(d)?d:(0,A.A)(n[o+1])?[]:{})}(0,we.A)(a,c,f),a=a[c]}return e};const xe=function(e,n,r){for(var t=-1,o=n.length,i={};++t<o;){var u=n[t],a=(0,be.A)(e,u);r(a,u)&&je(i,(0,ye.A)(u,e),a)}return i};var Oe=r(5674);const ke=function(e,n){return xe(e,n,function(n,r){return(0,Oe.A)(e,r)})};var Ee=r(2373),Ne=r(4855);const _e=function(e){return(0,Ne.A)((0,Ee.A)(e,void 0,f),e+"")}(function(e,n){return null==e?{}:ke(e,n)});var Ie=Object.prototype,Pe=Ie.hasOwnProperty;const Te=(0,Ae.A)(function(e,n){e=Object(e);var r=-1,t=n.length,o=t>2?n[2]:void 0;for(o&&b(n[0],n[1],o)&&(t=1);++r<t;)for(var i=n[r],u=(0,ve.A)(i),a=-1,c=u.length;++a<c;){var f=u[a],d=e[f];(void 0===d||(0,h.A)(d,Ie[f])&&!Pe.call(e,f))&&(e[f]=i[f])}return e});const Me=function(e,n,r){for(var t=-1,o=e.length;++t<o;){var i=e[t],u=n(i);if(null!=u&&(void 0===a?u==u&&!(0,x.A)(u):r(u,a)))var a=u,c=i}return c};const Re=function(e,n){return e>n};var Le=r(2854);const Ce=function(e){return e&&e.length?Me(e,Le.A,Re):void 0};const Se=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0};var Fe=r(4507),Be=r(1836);const Ve=function(e,n){var r={};return n=(0,Be.A)(n,3),(0,Fe.A)(e,function(e,t,o){(0,q.A)(r,t,n(e,t,o))}),r};var Ge=r(8430);const Ue=function(e,n){return e<n};const qe=function(e){return e&&e.length?Me(e,Le.A,Ue):void 0};var De=Object.prototype.hasOwnProperty;const Ye=function(e,n){return null!=e&&De.call(e,n)};var ze=r(5112);const $e=function(e,n){return null!=e&&(0,ze.A)(e,n,Ye)};var Je=r(1523);const We=function(){return Je.A.Date.now()};function Ze(e,n,r,t){var o;do{o=u(t)}while(e.hasNode(o));return r.dummy=n,e.setNode(o,r),o}function He(e){var n=new M.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return t.A(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),t.A(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Ke(e,n){var r,t,o=e.x,i=e.y,u=n.x-o,a=n.y-i,c=e.width/2,f=e.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*c>Math.abs(u)*f?(a<0&&(f=-f),r=f*u/a,t=f):(u<0&&(c=-c),r=c,t=c*a/u),{x:o+r,y:i+t}}function Qe(e){var n=d.A(T(en(e)+1),function(){return[]});return t.A(e.nodes(),function(r){var t=e.node(r),o=t.rank;Ge.A(o)||(n[o][t.order]=r)}),n}function Xe(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),Ze(e,"border",o,n)}function en(e){return Ce(d.A(e.nodes(),function(n){var r=e.node(n).rank;if(!Ge.A(r))return r}))}function nn(e,n){var r=We();try{return n()}finally{console.log(e+" time: "+(We()-r)+"ms")}}function rn(e,n){return n()}function tn(e,n,r,t,o,i){var u={width:0,height:0,rank:i,borderType:n},a=o[n][i-1],c=Ze(e,"border",u,r);o[n][i]=c,e.setParent(c,t),a&&e.setEdge(a,c,{weight:1})}function on(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){t.A(e.nodes(),function(n){cn(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);t.A(r.points,cn),Object.prototype.hasOwnProperty.call(r,"y")&&cn(r)})}(e),"lr"!==n&&"rl"!==n||(!function(e){t.A(e.nodes(),function(n){fn(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);t.A(r.points,fn),Object.prototype.hasOwnProperty.call(r,"x")&&fn(r)})}(e),un(e))}function un(e){t.A(e.nodes(),function(n){an(e.node(n))}),t.A(e.edges(),function(n){an(e.edge(n))})}function an(e){var n=e.width;e.width=e.height,e.height=n}function cn(e){e.y=-e.y}function fn(e){var n=e.x;e.x=e.y,e.y=n}function dn(e){e.graph().dummyChains=[],t.A(e.edges(),function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,i=e.node(o).rank,u=n.name,a=e.edge(n),c=a.labelRank;if(i===t+1)return;e.removeEdge(n);var f,d,s=void 0;for(d=0,++t;t<i;++d,++t)a.points=[],f=Ze(e,"edge",s={width:0,height:0,edgeLabel:a,edgeObj:n,rank:t},"_d"),t===c&&(s.width=a.width,s.height=a.height,s.dummy="edge-label",s.labelpos=a.labelpos),e.setEdge(r,f,{weight:a.weight},u),0===d&&e.graph().dummyChains.push(f),r=f;e.setEdge(r,o,{weight:a.weight},u)}(e,n)})}const sn=function(e,n){return e&&e.length?Me(e,(0,Be.A)(n,2),Ue):void 0};function vn(e){var n={};t.A(e.sources(),function r(t){var o=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return o.rank;n[t]=!0;var i=qe(d.A(e.outEdges(t),function(n){return r(n.w)-e.edge(n).minlen}));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i})}function ln(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function hn(e){var n,r,t=new M.T({directed:!1}),o=e.nodes()[0],i=e.nodeCount();for(t.setNode(o,{});gn(t,e)<i;)n=An(t,e),r=t.hasNode(n.v)?ln(e,n):-ln(e,n),pn(t,e,r);return t}function gn(e,n){return t.A(e.nodes(),function r(o){t.A(n.nodeEdges(o),function(t){var i=t.v,u=o===i?t.w:i;e.hasNode(u)||ln(n,t)||(e.setNode(u,{}),e.setEdge(o,u,{}),r(u))})}),e.nodeCount()}function An(e,n){return sn(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return ln(n,r)})}function pn(e,n,r){t.A(e.nodes(),function(e){n.node(e).rank+=r})}var bn=r(9080);const wn=function(e){return function(n,r,t){var o=Object(n);if(!(0,g.A)(n)){var i=(0,Be.A)(r,3);n=(0,bn.A)(n),r=function(e){return i(o[e],e,o)}}var u=e(n,r,t);return u>-1?o[i?n[u]:u]:void 0}};var yn=r(8965);const mn=function(e){var n=P(e),r=n%1;return n==n?r?n-r:n:0};var jn=Math.max;const xn=wn(function(e,n,r){var t=null==e?0:e.length;if(!t)return-1;var o=null==r?0:mn(r);return o<0&&(o=jn(t+o,0)),(0,yn.A)(e,(0,Be.A)(n,3),o)});var On=r(356);a.A(1);a.A(1);r(1929),r(7913);(0,r(483).A)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var kn="\\ud800-\\udfff",En="["+kn+"]",Nn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",_n="\\ud83c[\\udffb-\\udfff]",In="[^"+kn+"]",Pn="(?:\\ud83c[\\udde6-\\uddff]){2}",Tn="[\\ud800-\\udbff][\\udc00-\\udfff]",Mn="(?:"+Nn+"|"+_n+")"+"?",Rn="[\\ufe0e\\ufe0f]?",Ln=Rn+Mn+("(?:\\u200d(?:"+[In,Pn,Tn].join("|")+")"+Rn+Mn+")*"),Cn="(?:"+[In+Nn+"?",Nn,Pn,Tn,En].join("|")+")";RegExp(_n+"(?="+_n+")|"+Cn+Ln,"g");function Sn(){}function Fn(e,n,r){H.A(n)||(n=[n]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],u={};return t.A(n,function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);Bn(e,n,"post"===r,u,o,i)}),i}function Bn(e,n,r,o,i,u){Object.prototype.hasOwnProperty.call(o,n)||(o[n]=!0,r||u.push(n),t.A(i(n),function(n){Bn(e,n,r,o,i,u)}),r&&u.push(n))}Sn.prototype=new Error;r(92);function Vn(e){e=function(e){var n=(new M.T).setGraph(e.graph());return t.A(e.nodes(),function(r){n.setNode(r,e.node(r))}),t.A(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),n}(e),vn(e);var n,r=hn(e);for(qn(r),Gn(r,e);n=Yn(r);)$n(r,e,n,zn(r,e,n))}function Gn(e,n){var r=function(e,n){return Fn(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),t.A(r,function(r){!function(e,n,r){var t=e.node(r),o=t.parent;e.edge(r,o).cutvalue=Un(e,n,r)}(e,n,r)})}function Un(e,n,r){var o=e.node(r).parent,i=!0,u=n.edge(r,o),a=0;return u||(i=!1,u=n.edge(o,r)),a=u.weight,t.A(n.nodeEdges(r),function(t){var u,c,f=t.v===r,d=f?t.w:t.v;if(d!==o){var s=f===i,v=n.edge(t).weight;if(a+=s?v:-v,u=r,c=d,e.hasEdge(u,c)){var l=e.edge(r,d).cutvalue;a+=s?-l:l}}}),a}function qn(e,n){arguments.length<2&&(n=e.nodes()[0]),Dn(e,{},1,n)}function Dn(e,n,r,o,i){var u=r,a=e.node(o);return n[o]=!0,t.A(e.neighbors(o),function(t){Object.prototype.hasOwnProperty.call(n,t)||(r=Dn(e,n,r,t,o))}),a.low=u,a.lim=r++,i?a.parent=i:delete a.parent,r}function Yn(e){return xn(e.edges(),function(n){return e.edge(n).cutvalue<0})}function zn(e,n,r){var t=r.v,o=r.w;n.hasEdge(t,o)||(t=r.w,o=r.v);var i=e.node(t),u=e.node(o),a=i,c=!1;i.lim>u.lim&&(a=u,c=!0);var f=On.A(n.edges(),function(n){return c===Jn(e,e.node(n.v),a)&&c!==Jn(e,e.node(n.w),a)});return sn(f,function(e){return ln(n,e)})}function $n(e,n,r,o){var i=r.v,u=r.w;e.removeEdge(i,u),e.setEdge(o.v,o.w,{}),qn(e),Gn(e,n),function(e,n){var r=xn(e.nodes(),function(e){return!n.node(e).parent}),o=function(e,n){return Fn(e,n,"pre")}(e,r);o=o.slice(1),t.A(o,function(r){var t=e.node(r).parent,o=n.edge(r,t),i=!1;o||(o=n.edge(t,r),i=!0),n.node(r).rank=n.node(t).rank+(i?o.minlen:-o.minlen)})}(e,n)}function Jn(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function Wn(e){switch(e.graph().ranker){case"network-simplex":default:Hn(e);break;case"tight-tree":!function(e){vn(e),hn(e)}(e);break;case"longest-path":Zn(e)}}Vn.initLowLimValues=qn,Vn.initCutValues=Gn,Vn.calcCutValue=Un,Vn.leaveEdge=Yn,Vn.enterEdge=zn,Vn.exchangeEdges=$n;var Zn=vn;function Hn(e){Vn(e)}var Kn=r(7833),Qn=r(1809);function Xn(e){var n=Ze(e,"root",{},"_root"),r=function(e){var n={};function r(o,i){var u=e.children(o);u&&u.length&&t.A(u,function(e){r(e,i+1)}),n[o]=i}return t.A(e.children(),function(e){r(e,1)}),n}(e),o=Ce(Kn.A(r))-1,i=2*o+1;e.graph().nestingRoot=n,t.A(e.edges(),function(n){e.edge(n).minlen*=i});var u=function(e){return Qn.A(e.edges(),function(n,r){return n+e.edge(r).weight},0)}(e)+1;t.A(e.children(),function(t){er(e,n,i,u,o,r,t)}),e.graph().nodeRankFactor=i}function er(e,n,r,o,i,u,a){var c=e.children(a);if(c.length){var f=Xe(e,"_bt"),d=Xe(e,"_bb"),s=e.node(a);e.setParent(f,a),s.borderTop=f,e.setParent(d,a),s.borderBottom=d,t.A(c,function(t){er(e,n,r,o,i,u,t);var c=e.node(t),s=c.borderTop?c.borderTop:t,v=c.borderBottom?c.borderBottom:t,l=c.borderTop?o:2*o,h=s!==v?1:i-u[a]+1;e.setEdge(f,s,{weight:l,minlen:h,nestingEdge:!0}),e.setEdge(v,d,{weight:l,minlen:h,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,f,{weight:0,minlen:i+u[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:r})}var nr=r(7303);const rr=function(e){return(0,nr.A)(e,5)};function tr(e,n,r){var o=function(e){var n;for(;e.hasNode(n=u("_root")););return n}(e),i=new M.T({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(n){return e.node(n)});return t.A(e.nodes(),function(u){var a=e.node(u),c=e.parent(u);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(u),i.setParent(u,c||o),t.A(e[r](u),function(n){var r=n.v===u?n.w:n.v,t=i.edge(r,u),o=Ge.A(t)?0:t.weight;i.setEdge(r,u,{weight:e.edge(n).weight+o})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(u,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}const or=function(e,n,r){for(var t=-1,o=e.length,i=n.length,u={};++t<o;){var a=t<i?n[t]:void 0;r(u,e[t],a)}return u};const ir=function(e,n){return or(e||[],n||[],we.A)};var ur=r(8094),ar=r(9926);const cr=function(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e};var fr=r(9339);const dr=function(e,n){if(e!==n){var r=void 0!==e,t=null===e,o=e==e,i=(0,x.A)(e),u=void 0!==n,a=null===n,c=n==n,f=(0,x.A)(n);if(!a&&!f&&!i&&e>n||i&&u&&c&&!a&&!f||t&&u&&c||!r&&c||!o)return 1;if(!t&&!i&&!f&&e<n||f&&r&&o&&!t&&!i||a&&r&&o||!u&&o||!c)return-1}return 0};const sr=function(e,n,r){for(var t=-1,o=e.criteria,i=n.criteria,u=o.length,a=r.length;++t<u;){var c=dr(o[t],i[t]);if(c)return t>=a?c:c*("desc"==r[t]?-1:1)}return e.index-n.index};const vr=function(e,n,r){n=n.length?(0,ur.A)(n,function(e){return(0,H.A)(e)?function(n){return(0,be.A)(n,1===e.length?e[0]:e)}:e}):[Le.A];var t=-1;n=(0,ur.A)(n,(0,fr.A)(Be.A));var o=(0,ar.A)(e,function(e,r,o){return{criteria:(0,ur.A)(n,function(n){return n(e)}),index:++t,value:e}});return cr(o,function(e,n){return sr(e,n,r)})};const lr=(0,Ae.A)(function(e,n){if(null==e)return[];var r=n.length;return r>1&&b(e,n[0],n[1])?n=[]:r>2&&b(n[0],n[1],n[2])&&(n=[n[0]]),vr(e,(0,c.A)(n,1),[])});function hr(e,n){for(var r=0,t=1;t<n.length;++t)r+=gr(e,n[t-1],n[t]);return r}function gr(e,n,r){for(var o=ir(r,d.A(r,function(e,n){return n})),i=f(d.A(n,function(n){return lr(d.A(e.outEdges(n),function(n){return{pos:o[n.w],weight:e.edge(n).weight}}),"pos")})),u=1;u<r.length;)u<<=1;var a=2*u-1;u-=1;var c=d.A(new Array(a),function(){return 0}),s=0;return t.A(i.forEach(function(e){var n=e.pos+u;c[n]+=e.weight;for(var r=0;n>0;)n%2&&(r+=c[n+1]),c[n=n-1>>1]+=e.weight;s+=e.weight*r})),s}function Ar(e,n){var r={};return t.A(e,function(e,n){var t=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};Ge.A(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),t.A(n.edges(),function(e){var n=r[e.v],t=r[e.w];Ge.A(n)||Ge.A(t)||(t.indegree++,n.out.push(r[e.w]))}),function(e){var n=[];function r(e){return function(n){n.merged||(Ge.A(n.barycenter)||Ge.A(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight);n.weight&&(r+=n.barycenter*n.weight,t+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function o(n){return function(r){r.in.push(n),0===--r.indegree&&e.push(r)}}for(;e.length;){var i=e.pop();n.push(i),t.A(i.in.reverse(),r(i)),t.A(i.out,o(i))}return d.A(On.A(n,function(e){return!e.merged}),function(e){return _e(e,["vs","i","barycenter","weight"])})}(On.A(r,function(e){return!e.indegree}))}function pr(e,n){var r,o=function(e,n){var r={lhs:[],rhs:[]};return t.A(e,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")}),i=o.lhs,u=lr(o.rhs,function(e){return-e.i}),a=[],c=0,d=0,s=0;i.sort((r=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:r?n.i-e.i:e.i-n.i})),s=br(a,u,s),t.A(i,function(e){s+=e.vs.length,a.push(e.vs),c+=e.barycenter*e.weight,d+=e.weight,s=br(a,u,s)});var v={vs:f(a)};return d&&(v.barycenter=c/d,v.weight=d),v}function br(e,n,r){for(var t;n.length&&(t=Se(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function wr(e,n,r,o){var i=e.children(n),u=e.node(n),a=u?u.borderLeft:void 0,c=u?u.borderRight:void 0,s={};a&&(i=On.A(i,function(e){return e!==a&&e!==c}));var v=function(e,n){return d.A(n,function(n){var r=e.inEdges(n);if(r.length){var t=Qn.A(r,function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}},{sum:0,weight:0});return{v:n,barycenter:t.sum/t.weight,weight:t.weight}}return{v:n}})}(e,i);t.A(v,function(n){if(e.children(n.v).length){var t=wr(e,n.v,r,o);s[n.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter")&&(i=n,u=t,Ge.A(i.barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u});var l=Ar(v,r);!function(e,n){t.A(e,function(e){e.vs=f(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(l,s);var h=pr(l,o);if(a&&(h.vs=f([a,h.vs,c]),e.predecessors(a).length)){var g=e.node(e.predecessors(a)[0]),A=e.node(e.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+g.order+A.order)/(h.weight+2),h.weight+=2}return h}function yr(e){var n=en(e),r=mr(e,T(1,n+1),"inEdges"),o=mr(e,T(n-1,-1,-1),"outEdges"),i=function(e){var n={},r=On.A(e.nodes(),function(n){return!e.children(n).length}),o=Ce(d.A(r,function(n){return e.node(n).rank})),i=d.A(T(o+1),function(){return[]}),u=lr(r,function(n){return e.node(n).rank});return t.A(u,function r(o){if(!$e(n,o)){n[o]=!0;var u=e.node(o);i[u.rank].push(o),t.A(e.successors(o),r)}}),i}(e);xr(e,i);for(var u,a=Number.POSITIVE_INFINITY,c=0,f=0;f<4;++c,++f){jr(c%2?r:o,c%4>=2);var s=hr(e,i=Qe(e));s<a&&(f=0,u=rr(i),a=s)}xr(e,u)}function mr(e,n,r){return d.A(n,function(n){return tr(e,n,r)})}function jr(e,n){var r=new M.T;t.A(e,function(e){var o=e.graph().root,i=wr(e,o,r,n);t.A(i.vs,function(n,r){e.node(n).order=r}),function(e,n,r){var o,i={};t.A(r,function(r){for(var t,u,a=e.parent(r);a;){if((t=e.parent(a))?(u=i[t],i[t]=a):(u=o,o=a),u&&u!==a)return void n.setEdge(u,a);a=t}})}(e,r,i.vs)})}function xr(e,n){t.A(n,function(n){t.A(n,function(n,r){e.node(n).order=r})})}function Or(e){var n=function(e){var n={},r=0;function o(i){var u=r;t.A(e.children(i),o),n[i]={low:u,lim:r++}}return t.A(e.children(),o),n}(e);t.A(e.graph().dummyChains,function(r){for(var t=e.node(r),o=t.edgeObj,i=function(e,n,r,t){var o,i,u=[],a=[],c=Math.min(n[r].low,n[t].low),f=Math.max(n[r].lim,n[t].lim);o=r;do{o=e.parent(o),u.push(o)}while(o&&(n[o].low>c||f>n[o].lim));i=o,o=t;for(;(o=e.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(e,n,o.v,o.w),u=i.path,a=i.lca,c=0,f=u[c],d=!0;r!==o.w;){if(t=e.node(r),d){for(;(f=u[c])!==a&&e.node(f).maxRank<t.rank;)c++;f===a&&(d=!1)}if(!d){for(;c<u.length-1&&e.node(f=u[c+1]).minRank<=t.rank;)c++;f=u[c]}e.setParent(r,f),r=e.successors(r)[0]}})}var kr=r(8280);const Er=function(e,n){return e&&(0,Fe.A)(e,(0,kr.A)(n))};const Nr=function(e,n){return null==e?e:(0,Y.A)(e,(0,kr.A)(n),ve.A)};function _r(e,n){var r={};return Qn.A(n,function(n,o){var i=0,u=0,a=n.length,c=Se(o);return t.A(o,function(n,f){var d=function(e,n){if(e.node(n).dummy)return xn(e.predecessors(n),function(n){return e.node(n).dummy})}(e,n),s=d?e.node(d).order:a;(d||n===c)&&(t.A(o.slice(u,f+1),function(n){t.A(e.predecessors(n),function(t){var o=e.node(t),u=o.order;!(u<i||s<u)||o.dummy&&e.node(n).dummy||Ir(r,t,n)})}),u=f+1,i=s)}),o}),r}function Ir(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Pr(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Tr(e,n,r,o,i){var u={},a=function(e,n,r,o){var i=new M.T,u=e.graph(),a=function(e,n,r){return function(t,o,i){var u,a=t.node(o),c=t.node(i),f=0;if(f+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2}if(u&&(f+=r?u:-u),u=0,f+=(a.dummy?n:e)/2,f+=(c.dummy?n:e)/2,f+=c.width/2,Object.prototype.hasOwnProperty.call(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":u=c.width/2;break;case"r":u=-c.width/2}return u&&(f+=r?u:-u),u=0,f}}(u.nodesep,u.edgesep,o);return t.A(n,function(n){var o;t.A(n,function(n){var t=r[n];if(i.setNode(t),o){var u=r[o],c=i.edge(u,t);i.setEdge(u,t,Math.max(a(e,n,o),c||0))}o=n})}),i}(e,n,r,i),c=i?"borderLeft":"borderRight";function f(e,n){for(var r=a.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return f(function(e){u[e]=a.inEdges(e).reduce(function(e,n){return Math.max(e,u[n.v]+a.edge(n))},0)},a.predecessors.bind(a)),f(function(n){var r=a.outEdges(n).reduce(function(e,n){return Math.min(e,u[n.w]-a.edge(n))},Number.POSITIVE_INFINITY),t=e.node(n);r!==Number.POSITIVE_INFINITY&&t.borderType!==c&&(u[n]=Math.max(u[n],r))},a.successors.bind(a)),t.A(o,function(e){u[e]=u[r[e]]}),u}function Mr(e){var n,r=Qe(e),o=pe(_r(e,r),function(e,n){var r={};function o(n,o,i,u,a){var c;t.A(T(o,i),function(o){c=n[o],e.node(c).dummy&&t.A(e.predecessors(c),function(n){var t=e.node(n);t.dummy&&(t.order<u||t.order>a)&&Ir(r,n,c)})})}return Qn.A(n,function(n,r){var i,u=-1,a=0;return t.A(r,function(t,c){if("border"===e.node(t).dummy){var f=e.predecessors(t);f.length&&(i=e.node(f[0]).order,o(r,a,c,u,i),a=c,u=i)}o(r,a,r.length,i,n.length)}),r}),r}(e,r)),i={};t.A(["u","d"],function(u){n="u"===u?r:Kn.A(r).reverse(),t.A(["l","r"],function(r){"r"===r&&(n=d.A(n,function(e){return Kn.A(e).reverse()}));var a=("u"===u?e.predecessors:e.successors).bind(e),c=function(e,n,r,o){var i={},u={},a={};return t.A(n,function(e){t.A(e,function(e,n){i[e]=e,u[e]=e,a[e]=n})}),t.A(n,function(e){var n=-1;t.A(e,function(e){var t=o(e);if(t.length){t=lr(t,function(e){return a[e]});for(var c=(t.length-1)/2,f=Math.floor(c),d=Math.ceil(c);f<=d;++f){var s=t[f];u[e]===e&&n<a[s]&&!Pr(r,e,s)&&(u[s]=e,u[e]=i[e]=i[s],n=a[s])}}})}),{root:i,align:u}}(0,n,o,a),f=Tr(e,n,c.root,c.align,"r"===r);"r"===r&&(f=Ve(f,function(e){return-e})),i[u+r]=f})});var u=function(e,n){return sn(Kn.A(n),function(n){var r=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY;return Nr(n,function(n,o){var i=function(e,n){return e.node(n).width}(e,o)/2;r=Math.max(n+i,r),t=Math.min(n-i,t)}),r-t})}(e,i);return function(e,n){var r=Kn.A(n),o=qe(r),i=Ce(r);t.A(["u","d"],function(r){t.A(["l","r"],function(t){var u,a=r+t,c=e[a];if(c!==n){var f=Kn.A(c);(u="l"===t?o-qe(f):i-Ce(f))&&(e[a]=Ve(c,function(e){return e+u}))}})})}(i,u),function(e,n){return Ve(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var o=lr(d.A(e,t));return(o[1]+o[2])/2})}(i,e.graph().align)}function Rr(e){(function(e){var n=Qe(e),r=e.graph().ranksep,o=0;t.A(n,function(n){var i=Ce(d.A(n,function(n){return e.node(n).height}));t.A(n,function(n){e.node(n).y=o+i/2}),o+=i+r})})(e=He(e)),Er(Mr(e),function(n,r){e.node(r).x=n})}function Lr(e,n){var r=n&&n.debugTiming?nn:rn;r("layout",()=>{var n=r(" buildLayoutGraph",()=>function(e){var n=new M.T({multigraph:!0,compound:!0}),r=Yr(e.graph());return n.setGraph(pe({},Sr,Dr(r,Cr),_e(r,Fr))),t.A(e.nodes(),function(r){var t=Yr(e.node(r));n.setNode(r,Te(Dr(t,Br),Vr)),n.setParent(r,e.parent(r))}),t.A(e.edges(),function(r){var t=Yr(e.edge(r));n.setEdge(r,pe({},Ur,Dr(t,Gr),_e(t,qr)))}),n}(e));r(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,t.A(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){t.A(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>G(e)),n(" nestingGraph.run",()=>Xn(e)),n(" rank",()=>Wn(He(e))),n(" injectEdgeLabelProxies",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};Ze(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=qe(d.A(e.nodes(),function(n){return e.node(n).rank})),r=[];t.A(e.nodes(),function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)});var o=0,i=e.graph().nodeRankFactor;t.A(r,function(n,r){Ge.A(n)&&r%i!==0?--o:o&&t.A(n,function(n){e.node(n).rank+=o})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,t.A(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=qe(d.A(e.nodes(),function(n){return e.node(n).rank}));t.A(e.nodes(),function(r){var t=e.node(r);$e(t,"rank")&&(t.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;t.A(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=Ce(n,t.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){t.A(e.nodes(),function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>dn(e)),n(" parentDummyChains",()=>Or(e)),n(" addBorderSegments",()=>function(e){t.A(e.children(),function n(r){var o=e.children(r),i=e.node(r);if(o.length&&t.A(o,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var u=i.minRank,a=i.maxRank+1;u<a;++u)tn(e,"borderLeft","_bl",r,i,u),tn(e,"borderRight","_br",r,i,u)}})}(e)),n(" order",()=>yr(e)),n(" insertSelfEdges",()=>function(e){var n=Qe(e);t.A(n,function(n){var r=0;t.A(n,function(n,o){var i=e.node(n);i.order=o+r,t.A(i.selfEdges,function(n){Ze(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++r,e:n.e,label:n.label},"_se")}),delete i.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||un(e)}(e)),n(" position",()=>Rr(e)),n(" positionSelfEdges",()=>function(e){t.A(e.nodes(),function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,i=t.y,u=r.x-o,a=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],r.label.x=r.x,r.label.y=r.y}})}(e)),n(" removeBorderNodes",()=>function(e){t.A(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(Se(r.borderLeft)),u=e.node(Se(r.borderRight));r.width=Math.abs(u.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),t.A(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){t.A(e.graph().dummyChains,function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>on(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,o=Number.POSITIVE_INFINITY,i=0,u=e.graph(),a=u.marginx||0,c=u.marginy||0;function f(e){var t=e.x,u=e.y,a=e.width,c=e.height;n=Math.min(n,t-a/2),r=Math.max(r,t+a/2),o=Math.min(o,u-c/2),i=Math.max(i,u+c/2)}t.A(e.nodes(),function(n){f(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&f(r)}),n-=a,o-=c,t.A(e.nodes(),function(r){var t=e.node(r);t.x-=n,t.y-=o}),t.A(e.edges(),function(r){var i=e.edge(r);t.A(i.points,function(e){e.x-=n,e.y-=o}),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=o)}),u.width=r-n+a,u.height=i-o+c}(e)),n(" assignNodeIntersects",()=>function(e){t.A(e.edges(),function(n){var r,t,o=e.edge(n),i=e.node(n.v),u=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=u,t=i),o.points.unshift(Ke(i,r)),o.points.push(Ke(u,t))})}(e)),n(" reversePoints",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}(e))}(n,r)),r(" updateInputGraph",()=>function(e,n){t.A(e.nodes(),function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))}),t.A(e.edges(),function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n))})}var Cr=["nodesep","edgesep","ranksep","marginx","marginy"],Sr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Fr=["acyclicer","ranker","rankdir","align"],Br=["width","height"],Vr={width:0,height:0},Gr=["minlen","weight","width","height","labeloffset"],Ur={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},qr=["labelpos"];function Dr(e,n){return Ve(_e(e,n),Number)}function Yr(e){var n={};return t.A(e,function(e,r){n[r.toLowerCase()]=e}),n}},8533(e,n,r){r.d(n,{A:()=>u});var t=r(4738),o=r(778),i=Object.prototype.hasOwnProperty;const u=function(e,n,r){var u=e[n];i.call(e,n)&&(0,o.A)(u,r)&&(void 0!==r||n in e)||(0,t.A)(e,n,r)}},4738(e,n,r){r.d(n,{A:()=>o});var t=r(6049);const o=function(e,n,r){"__proto__"==n&&t.A?(0,t.A)(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}},7303(e,n,r){r.d(n,{A:()=>X});var t=r(7464),o=r(4139),i=r(8533),u=r(1857),a=r(9080);const c=function(e,n){return e&&(0,u.A)(n,(0,a.A)(n),e)};var f=r(353);const d=function(e,n){return e&&(0,u.A)(n,(0,f.A)(n),e)};var s=r(7060),v=r(5749),l=r(3689);const h=function(e,n){return(0,u.A)(e,(0,l.A)(e),n)};var g=r(8626),A=r(2545),p=r(7655);const b=Object.getOwnPropertySymbols?function(e){for(var n=[];e;)(0,g.A)(n,(0,l.A)(e)),e=(0,A.A)(e);return n}:p.A;const w=function(e,n){return(0,u.A)(e,b(e),n)};var y=r(6240),m=r(6085);const j=function(e){return(0,m.A)(e,f.A,b)};var x=r(7913),O=Object.prototype.hasOwnProperty;const k=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&O.call(e,"index")&&(r.index=e.index,r.input=e.input),r};var E=r(7251);const N=function(e,n){var r=n?(0,E.A)(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var _=/\w*$/;const I=function(e){var n=new e.constructor(e.source,_.exec(e));return n.lastIndex=e.lastIndex,n};var P=r(2999),T=P.A?P.A.prototype:void 0,M=T?T.valueOf:void 0;const R=function(e){return M?Object(M.call(e)):{}};var L=r(3907);const C=function(e,n,r){var t=e.constructor;switch(n){case"[object ArrayBuffer]":return(0,E.A)(e);case"[object Boolean]":case"[object Date]":return new t(+e);case"[object DataView]":return N(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,L.A)(e,r);case"[object Map]":case"[object Set]":return new t;case"[object Number]":case"[object String]":return new t(e);case"[object RegExp]":return I(e);case"[object Symbol]":return R(e)}};var S=r(7140),F=r(5635),B=r(9118),V=r(620);const G=function(e){return(0,V.A)(e)&&"[object Map]"==(0,x.A)(e)};var U=r(9339),q=r(9899),D=q.A&&q.A.isMap;const Y=D?(0,U.A)(D):G;var z=r(115);const $=function(e){return(0,V.A)(e)&&"[object Set]"==(0,x.A)(e)};var J=q.A&&q.A.isSet;const W=J?(0,U.A)(J):$;var Z="[object Arguments]",H="[object Function]",K="[object Object]",Q={};Q[Z]=Q["[object Array]"]=Q["[object ArrayBuffer]"]=Q["[object DataView]"]=Q["[object Boolean]"]=Q["[object Date]"]=Q["[object Float32Array]"]=Q["[object Float64Array]"]=Q["[object Int8Array]"]=Q["[object Int16Array]"]=Q["[object Int32Array]"]=Q["[object Map]"]=Q["[object Number]"]=Q[K]=Q["[object RegExp]"]=Q["[object Set]"]=Q["[object String]"]=Q["[object Symbol]"]=Q["[object Uint8Array]"]=Q["[object Uint8ClampedArray]"]=Q["[object Uint16Array]"]=Q["[object Uint32Array]"]=!0,Q["[object Error]"]=Q[H]=Q["[object WeakMap]"]=!1;const X=function e(n,r,u,l,g,A){var p,b=1&r,m=2&r,O=4&r;if(u&&(p=g?u(n,l,g,A):u(n)),void 0!==p)return p;if(!(0,z.A)(n))return n;var E=(0,F.A)(n);if(E){if(p=k(n),!b)return(0,v.A)(n,p)}else{var N=(0,x.A)(n),_=N==H||"[object GeneratorFunction]"==N;if((0,B.A)(n))return(0,s.A)(n,b);if(N==K||N==Z||_&&!g){if(p=m||_?{}:(0,S.A)(n),!b)return m?w(n,d(p,n)):h(n,c(p,n))}else{if(!Q[N])return g?n:{};p=C(n,N,b)}}A||(A=new t.A);var I=A.get(n);if(I)return I;A.set(n,p),W(n)?n.forEach(function(t){p.add(e(t,r,u,t,n,A))}):Y(n)&&n.forEach(function(t,o){p.set(o,e(t,r,u,o,n,A))});var P=O?m?j:y.A:m?f.A:a.A,T=E?void 0:P(n);return(0,o.A)(T||n,function(t,o){T&&(t=n[o=t]),(0,i.A)(p,o,e(t,r,u,o,n,A))}),p}},9926(e,n,r){r.d(n,{A:()=>i});var t=r(5562),o=r(527);const i=function(e,n){var r=-1,i=(0,o.A)(e)?Array(e.length):[];return(0,t.A)(e,function(e,t,o){i[++r]=n(e,t,o)}),i}},7251(e,n,r){r.d(n,{A:()=>o});var t=r(5330);const o=function(e){var n=new e.constructor(e.byteLength);return new t.A(n).set(new t.A(e)),n}},7060(e,n,r){r.d(n,{A:()=>c});var t=r(1523),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,u=i&&i.exports===o?t.A.Buffer:void 0,a=u?u.allocUnsafe:void 0;const c=function(e,n){if(n)return e.slice();var r=e.length,t=a?a(r):new e.constructor(r);return e.copy(t),t}},3907(e,n,r){r.d(n,{A:()=>o});var t=r(7251);const o=function(e,n){var r=n?(0,t.A)(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},5749(e,n,r){r.d(n,{A:()=>t});const t=function(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r<t;)n[r]=e[r];return n}},1857(e,n,r){r.d(n,{A:()=>i});var t=r(8533),o=r(4738);const i=function(e,n,r,i){var u=!r;r||(r={});for(var a=-1,c=n.length;++a<c;){var f=n[a],d=i?i(r[f],e[f],f,r,e):void 0;void 0===d&&(d=e[f]),u?(0,o.A)(r,f,d):(0,t.A)(r,f,d)}return r}},2545(e,n,r){r.d(n,{A:()=>t});const t=(0,r(9849).A)(Object.getPrototypeOf,Object)},7140(e,n,r){r.d(n,{A:()=>c});var t=r(115),o=Object.create;const i=function(){function e(){}return function(n){if(!(0,t.A)(n))return{};if(o)return o(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}}();var u=r(2545),a=r(3941);const c=function(e){return"function"!=typeof e.constructor||(0,a.A)(e)?{}:i((0,u.A)(e))}},353(e,n,r){r.d(n,{A:()=>d});var t=r(8949),o=r(115),i=r(3941);const u=function(e){var n=[];if(null!=e)for(var r in Object(e))n.push(r);return n};var a=Object.prototype.hasOwnProperty;const c=function(e){if(!(0,o.A)(e))return u(e);var n=(0,i.A)(e),r=[];for(var t in e)("constructor"!=t||!n&&a.call(e,t))&&r.push(t);return r};var f=r(527);const d=function(e){return(0,f.A)(e)?(0,t.A)(e,!0):c(e)}},3336(e,n,r){r.d(n,{A:()=>a});var t=r(8094),o=r(1836),i=r(9926),u=r(5635);const a=function(e,n){return((0,u.A)(e)?t.A:i.A)(e,(0,o.A)(n,3))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[8788],{4458(t,e,n){n.d(e,{o:()=>i});var i=(0,n(7970).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},8788(t,e,n){n.d(e,{diagram:()=>I});var i=n(5717),s=n(4458),r=n(9164),o=n(3641),a=(n(566),n(9478),n(2864),n(1546),n(3316)),c=n(7970),l=n(3212),h=n(8480),u=n(9515),g=function(){var t=(0,c.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[1,4],n=[1,13],i=[1,12],s=[1,15],r=[1,16],o=[1,20],a=[1,19],l=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,c.K2)(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:n,9:22,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:h,7:u,10:23,11:g},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:a}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(y,[2,25]),t(y,[2,26]),t(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(f,[2,14],{7:m,11:b}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:k}),t(y,[2,31]),{21:[1,39]},{22:[1,40]},t(f,[2,13],{7:m,11:b}),t(_,[2,11]),t(_,[2,12]),t(d,[2,15],{24:k}),t(y,[2,30]),{22:[1,41]},t(y,[2,27]),t(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,n=[0],i=[],s=[null],r=[],o=this.table,a="",l=0,h=0,u=0,g=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;r.push(f);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||d.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,c.K2)(b,"lex");for(var _,k,E,S,N,x,D,L,I,v={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=b()),S=o[E]&&o[E][_]),void 0===S||!S.length||!S[0]){var C="";for(x in I=[],o[E])this.terminals_[x]&&x>2&&I.push("'"+this.terminals_[x]+"'");C=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:f,expected:I})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:n.push(_),s.push(d.yytext),r.push(d.yylloc),n.push(S[1]),_=null,k?(_=k,k=null):(h=d.yyleng,a=d.yytext,l=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[S[1]][1],v.$=s[s.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(N=this.performAction.apply(v,[a,h,l,p.yy,S[1],s,r].concat(g))))return N;D&&(n=n.slice(0,-1*D*2),s=s.slice(0,-1*D),r=r.slice(0,-1*D)),n.push(this.productions_[S[1]][0]),s.push(v.$),r.push(v._$),L=o[n[n.length-2]][n[n.length-1]],n.push(L);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,n=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 i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,(0,c.K2)(N,"Parser"),N.prototype=E,E.Parser=N,new N}();g.parser=g;var d=g,p=[],y=[],f=0,m={},b=(0,c.K2)(()=>{p=[],y=[],f=0,m={}},"clear"),_=(0,c.K2)(t=>{if(0===p.length)return null;const e=p[0].level;let n=null;for(let i=p.length-1;i>=0;i--)if(p[i].level!==e||n||(n=p[i]),p[i].level<e)throw new Error('Items without section detected, found section ("'+p[i].label+'")');return t===n?.level?null:n},"getSection"),k=(0,c.K2)(function(){return y},"getSections"),E=(0,c.K2)(function(){const t=[],e=k(),n=(0,a.D7)();for(const i of e){const e={id:i.id,label:(0,a.jZ)(i.label??"",n),labelType:"markdown",isGroup:!0,ticket:i.ticket,shape:"kanbanSection",level:i.level,look:n.look};t.push(e);const s=p.filter(t=>t.parentId===i.id);for(const r of s){const e={id:r.id,parentId:i.id,label:(0,a.jZ)(r.label??"",n),labelType:"markdown",isGroup:!1,ticket:r?.ticket,priority:r?.priority,assigned:r?.assigned,icon:r?.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:(0,a.D7)()}},"getData"),S=(0,c.K2)((t,e,n,i,s)=>{const o=(0,a.D7)();let c=o.mindmap?.padding??a.UI.mindmap.padding;switch(i){case N.ROUNDED_RECT:case N.RECT:case N.HEXAGON:c*=2}const l={id:(0,a.jZ)(e,o)||"kbn"+f++,level:t,label:(0,a.jZ)(n,o),width:o.mindmap?.maxNodeWidth??a.UI.mindmap.maxNodeWidth,padding:c,isGroup:!1};if(void 0!==s){let t;t=s.includes("\n")?s+"\n":"{\n"+s+"\n}";const e=(0,r.H)(t,{schema:r.r});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(l.shape=e?.shape),e?.label&&(l.label=e?.label),e?.icon&&(l.icon=e?.icon.toString()),e?.assigned&&(l.assigned=e?.assigned.toString()),e?.ticket&&(l.ticket=e?.ticket.toString()),e?.priority&&(l.priority=e?.priority)}const h=_(t);h?l.parentId=h.id||"kbn"+f++:y.push(l),p.push(l)},"addNode"),N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},x={clear:b,addNode:S,getSections:k,getData:E,nodeType:N,getType:(0,c.K2)((t,e)=>{switch(c.Rm.debug("In get type",t,e),t){case"[":return N.RECT;case"(":return")"===e?N.ROUNDED_RECT:N.CLOUD;case"((":return N.CIRCLE;case")":return N.CLOUD;case"))":return N.BANG;case"{{":return N.HEXAGON;default:return N.DEFAULT}},"getType"),setElementForId:(0,c.K2)((t,e)=>{m[t]=e},"setElementForId"),decorateNode:(0,c.K2)(t=>{if(!t)return;const e=(0,a.D7)(),n=p[p.length-1];t.icon&&(n.icon=(0,a.jZ)(t.icon,e)),t.class&&(n.cssClasses=(0,a.jZ)(t.class,e))},"decorateNode"),type2Str:(0,c.K2)(t=>{switch(t){case N.DEFAULT:return"no-border";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded-rect";case N.CIRCLE:return"circle";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:(0,c.K2)(()=>c.Rm,"getLogger"),getElementById:(0,c.K2)(t=>m[t],"getElementById")},D={draw:(0,c.K2)(async(t,e,n,s)=>{c.Rm.debug("Rendering kanban diagram\n"+t);const r=s.db.getData(),l=(0,a.D7)();l.htmlLabels=!1;const h=(0,i.D)(e);for(const i of r.nodes)i.domId=`${e}-${i.id}`;const u=h.append("g");u.attr("class","sections");const g=h.append("g");g.attr("class","items");const d=r.nodes.filter(t=>t.isGroup);let p=0;const y=[];let f=25;for(const i of d){const t=l?.kanban?.sectionWidth||200;p+=1,i.x=t*p+10*(p-1)/2,i.width=t,i.y=0,i.height=3*t,i.rx=5,i.ry=5,i.cssClasses=i.cssClasses+" section-"+p;const e=await(0,o.U)(u,i);f=Math.max(f,e?.labelBBox?.height),y.push(e)}let m=0;for(const i of d){const t=y[m];m+=1;const e=l?.kanban?.sectionWidth||200,n=3*-e/2+f;let s=n;const a=r.nodes.filter(t=>t.parentId===i.id);for(const r of a){if(r.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");r.x=i.x,r.width=e-15;const t=(await(0,o.on)(g,r,{config:l})).node().getBBox();r.y=s+t.height/2,await(0,o.U_)(r),s=r.y+t.height/2+5}const c=t.cluster.select("rect"),h=Math.max(s-n+30,50)+(f-25);c.attr("height",h)}(0,a.ot)(void 0,h,l.mindmap?.padding??a.UI.kanban.padding,l.mindmap?.useMaxWidth??a.UI.kanban.useMaxWidth)},"draw")},L=(0,c.K2)(t=>{let e="";for(let i=0;i<t.THEME_COLOR_LIMIT;i++)t["lineColor"+i]=t["lineColor"+i]||t["cScaleInv"+i],(0,l.A)(t["lineColor"+i])?t["lineColor"+i]=(0,h.A)(t["lineColor"+i],20):t["lineColor"+i]=(0,u.A)(t["lineColor"+i],20);const n=(0,c.K2)((e,n)=>t.darkMode?(0,u.A)(e,n):(0,h.A)(e,n),"adjuster");for(let i=0;i<t.THEME_COLOR_LIMIT;i++){const s=""+(17-3*i);e+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {\n fill: ${n(t["cScale"+i],10)};\n stroke: ${n(t["cScale"+i],10)};\n\n }\n .section-${i-1} text {\n fill: ${t["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${t["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${s};\n }\n .section-${i-1} line {\n stroke: ${t["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.background};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${t.background};\n stroke: ${t.nodeBorder};\n text-decoration: underline;\n }\n `}return e},"genSections"),I={db:x,renderer:D,parser:d,styles:(0,c.K2)(t=>`\n .edge {\n stroke-width: 3;\n }\n ${L(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${(0,s.o)()}\n`,"getStyles")}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[9178],{9178(e,i,l){l.d(i,{createInfoServices:()=>a.v});var a=l(7593);l(3228)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[9210],{9210(e,i,l){l.d(i,{createPacketServices:()=>a.$});var a=l(5170);l(3228)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[9354],{9354(e,a,i){i.d(a,{createRadarServices:()=>l.f});var l=i(4414);i(3228)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[936],{936(e,i,l){l.d(i,{createTreeViewServices:()=>a.I});var a=l(1900);l(3228)}}]);