ranui 0.2.0-alpha.7 → 0.2.1-alpha.3

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 (331) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  3. package/dist/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +1 -0
  4. package/dist/abnfDiagram-VRR7QNED-CTsqwzwi.js +95 -0
  5. package/dist/arc-D25LhgTs.cjs +1 -0
  6. package/dist/arc-DRPGof21.js +82 -0
  7. package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +1 -0
  8. package/dist/architecture-TIHT7OUA-pbFO1xSx.js +5 -0
  9. package/dist/architectureDiagram-ZJ3FMSHR-8mjyXr-w.js +4279 -0
  10. package/dist/architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs +36 -0
  11. package/dist/array-By5736M5.js +7 -0
  12. package/dist/array-C3cbN3GY.cjs +1 -0
  13. package/dist/arrow-down-Bi5kqUrX.js +12 -0
  14. package/dist/blockDiagram-677ZJIJ3-3F79MOSt.js +3321 -0
  15. package/dist/blockDiagram-677ZJIJ3-Cx35khWe.cjs +132 -0
  16. package/dist/builder.d.ts +4 -4
  17. package/dist/builder.js +39 -30
  18. package/dist/builtin-BkM0LLof.js +416 -0
  19. package/dist/button-D0zcnKnG.js +117 -0
  20. package/dist/button.js +1 -1
  21. package/dist/c4Diagram-LMCZKHZV-Cxn_gqu_.js +3064 -0
  22. package/dist/c4Diagram-LMCZKHZV-TRNb3Gvl.cjs +10 -0
  23. package/dist/{card-BVvXX6KM.js → card-CygMndQS.js} +2 -2
  24. package/dist/card.js +1 -1
  25. package/dist/channel-C9WSNwcS.cjs +1 -0
  26. package/dist/channel-k5-UxdcV.js +5 -0
  27. package/dist/{checkbox-BtoX9X2Z.js → checkbox-D5om9aJO.js} +10 -10
  28. package/dist/checkbox.js +1 -1
  29. package/dist/chunk-2Q5K7J3B-CTMy5FII.cjs +1 -0
  30. package/dist/chunk-2Q5K7J3B-DlFVJRAn.js +15 -0
  31. package/dist/chunk-32BRIVSS-BXVdG_nV.cjs +1 -0
  32. package/dist/chunk-32BRIVSS-jAuAwMVV.js +68 -0
  33. package/dist/chunk-52WLFC77-BChUrU24.cjs +10 -0
  34. package/dist/chunk-52WLFC77-wpL7en7e.js +630 -0
  35. package/dist/chunk-5VM5RSS4-Cni2Ogq2.js +19 -0
  36. package/dist/chunk-5VM5RSS4-DudUFQ_Z.cjs +15 -0
  37. package/dist/chunk-7BUUIJ7U-9hiBbc7O.js +87 -0
  38. package/dist/chunk-7BUUIJ7U-DMv_UkjI.cjs +1 -0
  39. package/dist/chunk-C7G6YPKG-CA-DNpvI.js +71 -0
  40. package/dist/chunk-C7G6YPKG-CKEeW9TM.cjs +1 -0
  41. package/dist/chunk-EX3LRPZG-BCmf0iDq.js +2137 -0
  42. package/dist/chunk-EX3LRPZG-DbfbNdXo.cjs +231 -0
  43. package/dist/chunk-FWX5IMBZ-D11-gbhc.cjs +1 -0
  44. package/dist/chunk-FWX5IMBZ-DZ5VYvm5.js +60 -0
  45. package/dist/chunk-HOUHSVGY-BGB3dOvI.cjs +1 -0
  46. package/dist/chunk-HOUHSVGY-DRQcQeMT.js +268 -0
  47. package/dist/chunk-ICXQ74PX-BbT9JaEW.cjs +2 -0
  48. package/dist/chunk-ICXQ74PX-DR8rL-xF.js +1377 -0
  49. package/dist/chunk-JWPE2WC7-CGEmUMMZ.js +8 -0
  50. package/dist/chunk-JWPE2WC7-D8EnWK1B.cjs +1 -0
  51. package/dist/chunk-KEIR6QF5-B2Op7cFH.js +22155 -0
  52. package/dist/chunk-KEIR6QF5-C4fcHpY0.cjs +161 -0
  53. package/dist/chunk-MOJQB5TN-BC46HDyu.js +516 -0
  54. package/dist/chunk-MOJQB5TN-oOeq982_.cjs +88 -0
  55. package/dist/chunk-OGEWGWER-BV51ll2w.js +33 -0
  56. package/dist/chunk-OGEWGWER-DX8sW1dT.cjs +1 -0
  57. package/dist/chunk-PUDLZKDR-48YaqVoF.cjs +156 -0
  58. package/dist/chunk-PUDLZKDR-NdMR0Ft5.js +4282 -0
  59. package/dist/chunk-Q4XR5HBZ-3BHjjc9u.js +1709 -0
  60. package/dist/chunk-Q4XR5HBZ-aBnPq509.cjs +70 -0
  61. package/dist/chunk-RYQCIY6F-BER2T9t0.js +246 -0
  62. package/dist/chunk-RYQCIY6F-DVRzSnsI.cjs +1 -0
  63. package/dist/chunk-V7JOEXUC-Cr_hr02u.js +3467 -0
  64. package/dist/chunk-V7JOEXUC-DHizzTla.cjs +206 -0
  65. package/dist/chunk-VAUOI2AC-DfQf5L2_.cjs +1 -0
  66. package/dist/chunk-VAUOI2AC-izt0o4id.js +11 -0
  67. package/dist/chunk-VR4S4FIN-CJi5okl4.js +26 -0
  68. package/dist/chunk-VR4S4FIN-KiwnPF31.cjs +1 -0
  69. package/dist/chunk-WYO6CB5R-DDHkKowO.js +4535 -0
  70. package/dist/chunk-WYO6CB5R-u4mJNOcO.cjs +127 -0
  71. package/dist/chunk-XXDRQBXY-BB1i_53q.js +9 -0
  72. package/dist/chunk-XXDRQBXY-C8VGLZmt.cjs +1 -0
  73. package/dist/chunk-Y2CYZVJY-0JxdZxki.js +13 -0
  74. package/dist/chunk-Y2CYZVJY-DPaYLFFP.cjs +1 -0
  75. package/dist/chunk-ZGVPDNZ5-6uMbTJXy.js +3841 -0
  76. package/dist/chunk-ZGVPDNZ5-Cw5_HJba.cjs +62 -0
  77. package/dist/chunk-ZIRB5QZD-C7OH2FI2.js +1280 -0
  78. package/dist/chunk-ZIRB5QZD-aLu-4ITN.cjs +32 -0
  79. package/dist/classDiagram-OUVF2IWQ-D6rqYIh0.cjs +1 -0
  80. package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +30 -0
  81. package/dist/classDiagram-v2-EOCWNBFH-D6rqYIh0.cjs +1 -0
  82. package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +30 -0
  83. package/dist/{colorpicker-Dukms7ET.js → colorpicker-qWnaTlYX.js} +9 -10
  84. package/dist/colorpicker.js +1 -1
  85. package/dist/components/colorpicker/index.d.ts +3 -3
  86. package/dist/components/glass/index.d.ts +52 -0
  87. package/dist/components/icon/builtin.d.ts +9 -0
  88. package/dist/components/icon/core-icons.d.ts +13 -0
  89. package/dist/components/icon/index.d.ts +8 -0
  90. package/dist/components/mermaid/index.d.ts +52 -0
  91. package/dist/components/modal/index.d.ts +9 -0
  92. package/dist/components/route/index.d.ts +10 -4
  93. package/dist/components/router/index.d.ts +3 -0
  94. package/dist/content-Rry-U6ir.js +39 -0
  95. package/dist/content.js +5 -0
  96. package/dist/cose-bilkent-JH36ORCC-BUxFTdey.cjs +1 -0
  97. package/dist/cose-bilkent-JH36ORCC-DTwvJlGw.js +2353 -0
  98. package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +1 -0
  99. package/dist/cynefin-VYW2F7L2-ALQKF7N6.js +5 -0
  100. package/dist/cynefinDiagram-TSTJHNR4-Bjt4QTVh.js +355 -0
  101. package/dist/cynefinDiagram-TSTJHNR4-ISDORSxO.cjs +62 -0
  102. package/dist/cytoscape.esm-CFq1_DTa.js +18906 -0
  103. package/dist/cytoscape.esm-pygMw4dR.cjs +321 -0
  104. package/dist/dagre-D1-W1tt6.cjs +1 -0
  105. package/dist/dagre-D8GLTwuf.js +1578 -0
  106. package/dist/dagre-VKFMJZFB-DXI69qAN.cjs +4 -0
  107. package/dist/dagre-VKFMJZFB-Dfku86Az.js +341 -0
  108. package/dist/defaultLocale-0M_kMcEH.js +184 -0
  109. package/dist/defaultLocale-DSqtvhxg.cjs +1 -0
  110. package/dist/diagram-FQU43EPY-BAiRt5eL.cjs +3 -0
  111. package/dist/diagram-FQU43EPY-BvQ5jmVn.js +452 -0
  112. package/dist/diagram-G47NLZAW-DGnmEa8u.cjs +24 -0
  113. package/dist/diagram-G47NLZAW-DT2BBA0T.js +498 -0
  114. package/dist/diagram-NH7WQ7WH-DxgkStA3.cjs +24 -0
  115. package/dist/diagram-NH7WQ7WH-W7jg4Vh8.js +135 -0
  116. package/dist/diagram-OA4YK3LP-DkvFII73.cjs +30 -0
  117. package/dist/diagram-OA4YK3LP-jU--aqQl.js +317 -0
  118. package/dist/diagram-WEI45ONY-C_Qhf4ny.js +215 -0
  119. package/dist/diagram-WEI45ONY-XvzRFmmY.cjs +41 -0
  120. package/dist/dist-C0Fwsvsq.js +70 -0
  121. package/dist/dist-C20XxSsP.cjs +1 -0
  122. package/dist/{dropdown-BYS1Trdu.js → dropdown-DzdAR1nI.js} +4 -4
  123. package/dist/dropdown.js +1 -1
  124. package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +1 -0
  125. package/dist/ebnfDiagram-CCIWWBDH-Gnr20Oc1.js +112 -0
  126. package/dist/erDiagram-Q63AITRT-CxLSa9Yv.cjs +85 -0
  127. package/dist/erDiagram-Q63AITRT-D0Hh9b-W.js +1822 -0
  128. package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +1 -0
  129. package/dist/eventmodeling-45OFAUF4-DMpGs2yI.js +5 -0
  130. package/dist/factory-BkvRcCOx.js +482 -0
  131. package/dist/flowDiagram-23GEKE2U-B6gASEYG.cjs +1 -0
  132. package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +19 -0
  133. package/dist/{form-BsB5JhS4.js → form-CUJpeQ7Q.js} +5 -5
  134. package/dist/form.js +1 -1
  135. package/dist/ganttDiagram-NO4QXBWP-B40Eabk0.js +3125 -0
  136. package/dist/ganttDiagram-NO4QXBWP-DZT79qJr.cjs +292 -0
  137. package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +1 -0
  138. package/dist/gitGraph-TEB2WS4Q-D6Ru11Cs.js +5 -0
  139. package/dist/gitGraphDiagram-IHSO6WYX-BUJNSssA.js +754 -0
  140. package/dist/gitGraphDiagram-IHSO6WYX-DW06165m.cjs +106 -0
  141. package/dist/glass-Bj1Zf8Hy.js +115 -0
  142. package/dist/glass.js +5 -0
  143. package/dist/graphlib-CCKThIKP.js +1104 -0
  144. package/dist/graphlib-Du-578Js.cjs +1 -0
  145. package/dist/{icon-pfolda2m.js → icon-CtlZJISZ.js} +110 -21
  146. package/dist/icon.js +4 -3
  147. package/dist/icons.js +5 -0
  148. package/dist/iife/button.iife.js +1 -1
  149. package/dist/iife/card.iife.js +1 -1
  150. package/dist/iife/checkbox.iife.js +1 -1
  151. package/dist/iife/colorpicker.iife.js +2 -2
  152. package/dist/iife/content.iife.js +1 -0
  153. package/dist/iife/dropdown.iife.js +1 -1
  154. package/dist/iife/form.iife.js +1 -1
  155. package/dist/iife/glass.iife.js +1 -0
  156. package/dist/iife/icon.iife.js +1 -1
  157. package/dist/iife/image.iife.js +1 -1
  158. package/dist/iife/input.iife.js +1 -1
  159. package/dist/iife/loading.iife.js +1 -1
  160. package/dist/iife/math.iife.js +14 -14
  161. package/dist/iife/mermaid.iife.js +3535 -0
  162. package/dist/iife/message.iife.js +1 -1
  163. package/dist/iife/modal.iife.js +1 -1
  164. package/dist/iife/player.iife.js +8 -8
  165. package/dist/iife/popover.iife.js +1 -1
  166. package/dist/iife/progress.iife.js +1 -1
  167. package/dist/iife/radar.iife.js +1 -1
  168. package/dist/iife/route.iife.js +1 -1
  169. package/dist/iife/router.iife.js +1 -1
  170. package/dist/iife/scratch.iife.js +1 -1
  171. package/dist/iife/section.iife.js +1 -1
  172. package/dist/iife/select.iife.js +2 -2
  173. package/dist/iife/skeleton.iife.js +1 -1
  174. package/dist/iife/tab.iife.js +1 -1
  175. package/dist/iife/tabpane.iife.js +1 -1
  176. package/dist/{image-BXpKQ9sU.js → image-ILZNlaGc.js} +4 -4
  177. package/dist/image.js +1 -1
  178. package/dist/index.cjs +257 -23
  179. package/dist/index.d.ts +11 -1
  180. package/dist/index.iife.js +3842 -74
  181. package/dist/index.js +86 -78
  182. package/dist/info-DKCQHKI2-DNOtUIin.cjs +1 -0
  183. package/dist/info-DKCQHKI2-Df7h9MSE.js +5 -0
  184. package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +2 -0
  185. package/dist/infoDiagram-FWYZ7A6U-Dc0m9qAx.js +21 -0
  186. package/dist/init-1VpIn1S3.js +16 -0
  187. package/dist/init-CbDwVtpO.cjs +1 -0
  188. package/dist/{input-BMMM60e6.js → input-CDH6zY9I.js} +6 -6
  189. package/dist/input.js +1 -1
  190. package/dist/ishikawaDiagram-FXEZZL3T-BugNyysB.cjs +70 -0
  191. package/dist/ishikawaDiagram-FXEZZL3T-DuFtHOmf.js +742 -0
  192. package/dist/journeyDiagram-5HDEW3XC-Bshelnhq.js +928 -0
  193. package/dist/journeyDiagram-5HDEW3XC-ItmURvA2.cjs +139 -0
  194. package/dist/kanban-definition-HUTT4EX6-BL512R2A.cjs +89 -0
  195. package/dist/kanban-definition-HUTT4EX6-Dogv2paU.js +1050 -0
  196. package/dist/katex-Cq3Y8cmK.cjs +257 -0
  197. package/dist/katex-Pg2EqTH0.js +23485 -0
  198. package/dist/line-BIPmUVxO.js +33 -0
  199. package/dist/line-CAB5QHC6.cjs +1 -0
  200. package/dist/linear-B2AM4ZBe.js +259 -0
  201. package/dist/linear-CSAfNEpl.cjs +1 -0
  202. package/dist/{link-DURZzd7u.js → link-BCrmHvXP.js} +3 -3
  203. package/dist/link.js +1 -1
  204. package/dist/{loading-BScjyeVm.js → loading-DJWGih1g.js} +4 -4
  205. package/dist/loading.js +1 -1
  206. package/dist/map-BC2bk_rV.cjs +1 -0
  207. package/dist/map-DMSWkcq6.js +208 -0
  208. package/dist/{math-IjzOAwnA.js → math-DRmkEDSQ.js} +4 -4
  209. package/dist/math.js +1 -1
  210. package/dist/mermaid-CMhm7npE.js +261 -0
  211. package/dist/mermaid-parser.core-DYumW1vq.cjs +6 -0
  212. package/dist/mermaid-parser.core-uIDZYuBu.js +654 -0
  213. package/dist/mermaid.core-B2d5lQW2.js +1085 -0
  214. package/dist/mermaid.core-a1hgpWfs.cjs +10 -0
  215. package/dist/mermaid.js +5 -0
  216. package/dist/{message-CLpuP8HY.js → message-BpYJBvYn.js} +36 -51
  217. package/dist/message.js +1 -1
  218. package/dist/mindmap-definition-LN4V7U3C-DYZgIZym.cjs +96 -0
  219. package/dist/mindmap-definition-LN4V7U3C-f7s5ZePP.js +1070 -0
  220. package/dist/{modal-DOTpABRe.js → modal-BeQlDYDP.js} +40 -24
  221. package/dist/modal.js +1 -1
  222. package/dist/ordinal-BMN81JG2.js +64 -0
  223. package/dist/ordinal-BplLHIij.cjs +1 -0
  224. package/dist/packet-7NZHBO7P-4PLslLZJ.js +5 -0
  225. package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +1 -0
  226. package/dist/path-Bja5PoYn.js +82 -0
  227. package/dist/path-DmfWsuKi.cjs +1 -0
  228. package/dist/pegDiagram-2B236MQR-B-Xeh55J.js +107 -0
  229. package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +1 -0
  230. package/dist/pie-RZYD4A2V-DBE9a8Kz.js +5 -0
  231. package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +1 -0
  232. package/dist/pieDiagram-ENE6RG2P-BkSiP4iu.cjs +39 -0
  233. package/dist/pieDiagram-ENE6RG2P-CVSE95zc.js +207 -0
  234. package/dist/{player-5olrw-qB.js → player-CQ4e3Yeo.js} +196 -195
  235. package/dist/player.js +1 -1
  236. package/dist/{popover-DRUQjdPs.js → popover-eZMnL1F3.js} +22 -54
  237. package/dist/popover.js +1 -1
  238. package/dist/{progress-BIEXYYd2.js → progress-DyHgW4Ep.js} +5 -5
  239. package/dist/progress.js +1 -1
  240. package/dist/quadrantDiagram-ABIIQ3AL-BDmdDGsh.cjs +7 -0
  241. package/dist/quadrantDiagram-ABIIQ3AL-TJ8FmqES.js +2058 -0
  242. package/dist/{radar-DAF95_Mj.js → radar-D21Rccap.js} +5 -5
  243. package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +1 -0
  244. package/dist/radar-I7S5WNFK-DFTxtd_t.js +5 -0
  245. package/dist/radar.js +1 -1
  246. package/dist/railroad-3IZDKUUU-DALJwv16.js +5 -0
  247. package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +1 -0
  248. package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +1 -0
  249. package/dist/railroad-abnf-AHOZXSZD-CntW2udQ.js +5 -0
  250. package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +1 -0
  251. package/dist/railroad-ebnf-EBAXGLYW-s_1ZOb_9.js +5 -0
  252. package/dist/railroad-peg-LSFZ7HO6-CaM5A0Ml.js +5 -0
  253. package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +1 -0
  254. package/dist/railroadDiagram-RFXS5EU6-0lS5wYI7.js +83 -0
  255. package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +1 -0
  256. package/dist/ranui.css +1 -1
  257. package/dist/requirementDiagram-TGXJPOKE-Bg701bNl.cjs +84 -0
  258. package/dist/requirementDiagram-TGXJPOKE-viCQLyJd.js +2301 -0
  259. package/dist/rolldown-runtime-9ZSF5uba.js +16 -0
  260. package/dist/rolldown-runtime-CAnuVJ4g.cjs +1 -0
  261. package/dist/rough.esm-BWe9E0Nz.js +1387 -0
  262. package/dist/rough.esm-BfSi6CZE.cjs +1 -0
  263. package/dist/route-pR5P4ann.js +116 -0
  264. package/dist/route.js +1 -1
  265. package/dist/{router-B9rCrWXm.js → router-CewzSH7O.js} +23 -18
  266. package/dist/router.js +1 -1
  267. package/dist/sankeyDiagram-HTMAVEWB-CV6_AuMF.js +974 -0
  268. package/dist/sankeyDiagram-HTMAVEWB-K-nGMsuS.cjs +40 -0
  269. package/dist/{scratch-QlPyy1f4.js → scratch-BFVsgl-7.js} +2 -2
  270. package/dist/scratch.js +1 -1
  271. package/dist/{section-D0qMm9KM.js → section-DSPCsIxv.js} +2 -2
  272. package/dist/section.js +1 -1
  273. package/dist/{select-aAaWoveE.js → select-B58nMfB1.js} +16 -23
  274. package/dist/select.js +1 -1
  275. package/dist/sequenceDiagram-DBY2YBRQ-4GdkLnUr.cjs +162 -0
  276. package/dist/sequenceDiagram-DBY2YBRQ-B9WNesh2.js +4326 -0
  277. package/dist/sizeCapture-X5ZJPWSS-BUY3-n09.cjs +1 -0
  278. package/dist/sizeCapture-X5ZJPWSS-D7rGsqTl.js +48 -0
  279. package/dist/{skeleton-CFqQmKyt.js → skeleton-DoHYMsTn.js} +5 -5
  280. package/dist/skeleton.js +1 -1
  281. package/dist/src-C9EhKhbk.cjs +1 -0
  282. package/dist/src-DtRLxcYO.js +2104 -0
  283. package/dist/stateDiagram-2N3HPSRC-B7VpgjJu.cjs +1 -0
  284. package/dist/stateDiagram-2N3HPSRC-DxH4BMSh.js +237 -0
  285. package/dist/stateDiagram-v2-6OUMAXLB-CQv7GIaO.cjs +1 -0
  286. package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +30 -0
  287. package/dist/swimlanes-5IMT3BWC-DcADNGpg.js +5258 -0
  288. package/dist/swimlanes-5IMT3BWC-o-MjdPlw.cjs +1 -0
  289. package/dist/swimlanesDiagram-G3AALYLV-D-rmAGky.cjs +8 -0
  290. package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +31 -0
  291. package/dist/{tab-CiF2YPck.js → tab-BRPdZ9Ws.js} +5 -5
  292. package/dist/tab.js +1 -1
  293. package/dist/{tabpane-B-m3xwqu.js → tabpane-Owf72hw_.js} +5 -5
  294. package/dist/tabpane.js +1 -1
  295. package/dist/test/unit/icon.builtin.test.d.ts +1 -0
  296. package/dist/test/unit/utils.colorpicker.reconnect.test.d.ts +1 -0
  297. package/dist/test/unit/utils.route.lazy.test.d.ts +1 -0
  298. package/dist/test/unit/utils.router.match.test.d.ts +1 -0
  299. package/dist/test/unit/utils.signal.owner.test.d.ts +1 -0
  300. package/dist/{theme-switch-B09egc6h.js → theme-switch-CZDIIonc.js} +4 -4
  301. package/dist/theme-switch.js +1 -1
  302. package/dist/timeline-definition-FHXFAJF6-C80VjPLh.js +1119 -0
  303. package/dist/timeline-definition-FHXFAJF6-DOwvOb3S.cjs +120 -0
  304. package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +1 -0
  305. package/dist/treeView-QDETBFTQ-vTKOZls1.js +5 -0
  306. package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +1 -0
  307. package/dist/treemap-6X3UGDF4-Ddzv6Gqd.js +5 -0
  308. package/dist/utils/builder/core.d.ts +153 -16
  309. package/dist/utils/builder/factory.d.ts +1 -1
  310. package/dist/utils/builder/index.d.ts +3 -3
  311. package/dist/utils/builder/signal.d.ts +93 -64
  312. package/dist/utils/router/index.d.ts +13 -3
  313. package/dist/utils/router.js +95 -54
  314. package/dist/utils/theme.d.ts +1 -1
  315. package/dist/{utils-DBfrRFoE.js → utils-D1iZnChu.js} +38 -31
  316. package/dist/vennDiagram-L72KCM5P-BYHB7OW8.js +1955 -0
  317. package/dist/vennDiagram-L72KCM5P-CidVJK6y.cjs +34 -0
  318. package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +1 -0
  319. package/dist/wardley-OPB4EBWU-DBgFLc64.js +5 -0
  320. package/dist/wardleyDiagram-EHGQE667--ubmCaWM.js +652 -0
  321. package/dist/wardleyDiagram-EHGQE667-K6ckkRZS.cjs +78 -0
  322. package/dist/warning-circle-fill-Cz0qu7AH.js +23 -0
  323. package/dist/xychartDiagram-FW5EYKEG-CzdokxrM.cjs +7 -0
  324. package/dist/xychartDiagram-FW5EYKEG-DLqWcTPt.js +2154 -0
  325. package/docs/BUILDER.md +383 -0
  326. package/docs/COMPONENTS.md +21 -3
  327. package/package.json +31 -3
  328. package/dist/button-Be_uHDZG.js +0 -117
  329. package/dist/factory-BdsO0dEW.js +0 -165
  330. package/dist/route-MQZpn2BP.js +0 -88
  331. package/dist/signal-CSSZxlK5.js +0 -57
