@zythum02/fello-server 0.1.28

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 (369) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +213 -0
  3. package/out/renderer/assets/_baseUniq-C01H-TTl.js +660 -0
  4. package/out/renderer/assets/abap-B7h4dtBh.js +7 -0
  5. package/out/renderer/assets/actionscript-3-DtnkuHN2.js +7 -0
  6. package/out/renderer/assets/ada-BZS802Se.js +7 -0
  7. package/out/renderer/assets/andromeeda-C847lm7Z.js +4 -0
  8. package/out/renderer/assets/angular-html-BYG42TJr.js +42 -0
  9. package/out/renderer/assets/angular-ts-BftcHvZ6.js +29 -0
  10. package/out/renderer/assets/apache-D4roVlsU.js +7 -0
  11. package/out/renderer/assets/apex-B-mI3Md2.js +7 -0
  12. package/out/renderer/assets/apl-CGZawg-A.js +18 -0
  13. package/out/renderer/assets/applescript-C43Knf0G.js +7 -0
  14. package/out/renderer/assets/ara-DRBH84ND.js +7 -0
  15. package/out/renderer/assets/arc-BXqrFYj-.js +131 -0
  16. package/out/renderer/assets/architectureDiagram-Q4EWVU46-DlFz_4yO.js +8718 -0
  17. package/out/renderer/assets/asciidoc-CT8_dLUs.js +7 -0
  18. package/out/renderer/assets/asm-3tg4MVib.js +7 -0
  19. package/out/renderer/assets/astro-BxdWOZvM.js +19 -0
  20. package/out/renderer/assets/aurora-x-wJ4-eM2h.js +4 -0
  21. package/out/renderer/assets/awk-ChreaG-G.js +7 -0
  22. package/out/renderer/assets/ayu-dark-rtpbXCNg.js +4 -0
  23. package/out/renderer/assets/ayu-light-BCZDSyV8.js +4 -0
  24. package/out/renderer/assets/ayu-mirage-BVoH71sA.js +4 -0
  25. package/out/renderer/assets/ballerina-B0yt0TYU.js +7 -0
  26. package/out/renderer/assets/bat-BzNgQIA7.js +7 -0
  27. package/out/renderer/assets/beancount-aZWrE5WV.js +7 -0
  28. package/out/renderer/assets/berry--Qc8OslH.js +7 -0
  29. package/out/renderer/assets/bibtex-BLeFwAes.js +7 -0
  30. package/out/renderer/assets/bicep-DbBeGdXQ.js +7 -0
  31. package/out/renderer/assets/bird2-aXhIUHPg.js +7 -0
  32. package/out/renderer/assets/blade-BbH7YAUi.js +22 -0
  33. package/out/renderer/assets/blockDiagram-DXYQGD6D-B_jYpKkP.js +3637 -0
  34. package/out/renderer/assets/bsl-DwPS0BId.js +9 -0
  35. package/out/renderer/assets/c-C4VtT7JA.js +7 -0
  36. package/out/renderer/assets/c3-CWHczQMq.js +7 -0
  37. package/out/renderer/assets/c4Diagram-AHTNJAMY-DWRXz6-S.js +2482 -0
  38. package/out/renderer/assets/cadence-S_NtR5Dy.js +7 -0
  39. package/out/renderer/assets/cairo-BtYx2aM5.js +9 -0
  40. package/out/renderer/assets/catppuccin-frappe-C21OPQfC.js +4 -0
  41. package/out/renderer/assets/catppuccin-latte-0ZtXlsrX.js +4 -0
  42. package/out/renderer/assets/catppuccin-macchiato-BD_FR4sl.js +4 -0
  43. package/out/renderer/assets/catppuccin-mocha-C653csR5.js +4 -0
  44. package/out/renderer/assets/channel-iMh-jYBg.js +7 -0
  45. package/out/renderer/assets/chunk-4BX2VUAB-CDXuLHIo.js +16 -0
  46. package/out/renderer/assets/chunk-4TB4RGXK-Bs-z-5kA.js +1920 -0
  47. package/out/renderer/assets/chunk-55IACEB6-DBmLw2WJ.js +13 -0
  48. package/out/renderer/assets/chunk-EDXVE4YY-BhsDT27O.js +24 -0
  49. package/out/renderer/assets/chunk-FMBD7UC4-C_qJYK5q.js +19 -0
  50. package/out/renderer/assets/chunk-OYMX7WX6-DIh7s3uw.js +1939 -0
  51. package/out/renderer/assets/chunk-QZHKN3VN-CYa45CSJ.js +19 -0
  52. package/out/renderer/assets/chunk-YZCP3GAM-BeF07Xv_.js +116 -0
  53. package/out/renderer/assets/clarity-D2ViJC0i.js +7 -0
  54. package/out/renderer/assets/classDiagram-6PBFFD2Q-B12_6ldG.js +23 -0
  55. package/out/renderer/assets/classDiagram-v2-HSJHXN6E-B12_6ldG.js +23 -0
  56. package/out/renderer/assets/clojure-C_G4_w5x.js +7 -0
  57. package/out/renderer/assets/clone-1GZJZPn3.js +8 -0
  58. package/out/renderer/assets/cmake-CDfQILeU.js +7 -0
  59. package/out/renderer/assets/cobol-B8r1pfPr.js +13 -0
  60. package/out/renderer/assets/codeowners-awy7PWCD.js +7 -0
  61. package/out/renderer/assets/codeql-lfK8ppuq.js +7 -0
  62. package/out/renderer/assets/coffee-XLjtuEYs.js +9 -0
  63. package/out/renderer/assets/common-lisp-DAq1kaby.js +7 -0
  64. package/out/renderer/assets/coq-l_JvzFJl.js +7 -0
  65. package/out/renderer/assets/cose-bilkent-S5V4N54A-CuSnz9Ro.js +4942 -0
  66. package/out/renderer/assets/cpp-zh2ePAE_.js +22 -0
  67. package/out/renderer/assets/crystal-BqBRy7Ec.js +19 -0
  68. package/out/renderer/assets/csharp-DxX_6tHh.js +7 -0
  69. package/out/renderer/assets/css-BtVcDqlU.js +7 -0
  70. package/out/renderer/assets/csv-Ba84L8e5.js +7 -0
  71. package/out/renderer/assets/cue-BFSVLV6N.js +7 -0
  72. package/out/renderer/assets/cypher-DbUmWIxC.js +7 -0
  73. package/out/renderer/assets/cytoscape.esm-Bm8DJGmZ.js +30239 -0
  74. package/out/renderer/assets/d-9qSZPw74.js +7 -0
  75. package/out/renderer/assets/dagre-KV5264BT-LHPLEy9g.js +694 -0
  76. package/out/renderer/assets/dark-plus-DmZ1Dzd4.js +4 -0
  77. package/out/renderer/assets/dart-CCSsOg9l.js +7 -0
  78. package/out/renderer/assets/dax-CvsmLV-B.js +7 -0
  79. package/out/renderer/assets/defaultLocale-B2RvLBDe.js +206 -0
  80. package/out/renderer/assets/desktop-_xiGZ9X1.js +7 -0
  81. package/out/renderer/assets/diagram-5BDNPKRD-DWjP3Jzr.js +171 -0
  82. package/out/renderer/assets/diagram-G4DWMVQ6-CM3uASto.js +853 -0
  83. package/out/renderer/assets/diagram-MMDJMWI5-X5oh5RON.js +303 -0
  84. package/out/renderer/assets/diagram-TYMM5635-iO4Xohj9.js +214 -0
  85. package/out/renderer/assets/diff-BEdzuHlE.js +7 -0
  86. package/out/renderer/assets/docker-CUaLOm2I.js +7 -0
  87. package/out/renderer/assets/dotenv-Bb4iNxXK.js +7 -0
  88. package/out/renderer/assets/dracula-B8-AVrwI.js +4 -0
  89. package/out/renderer/assets/dracula-soft-BHeefow7.js +4 -0
  90. package/out/renderer/assets/dream-maker-CNLQpoF-.js +7 -0
  91. package/out/renderer/assets/edge-CnHxQ_FD.js +15 -0
  92. package/out/renderer/assets/elixir-B_LIBv5J.js +11 -0
  93. package/out/renderer/assets/elm-BlO7pcFp.js +10 -0
  94. package/out/renderer/assets/emacs-lisp-4gdXY_g3.js +7 -0
  95. package/out/renderer/assets/erDiagram-SMLLAGMA-4xwE7Ysd.js +1227 -0
  96. package/out/renderer/assets/erb-Bzn22wO6.js +28 -0
  97. package/out/renderer/assets/erlang-Ch5kuXHm.js +9 -0
  98. package/out/renderer/assets/everforest-dark-Cg1xdODP.js +4 -0
  99. package/out/renderer/assets/everforest-light-BmTD3bxe.js +4 -0
  100. package/out/renderer/assets/fennel-BTELNkeT.js +7 -0
  101. package/out/renderer/assets/fish-kGF2-4SL.js +7 -0
  102. package/out/renderer/assets/flowDiagram-DWJPFMVM-DoIqEJWm.js +2332 -0
  103. package/out/renderer/assets/fluent-YyC28MRr.js +7 -0
  104. package/out/renderer/assets/fortran-fixed-form-CpmOyvS5.js +9 -0
  105. package/out/renderer/assets/fortran-free-form-5X94ETMi.js +7 -0
  106. package/out/renderer/assets/fsharp-5vtGqRR9.js +9 -0
  107. package/out/renderer/assets/ganttDiagram-T4ZO3ILL-C48vXSUK.js +3714 -0
  108. package/out/renderer/assets/gdresource-B5TLWiFO.js +11 -0
  109. package/out/renderer/assets/gdscript-CNW3Aj-d.js +7 -0
  110. package/out/renderer/assets/gdshader-BEzE4j_3.js +7 -0
  111. package/out/renderer/assets/genie-BvhtM5Ga.js +7 -0
  112. package/out/renderer/assets/gherkin-xCNF9gh8.js +7 -0
  113. package/out/renderer/assets/git-commit-PP9xCApN.js +9 -0
  114. package/out/renderer/assets/git-rebase-D-XQSvDj.js +9 -0
  115. package/out/renderer/assets/gitGraphDiagram-UUTBAWPF-D3YiiEhK.js +1375 -0
  116. package/out/renderer/assets/github-dark-O22yVQaY.js +4 -0
  117. package/out/renderer/assets/github-dark-default-DB2Hkvqn.js +4 -0
  118. package/out/renderer/assets/github-dark-dimmed-CMZ_OfqC.js +4 -0
  119. package/out/renderer/assets/github-dark-high-contrast-DmxWVmCU.js +4 -0
  120. package/out/renderer/assets/github-light-BTbR9xVK.js +4 -0
  121. package/out/renderer/assets/github-light-default-DWEonwFe.js +4 -0
  122. package/out/renderer/assets/github-light-high-contrast-WJ_cPDts.js +4 -0
  123. package/out/renderer/assets/gleam-LmNxrMsN.js +7 -0
  124. package/out/renderer/assets/glimmer-js-h2QNNiD7.js +15 -0
  125. package/out/renderer/assets/glimmer-ts-Bk3uX6Ae.js +15 -0
  126. package/out/renderer/assets/glsl-CGsiYPcu.js +9 -0
  127. package/out/renderer/assets/gn-OUMx7fqt.js +7 -0
  128. package/out/renderer/assets/gnuplot-tV8vezdE.js +7 -0
  129. package/out/renderer/assets/go-DRMr3iML.js +7 -0
  130. package/out/renderer/assets/graph-CYPfPCZi.js +953 -0
  131. package/out/renderer/assets/graphql-CwmtR1ib.js +15 -0
  132. package/out/renderer/assets/groovy-Bn4MhXgW.js +7 -0
  133. package/out/renderer/assets/gruvbox-dark-hard-DVsRsETr.js +4 -0
  134. package/out/renderer/assets/gruvbox-dark-medium-B5JBrQdg.js +4 -0
  135. package/out/renderer/assets/gruvbox-dark-soft-Db-YOqRx.js +4 -0
  136. package/out/renderer/assets/gruvbox-light-hard-CXzJt7DI.js +4 -0
  137. package/out/renderer/assets/gruvbox-light-medium-B89RAI1Y.js +4 -0
  138. package/out/renderer/assets/gruvbox-light-soft-Cs0hTZYv.js +4 -0
  139. package/out/renderer/assets/hack-BTX3ICIE.js +13 -0
  140. package/out/renderer/assets/haml-DrIklt7F.js +11 -0
  141. package/out/renderer/assets/handlebars-yWFGGD2R.js +15 -0
  142. package/out/renderer/assets/haskell-CzPS7wjM.js +7 -0
  143. package/out/renderer/assets/haxe-BpobLYM9.js +7 -0
  144. package/out/renderer/assets/hcl-axoq0Ycu.js +7 -0
  145. package/out/renderer/assets/highlighted-body-OFNGDK62-B6M-kMLU.js +17 -0
  146. package/out/renderer/assets/hjson-I7LcauIB.js +7 -0
  147. package/out/renderer/assets/hlsl-TRzjajlb.js +7 -0
  148. package/out/renderer/assets/horizon-DWzh3z5C.js +4 -0
  149. package/out/renderer/assets/horizon-bright-C1AFkPsv.js +4 -0
  150. package/out/renderer/assets/houston-CF_ws8Cq.js +4 -0
  151. package/out/renderer/assets/html-GC16tDh9.js +11 -0
  152. package/out/renderer/assets/html-derivative-HU9p64q4.js +11 -0
  153. package/out/renderer/assets/http-DjsOm9E4.js +20 -0
  154. package/out/renderer/assets/hurl-Am2cDU4f.js +18 -0
  155. package/out/renderer/assets/hxml-Jle7oGdm.js +9 -0
  156. package/out/renderer/assets/hy-B1k9U6S8.js +7 -0
  157. package/out/renderer/assets/imba-C4923lSV.js +7 -0
  158. package/out/renderer/assets/index-D8H7Q_md.css +382 -0
  159. package/out/renderer/assets/index-Dabo17L1.js +236275 -0
  160. package/out/renderer/assets/infoDiagram-42DDH7IO-ur7rRidE.js +33 -0
  161. package/out/renderer/assets/ini-B84Ha1bx.js +7 -0
  162. package/out/renderer/assets/init-ZxktEp_H.js +16 -0
  163. package/out/renderer/assets/ishikawaDiagram-UXIWVN3A-fJSipMV8.js +967 -0
  164. package/out/renderer/assets/java-BfXh-0uJ.js +7 -0
  165. package/out/renderer/assets/javascript-BsAkV7mL.js +7 -0
  166. package/out/renderer/assets/jinja-FkIlHBgj.js +16 -0
  167. package/out/renderer/assets/jison-BkdOIOd4.js +9 -0
  168. package/out/renderer/assets/journeyDiagram-VCZTEJTY-TxjKxXBo.js +1255 -0
  169. package/out/renderer/assets/json-TjWBGEk1.js +7 -0
  170. package/out/renderer/assets/json5-DCGCKrmX.js +7 -0
  171. package/out/renderer/assets/jsonc-DLVLp8id.js +7 -0
  172. package/out/renderer/assets/jsonl-B-R_pDGg.js +7 -0
  173. package/out/renderer/assets/jsonnet-Cs8BnnC6.js +7 -0
  174. package/out/renderer/assets/jssm-DDuANZ2u.js +7 -0
  175. package/out/renderer/assets/jsx-BPmvoin2.js +7 -0
  176. package/out/renderer/assets/julia-CU_UwNb8.js +20 -0
  177. package/out/renderer/assets/just-tGFryTtU.js +34 -0
  178. package/out/renderer/assets/kanagawa-dragon-DU8n2NNT.js +4 -0
  179. package/out/renderer/assets/kanagawa-lotus-Byd0CDet.js +4 -0
  180. package/out/renderer/assets/kanagawa-wave-DExoagcR.js +4 -0
  181. package/out/renderer/assets/kanban-definition-6JOO6SKY-DJwjRjlE.js +1052 -0
  182. package/out/renderer/assets/kdl-DzNQTDs7.js +7 -0
  183. package/out/renderer/assets/kotlin-BM2ZNTMh.js +7 -0
  184. package/out/renderer/assets/kusto-dtpuxMFE.js +7 -0
  185. package/out/renderer/assets/laserwave-DF03wMlf.js +4 -0
  186. package/out/renderer/assets/latex-B0gTO9uZ.js +10 -0
  187. package/out/renderer/assets/layout-BT1ASsLg.js +2217 -0
  188. package/out/renderer/assets/lean-CTow-IzD.js +7 -0
  189. package/out/renderer/assets/less-BAzLMJNR.js +7 -0
  190. package/out/renderer/assets/light-plus-DS08Xg5J.js +4 -0
  191. package/out/renderer/assets/linear-ecuEcPGt.js +340 -0
  192. package/out/renderer/assets/liquid-QmJ_LYTW.js +15 -0
  193. package/out/renderer/assets/llvm-CTKcAHbb.js +7 -0
  194. package/out/renderer/assets/log-BF22rfM9.js +7 -0
  195. package/out/renderer/assets/logo-D9l7oEJ8.js +7 -0
  196. package/out/renderer/assets/lua-BVbbqwZC.js +9 -0
  197. package/out/renderer/assets/luau-CdZ6BoEa.js +7 -0
  198. package/out/renderer/assets/make-DLtqaK4D.js +7 -0
  199. package/out/renderer/assets/markdown-F_EULe_G.js +7 -0
  200. package/out/renderer/assets/marko-BAWrmNIa.js +15 -0
  201. package/out/renderer/assets/material-theme-B8B2U48Q.js +4 -0
  202. package/out/renderer/assets/material-theme-darker-BV0iY_T3.js +4 -0
  203. package/out/renderer/assets/material-theme-lighter-DrzybSTF.js +4 -0
  204. package/out/renderer/assets/material-theme-ocean-BRPLVReX.js +4 -0
  205. package/out/renderer/assets/material-theme-palenight-DSJwsR_D.js +4 -0
  206. package/out/renderer/assets/matlab-7XHduepk.js +7 -0
  207. package/out/renderer/assets/mdc-Ca0ft0PS.js +16 -0
  208. package/out/renderer/assets/mdx-D5wExp-O.js +7 -0
  209. package/out/renderer/assets/mermaid-z_1ejSlp.js +7 -0
  210. package/out/renderer/assets/min-BYCDJeWK.js +41 -0
  211. package/out/renderer/assets/min-dark-BNaN9fWk.js +4 -0
  212. package/out/renderer/assets/min-light-CMrjentn.js +4 -0
  213. package/out/renderer/assets/mindmap-definition-QFDTVHPH-D2MxZmzw.js +1186 -0
  214. package/out/renderer/assets/mipsasm-BQyyUrpa.js +7 -0
  215. package/out/renderer/assets/mojo-ByCRDvCf.js +7 -0
  216. package/out/renderer/assets/monokai-DelygWXa.js +4 -0
  217. package/out/renderer/assets/moonbit-CqjK87KZ.js +7 -0
  218. package/out/renderer/assets/move-DhTNmxqC.js +7 -0
  219. package/out/renderer/assets/narrat-CLjGcbCy.js +7 -0
  220. package/out/renderer/assets/nextflow-B166B-y1.js +9 -0
  221. package/out/renderer/assets/nextflow-groovy-BOO9s0iq.js +7 -0
  222. package/out/renderer/assets/nginx-BFAkI5_-.js +10 -0
  223. package/out/renderer/assets/night-owl-DSS199ra.js +4 -0
  224. package/out/renderer/assets/night-owl-light-gC6E-Eh2.js +4 -0
  225. package/out/renderer/assets/nim-B3PAIZ4D.js +22 -0
  226. package/out/renderer/assets/nix-ByWcmvXF.js +12 -0
  227. package/out/renderer/assets/nord-CvDbBq5M.js +4 -0
  228. package/out/renderer/assets/nushell-DB8ZUEbK.js +7 -0
  229. package/out/renderer/assets/objective-c-BRoNQF42.js +7 -0
  230. package/out/renderer/assets/objective-cpp-DEoN9Fe5.js +7 -0
  231. package/out/renderer/assets/ocaml-B1kfGk9Y.js +7 -0
  232. package/out/renderer/assets/odin-CNQ56Ay2.js +7 -0
  233. package/out/renderer/assets/one-dark-pro-CsMf0BoJ.js +4 -0
  234. package/out/renderer/assets/one-light-B0cTzZyr.js +4 -0
  235. package/out/renderer/assets/openscad-C_m7ehZF.js +7 -0
  236. package/out/renderer/assets/ordinal-CxptdPJm.js +76 -0
  237. package/out/renderer/assets/pascal-CU8Kjkr_.js +7 -0
  238. package/out/renderer/assets/pdf-worker-wrapper-Do-ikGHl.js +46762 -0
  239. package/out/renderer/assets/perl-HITCDkgu.js +18 -0
  240. package/out/renderer/assets/php-C2HieitX.js +20 -0
  241. package/out/renderer/assets/pieDiagram-DEJITSTG-Cew7QWxE.js +248 -0
  242. package/out/renderer/assets/pierre-dark-C-Drv5KU.js +4 -0
  243. package/out/renderer/assets/pierre-dark-soft-Cd74uQaL.js +4 -0
  244. package/out/renderer/assets/pierre-light-CfQnmt6J.js +4 -0
  245. package/out/renderer/assets/pierre-light-soft-DMVdU74b.js +4 -0
  246. package/out/renderer/assets/pkl-BsByaYax.js +7 -0
  247. package/out/renderer/assets/plastic-BjwMpBc0.js +4 -0
  248. package/out/renderer/assets/plsql-B3Na24V4.js +7 -0
  249. package/out/renderer/assets/po-BajfNjc5.js +7 -0
  250. package/out/renderer/assets/poimandres-ChWyhPrn.js +4 -0
  251. package/out/renderer/assets/polar-BB-dlxnO.js +7 -0
  252. package/out/renderer/assets/postcss-kj1IbjVd.js +7 -0
  253. package/out/renderer/assets/powerquery-B-e1fO-k.js +7 -0
  254. package/out/renderer/assets/powershell-BcMVbGpk.js +7 -0
  255. package/out/renderer/assets/prisma-bmxcSDxq.js +7 -0
  256. package/out/renderer/assets/prolog-BT9GCzqD.js +7 -0
  257. package/out/renderer/assets/proto-Ds-m32NR.js +7 -0
  258. package/out/renderer/assets/pug-BwQB43qN.js +13 -0
  259. package/out/renderer/assets/puppet-N15G4Usj.js +7 -0
  260. package/out/renderer/assets/purescript-DrwsEYNH.js +7 -0
  261. package/out/renderer/assets/python-CrdIx4PZ.js +7 -0
  262. package/out/renderer/assets/qml-jtL8okyu.js +9 -0
  263. package/out/renderer/assets/qmldir-DuMSk0Oz.js +7 -0
  264. package/out/renderer/assets/qss-BFrB6p4y.js +7 -0
  265. package/out/renderer/assets/quadrantDiagram-34T5L4WZ-CrZCtVJh.js +1342 -0
  266. package/out/renderer/assets/r-Dpdc-Kyk.js +7 -0
  267. package/out/renderer/assets/racket-DbA06HL7.js +7 -0
  268. package/out/renderer/assets/raku-6v-Y17bs.js +7 -0
  269. package/out/renderer/assets/razor-gBXW6YBJ.js +13 -0
  270. package/out/renderer/assets/red-DByOl5N0.js +4 -0
  271. package/out/renderer/assets/reg-CULnG2WX.js +7 -0
  272. package/out/renderer/assets/regexp-BxWeO75u.js +7 -0
  273. package/out/renderer/assets/rel-CHRwzjd4.js +7 -0
  274. package/out/renderer/assets/requirementDiagram-MS252O5E-C69IGxW8.js +1204 -0
  275. package/out/renderer/assets/riscv-BNQ9cVpw.js +7 -0
  276. package/out/renderer/assets/ron-CUEPaFZU.js +7 -0
  277. package/out/renderer/assets/rose-pine-B-kZ4Z9q.js +4 -0
  278. package/out/renderer/assets/rose-pine-dawn-efeVGdSI.js +4 -0
  279. package/out/renderer/assets/rose-pine-moon-DmodZNzl.js +4 -0
  280. package/out/renderer/assets/rosmsg-Bfahr6vb.js +7 -0
  281. package/out/renderer/assets/rst-by6KAwTb.js +37 -0
  282. package/out/renderer/assets/ruby-C13Bjepi.js +37 -0
  283. package/out/renderer/assets/rust-CMNYZh5a.js +7 -0
  284. package/out/renderer/assets/sankeyDiagram-XADWPNL6-B2tuS_nG.js +1205 -0
  285. package/out/renderer/assets/sas-BLBgC3TA.js +9 -0
  286. package/out/renderer/assets/sass-BheygBdF.js +7 -0
  287. package/out/renderer/assets/scala-B-_7vFVn.js +7 -0
  288. package/out/renderer/assets/scheme-BSHdPinv.js +7 -0
  289. package/out/renderer/assets/scss-Dq-LbI_c.js +9 -0
  290. package/out/renderer/assets/sdbl-BBUhycGU.js +7 -0
  291. package/out/renderer/assets/sequenceDiagram-FGHM5R23-Dv_lOZN1.js +4502 -0
  292. package/out/renderer/assets/shaderlab-C07uO3dL.js +9 -0
  293. package/out/renderer/assets/shellscript-CQ8MXh-D.js +7 -0
  294. package/out/renderer/assets/shellsession-CkeTp4M1.js +9 -0
  295. package/out/renderer/assets/slack-dark-BEe10hxO.js +4 -0
  296. package/out/renderer/assets/slack-ochin-BKmu9pBc.js +4 -0
  297. package/out/renderer/assets/smalltalk-qxcGy4fT.js +7 -0
  298. package/out/renderer/assets/snazzy-light-Dcvd-ZyI.js +4 -0
  299. package/out/renderer/assets/solarized-dark-BBl5y5sR.js +4 -0
  300. package/out/renderer/assets/solarized-light-DW9b_AY8.js +4 -0
  301. package/out/renderer/assets/solidity-CSTQ0FCC.js +7 -0
  302. package/out/renderer/assets/soy-BHaHgMUy.js +11 -0
  303. package/out/renderer/assets/sparql-DswowMAp.js +9 -0
  304. package/out/renderer/assets/splunk-DcGJXIDa.js +7 -0
  305. package/out/renderer/assets/sql-DzUuSofg.js +7 -0
  306. package/out/renderer/assets/ssh-config-Bk_I5wDR.js +7 -0
  307. package/out/renderer/assets/stata-Dl7wDdBE.js +9 -0
  308. package/out/renderer/assets/stateDiagram-FHFEXIEX-D9dJAqtV.js +452 -0
  309. package/out/renderer/assets/stateDiagram-v2-QKLJ7IA2-CQXoaDY1.js +21 -0
  310. package/out/renderer/assets/stylus-DXFa_2Jl.js +7 -0
  311. package/out/renderer/assets/surrealql-Bs3vUeKA.js +9 -0
  312. package/out/renderer/assets/svelte-fC0HkEkx.js +15 -0
  313. package/out/renderer/assets/swift-Cohr-WZC.js +7 -0
  314. package/out/renderer/assets/synthwave-84-CoUef9sh.js +4 -0
  315. package/out/renderer/assets/system-verilog-BcESSvRn.js +7 -0
  316. package/out/renderer/assets/systemd-DJPFjU02.js +7 -0
  317. package/out/renderer/assets/talonscript-CEEMXJTH.js +7 -0
  318. package/out/renderer/assets/tasl-DfOr2qHi.js +7 -0
  319. package/out/renderer/assets/tcl-CTsc4-t7.js +7 -0
  320. package/out/renderer/assets/templ-CSEiQwNm.js +13 -0
  321. package/out/renderer/assets/terraform-CeztUfUr.js +7 -0
  322. package/out/renderer/assets/tex-CGVqF8nD.js +9 -0
  323. package/out/renderer/assets/timeline-definition-GMOUNBTQ-DnnX0Ml0.js +1596 -0
  324. package/out/renderer/assets/tokyo-night-DjtLpAEY.js +4 -0
  325. package/out/renderer/assets/toml-vHPzWDj6.js +7 -0
  326. package/out/renderer/assets/ts-tags-cG2hZuda.js +54 -0
  327. package/out/renderer/assets/tsv-ChRVFvMy.js +7 -0
  328. package/out/renderer/assets/tsx-CmGGo4Hm.js +7 -0
  329. package/out/renderer/assets/turtle-BnC7StHY.js +7 -0
  330. package/out/renderer/assets/twig-CwEEYIBf.js +36 -0
  331. package/out/renderer/assets/typescript-CP6ECzON.js +7 -0
  332. package/out/renderer/assets/typespec-CkDVVIcK.js +7 -0
  333. package/out/renderer/assets/typst-XYLFxYau.js +7 -0
  334. package/out/renderer/assets/v-BSYXvR4g.js +7 -0
  335. package/out/renderer/assets/vala-qJa5rry9.js +7 -0
  336. package/out/renderer/assets/vb-Bzg9rspf.js +7 -0
  337. package/out/renderer/assets/vennDiagram-DHZGUBPP-BCIC8HTk.js +2486 -0
  338. package/out/renderer/assets/verilog-CCb_iTfF.js +7 -0
  339. package/out/renderer/assets/vesper-4Q1cEwPL.js +4 -0
  340. package/out/renderer/assets/vhdl-DMqk4T2s.js +7 -0
  341. package/out/renderer/assets/viml--FINbfoq.js +7 -0
  342. package/out/renderer/assets/vitesse-black-BqNLki8b.js +4 -0
  343. package/out/renderer/assets/vitesse-dark-jJ32WhwH.js +4 -0
  344. package/out/renderer/assets/vitesse-light-476zM4e6.js +4 -0
  345. package/out/renderer/assets/vue-K-7Ga-y8.js +40 -0
  346. package/out/renderer/assets/vue-html-DhreShjd.js +9 -0
  347. package/out/renderer/assets/vue-vine-rMIwOpFf.js +19 -0
  348. package/out/renderer/assets/vyper-DP4whl13.js +7 -0
  349. package/out/renderer/assets/wardley-RL74JXVD-B35jxdMa.js +27371 -0
  350. package/out/renderer/assets/wardleyDiagram-NUSXRM2D-D3rjXear.js +901 -0
  351. package/out/renderer/assets/wasm-BBh6f151.js +7 -0
  352. package/out/renderer/assets/wasm-DDgzZJey.js +10 -0
  353. package/out/renderer/assets/wenyan-BdqozpMZ.js +7 -0
  354. package/out/renderer/assets/wgsl-Vo-hHVWH.js +7 -0
  355. package/out/renderer/assets/wikitext-BDjE6pmL.js +7 -0
  356. package/out/renderer/assets/wit-C_nQzOkY.js +7 -0
  357. package/out/renderer/assets/wolfram-CRmjUoI4.js +7 -0
  358. package/out/renderer/assets/xml-BMzZeaqs.js +9 -0
  359. package/out/renderer/assets/xsl-CnwVr_6q.js +10 -0
  360. package/out/renderer/assets/xychartDiagram-5P7HB3ND-095YR9W9.js +1932 -0
  361. package/out/renderer/assets/yaml-B_vW5iTY.js +7 -0
  362. package/out/renderer/assets/zenscript-DFINJL6j.js +7 -0
  363. package/out/renderer/assets/zig-CS4FMAZp.js +7 -0
  364. package/out/renderer/index.html +13 -0
  365. package/out/scripts/electron-preload/preload.mjs +35 -0
  366. package/out/scripts/mcp-ask-user/server.mjs +126 -0
  367. package/out/scripts/mcp-skills/server.mjs +163 -0
  368. package/out/server/main.js +7000 -0
  369. package/package.json +44 -0
