@foris/ai-agent 0.9.1-beta.2 → 0.9.1-beta.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 (325) hide show
  1. package/dist/abap-Y8Dl9g_6.js +6 -0
  2. package/dist/actionscript-3-DZzbMeqX.js +6 -0
  3. package/dist/ada-vP6ak0IW.js +6 -0
  4. package/dist/ai-agent.es.js +14 -2779
  5. package/dist/ai-agent.umd.js +3213 -4
  6. package/dist/andromeeda-BIpZ7gaU.js +4 -0
  7. package/dist/angular-html-CHuhdNYa.js +32 -0
  8. package/dist/angular-ts-CkwnAxZa.js +32 -0
  9. package/dist/apache-BUjz-sD2.js +6 -0
  10. package/dist/apex-oLhhs58q.js +6 -0
  11. package/dist/apl-C8FRyJIY.js +24 -0
  12. package/dist/applescript-BPx7YFFu.js +6 -0
  13. package/dist/ara-Z2fSOxSw.js +6 -0
  14. package/dist/arc-BzRDGNYi.js +85 -0
  15. package/dist/architectureDiagram-VXUJARFQ-jlW87y1j.js +4682 -0
  16. package/dist/asciidoc-B-pCoB3G.js +6 -0
  17. package/dist/asm-BTWLY5ym.js +6 -0
  18. package/dist/astro-CAC4-sRr.js +25 -0
  19. package/dist/aurora-x-BwoVEUWZ.js +4 -0
  20. package/dist/awk-Fb0P9dkn.js +6 -0
  21. package/dist/ayu-dark-CxPZkpb2.js +4 -0
  22. package/dist/ballerina-oZK-YekG.js +6 -0
  23. package/dist/bat-0FvbqU9S.js +6 -0
  24. package/dist/beancount-DqJEb89h.js +6 -0
  25. package/dist/berry-DODBq_Ff.js +6 -0
  26. package/dist/bibtex-EULQRLY5.js +6 -0
  27. package/dist/bicep-BorU73w0.js +6 -0
  28. package/dist/blade-Bwl5-ENK.js +27 -0
  29. package/dist/blockDiagram-VD42YOAC-P4woNHAr.js +2415 -0
  30. package/dist/bsl-NkNNwerW.js +8 -0
  31. package/dist/c-eeMepfLm.js +6 -0
  32. package/dist/c4Diagram-YG6GDRKO-CB9WFLmJ.js +1593 -0
  33. package/dist/cadence-02UX7mW8.js +6 -0
  34. package/dist/cairo-Cp116741.js +18 -0
  35. package/dist/catppuccin-frappe-D3cH2rXe.js +4 -0
  36. package/dist/catppuccin-latte-C0LRGUW4.js +4 -0
  37. package/dist/catppuccin-macchiato-c5wQ11TT.js +4 -0
  38. package/dist/catppuccin-mocha-WMD6Qvya.js +4 -0
  39. package/dist/channel-B-TkD8Bv.js +5 -0
  40. package/dist/chunk-4BX2VUAB-DCjARiNr.js +9 -0
  41. package/dist/chunk-55IACEB6-DvmPHLo5.js +8 -0
  42. package/dist/chunk-B4BG7PRW-L08cVxNP.js +1377 -0
  43. package/dist/chunk-DI55MBZ5-zkyTO7pn.js +1383 -0
  44. package/dist/chunk-FMBD7UC4-BkpbM-uP.js +19 -0
  45. package/dist/chunk-QN33PNHL-DSFN3Uoh.js +20 -0
  46. package/dist/chunk-QZHKN3VN-CAgMv7Xo.js +15 -0
  47. package/dist/chunk-TZMSLE5B-B6GY_sBW.js +64 -0
  48. package/dist/clarity-PKm5CwqM.js +6 -0
  49. package/dist/classDiagram-2ON5EDUG-KqDAjO33.js +30 -0
  50. package/dist/classDiagram-v2-WZHVMYZB-KqDAjO33.js +30 -0
  51. package/dist/clojure-CXJfHrL3.js +6 -0
  52. package/dist/cmake-BJz8BOTU.js +6 -0
  53. package/dist/cobol-DNTp9HAy.js +20 -0
  54. package/dist/code-block-QI2IAROF-Culy9AKV.js +2042 -0
  55. package/dist/codeowners-Bt9yU6NX.js +6 -0
  56. package/dist/codeql-DHkodjjI.js +6 -0
  57. package/dist/coffee-BrprHIxF.js +18 -0
  58. package/dist/common-lisp-EVqT9Zhp.js +6 -0
  59. package/dist/coq-B0L9upzn.js +6 -0
  60. package/dist/cose-bilkent-S5V4N54A-DtppvcNV.js +2620 -0
  61. package/dist/cpp-CwJ5QP3s.js +29 -0
  62. package/dist/crystal-DWRgWI1Z.js +24 -0
  63. package/dist/csv-CmYOceLb.js +6 -0
  64. package/dist/cue-ZzumE7IT.js +6 -0
  65. package/dist/cypher-jpdmjtA6.js +6 -0
  66. package/dist/cytoscape.esm-ClN43hhW.js +18846 -0
  67. package/dist/d-CBagWSwH.js +6 -0
  68. package/dist/dagre-6UL2VRFP-BfvQz4N-.js +459 -0
  69. package/dist/dark-plus-pUHDTVV0.js +4 -0
  70. package/dist/dart-6ObCrKr9.js +6 -0
  71. package/dist/dax-CcDT-8dH.js +6 -0
  72. package/dist/defaultLocale-D1piDxzZ.js +177 -0
  73. package/dist/desktop-B93p9R9O.js +6 -0
  74. package/dist/diagram-PSM6KHXK-ka-cDwC2.js +552 -0
  75. package/dist/diagram-QEK2KX5R-BW-yTygZ.js +232 -0
  76. package/dist/diagram-S2PKOQOG-j24g_p7y.js +154 -0
  77. package/dist/diff-BxzP2J8R.js +6 -0
  78. package/dist/docker-CsHqm9tx.js +6 -0
  79. package/dist/dotenv-BMjVjUL1.js +6 -0
  80. package/dist/dracula-BtZx2Kac.js +4 -0
  81. package/dist/dracula-soft-BKa-aqBv.js +4 -0
  82. package/dist/dream-maker-PAx17jaB.js +6 -0
  83. package/dist/edge-B5_tHZZy.js +21 -0
  84. package/dist/elixir-Dj_1qPNg.js +18 -0
  85. package/dist/elm-DZPAA5Qn.js +9 -0
  86. package/dist/emacs-lisp-Cfxdx5D-.js +6 -0
  87. package/dist/erDiagram-Q2GNP2WA-BoiJgXhe.js +854 -0
  88. package/dist/erb-DiYOU0he.js +31 -0
  89. package/dist/erlang-CNRRyeIc.js +18 -0
  90. package/dist/everforest-dark-DMCBqXCK.js +4 -0
  91. package/dist/everforest-light-BbXl82Em.js +4 -0
  92. package/dist/fennel-N4WcXuKx.js +6 -0
  93. package/dist/fish-BTDEUgqH.js +6 -0
  94. package/dist/flowDiagram-NV44I4VS-BHGntIlE.js +1639 -0
  95. package/dist/fluent-BMXUxfv1.js +6 -0
  96. package/dist/fortran-fixed-form-DUsA-VGo.js +8 -0
  97. package/dist/fortran-free-form-DPIT_jbP.js +6 -0
  98. package/dist/fsharp-yevJ8DSS.js +18 -0
  99. package/dist/ganttDiagram-JELNMOA3-Ce8NwhCP.js +2710 -0
  100. package/dist/gdresource-BwtMIoBm.js +10 -0
  101. package/dist/gdscript-BifyeYhI.js +6 -0
  102. package/dist/gdshader-Bk8fF6yr.js +6 -0
  103. package/dist/genie-DzUvd7U9.js +6 -0
  104. package/dist/gherkin-DHRaV0YP.js +6 -0
  105. package/dist/git-commit-Bd32YZ0K.js +8 -0
  106. package/dist/git-rebase-BWMiWxYf.js +18 -0
  107. package/dist/gitGraphDiagram-NY62KEGX-DxoN7y5T.js +723 -0
  108. package/dist/github-dark-DenFmJkN.js +4 -0
  109. package/dist/github-dark-default-BJPUVz4H.js +4 -0
  110. package/dist/github-dark-dimmed-DUshB20C.js +4 -0
  111. package/dist/github-dark-high-contrast-D3aGCnF8.js +4 -0
  112. package/dist/github-light-JYsPkUQd.js +4 -0
  113. package/dist/github-light-default-D99KPAby.js +4 -0
  114. package/dist/github-light-high-contrast-BbmZE-Mp.js +4 -0
  115. package/dist/gleam-Bv284lvN.js +6 -0
  116. package/dist/glimmer-js-Nc7Kk_CN.js +21 -0
  117. package/dist/glimmer-ts-DLoneyA9.js +21 -0
  118. package/dist/glsl-CkUcVZNK.js +8 -0
  119. package/dist/gnuplot-yPG9-sE_.js +6 -0
  120. package/dist/graph-C-gpLwEq.js +1189 -0
  121. package/dist/graphql-CB9Yiq18.js +23 -0
  122. package/dist/groovy-CJQTphOW.js +6 -0
  123. package/dist/gruvbox-dark-hard-C5HOtKIh.js +4 -0
  124. package/dist/gruvbox-dark-medium-FVgwJHuz.js +4 -0
  125. package/dist/gruvbox-dark-soft-B46F314v.js +4 -0
  126. package/dist/gruvbox-light-hard-CJD38wDZ.js +4 -0
  127. package/dist/gruvbox-light-medium-BlIhMYTA.js +4 -0
  128. package/dist/gruvbox-light-soft-DoPHyLVZ.js +4 -0
  129. package/dist/hack-dNZDE7CK.js +19 -0
  130. package/dist/haml-CIHYN_l8.js +19 -0
  131. package/dist/handlebars-5wdAGqTJ.js +21 -0
  132. package/dist/haskell-WeIwNIP6.js +6 -0
  133. package/dist/haxe-TztHsm5T.js +6 -0
  134. package/dist/hcl-D438OF-I.js +6 -0
  135. package/dist/hjson-DYBUbqOl.js +6 -0
  136. package/dist/hlsl-Bk8TCZNL.js +6 -0
  137. package/dist/houston-BDYrDoDW.js +4 -0
  138. package/dist/html-derivative-89LwIO26.js +18 -0
  139. package/dist/http-Dsh8rSJR.js +26 -0
  140. package/dist/hurl-NdmqbL7E.js +26 -0
  141. package/dist/hxml-GbqSQCLa.js +8 -0
  142. package/dist/hy-Brt5EZ7-.js +6 -0
  143. package/dist/imba-CimUv-Uh.js +6 -0
  144. package/dist/index-C3mwt8G1.js +67982 -0
  145. package/dist/infoDiagram-WHAUD3N6-DdxAG2VL.js +35 -0
  146. package/dist/ini-BZIuRIvJ.js +6 -0
  147. package/dist/init-DjUOC4st.js +16 -0
  148. package/dist/java-DY6VlHhP.js +6 -0
  149. package/dist/jinja-BuwNoMI4.js +21 -0
  150. package/dist/jison-_q6rTsMi.js +18 -0
  151. package/dist/journeyDiagram-XKPGCS4Q-CT5Fbg6c.js +848 -0
  152. package/dist/json5-BT4Fjg39.js +6 -0
  153. package/dist/jsonc-CHjZD8gR.js +6 -0
  154. package/dist/jsonl-BGuvDmy9.js +6 -0
  155. package/dist/jsonnet-Bx2cfsXg.js +6 -0
  156. package/dist/jssm-BcADi6EI.js +6 -0
  157. package/dist/jsx-BtKADgXT.js +6 -0
  158. package/dist/julia-BCBeSq7V.js +27 -0
  159. package/dist/kanagawa-dragon-CiKur4Hl.js +4 -0
  160. package/dist/kanagawa-lotus-BKu-smKu.js +4 -0
  161. package/dist/kanagawa-wave-CQwozSzG.js +4 -0
  162. package/dist/kanban-definition-3W4ZIXB7-CxtMdkvq.js +732 -0
  163. package/dist/katex.min-l0sNRNKZ.js +1 -0
  164. package/dist/kdl-BNOv9TC3.js +6 -0
  165. package/dist/kotlin-ByBMgTeR.js +6 -0
  166. package/dist/kusto-VWFLl2T0.js +6 -0
  167. package/dist/laserwave-6a00oqik.js +4 -0
  168. package/dist/latex-DF20280u.js +9 -0
  169. package/dist/layout-D2NtTgFh.js +1730 -0
  170. package/dist/lean-D5yRrexI.js +6 -0
  171. package/dist/less-B1GLI2Di.js +6 -0
  172. package/dist/light-plus-CZuVqSLX.js +4 -0
  173. package/dist/linear-sERCAB61.js +277 -0
  174. package/dist/liquid-CFYzC-s7.js +21 -0
  175. package/dist/llvm-co1rIKs3.js +6 -0
  176. package/dist/log-Al8wyEFV.js +6 -0
  177. package/dist/logo-DBa4JDzV.js +6 -0
  178. package/dist/lua-kX5WP_P5.js +8 -0
  179. package/dist/luau-DtBSxLyz.js +6 -0
  180. package/dist/make-CsMclxtr.js +6 -0
  181. package/dist/marko-OTJE9YCh.js +23 -0
  182. package/dist/material-theme-D6KBX41T.js +4 -0
  183. package/dist/material-theme-darker-CkRroheE.js +4 -0
  184. package/dist/material-theme-lighter-BUBw43Yz.js +4 -0
  185. package/dist/material-theme-ocean-ClGX14Ja.js +4 -0
  186. package/dist/material-theme-palenight-C1RVm8K1.js +4 -0
  187. package/dist/matlab-BOAaUVP0.js +6 -0
  188. package/dist/mdc-tFNBAW39.js +21 -0
  189. package/dist/mdx-BOhZZUJ8.js +6 -0
  190. package/dist/mermaid-B0ixDHKN.js +6 -0
  191. package/dist/mermaid-NA5CF7SZ-620UJKEg.js +14 -0
  192. package/dist/mermaid.core-08D5Vldk.js +14401 -0
  193. package/dist/min-dark-C7ak0t6c.js +4 -0
  194. package/dist/min-light-CKFxVcPp.js +4 -0
  195. package/dist/mindmap-definition-VGOIOE7T-CTZ_Wx0b.js +798 -0
  196. package/dist/mipsasm-CTx18fBl.js +6 -0
  197. package/dist/mojo-BD611d7o.js +6 -0
  198. package/dist/monokai-C1KBYcO0.js +4 -0
  199. package/dist/move-F-dICmj2.js +6 -0
  200. package/dist/narrat-DmhDCBs-.js +6 -0
  201. package/dist/nextflow-DmSVRGjG.js +6 -0
  202. package/dist/nginx-COxS3qoU.js +9 -0
  203. package/dist/night-owl-Bm2rzalh.js +4 -0
  204. package/dist/nim-CZHmlxcO.js +28 -0
  205. package/dist/nix-BZK5F767.js +9 -0
  206. package/dist/nord-CC5OiUXg.js +4 -0
  207. package/dist/nushell-D8j3dhT-.js +6 -0
  208. package/dist/objective-c-Itk8tzmv.js +6 -0
  209. package/dist/objective-cpp-DGt5UKRO.js +6 -0
  210. package/dist/ocaml-eSVK32Eg.js +6 -0
  211. package/dist/openscad-Sp5uZ6f2.js +6 -0
  212. package/dist/ordinal-MUacOSdK.js +65 -0
  213. package/dist/pascal-xy8pJNns.js +6 -0
  214. package/dist/perl-CvmtpKyV.js +24 -0
  215. package/dist/php-B1tFq0rn.js +25 -0
  216. package/dist/pieDiagram-ADFJNKIX-DtleX3ES.js +173 -0
  217. package/dist/pkl-C-zSNmaA.js +6 -0
  218. package/dist/plastic-CSTz3KZp.js +4 -0
  219. package/dist/plsql-pVbGZfOv.js +6 -0
  220. package/dist/po-BNfHvqmm.js +6 -0
  221. package/dist/poimandres-C-VADXHD.js +4 -0
  222. package/dist/polar-CAZahv3u.js +6 -0
  223. package/dist/postcss-05aHdL-n.js +6 -0
  224. package/dist/powerquery-DI9HkTvs.js +6 -0
  225. package/dist/powershell-Clc4ydu-.js +6 -0
  226. package/dist/prisma-FZjmVtSl.js +6 -0
  227. package/dist/prolog-C5-yg4TO.js +6 -0
  228. package/dist/proto-MmCPeFAD.js +6 -0
  229. package/dist/pug-xpTstXA9.js +20 -0
  230. package/dist/puppet-CUJHmnxV.js +6 -0
  231. package/dist/purescript-rUfGld-4.js +6 -0
  232. package/dist/qml-G4_KKZym.js +18 -0
  233. package/dist/qmldir-BInDYbpo.js +6 -0
  234. package/dist/qss-AeJTysr_.js +6 -0
  235. package/dist/quadrantDiagram-AYHSOK5B-D193y_DL.js +1038 -0
  236. package/dist/r-Bm0uF0U2.js +6 -0
  237. package/dist/racket-B83wSAja.js +6 -0
  238. package/dist/raku-nEQ4ZJJ7.js +6 -0
  239. package/dist/razor-BS4LwTsw.js +19 -0
  240. package/dist/red-7y8PH7HH.js +4 -0
  241. package/dist/reg-m_s_Kiip.js +6 -0
  242. package/dist/regexp-BazyLpPg.js +6 -0
  243. package/dist/rel-BcRfyd6Q.js +6 -0
  244. package/dist/requirementDiagram-UZGBJVZJ-DcSe-m6d.js +864 -0
  245. package/dist/riscv-Ce8MAQLP.js +6 -0
  246. package/dist/rose-pine-BKc3yVeu.js +4 -0
  247. package/dist/rose-pine-dawn-BulJcPZT.js +4 -0
  248. package/dist/rose-pine-moon-j6jiXKV8.js +4 -0
  249. package/dist/rosmsg-Cz0w1km8.js +6 -0
  250. package/dist/rst-BvkiqG_4.js +39 -0
  251. package/dist/ruby-CSrNBwZK.js +40 -0
  252. package/dist/sankeyDiagram-TZEHDZUN-HpXuokMl.js +838 -0
  253. package/dist/sas-DciBl6hq.js +18 -0
  254. package/dist/sass-DxHp5rTx.js +6 -0
  255. package/dist/scala-D4grkFkl.js +6 -0
  256. package/dist/scheme-BCRWuEm4.js +6 -0
  257. package/dist/scss-Sr5SHsiH.js +18 -0
  258. package/dist/sdbl-B7T8abf4.js +6 -0
  259. package/dist/sequenceDiagram-WL72ISMW-D_5I_YtC.js +2530 -0
  260. package/dist/shaderlab-Cr62-Wb4.js +8 -0
  261. package/dist/shellsession-B0YIY3D-.js +18 -0
  262. package/dist/slack-dark-i7wN4OET.js +4 -0
  263. package/dist/slack-ochin-ndHf0LoP.js +4 -0
  264. package/dist/smalltalk-BlI1_OkM.js +6 -0
  265. package/dist/snazzy-light-BlSJXAu4.js +4 -0
  266. package/dist/solarized-dark-UTmkh7lw.js +4 -0
  267. package/dist/solarized-light-BheCkDPT.js +4 -0
  268. package/dist/solidity-DUWnFhS6.js +6 -0
  269. package/dist/soy-I6L3jl3W.js +18 -0
  270. package/dist/sparql-B0KWFEri.js +8 -0
  271. package/dist/splunk-CRXR8A9s.js +6 -0
  272. package/dist/ssh-config-DP-hNVbF.js +6 -0
  273. package/dist/stata-BNwq7-ev.js +18 -0
  274. package/dist/stateDiagram-FKZM4ZOC-CRSpvNED.js +276 -0
  275. package/dist/stateDiagram-v2-4FDKWEC3-DfUK-Zbc.js +29 -0
  276. package/dist/style.css +1 -1
  277. package/dist/stylus-CyKEU1Ej.js +6 -0
  278. package/dist/svelte-Din0yw3u.js +22 -0
  279. package/dist/swift-9UzSvamq.js +6 -0
  280. package/dist/synthwave-84-NU3C_KFZ.js +4 -0
  281. package/dist/system-verilog-BCm7smPJ.js +6 -0
  282. package/dist/systemd-C-4qm6XH.js +6 -0
  283. package/dist/talonscript-CFF3LF_O.js +6 -0
  284. package/dist/tasl-Cg_WBUAe.js +6 -0
  285. package/dist/tcl-DN7buRTF.js +6 -0
  286. package/dist/templ-CBu7yCES.js +20 -0
  287. package/dist/terraform-DGvcn9zM.js +6 -0
  288. package/dist/tex-DpOayVob.js +8 -0
  289. package/dist/timeline-definition-IT6M3QCI-DaJ4iEOK.js +813 -0
  290. package/dist/tokyo-night-DP4TmcQl.js +4 -0
  291. package/dist/treemap-KMMF4GRG-C3Ab2yjL.js +16045 -0
  292. package/dist/ts-tags-3Kvfz4et.js +49 -0
  293. package/dist/tsv-BtvSkaG0.js +6 -0
  294. package/dist/tsx-B8rCNbgL.js +6 -0
  295. package/dist/turtle-_H59FV7D.js +6 -0
  296. package/dist/twig-3l_q-6xZ.js +37 -0
  297. package/dist/typespec-DWqp-kUU.js +6 -0
  298. package/dist/typst-D_1QKWns.js +6 -0
  299. package/dist/v-BPCNiyYe.js +6 -0
  300. package/dist/vala-uxaPR7d1.js +6 -0
  301. package/dist/vb-D8_c5-KN.js +6 -0
  302. package/dist/verilog-B-bybjPF.js +6 -0
  303. package/dist/vesper-BckBta1U.js +4 -0
  304. package/dist/vhdl-CUlNa8ac.js +6 -0
  305. package/dist/viml-DsfA-sWm.js +6 -0
  306. package/dist/vitesse-black-BoGvW84i.js +4 -0
  307. package/dist/vitesse-dark-Cym-eLtO.js +4 -0
  308. package/dist/vitesse-light-CcmG315c.js +4 -0
  309. package/dist/vue-BuFQ04-G.js +37 -0
  310. package/dist/vue-html-CyxHqgfT.js +21 -0
  311. package/dist/vue-vine-B_YNGutq.js +30 -0
  312. package/dist/vyper-CPQuu50u.js +6 -0
  313. package/dist/wasm-BBXxrAl7.js +6 -0
  314. package/dist/wasm-DQxwEHae.js +7 -0
  315. package/dist/wenyan-pbVjoM9_.js +6 -0
  316. package/dist/wgsl-DY4iK1q1.js +6 -0
  317. package/dist/wikitext-Z-MoUasO.js +6 -0
  318. package/dist/wit-CQMQOlTg.js +6 -0
  319. package/dist/wolfram-Dz4KXISs.js +6 -0
  320. package/dist/xml-C2J0sS9M.js +8 -0
  321. package/dist/xsl-CbTBIiv3.js +9 -0
  322. package/dist/xychartDiagram-PRI3JC2R-Cf2smXg5.js +1353 -0
  323. package/dist/zenscript-CxBjpf9c.js +6 -0
  324. package/dist/zig-Vm0PO9wB.js +6 -0
  325. package/package.json +25 -25