@@ -0,0 +1,62 @@
1
+ const v=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),X=require("./src-C9EhKhbk.cjs"),Y=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),U=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),kt=require("./chunk-HOUHSVGY-BGB3dOvI.cjs"),ct=require("./chunk-Q4XR5HBZ-aBnPq509.cjs"),At=require("./chunk-OGEWGWER-DX8sW1dT.cjs"),$=require("./chunk-C7G6YPKG-CKEeW9TM.cjs"),H=require("./rough.esm-BfSi6CZE.cjs");var W=v.__name(async(u,t,g)=>{let h;const l=t.useHtmlLabels||Y.evaluate(Y.getConfig2()?.htmlLabels);g?h=g:h="node default";const r=u.insert("g").attr("class",h).attr("id",t.domId||t.id),f=r.insert("g").attr("class","label").attr("style",U.handleUndefinedAttr(t.labelStyle));let i;t.label===void 0?i="":i=typeof t.label=="string"?t.label:t.label[0];const n=!!t.icon||!!t.img,a=t.labelType==="markdown",e=await ct.createText(f,Y.sanitizeText(U.decodeEntities(i),Y.getConfig2()),{useHtmlLabels:l,width:t.width||Y.getConfig2().flowchart?.wrappingWidth,classes:a?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:n,markdown:a},Y.getConfig2());let s=e.getBBox();const o=(t?.padding??0)/2;if(l){const c=e.children[0],y=X.select_default(e);await At.configureLabelImages(c,i),s=c.getBoundingClientRect(),y.attr("width",s.width),y.attr("height",s.height)}return l?f.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):f.attr("transform","translate(0, "+-s.height/2+")"),t.centerLabel&&f.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),f.insert("rect",":first-child"),{shapeSvg:r,bbox:s,halfPadding:o,label:f}},"labelHelper"),Nt=v.__name(async(u,t,g)=>{const h=g.useHtmlLabels??Y.getEffectiveHtmlLabels(Y.getConfig2()),l=u.insert("g").attr("class","label").attr("style",g.labelStyle||""),r=await ct.createText(l,Y.sanitizeText(U.decodeEntities(t),Y.getConfig2()),{useHtmlLabels:h,width:g.width||Y.getConfig2()?.flowchart?.wrappingWidth,style:g.labelStyle,addSvgBackground:!!g.icon||!!g.img});let f=r.getBBox();const i=g.padding/2;if(Y.getEffectiveHtmlLabels(Y.getConfig2())){const n=r.children[0],a=X.select_default(r);f=n.getBoundingClientRect(),a.attr("width",f.width),a.attr("height",f.height)}return h?l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):l.attr("transform","translate(0, "+-f.height/2+")"),g.centerLabel&&l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:u,bbox:f,halfPadding:i,label:l}},"insertLabel"),I=v.__name((u,t)=>{const g=t.node().getBBox();u.width=g.width,u.height=g.height},"updateNodeBounds"),E=v.__name((u,t)=>(u.look==="handDrawn"?"rough-node":"node")+" "+u.cssClasses+" "+(t||""),"getNodeClasses");function q(u){const t=u.map((g,h)=>`${h===0?"M":"L"}${g.x},${g.y}`);return t.push("Z"),t.join(" ")}v.__name(q,"createPathFromPoints");function gt(u,t,g,h,l,r){const f=[],n=g-u,a=h-t,e=n/r,s=2*Math.PI/e,o=t+a/2;for(let c=0;c<=50;c++){const y=u+c/50*n,d=o+l*Math.sin(s*(y-u));f.push({x:y,y:d})}return f}v.__name(gt,"generateFullSineWavePoints");function St(u,t,g,h,l,r){const f=[],i=l*Math.PI/180,n=(r*Math.PI/180-i)/(h-1);for(let a=0;a<h;a++){const e=i+a*n,s=u+g*Math.cos(e),o=t+g*Math.sin(e);f.push({x:-s,y:-o})}return f}v.__name(St,"generateCirclePoints");function Bt(u){const t=Array.from(u.childNodes).filter(n=>n.tagName==="path"),g=document.createElementNS("http://www.w3.org/2000/svg","path"),h=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");g.setAttribute("d",h);const l=t.find(n=>n.getAttribute("fill")!=="none"),r=t.find(n=>n.getAttribute("stroke")!=="none"),f=v.__name((n,a)=>n?.getAttribute(a)??void 0,"getAttr");if(l){const n={fill:f(l,"fill"),"fill-opacity":f(l,"fill-opacity")??"1"};Object.entries(n).forEach(([a,e])=>{e&&g.setAttribute(a,e)})}if(r){const n={stroke:f(r,"stroke"),"stroke-width":f(r,"stroke-width")??"1","stroke-opacity":f(r,"stroke-opacity")??"1"};Object.entries(n).forEach(([a,e])=>{e&&g.setAttribute(a,e)})}const i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(g),i}v.__name(Bt,"mergePaths");var dt=v.__name((u,t)=>{var g=u.x,h=u.y,l=t.x-g,r=t.y-h,f=u.width/2,i=u.height/2,n,a;return Math.abs(r)*f>Math.abs(l)*i?(r<0&&(i=-i),n=r===0?0:i*l/r,a=i):(l<0&&(f=-f),n=f,a=l===0?0:f*r/l),{x:g+n,y:h+a}},"intersectRect"),$t=v.__name(async(u,t,g,h=!1,l=!1)=>{let r=t||"";typeof r=="object"&&(r=r[0]);const f=Y.getConfig2(),i=Y.getEffectiveHtmlLabels(f);return await ct.createText(u,r,{style:g,isTitle:h,useHtmlLabels:i,markdown:!1,isNode:l,width:Number.POSITIVE_INFINITY},f)},"createLabel"),ft=v.__name((u,t,g,h,l)=>["M",u+l,t,"H",u+g-l,"A",l,l,0,0,1,u+g,t+l,"V",t+h-l,"A",l,l,0,0,1,u+g-l,t+h,"H",u+l,"A",l,l,0,0,1,u,t+h-l,"V",t+l,"A",l,l,0,0,1,u+l,t,"Z"].join(" "),"createRoundedRectPathD"),ps=v.__name(async(u,t)=>{const g=Y.getConfig2(),{themeVariables:h,handDrawnSeed:l}=g,{clusterBkg:r,clusterBorder:f}=h,i=f,{labelStyles:n,nodeStyles:a,borderStyles:e,backgroundStyles:s}=$.styles2String(t),o=u.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),c=Y.evaluate(g.flowchart.htmlLabels),y=t.direction==="LR",d=o.insert("g").attr("class","cluster-label swimlane-label"),m=await ct.createText(d,t.label,{style:t.labelStyle,useHtmlLabels:c,isNode:!0,width:t.width});let p=m.getBBox();if(c){const M=m.children[0],B=X.select_default(m);p=M.getBoundingClientRect(),B.attr("width",p.width),B.attr("height",p.height)}const w=t.padding??0,b=t.width<=p.width+w?p.width+w:t.width;t.width<=p.width+w?t.diff=(b-t.width)/2-w:t.diff=-w;const S=t.height,x=t.y-S/2,N=t.y+S/2,k=t.x-b/2,_=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:x+S/3,D=y?4:0,R=p.height+2*D;let L,T;if(y){const M=Math.max(R,p.height+2*D),B=k+M,P=Math.max(0,b-M);if(t.look==="handDrawn"){const G=H.at.svg(o),V=$.userNodeOverrides(t,{roughness:.7,fill:r,stroke:i,fillWeight:3,seed:l}),z=$.userNodeOverrides(t,{roughness:.7,fill:"none",stroke:i,seed:l}),at=G.rectangle(k,x,M,S,V);L=o.insert(()=>at,":first-child");const tt=G.rectangle(B,x,P,S,z);T=o.insert(()=>tt,":first-child"),L.select("path:nth-child(2)").attr("style",e.join(";")),L.select("path").attr("style",s.join(";").replace("fill","stroke"))}else L=o.insert("rect",":first-child"),T=o.insert("rect",":first-child"),L.attr("class","swimlane-title").attr("style",a).attr("x",k).attr("y",x).attr("width",M).attr("height",S).attr("fill",r).attr("stroke",i),T.attr("class","swimlane-body").attr("style",a).attr("x",B).attr("y",x).attr("width",P).attr("height",S).attr("fill","none").attr("stroke",i);const O=k+M/2,C=t.y;d.attr("transform",`translate(${O}, ${C}) rotate(-90) translate(${-p.width/2}, ${-p.height/2})`)}else{const M=Math.max(0,_-x),B=Math.min(R,M),P=x+B,O=Math.max(0,N-P),C=t.x-b/2;if(t.look==="handDrawn"){const z=H.at.svg(o),at=$.userNodeOverrides(t,{roughness:.7,fill:r,stroke:i,fillWeight:3,seed:l}),tt=$.userNodeOverrides(t,{roughness:.7,fill:"none",stroke:i,seed:l}),it=z.rectangle(C,x,b,B,at);L=o.insert(()=>it,":first-child");const K=z.rectangle(C,P,b,O,tt);T=o.insert(()=>K,":first-child"),L.select("path:nth-child(2)").attr("style",e.join(";")),L.select("path").attr("style",s.join(";").replace("fill","stroke"))}else L=o.insert("rect",":first-child"),T=o.insert("rect",":first-child"),L.attr("class","swimlane-title").attr("style",a).attr("x",C).attr("y",x).attr("width",b).attr("height",B).attr("fill",r).attr("stroke",i),T.attr("class","swimlane-body").attr("style",a).attr("x",C).attr("y",P).attr("width",b).attr("height",O).attr("fill","none").attr("stroke",i);const G=t.x-p.width/2,V=x+(B-p.height)/2;d.attr("transform",`translate(${G}, ${V})`)}if(X.log.trace("Swimlane data ",t,JSON.stringify(t)),n){const M=d.select("span");M&&M.attr("style",n)}return t.offsetX=0,t.width=b,t.height=S,t.offsetY=p.height-w/2,t.intersect=function(M){return dt(t,M)},{cluster:o,labelBBox:p}},"swimlane"),Ot=v.__name(async(u,t)=>{X.log.info("Creating subgraph rect for ",t.id,t);const g=Y.getConfig2(),{themeVariables:h,handDrawnSeed:l}=g,{clusterBkg:r,clusterBorder:f}=h,{labelStyles:i,nodeStyles:n,borderStyles:a,backgroundStyles:e}=$.styles2String(t),s=u.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=Y.getEffectiveHtmlLabels(g),c=s.insert("g").attr("class","cluster-label ");let y;t.labelType==="markdown"?y=await ct.createText(c,t.label,{style:t.labelStyle,useHtmlLabels:o,isNode:!0,width:t.width}):y=await $t(c,t.label,t.labelStyle||"",!1,!0);let d=y.getBBox();if(Y.getEffectiveHtmlLabels(g)){const k=y.children[0],_=X.select_default(y);d=k.getBoundingClientRect(),_.attr("width",d.width),_.attr("height",d.height)}const m=t.width<=d.width+t.padding?d.width+t.padding:t.width;t.width<=d.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const p=t.height,w=t.x-m/2,b=t.y-p/2;X.log.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const k=H.at.svg(s),_=$.userNodeOverrides(t,{roughness:.7,fill:r,stroke:f,fillWeight:3,seed:l}),D=k.path(ft(w,b,m,p,0),_);S=s.insert(()=>(X.log.debug("Rough node insert CXC",D),D),":first-child"),S.select("path:nth-child(2)").attr("style",a.join(";")),S.select("path").attr("style",e.join(";").replace("fill","stroke"))}else S=s.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",b).attr("width",m).attr("height",p);const{subGraphTitleTopMargin:x}=At.getSubGraphTitleMargins(g);if(c.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2+x})`),i){const k=c.select("span");k&&k.attr("style",i)}const N=S.node().getBBox();return t.offsetX=0,t.width=N.width,t.height=N.height,t.offsetY=d.height-t.padding/2,t.intersect=function(k){return dt(t,k)},{cluster:s,labelBBox:d}},"rect"),ms={rect:Ot,squareRect:Ot,roundedWithTitle:v.__name(async(u,t)=>{const g=Y.getConfig2(),{themeVariables:h,handDrawnSeed:l}=g,{altBackground:r,compositeBackground:f,compositeTitleBackground:i,nodeBorder:n}=h,a=u.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),e=a.insert("g",":first-child"),s=a.insert("g").attr("class","cluster-label");let o=a.append("rect");const c=await $t(s,t.label,t.labelStyle,void 0,!0);let y=c.getBBox();if(Y.getEffectiveHtmlLabels(g)){const _=c.children[0],D=X.select_default(c);y=_.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}const d=0*t.padding,m=d/2,p=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+d;t.width<=y.width+t.padding?t.diff=(p-t.width)/2-t.padding:t.diff=-t.padding;const w=t.height+d,b=t.height+d-y.height-6,S=t.x-p/2,x=t.y-w/2;t.width=p;const N=t.y-t.height/2-m+y.height+2;let k;if(t.look==="handDrawn"){const _=t.cssClasses.includes("statediagram-cluster-alt"),D=H.at.svg(a),R=t.rx||t.ry?D.path(ft(S,x,p,w,10),{roughness:.7,fill:i,fillStyle:"solid",stroke:n,seed:l}):D.rectangle(S,x,p,w,{seed:l});k=a.insert(()=>R,":first-child");const L=D.rectangle(S,N,p,b,{fill:_?r:f,fillStyle:_?"hachure":"solid",stroke:n,seed:l});k=a.insert(()=>R,":first-child"),o=a.insert(()=>L)}else k=e.insert("rect",":first-child"),k.attr("class","outer").attr("x",S).attr("y",x).attr("width",p).attr("height",w).attr("data-look",t.look),o.attr("class","inner").attr("x",S).attr("y",N).attr("width",p).attr("height",b);return s.attr("transform",`translate(${t.x-y.width/2}, ${x+1-(Y.getEffectiveHtmlLabels(g)?0:3)})`),t.height=k.node().getBBox().height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(_){return dt(t,_)},{cluster:a,labelBBox:y}},"roundedWithTitle"),noteGroup:v.__name((u,t)=>{const g=u.insert("g").attr("class","note-cluster").attr("id",t.domId),h=g.insert("rect",":first-child"),l=0*t.padding,r=l/2;h.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-r).attr("y",t.y-t.height/2-r).attr("width",t.width+l).attr("height",t.height+l).attr("fill","none");const f=h.node().getBBox();return t.width=f.width,t.height=f.height,t.intersect=function(i){return dt(t,i)},{cluster:g,labelBBox:{width:0,height:0}}},"noteGroup"),divider:v.__name((u,t)=>{const{themeVariables:g,handDrawnSeed:h}=Y.getConfig2(),{nodeBorder:l}=g,r=u.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=r.insert("g",":first-child"),i=0*t.padding,n=t.width+i;t.diff=-t.padding;const a=t.height+i,e=t.x-n/2,s=t.y-a/2;t.width=n;let o;if(t.look==="handDrawn"){const c=H.at.svg(r).rectangle(e,s,n,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:l,seed:h});o=r.insert(()=>c,":first-child")}else{o=f.insert("rect",":first-child");let c="outer";t.look,c="divider",o.attr("class",c).attr("x",e).attr("y",s).attr("width",n).attr("height",a).attr("data-look",t.look)}return t.height=o.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(c){return dt(t,c)},{cluster:r,labelBBox:{}}},"divider"),kanbanSection:v.__name(async(u,t)=>{X.log.info("Creating subgraph rect for ",t.id,t);const g=Y.getConfig2(),{themeVariables:h,handDrawnSeed:l}=g,{clusterBkg:r,clusterBorder:f}=h,{labelStyles:i,nodeStyles:n,borderStyles:a,backgroundStyles:e}=$.styles2String(t),s=u.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=Y.getEffectiveHtmlLabels(g),c=s.insert("g").attr("class","cluster-label "),y=await ct.createText(c,t.label,{style:t.labelStyle,useHtmlLabels:o,isNode:!0,width:t.width});let d=y.getBBox();if(Y.getEffectiveHtmlLabels(g)){const k=y.children[0],_=X.select_default(y);d=k.getBoundingClientRect(),_.attr("width",d.width),_.attr("height",d.height)}const m=t.width<=d.width+t.padding?d.width+t.padding:t.width;t.width<=d.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const p=t.height,w=t.x-m/2,b=t.y-p/2;X.log.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const k=H.at.svg(s),_=$.userNodeOverrides(t,{roughness:.7,fill:r,stroke:f,fillWeight:4,seed:l}),D=k.path(ft(w,b,m,p,t.rx),_);S=s.insert(()=>(X.log.debug("Rough node insert CXC",D),D),":first-child"),S.select("path:nth-child(2)").attr("style",a.join(";")),S.select("path").attr("style",e.join(";").replace("fill","stroke"))}else S=s.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",b).attr("width",m).attr("height",p);const{subGraphTitleTopMargin:x}=At.getSubGraphTitleMargins(g);if(c.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2+x})`),i){const k=c.select("span");k&&k.attr("style",i)}const N=S.node().getBBox();return t.offsetX=0,t.width=N.width,t.height=N.height,t.offsetY=d.height-t.padding/2,t.intersect=function(k){return dt(t,k)},{cluster:s,labelBBox:d}},"kanbanSection"),swimlane:ps},zt=new Map,ws=v.__name(async(u,t)=>{const g=await ms[t.shape||"rect"](u,t);return zt.set(t.id,g),g},"insertCluster"),bs=v.__name(()=>{zt=new Map},"clear");function Ut(u,t){return u.intersect(t)}v.__name(Ut,"intersectNode");var xs=Ut;function Zt(u,t,g,h){var l=u.x,r=u.y,f=l-h.x,i=r-h.y,n=Math.sqrt(t*t*i*i+g*g*f*f),a=Math.abs(t*g*f/n);h.x<l&&(a=-a);var e=Math.abs(t*g*i/n);return h.y<r&&(e=-e),{x:l+a,y:r+e}}v.__name(Zt,"intersectEllipse");var Jt=Zt;function Qt(u,t,g){return Jt(u,t,t,g)}v.__name(Qt,"intersectCircle");var Ss=Qt;function Kt(u,t,g,h){{const l=t.y-u.y,r=u.x-t.x,f=t.x*u.y-u.x*t.y,i=l*g.x+r*g.y+f,n=l*h.x+r*h.y+f,a=1e-6;if(i!==0&&n!==0&&Mt(i,n))return;const e=h.y-g.y,s=g.x-h.x,o=h.x*g.y-g.x*h.y,c=e*u.x+s*u.y+o,y=e*t.x+s*t.y+o;if(Math.abs(c)<a&&Math.abs(y)<a&&Mt(c,y))return;const d=l*s-e*r;if(d===0)return;const m=Math.abs(d/2);let p=r*o-s*f;const w=p<0?(p-m)/d:(p+m)/d;return p=e*f-l*o,{x:w,y:p<0?(p-m)/d:(p+m)/d}}}v.__name(Kt,"intersectLine");function Mt(u,t){return u*t>0}v.__name(Mt,"sameSign");var $s=Kt;function te(u,t,g){let h=u.x,l=u.y,r=[],f=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(e){f=Math.min(f,e.x),i=Math.min(i,e.y)}):(f=Math.min(f,t.x),i=Math.min(i,t.y));let n=h-u.width/2-f,a=l-u.height/2-i;for(let e=0;e<t.length;e++){let s=t[e],o=t[e<t.length-1?e+1:0],c=$s(u,g,{x:n+s.x,y:a+s.y},{x:n+o.x,y:a+o.y});c&&r.push(c)}return r.length?(r.length>1&&r.sort(function(e,s){let o=e.x-g.x,c=e.y-g.y,y=Math.sqrt(o*o+c*c),d=s.x-g.x,m=s.y-g.y,p=Math.sqrt(d*d+m*m);return y<p?-1:y===p?0:1}),r[0]):u}v.__name(te,"intersectPolygon");var A={node:xs,circle:Ss,ellipse:Jt,polygon:te,rect:dt};function ee(u,t){const{labelStyles:g}=$.styles2String(t);t.labelStyle=g;const h=E(t);let l=h;h||(l="anchor");const r=u.insert("g").attr("class",l).attr("id",t.domId||t.id),f=1,{cssStyles:i}=t,n=H.at.svg(r),a=$.userNodeOverrides(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(a.roughness=0);const e=n.circle(0,0,f*2,a),s=r.insert(()=>e,":first-child");return s.attr("class","anchor").attr("style",U.handleUndefinedAttr(i)),I(t,s),t.intersect=function(o){return X.log.info("Circle intersect",t,f,o),A.circle(t,f,o)},r}v.__name(ee,"anchor");function Ct(u,t,g,h,l,r,f){const n=(u+g)/2,a=(t+h)/2,e=Math.atan2(h-t,g-u),s=(g-u)/2,o=(h-t)/2,c=s/l,y=o/r,d=Math.sqrt(c**2+y**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-d**2),p=n+m*r*Math.sin(e)*(f?-1:1),w=a-m*l*Math.cos(e)*(f?-1:1),b=Math.atan2((t-w)/r,(u-p)/l);let S=Math.atan2((h-w)/r,(g-p)/l)-b;f&&S<0&&(S+=2*Math.PI),!f&&S>0&&(S-=2*Math.PI);const x=[];for(let N=0;N<20;N++){const k=b+N/19*S,_=p+l*Math.cos(k),D=w+r*Math.sin(k);x.push({x:_,y:D})}return x}v.__name(Ct,"generateArcPoints");function se(u,t,g){const[h,l]=[t,g].sort((r,f)=>f-r);return l*(1-Math.sqrt(1-(u/h/2)**2))}v.__name(se,"calculateArcSagitta");async function ae(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?16:l,f=t.look==="neo"?12:l,i=v.__name(_=>_+f,"calcTotalHeight"),n=v.__name(_=>{const D=_/2;return[D/(2.5+_/50),D]},"calcEllipseRadius"),{shapeSvg:a,bbox:e}=await W(u,t,E(t)),s=i(t?.height?t?.height:e.height),[o,c]=n(s),y=se(s,o,c),d=(t?.width?t?.width:e.width)+r*2+y-y,m=s,{cssStyles:p}=t,w=[{x:d/2,y:-m/2},{x:-d/2,y:-m/2},...Ct(-d/2,-m/2,-d/2,m/2,o,c,!1),{x:d/2,y:m/2},...Ct(d/2,m/2,d/2,-m/2,o,c,!0)],b=H.at.svg(a),S=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const x=q(w),N=b.path(x,S),k=a.insert(()=>N,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),k.attr("transform",`translate(${o/2}, 0)`),I(t,k),t.intersect=function(_){return A.polygon(t,w,_)},a}v.__name(ae,"bowTieRect");function ot(u,t,g,h){return u.insert("polygon",":first-child").attr("points",h.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+g/2+")")}v.__name(ot,"insertPolygonShape");var vt=12;async function ie(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?28:l,f=t.look==="neo"?24:l,{shapeSvg:i,bbox:n}=await W(u,t,E(t)),a=(t?.width??n.width)+(t.look==="neo"?r*2:r+vt),e=(t?.height??n.height)+(t.look==="neo"?f*2:f),s=0,o=a,c=-e,y=0,d=[{x:s+vt,y:c},{x:o,y:c},{x:o,y},{x:s,y},{x:s,y:c+vt},{x:s+vt,y:c}];let m;const{cssStyles:p}=t;if(t.look==="handDrawn"){const w=H.at.svg(i),b=$.userNodeOverrides(t,{}),S=q(d),x=w.path(S,b);m=i.insert(()=>x,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),p&&m.attr("style",p)}else m=ot(i,a,e,d);return h&&m.attr("style",h),I(t,m),t.intersect=function(w){return A.polygon(t,d,w)},i}v.__name(ie,"card");function re(u,t){const{nodeStyles:g}=$.styles2String(t);t.label="";const h=u.insert("g").attr("class",E(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,r=Math.max(28,t.width??0),f=[{x:0,y:r/2},{x:r/2,y:0},{x:0,y:-r/2},{x:-r/2,y:0}],i=H.at.svg(h),n=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");const a=q(f),e=i.path(a,n),s=h.insert(()=>e,":first-child");return l&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",l),g&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",g),t.width=28,t.height=28,t.intersect=function(o){return A.polygon(t,f,o)},h}v.__name(re,"choice");async function Rt(u,t,g){const{labelStyles:h,nodeStyles:l}=$.styles2String(t);t.labelStyle=h;const{shapeSvg:r,bbox:f,halfPadding:i}=await W(u,t,E(t)),n=16,a=g?.padding??i,e=t.look==="neo"?f.width/2+n*2:f.width/2+a;let s;const{cssStyles:o}=t;if(t.look==="handDrawn"){const c=H.at.svg(r),y=$.userNodeOverrides(t,{}),d=c.circle(0,0,e*2,y);s=r.insert(()=>d,":first-child"),s.attr("class","basic label-container").attr("style",U.handleUndefinedAttr(o))}else s=r.insert("circle",":first-child").attr("class","basic label-container").attr("style",l).attr("r",e).attr("cx",0).attr("cy",0);return I(t,s),t.calcIntersect=function(c,y){const d=c.width/2;return A.circle(c,d,y)},t.intersect=function(c){return X.log.info("Circle intersect",t,e,c),A.circle(t,e,c)},r}v.__name(Rt,"circle");function le(u){const t=Math.cos(Math.PI/4),g=Math.sin(Math.PI/4),h=u*2,l={x:h/2*t,y:h/2*g},r={x:-(h/2)*t,y:h/2*g},f={x:-(h/2)*t,y:-(h/2)*g},i={x:h/2*t,y:-(h/2)*g};return`M ${r.x},${r.y} L ${i.x},${i.y}
2
+ M ${l.x},${l.y} L ${f.x},${f.y}`}v.__name(le,"createLine");function ne(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g,t.label="";const l=u.insert("g").attr("class",E(t)).attr("id",t.domId??t.id),r=Math.max(30,t?.width??0),{cssStyles:f}=t,i=H.at.svg(l),n=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");const a=i.circle(0,0,r*2,n),e=le(r),s=i.path(e,n),o=l.insert(()=>a,":first-child");return o.insert(()=>s),o.attr("class","outer-path"),f&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",f),h&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",h),I(t,o),t.intersect=function(c){return X.log.info("crossedCircle intersect",t,{radius:r,point:c}),A.circle(t,r,c)},l}v.__name(ne,"crossedCircle");function lt(u,t,g,h=100,l=0,r=180){const f=[],i=l*Math.PI/180,n=(r*Math.PI/180-i)/(h-1);for(let a=0;a<h;a++){const e=i+a*n,s=u+g*Math.cos(e),o=t+g*Math.sin(e);f.push({x:-s,y:-o})}return f}v.__name(lt,"generateCirclePoints");async function ce(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const{shapeSvg:l,bbox:r,label:f}=await W(u,t,E(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,a=r.width+i,e=r.height+n,s=Math.max(5,e*.1),{cssStyles:o}=t,c=[...lt(a/2,-e/2,s,30,-90,0),{x:-a/2-s,y:s},...lt(a/2+s*2,-s,s,20,-180,-270),...lt(a/2+s*2,s,s,20,-90,-180),{x:-a/2-s,y:-e/2},...lt(a/2,e/2,s,20,0,90)],y=[{x:a/2,y:-e/2-s},{x:-a/2,y:-e/2-s},...lt(a/2,-e/2,s,20,-90,0),{x:-a/2-s,y:-s},...lt(a/2+a*.1,-s,s,20,-180,-270),...lt(a/2+a*.1,s,s,20,-90,-180),{x:-a/2-s,y:e/2},...lt(a/2,e/2,s,20,0,90),{x:-a/2,y:e/2+s},{x:a/2,y:e/2+s}],d=H.at.svg(l),m=$.userNodeOverrides(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const p=q(c).replace("Z",""),w=d.path(p,m),b=q(y),S=d.path(b,{...m}),x=l.insert("g",":first-child");return x.insert(()=>S,":first-child").attr("stroke-opacity",0),x.insert(()=>w,":first-child"),x.attr("class","text"),o&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",o),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),x.attr("transform",`translate(${s}, 0)`),f.attr("transform",`translate(${-a/2+s-(r.x-(r.left??0))},${-e/2+(t.padding??0)/2-(r.y-(r.top??0))})`),I(t,x),t.intersect=function(N){return A.polygon(t,y,N)},l}v.__name(ce,"curlyBraceLeft");function nt(u,t,g,h=100,l=0,r=180){const f=[],i=l*Math.PI/180,n=(r*Math.PI/180-i)/(h-1);for(let a=0;a<h;a++){const e=i+a*n,s=u+g*Math.cos(e),o=t+g*Math.sin(e);f.push({x:s,y:o})}return f}v.__name(nt,"generateCirclePoints");async function oe(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const{shapeSvg:l,bbox:r,label:f}=await W(u,t,E(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,a=r.width+(t.look==="neo"?i*2:i),e=r.height+(t.look==="neo"?n*2:n),s=Math.max(5,e*.1),{cssStyles:o}=t,c=[...nt(a/2,-e/2,s,20,-90,0),{x:a/2+s,y:-s},...nt(a/2+s*2,-s,s,20,-180,-270),...nt(a/2+s*2,s,s,20,-90,-180),{x:a/2+s,y:e/2},...nt(a/2,e/2,s,20,0,90)],y=[{x:-a/2,y:-e/2-s},{x:a/2,y:-e/2-s},...nt(a/2,-e/2,s,20,-90,0),{x:a/2+s,y:-s},...nt(a/2+s*2,-s,s,20,-180,-270),...nt(a/2+s*2,s,s,20,-90,-180),{x:a/2+s,y:e/2},...nt(a/2,e/2,s,20,0,90),{x:a/2,y:e/2+s},{x:-a/2,y:e/2+s}],d=H.at.svg(l),m=$.userNodeOverrides(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const p=q(c).replace("Z",""),w=d.path(p,m),b=q(y),S=d.path(b,{...m}),x=l.insert("g",":first-child");return x.insert(()=>S,":first-child").attr("stroke-opacity",0),x.insert(()=>w,":first-child"),x.attr("class","text"),o&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",o),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),x.attr("transform",`translate(${-s}, 0)`),f.attr("transform",`translate(${-a/2+(t.padding??0)/2-(r.x-(r.left??0))},${-e/2+(t.padding??0)/2-(r.y-(r.top??0))})`),I(t,x),t.intersect=function(N){return A.polygon(t,y,N)},l}v.__name(oe,"curlyBraceRight");function J(u,t,g,h=100,l=0,r=180){const f=[],i=l*Math.PI/180,n=(r*Math.PI/180-i)/(h-1);for(let a=0;a<h;a++){const e=i+a*n,s=u+g*Math.cos(e),o=t+g*Math.sin(e);f.push({x:-s,y:-o})}return f}v.__name(J,"generateCirclePoints");async function he(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const{shapeSvg:l,bbox:r,label:f}=await W(u,t,E(t)),i=t.look==="neo"?18:t.padding??0,n=t.look==="neo"?12:t.padding??0,a=r.width+(t.look==="neo"?i*2:i),e=r.height+(t.look==="neo"?n*2:n),s=Math.max(5,e*.1),{cssStyles:o}=t,c=[...J(a/2,-e/2,s,30,-90,0),{x:-a/2-s,y:s},...J(a/2+s*2,-s,s,20,-180,-270),...J(a/2+s*2,s,s,20,-90,-180),{x:-a/2-s,y:-e/2},...J(a/2,e/2,s,20,0,90)],y=[...J(-a/2+s+s/2,-e/2,s,20,-90,-180),{x:a/2-s/2,y:s},...J(-a/2-s/2,-s,s,20,0,90),...J(-a/2-s/2,s,s,20,-90,0),{x:a/2-s/2,y:-s},...J(-a/2+s+s/2,e/2,s,30,-180,-270)],d=[{x:a/2,y:-e/2-s},{x:-a/2,y:-e/2-s},...J(a/2,-e/2,s,20,-90,0),{x:-a/2-s,y:-s},...J(a/2+s*2,-s,s,20,-180,-270),...J(a/2+s*2,s,s,20,-90,-180),{x:-a/2-s,y:e/2},...J(a/2,e/2,s,20,0,90),{x:-a/2,y:e/2+s},{x:a/2-s-s/2,y:e/2+s},...J(-a/2+s+s/2,-e/2,s,20,-90,-180),{x:a/2-s/2,y:s},...J(-a/2-s/2,-s,s,20,0,90),...J(-a/2-s/2,s,s,20,-90,0),{x:a/2-s/2,y:-s},...J(-a/2+s+s/2,e/2,s,30,-180,-270)],m=H.at.svg(l),p=$.userNodeOverrides(t,{fill:"none"});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const w=q(c).replace("Z",""),b=m.path(w,p),S=q(y).replace("Z",""),x=m.path(S,p),N=q(d),k=m.path(N,{...p}),_=l.insert("g",":first-child");return _.insert(()=>k,":first-child").attr("stroke-opacity",0),_.insert(()=>b,":first-child"),_.insert(()=>x,":first-child"),_.attr("class","text"),o&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",o),h&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",h),_.attr("transform",`translate(${s-s/4}, 0)`),f.attr("transform",`translate(${-a/2+(t.padding??0)/2-(r.x-(r.left??0))},${-e/2+(t.padding??0)/2-(r.y-(r.top??0))})`),I(t,_),t.intersect=function(D){return A.polygon(t,d,D)},l}v.__name(he,"curlyBraces");async function ge(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?16:l,f=t.look==="neo"?12:l,i=20,n=5,{shapeSvg:a,bbox:e}=await W(u,t,E(t)),s=Math.max(i,(e.width+r*2)*1.25,t?.width??0),o=Math.max(n,e.height+f*2,t?.height??0),c=o/2,{cssStyles:y}=t,d=H.at.svg(a),m=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const p=s,w=o,b=p-c,S=w/4,x=[{x:b,y:0},{x:S,y:0},{x:0,y:w/2},{x:S,y:w},{x:b,y:w},...St(-b,-w/2,c,50,270,90)],N=q(x),k=d.path(N,m),_=a.insert(()=>k,":first-child");return _.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",y),h&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",h),_.attr("transform",`translate(${-s/2}, ${-o/2})`),I(t,_),t.intersect=function(D){return A.polygon(t,x,D)},a}v.__name(ge,"curvedTrapezoid");var vs=v.__name((u,t,g,h,l,r)=>[`M${u},${t+r}`,`a${l},${r} 0,0,0 ${g},0`,`a${l},${r} 0,0,0 ${-g},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${g},0`,`l0,${-h}`].join(" "),"createCylinderPathD"),ks=v.__name((u,t,g,h,l,r)=>[`M${u},${t+r}`,`M${u+g},${t+r}`,`a${l},${r} 0,0,0 ${-g},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${g},0`,`l0,${-h}`].join(" "),"createOuterCylinderPathD"),_s=v.__name((u,t,g,h,l,r)=>[`M${u-g/2},${-h/2}`,`a${l},${r} 0,0,0 ${g},0`].join(" "),"createInnerCylinderPathD"),It=8,Tt=8;async function fe(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?24:l,f=t.look==="neo"?24:l;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-f,t.width<Tt&&(t.width=Tt);const p=m/2/(2.5+m/50);t.height=(t.height??0)-r-p*3,t.height<It&&(t.height=It)}const{shapeSvg:i,bbox:n,label:a}=await W(u,t,E(t)),e=(t.width?t.width:n.width)+f,s=e/2,o=s/(2.5+e/50),c=(t.height?t.height:n.height)+r+o;let y;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=H.at.svg(i),p=ks(0,0,e,c,s,o),w=_s(0,o,e,c,s,o),b=$.userNodeOverrides(t,{}),S=m.path(p,b),x=m.path(w,$.userNodeOverrides(t,{fill:"none"}));y=i.insert(()=>x,":first-child"),y=i.insert(()=>S,":first-child"),y.attr("class","basic label-container"),d&&y.attr("style",d)}else{const m=vs(0,0,e,c,s,o);y=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",U.handleUndefinedAttr(d)).attr("style",h)}return y.attr("label-offset-y",o),y.attr("transform",`translate(${-e/2}, ${-(c/2+o)})`),I(t,y),a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(m){const p=A.rect(t,m),w=p.x-(t.x??0);if(s!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(p.y-(t.y??0))>(t.height??0)/2-o)){let b=o*o*(1-w*w/(s*s));b>0&&(b=Math.sqrt(b)),b=o-b,m.y-(t.y??0)>0&&(b=-b),p.y+=b}return p},i}v.__name(fe,"cylinder");async function wt(u,t,g){const{labelStyles:h,nodeStyles:l}=$.styles2String(t);t.labelStyle=h;const{shapeSvg:r,bbox:f}=await W(u,t,E(t)),i=Math.max(f.width+g.labelPaddingX*2,t?.width||0),n=Math.max(f.height+g.labelPaddingY*2,t?.height||0),a=-i/2,e=-n/2;let s,{rx:o,ry:c}=t;const{cssStyles:y}=t;if(g?.rx&&g.ry&&(o=g.rx,c=g.ry),t.look==="handDrawn"){const d=H.at.svg(r),m=$.userNodeOverrides(t,{}),p=o||c?d.path(ft(a,e,i,n,o||0),m):d.rectangle(a,e,i,n,m);s=r.insert(()=>p,":first-child"),s.attr("class","basic label-container").attr("style",U.handleUndefinedAttr(y))}else s=r.insert("rect",":first-child"),s.attr("class","basic label-container").attr("style",l).attr("rx",U.handleUndefinedAttr(o)).attr("ry",U.handleUndefinedAttr(c)).attr("x",a).attr("y",e).attr("width",i).attr("height",n);return I(t,s),t.calcIntersect=function(d,m){return A.rect(d,m)},t.intersect=function(d){return A.rect(t,d)},r}v.__name(wt,"drawRect");async function ye(u,t){const{cssClasses:g,labelPaddingX:h,labelPaddingY:l,padding:r,width:f,height:i}=t,n=await wt(u,t,{rx:0,ry:0,classes:g??"",labelPaddingX:h??(r??0)*2,labelPaddingY:l??r??0});if(t.look==="handDrawn"){const o=H.at.svg(n),c=$.userNodeOverrides(t,{}),y=n.select(".basic.label-container > path:nth-child(2)"),d=y.node();if(!d)return n;let m=null;if(d instanceof SVGGraphicsElement)m=d.getBBox();else return n;return n.insert(()=>o.line(m.x,m.y,m.x+m.width,m.y,c),".basic.label-container g.label"),n.insert(()=>o.line(m.x,m.y+m.height,m.x+m.width,m.y+m.height,c),".basic.label-container g.label"),y.remove(),n}const a=n.select(".basic.label-container"),e=(Number(a.attr("width"))||f)??0,s=(Number(a.attr("height"))||i)??0;return e>0&&s>0&&a.attr("stroke-dasharray",`${e} ${s}`),n}v.__name(ye,"datastore");async function de(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?16:t.padding??0,{shapeSvg:f,bbox:i,label:n}=await W(u,t,E(t)),a=i.width+l,e=i.height+r,s=e*.2,o=-a/2,c=-e/2-s/2,{cssStyles:y}=t,d=H.at.svg(f),m=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const p=[{x:o,y:c+s},{x:-o,y:c+s},{x:-o,y:-c},{x:o,y:-c},{x:o,y:c},{x:-o,y:c},{x:-o,y:c+s}],w=d.polygon(p.map(S=>[S.x,S.y]),m),b=f.insert(()=>w,":first-child");return b.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",y),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),n.attr("transform",`translate(${o+(t.padding??0)/2-(i.x-(i.left??0))}, ${c+s+(t.padding??0)/2-(i.y-(i.top??0))})`),I(t,b),t.intersect=function(S){return A.rect(t,S)},f}v.__name(de,"dividedRectangle");async function ue(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t),l=t.look==="neo"?12:5;t.labelStyle=g;const r=t.padding??0,f=t.look==="neo"?16:r,{shapeSvg:i,bbox:n}=await W(u,t,E(t)),a=(t?.width?t?.width/2:n.width/2)+(f??0),e=a-l;let s;const{cssStyles:o}=t;if(t.look==="handDrawn"){const c=H.at.svg(i),y=$.userNodeOverrides(t,{roughness:.2,strokeWidth:2.5}),d=$.userNodeOverrides(t,{roughness:.2,strokeWidth:1.5}),m=c.circle(0,0,a*2,y),p=c.circle(0,0,e*2,d);s=i.insert("g",":first-child"),s.attr("class",U.handleUndefinedAttr(t.cssClasses)).attr("style",U.handleUndefinedAttr(o)),s.node()?.appendChild(m),s.node()?.appendChild(p)}else{s=i.insert("g",":first-child");const c=s.insert("circle",":first-child"),y=s.insert("circle");s.attr("class","basic label-container").attr("style",h),c.attr("class","outer-circle").attr("style",h).attr("r",a).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",h).attr("r",e).attr("cx",0).attr("cy",0)}return I(t,s),t.intersect=function(c){return X.log.info("DoubleCircle intersect",t,a,c),A.circle(t,a,c)},i}v.__name(ue,"doublecircle");function pe(u,t,{config:{themeVariables:g}}){const{labelStyles:h,nodeStyles:l}=$.styles2String(t);t.label="",t.labelStyle=h;const r=u.insert("g").attr("class",E(t)).attr("id",t.domId??t.id),f=7,{cssStyles:i}=t,n=H.at.svg(r),{nodeBorder:a}=g,e=$.userNodeOverrides(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);const s=n.circle(0,0,f*2,e),o=r.insert(()=>s,":first-child");return o.selectAll("path").attr("style",`fill: ${a} !important;`),i&&i.length>0&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",i),l&&t.look!=="handDrawn"&&o.selectAll("path").attr("style",l),I(t,o),t.intersect=function(c){return X.log.info("filledCircle intersect",t,{radius:f,point:c}),A.circle(t,f,c)},r}v.__name(pe,"filledCircle");var Et=10,Wt=10;async function me(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?l*2:l;(t.width||t.height)&&(t.height=t?.height??0,t.height<Et&&(t.height=Et),t.width=(t?.width??0)-r-r/2,t.width<Wt&&(t.width=Wt));const{shapeSvg:f,bbox:i,label:n}=await W(u,t,E(t)),a=(t?.width?t?.width:i.width)+(r??0),e=t?.height?t?.height:a+i.height,s=e,o=[{x:0,y:-e},{x:s,y:-e},{x:s/2,y:0}],{cssStyles:c}=t,y=H.at.svg(f),d=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=q(o),p=y.path(m,d),w=f.insert(()=>p,":first-child").attr("transform",`translate(${-e/2}, ${e/2})`).attr("class","outer-path");return c&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",c),h&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",h),t.width=a,t.height=e,I(t,w),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-e/2+(t.padding??0)/2+(i.y-(i.top??0))})`),t.intersect=function(b){return X.log.info("Triangle intersect",t,o,b),A.polygon(t,o,b)},f}v.__name(me,"flippedTriangle");function we(u,t,{dir:g,config:{state:h,themeVariables:l}}){const{nodeStyles:r}=$.styles2String(t);t.label="";const f=u.insert("g").attr("class",E(t)).attr("id",t.domId??t.id),{cssStyles:i}=t;let n=Math.max(70,t?.width??0),a=Math.max(10,t?.height??0);g==="LR"&&(n=Math.max(10,t?.width??0),a=Math.max(70,t?.height??0));const e=-1*n/2,s=-1*a/2,o=H.at.svg(f),c=$.userNodeOverrides(t,{stroke:l.lineColor,fill:l.lineColor});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const y=o.rectangle(e,s,n,a,c),d=f.insert(()=>y,":first-child");i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),I(t,d);const m=h?.padding??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(p){return A.rect(t,p)},f}v.__name(we,"forkJoin");async function be(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=15,r=10,f=t.look==="neo"?16:t.padding??0,i=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-i*2,t.height<r&&(t.height=r),t.width=(t?.width??0)-f*2,t.width<l&&(t.width=l));const{shapeSvg:n,bbox:a}=await W(u,t,E(t)),e=(t?.width?t?.width:Math.max(l,a.width))+f*2,s=(t?.height?t?.height:Math.max(r,a.height))+i*2,o=s/2,{cssStyles:c}=t,y=H.at.svg(n),d=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=[{x:-e/2,y:-s/2},{x:e/2-o,y:-s/2},...St(-e/2+o,0,o,50,90,270),{x:e/2-o,y:s/2},{x:-e/2,y:s/2}],p=q(m),w=y.path(p,d),b=n.insert(()=>w,":first-child");return b.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",c),h&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",h),I(t,b),t.intersect=function(S){return X.log.info("Pill intersect",t,{radius:o,point:S}),A.polygon(t,m,S)},n}v.__name(be,"halfRoundedRectangle");var Ps=v.__name((u,t,g,h,l)=>[`M${u+l},${t}`,`L${u+g-l},${t}`,`L${u+g},${t-h/2}`,`L${u+g-l},${t-h}`,`L${u+l},${t-h}`,`L${u},${t-h/2}`,"Z"].join(" "),"createHexagonPathD");async function xe(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t),l=t.look==="neo"?3.5:4;t.labelStyle=g;const r=t.padding??0,f=70,i=32,n=t.look==="neo"?f:r,a=t.look==="neo"?i:r;if(t.width||t.height){const w=(t.height??0)/l;t.width=(t?.width??0)-2*w-a,t.height=(t.height??0)-n}const{shapeSvg:e,bbox:s}=await W(u,t,E(t)),o=(t?.height?t?.height:s.height)+n,c=o/l,y=(t?.width?t?.width:s.width)+2*c+a,d=[{x:c,y:0},{x:y-c,y:0},{x:y,y:-o/2},{x:y-c,y:-o},{x:c,y:-o},{x:0,y:-o/2}];let m;const{cssStyles:p}=t;if(t.look==="handDrawn"){const w=H.at.svg(e),b=$.userNodeOverrides(t,{}),S=Ps(0,0,y,o,c),x=w.path(S,b);m=e.insert(()=>x,":first-child").attr("transform",`translate(${-y/2}, ${o/2})`),p&&m.attr("style",p)}else m=ot(e,y,o,d);return h&&m.attr("style",h),t.width=y,t.height=o,I(t,m),t.intersect=function(w){return A.polygon(t,d,w)},e}v.__name(xe,"hexagon");async function Se(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.label="",t.labelStyle=g;const{shapeSvg:l}=await W(u,t,E(t)),r=Math.max(30,t?.width??0),f=Math.max(30,t?.height??0),{cssStyles:i}=t,n=H.at.svg(l),a=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(a.roughness=0,a.fillStyle="solid");const e=[{x:0,y:0},{x:r,y:0},{x:0,y:f},{x:r,y:f}],s=q(e),o=n.path(s,a),c=l.insert(()=>o,":first-child");return c.attr("class","basic label-container outer-path"),i&&t.look!=="handDrawn"&&c.selectChildren("path").attr("style",i),h&&t.look!=="handDrawn"&&c.selectChildren("path").attr("style",h),c.attr("transform",`translate(${-r/2}, ${-f/2})`),I(t,c),t.intersect=function(y){return X.log.info("Pill intersect",t,{points:e}),A.polygon(t,e,y)},l}v.__name(Se,"hourglass");async function $e(u,t,{config:{themeVariables:g,flowchart:h}}){const{labelStyles:l}=$.styles2String(t);t.labelStyle=l;const r=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(r,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);const{shapeSvg:a,bbox:e,label:s}=await W(u,t,"icon-shape default"),o=t.pos==="t",c=i,y=i,{nodeBorder:d}=g,{stylesMap:m}=$.compileStyles(t),p=-y/2,w=-c/2,b=t.label?8:0,S=H.at.svg(a),x=$.userNodeOverrides(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const N=S.rectangle(p,w,y,c,x),k=Math.max(y,e.width),_=c+e.height+b,D=S.rectangle(-k/2,-_/2,k,_,{...x,fill:"transparent",stroke:"none"}),R=a.insert(()=>N,":first-child"),L=a.insert(()=>D);if(t.icon){const T=a.append("g");T.html(`<g>${await kt.getIconSVG(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);const M=T.node().getBBox(),B=M.width,P=M.height,O=M.x,C=M.y;T.attr("transform",`translate(${-B/2-O},${o?e.height/2+b/2-P/2-C:-e.height/2-b/2-P/2-C})`),T.attr("style",`color: ${m.get("stroke")??d};`)}return s.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${o?-_/2:_/2-e.height})`),R.attr("transform",`translate(0,${o?e.height/2+b/2:-e.height/2-b/2})`),I(t,L),t.intersect=function(T){if(X.log.info("iconSquare intersect",t,T),!t.label)return A.rect(t,T);const M=t.x??0,B=t.y??0,P=t.height??0;let O=[];return o?O=[{x:M-e.width/2,y:B-P/2},{x:M+e.width/2,y:B-P/2},{x:M+e.width/2,y:B-P/2+e.height+b},{x:M+y/2,y:B-P/2+e.height+b},{x:M+y/2,y:B+P/2},{x:M-y/2,y:B+P/2},{x:M-y/2,y:B-P/2+e.height+b},{x:M-e.width/2,y:B-P/2+e.height+b}]:O=[{x:M-y/2,y:B-P/2},{x:M+y/2,y:B-P/2},{x:M+y/2,y:B-P/2+c},{x:M+e.width/2,y:B-P/2+c},{x:M+e.width/2/2,y:B+P/2},{x:M-e.width/2,y:B+P/2},{x:M-e.width/2,y:B-P/2+c},{x:M-y/2,y:B-P/2+c}],A.polygon(t,O,T)},a}v.__name($e,"icon");async function ve(u,t,{config:{themeVariables:g,flowchart:h}}){const{labelStyles:l}=$.styles2String(t);t.labelStyle=l;const r=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(r,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);const{shapeSvg:a,bbox:e,label:s}=await W(u,t,"icon-shape default"),o=20,c=t.label?8:0,y=t.pos==="t",{nodeBorder:d,mainBkg:m}=g,{stylesMap:p}=$.compileStyles(t),w=H.at.svg(a),b=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid"),b.stroke=p.get("fill")??m;const S=a.append("g");t.icon&&S.html(`<g>${await kt.getIconSVG(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);const x=S.node().getBBox(),N=x.width,k=x.height,_=x.x,D=x.y,R=Math.max(N,k)*Math.SQRT2+o*2,L=w.circle(0,0,R,b),T=Math.max(R,e.width),M=R+e.height+c,B=w.rectangle(-T/2,-M/2,T,M,{...b,fill:"transparent",stroke:"none"}),P=a.insert(()=>L,":first-child"),O=a.insert(()=>B);return S.attr("transform",`translate(${-N/2-_},${y?e.height/2+c/2-k/2-D:-e.height/2-c/2-k/2-D})`),S.attr("style",`color: ${p.get("stroke")??d};`),s.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${y?-M/2:M/2-e.height})`),P.attr("transform",`translate(0,${y?e.height/2+c/2:-e.height/2-c/2})`),I(t,O),t.intersect=function(C){return X.log.info("iconSquare intersect",t,C),A.rect(t,C)},a}v.__name(ve,"iconCircle");async function ke(u,t,{config:{themeVariables:g,flowchart:h}}){const{labelStyles:l}=$.styles2String(t);t.labelStyle=l;const r=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(r,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);const{shapeSvg:a,bbox:e,halfPadding:s,label:o}=await W(u,t,"icon-shape default"),c=t.pos==="t",y=i+s*2,d=i+s*2,{nodeBorder:m,mainBkg:p}=g,{stylesMap:w}=$.compileStyles(t),b=-d/2,S=-y/2,x=t.label?8:0,N=H.at.svg(a),k=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid"),k.stroke=w.get("fill")??p;const _=N.path(ft(b,S,d,y,5),k),D=Math.max(d,e.width),R=y+e.height+x,L=N.rectangle(-D/2,-R/2,D,R,{...k,fill:"transparent",stroke:"none"}),T=a.insert(()=>_,":first-child").attr("class","icon-shape2"),M=a.insert(()=>L);if(t.icon){const B=a.append("g");B.html(`<g>${await kt.getIconSVG(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);const P=B.node().getBBox(),O=P.width,C=P.height,G=P.x,V=P.y;B.attr("transform",`translate(${-O/2-G},${c?e.height/2+x/2-C/2-V:-e.height/2-x/2-C/2-V})`),B.attr("style",`color: ${w.get("stroke")??m};`)}return o.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${c?-R/2:R/2-e.height})`),T.attr("transform",`translate(0,${c?e.height/2+x/2:-e.height/2-x/2})`),I(t,M),t.intersect=function(B){if(X.log.info("iconSquare intersect",t,B),!t.label)return A.rect(t,B);const P=t.x??0,O=t.y??0,C=t.height??0;let G=[];return c?G=[{x:P-e.width/2,y:O-C/2},{x:P+e.width/2,y:O-C/2},{x:P+e.width/2,y:O-C/2+e.height+x},{x:P+d/2,y:O-C/2+e.height+x},{x:P+d/2,y:O+C/2},{x:P-d/2,y:O+C/2},{x:P-d/2,y:O-C/2+e.height+x},{x:P-e.width/2,y:O-C/2+e.height+x}]:G=[{x:P-d/2,y:O-C/2},{x:P+d/2,y:O-C/2},{x:P+d/2,y:O-C/2+y},{x:P+e.width/2,y:O-C/2+y},{x:P+e.width/2/2,y:O+C/2},{x:P-e.width/2,y:O+C/2},{x:P-e.width/2,y:O-C/2+y},{x:P-d/2,y:O-C/2+y}],A.polygon(t,G,B)},a}v.__name(ke,"iconRounded");async function _e(u,t,{config:{themeVariables:g,flowchart:h}}){const{labelStyles:l}=$.styles2String(t);t.labelStyle=l;const r=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(r,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);const{shapeSvg:a,bbox:e,halfPadding:s,label:o}=await W(u,t,"icon-shape default"),c=t.pos==="t",y=i+s*2,d=i+s*2,{nodeBorder:m,mainBkg:p}=g,{stylesMap:w}=$.compileStyles(t),b=-d/2,S=-y/2,x=t.label?8:0,N=H.at.svg(a),k=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid"),k.stroke=w.get("fill")??p;const _=N.path(ft(b,S,d,y,.1),k),D=Math.max(d,e.width),R=y+e.height+x,L=N.rectangle(-D/2,-R/2,D,R,{...k,fill:"transparent",stroke:"none"}),T=a.insert(()=>_,":first-child"),M=a.insert(()=>L);if(t.icon){const B=a.append("g");B.html(`<g>${await kt.getIconSVG(t.icon,{height:i,width:i,fallbackPrefix:""})}</g>`);const P=B.node().getBBox(),O=P.width,C=P.height,G=P.x,V=P.y;B.attr("transform",`translate(${-O/2-G},${c?e.height/2+x/2-C/2-V:-e.height/2-x/2-C/2-V})`),B.attr("style",`color: ${w.get("stroke")??m};`)}return o.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${c?-R/2:R/2-e.height})`),T.attr("transform",`translate(0,${c?e.height/2+x/2:-e.height/2-x/2})`),I(t,M),t.intersect=function(B){if(X.log.info("iconSquare intersect",t,B),!t.label)return A.rect(t,B);const P=t.x??0,O=t.y??0,C=t.height??0;let G=[];return c?G=[{x:P-e.width/2,y:O-C/2},{x:P+e.width/2,y:O-C/2},{x:P+e.width/2,y:O-C/2+e.height+x},{x:P+d/2,y:O-C/2+e.height+x},{x:P+d/2,y:O+C/2},{x:P-d/2,y:O+C/2},{x:P-d/2,y:O-C/2+e.height+x},{x:P-e.width/2,y:O-C/2+e.height+x}]:G=[{x:P-d/2,y:O-C/2},{x:P+d/2,y:O-C/2},{x:P+d/2,y:O-C/2+y},{x:P+e.width/2,y:O-C/2+y},{x:P+e.width/2/2,y:O+C/2},{x:P-e.width/2,y:O+C/2},{x:P-e.width/2,y:O-C/2+y},{x:P-d/2,y:O-C/2+y}],A.polygon(t,G,B)},a}v.__name(_e,"iconSquare");async function Pe(u,t,{config:{flowchart:g}}){const h=new Image;h.src=t?.img??"",await h.decode();const l=Number(h.naturalWidth.toString().replace("px","")),r=Number(h.naturalHeight.toString().replace("px",""));t.imageAspectRatio=l/r;const{labelStyles:f}=$.styles2String(t);t.labelStyle=f;const i=g?.wrappingWidth;t.defaultWidth=g?.wrappingWidth;const n=Math.max(t.label?i??0:0,t?.assetWidth??l),a=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:n,e=t.constraint==="on"?a/t.imageAspectRatio:t?.assetHeight??r;t.width=Math.max(a,i??0);const{shapeSvg:s,bbox:o,label:c}=await W(u,t,"image-shape default"),y=t.pos==="t",d=-a/2,m=-e/2,p=t.label?8:0,w=H.at.svg(s),b=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=w.rectangle(d,m,a,e,b),x=Math.max(a,o.width),N=e+o.height+p,k=w.rectangle(-x/2,-N/2,x,N,{...b,fill:"none",stroke:"none"}),_=s.insert(()=>S,":first-child"),D=s.insert(()=>k);if(t.img){const R=s.append("image");R.attr("href",t.img),R.attr("width",a),R.attr("height",e),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-a/2},${y?N/2-e:-N/2})`)}return c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${y?-e/2-o.height/2-p/2:e/2-o.height/2+p/2})`),_.attr("transform",`translate(0,${y?o.height/2+p/2:-o.height/2-p/2})`),I(t,D),t.intersect=function(R){if(X.log.info("iconSquare intersect",t,R),!t.label)return A.rect(t,R);const L=t.x??0,T=t.y??0,M=t.height??0;let B=[];return y?B=[{x:L-o.width/2,y:T-M/2},{x:L+o.width/2,y:T-M/2},{x:L+o.width/2,y:T-M/2+o.height+p},{x:L+a/2,y:T-M/2+o.height+p},{x:L+a/2,y:T+M/2},{x:L-a/2,y:T+M/2},{x:L-a/2,y:T-M/2+o.height+p},{x:L-o.width/2,y:T-M/2+o.height+p}]:B=[{x:L-a/2,y:T-M/2},{x:L+a/2,y:T-M/2},{x:L+a/2,y:T-M/2+e},{x:L+o.width/2,y:T-M/2+e},{x:L+o.width/2/2,y:T+M/2},{x:L-o.width/2,y:T+M/2},{x:L-o.width/2,y:T-M/2+e},{x:L-a/2,y:T-M/2+e}],A.polygon(t,B,R)},s}v.__name(Pe,"imageSquare");async function Ne(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=l,f=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await W(u,t,E(t)),a=Math.max(n.width+(f??0)*2,t?.width??0),e=Math.max(n.height+(r??0)*2,t?.height??0),s=[{x:0,y:0},{x:a,y:0},{x:a+3*e/6,y:-e},{x:-3*e/6,y:-e}];let o;const{cssStyles:c}=t;if(t.look==="handDrawn"){const y=H.at.svg(i),d=$.userNodeOverrides(t,{}),m=q(s),p=y.path(m,d);o=i.insert(()=>p,":first-child").attr("transform",`translate(${-a/2}, ${e/2})`),c&&o.attr("style",c)}else o=ot(i,a,e,s);return h&&o.attr("style",h),t.width=a,t.height=e,I(t,o),t.intersect=function(y){return A.polygon(t,s,y)},i}v.__name(Ne,"inv_trapezoid");async function De(u,t){const{shapeSvg:g,bbox:h,label:l}=await W(u,t,"label"),r=g.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),g.attr("class","label edgeLabel"),l.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),I(t,r),t.intersect=function(f){return A.rect(t,f)},g}v.__name(De,"labelRect");async function Be(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=l,f=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await W(u,t,E(t)),a=(t?.height??n.height)+r,e=(t?.width??n.width)+f,s=[{x:0,y:0},{x:e+3*a/6,y:0},{x:e,y:-a},{x:-(3*a)/6,y:-a}];let o;const{cssStyles:c}=t;if(t.look==="handDrawn"){const y=H.at.svg(i),d=$.userNodeOverrides(t,{}),m=q(s),p=y.path(m,d);o=i.insert(()=>p,":first-child").attr("transform",`translate(${-e/2}, ${a/2})`),c&&o.attr("style",c)}else o=ot(i,e,a,s);return h&&o.attr("style",h),t.width=e,t.height=a,I(t,o),t.intersect=function(y){return A.polygon(t,s,y)},i}v.__name(Be,"lean_left");async function Me(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=l,f=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await W(u,t,E(t)),a=(t?.height??n.height)+r,e=(t?.width??n.width)+f,s=[{x:-3*a/6,y:0},{x:e,y:0},{x:e+3*a/6,y:-a},{x:0,y:-a}];let o;const{cssStyles:c}=t;if(t.look==="handDrawn"){const y=H.at.svg(i),d=$.userNodeOverrides(t,{}),m=q(s),p=y.path(m,d);o=i.insert(()=>p,":first-child").attr("transform",`translate(${-e/2}, ${a/2})`),c&&o.attr("style",c)}else o=ot(i,e,a,s);return h&&o.attr("style",h),t.width=e,t.height=a,I(t,o),t.intersect=function(y){return A.polygon(t,s,y)},i}v.__name(Me,"lean_right");function Ce(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.label="",t.labelStyle=g;const l=u.insert("g").attr("class",E(t)).attr("id",t.domId??t.id),{cssStyles:r}=t,f=Math.max(35,t?.width??0),i=Math.max(35,t?.height??0),n=7,a=[{x:f,y:0},{x:0,y:i+n/2},{x:f-2*n,y:i+n/2},{x:0,y:2*i},{x:f,y:i-n/2},{x:2*n,y:i-n/2}],e=H.at.svg(l),s=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(s.roughness=0,s.fillStyle="solid");const o=q(a),c=e.path(o,s),y=l.insert(()=>c,":first-child");return y.attr("class","outer-path"),r&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",r),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),y.attr("transform",`translate(-${f/2},${-i})`),I(t,y),t.intersect=function(d){return X.log.info("lightningBolt intersect",t,d),A.polygon(t,a,d)},l}v.__name(Ce,"lightningBolt");var Ns=v.__name((u,t,g,h,l,r,f)=>[`M${u},${t+r}`,`a${l},${r} 0,0,0 ${g},0`,`a${l},${r} 0,0,0 ${-g},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${g},0`,`l0,${-h}`,`M${u},${t+r+f}`,`a${l},${r} 0,0,0 ${g},0`].join(" "),"createCylinderPathD"),Ds=v.__name((u,t,g,h,l,r,f)=>[`M${u},${t+r}`,`M${u+g},${t+r}`,`a${l},${r} 0,0,0 ${-g},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${g},0`,`l0,${-h}`,`M${u},${t+r+f}`,`a${l},${r} 0,0,0 ${g},0`].join(" "),"createOuterCylinderPathD"),Bs=v.__name((u,t,g,h,l,r)=>[`M${u-g/2},${-h/2}`,`a${l},${r} 0,0,0 ${g},0`].join(" "),"createInnerCylinderPathD"),Yt=10,Xt=10;async function Ae(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?16:l,f=t.look==="neo"?24:l;if(t.width||t.height){const p=t.width??0;t.width=(t.width??0)-r,t.width<Xt&&(t.width=Xt);const w=p/2/(2.5+p/50);t.height=(t.height??0)-f-w*3,t.height<Yt&&(t.height=Yt)}const{shapeSvg:i,bbox:n,label:a}=await W(u,t,E(t)),e=(t?.width?t?.width:n.width)+r*2,s=e/2,o=s/(2.5+e/50),c=(t?.height?t?.height:n.height)+o+f*2,y=c*.1;let d;const{cssStyles:m}=t;if(t.look==="handDrawn"){const p=H.at.svg(i),w=Ds(0,0,e,c,s,o,y),b=Bs(0,o,e,c,s,o),S=$.userNodeOverrides(t,{}),x=p.path(w,S),N=p.path(b,S);i.insert(()=>N,":first-child").attr("class","line"),d=i.insert(()=>x,":first-child"),d.attr("class","basic label-container"),m&&d.attr("style",m)}else{const p=Ns(0,0,e,c,s,o,y);d=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container outer-path").attr("style",U.handleUndefinedAttr(m)).attr("style",h)}return d.attr("label-offset-y",o),d.attr("transform",`translate(${-e/2}, ${-(c/2+o)})`),I(t,d),a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+o-(n.y-(n.top??0))})`),t.intersect=function(p){const w=A.rect(t,p),b=w.x-(t.x??0);if(s!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(w.y-(t.y??0))>(t.height??0)/2-o)){let S=o*o*(1-b*b/(s*s));S>0&&(S=Math.sqrt(S)),S=o-S,p.y-(t.y??0)>0&&(S=-S),w.y+=S}return w},i}v.__name(Ae,"linedCylinder");async function Re(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?16:l,f=t.look==="neo"?12:l;(t.width||t.height)&&(t.width=(t.width??0)*10/11-r*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-f*2,t.height<10&&(t.height=10));const{shapeSvg:i,bbox:n,label:a}=await W(u,t,E(t)),e=(t?.width?t?.width:n.width)+(r??0)*2,s=(t?.height?t?.height:n.height)+(f??0)*2,o=t.look==="neo"?s/4:s/8,c=s+o,{cssStyles:y}=t,d=H.at.svg(i),m=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const p=[{x:-e/2-e/2*.1,y:-c/2},{x:-e/2-e/2*.1,y:c/2},...gt(-e/2-e/2*.1,c/2,e/2+e/2*.1,c/2,o,.8),{x:e/2+e/2*.1,y:-c/2},{x:-e/2-e/2*.1,y:-c/2},{x:-e/2,y:-c/2},{x:-e/2,y:c/2*1.1},{x:-e/2,y:-c/2}],w=d.polygon(p.map(S=>[S.x,S.y]),m),b=i.insert(()=>w,":first-child");return b.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",y),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),b.attr("transform",`translate(0,${-o/2})`),a.attr("transform",`translate(${-e/2+(t.padding??0)+e/2*.1/2-(n.x-(n.left??0))},${-s/2+(t.padding??0)-o/2-(n.y-(n.top??0))})`),I(t,b),t.intersect=function(S){return A.polygon(t,p,S)},i}v.__name(Re,"linedWaveEdgedRect");async function He(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?16:l,f=t.look==="neo"?12:l,i=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-r*2-2*i,10),t.height=Math.max((t?.height??0)-f*2-2*i,10));const{shapeSvg:n,bbox:a,label:e}=await W(u,t,E(t)),s=(t?.width?t?.width:a.width)+r*2+2*i,o=(t?.height?t?.height:a.height)+f*2+2*i,c=s-2*i,y=o-2*i,d=-c/2,m=-y/2,{cssStyles:p}=t,w=H.at.svg(n),b=$.userNodeOverrides(t,{}),S=[{x:d-i,y:m+i},{x:d-i,y:m+y+i},{x:d+c-i,y:m+y+i},{x:d+c-i,y:m+y},{x:d+c,y:m+y},{x:d+c,y:m+y-i},{x:d+c+i,y:m+y-i},{x:d+c+i,y:m-i},{x:d+i,y:m-i},{x:d+i,y:m},{x:d,y:m},{x:d,y:m+i}],x=[{x:d,y:m+i},{x:d+c-i,y:m+i},{x:d+c-i,y:m+y},{x:d+c,y:m+y},{x:d+c,y:m},{x:d,y:m}];t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const N=q(S);let k=w.path(N,b);const _=q(x);let D=w.path(_,b);t.look!=="handDrawn"&&(k=Bt(k),D=Bt(D));const R=n.insert("g",":first-child");return R.insert(()=>k),R.insert(()=>D),R.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",p),h&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",h),e.attr("transform",`translate(${-(a.width/2)-i-(a.x-(a.left??0))}, ${-(a.height/2)+i-(a.y-(a.top??0))})`),I(t,R),t.intersect=function(L){return A.polygon(t,S,L)},n}v.__name(He,"multiRect");async function Le(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const{shapeSvg:l,bbox:r,label:f}=await W(u,t,E(t)),i=t.padding??0,n=t.look==="neo"?16:i,a=t.look==="neo"?12:i;let e=!0;(t.width||t.height)&&(e=!1,t.width=(t?.width??0)-n*2,t.height=(t?.height??0)-a*3);const s=Math.max(r.width,t?.width??0)+n*2,o=Math.max(r.height,t?.height??0)+a*3,c=t.look==="neo"?o/4:o/8,y=o+(e?c/2:-c/2),d=-s/2,m=-y/2,p=10,{cssStyles:w}=t,b=gt(d-p,m+y+p,d+s-p,m+y+p,c,.8),S=b?.[b.length-1],x=[{x:d-p,y:m+p},{x:d-p,y:m+y+p},...b,{x:d+s-p,y:S.y-p},{x:d+s,y:S.y-p},{x:d+s,y:S.y-2*p},{x:d+s+p,y:S.y-2*p},{x:d+s+p,y:m-p},{x:d+p,y:m-p},{x:d+p,y:m},{x:d,y:m},{x:d,y:m+p}],N=[{x:d,y:m+p},{x:d+s-p,y:m+p},{x:d+s-p,y:S.y-p},{x:d+s,y:S.y-p},{x:d+s,y:m},{x:d,y:m}],k=H.at.svg(l),_=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const D=q(x),R=k.path(D,_),L=q(N),T=k.path(L,_),M=l.insert(()=>R,":first-child");return M.insert(()=>T),M.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",w),h&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",h),M.attr("transform",`translate(0,${-c/2})`),f.attr("transform",`translate(${-(r.width/2)-p-(r.x-(r.left??0))}, ${-(r.height/2)+p-c/2-(r.y-(r.top??0))})`),I(t,M),t.intersect=function(B){return A.polygon(t,x,B)},l}v.__name(Le,"multiWaveEdgedRectangle");async function Oe(u,t,{config:{themeVariables:g}}){const{labelStyles:h,nodeStyles:l}=$.styles2String(t);t.labelStyle=h,t.useHtmlLabels||Y.getEffectiveHtmlLabels(Y.getConfig())||(t.centerLabel=!0);const{shapeSvg:r,bbox:f,label:i}=await W(u,t,E(t)),n=Math.max(f.width+(t.padding??0)*2,t?.width??0),a=Math.max(f.height+(t.padding??0)*2,t?.height??0),e=-n/2,s=-a/2,{cssStyles:o}=t,c=H.at.svg(r),y=$.userNodeOverrides(t,{fill:g.noteBkgColor,stroke:g.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const d=c.rectangle(e,s,n,a,y),m=r.insert(()=>d,":first-child");return m.attr("class","basic label-container outer-path"),i.attr("class","label noteLabel"),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),l&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",l),i.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))}, ${-(f.height/2)-(f.y-(f.top??0))})`),I(t,m),t.intersect=function(p){return A.rect(t,p)},r}v.__name(Oe,"note");var Ms=v.__name((u,t,g)=>[`M${u+g/2},${t}`,`L${u+g},${t-g/2}`,`L${u+g/2},${t-g}`,`L${u},${t-g/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Ie(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const{shapeSvg:l,bbox:r}=await W(u,t,E(t)),f=r.width+(t.padding??0)+(r.height+(t.padding??0)),i=.5,n=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}];let a;const{cssStyles:e}=t;if(t.look==="handDrawn"){const s=H.at.svg(l),o=$.userNodeOverrides(t,{}),c=Ms(0,0,f),y=s.path(c,o);a=l.insert(()=>y,":first-child").attr("transform",`translate(${-f/2+i}, ${f/2})`),e&&a.attr("style",e)}else a=ot(l,f,f,n),a.attr("transform",`translate(${-f/2+i}, ${f/2})`);return h&&a.attr("style",h),I(t,a),t.calcIntersect=function(s,o){const c=s.width,y=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}],d=A.polygon(s,y,o);return{x:d.x-.5,y:d.y-.5}},t.intersect=function(s){return this.calcIntersect(t,s)},l}v.__name(Ie,"question");async function Te(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?21:l??0,f=t.look==="neo"?12:l??0,{shapeSvg:i,bbox:n,label:a}=await W(u,t,E(t)),e=(t?.width??n.width)+(t.look==="neo"?r*2:r),s=(t?.height??n.height)+(t.look==="neo"?f*2:f),o=-e/2,c=-s/2,y=c/2,d=[{x:o+y,y:c},{x:o,y:0},{x:o+y,y:-c},{x:-o,y:-c},{x:-o,y:c}],{cssStyles:m}=t,p=H.at.svg(i),w=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const b=q(d),S=p.path(b,w),x=i.insert(()=>S,":first-child");return x.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",m),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),x.attr("transform",`translate(${-y/2},0)`),a.attr("transform",`translate(${-y/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),I(t,x),t.intersect=function(N){return A.polygon(t,d,N)},i}v.__name(Te,"rect_left_inv_arrow");async function Ee(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;let l;t.cssClasses?l="node "+t.cssClasses:l="node default";const r=u.insert("g").attr("class",l).attr("id",t.domId||t.id),f=r.insert("g"),i=r.insert("g").attr("class","label").attr("style",h),n=t.description,a=t.label,e=await $t(i,a,t.labelStyle,!0,!0);let s={width:0,height:0};if(Y.getEffectiveHtmlLabels(Y.getConfig2())){const _=e.children[0],D=X.select_default(e);s=_.getBoundingClientRect(),D.attr("width",s.width),D.attr("height",s.height)}X.log.info("Text 2",n);const o=n||[],c=e.getBBox(),y=await $t(i,Array.isArray(o)?o.join("<br/>"):o,t.labelStyle,!0,!0),d=y.children[0],m=X.select_default(y);s=d.getBoundingClientRect(),m.attr("width",s.width),m.attr("height",s.height);const p=(t.padding||0)/2;X.select_default(y).attr("transform","translate( "+(s.width>c.width?0:(c.width-s.width)/2)+", "+(c.height+p+5)+")"),X.select_default(e).attr("transform","translate( "+(s.width<c.width?0:-(c.width-s.width)/2)+", 0)"),s=i.node().getBBox(),i.attr("transform","translate("+-s.width/2+", "+(-s.height/2-p+3)+")");const w=s.width+(t.padding||0),b=s.height+(t.padding||0),S=-s.width/2-p,x=-s.height/2-p;let N,k;if(t.look==="handDrawn"){const _=H.at.svg(r),D=$.userNodeOverrides(t,{}),R=_.path(ft(S,x,w,b,t.rx||0),D),L=_.line(-s.width/2-p,-s.height/2-p+c.height+p,s.width/2+p,-s.height/2-p+c.height+p,D);k=r.insert(()=>(X.log.debug("Rough node insert CXC",R),L),":first-child"),N=r.insert(()=>(X.log.debug("Rough node insert CXC",R),R),":first-child")}else N=f.insert("rect",":first-child"),k=f.insert("line"),N.attr("class","outer title-state").attr("style",h).attr("x",-s.width/2-p).attr("y",-s.height/2-p).attr("width",s.width+(t.padding||0)).attr("height",s.height+(t.padding||0)),k.attr("class","divider").attr("x1",-s.width/2-p).attr("x2",s.width/2+p).attr("y1",-s.height/2-p+c.height+p).attr("y2",-s.height/2-p+c.height+p);return I(t,N),t.intersect=function(_){return A.rect(t,_)},r}v.__name(Ee,"rectWithTitle");async function We(u,t,{config:{themeVariables:g}}){const h=g?.radius??5;return wt(u,t,{rx:h,ry:h,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}v.__name(We,"roundedRect");var yt=8;async function Ye(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?12:t.padding??0,{shapeSvg:f,bbox:i,label:n}=await W(u,t,E(t)),a=(t?.width??i.width)+l*2+(t.look==="neo"?yt:yt*2),e=(t?.height??i.height)+r*2,s=a-yt,o=e,c=yt-a/2,y=-e/2,{cssStyles:d}=t,m=H.at.svg(f),p=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const w=[{x:c,y},{x:c+s,y},{x:c+s,y:y+o},{x:c-yt,y:y+o},{x:c-yt,y},{x:c,y},{x:c,y:y+o}],b=m.polygon(w.map(x=>[x.x,x.y]),p),S=f.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path").attr("style",U.handleUndefinedAttr(d)),h&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),d&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),n.attr("transform",`translate(${yt/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),I(t,S),t.intersect=function(x){return A.rect(t,x)},f}v.__name(Ye,"shadedProcess");async function Xe(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?16:l,f=t.look==="neo"?12:l;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-r*2,10),t.height=Math.max((t?.height??0)/1.5-f*2,10));const{shapeSvg:i,bbox:n,label:a}=await W(u,t,E(t)),e=(t?.width?t?.width:n.width)+r*2,s=((t?.height?t?.height:n.height)+f*2)*1.5,o=e,c=s/1.5,y=-o/2,d=-c/2,{cssStyles:m}=t,p=H.at.svg(i),w=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const b=[{x:y,y:d},{x:y,y:d+c},{x:y+o,y:d+c},{x:y+o,y:d-c/2}],S=q(b),x=p.path(S,w),N=i.insert(()=>x,":first-child");return N.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&N.selectChildren("path").attr("style",m),h&&t.look!=="handDrawn"&&N.selectChildren("path").attr("style",h),N.attr("transform",`translate(0, ${c/4})`),a.attr("transform",`translate(${-o/2+(t.padding??0)-(n.x-(n.left??0))}, ${-c/4+(t.padding??0)-(n.y-(n.top??0))})`),I(t,N),t.intersect=function(k){return A.polygon(t,b,k)},i}v.__name(Xe,"slopedRect");async function je(u,t){const g=t.padding??0,h=t.look==="neo"?16:g*2,l=t.look==="neo"?12:g;return wt(u,t,{rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??h,labelPaddingY:l})}v.__name(je,"squareRect");async function qe(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?20:l,f=t.look==="neo"?12:l,{shapeSvg:i,bbox:n}=await W(u,t,E(t)),a=n.height+(t.look==="neo"?f*2:f),e=n.width+a/4+(t.look==="neo"?r*2:r),s=a/2,{cssStyles:o}=t,c=H.at.svg(i),y=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const d=[{x:-e/2+s,y:-a/2},{x:e/2-s,y:-a/2},...St(-e/2+s,0,s,50,90,270),{x:e/2-s,y:a/2},...St(e/2-s,0,s,50,270,450)],m=q(d),p=c.path(m,y),w=i.insert(()=>p,":first-child");return w.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",o),h&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",h),I(t,w),t.intersect=function(b){return A.polygon(t,d,b)},i}v.__name(qe,"stadium");async function Ge(u,t){return wt(u,t,{rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"})}v.__name(Ge,"state");function Fe(u,t,{config:{themeVariables:g}}){const{labelStyles:h,nodeStyles:l}=$.styles2String(t);t.labelStyle=h;const{cssStyles:r}=t,{lineColor:f,stateBorder:i,nodeBorder:n,nodeShadow:a}=g;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const e=u.insert("g").attr("class","node default").attr("id",t.domId??t.id),s=H.at.svg(e),o=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(o.roughness=0,o.fillStyle="solid");const c=s.circle(0,0,t.width,{...o,stroke:f,strokeWidth:2}),y=i??n,d=(t.width??0)*5/14,m=s.circle(0,0,d,{...o,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),p=e.insert(()=>c,":first-child");if(p.insert(()=>m),t.look!=="handDrawn"&&p.attr("class","outer-path"),r&&p.selectAll("path").attr("style",r),l&&p.selectAll("path").attr("style",l),t.width<25&&a&&t.look!=="handDrawn"){const w=u.node()?.ownerSVGElement?.id??"",b=w?`${w}-drop-shadow-small`:"drop-shadow-small";p.attr("style",`filter:url(#${b})`)}return I(t,p),t.intersect=function(w){return A.circle(t,(t.width??0)/2,w)},e}v.__name(Fe,"stateEnd");function Ve(u,t,{config:{themeVariables:g}}){const{lineColor:h,nodeShadow:l}=g;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const r=u.insert("g").attr("class","node default").attr("id",t.domId||t.id);let f;if(t.look==="handDrawn"){const i=H.at.svg(r).circle(0,0,t.width,$.solidStateFill(h));f=r.insert(()=>i),f.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else f=r.insert("circle",":first-child"),f.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&l&&t.look!=="handDrawn"){const i=u.node()?.ownerSVGElement?.id??"",n=i?`${i}-drop-shadow-small`:"drop-shadow-small";f.attr("style",`filter:url(#${n})`)}return I(t,f),t.intersect=function(i){return A.circle(t,(t.width??7)/2,i)},r}v.__name(Ve,"stateStart");var ut=8;async function ze(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t?.padding??8,r=t.look==="neo"?28:l,f=t.look==="neo"?12:l,{shapeSvg:i,bbox:n}=await W(u,t,E(t)),a=(t?.width??n.width)+2*ut+r,e=(t?.height??n.height)+f,s=a-2*ut,o=e,c=-a/2,y=-e/2,d=[{x:0,y:0},{x:s,y:0},{x:s,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-o},{x:-8,y:-o},{x:-8,y:0}];if(t.look==="handDrawn"){const m=H.at.svg(i),p=$.userNodeOverrides(t,{}),w=m.rectangle(c,y,s+16,o,p),b=m.line(c+ut,y,c+ut,y+o,p),S=m.line(c+ut+s,y,c+ut+s,y+o,p);i.insert(()=>b,":first-child"),i.insert(()=>S,":first-child");const x=i.insert(()=>w,":first-child"),{cssStyles:N}=t;x.attr("class","basic label-container").attr("style",U.handleUndefinedAttr(N)),I(t,x)}else{const m=ot(i,s,o,d);h&&m.attr("style",h),I(t,m)}return t.intersect=function(m){return A.polygon(t,d,m)},i}v.__name(ze,"subroutine");var Dt=.2;async function Ue(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?16:l,f=t.look==="neo"?12:l;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-f*2,10),t.width=Math.max((t?.width??0)-r*2-Dt*(t.height+f*2),10));const{shapeSvg:i,bbox:n}=await W(u,t,E(t)),a=(t?.height?t?.height:n.height)+f*2,e=Dt*a,s=Dt*a,o=(t?.width?t?.width:n.width)+r*2+e-e,c=a,y=-o/2,d=-c/2,{cssStyles:m}=t,p=H.at.svg(i),w=$.userNodeOverrides(t,{}),b=[{x:y-e/2,y:d},{x:y+o+e/2,y:d},{x:y+o+e/2,y:d+c},{x:y-e/2,y:d+c}],S=[{x:y+o-e/2,y:d+c},{x:y+o+e/2,y:d+c},{x:y+o+e/2,y:d+c-s}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const x=q(b),N=p.path(x,w),k=q(S),_=p.path(k,{...w,fillStyle:"solid"}),D=i.insert(()=>_,":first-child");return D.insert(()=>N,":first-child"),D.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",m),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),I(t,D),t.intersect=function(R){return A.polygon(t,b,R)},i}v.__name(Ue,"taggedRect");async function Ze(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const{shapeSvg:l,bbox:r,label:f}=await W(u,t,E(t)),i=Math.max(r.width+(t.padding??0)*2,t?.width??0),n=Math.max(r.height+(t.padding??0)*2,t?.height??0),a=n/8,e=.2*i,s=.2*n,o=n+a,{cssStyles:c}=t,y=H.at.svg(l),d=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=[{x:-i/2-i/2*.1,y:o/2},...gt(-i/2-i/2*.1,o/2,i/2+i/2*.1,o/2,a,.8),{x:i/2+i/2*.1,y:-o/2},{x:-i/2-i/2*.1,y:-o/2}],p=-i/2+i/2*.1,w=-o/2-s*.4,b=[{x:p+i-e,y:(w+n)*1.3},{x:p+i,y:w+n-s},{x:p+i,y:(w+n)*.9},...gt(p+i,(w+n)*1.25,p+i-e,(w+n)*1.3,-n*.02,.5)],S=q(m),x=y.path(S,d),N=q(b),k=y.path(N,{...d,fillStyle:"solid"}),_=l.insert(()=>k,":first-child");return _.insert(()=>x,":first-child"),_.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",c),h&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",h),_.attr("transform",`translate(0,${-a/2})`),f.attr("transform",`translate(${-i/2+(t.padding??0)-(r.x-(r.left??0))},${-n/2+(t.padding??0)-a/2-(r.y-(r.top??0))})`),I(t,_),t.intersect=function(D){return A.polygon(t,m,D)},l}v.__name(Ze,"taggedWaveEdgedRectangle");async function Je(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const{shapeSvg:l,bbox:r}=await W(u,t,E(t)),f=Math.max(r.width+(t.padding??0),t?.width||0),i=Math.max(r.height+(t.padding??0),t?.height||0),n=-f/2,a=-i/2,e=l.insert("rect",":first-child");return e.attr("class","text").attr("style",h).attr("rx",0).attr("ry",0).attr("x",n).attr("y",a).attr("width",f).attr("height",i),I(t,e),t.intersect=function(s){return A.rect(t,s)},l}v.__name(Je,"text");var Cs=v.__name((u,t,g,h,l,r)=>`M${u},${t}
3
+ a${l},${r} 0,0,1 0,${-h}
4
+ l${g},0
5
+ a${l},${r} 0,0,1 0,${h}
6
+ M${g},${-h}
7
+ a${l},${r} 0,0,0 0,${h}
8
+ l${-g},0`,"createCylinderPathD"),As=v.__name((u,t,g,h,l,r)=>[`M${u},${t}`,`M${u+g},${t}`,`a${l},${r} 0,0,0 0,${-h}`,`l${-g},0`,`a${l},${r} 0,0,0 0,${h}`,`l${g},0`].join(" "),"createOuterCylinderPathD"),Rs=v.__name((u,t,g,h,l,r)=>[`M${u+g/2},${-h/2}`,`a${l},${r} 0,0,0 0,${h}`].join(" "),"createInnerCylinderPathD"),jt=5,qt=10;async function Qe(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?12:l/2;if(t.width||t.height){const d=t.height??0;t.height=(t.height??0)-r,t.height<jt&&(t.height=jt);const m=d/2/(2.5+d/50);t.width=(t.width??0)-r-m*3,t.width<qt&&(t.width=qt)}const{shapeSvg:f,bbox:i,label:n}=await W(u,t,E(t)),a=(t.height?t.height:i.height)+r,e=a/2,s=e/(2.5+a/50),o=(t.width?t.width:i.width)+s+r,{cssStyles:c}=t;let y;if(t.look==="handDrawn"){const d=H.at.svg(f),m=As(0,0,o,a,s,e),p=Rs(0,0,o,a,s,e),w=d.path(m,$.userNodeOverrides(t,{})),b=d.path(p,$.userNodeOverrides(t,{fill:"none"}));y=f.insert(()=>b,":first-child"),y=f.insert(()=>w,":first-child"),y.attr("class","basic label-container"),c&&y.attr("style",c)}else{const d=Cs(0,0,o,a,s,e);y=f.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",U.handleUndefinedAttr(c)).attr("style",h),y.attr("class","basic label-container outer-path"),c&&y.selectAll("path").attr("style",c),h&&y.selectAll("path").attr("style",h)}return y.attr("label-offset-x",s),y.attr("transform",`translate(${-o/2}, ${a/2} )`),n.attr("transform",`translate(${-(i.width/2)-s-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),I(t,y),t.intersect=function(d){const m=A.rect(t,d),p=m.y-(t.y??0);if(e!=0&&(Math.abs(p)<(t.height??0)/2||Math.abs(p)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-s)){let w=s*s*(1-p*p/(e*e));w!=0&&(w=Math.sqrt(Math.abs(w))),w=s-w,d.x-(t.x??0)>0&&(w=-w),m.x+=w}return m},f}v.__name(Qe,"tiltedCylinder");async function Ke(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=(t.look==="neo",l),f=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await W(u,t,E(t)),a=(t?.height??n.height)+r,e=(t?.width??n.width)+f,s=[{x:-3*a/6,y:0},{x:e+3*a/6,y:0},{x:e,y:-a},{x:0,y:-a}];let o;const{cssStyles:c}=t;if(t.look==="handDrawn"){const y=H.at.svg(i),d=$.userNodeOverrides(t,{}),m=q(s),p=y.path(m,d);o=i.insert(()=>p,":first-child").attr("transform",`translate(${-e/2}, ${a/2})`),c&&o.attr("style",c)}else o=ot(i,e,a,s);return h&&o.attr("style",h),t.width=e,t.height=a,I(t,o),t.intersect=function(y){return A.polygon(t,s,y)},i}v.__name(Ke,"trapezoid");async function ts(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?16:l,f=t.look==="neo"?12:l,i=15,n=5;(t.width||t.height)&&(t.height=(t.height??0)-f*2,t.height<n&&(t.height=n),t.width=(t.width??0)-r*2,t.width<i&&(t.width=i));const{shapeSvg:a,bbox:e}=await W(u,t,E(t)),s=(t?.width?t?.width:e.width)+r*2,o=(t?.height?t?.height:e.height)+f*2,{cssStyles:c}=t,y=H.at.svg(a),d=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=[{x:-s/2*.8,y:-o/2},{x:s/2*.8,y:-o/2},{x:s/2,y:-o/2*.6},{x:s/2,y:o/2},{x:-s/2,y:o/2},{x:-s/2,y:-o/2*.6}],p=q(m),w=y.path(p,d),b=a.insert(()=>w,":first-child");return b.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",c),h&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",h),I(t,b),t.intersect=function(S){return A.polygon(t,m,S)},a}v.__name(ts,"trapezoidalPentagon");var Gt=10,Ft=10;async function es(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?l*2:l;(t.width||t.height)&&(t.width=((t?.width??0)-r)/2,t.width<Ft&&(t.width=Ft),t.height=t?.height??0,t.height<Gt&&(t.height=Gt));const{shapeSvg:f,bbox:i,label:n}=await W(u,t,E(t)),a=Y.evaluate(Y.getConfig2().flowchart?.htmlLabels),e=(t?.width?t?.width:i.width)+r,s=t?.height?t?.height:e+i.height,o=s,c=[{x:0,y:0},{x:o,y:0},{x:o/2,y:-s}],{cssStyles:y}=t,d=H.at.svg(f),m=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const p=q(c),w=d.path(p,m),b=f.insert(()=>w,":first-child").attr("transform",`translate(${-s/2}, ${s/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",y),h&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",h),t.width=e,t.height=s,I(t,b),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${s/2-(i.height+(t.padding??0)/(a?2:1)-(i.y-(i.top??0)))})`),t.intersect=function(S){return X.log.info("Triangle intersect",t,c,S),A.polygon(t,c,S)},f}v.__name(es,"triangle");async function ss(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?16:l,f=t.look==="neo"?12:l;let i=!0;(t.width||t.height)&&(i=!1,t.width=(t?.width??0)-r*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-f*2,t.height<10&&(t.height=10));const{shapeSvg:n,bbox:a,label:e}=await W(u,t,E(t)),s=(t?.width?t?.width:a.width)+(r??0)*2,o=(t?.height?t?.height:a.height)+(f??0)*2,c=t.look==="neo"?o/4:o/8,y=o+(i?c:-c),{cssStyles:d}=t,m=14-s,p=m>0?m/2:0,w=H.at.svg(n),b=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=[{x:-s/2-p,y:y/2},...gt(-s/2-p,y/2,s/2+p,y/2,c,.8),{x:s/2+p,y:-y/2},{x:-s/2-p,y:-y/2}],x=q(S),N=w.path(x,b),k=n.insert(()=>N,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),k.attr("transform",`translate(0,${-c/2})`),e.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-o/2+(t.padding??0)-c-(a.y-(a.top??0))})`),I(t,k),t.intersect=function(_){return A.polygon(t,S,_)},n}v.__name(ss,"waveEdgedRectangle");async function as(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.padding??0,r=t.look==="neo"?16:l,f=t.look==="neo"?20:l;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-f-S*(20/9)),t.width=t.width-r*2}const{shapeSvg:i,bbox:n}=await W(u,t,E(t)),a=(t?.width?t?.width:n.width)+r*2,e=(t?.height?t?.height:n.height)+f,s=e/8,o=e+s*2,{cssStyles:c}=t,y=H.at.svg(i),d=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=[{x:-a/2,y:o/2},...gt(-a/2,o/2,a/2,o/2,s,1),{x:a/2,y:-o/2},...gt(a/2,-o/2,-a/2,-o/2,s,-1)],p=q(m),w=y.path(p,d),b=i.insert(()=>w,":first-child");return b.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",c),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),I(t,b),t.intersect=function(S){return A.polygon(t,m,S)},i}v.__name(as,"waveRectangle");var Z=10;async function is(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-l*2-Z,10),t.height=Math.max((t?.height??0)-r*2-Z,10));const{shapeSvg:f,bbox:i,label:n}=await W(u,t,E(t)),a=(t?.width?t?.width:i.width)+l*2+Z,e=(t?.height?t?.height:i.height)+r*2+Z,s=a-Z,o=e-Z,c=-s/2,y=-o/2,{cssStyles:d}=t,m=H.at.svg(f),p=$.userNodeOverrides(t,{}),w=[{x:c-Z,y:y-Z},{x:c-Z,y:y+o},{x:c+s,y:y+o},{x:c+s,y:y-Z}],b=`M${c-Z},${y-Z} L${c+s},${y-Z} L${c+s},${y+o} L${c-Z},${y+o} L${c-Z},${y-Z}
9
+ M${c-Z},${y} L${c+s},${y}
10
+ M${c},${y-Z} L${c},${y+o}`;t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const S=m.path(b,p),x=f.insert(()=>S,":first-child");return x.attr("transform",`translate(${Z/2}, ${Z/2})`),x.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),n.attr("transform",`translate(${-(i.width/2)+Z/2-(i.x-(i.left??0))}, ${-(i.height/2)+Z/2-(i.y-(i.top??0))})`),I(t,x),t.intersect=function(N){return A.polygon(t,w,N)},f}v.__name(is,"windowPane");var Vt=new Set(["redux-color","redux-dark-color"]),Hs=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ht(u,t){const g=t;g.alias&&(t.label=g.alias);const{theme:h,themeVariables:l}=Y.getConfig(),{rowEven:r,rowOdd:f,nodeBorder:i,borderColorArray:n}=l;if(t.look==="handDrawn"){const{themeVariables:j}=Y.getConfig(),{background:F}=j;await Ht(u,{...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${F}`]})}const a=Y.getConfig();t.useHtmlLabels=a.htmlLabels;let e=a.er?.diagramPadding??10,s=a.er?.entityPadding??6;const{cssStyles:o}=t,{labelStyles:c,nodeStyles:y}=$.styles2String(t);if(g.attributes.length===0&&t.label){const j={rx:0,ry:0,labelPaddingX:e,labelPaddingY:e*1.5,classes:""};U.calculateTextWidth(t.label,a)+j.labelPaddingX*2<a.er.minEntityWidth&&(t.width=a.er.minEntityWidth);const F=await wt(u,t,j);if(h!=null&&Vt.has(h)){const Q=g.colorIndex??0;F.attr("data-color-id",`color-${Q%n.length}`)}if(!Y.evaluate(a.htmlLabels)){const Q=F.select("text"),et=Q.node()?.getBBox();Q.attr("transform",`translate(${-et.width/2}, 0)`)}return F}a.htmlLabels||(e*=1.25,s*=1.25);let d=E(t);d||(d="node default");const m=u.insert("g").attr("class",d).attr("id",t.domId||t.id),p=await pt(m,t.label??"",a,0,0,["name"],c);p.height+=s;let w=0;const b=[],S=[];let x=0,N=0,k=0,_=0,D=!0,R=!0;for(const j of g.attributes){const F=await pt(m,j.type,a,0,w,["attribute-type"],c);x=Math.max(x,F.width+e);const Q=await pt(m,j.name,a,0,w,["attribute-name"],c);N=Math.max(N,Q.width+e);const et=await pt(m,j.keys.join(),a,0,w,["attribute-keys"],c);k=Math.max(k,et.width+e);const bt=await pt(m,j.comment,a,0,w,["attribute-comment"],c);_=Math.max(_,bt.width+e);const ht=Math.max(F.height,Q.height,et.height,bt.height)+s;S.push({yOffset:w,rowHeight:ht}),w+=ht}let L=4;k<=e&&(D=!1,k=0,L--),_<=e&&(R=!1,_=0,L--);const T=m.node().getBBox();if(p.width+e*2-(x+N+k+_)>0){const j=p.width+e*2-(x+N+k+_);x+=j/L,N+=j/L,k>0&&(k+=j/L),_>0&&(_+=j/L)}const M=x+N+k+_,B=H.at.svg(m),P=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let O=0;S.length>0&&(O=S.reduce((j,F)=>j+(F?.rowHeight??0),0));const C=Math.max(T.width+e*2,t?.width||0,M),G=Math.max((O??0)+p.height,t?.height||0),V=-C/2,z=-G/2;if(m.selectAll("g:not(:first-child)").each((j,F,Q)=>{const et=X.select_default(Q[F]),bt=et.attr("transform");let ht=0,Lt=0;if(bt){const Pt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(bt);Pt&&(ht=parseFloat(Pt[1]),Lt=parseFloat(Pt[2]),et.attr("class").includes("attribute-name")?ht+=x:et.attr("class").includes("attribute-keys")?ht+=x+N:et.attr("class").includes("attribute-comment")&&(ht+=x+N+k))}et.attr("transform",`translate(${V+e/2+ht}, ${Lt+z+p.height+s/2})`)}),m.select(".name").attr("transform","translate("+-p.width/2+", "+(z+s/2)+")"),h!=null&&Vt.has(h)){const j=g.colorIndex??0;m.attr("data-color-id",`color-${j%n.length}`)}const at=B.rectangle(V,z,C,G,P),tt=m.insert(()=>at,":first-child").attr("class","outer-path").attr("style",o.join(""));b.push(0);for(const[j,F]of S.entries()){const Q=(j+1)%2===0&&F.yOffset!==0,et=B.rectangle(V,p.height+z+F?.yOffset,C,F?.rowHeight,{...P,fill:Q?r:f,stroke:i});m.insert(()=>et,"g.label").attr("style",o.join("")).attr("class",`row-rect-${Q?"even":"odd"}`)}const it=1e-4;let K=mt(V,p.height+z,C+V,p.height+z,it),rt=B.polygon(K.map(j=>[j.x,j.y]),P);if(m.insert(()=>rt).attr("class","divider"),K=mt(x+V,p.height+z,x+V,G+z,it),rt=B.polygon(K.map(j=>[j.x,j.y]),P),m.insert(()=>rt).attr("class","divider"),D){const j=x+N+V;K=mt(j,p.height+z,j,G+z,it),rt=B.polygon(K.map(F=>[F.x,F.y]),P),m.insert(()=>rt).attr("class","divider")}if(R){const j=x+N+k+V;K=mt(j,p.height+z,j,G+z,it),rt=B.polygon(K.map(F=>[F.x,F.y]),P),m.insert(()=>rt).attr("class","divider")}for(const j of b){const F=p.height+z+j;K=mt(V,F,C+V,F,it),rt=B.polygon(K.map(Q=>[Q.x,Q.y]),P),m.insert(()=>rt).attr("class","divider")}if(I(t,tt),y&&t.look!=="handDrawn")if(h!=null&&Hs.has(h))m.selectAll("path").attr("style",y);else{const j=y.split(";")?.filter(F=>F.includes("stroke"))?.map(F=>`${F}`).join("; ");m.selectAll("path").attr("style",j??""),m.selectAll(".row-rect-even path").attr("style",y)}return t.intersect=function(j){return A.rect(t,j)},m}v.__name(Ht,"erBox");async function pt(u,t,g,h=0,l=0,r=[],f=""){const i=u.insert("g").attr("class",`label ${r.join(" ")}`).attr("transform",`translate(${h}, ${l})`).attr("style",f);t!==Y.parseGenericTypes(t)&&(t=Y.parseGenericTypes(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const n=i.node().appendChild(await ct.createText(i,t,{width:U.calculateTextWidth(t,g)+100,style:f,useHtmlLabels:g.htmlLabels},g));if(t.includes("&lt;")||t.includes("&gt;")){let e=n.children[0];for(e.textContent=e.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let a=n.getBBox();if(Y.evaluate(g.htmlLabels)){const e=n.children[0];e.style.textAlign="start";const s=X.select_default(n);a=e.getBoundingClientRect(),s.attr("width",a.width),s.attr("height",a.height)}return a}v.__name(pt,"addText");function mt(u,t,g,h,l){return u===g?[{x:u-l/2,y:t},{x:u+l/2,y:t},{x:g+l/2,y:h},{x:g-l/2,y:h}]:[{x:u,y:t-l/2},{x:u,y:t+l/2},{x:g,y:h+l/2},{x:g,y:h-l/2}]}v.__name(mt,"lineToPolygon");async function rs(u,t,g,h,l=g.class.padding??12){const r=h?0:3,f=u.insert("g").attr("class",E(t)).attr("id",t.domId||t.id);let i=null,n=null,a=null,e=null,s=0,o=0,c=0;if(i=f.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const w=t.annotations[0];await xt(i,{text:`«${w}»`},0),s=i.node().getBBox().height}n=f.insert("g").attr("class","label-group text"),await xt(n,t,0,["font-weight: bolder"]);const y=n.node().getBBox();o=y.height,a=f.insert("g").attr("class","members-group text");let d=0;for(const w of t.members){const b=await xt(a,w,d,[w.parseClassifier()]);d+=b+r}c=a.node().getBBox().height,c<=0&&(c=l/2),e=f.insert("g").attr("class","methods-group text");let m=0;for(const w of t.methods){const b=await xt(e,w,m,[w.parseClassifier()]);m+=b+r}let p=f.node().getBBox();if(i!==null){const w=i.node().getBBox();i.attr("transform",`translate(${-w.width/2})`)}return n.attr("transform",`translate(${-y.width/2}, ${s})`),p=f.node().getBBox(),a.attr("transform",`translate(0, ${s+o+l*2})`),p=f.node().getBBox(),e.attr("transform",`translate(0, ${s+o+(c?c+l*4:l*2)})`),p=f.node().getBBox(),{shapeSvg:f,bbox:p}}v.__name(rs,"textHelper");async function xt(u,t,g,h=[]){const l=u.insert("g").attr("class","label").attr("style",h.join("; ")),r=Y.getConfig();let f="useHtmlLabels"in t?t.useHtmlLabels:Y.evaluate(r.htmlLabels)??!0,i="";"text"in t?i=t.text:i=t.label,!f&&i.startsWith("\\")&&(i=i.substring(1)),Y.hasKatex(i)&&(f=!0);const n=await ct.createText(l,Y.sanitizeText3(U.decodeEntities(i)),{width:U.calculateTextWidth(i,r)+50,classes:"markdown-node-label",useHtmlLabels:f},r);let a,e=1;if(f){const s=n.children[0],o=X.select_default(n);e=s.innerHTML.split("<br>").length,s.innerHTML.includes("</math>")&&(e+=s.innerHTML.split("<mrow>").length-1);const c=s.getElementsByTagName("img");if(c){const y=i.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...c].map(d=>new Promise(m=>{function p(){if(d.style.display="flex",d.style.flexDirection="column",y){const w=r.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,b=parseInt(w,10)*5+"px";d.style.minWidth=b,d.style.maxWidth=b}else d.style.width="100%";m(d)}v.__name(p,"setupImage"),setTimeout(()=>{d.complete&&p()}),d.addEventListener("error",p),d.addEventListener("load",p)})))}a=s.getBoundingClientRect(),o.attr("width",a.width),o.attr("height",a.height)}else{h.includes("font-weight: bolder")&&X.select_default(n).selectAll("tspan").attr("font-weight",""),e=n.children.length;const s=n.children[0];(n.textContent===""||n.textContent.includes("&gt"))&&(s.textContent=i[0]+i.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),i[1]===" "&&(s.textContent=s.textContent[0]+" "+s.textContent.substring(1))),s.textContent==="undefined"&&(s.textContent=""),a=n.getBBox()}return l.attr("transform","translate(0,"+(-a.height/(2*e)+g)+")"),a.height}v.__name(xt,"addText");async function ls(u,t){const g=Y.getConfig2(),{themeVariables:h}=g,{useGradient:l}=h,r=g.class.padding??12,f=r,i=t.useHtmlLabels??Y.evaluate(g.htmlLabels)??!0,n=t;n.annotations=n.annotations??[],n.members=n.members??[],n.methods=n.methods??[];const{shapeSvg:a,bbox:e}=await rs(u,t,g,i,f),{labelStyles:s,nodeStyles:o}=$.styles2String(t);t.labelStyle=s,t.cssStyles=n.styles||"";const c=n.styles?.join(";")||o||"";t.cssStyles||(t.cssStyles=c.replaceAll("!important","").split(";"));const y=n.members.length===0&&n.methods.length===0&&!g.class?.hideEmptyMembersBox,d=H.at.svg(a),m=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const p=Math.max(t.width??0,e.width);let w=Math.max(t.height??0,e.height);const b=(t.height??0)>e.height;n.members.length===0&&n.methods.length===0?w+=f:n.members.length>0&&n.methods.length===0&&(w+=f*2);const S=-p/2,x=-w/2;let N=y?r*2:n.members.length===0&&n.methods.length===0?-r:0;b&&(N=r*2);const k=d.rectangle(S-r,x-r-(y?r:n.members.length===0&&n.methods.length===0?-r/2:0),p+2*r,w+2*r+N,m),_=a.insert(()=>k,":first-child");_.attr("class","basic label-container outer-path");const D=_.node().getBBox(),R=a.select(".annotation-group").node().getBBox().height-(y?r/2:0)||0,L=a.select(".label-group").node().getBBox().height-(y?r/2:0)||0,T=a.select(".members-group").node().getBBox().height-(y?r/2:0)||0,M=(R+L+x+r-(x-r-(y?r:n.members.length===0&&n.methods.length===0?-r/2:0)))/2;if(a.selectAll(".text").each((B,P,O)=>{const C=X.select_default(O[P]),G=C.attr("transform");let V=0;if(G){const tt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(G);tt&&(V=parseFloat(tt[2]))}let z=V+x+r-(y?r:n.members.length===0&&n.methods.length===0?-r/2:0);if(C.attr("class").includes("methods-group")){const tt=Math.max(T,f/2);b?z=Math.max(M,R+L+tt+x+f*2+r)+f*2:z=R+L+tt+x+f*4+r}n.members.length===0&&n.methods.length===0&&g.class?.hideEmptyMembersBox&&(n.annotations.length>0?z=V-f:z=V),i||(z-=4);let at=S;(C.attr("class").includes("label-group")||C.attr("class").includes("annotation-group"))&&(at=-C.node()?.getBBox().width/2||0,a.selectAll("text").each(function(tt,it,K){window.getComputedStyle(K[it]).textAnchor==="middle"&&(at=0)})),C.attr("transform",`translate(${at}, ${z})`)}),n.members.length>0||n.methods.length>0||y){const B=R+L+x+r,P=d.line(D.x,B,D.x+D.width,B+.001,m);a.insert(()=>P).attr("class",`divider${t.look==="neo"&&!l?" neo-line":""}`).attr("style",c)}if(y||n.members.length>0||n.methods.length>0){const B=R+L+T+x+f*2+r,P=d.line(D.x,b?Math.max(M,B):B,D.x+D.width,(b?Math.max(M,B):B)+.001,m);a.insert(()=>P).attr("class",`divider${t.look==="neo"&&!l?" neo-line":""}`).attr("style",c)}if(n.look!=="handDrawn"&&a.selectAll("path").attr("style",c),_.select(":nth-child(2)").attr("style",c),a.selectAll(".divider").select("path").attr("style",c),t.labelStyle?a.selectAll("span").attr("style",t.labelStyle):a.selectAll("span").attr("style",c),!i){const B=RegExp(/color\s*:\s*([^;]*)/),P=B.exec(c);if(P){const O=P[0].replace("color","fill");a.selectAll("tspan").attr("style",O)}else if(s){const O=B.exec(s);if(O){const C=O[0].replace("color","fill");a.selectAll("tspan").attr("style",C)}}}return I(t,_),t.intersect=function(B){return A.rect(t,B)},a}v.__name(ls,"classBox");async function ns(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const l=t,r=t,f=20,i=20,n="verifyMethod"in t,a=E(t),{themeVariables:e}=Y.getConfig2(),{borderColorArray:s,requirementEdgeLabelBackground:o}=e,c=u.insert("g").attr("class",a).attr("id",t.domId??t.id);let y;n?y=await st(c,`&lt;&lt;${l.type}&gt;&gt;`,0,t.labelStyle):y=await st(c,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let d=y;const m=await st(c,l.name,d,t.labelStyle+"; font-weight: bold;");if(d+=m+i,n){const D=await st(c,`${l.requirementId?`ID: ${l.requirementId}`:""}`,d,t.labelStyle);d+=D;const R=await st(c,`${l.text?`Text: ${l.text}`:""}`,d,t.labelStyle);d+=R;const L=await st(c,`${l.risk?`Risk: ${l.risk}`:""}`,d,t.labelStyle);d+=L,await st(c,`${l.verifyMethod?`Verification: ${l.verifyMethod}`:""}`,d,t.labelStyle)}else{const D=await st(c,`${r.type?`Type: ${r.type}`:""}`,d,t.labelStyle);d+=D,await st(c,`${r.docRef?`Doc Ref: ${r.docRef}`:""}`,d,t.labelStyle)}const p=(c.node()?.getBBox().width??200)+f,w=(c.node()?.getBBox().height??200)+f,b=-p/2,S=-w/2,x=H.at.svg(c),N=$.userNodeOverrides(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const k=x.rectangle(b,S,p,w,N),_=c.insert(()=>k,":first-child");if(_.attr("class","basic label-container outer-path").attr("style",h),s?.length){const D=t.colorIndex??0;c.attr("data-color-id",`color-${D%s.length}`)}if(c.selectAll(".label").each((D,R,L)=>{const T=X.select_default(L[R]),M=T.attr("transform");let B=0,P=0;if(M){const G=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(M);G&&(B=parseFloat(G[1]),P=parseFloat(G[2]))}const O=P-w/2;let C=b+f/2;(R===0||R===1)&&(C=B),T.attr("transform",`translate(${C}, ${O+f})`)}),d>y+m+i){const D=S+y+m+i;let R;if(t.look==="neo"){const T=[[b,D],[b+p,D],[b+p,D+.001],[b,D+.001]];R=x.polygon(T,N)}else R=x.line(b,D,b+p,D,N);c.insert(()=>R).attr("class","divider")}return I(t,_),t.intersect=function(D){return A.rect(t,D)},h&&t.look!=="handDrawn"&&(o||s?.length)&&c.selectAll("path").attr("style",h),c}v.__name(ns,"requirementBox");async function st(u,t,g,h=""){if(t==="")return 0;const l=u.insert("g").attr("class","label").attr("style",h),r=Y.getConfig2(),f=r.htmlLabels??!0,i=await ct.createText(l,Y.sanitizeText3(U.decodeEntities(t)),{width:U.calculateTextWidth(t,r)+50,classes:"markdown-node-label",useHtmlLabels:f,style:h},r);let n;if(f){const a=i.children[0],e=X.select_default(i);n=a.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}else{const a=i.children[0];for(const e of a.children)h&&e.setAttribute("style",h);n=i.getBBox(),n.height+=6}return l.attr("transform",`translate(${-n.width/2},${-n.height/2+g})`),n.height}v.__name(st,"addText");var Ls=v.__name(u=>{switch(u){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function cs(u,t,{config:g}){const{labelStyles:h,nodeStyles:l}=$.styles2String(t);t.labelStyle=h||"";const r=10,f=t.width;t.width=(t.width??200)-10;const{shapeSvg:i,bbox:n,label:a}=await W(u,t,E(t)),e=t.padding||10;let s="",o;"ticket"in t&&t.ticket&&g?.kanban?.ticketBaseUrl&&(s=g?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),o=i.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",s).attr("target","_blank"));const c={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,d;o?{label:y,bbox:d}=await Nt(o,"ticket"in t&&t.ticket||"",c):{label:y,bbox:d}=await Nt(i,"ticket"in t&&t.ticket||"",c);const{label:m,bbox:p}=await Nt(i,"assigned"in t&&t.assigned||"",c);t.width=f;const w=10,b=t?.width||0,S=Math.max(d.height,p.height)/2,x=Math.max(n.height+w*2,t?.height||0)+S,N=-b/2,k=-x/2;a.attr("transform","translate("+(e-b/2)+", "+(-S-n.height/2)+")"),y.attr("transform","translate("+(e-b/2)+", "+(-S+n.height/2)+")"),m.attr("transform","translate("+(e+b/2-p.width-2*r)+", "+(-S+n.height/2)+")");let _;const{rx:D,ry:R}=t,{cssStyles:L}=t;if(t.look==="handDrawn"){const T=H.at.svg(i),M=$.userNodeOverrides(t,{}),B=D||R?T.path(ft(N,k,b,x,D||0),M):T.rectangle(N,k,b,x,M);_=i.insert(()=>B,":first-child"),_.attr("class","basic label-container").attr("style",L||null)}else{_=i.insert("rect",":first-child"),_.attr("class","basic label-container __APA__").attr("style",l).attr("rx",D??5).attr("ry",R??5).attr("x",N).attr("y",k).attr("width",b).attr("height",x);const T="priority"in t&&t.priority;if(T){const M=i.append("line"),B=N+2,P=k+Math.floor((D??0)/2),O=k+x-Math.floor((D??0)/2);M.attr("x1",B).attr("y1",P).attr("x2",B).attr("y2",O).attr("stroke-width","4").attr("stroke",Ls(T))}}return I(t,_),t.height=x,t.intersect=function(T){return A.rect(t,T)},i}v.__name(cs,"kanbanItem");async function os(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const{shapeSvg:l,bbox:r,halfPadding:f,label:i}=await W(u,t,E(t)),n=r.width+10*f,a=r.height+8*f,e=.15*n,{cssStyles:s}=t,o=r.width+20,c=r.height+20,y=Math.max(n,o),d=Math.max(a,c);i.attr("transform",`translate(${-r.width/2}, ${-r.height/2})`);let m;const p=`M0 0
11
+ a${e},${e} 1 0,0 ${y*.25},${-1*d*.1}
12
+ a${e},${e} 1 0,0 ${y*.25},0
13
+ a${e},${e} 1 0,0 ${y*.25},0
14
+ a${e},${e} 1 0,0 ${y*.25},${d*.1}
15
+
16
+ a${e},${e} 1 0,0 ${y*.15},${d*.33}
17
+ a${e*.8},${e*.8} 1 0,0 0,${d*.34}
18
+ a${e},${e} 1 0,0 ${-1*y*.15},${d*.33}
19
+
20
+ a${e},${e} 1 0,0 ${-1*y*.25},${d*.15}
21
+ a${e},${e} 1 0,0 ${-1*y*.25},0
22
+ a${e},${e} 1 0,0 ${-1*y*.25},0
23
+ a${e},${e} 1 0,0 ${-1*y*.25},${-1*d*.15}
24
+
25
+ a${e},${e} 1 0,0 ${-1*y*.1},${-1*d*.33}
26
+ a${e*.8},${e*.8} 1 0,0 0,${-1*d*.34}
27
+ a${e},${e} 1 0,0 ${y*.1},${-1*d*.33}
28
+ H0 V0 Z`;if(t.look==="handDrawn"){const w=H.at.svg(l),b=$.userNodeOverrides(t,{}),S=w.path(p,b);m=l.insert(()=>S,":first-child"),m.attr("class","basic label-container").attr("style",U.handleUndefinedAttr(s))}else m=l.insert("path",":first-child").attr("class","basic label-container").attr("style",h).attr("d",p);return m.attr("transform",`translate(${-y/2}, ${-d/2})`),I(t,m),t.calcIntersect=function(w,b){return A.rect(w,b)},t.intersect=function(w){return X.log.info("Bang intersect",t,w),A.rect(t,w)},l}v.__name(os,"bang");async function hs(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const{shapeSvg:l,bbox:r,halfPadding:f,label:i}=await W(u,t,E(t)),n=r.width+2*f,a=r.height+2*f,e=.15*n,s=.25*n,o=.35*n,c=.2*n,{cssStyles:y}=t;let d;const m=`M0 0
29
+ a${e},${e} 0 0,1 ${n*.25},${-1*n*.1}
30
+ a${o},${o} 1 0,1 ${n*.4},${-1*n*.1}
31
+ a${s},${s} 1 0,1 ${n*.35},${n*.2}
32
+
33
+ a${e},${e} 1 0,1 ${n*.15},${a*.35}
34
+ a${c},${c} 1 0,1 ${-1*n*.15},${a*.65}
35
+
36
+ a${s},${e} 1 0,1 ${-1*n*.25},${n*.15}
37
+ a${o},${o} 1 0,1 ${-1*n*.5},0
38
+ a${e},${e} 1 0,1 ${-1*n*.25},${-1*n*.15}
39
+
40
+ a${e},${e} 1 0,1 ${-1*n*.1},${-1*a*.35}
41
+ a${c},${c} 1 0,1 ${n*.1},${-1*a*.65}
42
+ H0 V0 Z`;if(t.look==="handDrawn"){const p=H.at.svg(l),w=$.userNodeOverrides(t,{}),b=p.path(m,w);d=l.insert(()=>b,":first-child"),d.attr("class","basic label-container").attr("style",U.handleUndefinedAttr(y))}else d=l.insert("path",":first-child").attr("class","basic label-container").attr("style",h).attr("d",m);return i.attr("transform",`translate(${-r.width/2}, ${-r.height/2})`),d.attr("transform",`translate(${-n/2}, ${-a/2})`),I(t,d),t.calcIntersect=function(p,w){return A.rect(p,w)},t.intersect=function(p){return X.log.info("Cloud intersect",t,p),A.rect(t,p)},l}v.__name(hs,"cloud");async function gs(u,t){const{labelStyles:g,nodeStyles:h}=$.styles2String(t);t.labelStyle=g;const{shapeSvg:l,bbox:r,halfPadding:f,label:i}=await W(u,t,E(t)),n=r.width+8*f,a=r.height+2*f,e=5,s=t.look==="neo"?`
43
+ M${-n/2} ${a/2-e}
44
+ v${-a+2*e}
45
+ q0,-${e} ${e},-${e}
46
+ h${n-2*e}
47
+ q${e},0 ${e},${e}
48
+ v${a-e}
49
+ H${-n/2}
50
+ Z
51
+ `:`
52
+ M${-n/2} ${a/2-e}
53
+ v${-a+2*e}
54
+ q0,-${e} ${e},-${e}
55
+ h${n-2*e}
56
+ q${e},0 ${e},${e}
57
+ v${a-2*e}
58
+ q0,${e} -5,${e}
59
+ h${-(n-2*e)}
60
+ q-5,0 -5,-5
61
+ Z
62
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const o=l.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",h).attr("d",s);return l.append("line").attr("class","node-line-").attr("x1",-n/2).attr("y1",a/2).attr("x2",n/2).attr("y2",a/2),i.attr("transform",`translate(${-r.width/2}, ${-r.height/2})`),l.append(()=>i.node()),I(t,o),t.calcIntersect=function(c,y){return A.rect(c,y)},t.intersect=function(c){return A.rect(t,c)},l}v.__name(gs,"defaultMindmapNode");async function fs(u,t){return Rt(u,t,{padding:t.padding??0})}v.__name(fs,"mindmapCircle");var Os=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:je},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:We},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:qe},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ze},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:fe},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ye},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Rt},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:os},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:hs},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ie},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:xe},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Me},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Be},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ke},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Ne},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ue},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Je},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ie},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ye},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ve},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Fe},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:we},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Se},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ce},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:oe},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:he},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ce},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ss},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:be},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Qe},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Ae},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:ge},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:de},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:es},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:is},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:pe},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ts},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:me},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Xe},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Le},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:He},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:ae},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:ne},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Ze},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ue},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:as},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Te},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Re}],ys=v.__name(()=>{const u=[...Object.entries({state:Ge,choice:re,note:Oe,rectWithTitle:Ee,labelRect:De,iconSquare:_e,iconCircle:ve,icon:$e,iconRounded:ke,imageSquare:Pe,anchor:ee,kanbanItem:cs,mindmapCircle:fs,defaultMindmapNode:gs,classBox:ls,erBox:Ht,requirementBox:ns}),...Os.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(g=>[g,t.handler]))];return Object.fromEntries(u)},"generateShapeMap")();function ds(u){return u in ys}v.__name(ds,"isValidShape");var _t=new Map;async function us(u,t,g){let h,l;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const r=t.shape?ys[t.shape]:void 0;if(!r)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let f;g.config.securityLevel==="sandbox"?f="_top":t.linkTarget&&(f=t.linkTarget||"_blank"),h=u.insert("svg:a").attr("xlink:href",t.link).attr("target",f??null),l=await r(h,t,g)}else l=await r(u,t,g),h=l;return h.attr("data-look",U.handleUndefinedAttr(t.look)),t.tooltip&&l.attr("title",t.tooltip),_t.set(t.id,h),t.haveCallback&&h.attr("class",h.attr("class")+" clickable"),h}v.__name(us,"insertNode");var Is=v.__name((u,t)=>{_t.set(t.id,u)},"setNodeElem"),Ts=v.__name(()=>{_t.clear()},"clear"),Es=v.__name(u=>{const t=_t.get(u.id);X.log.trace("Transforming node",u.diff,u,"translate("+(u.x-u.width/2-5)+", "+u.width/2+")");const g=8,h=u.diff||0;return u.clusterNode?t.attr("transform","translate("+(u.x+h-u.width/2)+", "+(u.y-u.height/2-g)+")"):t.attr("transform","translate("+u.x+", "+u.y+")"),h},"positionNode");Object.defineProperty(exports,"clear",{enumerable:!0,get:function(){return bs}});Object.defineProperty(exports,"clear2",{enumerable:!0,get:function(){return Ts}});Object.defineProperty(exports,"createLabel_default",{enumerable:!0,get:function(){return $t}});Object.defineProperty(exports,"insertCluster",{enumerable:!0,get:function(){return ws}});Object.defineProperty(exports,"insertNode",{enumerable:!0,get:function(){return us}});Object.defineProperty(exports,"isValidShape",{enumerable:!0,get:function(){return ds}});Object.defineProperty(exports,"labelHelper",{enumerable:!0,get:function(){return W}});Object.defineProperty(exports,"positionNode",{enumerable:!0,get:function(){return Es}});Object.defineProperty(exports,"setNodeElem",{enumerable:!0,get:function(){return Is}});Object.defineProperty(exports,"updateNodeBounds",{enumerable:!0,get:function(){return I}});