@@ -0,0 +1,901 @@
1
+ import { s as setAccDescription, g as getAccDescription, v as getDiagramTitle, t as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, l as log, N as selectSvgElement, e as configureSvgSize, C as clear, c as getConfig2$1, i as sanitizeText } from "./index-Dabo17L1.js";
2
+ import { p as populateCommonDb } from "./chunk-4BX2VUAB-CDXuLHIo.js";
3
+ import { p as parse } from "./wardley-RL74JXVD-B35jxdMa.js";
4
+ import "./min-BYCDJeWK.js";
5
+ import "./_baseUniq-C01H-TTl.js";
6
+ var toPercent = /* @__PURE__ */ __name((value, context) => {
7
+ const normalized = value <= 1 ? value * 100 : value;
8
+ if (normalized < 0 || normalized > 100) {
9
+ throw new Error(
10
+ `${context} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${value}`
11
+ );
12
+ }
13
+ return normalized;
14
+ }, "toPercent");
15
+ var toCoordinates = /* @__PURE__ */ __name((visibility, evolution, context) => {
16
+ return {
17
+ x: toPercent(evolution, `${context} evolution`),
18
+ y: toPercent(visibility, `${context} visibility`)
19
+ };
20
+ }, "toCoordinates");
21
+ var getFlowFromPort = /* @__PURE__ */ __name((port) => {
22
+ if (!port) {
23
+ return void 0;
24
+ }
25
+ if (port === "+<>") {
26
+ return "bidirectional";
27
+ }
28
+ if (port === "+<") {
29
+ return "backward";
30
+ }
31
+ if (port === "+>") {
32
+ return "forward";
33
+ }
34
+ return void 0;
35
+ }, "getFlowFromPort");
36
+ var extractFlowFromArrow = /* @__PURE__ */ __name((arrow) => {
37
+ if (!arrow?.startsWith("+")) {
38
+ return {};
39
+ }
40
+ const labelMatch = /^\+'([^']*)'/.exec(arrow);
41
+ const flowLabel = labelMatch?.[1];
42
+ if (arrow.includes("<>")) {
43
+ return { flow: "bidirectional", label: flowLabel };
44
+ }
45
+ if (arrow.includes("<")) {
46
+ return { flow: "backward", label: flowLabel };
47
+ }
48
+ if (arrow.includes(">")) {
49
+ return { flow: "forward", label: flowLabel };
50
+ }
51
+ return { label: flowLabel };
52
+ }, "extractFlowFromArrow");
53
+ var populateDb = /* @__PURE__ */ __name((ast, db) => {
54
+ populateCommonDb(ast, db);
55
+ if (ast.size) {
56
+ db.setSize(ast.size.width, ast.size.height);
57
+ }
58
+ if (ast.evolution) {
59
+ const stages = ast.evolution.stages.map((stage) => {
60
+ if (stage.secondName) {
61
+ return `${stage.name.trim()} / ${stage.secondName.trim()}`;
62
+ }
63
+ return stage.name.trim();
64
+ });
65
+ const stageBoundaries = ast.evolution.stages.filter((stage) => stage.boundary !== void 0).map((stage) => stage.boundary);
66
+ db.updateAxes({ stages, stageBoundaries });
67
+ }
68
+ ast.anchors.forEach((anchor) => {
69
+ const coords = toCoordinates(anchor.visibility, anchor.evolution, `Anchor "${anchor.name}"`);
70
+ db.addNode(anchor.name, anchor.name, coords.x, coords.y, "anchor");
71
+ });
72
+ ast.components.forEach((component) => {
73
+ const coords = toCoordinates(
74
+ component.visibility,
75
+ component.evolution,
76
+ `Component "${component.name}"`
77
+ );
78
+ const labelOffsetX = component.label ? (component.label.negX ? -1 : 1) * component.label.offsetX : void 0;
79
+ const labelOffsetY = component.label ? (component.label.negY ? -1 : 1) * component.label.offsetY : void 0;
80
+ const sourceStrategy = component.decorator?.strategy;
81
+ db.addNode(
82
+ component.name,
83
+ component.name,
84
+ coords.x,
85
+ coords.y,
86
+ "component",
87
+ labelOffsetX,
88
+ labelOffsetY,
89
+ component.inertia,
90
+ sourceStrategy
91
+ );
92
+ });
93
+ ast.notes.forEach((note) => {
94
+ const coords = toCoordinates(note.visibility, note.evolution, `Note "${note.text}"`);
95
+ db.addNote(note.text, coords.x, coords.y);
96
+ });
97
+ ast.pipelines.forEach((pipeline) => {
98
+ const parentNode = db.getNode(pipeline.parent);
99
+ if (!parentNode || typeof parentNode.y !== "number") {
100
+ throw new Error(
101
+ `Pipeline "${pipeline.parent}" must reference an existing component with coordinates.`
102
+ );
103
+ }
104
+ const parentY = parentNode.y;
105
+ db.startPipeline(pipeline.parent);
106
+ pipeline.components.forEach((component) => {
107
+ const componentId = `${pipeline.parent}_${component.name}`;
108
+ const labelOffsetX = component.label ? (component.label.negX ? -1 : 1) * component.label.offsetX : void 0;
109
+ const labelOffsetY = component.label ? (component.label.negY ? -1 : 1) * component.label.offsetY : void 0;
110
+ const x = toPercent(component.evolution, `Pipeline component "${component.name}" evolution`);
111
+ db.addNode(
112
+ componentId,
113
+ component.name,
114
+ x,
115
+ parentY,
116
+ "pipeline-component",
117
+ labelOffsetX,
118
+ labelOffsetY
119
+ );
120
+ db.addPipelineComponent(pipeline.parent, componentId);
121
+ });
122
+ });
123
+ ast.links.forEach((link) => {
124
+ const isDashed = !!link.arrow && (link.arrow.includes("-.->") || link.arrow.includes(".-."));
125
+ let flow = getFlowFromPort(link.fromPort) ?? getFlowFromPort(link.toPort);
126
+ const { flow: arrowFlow, label: flowLabel } = extractFlowFromArrow(link.arrow);
127
+ if (!flow && arrowFlow) {
128
+ flow = arrowFlow;
129
+ }
130
+ const annotation = link.linkLabel;
131
+ const label = flowLabel ?? annotation;
132
+ db.addLink(link.from, link.to, isDashed, label, flow);
133
+ });
134
+ ast.evolves.forEach((evolve) => {
135
+ const node = db.getNode(evolve.component);
136
+ if (node?.y !== void 0) {
137
+ const target = toPercent(evolve.target, `Evolve target for "${evolve.component}"`);
138
+ db.addTrend(evolve.component, target, node.y);
139
+ }
140
+ });
141
+ if (ast.annotations.length > 0) {
142
+ const annotationsBox = ast.annotations[0];
143
+ const coords = toCoordinates(annotationsBox.x, annotationsBox.y, "Annotations box");
144
+ db.setAnnotationsBox(coords.x, coords.y);
145
+ }
146
+ ast.annotation.forEach((annotation) => {
147
+ const coords = toCoordinates(annotation.x, annotation.y, `Annotation ${annotation.number}`);
148
+ db.addAnnotation(annotation.number, [{ x: coords.x, y: coords.y }], annotation.text);
149
+ });
150
+ ast.accelerators.forEach((accelerator) => {
151
+ const coords = toCoordinates(accelerator.x, accelerator.y, `Accelerator "${accelerator.name}"`);
152
+ db.addAccelerator(accelerator.name, coords.x, coords.y);
153
+ });
154
+ ast.deaccelerators.forEach((deaccelerator) => {
155
+ const coords = toCoordinates(
156
+ deaccelerator.x,
157
+ deaccelerator.y,
158
+ `Deaccelerator "${deaccelerator.name}"`
159
+ );
160
+ db.addDeaccelerator(deaccelerator.name, coords.x, coords.y);
161
+ });
162
+ }, "populateDb");
163
+ var parser = {
164
+ parser: {
165
+ // @ts-expect-error - WardleyDB is not assignable to DiagramDB
166
+ yy: void 0
167
+ },
168
+ parse: /* @__PURE__ */ __name(async (input) => {
169
+ const ast = await parse("wardley", input);
170
+ log.debug(ast);
171
+ const db = parser.parser?.yy;
172
+ if (!db || typeof db.addNode !== "function") {
173
+ throw new Error(
174
+ "parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
175
+ );
176
+ }
177
+ populateDb(ast, db);
178
+ }, "parse")
179
+ };
180
+ var WardleyBuilder = class {
181
+ constructor() {
182
+ this.nodes = /* @__PURE__ */ new Map();
183
+ this.links = [];
184
+ this.trends = /* @__PURE__ */ new Map();
185
+ this.pipelines = /* @__PURE__ */ new Map();
186
+ this.annotations = [];
187
+ this.notes = [];
188
+ this.accelerators = [];
189
+ this.deaccelerators = [];
190
+ this.axes = {};
191
+ }
192
+ static {
193
+ __name(this, "WardleyBuilder");
194
+ }
195
+ addNode(node) {
196
+ const existing = this.nodes.get(node.id) ?? { id: node.id, label: node.label };
197
+ const merged = {
198
+ ...existing,
199
+ ...node,
200
+ className: node.className ?? existing.className,
201
+ labelOffsetX: node.labelOffsetX ?? existing.labelOffsetX,
202
+ labelOffsetY: node.labelOffsetY ?? existing.labelOffsetY
203
+ };
204
+ this.nodes.set(node.id, merged);
205
+ }
206
+ addLink(link) {
207
+ this.links.push(link);
208
+ }
209
+ addTrend(trend) {
210
+ this.trends.set(trend.nodeId, trend);
211
+ }
212
+ startPipeline(nodeId) {
213
+ this.pipelines.set(nodeId, { nodeId, componentIds: [] });
214
+ const node = this.nodes.get(nodeId);
215
+ if (node) {
216
+ node.isPipelineParent = true;
217
+ }
218
+ }
219
+ addPipelineComponent(pipelineNodeId, componentId) {
220
+ const pipeline = this.pipelines.get(pipelineNodeId);
221
+ if (pipeline) {
222
+ pipeline.componentIds.push(componentId);
223
+ }
224
+ const node = this.nodes.get(componentId);
225
+ if (node) {
226
+ node.inPipeline = true;
227
+ }
228
+ }
229
+ addAnnotation(annotation) {
230
+ this.annotations.push(annotation);
231
+ }
232
+ addNote(note) {
233
+ this.notes.push(note);
234
+ }
235
+ addAccelerator(accelerator) {
236
+ this.accelerators.push(accelerator);
237
+ }
238
+ addDeaccelerator(deaccelerator) {
239
+ this.deaccelerators.push(deaccelerator);
240
+ }
241
+ setAnnotationsBox(x, y) {
242
+ this.annotationsBox = { x, y };
243
+ }
244
+ setAxes(partial) {
245
+ this.axes = {
246
+ ...this.axes,
247
+ ...partial
248
+ };
249
+ }
250
+ setSize(width, height) {
251
+ this.size = { width, height };
252
+ }
253
+ getNode(id) {
254
+ return this.nodes.get(id);
255
+ }
256
+ build() {
257
+ const nodes = [];
258
+ for (const node of this.nodes.values()) {
259
+ if (typeof node.x !== "number" || typeof node.y !== "number") {
260
+ throw new Error(`Node "${node.label}" is missing coordinates`);
261
+ }
262
+ nodes.push(node);
263
+ }
264
+ return {
265
+ nodes,
266
+ links: [...this.links],
267
+ trends: [...this.trends.values()],
268
+ pipelines: [...this.pipelines.values()],
269
+ annotations: [...this.annotations],
270
+ notes: [...this.notes],
271
+ accelerators: [...this.accelerators],
272
+ deaccelerators: [...this.deaccelerators],
273
+ annotationsBox: this.annotationsBox,
274
+ axes: { ...this.axes },
275
+ size: this.size
276
+ };
277
+ }
278
+ clear() {
279
+ this.nodes.clear();
280
+ this.links = [];
281
+ this.trends.clear();
282
+ this.pipelines.clear();
283
+ this.annotations = [];
284
+ this.notes = [];
285
+ this.accelerators = [];
286
+ this.deaccelerators = [];
287
+ this.annotationsBox = void 0;
288
+ this.axes = {};
289
+ this.size = void 0;
290
+ }
291
+ };
292
+ var builder = new WardleyBuilder();
293
+ function textSanitizer(text) {
294
+ const config = getConfig2$1();
295
+ return sanitizeText(text.trim(), config);
296
+ }
297
+ __name(textSanitizer, "textSanitizer");
298
+ function getConfig2() {
299
+ return getConfig2$1()["wardley-beta"];
300
+ }
301
+ __name(getConfig2, "getConfig");
302
+ function addNode(id, label, x, y, className, labelOffsetX, labelOffsetY, inertia, sourceStrategy) {
303
+ builder.addNode({
304
+ id,
305
+ label: textSanitizer(label),
306
+ x,
307
+ y,
308
+ className,
309
+ labelOffsetX,
310
+ labelOffsetY,
311
+ inertia,
312
+ sourceStrategy
313
+ });
314
+ }
315
+ __name(addNode, "addNode");
316
+ function addLink(sourceId, targetId, dashed = false, label, flow) {
317
+ builder.addLink({ source: sourceId, target: targetId, dashed, label, flow });
318
+ }
319
+ __name(addLink, "addLink");
320
+ function addTrend(nodeId, targetX, targetY) {
321
+ builder.addTrend({ nodeId, targetX, targetY });
322
+ }
323
+ __name(addTrend, "addTrend");
324
+ function addAnnotation(number, coordinates, text) {
325
+ builder.addAnnotation({
326
+ number,
327
+ coordinates,
328
+ text: text ? textSanitizer(text) : void 0
329
+ });
330
+ }
331
+ __name(addAnnotation, "addAnnotation");
332
+ function addNote(text, x, y) {
333
+ builder.addNote({
334
+ text: textSanitizer(text),
335
+ x,
336
+ y
337
+ });
338
+ }
339
+ __name(addNote, "addNote");
340
+ function addAccelerator(name, x, y) {
341
+ builder.addAccelerator({
342
+ name: textSanitizer(name),
343
+ x,
344
+ y
345
+ });
346
+ }
347
+ __name(addAccelerator, "addAccelerator");
348
+ function addDeaccelerator(name, x, y) {
349
+ builder.addDeaccelerator({
350
+ name: textSanitizer(name),
351
+ x,
352
+ y
353
+ });
354
+ }
355
+ __name(addDeaccelerator, "addDeaccelerator");
356
+ function setAnnotationsBox(x, y) {
357
+ builder.setAnnotationsBox(x, y);
358
+ }
359
+ __name(setAnnotationsBox, "setAnnotationsBox");
360
+ function setSize(width, height) {
361
+ builder.setSize(width, height);
362
+ }
363
+ __name(setSize, "setSize");
364
+ function startPipeline(nodeId) {
365
+ builder.startPipeline(nodeId);
366
+ }
367
+ __name(startPipeline, "startPipeline");
368
+ function addPipelineComponent(pipelineNodeId, componentId) {
369
+ builder.addPipelineComponent(pipelineNodeId, componentId);
370
+ }
371
+ __name(addPipelineComponent, "addPipelineComponent");
372
+ function updateAxes(partial) {
373
+ const sanitized = {};
374
+ if (partial.xLabel) {
375
+ sanitized.xLabel = textSanitizer(partial.xLabel);
376
+ }
377
+ if (partial.yLabel) {
378
+ sanitized.yLabel = textSanitizer(partial.yLabel);
379
+ }
380
+ if (partial.stages) {
381
+ sanitized.stages = partial.stages.map((stage) => textSanitizer(stage));
382
+ }
383
+ if (partial.stageBoundaries) {
384
+ sanitized.stageBoundaries = partial.stageBoundaries;
385
+ }
386
+ builder.setAxes(sanitized);
387
+ }
388
+ __name(updateAxes, "updateAxes");
389
+ function getNode(id) {
390
+ return builder.getNode(id);
391
+ }
392
+ __name(getNode, "getNode");
393
+ function getWardleyData() {
394
+ return builder.build();
395
+ }
396
+ __name(getWardleyData, "getWardleyData");
397
+ function clear2() {
398
+ builder.clear();
399
+ clear();
400
+ }
401
+ __name(clear2, "clear");
402
+ var wardleyDb_default = {
403
+ getConfig: getConfig2,
404
+ addNode,
405
+ addLink,
406
+ addTrend,
407
+ addAnnotation,
408
+ addNote,
409
+ addAccelerator,
410
+ addDeaccelerator,
411
+ setAnnotationsBox,
412
+ setSize,
413
+ startPipeline,
414
+ addPipelineComponent,
415
+ updateAxes,
416
+ getNode,
417
+ getWardleyData,
418
+ clear: clear2,
419
+ setAccTitle,
420
+ getAccTitle,
421
+ setDiagramTitle,
422
+ getDiagramTitle,
423
+ getAccDescription,
424
+ setAccDescription
425
+ };
426
+ var DEFAULT_STAGES = ["Genesis", "Custom Built", "Product", "Commodity"];
427
+ var getTheme = /* @__PURE__ */ __name(() => {
428
+ const { themeVariables } = getConfig2$1();
429
+ return {
430
+ backgroundColor: themeVariables.wardley?.backgroundColor ?? themeVariables.background ?? "#fff",
431
+ axisColor: themeVariables.wardley?.axisColor ?? "#000",
432
+ axisTextColor: themeVariables.wardley?.axisTextColor ?? themeVariables.primaryTextColor ?? "#222",
433
+ gridColor: themeVariables.wardley?.gridColor ?? "rgba(100, 100, 100, 0.2)",
434
+ componentFill: themeVariables.wardley?.componentFill ?? "#fff",
435
+ componentStroke: themeVariables.wardley?.componentStroke ?? "#000",
436
+ componentLabelColor: themeVariables.wardley?.componentLabelColor ?? themeVariables.primaryTextColor ?? "#222",
437
+ linkStroke: themeVariables.wardley?.linkStroke ?? "#000",
438
+ evolutionStroke: themeVariables.wardley?.evolutionStroke ?? "#dc3545",
439
+ annotationStroke: themeVariables.wardley?.annotationStroke ?? "#000",
440
+ annotationTextColor: themeVariables.wardley?.annotationTextColor ?? themeVariables.primaryTextColor ?? "#222",
441
+ annotationFill: themeVariables.wardley?.annotationFill ?? themeVariables.background ?? "#fff"
442
+ };
443
+ }, "getTheme");
444
+ var getConfigValues = /* @__PURE__ */ __name(() => {
445
+ const wardleyConfig = getConfig2$1()["wardley-beta"];
446
+ return {
447
+ width: wardleyConfig?.width ?? 900,
448
+ height: wardleyConfig?.height ?? 600,
449
+ padding: wardleyConfig?.padding ?? 48,
450
+ nodeRadius: wardleyConfig?.nodeRadius ?? 6,
451
+ nodeLabelOffset: wardleyConfig?.nodeLabelOffset ?? 8,
452
+ axisFontSize: wardleyConfig?.axisFontSize ?? 12,
453
+ labelFontSize: wardleyConfig?.labelFontSize ?? 10,
454
+ showGrid: wardleyConfig?.showGrid ?? false,
455
+ useMaxWidth: wardleyConfig?.useMaxWidth ?? true
456
+ };
457
+ }, "getConfigValues");
458
+ var draw = /* @__PURE__ */ __name((text, id, _version, diagObj) => {
459
+ log.debug("Rendering Wardley map\n" + text);
460
+ const configValues = getConfigValues();
461
+ const theme = getTheme();
462
+ const squareSize = configValues.nodeRadius * 1.6;
463
+ const db = diagObj.db;
464
+ const data = db.getWardleyData();
465
+ const title = db.getDiagramTitle();
466
+ const width = data.size?.width ?? configValues.width;
467
+ const height = data.size?.height ?? configValues.height;
468
+ const svg = selectSvgElement(id);
469
+ svg.selectAll("*").remove();
470
+ configureSvgSize(svg, height, width, configValues.useMaxWidth);
471
+ svg.attr("viewBox", `0 0 ${width} ${height}`);
472
+ const root = svg.append("g").attr("class", "wardley-map");
473
+ const defs = svg.append("defs");
474
+ defs.append("marker").attr("id", `arrow-${id}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 6).attr("markerHeight", 6).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", theme.evolutionStroke).attr("stroke", "none");
475
+ defs.append("marker").attr("id", `link-arrow-end-${id}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", theme.linkStroke).attr("stroke", "none");
476
+ defs.append("marker").attr("id", `link-arrow-start-${id}`).attr("viewBox", "0 0 10 10").attr("refX", 1).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z").attr("fill", theme.linkStroke).attr("stroke", "none");
477
+ root.append("rect").attr("class", "wardley-background").attr("width", width).attr("height", height).attr("fill", theme.backgroundColor);
478
+ const chartWidth = width - configValues.padding * 2;
479
+ const chartHeight = height - configValues.padding * 2;
480
+ if (title) {
481
+ root.append("text").attr("class", "wardley-title").attr("x", width / 2).attr("y", configValues.padding / 2).attr("fill", theme.axisTextColor).attr("font-size", configValues.axisFontSize * 1.05).attr("font-weight", "bold").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(title);
482
+ }
483
+ const projectX = /* @__PURE__ */ __name((value) => configValues.padding + value / 100 * chartWidth, "projectX");
484
+ const projectY = /* @__PURE__ */ __name((value) => height - configValues.padding - value / 100 * chartHeight, "projectY");
485
+ const axisGroup = root.append("g").attr("class", "wardley-axes");
486
+ axisGroup.append("line").attr("x1", configValues.padding).attr("x2", width - configValues.padding).attr("y1", height - configValues.padding).attr("y2", height - configValues.padding).attr("stroke", theme.axisColor).attr("stroke-width", 1);
487
+ axisGroup.append("line").attr("x1", configValues.padding).attr("x2", configValues.padding).attr("y1", configValues.padding).attr("y2", height - configValues.padding).attr("stroke", theme.axisColor).attr("stroke-width", 1);
488
+ const xLabel = data.axes.xLabel ?? "Evolution";
489
+ const yLabel = data.axes.yLabel ?? "Visibility";
490
+ axisGroup.append("text").attr("class", "wardley-axis-label wardley-axis-label-x").attr("x", configValues.padding + chartWidth / 2).attr("y", height - configValues.padding / 4).attr("fill", theme.axisTextColor).attr("font-size", configValues.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").text(xLabel);
491
+ axisGroup.append("text").attr("class", "wardley-axis-label wardley-axis-label-y").attr("x", configValues.padding / 3).attr("y", configValues.padding + chartHeight / 2).attr("fill", theme.axisTextColor).attr("font-size", configValues.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").attr(
492
+ "transform",
493
+ `rotate(-90 ${configValues.padding / 3} ${configValues.padding + chartHeight / 2})`
494
+ ).text(yLabel);
495
+ const stages = data.axes.stages && data.axes.stages.length > 0 ? data.axes.stages : DEFAULT_STAGES;
496
+ if (stages.length > 0) {
497
+ const stageGroup = root.append("g").attr("class", "wardley-stages");
498
+ const boundaries = data.axes.stageBoundaries;
499
+ const stagePositions = [];
500
+ if (boundaries && boundaries.length === stages.length) {
501
+ let prevBoundary = 0;
502
+ boundaries.forEach((boundary) => {
503
+ stagePositions.push({ start: prevBoundary, end: boundary });
504
+ prevBoundary = boundary;
505
+ });
506
+ } else {
507
+ const stageWidth = 1 / stages.length;
508
+ stages.forEach((_, index) => {
509
+ stagePositions.push({
510
+ start: index * stageWidth,
511
+ end: (index + 1) * stageWidth
512
+ });
513
+ });
514
+ }
515
+ stages.forEach((stage, index) => {
516
+ const pos = stagePositions[index];
517
+ const startX = configValues.padding + pos.start * chartWidth;
518
+ const endX = configValues.padding + pos.end * chartWidth;
519
+ const centerX = (startX + endX) / 2;
520
+ if (index > 0) {
521
+ stageGroup.append("line").attr("x1", startX).attr("x2", startX).attr("y1", configValues.padding).attr("y2", height - configValues.padding).attr("stroke", "#000").attr("stroke-width", 1).attr("stroke-dasharray", "5 5").attr("opacity", 0.8);
522
+ }
523
+ stageGroup.append("text").attr("class", "wardley-stage-label").attr("x", centerX).attr("y", height - configValues.padding / 1.5).attr("fill", theme.axisTextColor).attr("font-size", configValues.axisFontSize - 2).attr("text-anchor", "middle").text(stage);
524
+ });
525
+ }
526
+ if (configValues.showGrid) {
527
+ const gridGroup = root.append("g").attr("class", "wardley-grid");
528
+ for (let i = 1; i < 4; i++) {
529
+ const ratio = i / 4;
530
+ const x = configValues.padding + chartWidth * ratio;
531
+ gridGroup.append("line").attr("x1", x).attr("x2", x).attr("y1", configValues.padding).attr("y2", height - configValues.padding).attr("stroke", theme.gridColor).attr("stroke-dasharray", "2 6");
532
+ gridGroup.append("line").attr("x1", configValues.padding).attr("x2", width - configValues.padding).attr("y1", height - configValues.padding - chartHeight * ratio).attr("y2", height - configValues.padding - chartHeight * ratio).attr("stroke", theme.gridColor).attr("stroke-dasharray", "2 6");
533
+ }
534
+ }
535
+ const positions = /* @__PURE__ */ new Map();
536
+ data.nodes.forEach((node) => {
537
+ positions.set(node.id, {
538
+ x: projectX(node.x),
539
+ y: projectY(node.y),
540
+ node
541
+ });
542
+ });
543
+ if (data.pipelines.length > 0) {
544
+ const pipelineGroup = root.append("g").attr("class", "wardley-pipelines");
545
+ const pipelineLinksGroup = root.append("g").attr("class", "wardley-pipeline-links");
546
+ data.pipelines.forEach((pipeline) => {
547
+ if (pipeline.componentIds.length === 0) {
548
+ return;
549
+ }
550
+ const sortedComponents = pipeline.componentIds.map((id2) => ({ id: id2, pos: positions.get(id2), node: data.nodes.find((n) => n.id === id2) })).filter((c) => c.pos && c.node).sort((a, b) => a.node.x - b.node.x);
551
+ for (let i = 0; i < sortedComponents.length - 1; i++) {
552
+ const current = sortedComponents[i];
553
+ const next = sortedComponents[i + 1];
554
+ pipelineLinksGroup.append("line").attr("class", "wardley-pipeline-evolution-link").attr("x1", current.pos.x).attr("y1", current.pos.y).attr("x2", next.pos.x).attr("y2", next.pos.y).attr("stroke", theme.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4");
555
+ }
556
+ let minX = Infinity;
557
+ let maxX = -Infinity;
558
+ let y = 0;
559
+ pipeline.componentIds.forEach((componentId) => {
560
+ const pos = positions.get(componentId);
561
+ if (pos) {
562
+ minX = Math.min(minX, pos.x);
563
+ maxX = Math.max(maxX, pos.x);
564
+ y = pos.y;
565
+ }
566
+ });
567
+ if (minX !== Infinity && maxX !== -Infinity) {
568
+ const padding = 15;
569
+ const height2 = configValues.nodeRadius * 4;
570
+ const boxTop = y - height2 / 2;
571
+ const parentPos = positions.get(pipeline.nodeId);
572
+ if (parentPos) {
573
+ const centerX = (minX + maxX) / 2;
574
+ parentPos.x = centerX;
575
+ parentPos.y = boxTop - squareSize / 6;
576
+ }
577
+ pipelineGroup.append("rect").attr("class", "wardley-pipeline-box").attr("x", minX - padding).attr("y", boxTop).attr("width", maxX - minX + padding * 2).attr("height", height2).attr("fill", "none").attr("stroke", theme.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
578
+ }
579
+ });
580
+ }
581
+ const linksGroup = root.append("g").attr("class", "wardley-links");
582
+ const pipelineMap = /* @__PURE__ */ new Map();
583
+ data.pipelines.forEach((pipeline) => {
584
+ pipelineMap.set(pipeline.nodeId, new Set(pipeline.componentIds));
585
+ });
586
+ const validLinks = data.links.filter((link) => {
587
+ if (!positions.has(link.source) || !positions.has(link.target)) {
588
+ return false;
589
+ }
590
+ const pipelineComponents = pipelineMap.get(link.target);
591
+ if (pipelineComponents?.has(link.source)) {
592
+ return false;
593
+ }
594
+ return true;
595
+ });
596
+ linksGroup.selectAll("line").data(validLinks).enter().append("line").attr("class", (link) => `wardley-link${link.dashed ? " wardley-link--dashed" : ""}`).attr("x1", (link) => {
597
+ const sourcePos = positions.get(link.source);
598
+ const targetPos = positions.get(link.target);
599
+ const sourceNode = data.nodes.find((n) => n.id === link.source);
600
+ const radius = sourceNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;
601
+ const dx = targetPos.x - sourcePos.x;
602
+ const dy = targetPos.y - sourcePos.y;
603
+ const distance = Math.sqrt(dx * dx + dy * dy);
604
+ return sourcePos.x + dx / distance * radius;
605
+ }).attr("y1", (link) => {
606
+ const sourcePos = positions.get(link.source);
607
+ const targetPos = positions.get(link.target);
608
+ const sourceNode = data.nodes.find((n) => n.id === link.source);
609
+ const radius = sourceNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;
610
+ const dx = targetPos.x - sourcePos.x;
611
+ const dy = targetPos.y - sourcePos.y;
612
+ const distance = Math.sqrt(dx * dx + dy * dy);
613
+ return sourcePos.y + dy / distance * radius;
614
+ }).attr("x2", (link) => {
615
+ const sourcePos = positions.get(link.source);
616
+ const targetPos = positions.get(link.target);
617
+ const targetNode = data.nodes.find((n) => n.id === link.target);
618
+ const radius = targetNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;
619
+ const dx = sourcePos.x - targetPos.x;
620
+ const dy = sourcePos.y - targetPos.y;
621
+ const distance = Math.sqrt(dx * dx + dy * dy);
622
+ return targetPos.x + dx / distance * radius;
623
+ }).attr("y2", (link) => {
624
+ const sourcePos = positions.get(link.source);
625
+ const targetPos = positions.get(link.target);
626
+ const targetNode = data.nodes.find((n) => n.id === link.target);
627
+ const radius = targetNode.isPipelineParent ? squareSize / Math.sqrt(2) : configValues.nodeRadius;
628
+ const dx = sourcePos.x - targetPos.x;
629
+ const dy = sourcePos.y - targetPos.y;
630
+ const distance = Math.sqrt(dx * dx + dy * dy);
631
+ return targetPos.y + dy / distance * radius;
632
+ }).attr("stroke", theme.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", (link) => link.dashed ? "6 6" : null).attr("marker-end", (link) => {
633
+ if (link.flow === "forward" || link.flow === "bidirectional") {
634
+ return `url(#link-arrow-end-${id})`;
635
+ }
636
+ return null;
637
+ }).attr("marker-start", (link) => {
638
+ if (link.flow === "backward" || link.flow === "bidirectional") {
639
+ return `url(#link-arrow-start-${id})`;
640
+ }
641
+ return null;
642
+ });
643
+ linksGroup.selectAll("text").data(validLinks.filter((link) => link.label)).enter().append("text").attr("class", "wardley-link-label").attr("x", (link) => {
644
+ const sourcePos = positions.get(link.source);
645
+ const targetPos = positions.get(link.target);
646
+ const midX = (sourcePos.x + targetPos.x) / 2;
647
+ const dy = targetPos.y - sourcePos.y;
648
+ const dx = targetPos.x - sourcePos.x;
649
+ const distance = Math.sqrt(dx * dx + dy * dy);
650
+ const offset = 8;
651
+ const perpX = dy / distance;
652
+ return midX + perpX * offset;
653
+ }).attr("y", (link) => {
654
+ const sourcePos = positions.get(link.source);
655
+ const targetPos = positions.get(link.target);
656
+ const midY = (sourcePos.y + targetPos.y) / 2;
657
+ const dx = targetPos.x - sourcePos.x;
658
+ const dy = targetPos.y - sourcePos.y;
659
+ const distance = Math.sqrt(dx * dx + dy * dy);
660
+ const offset = 8;
661
+ const perpY = -dx / distance;
662
+ return midY + perpY * offset;
663
+ }).attr("fill", theme.axisTextColor).attr("font-size", configValues.labelFontSize).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("transform", (link) => {
664
+ const sourcePos = positions.get(link.source);
665
+ const targetPos = positions.get(link.target);
666
+ const midX = (sourcePos.x + targetPos.x) / 2;
667
+ const midY = (sourcePos.y + targetPos.y) / 2;
668
+ const dx = targetPos.x - sourcePos.x;
669
+ const dy = targetPos.y - sourcePos.y;
670
+ const distance = Math.sqrt(dx * dx + dy * dy);
671
+ const offset = 8;
672
+ const perpX = dy / distance;
673
+ const perpY = -dx / distance;
674
+ const labelX = midX + perpX * offset;
675
+ const labelY = midY + perpY * offset;
676
+ let angle = Math.atan2(dy, dx) * 180 / Math.PI;
677
+ if (angle > 90 || angle < -90) {
678
+ angle += 180;
679
+ }
680
+ return `rotate(${angle} ${labelX} ${labelY})`;
681
+ }).text((link) => link.label);
682
+ const trendGroup = root.append("g").attr("class", "wardley-trends");
683
+ const trendsWithPositions = data.trends.map((trend) => {
684
+ const origin = positions.get(trend.nodeId);
685
+ if (!origin) {
686
+ return null;
687
+ }
688
+ const targetX = projectX(trend.targetX);
689
+ const targetY = projectY(trend.targetY);
690
+ const dx = targetX - origin.x;
691
+ const dy = targetY - origin.y;
692
+ const distance = Math.sqrt(dx * dx + dy * dy);
693
+ const shortenBy = configValues.nodeRadius + 2;
694
+ const adjustedX2 = distance > shortenBy ? targetX - dx / distance * shortenBy : targetX;
695
+ const adjustedY2 = distance > shortenBy ? targetY - dy / distance * shortenBy : targetY;
696
+ return {
697
+ origin,
698
+ targetX,
699
+ targetY,
700
+ adjustedX2,
701
+ adjustedY2
702
+ };
703
+ }).filter((trend) => trend !== null);
704
+ trendGroup.selectAll("line").data(trendsWithPositions).enter().append("line").attr("class", "wardley-trend").attr("x1", (trend) => trend.origin.x).attr("y1", (trend) => trend.origin.y).attr("x2", (trend) => trend.adjustedX2).attr("y2", (trend) => trend.adjustedY2).attr("stroke", theme.evolutionStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4").attr("marker-end", `url(#arrow-${id})`);
705
+ const nodesGroup = root.append("g").attr("class", "wardley-nodes");
706
+ const nodeEnter = nodesGroup.selectAll("g").data(data.nodes).enter().append("g").attr(
707
+ "class",
708
+ (node) => ["wardley-node", node.className ? `wardley-node--${node.className}` : ""].filter(Boolean).join(" ")
709
+ );
710
+ nodeEnter.filter((node) => node.sourceStrategy === "outsource").append("circle").attr("class", "wardley-outsource-overlay").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y).attr("r", configValues.nodeRadius * 2).attr("fill", "#666").attr("stroke", theme.componentStroke).attr("stroke-width", 1);
711
+ nodeEnter.filter((node) => node.sourceStrategy === "buy").append("circle").attr("class", "wardley-buy-overlay").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y).attr("r", configValues.nodeRadius * 2).attr("fill", "#ccc").attr("stroke", theme.componentStroke).attr("stroke-width", 1);
712
+ nodeEnter.filter((node) => node.sourceStrategy === "build").append("circle").attr("class", "wardley-build-overlay").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y).attr("r", configValues.nodeRadius * 2).attr("fill", "#eee").attr("stroke", "#000").attr("stroke-width", 1);
713
+ const marketNodes = nodeEnter.filter((node) => node.sourceStrategy === "market");
714
+ marketNodes.append("circle").attr("class", "wardley-market-overlay").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y).attr("r", configValues.nodeRadius * 2).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 1);
715
+ nodeEnter.filter(
716
+ (node) => !node.isPipelineParent && node.sourceStrategy !== "market" && node.className !== "anchor"
717
+ ).append("circle").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y).attr("r", configValues.nodeRadius).attr("fill", theme.componentFill).attr("stroke", theme.componentStroke).attr("stroke-width", 1);
718
+ const smallCircleRadius = configValues.nodeRadius * 0.7;
719
+ const triangleRadius = configValues.nodeRadius * 1.2;
720
+ marketNodes.append("line").attr("class", "wardley-market-line").attr("x1", (node) => positions.get(node.id).x).attr("y1", (node) => positions.get(node.id).y - triangleRadius).attr("x2", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr("y2", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("stroke", theme.componentStroke).attr("stroke-width", 1);
721
+ marketNodes.append("line").attr("class", "wardley-market-line").attr("x1", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr("y1", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("x2", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr("y2", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("stroke", theme.componentStroke).attr("stroke-width", 1);
722
+ marketNodes.append("line").attr("class", "wardley-market-line").attr("x1", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr("y1", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("x2", (node) => positions.get(node.id).x).attr("y2", (node) => positions.get(node.id).y - triangleRadius).attr("stroke", theme.componentStroke).attr("stroke-width", 1);
723
+ marketNodes.append("circle").attr("class", "wardley-market-dot").attr("cx", (node) => positions.get(node.id).x).attr("cy", (node) => positions.get(node.id).y - triangleRadius).attr("r", smallCircleRadius).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 2);
724
+ marketNodes.append("circle").attr("class", "wardley-market-dot").attr("cx", (node) => positions.get(node.id).x - triangleRadius * Math.cos(Math.PI / 6)).attr("cy", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("r", smallCircleRadius).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 2);
725
+ marketNodes.append("circle").attr("class", "wardley-market-dot").attr("cx", (node) => positions.get(node.id).x + triangleRadius * Math.cos(Math.PI / 6)).attr("cy", (node) => positions.get(node.id).y + triangleRadius * Math.sin(Math.PI / 6)).attr("r", smallCircleRadius).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 2);
726
+ nodeEnter.filter((node) => node.isPipelineParent === true).append("rect").attr("x", (node) => positions.get(node.id).x - squareSize / 2).attr("y", (node) => positions.get(node.id).y - squareSize / 2).attr("width", squareSize).attr("height", squareSize).attr("fill", theme.componentFill).attr("stroke", theme.componentStroke).attr("stroke-width", 1);
727
+ nodeEnter.filter((node) => node.inertia === true).append("line").attr("class", "wardley-inertia").attr("x1", (node) => {
728
+ const pos = positions.get(node.id);
729
+ let offset = node.isPipelineParent ? squareSize / 2 + 15 : configValues.nodeRadius + 15;
730
+ if (node.sourceStrategy) {
731
+ offset += configValues.nodeRadius + 10;
732
+ }
733
+ return pos.x + offset;
734
+ }).attr("y1", (node) => {
735
+ const pos = positions.get(node.id);
736
+ const lineHeight = node.isPipelineParent ? squareSize : configValues.nodeRadius * 2;
737
+ return pos.y - lineHeight / 2;
738
+ }).attr("x2", (node) => {
739
+ const pos = positions.get(node.id);
740
+ let offset = node.isPipelineParent ? squareSize / 2 + 15 : configValues.nodeRadius + 15;
741
+ if (node.sourceStrategy) {
742
+ offset += configValues.nodeRadius + 10;
743
+ }
744
+ return pos.x + offset;
745
+ }).attr("y2", (node) => {
746
+ const pos = positions.get(node.id);
747
+ const lineHeight = node.isPipelineParent ? squareSize : configValues.nodeRadius * 2;
748
+ return pos.y + lineHeight / 2;
749
+ }).attr("stroke", theme.componentStroke).attr("stroke-width", 6);
750
+ nodeEnter.append("text").attr("x", (node) => {
751
+ const pos = positions.get(node.id);
752
+ if (node.className === "anchor") {
753
+ return node.labelOffsetX !== void 0 ? pos.x + node.labelOffsetX : pos.x;
754
+ }
755
+ let defaultOffset = configValues.nodeLabelOffset;
756
+ if (node.sourceStrategy && node.labelOffsetX === void 0) {
757
+ defaultOffset += 10;
758
+ }
759
+ const customOffset = node.labelOffsetX ?? defaultOffset;
760
+ return pos.x + customOffset;
761
+ }).attr("y", (node) => {
762
+ const pos = positions.get(node.id);
763
+ if (node.className === "anchor") {
764
+ return node.labelOffsetY !== void 0 ? pos.y + node.labelOffsetY : pos.y - 3;
765
+ }
766
+ let defaultOffset = -configValues.nodeLabelOffset;
767
+ if (node.sourceStrategy && node.labelOffsetY === void 0) {
768
+ defaultOffset -= 10;
769
+ }
770
+ const customOffset = node.labelOffsetY ?? defaultOffset;
771
+ return pos.y + customOffset;
772
+ }).attr("class", "wardley-node-label").attr("fill", (node) => {
773
+ if (node.className === "evolved") {
774
+ return theme.evolutionStroke;
775
+ }
776
+ if (node.className === "anchor") {
777
+ return "#000";
778
+ }
779
+ return theme.componentLabelColor;
780
+ }).attr("font-size", configValues.labelFontSize).attr("font-weight", (node) => node.className === "anchor" ? "bold" : "normal").attr("text-anchor", (node) => node.className === "anchor" ? "middle" : "start").attr("dominant-baseline", (node) => node.className === "anchor" ? "middle" : "auto").text((node) => node.label);
781
+ if (data.annotations.length > 0) {
782
+ const annotationsGroup = root.append("g").attr("class", "wardley-annotations");
783
+ data.annotations.forEach((annotation) => {
784
+ const projectedCoords = annotation.coordinates.map((coord) => ({
785
+ x: projectX(coord.x),
786
+ y: projectY(coord.y)
787
+ }));
788
+ if (projectedCoords.length > 1) {
789
+ for (let i = 0; i < projectedCoords.length - 1; i++) {
790
+ annotationsGroup.append("line").attr("class", "wardley-annotation-line").attr("x1", projectedCoords[i].x).attr("y1", projectedCoords[i].y).attr("x2", projectedCoords[i + 1].x).attr("y2", projectedCoords[i + 1].y).attr("stroke", theme.axisColor).attr("stroke-width", 1.5).attr("stroke-dasharray", "4 4");
791
+ }
792
+ }
793
+ projectedCoords.forEach((coord) => {
794
+ const annotationNode = annotationsGroup.append("g").attr("class", "wardley-annotation");
795
+ annotationNode.append("circle").attr("cx", coord.x).attr("cy", coord.y).attr("r", 10).attr("fill", "white").attr("stroke", theme.axisColor).attr("stroke-width", 1.5);
796
+ annotationNode.append("text").attr("x", coord.x).attr("y", coord.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", 10).attr("fill", theme.axisTextColor).attr("font-weight", "bold").text(annotation.number);
797
+ });
798
+ });
799
+ if (data.annotationsBox) {
800
+ let boxX = projectX(data.annotationsBox.x);
801
+ let boxY = projectY(data.annotationsBox.y);
802
+ const padding = 10;
803
+ const lineHeight = 16;
804
+ const fontSize = 11;
805
+ const textBoxGroup = annotationsGroup.append("g").attr("class", "wardley-annotations-box");
806
+ const sortedAnnotations = [...data.annotations].filter((a) => a.text).sort((a, b) => a.number - b.number);
807
+ const textElements = [];
808
+ sortedAnnotations.forEach((annotation, idx) => {
809
+ const text2 = textBoxGroup.append("text").attr("x", boxX + padding).attr("y", boxY + padding + (idx + 1) * lineHeight).attr("font-size", fontSize).attr("fill", theme.axisTextColor).attr("text-anchor", "start").attr("dominant-baseline", "middle").text(`${annotation.number}. ${annotation.text}`);
810
+ textElements.push(text2);
811
+ });
812
+ if (textElements.length > 0) {
813
+ let maxWidth = 0;
814
+ let maxHeight = 0;
815
+ textElements.forEach((text2) => {
816
+ const textNode = text2.node();
817
+ const textWidth = textNode.getComputedTextLength();
818
+ maxWidth = Math.max(maxWidth, textWidth);
819
+ const bbox = textNode.getBBox();
820
+ maxHeight = Math.max(maxHeight, bbox.height);
821
+ });
822
+ const boxWidth = maxWidth + padding * 2 + 105;
823
+ const boxHeight = sortedAnnotations.length * lineHeight + padding * 2 + maxHeight / 2;
824
+ const minX = configValues.padding;
825
+ const maxX = width - configValues.padding - boxWidth;
826
+ const minY = configValues.padding;
827
+ const maxY = height - configValues.padding - boxHeight;
828
+ boxX = Math.max(minX, Math.min(boxX, maxX));
829
+ boxY = Math.max(minY, Math.min(boxY, maxY));
830
+ textElements.forEach((text2, idx) => {
831
+ text2.attr("x", boxX + padding).attr("y", boxY + padding + (idx + 1) * lineHeight);
832
+ });
833
+ textBoxGroup.insert("rect", "text").attr("x", boxX).attr("y", boxY).attr("width", boxWidth).attr("height", boxHeight).attr("fill", "white").attr("stroke", theme.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
834
+ }
835
+ }
836
+ }
837
+ if (data.notes.length > 0) {
838
+ const notesGroup = root.append("g").attr("class", "wardley-notes");
839
+ data.notes.forEach((note) => {
840
+ const noteX = projectX(note.x);
841
+ const noteY = projectY(note.y);
842
+ notesGroup.append("text").attr("x", noteX).attr("y", noteY).attr("text-anchor", "start").attr("font-size", 11).attr("fill", theme.axisTextColor).attr("font-weight", "bold").text(note.text);
843
+ });
844
+ }
845
+ if (data.accelerators.length > 0) {
846
+ const acceleratorsGroup = root.append("g").attr("class", "wardley-accelerators");
847
+ data.accelerators.forEach((accelerator) => {
848
+ const accX = projectX(accelerator.x);
849
+ const accY = projectY(accelerator.y);
850
+ const arrowWidth = 60;
851
+ const arrowHeight = 30;
852
+ const arrowHeadWidth = 20;
853
+ const arrowPath = `
854
+ M ${accX} ${accY - arrowHeight / 2}
855
+ L ${accX + arrowWidth - arrowHeadWidth} ${accY - arrowHeight / 2}
856
+ L ${accX + arrowWidth - arrowHeadWidth} ${accY - arrowHeight / 2 - 8}
857
+ L ${accX + arrowWidth} ${accY}
858
+ L ${accX + arrowWidth - arrowHeadWidth} ${accY + arrowHeight / 2 + 8}
859
+ L ${accX + arrowWidth - arrowHeadWidth} ${accY + arrowHeight / 2}
860
+ L ${accX} ${accY + arrowHeight / 2}
861
+ Z
862
+ `;
863
+ acceleratorsGroup.append("path").attr("d", arrowPath).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 1);
864
+ acceleratorsGroup.append("text").attr("x", accX + arrowWidth / 2).attr("y", accY + arrowHeight / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", theme.axisTextColor).attr("font-weight", "bold").text(accelerator.name);
865
+ });
866
+ }
867
+ if (data.deaccelerators.length > 0) {
868
+ const deacceleratorsGroup = root.append("g").attr("class", "wardley-deaccelerators");
869
+ data.deaccelerators.forEach((deaccelerator) => {
870
+ const decX = projectX(deaccelerator.x);
871
+ const decY = projectY(deaccelerator.y);
872
+ const arrowWidth = 60;
873
+ const arrowHeight = 30;
874
+ const arrowHeadWidth = 20;
875
+ const arrowPath = `
876
+ M ${decX + arrowWidth} ${decY - arrowHeight / 2}
877
+ L ${decX + arrowHeadWidth} ${decY - arrowHeight / 2}
878
+ L ${decX + arrowHeadWidth} ${decY - arrowHeight / 2 - 8}
879
+ L ${decX} ${decY}
880
+ L ${decX + arrowHeadWidth} ${decY + arrowHeight / 2 + 8}
881
+ L ${decX + arrowHeadWidth} ${decY + arrowHeight / 2}
882
+ L ${decX + arrowWidth} ${decY + arrowHeight / 2}
883
+ Z
884
+ `;
885
+ deacceleratorsGroup.append("path").attr("d", arrowPath).attr("fill", "white").attr("stroke", theme.componentStroke).attr("stroke-width", 1);
886
+ deacceleratorsGroup.append("text").attr("x", decX + arrowWidth / 2).attr("y", decY + arrowHeight / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", theme.axisTextColor).attr("font-weight", "bold").text(deaccelerator.name);
887
+ });
888
+ }
889
+ }, "draw");
890
+ var wardleyRenderer_default = {
891
+ draw
892
+ };
893
+ var diagram = {
894
+ parser,
895
+ db: wardleyDb_default,
896
+ renderer: wardleyRenderer_default,
897
+ styles: /* @__PURE__ */ __name(() => "", "styles")
898
+ };
899
+ export {
900
+ diagram
901
+ };