@@ -0,0 +1,813 @@
1
+ import { _ as s, c as xt, l as E, d as q, V as kt, W as vt, X as _t, Y as bt, B as wt, $ as St, y as Et } from "./mermaid.core-08D5Vldk.js";
2
+ import { d as nt } from "./arc-BzRDGNYi.js";
3
+ import "./index-C3mwt8G1.js";
4
+ import "react/jsx-runtime";
5
+ import "react";
6
+ import "class-variance-authority";
7
+ import "clsx";
8
+ import "tailwind-merge";
9
+ import "react-dom";
10
+ import "cmdk";
11
+ import "nanoid";
12
+ import "@foris/avocado-icons";
13
+ import "react-markdown";
14
+ var X = function() {
15
+ var n = /* @__PURE__ */ s(function(f, r, a, h) {
16
+ for (a = a || {}, h = f.length; h--; a[f[h]] = r)
17
+ ;
18
+ return a;
19
+ }, "o"), t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], l = [1, 10], i = [1, 11], d = [1, 12], c = [1, 13], g = [1, 16], m = [1, 17], p = {
20
+ trace: /* @__PURE__ */ s(function() {
21
+ }, "trace"),
22
+ yy: {},
23
+ symbols_: { error: 2, start: 3, timeline: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, title: 11, acc_title: 12, acc_title_value: 13, acc_descr: 14, acc_descr_value: 15, acc_descr_multiline_value: 16, section: 17, period_statement: 18, event_statement: 19, period: 20, event: 21, $accept: 0, $end: 1 },
24
+ terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" },
25
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]],
26
+ performAction: /* @__PURE__ */ s(function(r, a, h, u, y, o, S) {
27
+ var k = o.length - 1;
28
+ switch (y) {
29
+ case 1:
30
+ return o[k - 1];
31
+ case 2:
32
+ this.$ = [];
33
+ break;
34
+ case 3:
35
+ o[k - 1].push(o[k]), this.$ = o[k - 1];
36
+ break;
37
+ case 4:
38
+ case 5:
39
+ this.$ = o[k];
40
+ break;
41
+ case 6:
42
+ case 7:
43
+ this.$ = [];
44
+ break;
45
+ case 8:
46
+ u.getCommonDb().setDiagramTitle(o[k].substr(6)), this.$ = o[k].substr(6);
47
+ break;
48
+ case 9:
49
+ this.$ = o[k].trim(), u.getCommonDb().setAccTitle(this.$);
50
+ break;
51
+ case 10:
52
+ case 11:
53
+ this.$ = o[k].trim(), u.getCommonDb().setAccDescription(this.$);
54
+ break;
55
+ case 12:
56
+ u.addSection(o[k].substr(8)), this.$ = o[k].substr(8);
57
+ break;
58
+ case 15:
59
+ u.addTask(o[k], 0, ""), this.$ = o[k];
60
+ break;
61
+ case 16:
62
+ u.addEvent(o[k].substr(2)), this.$ = o[k];
63
+ break;
64
+ }
65
+ }, "anonymous"),
66
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, n(t, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: e, 12: l, 14: i, 16: d, 17: c, 18: 14, 19: 15, 20: g, 21: m }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: l, 14: i, 16: d, 17: c, 18: 14, 19: 15, 20: g, 21: m }, n(t, [2, 5]), n(t, [2, 6]), n(t, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, n(t, [2, 11]), n(t, [2, 12]), n(t, [2, 13]), n(t, [2, 14]), n(t, [2, 15]), n(t, [2, 16]), n(t, [2, 4]), n(t, [2, 9]), n(t, [2, 10])],
67
+ defaultActions: {},
68
+ parseError: /* @__PURE__ */ s(function(r, a) {
69
+ if (a.recoverable)
70
+ this.trace(r);
71
+ else {
72
+ var h = new Error(r);
73
+ throw h.hash = a, h;
74
+ }
75
+ }, "parseError"),
76
+ parse: /* @__PURE__ */ s(function(r) {
77
+ var a = this, h = [0], u = [], y = [null], o = [], S = this.table, k = "", $ = 0, C = 0, B = 2, J = 1, O = o.slice.call(arguments, 1), v = Object.create(this.lexer), N = { yy: {} };
78
+ for (var L in this.yy)
79
+ Object.prototype.hasOwnProperty.call(this.yy, L) && (N.yy[L] = this.yy[L]);
80
+ v.setInput(r, N.yy), N.yy.lexer = v, N.yy.parser = this, typeof v.yylloc > "u" && (v.yylloc = {});
81
+ var b = v.yylloc;
82
+ o.push(b);
83
+ var M = v.options && v.options.ranges;
84
+ typeof N.yy.parseError == "function" ? this.parseError = N.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
85
+ function R(T) {
86
+ h.length = h.length - 2 * T, y.length = y.length - T, o.length = o.length - T;
87
+ }
88
+ s(R, "popStack");
89
+ function A() {
90
+ var T;
91
+ return T = u.pop() || v.lex() || J, typeof T != "number" && (T instanceof Array && (u = T, T = u.pop()), T = a.symbols_[T] || T), T;
92
+ }
93
+ s(A, "lex");
94
+ for (var w, H, I, K, V = {}, j, P, et, G; ; ) {
95
+ if (H = h[h.length - 1], this.defaultActions[H] ? I = this.defaultActions[H] : ((w === null || typeof w > "u") && (w = A()), I = S[H] && S[H][w]), typeof I > "u" || !I.length || !I[0]) {
96
+ var Q = "";
97
+ G = [];
98
+ for (j in S[H])
99
+ this.terminals_[j] && j > B && G.push("'" + this.terminals_[j] + "'");
100
+ v.showPosition ? Q = "Parse error on line " + ($ + 1) + `:
101
+ ` + v.showPosition() + `
102
+ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Q = "Parse error on line " + ($ + 1) + ": Unexpected " + (w == J ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(Q, {
103
+ text: v.match,
104
+ token: this.terminals_[w] || w,
105
+ line: v.yylineno,
106
+ loc: b,
107
+ expected: G
108
+ });
109
+ }
110
+ if (I[0] instanceof Array && I.length > 1)
111
+ throw new Error("Parse Error: multiple actions possible at state: " + H + ", token: " + w);
112
+ switch (I[0]) {
113
+ case 1:
114
+ h.push(w), y.push(v.yytext), o.push(v.yylloc), h.push(I[1]), w = null, C = v.yyleng, k = v.yytext, $ = v.yylineno, b = v.yylloc;
115
+ break;
116
+ case 2:
117
+ if (P = this.productions_[I[1]][1], V.$ = y[y.length - P], V._$ = {
118
+ first_line: o[o.length - (P || 1)].first_line,
119
+ last_line: o[o.length - 1].last_line,
120
+ first_column: o[o.length - (P || 1)].first_column,
121
+ last_column: o[o.length - 1].last_column
122
+ }, M && (V._$.range = [
123
+ o[o.length - (P || 1)].range[0],
124
+ o[o.length - 1].range[1]
125
+ ]), K = this.performAction.apply(V, [
126
+ k,
127
+ C,
128
+ $,
129
+ N.yy,
130
+ I[1],
131
+ y,
132
+ o
133
+ ].concat(O)), typeof K < "u")
134
+ return K;
135
+ P && (h = h.slice(0, -1 * P * 2), y = y.slice(0, -1 * P), o = o.slice(0, -1 * P)), h.push(this.productions_[I[1]][0]), y.push(V.$), o.push(V._$), et = S[h[h.length - 2]][h[h.length - 1]], h.push(et);
136
+ break;
137
+ case 3:
138
+ return !0;
139
+ }
140
+ }
141
+ return !0;
142
+ }, "parse")
143
+ }, x = /* @__PURE__ */ function() {
144
+ var f = {
145
+ EOF: 1,
146
+ parseError: /* @__PURE__ */ s(function(a, h) {
147
+ if (this.yy.parser)
148
+ this.yy.parser.parseError(a, h);
149
+ else
150
+ throw new Error(a);
151
+ }, "parseError"),
152
+ // resets the lexer, sets new input
153
+ setInput: /* @__PURE__ */ s(function(r, a) {
154
+ return this.yy = a || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
155
+ first_line: 1,
156
+ first_column: 0,
157
+ last_line: 1,
158
+ last_column: 0
159
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
160
+ }, "setInput"),
161
+ // consumes and returns one char from the input
162
+ input: /* @__PURE__ */ s(function() {
163
+ var r = this._input[0];
164
+ this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
165
+ var a = r.match(/(?:\r\n?|\n).*/g);
166
+ return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
167
+ }, "input"),
168
+ // unshifts one char (or a string) into the input
169
+ unput: /* @__PURE__ */ s(function(r) {
170
+ var a = r.length, h = r.split(/(?:\r\n?|\n)/g);
171
+ this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
172
+ var u = this.match.split(/(?:\r\n?|\n)/g);
173
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), h.length - 1 && (this.yylineno -= h.length - 1);
174
+ var y = this.yylloc.range;
175
+ return this.yylloc = {
176
+ first_line: this.yylloc.first_line,
177
+ last_line: this.yylineno + 1,
178
+ first_column: this.yylloc.first_column,
179
+ last_column: h ? (h.length === u.length ? this.yylloc.first_column : 0) + u[u.length - h.length].length - h[0].length : this.yylloc.first_column - a
180
+ }, this.options.ranges && (this.yylloc.range = [y[0], y[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
181
+ }, "unput"),
182
+ // When called from action, caches matched text and appends it on next action
183
+ more: /* @__PURE__ */ s(function() {
184
+ return this._more = !0, this;
185
+ }, "more"),
186
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
187
+ reject: /* @__PURE__ */ s(function() {
188
+ if (this.options.backtrack_lexer)
189
+ this._backtrack = !0;
190
+ else
191
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
192
+ ` + this.showPosition(), {
193
+ text: "",
194
+ token: null,
195
+ line: this.yylineno
196
+ });
197
+ return this;
198
+ }, "reject"),
199
+ // retain first n characters of the match
200
+ less: /* @__PURE__ */ s(function(r) {
201
+ this.unput(this.match.slice(r));
202
+ }, "less"),
203
+ // displays already matched input, i.e. for error messages
204
+ pastInput: /* @__PURE__ */ s(function() {
205
+ var r = this.matched.substr(0, this.matched.length - this.match.length);
206
+ return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
207
+ }, "pastInput"),
208
+ // displays upcoming input, i.e. for error messages
209
+ upcomingInput: /* @__PURE__ */ s(function() {
210
+ var r = this.match;
211
+ return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
212
+ }, "upcomingInput"),
213
+ // displays the character position where the lexing error occurred, i.e. for error messages
214
+ showPosition: /* @__PURE__ */ s(function() {
215
+ var r = this.pastInput(), a = new Array(r.length + 1).join("-");
216
+ return r + this.upcomingInput() + `
217
+ ` + a + "^";
218
+ }, "showPosition"),
219
+ // test the lexed token: return FALSE when not a match, otherwise return token
220
+ test_match: /* @__PURE__ */ s(function(r, a) {
221
+ var h, u, y;
222
+ if (this.options.backtrack_lexer && (y = {
223
+ yylineno: this.yylineno,
224
+ yylloc: {
225
+ first_line: this.yylloc.first_line,
226
+ last_line: this.last_line,
227
+ first_column: this.yylloc.first_column,
228
+ last_column: this.yylloc.last_column
229
+ },
230
+ yytext: this.yytext,
231
+ match: this.match,
232
+ matches: this.matches,
233
+ matched: this.matched,
234
+ yyleng: this.yyleng,
235
+ offset: this.offset,
236
+ _more: this._more,
237
+ _input: this._input,
238
+ yy: this.yy,
239
+ conditionStack: this.conditionStack.slice(0),
240
+ done: this.done
241
+ }, this.options.ranges && (y.yylloc.range = this.yylloc.range.slice(0))), u = r[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
242
+ first_line: this.yylloc.last_line,
243
+ last_line: this.yylineno + 1,
244
+ first_column: this.yylloc.last_column,
245
+ last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
246
+ }, this.yytext += r[0], this.match += r[0], this.matches = r, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(r[0].length), this.matched += r[0], h = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h)
247
+ return h;
248
+ if (this._backtrack) {
249
+ for (var o in y)
250
+ this[o] = y[o];
251
+ return !1;
252
+ }
253
+ return !1;
254
+ }, "test_match"),
255
+ // return next match in input
256
+ next: /* @__PURE__ */ s(function() {
257
+ if (this.done)
258
+ return this.EOF;
259
+ this._input || (this.done = !0);
260
+ var r, a, h, u;
261
+ this._more || (this.yytext = "", this.match = "");
262
+ for (var y = this._currentRules(), o = 0; o < y.length; o++)
263
+ if (h = this._input.match(this.rules[y[o]]), h && (!a || h[0].length > a[0].length)) {
264
+ if (a = h, u = o, this.options.backtrack_lexer) {
265
+ if (r = this.test_match(h, y[o]), r !== !1)
266
+ return r;
267
+ if (this._backtrack) {
268
+ a = !1;
269
+ continue;
270
+ } else
271
+ return !1;
272
+ } else if (!this.options.flex)
273
+ break;
274
+ }
275
+ return a ? (r = this.test_match(a, y[u]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
276
+ ` + this.showPosition(), {
277
+ text: "",
278
+ token: null,
279
+ line: this.yylineno
280
+ });
281
+ }, "next"),
282
+ // return next match that has a token
283
+ lex: /* @__PURE__ */ s(function() {
284
+ var a = this.next();
285
+ return a || this.lex();
286
+ }, "lex"),
287
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
288
+ begin: /* @__PURE__ */ s(function(a) {
289
+ this.conditionStack.push(a);
290
+ }, "begin"),
291
+ // pop the previously active lexer condition state off the condition stack
292
+ popState: /* @__PURE__ */ s(function() {
293
+ var a = this.conditionStack.length - 1;
294
+ return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
295
+ }, "popState"),
296
+ // produce the lexer rule set which is active for the currently active lexer condition state
297
+ _currentRules: /* @__PURE__ */ s(function() {
298
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
299
+ }, "_currentRules"),
300
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
301
+ topState: /* @__PURE__ */ s(function(a) {
302
+ return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
303
+ }, "topState"),
304
+ // alias for begin(condition)
305
+ pushState: /* @__PURE__ */ s(function(a) {
306
+ this.begin(a);
307
+ }, "pushState"),
308
+ // return the number of states currently on the stack
309
+ stateStackSize: /* @__PURE__ */ s(function() {
310
+ return this.conditionStack.length;
311
+ }, "stateStackSize"),
312
+ options: { "case-insensitive": !0 },
313
+ performAction: /* @__PURE__ */ s(function(a, h, u, y) {
314
+ switch (u) {
315
+ case 0:
316
+ break;
317
+ case 1:
318
+ break;
319
+ case 2:
320
+ return 10;
321
+ case 3:
322
+ break;
323
+ case 4:
324
+ break;
325
+ case 5:
326
+ return 4;
327
+ case 6:
328
+ return 11;
329
+ case 7:
330
+ return this.begin("acc_title"), 12;
331
+ case 8:
332
+ return this.popState(), "acc_title_value";
333
+ case 9:
334
+ return this.begin("acc_descr"), 14;
335
+ case 10:
336
+ return this.popState(), "acc_descr_value";
337
+ case 11:
338
+ this.begin("acc_descr_multiline");
339
+ break;
340
+ case 12:
341
+ this.popState();
342
+ break;
343
+ case 13:
344
+ return "acc_descr_multiline_value";
345
+ case 14:
346
+ return 17;
347
+ case 15:
348
+ return 21;
349
+ case 16:
350
+ return 20;
351
+ case 17:
352
+ return 6;
353
+ case 18:
354
+ return "INVALID";
355
+ }
356
+ }, "anonymous"),
357
+ rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^:\n]+)/i, /^(?::\s(?:[^:\n]|:(?!\s))+)/i, /^(?:[^#:\n]+)/i, /^(?:$)/i, /^(?:.)/i],
358
+ conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], inclusive: !0 } }
359
+ };
360
+ return f;
361
+ }();
362
+ p.lexer = x;
363
+ function _() {
364
+ this.yy = {};
365
+ }
366
+ return s(_, "Parser"), _.prototype = p, p.Parser = _, new _();
367
+ }();
368
+ X.parser = X;
369
+ var Tt = X, at = {};
370
+ wt(at, {
371
+ addEvent: () => yt,
372
+ addSection: () => ht,
373
+ addTask: () => pt,
374
+ addTaskOrg: () => gt,
375
+ clear: () => ct,
376
+ default: () => It,
377
+ getCommonDb: () => ot,
378
+ getSections: () => dt,
379
+ getTasks: () => ut
380
+ });
381
+ var W = "", lt = 0, Y = [], U = [], z = [], ot = /* @__PURE__ */ s(() => St, "getCommonDb"), ct = /* @__PURE__ */ s(function() {
382
+ Y.length = 0, U.length = 0, W = "", z.length = 0, Et();
383
+ }, "clear"), ht = /* @__PURE__ */ s(function(n) {
384
+ W = n, Y.push(n);
385
+ }, "addSection"), dt = /* @__PURE__ */ s(function() {
386
+ return Y;
387
+ }, "getSections"), ut = /* @__PURE__ */ s(function() {
388
+ let n = it();
389
+ const t = 100;
390
+ let e = 0;
391
+ for (; !n && e < t; )
392
+ n = it(), e++;
393
+ return U.push(...z), U;
394
+ }, "getTasks"), pt = /* @__PURE__ */ s(function(n, t, e) {
395
+ const l = {
396
+ id: lt++,
397
+ section: W,
398
+ type: W,
399
+ task: n,
400
+ score: t || 0,
401
+ //if event is defined, then add it the events array
402
+ events: e ? [e] : []
403
+ };
404
+ z.push(l);
405
+ }, "addTask"), yt = /* @__PURE__ */ s(function(n) {
406
+ z.find((e) => e.id === lt - 1).events.push(n);
407
+ }, "addEvent"), gt = /* @__PURE__ */ s(function(n) {
408
+ const t = {
409
+ section: W,
410
+ type: W,
411
+ description: n,
412
+ task: n,
413
+ classes: []
414
+ };
415
+ U.push(t);
416
+ }, "addTaskOrg"), it = /* @__PURE__ */ s(function() {
417
+ const n = /* @__PURE__ */ s(function(e) {
418
+ return z[e].processed;
419
+ }, "compileTask");
420
+ let t = !0;
421
+ for (const [e, l] of z.entries())
422
+ n(e), t = t && l.processed;
423
+ return t;
424
+ }, "compileTasks"), It = {
425
+ clear: ct,
426
+ getCommonDb: ot,
427
+ addSection: ht,
428
+ getSections: dt,
429
+ getTasks: ut,
430
+ addTask: pt,
431
+ addTaskOrg: gt,
432
+ addEvent: yt
433
+ }, Nt = 12, Z = /* @__PURE__ */ s(function(n, t) {
434
+ const e = n.append("rect");
435
+ return e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), e.attr("rx", t.rx), e.attr("ry", t.ry), t.class !== void 0 && e.attr("class", t.class), e;
436
+ }, "drawRect"), Lt = /* @__PURE__ */ s(function(n, t) {
437
+ const l = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), i = n.append("g");
438
+ i.append("circle").attr("cx", t.cx - 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), i.append("circle").attr("cx", t.cx + 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
439
+ function d(m) {
440
+ const p = nt().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
441
+ m.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
442
+ }
443
+ s(d, "smile");
444
+ function c(m) {
445
+ const p = nt().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
446
+ m.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
447
+ }
448
+ s(c, "sad");
449
+ function g(m) {
450
+ m.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", t.cx - 5).attr("y1", t.cy + 7).attr("x2", t.cx + 5).attr("y2", t.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
451
+ }
452
+ return s(g, "ambivalent"), t.score > 3 ? d(i) : t.score < 3 ? c(i) : g(i), l;
453
+ }, "drawFace"), $t = /* @__PURE__ */ s(function(n, t) {
454
+ const e = n.append("circle");
455
+ return e.attr("cx", t.cx), e.attr("cy", t.cy), e.attr("class", "actor-" + t.pos), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("r", t.r), e.class !== void 0 && e.attr("class", e.class), t.title !== void 0 && e.append("title").text(t.title), e;
456
+ }, "drawCircle"), ft = /* @__PURE__ */ s(function(n, t) {
457
+ const e = t.text.replace(/<br\s*\/?>/gi, " "), l = n.append("text");
458
+ l.attr("x", t.x), l.attr("y", t.y), l.attr("class", "legend"), l.style("text-anchor", t.anchor), t.class !== void 0 && l.attr("class", t.class);
459
+ const i = l.append("tspan");
460
+ return i.attr("x", t.x + t.textMargin * 2), i.text(e), l;
461
+ }, "drawText"), Mt = /* @__PURE__ */ s(function(n, t) {
462
+ function e(i, d, c, g, m) {
463
+ return i + "," + d + " " + (i + c) + "," + d + " " + (i + c) + "," + (d + g - m) + " " + (i + c - m * 1.2) + "," + (d + g) + " " + i + "," + (d + g);
464
+ }
465
+ s(e, "genPoints");
466
+ const l = n.append("polygon");
467
+ l.attr("points", e(t.x, t.y, 50, 20, 7)), l.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ft(n, t);
468
+ }, "drawLabel"), Ht = /* @__PURE__ */ s(function(n, t, e) {
469
+ const l = n.append("g"), i = D();
470
+ i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = e.width, i.height = e.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, Z(l, i), mt(e)(
471
+ t.text,
472
+ l,
473
+ i.x,
474
+ i.y,
475
+ i.width,
476
+ i.height,
477
+ { class: "journey-section section-type-" + t.num },
478
+ e,
479
+ t.colour
480
+ );
481
+ }, "drawSection"), rt = -1, Pt = /* @__PURE__ */ s(function(n, t, e) {
482
+ const l = t.x + e.width / 2, i = n.append("g");
483
+ rt++;
484
+ const d = 300 + 5 * 30;
485
+ i.append("line").attr("id", "task" + rt).attr("x1", l).attr("y1", t.y).attr("x2", l).attr("y2", d).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Lt(i, {
486
+ cx: l,
487
+ cy: 300 + (5 - t.score) * 30,
488
+ score: t.score
489
+ });
490
+ const c = D();
491
+ c.x = t.x, c.y = t.y, c.fill = t.fill, c.width = e.width, c.height = e.height, c.class = "task task-type-" + t.num, c.rx = 3, c.ry = 3, Z(i, c), mt(e)(
492
+ t.task,
493
+ i,
494
+ c.x,
495
+ c.y,
496
+ c.width,
497
+ c.height,
498
+ { class: "task" },
499
+ e,
500
+ t.colour
501
+ );
502
+ }, "drawTask"), At = /* @__PURE__ */ s(function(n, t) {
503
+ Z(n, {
504
+ x: t.startx,
505
+ y: t.starty,
506
+ width: t.stopx - t.startx,
507
+ height: t.stopy - t.starty,
508
+ fill: t.fill,
509
+ class: "rect"
510
+ }).lower();
511
+ }, "drawBackgroundRect"), Ct = /* @__PURE__ */ s(function() {
512
+ return {
513
+ x: 0,
514
+ y: 0,
515
+ fill: void 0,
516
+ "text-anchor": "start",
517
+ width: 100,
518
+ height: 100,
519
+ textMargin: 0,
520
+ rx: 0,
521
+ ry: 0
522
+ };
523
+ }, "getTextObj"), D = /* @__PURE__ */ s(function() {
524
+ return {
525
+ x: 0,
526
+ y: 0,
527
+ width: 100,
528
+ anchor: "start",
529
+ height: 100,
530
+ rx: 0,
531
+ ry: 0
532
+ };
533
+ }, "getNoteRect"), mt = /* @__PURE__ */ function() {
534
+ function n(i, d, c, g, m, p, x, _) {
535
+ const f = d.append("text").attr("x", c + m / 2).attr("y", g + p / 2 + 5).style("font-color", _).style("text-anchor", "middle").text(i);
536
+ l(f, x);
537
+ }
538
+ s(n, "byText");
539
+ function t(i, d, c, g, m, p, x, _, f) {
540
+ const { taskFontSize: r, taskFontFamily: a } = _, h = i.split(/<br\s*\/?>/gi);
541
+ for (let u = 0; u < h.length; u++) {
542
+ const y = u * r - r * (h.length - 1) / 2, o = d.append("text").attr("x", c + m / 2).attr("y", g).attr("fill", f).style("text-anchor", "middle").style("font-size", r).style("font-family", a);
543
+ o.append("tspan").attr("x", c + m / 2).attr("dy", y).text(h[u]), o.attr("y", g + p / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), l(o, x);
544
+ }
545
+ }
546
+ s(t, "byTspan");
547
+ function e(i, d, c, g, m, p, x, _) {
548
+ const f = d.append("switch"), a = f.append("foreignObject").attr("x", c).attr("y", g).attr("width", m).attr("height", p).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
549
+ a.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), t(i, f, c, g, m, p, x, _), l(a, x);
550
+ }
551
+ s(e, "byFo");
552
+ function l(i, d) {
553
+ for (const c in d)
554
+ c in d && i.attr(c, d[c]);
555
+ }
556
+ return s(l, "_setTextAttrs"), function(i) {
557
+ return i.textPlacement === "fo" ? e : i.textPlacement === "old" ? n : t;
558
+ };
559
+ }(), Rt = /* @__PURE__ */ s(function(n) {
560
+ n.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
561
+ }, "initGraphics");
562
+ function tt(n, t) {
563
+ n.each(function() {
564
+ var e = q(this), l = e.text().split(/(\s+|<br>)/).reverse(), i, d = [], c = 1.1, g = e.attr("y"), m = parseFloat(e.attr("dy")), p = e.text(null).append("tspan").attr("x", 0).attr("y", g).attr("dy", m + "em");
565
+ for (let x = 0; x < l.length; x++)
566
+ i = l[l.length - 1 - x], d.push(i), p.text(d.join(" ").trim()), (p.node().getComputedTextLength() > t || i === "<br>") && (d.pop(), p.text(d.join(" ").trim()), i === "<br>" ? d = [""] : d = [i], p = e.append("tspan").attr("x", 0).attr("y", g).attr("dy", c + "em").text(i));
567
+ });
568
+ }
569
+ s(tt, "wrap");
570
+ var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
571
+ var _;
572
+ const i = e % Nt - 1, d = n.append("g");
573
+ t.section = i, d.attr(
574
+ "class",
575
+ (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + i)
576
+ );
577
+ const c = d.append("g"), g = d.append("g"), p = g.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(tt, t.width).node().getBBox(), x = (_ = l.fontSize) != null && _.replace ? l.fontSize.replace("px", "") : l.fontSize;
578
+ return t.height = p.height + x * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, g.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), Wt(c, t, i, l), t;
579
+ }, "drawNode"), Vt = /* @__PURE__ */ s(function(n, t, e) {
580
+ var g;
581
+ const l = n.append("g"), d = l.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(tt, t.width).node().getBBox(), c = (g = e.fontSize) != null && g.replace ? e.fontSize.replace("px", "") : e.fontSize;
582
+ return l.remove(), d.height + c * 1.1 * 0.5 + t.padding;
583
+ }, "getVirtualNodeHeight"), Wt = /* @__PURE__ */ s(function(n, t, e) {
584
+ n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
585
+ "d",
586
+ `M0 ${t.height - 5} v${-t.height + 2 * 5} q0,-5 5,-5 h${t.width - 2 * 5} q5,0 5,5 v${t.height - 5} H0 Z`
587
+ ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
588
+ }, "defaultBkg"), F = {
589
+ drawRect: Z,
590
+ drawCircle: $t,
591
+ drawSection: Ht,
592
+ drawText: ft,
593
+ drawLabel: Mt,
594
+ drawTask: Pt,
595
+ drawBackgroundRect: At,
596
+ getTextObj: Ct,
597
+ getNoteRect: D,
598
+ initGraphics: Rt,
599
+ drawNode: Ft,
600
+ getVirtualNodeHeight: Vt
601
+ }, zt = /* @__PURE__ */ s(function(n, t, e, l) {
602
+ var O, v, N;
603
+ const i = xt(), d = ((O = i.timeline) == null ? void 0 : O.leftMargin) ?? 50;
604
+ E.debug("timeline", l.db);
605
+ const c = i.securityLevel;
606
+ let g;
607
+ c === "sandbox" && (g = q("#i" + t));
608
+ const p = (c === "sandbox" ? q(g.nodes()[0].contentDocument.body) : q("body")).select("#" + t);
609
+ p.append("g");
610
+ const x = l.db.getTasks(), _ = l.db.getCommonDb().getDiagramTitle();
611
+ E.debug("task", x), F.initGraphics(p);
612
+ const f = l.db.getSections();
613
+ E.debug("sections", f);
614
+ let r = 0, a = 0, h = 0, u = 0, y = 50 + d, o = 50;
615
+ u = 50;
616
+ let S = 0, k = !0;
617
+ f.forEach(function(L) {
618
+ const b = {
619
+ number: S,
620
+ descr: L,
621
+ section: S,
622
+ width: 150,
623
+ padding: 20,
624
+ maxHeight: r
625
+ }, M = F.getVirtualNodeHeight(p, b, i);
626
+ E.debug("sectionHeight before draw", M), r = Math.max(r, M + 20);
627
+ });
628
+ let $ = 0, C = 0;
629
+ E.debug("tasks.length", x.length);
630
+ for (const [L, b] of x.entries()) {
631
+ const M = {
632
+ number: L,
633
+ descr: b,
634
+ section: b.section,
635
+ width: 150,
636
+ padding: 20,
637
+ maxHeight: a
638
+ }, R = F.getVirtualNodeHeight(p, M, i);
639
+ E.debug("taskHeight before draw", R), a = Math.max(a, R + 20), $ = Math.max($, b.events.length);
640
+ let A = 0;
641
+ for (const w of b.events) {
642
+ const H = {
643
+ descr: w,
644
+ section: b.section,
645
+ number: b.section,
646
+ width: 150,
647
+ padding: 20,
648
+ maxHeight: 50
649
+ };
650
+ A += F.getVirtualNodeHeight(p, H, i);
651
+ }
652
+ b.events.length > 0 && (A += (b.events.length - 1) * 10), C = Math.max(C, A);
653
+ }
654
+ E.debug("maxSectionHeight before draw", r), E.debug("maxTaskHeight before draw", a), f && f.length > 0 ? f.forEach((L) => {
655
+ const b = x.filter((w) => w.section === L), M = {
656
+ number: S,
657
+ descr: L,
658
+ section: S,
659
+ width: 200 * Math.max(b.length, 1) - 50,
660
+ padding: 20,
661
+ maxHeight: r
662
+ };
663
+ E.debug("sectionNode", M);
664
+ const R = p.append("g"), A = F.drawNode(R, M, S, i);
665
+ E.debug("sectionNode output", A), R.attr("transform", `translate(${y}, ${u})`), o += r + 50, b.length > 0 && st(
666
+ p,
667
+ b,
668
+ S,
669
+ y,
670
+ o,
671
+ a,
672
+ i,
673
+ $,
674
+ C,
675
+ r,
676
+ !1
677
+ ), y += 200 * Math.max(b.length, 1), o = u, S++;
678
+ }) : (k = !1, st(
679
+ p,
680
+ x,
681
+ S,
682
+ y,
683
+ o,
684
+ a,
685
+ i,
686
+ $,
687
+ C,
688
+ r,
689
+ !0
690
+ ));
691
+ const B = p.node().getBBox();
692
+ E.debug("bounds", B), _ && p.append("text").text(_).attr("x", B.width / 2 - d).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), h = k ? r + a + 150 : a + 100, p.append("g").attr("class", "lineWrapper").append("line").attr("x1", d).attr("y1", h).attr("x2", B.width + 3 * d).attr("y2", h).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), kt(
693
+ void 0,
694
+ p,
695
+ ((v = i.timeline) == null ? void 0 : v.padding) ?? 50,
696
+ ((N = i.timeline) == null ? void 0 : N.useMaxWidth) ?? !1
697
+ );
698
+ }, "draw"), st = /* @__PURE__ */ s(function(n, t, e, l, i, d, c, g, m, p, x) {
699
+ var _;
700
+ for (const f of t) {
701
+ const r = {
702
+ descr: f.task,
703
+ section: e,
704
+ number: e,
705
+ width: 150,
706
+ padding: 20,
707
+ maxHeight: d
708
+ };
709
+ E.debug("taskNode", r);
710
+ const a = n.append("g").attr("class", "taskWrapper"), u = F.drawNode(a, r, e, c).height;
711
+ if (E.debug("taskHeight after draw", u), a.attr("transform", `translate(${l}, ${i})`), d = Math.max(d, u), f.events) {
712
+ const y = n.append("g").attr("class", "lineWrapper");
713
+ let o = d;
714
+ i += 100, o = o + Bt(n, f.events, e, l, i, c), i -= 100, y.append("line").attr("x1", l + 190 / 2).attr("y1", i + d).attr("x2", l + 190 / 2).attr("y2", i + d + 100 + m + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
715
+ }
716
+ l = l + 200, x && !((_ = c.timeline) != null && _.disableMulticolor) && e++;
717
+ }
718
+ i = i - 10;
719
+ }, "drawTasks"), Bt = /* @__PURE__ */ s(function(n, t, e, l, i, d) {
720
+ let c = 0;
721
+ const g = i;
722
+ i = i + 100;
723
+ for (const m of t) {
724
+ const p = {
725
+ descr: m,
726
+ section: e,
727
+ number: e,
728
+ width: 150,
729
+ padding: 20,
730
+ maxHeight: 50
731
+ };
732
+ E.debug("eventNode", p);
733
+ const x = n.append("g").attr("class", "eventWrapper"), f = F.drawNode(x, p, e, d).height;
734
+ c = c + f, x.attr("transform", `translate(${l}, ${i})`), i = i + 10 + f;
735
+ }
736
+ return i = g, c;
737
+ }, "drawEvents"), Ot = {
738
+ setConf: /* @__PURE__ */ s(() => {
739
+ }, "setConf"),
740
+ draw: zt
741
+ }, jt = /* @__PURE__ */ s((n) => {
742
+ let t = "";
743
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
744
+ n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], vt(n["lineColor" + e]) ? n["lineColor" + e] = _t(n["lineColor" + e], 20) : n["lineColor" + e] = bt(n["lineColor" + e], 20);
745
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
746
+ const l = "" + (17 - 3 * e);
747
+ t += `
748
+ .section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
749
+ fill: ${n["cScale" + e]};
750
+ }
751
+ .section-${e - 1} text {
752
+ fill: ${n["cScaleLabel" + e]};
753
+ }
754
+ .node-icon-${e - 1} {
755
+ font-size: 40px;
756
+ color: ${n["cScaleLabel" + e]};
757
+ }
758
+ .section-edge-${e - 1}{
759
+ stroke: ${n["cScale" + e]};
760
+ }
761
+ .edge-depth-${e - 1}{
762
+ stroke-width: ${l};
763
+ }
764
+ .section-${e - 1} line {
765
+ stroke: ${n["cScaleInv" + e]} ;
766
+ stroke-width: 3;
767
+ }
768
+
769
+ .lineWrapper line{
770
+ stroke: ${n["cScaleLabel" + e]} ;
771
+ }
772
+
773
+ .disabled, .disabled circle, .disabled text {
774
+ fill: lightgray;
775
+ }
776
+ .disabled text {
777
+ fill: #efefef;
778
+ }
779
+ `;
780
+ }
781
+ return t;
782
+ }, "genSections"), Gt = /* @__PURE__ */ s((n) => `
783
+ .edge {
784
+ stroke-width: 3;
785
+ }
786
+ ${jt(n)}
787
+ .section-root rect, .section-root path, .section-root circle {
788
+ fill: ${n.git0};
789
+ }
790
+ .section-root text {
791
+ fill: ${n.gitBranchLabel0};
792
+ }
793
+ .icon-container {
794
+ height:100%;
795
+ display: flex;
796
+ justify-content: center;
797
+ align-items: center;
798
+ }
799
+ .edge {
800
+ fill: none;
801
+ }
802
+ .eventWrapper {
803
+ filter: brightness(120%);
804
+ }
805
+ `, "getStyles"), qt = Gt, se = {
806
+ db: at,
807
+ renderer: Ot,
808
+ parser: Tt,
809
+ styles: qt
810
+ };
811
+ export {
812
+ se as diagram
813
+ };