@altimateai/ui-components 0.0.77-beta.4 → 0.0.77-beta.6

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 (405) hide show
  1. package/dist/CoachForm.css +1 -1
  2. package/dist/CoachForm.js +62488 -24049
  3. package/dist/DbtDocsRenderer.js +1 -1
  4. package/dist/Stack.js +2826 -2276
  5. package/dist/Switch.js +128 -87
  6. package/dist/ToggleGroup.js +5956 -4781
  7. package/dist/_basePickBy.js +60 -60
  8. package/dist/_baseUniq.js +152 -152
  9. package/dist/abap.js +6 -0
  10. package/dist/actionscript-3.js +6 -0
  11. package/dist/ada.js +6 -0
  12. package/dist/andromeeda.js +4 -0
  13. package/dist/angular-html.js +32 -0
  14. package/dist/angular-ts.js +21 -0
  15. package/dist/apache.js +6 -0
  16. package/dist/apex.js +6 -0
  17. package/dist/apl.js +16 -0
  18. package/dist/applescript.js +6 -0
  19. package/dist/ara.js +6 -0
  20. package/dist/arc.js +53 -53
  21. package/dist/architectureDiagram-VXUJARFQ.js +480 -4315
  22. package/dist/architectureDiagram-VXUJARFQ2.js +831 -0
  23. package/dist/asciidoc.js +6 -0
  24. package/dist/asm.js +6 -0
  25. package/dist/assets/icons/index.js +1 -1
  26. package/dist/astro.js +18 -0
  27. package/dist/aurora-x.js +4 -0
  28. package/dist/awk.js +6 -0
  29. package/dist/ayu-dark.js +4 -0
  30. package/dist/ballerina.js +6 -0
  31. package/dist/band.js +46 -0
  32. package/dist/bat.js +6 -0
  33. package/dist/beancount.js +6 -0
  34. package/dist/berry.js +6 -0
  35. package/dist/bibtex.js +6 -0
  36. package/dist/bicep.js +6 -0
  37. package/dist/blade.js +20 -0
  38. package/dist/blockDiagram-VD42YOAC.js +1 -1
  39. package/dist/blockDiagram-VD42YOAC2.js +2266 -0
  40. package/dist/bsl.js +8 -0
  41. package/dist/c.js +6 -0
  42. package/dist/c3.js +6 -0
  43. package/dist/c4Diagram-YG6GDRKO.js +22 -22
  44. package/dist/c4Diagram-YG6GDRKO2.js +1582 -0
  45. package/dist/cadence.js +6 -0
  46. package/dist/cairo.js +8 -0
  47. package/dist/catppuccin-frappe.js +4 -0
  48. package/dist/catppuccin-latte.js +4 -0
  49. package/dist/catppuccin-macchiato.js +4 -0
  50. package/dist/catppuccin-mocha.js +4 -0
  51. package/dist/channel.js +2 -2
  52. package/dist/chatbotV2/index.d.ts +57 -19
  53. package/dist/chatbotV2/index.js +120 -56
  54. package/dist/chunk-4BX2VUAB.js +1 -1
  55. package/dist/chunk-4BX2VUAB2.js +9 -0
  56. package/dist/chunk-55IACEB6.js +2 -2
  57. package/dist/chunk-55IACEB62.js +9 -0
  58. package/dist/chunk-B4BG7PRW.js +1 -1
  59. package/dist/chunk-B4BG7PRW2.js +1377 -0
  60. package/dist/chunk-DI55MBZ5.js +14 -14
  61. package/dist/chunk-DI55MBZ52.js +1382 -0
  62. package/dist/chunk-FMBD7UC4.js +1 -1
  63. package/dist/chunk-FMBD7UC42.js +19 -0
  64. package/dist/chunk-QN33PNHL.js +5 -5
  65. package/dist/chunk-QN33PNHL2.js +20 -0
  66. package/dist/chunk-QZHKN3VN.js +1 -1
  67. package/dist/chunk-QZHKN3VN2.js +15 -0
  68. package/dist/chunk-TZMSLE5B.js +1 -1
  69. package/dist/chunk-TZMSLE5B2.js +64 -0
  70. package/dist/clarity.js +6 -0
  71. package/dist/classDiagram-2ON5EDUG.js +1 -1
  72. package/dist/classDiagram-2ON5EDUG2.js +17 -0
  73. package/dist/classDiagram-v2-WZHVMYZB.js +1 -1
  74. package/dist/classDiagram-v2-WZHVMYZB2.js +17 -0
  75. package/dist/clojure.js +6 -0
  76. package/dist/cmake.js +6 -0
  77. package/dist/cobol.js +10 -0
  78. package/dist/code-block-37QAKDTI.js +27 -0
  79. package/dist/codeowners.js +6 -0
  80. package/dist/codeql.js +6 -0
  81. package/dist/coffee.js +8 -0
  82. package/dist/common-lisp.js +6 -0
  83. package/dist/coq.js +6 -0
  84. package/dist/cose-bilkent-S5V4N54A.js +160 -2535
  85. package/dist/cose-bilkent-S5V4N54A2.js +231 -0
  86. package/dist/cpp.js +18 -0
  87. package/dist/crystal.js +18 -0
  88. package/dist/csharp.js +6 -0
  89. package/dist/css.js +6 -0
  90. package/dist/csv.js +6 -0
  91. package/dist/cue.js +6 -0
  92. package/dist/cypher.js +6 -0
  93. package/dist/cytoscape-cose-bilkent.js +2380 -0
  94. package/dist/cytoscape-fcose.js +3840 -0
  95. package/dist/d.js +6 -0
  96. package/dist/dagre-6UL2VRFP.js +44 -44
  97. package/dist/dagre-6UL2VRFP2.js +447 -0
  98. package/dist/dark-plus.js +4 -0
  99. package/dist/dart.js +6 -0
  100. package/dist/dax.js +6 -0
  101. package/dist/dayjs.min.js +2 -2
  102. package/dist/defaultLocale.js +3 -3
  103. package/dist/desktop.js +6 -0
  104. package/dist/diagram-PSM6KHXK.js +198 -414
  105. package/dist/diagram-PSM6KHXK2.js +319 -0
  106. package/dist/diagram-QEK2KX5R.js +26 -26
  107. package/dist/diagram-QEK2KX5R2.js +221 -0
  108. package/dist/diagram-S2PKOQOG.js +12 -12
  109. package/dist/diagram-S2PKOQOG2.js +143 -0
  110. package/dist/diff.js +6 -0
  111. package/dist/docker.js +6 -0
  112. package/dist/dotenv.js +6 -0
  113. package/dist/dracula-soft.js +4 -0
  114. package/dist/dracula.js +4 -0
  115. package/dist/dream-maker.js +6 -0
  116. package/dist/edge.js +12 -0
  117. package/dist/elixir.js +8 -0
  118. package/dist/elm.js +8 -0
  119. package/dist/emacs-lisp.js +6 -0
  120. package/dist/erDiagram-Q2GNP2WA.js +1 -1
  121. package/dist/erDiagram-Q2GNP2WA2.js +843 -0
  122. package/dist/erb.js +10 -0
  123. package/dist/erlang.js +8 -0
  124. package/dist/everforest-dark.js +4 -0
  125. package/dist/everforest-light.js +4 -0
  126. package/dist/fennel.js +6 -0
  127. package/dist/fish.js +6 -0
  128. package/dist/flowDiagram-NV44I4VS.js +6 -6
  129. package/dist/flowDiagram-NV44I4VS2.js +1628 -0
  130. package/dist/fluent.js +6 -0
  131. package/dist/fortran-fixed-form.js +8 -0
  132. package/dist/fortran-free-form.js +6 -0
  133. package/dist/fsharp.js +8 -0
  134. package/dist/ganttDiagram-JELNMOA3.js +1788 -0
  135. package/dist/ganttDiagram-LVOFAZNH.js +843 -1718
  136. package/dist/gdresource.js +10 -0
  137. package/dist/gdscript.js +6 -0
  138. package/dist/gdshader.js +6 -0
  139. package/dist/genie.js +6 -0
  140. package/dist/gherkin.js +6 -0
  141. package/dist/git-commit.js +8 -0
  142. package/dist/git-rebase.js +8 -0
  143. package/dist/gitGraphDiagram-NY62KEGX.js +13 -13
  144. package/dist/gitGraphDiagram-NY62KEGX2.js +713 -0
  145. package/dist/github-dark-default.js +4 -0
  146. package/dist/github-dark-dimmed.js +4 -0
  147. package/dist/github-dark-high-contrast.js +4 -0
  148. package/dist/github-dark.js +4 -0
  149. package/dist/github-light-default.js +4 -0
  150. package/dist/github-light-high-contrast.js +4 -0
  151. package/dist/github-light.js +4 -0
  152. package/dist/gleam.js +6 -0
  153. package/dist/glimmer-js.js +14 -0
  154. package/dist/glimmer-ts.js +14 -0
  155. package/dist/glsl.js +8 -0
  156. package/dist/gn.js +6 -0
  157. package/dist/gnuplot.js +6 -0
  158. package/dist/go.js +6 -0
  159. package/dist/graph.js +17 -18
  160. package/dist/graph2.js +246 -0
  161. package/dist/graphql.js +14 -0
  162. package/dist/groovy.js +6 -0
  163. package/dist/gruvbox-dark-hard.js +4 -0
  164. package/dist/gruvbox-dark-medium.js +4 -0
  165. package/dist/gruvbox-dark-soft.js +4 -0
  166. package/dist/gruvbox-light-hard.js +4 -0
  167. package/dist/gruvbox-light-medium.js +4 -0
  168. package/dist/gruvbox-light-soft.js +4 -0
  169. package/dist/hack.js +10 -0
  170. package/dist/haml.js +10 -0
  171. package/dist/handlebars.js +14 -0
  172. package/dist/haskell.js +6 -0
  173. package/dist/haxe.js +6 -0
  174. package/dist/hcl.js +6 -0
  175. package/dist/hjson.js +6 -0
  176. package/dist/hlsl.js +6 -0
  177. package/dist/houston.js +4 -0
  178. package/dist/html-derivative.js +8 -0
  179. package/dist/html.js +10 -0
  180. package/dist/http.js +14 -0
  181. package/dist/hurl.js +12 -0
  182. package/dist/hxml.js +8 -0
  183. package/dist/hy.js +6 -0
  184. package/dist/imba.js +6 -0
  185. package/dist/index.d.ts +2 -2
  186. package/dist/index.js +37 -37
  187. package/dist/index2.js +216 -684
  188. package/dist/index3.js +689 -0
  189. package/dist/infoDiagram-F6ZHWCRC.js +14 -14
  190. package/dist/infoDiagram-WHAUD3N6.js +24 -0
  191. package/dist/ini.js +6 -0
  192. package/dist/java.js +6 -0
  193. package/dist/javascript.js +6 -0
  194. package/dist/jinja.js +11 -0
  195. package/dist/jison.js +8 -0
  196. package/dist/journeyDiagram-XKPGCS4Q.js +1 -1
  197. package/dist/journeyDiagram-XKPGCS4Q2.js +837 -0
  198. package/dist/json.js +6 -0
  199. package/dist/json5.js +6 -0
  200. package/dist/jsonc.js +6 -0
  201. package/dist/jsonl.js +6 -0
  202. package/dist/jsonnet.js +6 -0
  203. package/dist/jssm.js +6 -0
  204. package/dist/jsx.js +6 -0
  205. package/dist/julia.js +16 -0
  206. package/dist/kanagawa-dragon.js +4 -0
  207. package/dist/kanagawa-lotus.js +4 -0
  208. package/dist/kanagawa-wave.js +4 -0
  209. package/dist/kanban-definition-3W4ZIXB7.js +42 -42
  210. package/dist/kanban-definition-3W4ZIXB72.js +720 -0
  211. package/dist/katex2.js +11691 -0
  212. package/dist/kdl.js +6 -0
  213. package/dist/kotlin.js +6 -0
  214. package/dist/kusto.js +6 -0
  215. package/dist/laserwave.js +4 -0
  216. package/dist/latex.js +8 -0
  217. package/dist/layout.js +567 -678
  218. package/dist/layout2.js +1224 -0
  219. package/dist/lean.js +6 -0
  220. package/dist/less.js +6 -0
  221. package/dist/light-plus.js +4 -0
  222. package/dist/lineage/index.js +1234 -1241
  223. package/dist/linear.js +1 -1
  224. package/dist/liquid.js +14 -0
  225. package/dist/llvm.js +6 -0
  226. package/dist/log.js +6 -0
  227. package/dist/logo.js +6 -0
  228. package/dist/lua.js +8 -0
  229. package/dist/luau.js +6 -0
  230. package/dist/main.css +1 -1
  231. package/dist/main.js +82 -82
  232. package/dist/make.js +6 -0
  233. package/dist/markdown.js +6 -0
  234. package/dist/marko.js +14 -0
  235. package/dist/material-theme-darker.js +4 -0
  236. package/dist/material-theme-lighter.js +4 -0
  237. package/dist/material-theme-ocean.js +4 -0
  238. package/dist/material-theme-palenight.js +4 -0
  239. package/dist/material-theme.js +4 -0
  240. package/dist/matlab.js +6 -0
  241. package/dist/mdc.js +12 -0
  242. package/dist/mdx.js +6 -0
  243. package/dist/mermaid-4DMBBIKO.js +4 -0
  244. package/dist/mermaid-parser.core.js +155 -155
  245. package/dist/mermaid.js +6 -0
  246. package/dist/min-dark.js +4 -0
  247. package/dist/min-light.js +4 -0
  248. package/dist/mindmap-definition-VGOIOE7T.js +28 -28
  249. package/dist/mindmap-definition-VGOIOE7T2.js +786 -0
  250. package/dist/mipsasm.js +6 -0
  251. package/dist/mojo.js +6 -0
  252. package/dist/monokai.js +4 -0
  253. package/dist/moonbit.js +6 -0
  254. package/dist/move.js +6 -0
  255. package/dist/narrat.js +6 -0
  256. package/dist/nextflow.js +6 -0
  257. package/dist/nginx.js +8 -0
  258. package/dist/night-owl.js +4 -0
  259. package/dist/nim.js +20 -0
  260. package/dist/nix.js +9 -0
  261. package/dist/nord.js +4 -0
  262. package/dist/nushell.js +6 -0
  263. package/dist/objective-c.js +6 -0
  264. package/dist/objective-cpp.js +6 -0
  265. package/dist/ocaml.js +6 -0
  266. package/dist/one-dark-pro.js +4 -0
  267. package/dist/one-light.js +4 -0
  268. package/dist/openscad.js +6 -0
  269. package/dist/pascal.js +6 -0
  270. package/dist/perl.js +16 -0
  271. package/dist/php.js +18 -0
  272. package/dist/pie.js +45 -0
  273. package/dist/pieDiagram-ADFJNKIX.js +68 -108
  274. package/dist/pieDiagram-ADFJNKIX2.js +123 -0
  275. package/dist/pkl.js +6 -0
  276. package/dist/plastic.js +4 -0
  277. package/dist/plsql.js +6 -0
  278. package/dist/po.js +6 -0
  279. package/dist/poimandres.js +4 -0
  280. package/dist/polar.js +6 -0
  281. package/dist/postcss.js +6 -0
  282. package/dist/powerquery.js +6 -0
  283. package/dist/powershell.js +6 -0
  284. package/dist/prisma.js +6 -0
  285. package/dist/prolog.js +6 -0
  286. package/dist/proto.js +6 -0
  287. package/dist/pug.js +12 -0
  288. package/dist/puppet.js +6 -0
  289. package/dist/purescript.js +6 -0
  290. package/dist/python.js +6 -0
  291. package/dist/qml.js +8 -0
  292. package/dist/qmldir.js +6 -0
  293. package/dist/qss.js +6 -0
  294. package/dist/quadrantDiagram-AYHSOK5B.js +1 -1
  295. package/dist/quadrantDiagram-AYHSOK5B2.js +1025 -0
  296. package/dist/r.js +6 -0
  297. package/dist/racket.js +6 -0
  298. package/dist/raku.js +6 -0
  299. package/dist/razor.js +10 -0
  300. package/dist/red.js +4 -0
  301. package/dist/redux-toolkit.modern.js +563 -555
  302. package/dist/reg.js +6 -0
  303. package/dist/regexp.js +6 -0
  304. package/dist/rel.js +6 -0
  305. package/dist/requirementDiagram-UZGBJVZJ.js +14 -14
  306. package/dist/requirementDiagram-UZGBJVZJ2.js +852 -0
  307. package/dist/riscv.js +6 -0
  308. package/dist/rose-pine-dawn.js +4 -0
  309. package/dist/rose-pine-moon.js +4 -0
  310. package/dist/rose-pine.js +4 -0
  311. package/dist/rosmsg.js +6 -0
  312. package/dist/rst.js +22 -0
  313. package/dist/ruby.js +30 -0
  314. package/dist/rust.js +6 -0
  315. package/dist/sankeyDiagram-TZEHDZUN.js +229 -622
  316. package/dist/sankeyDiagram-TZEHDZUN2.js +418 -0
  317. package/dist/sankeyLinkHorizontal.js +403 -0
  318. package/dist/sas.js +8 -0
  319. package/dist/sass.js +6 -0
  320. package/dist/scala.js +6 -0
  321. package/dist/scheme.js +6 -0
  322. package/dist/scss.js +8 -0
  323. package/dist/sdbl.js +6 -0
  324. package/dist/sequenceDiagram-WL72ISMW.js +1 -1
  325. package/dist/sequenceDiagram-WL72ISMW2.js +2523 -0
  326. package/dist/shadcn/index.d.ts +24 -40
  327. package/dist/shadcn/index.js +7330 -5516
  328. package/dist/shaderlab.js +8 -0
  329. package/dist/shellscript.js +6 -0
  330. package/dist/shellsession.js +8 -0
  331. package/dist/slack-dark.js +4 -0
  332. package/dist/slack-ochin.js +4 -0
  333. package/dist/smalltalk.js +6 -0
  334. package/dist/snazzy-light.js +4 -0
  335. package/dist/solarized-dark.js +4 -0
  336. package/dist/solarized-light.js +4 -0
  337. package/dist/solidity.js +6 -0
  338. package/dist/soy.js +8 -0
  339. package/dist/sparql.js +8 -0
  340. package/dist/splunk.js +6 -0
  341. package/dist/sql.js +6 -0
  342. package/dist/ssh-config.js +6 -0
  343. package/dist/stata.js +8 -0
  344. package/dist/stateDiagram-FKZM4ZOC.js +33 -33
  345. package/dist/stateDiagram-FKZM4ZOC2.js +264 -0
  346. package/dist/stateDiagram-v2-4FDKWEC3.js +6 -6
  347. package/dist/stateDiagram-v2-4FDKWEC32.js +17 -0
  348. package/dist/storybook/Typography.stories.tsx +93 -120
  349. package/dist/stylus.js +6 -0
  350. package/dist/svelte.js +14 -0
  351. package/dist/swift.js +6 -0
  352. package/dist/synthwave-84.js +4 -0
  353. package/dist/system-verilog.js +6 -0
  354. package/dist/systemd.js +6 -0
  355. package/dist/talonscript.js +6 -0
  356. package/dist/tasl.js +6 -0
  357. package/dist/tcl.js +6 -0
  358. package/dist/templ.js +12 -0
  359. package/dist/terraform.js +6 -0
  360. package/dist/tex.js +8 -0
  361. package/dist/time.js +900 -0
  362. package/dist/timeline-definition-IT6M3QCI.js +63 -63
  363. package/dist/timeline-definition-IT6M3QCI2.js +802 -0
  364. package/dist/tokyo-night.js +4 -0
  365. package/dist/toml.js +6 -0
  366. package/dist/ts-tags.js +41 -0
  367. package/dist/tsv.js +6 -0
  368. package/dist/tsx.js +6 -0
  369. package/dist/turtle.js +6 -0
  370. package/dist/twig.js +18 -0
  371. package/dist/{types-ByRPUpXR.d.ts → types-BZH4Xw79.d.ts} +1 -1
  372. package/dist/typescript.js +6 -0
  373. package/dist/typespec.js +6 -0
  374. package/dist/typst.js +6 -0
  375. package/dist/union.js +8 -0
  376. package/dist/v.js +6 -0
  377. package/dist/vala.js +6 -0
  378. package/dist/vb.js +6 -0
  379. package/dist/verilog.js +6 -0
  380. package/dist/vesper.js +4 -0
  381. package/dist/vhdl.js +6 -0
  382. package/dist/viml.js +6 -0
  383. package/dist/vitesse-black.js +4 -0
  384. package/dist/vitesse-dark.js +4 -0
  385. package/dist/vitesse-light.js +4 -0
  386. package/dist/vue-html.js +8 -0
  387. package/dist/vue-vine.js +18 -0
  388. package/dist/vue.js +31 -0
  389. package/dist/vyper.js +6 -0
  390. package/dist/wasm.js +6 -0
  391. package/dist/wasm2.js +7 -0
  392. package/dist/wenyan.js +6 -0
  393. package/dist/wgsl.js +6 -0
  394. package/dist/wikitext.js +6 -0
  395. package/dist/wit.js +6 -0
  396. package/dist/wolfram.js +6 -0
  397. package/dist/xml.js +8 -0
  398. package/dist/xsl.js +8 -0
  399. package/dist/xychartDiagram-PRI3JC2R.js +449 -491
  400. package/dist/xychartDiagram-PRI3JC2R2.js +1299 -0
  401. package/dist/yaml.js +6 -0
  402. package/dist/zenscript.js +6 -0
  403. package/dist/zig.js +6 -0
  404. package/dist/zipObject.js +128 -0
  405. package/package.json +1 -1
@@ -0,0 +1,837 @@
1
+ import { d as gt, f as mt, g as lt, b as xt } from "./chunk-TZMSLE5B2.js";
2
+ import { g as kt } from "./chunk-FMBD7UC42.js";
3
+ import { aG as n, aM as R, aV as _t, aW as vt, aI as bt, aJ as wt, aL as Tt, aK as St, b0 as $t, aT as Mt } from "./CoachForm.js";
4
+ import { s as X } from "./redux-toolkit.modern.js";
5
+ import { d as et } from "./arc.js";
6
+ var U = function() {
7
+ var t = /* @__PURE__ */ n(function(h, i, a, l) {
8
+ for (a = a || {}, l = h.length; l--; a[h[l]] = i) ;
9
+ return a;
10
+ }, "o"), e = [6, 8, 10, 11, 12, 14, 16, 17, 18], s = [1, 9], c = [1, 10], r = [1, 11], f = [1, 12], u = [1, 13], y = [1, 14], g = {
11
+ trace: /* @__PURE__ */ n(function() {
12
+ }, "trace"),
13
+ yy: {},
14
+ symbols_: { error: 2, start: 3, journey: 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, taskName: 18, taskData: 19, $accept: 0, $end: 1 },
15
+ terminals_: { 2: "error", 4: "journey", 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", 18: "taskName", 19: "taskData" },
16
+ 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, 2]],
17
+ performAction: /* @__PURE__ */ n(function(i, a, l, d, p, o, b) {
18
+ var k = o.length - 1;
19
+ switch (p) {
20
+ case 1:
21
+ return o[k - 1];
22
+ case 2:
23
+ this.$ = [];
24
+ break;
25
+ case 3:
26
+ o[k - 1].push(o[k]), this.$ = o[k - 1];
27
+ break;
28
+ case 4:
29
+ case 5:
30
+ this.$ = o[k];
31
+ break;
32
+ case 6:
33
+ case 7:
34
+ this.$ = [];
35
+ break;
36
+ case 8:
37
+ d.setDiagramTitle(o[k].substr(6)), this.$ = o[k].substr(6);
38
+ break;
39
+ case 9:
40
+ this.$ = o[k].trim(), d.setAccTitle(this.$);
41
+ break;
42
+ case 10:
43
+ case 11:
44
+ this.$ = o[k].trim(), d.setAccDescription(this.$);
45
+ break;
46
+ case 12:
47
+ d.addSection(o[k].substr(8)), this.$ = o[k].substr(8);
48
+ break;
49
+ case 13:
50
+ d.addTask(o[k - 1], o[k]), this.$ = "task";
51
+ break;
52
+ }
53
+ }, "anonymous"),
54
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: s, 12: c, 14: r, 16: f, 17: u, 18: y }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 15, 11: s, 12: c, 14: r, 16: f, 17: u, 18: y }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, t(e, [2, 11]), t(e, [2, 12]), { 19: [1, 18] }, t(e, [2, 4]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 13])],
55
+ defaultActions: {},
56
+ parseError: /* @__PURE__ */ n(function(i, a) {
57
+ if (a.recoverable)
58
+ this.trace(i);
59
+ else {
60
+ var l = new Error(i);
61
+ throw l.hash = a, l;
62
+ }
63
+ }, "parseError"),
64
+ parse: /* @__PURE__ */ n(function(i) {
65
+ var a = this, l = [0], d = [], p = [null], o = [], b = this.table, k = "", C = 0, Z = 0, dt = 2, Q = 1, yt = o.slice.call(arguments, 1), _ = Object.create(this.lexer), I = { yy: {} };
66
+ for (var O in this.yy)
67
+ Object.prototype.hasOwnProperty.call(this.yy, O) && (I.yy[O] = this.yy[O]);
68
+ _.setInput(i, I.yy), I.yy.lexer = _, I.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
69
+ var Y = _.yylloc;
70
+ o.push(Y);
71
+ var ft = _.options && _.options.ranges;
72
+ typeof I.yy.parseError == "function" ? this.parseError = I.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
73
+ function pt(w) {
74
+ l.length = l.length - 2 * w, p.length = p.length - w, o.length = o.length - w;
75
+ }
76
+ n(pt, "popStack");
77
+ function D() {
78
+ var w;
79
+ return w = d.pop() || _.lex() || Q, typeof w != "number" && (w instanceof Array && (d = w, w = d.pop()), w = a.symbols_[w] || w), w;
80
+ }
81
+ n(D, "lex");
82
+ for (var v, A, T, q, F = {}, N, M, tt, W; ; ) {
83
+ if (A = l[l.length - 1], this.defaultActions[A] ? T = this.defaultActions[A] : ((v === null || typeof v > "u") && (v = D()), T = b[A] && b[A][v]), typeof T > "u" || !T.length || !T[0]) {
84
+ var G = "";
85
+ W = [];
86
+ for (N in b[A])
87
+ this.terminals_[N] && N > dt && W.push("'" + this.terminals_[N] + "'");
88
+ _.showPosition ? G = "Parse error on line " + (C + 1) + `:
89
+ ` + _.showPosition() + `
90
+ Expecting ` + W.join(", ") + ", got '" + (this.terminals_[v] || v) + "'" : G = "Parse error on line " + (C + 1) + ": Unexpected " + (v == Q ? "end of input" : "'" + (this.terminals_[v] || v) + "'"), this.parseError(G, {
91
+ text: _.match,
92
+ token: this.terminals_[v] || v,
93
+ line: _.yylineno,
94
+ loc: Y,
95
+ expected: W
96
+ });
97
+ }
98
+ if (T[0] instanceof Array && T.length > 1)
99
+ throw new Error("Parse Error: multiple actions possible at state: " + A + ", token: " + v);
100
+ switch (T[0]) {
101
+ case 1:
102
+ l.push(v), p.push(_.yytext), o.push(_.yylloc), l.push(T[1]), v = null, Z = _.yyleng, k = _.yytext, C = _.yylineno, Y = _.yylloc;
103
+ break;
104
+ case 2:
105
+ if (M = this.productions_[T[1]][1], F.$ = p[p.length - M], F._$ = {
106
+ first_line: o[o.length - (M || 1)].first_line,
107
+ last_line: o[o.length - 1].last_line,
108
+ first_column: o[o.length - (M || 1)].first_column,
109
+ last_column: o[o.length - 1].last_column
110
+ }, ft && (F._$.range = [
111
+ o[o.length - (M || 1)].range[0],
112
+ o[o.length - 1].range[1]
113
+ ]), q = this.performAction.apply(F, [
114
+ k,
115
+ Z,
116
+ C,
117
+ I.yy,
118
+ T[1],
119
+ p,
120
+ o
121
+ ].concat(yt)), typeof q < "u")
122
+ return q;
123
+ M && (l = l.slice(0, -1 * M * 2), p = p.slice(0, -1 * M), o = o.slice(0, -1 * M)), l.push(this.productions_[T[1]][0]), p.push(F.$), o.push(F._$), tt = b[l[l.length - 2]][l[l.length - 1]], l.push(tt);
124
+ break;
125
+ case 3:
126
+ return !0;
127
+ }
128
+ }
129
+ return !0;
130
+ }, "parse")
131
+ }, m = /* @__PURE__ */ function() {
132
+ var h = {
133
+ EOF: 1,
134
+ parseError: /* @__PURE__ */ n(function(a, l) {
135
+ if (this.yy.parser)
136
+ this.yy.parser.parseError(a, l);
137
+ else
138
+ throw new Error(a);
139
+ }, "parseError"),
140
+ // resets the lexer, sets new input
141
+ setInput: /* @__PURE__ */ n(function(i, a) {
142
+ return this.yy = a || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
143
+ first_line: 1,
144
+ first_column: 0,
145
+ last_line: 1,
146
+ last_column: 0
147
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
148
+ }, "setInput"),
149
+ // consumes and returns one char from the input
150
+ input: /* @__PURE__ */ n(function() {
151
+ var i = this._input[0];
152
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
153
+ var a = i.match(/(?:\r\n?|\n).*/g);
154
+ 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), i;
155
+ }, "input"),
156
+ // unshifts one char (or a string) into the input
157
+ unput: /* @__PURE__ */ n(function(i) {
158
+ var a = i.length, l = i.split(/(?:\r\n?|\n)/g);
159
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
160
+ var d = this.match.split(/(?:\r\n?|\n)/g);
161
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
162
+ var p = this.yylloc.range;
163
+ return this.yylloc = {
164
+ first_line: this.yylloc.first_line,
165
+ last_line: this.yylineno + 1,
166
+ first_column: this.yylloc.first_column,
167
+ last_column: l ? (l.length === d.length ? this.yylloc.first_column : 0) + d[d.length - l.length].length - l[0].length : this.yylloc.first_column - a
168
+ }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
169
+ }, "unput"),
170
+ // When called from action, caches matched text and appends it on next action
171
+ more: /* @__PURE__ */ n(function() {
172
+ return this._more = !0, this;
173
+ }, "more"),
174
+ // 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.
175
+ reject: /* @__PURE__ */ n(function() {
176
+ if (this.options.backtrack_lexer)
177
+ this._backtrack = !0;
178
+ else
179
+ 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).
180
+ ` + this.showPosition(), {
181
+ text: "",
182
+ token: null,
183
+ line: this.yylineno
184
+ });
185
+ return this;
186
+ }, "reject"),
187
+ // retain first n characters of the match
188
+ less: /* @__PURE__ */ n(function(i) {
189
+ this.unput(this.match.slice(i));
190
+ }, "less"),
191
+ // displays already matched input, i.e. for error messages
192
+ pastInput: /* @__PURE__ */ n(function() {
193
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
194
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
195
+ }, "pastInput"),
196
+ // displays upcoming input, i.e. for error messages
197
+ upcomingInput: /* @__PURE__ */ n(function() {
198
+ var i = this.match;
199
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
200
+ }, "upcomingInput"),
201
+ // displays the character position where the lexing error occurred, i.e. for error messages
202
+ showPosition: /* @__PURE__ */ n(function() {
203
+ var i = this.pastInput(), a = new Array(i.length + 1).join("-");
204
+ return i + this.upcomingInput() + `
205
+ ` + a + "^";
206
+ }, "showPosition"),
207
+ // test the lexed token: return FALSE when not a match, otherwise return token
208
+ test_match: /* @__PURE__ */ n(function(i, a) {
209
+ var l, d, p;
210
+ if (this.options.backtrack_lexer && (p = {
211
+ yylineno: this.yylineno,
212
+ yylloc: {
213
+ first_line: this.yylloc.first_line,
214
+ last_line: this.last_line,
215
+ first_column: this.yylloc.first_column,
216
+ last_column: this.yylloc.last_column
217
+ },
218
+ yytext: this.yytext,
219
+ match: this.match,
220
+ matches: this.matches,
221
+ matched: this.matched,
222
+ yyleng: this.yyleng,
223
+ offset: this.offset,
224
+ _more: this._more,
225
+ _input: this._input,
226
+ yy: this.yy,
227
+ conditionStack: this.conditionStack.slice(0),
228
+ done: this.done
229
+ }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
230
+ first_line: this.yylloc.last_line,
231
+ last_line: this.yylineno + 1,
232
+ first_column: this.yylloc.last_column,
233
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
234
+ }, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], l = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
235
+ return l;
236
+ if (this._backtrack) {
237
+ for (var o in p)
238
+ this[o] = p[o];
239
+ return !1;
240
+ }
241
+ return !1;
242
+ }, "test_match"),
243
+ // return next match in input
244
+ next: /* @__PURE__ */ n(function() {
245
+ if (this.done)
246
+ return this.EOF;
247
+ this._input || (this.done = !0);
248
+ var i, a, l, d;
249
+ this._more || (this.yytext = "", this.match = "");
250
+ for (var p = this._currentRules(), o = 0; o < p.length; o++)
251
+ if (l = this._input.match(this.rules[p[o]]), l && (!a || l[0].length > a[0].length)) {
252
+ if (a = l, d = o, this.options.backtrack_lexer) {
253
+ if (i = this.test_match(l, p[o]), i !== !1)
254
+ return i;
255
+ if (this._backtrack) {
256
+ a = !1;
257
+ continue;
258
+ } else
259
+ return !1;
260
+ } else if (!this.options.flex)
261
+ break;
262
+ }
263
+ return a ? (i = this.test_match(a, p[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
264
+ ` + this.showPosition(), {
265
+ text: "",
266
+ token: null,
267
+ line: this.yylineno
268
+ });
269
+ }, "next"),
270
+ // return next match that has a token
271
+ lex: /* @__PURE__ */ n(function() {
272
+ var a = this.next();
273
+ return a || this.lex();
274
+ }, "lex"),
275
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
276
+ begin: /* @__PURE__ */ n(function(a) {
277
+ this.conditionStack.push(a);
278
+ }, "begin"),
279
+ // pop the previously active lexer condition state off the condition stack
280
+ popState: /* @__PURE__ */ n(function() {
281
+ var a = this.conditionStack.length - 1;
282
+ return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
283
+ }, "popState"),
284
+ // produce the lexer rule set which is active for the currently active lexer condition state
285
+ _currentRules: /* @__PURE__ */ n(function() {
286
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
287
+ }, "_currentRules"),
288
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
289
+ topState: /* @__PURE__ */ n(function(a) {
290
+ return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
291
+ }, "topState"),
292
+ // alias for begin(condition)
293
+ pushState: /* @__PURE__ */ n(function(a) {
294
+ this.begin(a);
295
+ }, "pushState"),
296
+ // return the number of states currently on the stack
297
+ stateStackSize: /* @__PURE__ */ n(function() {
298
+ return this.conditionStack.length;
299
+ }, "stateStackSize"),
300
+ options: { "case-insensitive": !0 },
301
+ performAction: /* @__PURE__ */ n(function(a, l, d, p) {
302
+ switch (d) {
303
+ case 0:
304
+ break;
305
+ case 1:
306
+ break;
307
+ case 2:
308
+ return 10;
309
+ case 3:
310
+ break;
311
+ case 4:
312
+ break;
313
+ case 5:
314
+ return 4;
315
+ case 6:
316
+ return 11;
317
+ case 7:
318
+ return this.begin("acc_title"), 12;
319
+ case 8:
320
+ return this.popState(), "acc_title_value";
321
+ case 9:
322
+ return this.begin("acc_descr"), 14;
323
+ case 10:
324
+ return this.popState(), "acc_descr_value";
325
+ case 11:
326
+ this.begin("acc_descr_multiline");
327
+ break;
328
+ case 12:
329
+ this.popState();
330
+ break;
331
+ case 13:
332
+ return "acc_descr_multiline_value";
333
+ case 14:
334
+ return 17;
335
+ case 15:
336
+ return 18;
337
+ case 16:
338
+ return 19;
339
+ case 17:
340
+ return ":";
341
+ case 18:
342
+ return 6;
343
+ case 19:
344
+ return "INVALID";
345
+ }
346
+ }, "anonymous"),
347
+ rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\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, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
348
+ 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, 19], inclusive: !0 } }
349
+ };
350
+ return h;
351
+ }();
352
+ g.lexer = m;
353
+ function x() {
354
+ this.yy = {};
355
+ }
356
+ return n(x, "Parser"), x.prototype = g, g.Parser = x, new x();
357
+ }();
358
+ U.parser = U;
359
+ var Et = U, V = "", J = [], L = [], B = [], Ct = /* @__PURE__ */ n(function() {
360
+ J.length = 0, L.length = 0, V = "", B.length = 0, $t();
361
+ }, "clear"), Pt = /* @__PURE__ */ n(function(t) {
362
+ V = t, J.push(t);
363
+ }, "addSection"), It = /* @__PURE__ */ n(function() {
364
+ return J;
365
+ }, "getSections"), At = /* @__PURE__ */ n(function() {
366
+ let t = it();
367
+ const e = 100;
368
+ let s = 0;
369
+ for (; !t && s < e; )
370
+ t = it(), s++;
371
+ return L.push(...B), L;
372
+ }, "getTasks"), Ft = /* @__PURE__ */ n(function() {
373
+ const t = [];
374
+ return L.forEach((s) => {
375
+ s.people && t.push(...s.people);
376
+ }), [...new Set(t)].sort();
377
+ }, "updateActors"), Vt = /* @__PURE__ */ n(function(t, e) {
378
+ const s = e.substr(1).split(":");
379
+ let c = 0, r = [];
380
+ s.length === 1 ? (c = Number(s[0]), r = []) : (c = Number(s[0]), r = s[1].split(","));
381
+ const f = r.map((y) => y.trim()), u = {
382
+ section: V,
383
+ type: V,
384
+ people: f,
385
+ task: t,
386
+ score: c
387
+ };
388
+ B.push(u);
389
+ }, "addTask"), Rt = /* @__PURE__ */ n(function(t) {
390
+ const e = {
391
+ section: V,
392
+ type: V,
393
+ description: t,
394
+ task: t,
395
+ classes: []
396
+ };
397
+ L.push(e);
398
+ }, "addTaskOrg"), it = /* @__PURE__ */ n(function() {
399
+ const t = /* @__PURE__ */ n(function(s) {
400
+ return B[s].processed;
401
+ }, "compileTask");
402
+ let e = !0;
403
+ for (const [s, c] of B.entries())
404
+ t(s), e = e && c.processed;
405
+ return e;
406
+ }, "compileTasks"), Lt = /* @__PURE__ */ n(function() {
407
+ return Ft();
408
+ }, "getActors"), rt = {
409
+ getConfig: /* @__PURE__ */ n(() => R().journey, "getConfig"),
410
+ clear: Ct,
411
+ setDiagramTitle: _t,
412
+ getDiagramTitle: vt,
413
+ setAccTitle: bt,
414
+ getAccTitle: wt,
415
+ setAccDescription: Tt,
416
+ getAccDescription: St,
417
+ addSection: Pt,
418
+ getSections: It,
419
+ getTasks: At,
420
+ addTask: Vt,
421
+ addTaskOrg: Rt,
422
+ getActors: Lt
423
+ }, Bt = /* @__PURE__ */ n((t) => `.label {
424
+ font-family: ${t.fontFamily};
425
+ color: ${t.textColor};
426
+ }
427
+ .mouth {
428
+ stroke: #666;
429
+ }
430
+
431
+ line {
432
+ stroke: ${t.textColor}
433
+ }
434
+
435
+ .legend {
436
+ fill: ${t.textColor};
437
+ font-family: ${t.fontFamily};
438
+ }
439
+
440
+ .label text {
441
+ fill: #333;
442
+ }
443
+ .label {
444
+ color: ${t.textColor}
445
+ }
446
+
447
+ .face {
448
+ ${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
449
+ stroke: #999;
450
+ }
451
+
452
+ .node rect,
453
+ .node circle,
454
+ .node ellipse,
455
+ .node polygon,
456
+ .node path {
457
+ fill: ${t.mainBkg};
458
+ stroke: ${t.nodeBorder};
459
+ stroke-width: 1px;
460
+ }
461
+
462
+ .node .label {
463
+ text-align: center;
464
+ }
465
+ .node.clickable {
466
+ cursor: pointer;
467
+ }
468
+
469
+ .arrowheadPath {
470
+ fill: ${t.arrowheadColor};
471
+ }
472
+
473
+ .edgePath .path {
474
+ stroke: ${t.lineColor};
475
+ stroke-width: 1.5px;
476
+ }
477
+
478
+ .flowchart-link {
479
+ stroke: ${t.lineColor};
480
+ fill: none;
481
+ }
482
+
483
+ .edgeLabel {
484
+ background-color: ${t.edgeLabelBackground};
485
+ rect {
486
+ opacity: 0.5;
487
+ }
488
+ text-align: center;
489
+ }
490
+
491
+ .cluster rect {
492
+ }
493
+
494
+ .cluster text {
495
+ fill: ${t.titleColor};
496
+ }
497
+
498
+ div.mermaidTooltip {
499
+ position: absolute;
500
+ text-align: center;
501
+ max-width: 200px;
502
+ padding: 2px;
503
+ font-family: ${t.fontFamily};
504
+ font-size: 12px;
505
+ background: ${t.tertiaryColor};
506
+ border: 1px solid ${t.border2};
507
+ border-radius: 2px;
508
+ pointer-events: none;
509
+ z-index: 100;
510
+ }
511
+
512
+ .task-type-0, .section-type-0 {
513
+ ${t.fillType0 ? `fill: ${t.fillType0}` : ""};
514
+ }
515
+ .task-type-1, .section-type-1 {
516
+ ${t.fillType0 ? `fill: ${t.fillType1}` : ""};
517
+ }
518
+ .task-type-2, .section-type-2 {
519
+ ${t.fillType0 ? `fill: ${t.fillType2}` : ""};
520
+ }
521
+ .task-type-3, .section-type-3 {
522
+ ${t.fillType0 ? `fill: ${t.fillType3}` : ""};
523
+ }
524
+ .task-type-4, .section-type-4 {
525
+ ${t.fillType0 ? `fill: ${t.fillType4}` : ""};
526
+ }
527
+ .task-type-5, .section-type-5 {
528
+ ${t.fillType0 ? `fill: ${t.fillType5}` : ""};
529
+ }
530
+ .task-type-6, .section-type-6 {
531
+ ${t.fillType0 ? `fill: ${t.fillType6}` : ""};
532
+ }
533
+ .task-type-7, .section-type-7 {
534
+ ${t.fillType0 ? `fill: ${t.fillType7}` : ""};
535
+ }
536
+
537
+ .actor-0 {
538
+ ${t.actor0 ? `fill: ${t.actor0}` : ""};
539
+ }
540
+ .actor-1 {
541
+ ${t.actor1 ? `fill: ${t.actor1}` : ""};
542
+ }
543
+ .actor-2 {
544
+ ${t.actor2 ? `fill: ${t.actor2}` : ""};
545
+ }
546
+ .actor-3 {
547
+ ${t.actor3 ? `fill: ${t.actor3}` : ""};
548
+ }
549
+ .actor-4 {
550
+ ${t.actor4 ? `fill: ${t.actor4}` : ""};
551
+ }
552
+ .actor-5 {
553
+ ${t.actor5 ? `fill: ${t.actor5}` : ""};
554
+ }
555
+ ${kt()}
556
+ `, "getStyles"), jt = Bt, K = /* @__PURE__ */ n(function(t, e) {
557
+ return gt(t, e);
558
+ }, "drawRect"), Nt = /* @__PURE__ */ n(function(t, e) {
559
+ const c = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), r = t.append("g");
560
+ r.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), r.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
561
+ function f(g) {
562
+ const m = et().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
563
+ g.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
564
+ }
565
+ n(f, "smile");
566
+ function u(g) {
567
+ const m = et().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
568
+ g.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
569
+ }
570
+ n(u, "sad");
571
+ function y(g) {
572
+ g.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", e.cx - 5).attr("y1", e.cy + 7).attr("x2", e.cx + 5).attr("y2", e.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
573
+ }
574
+ return n(y, "ambivalent"), e.score > 3 ? f(r) : e.score < 3 ? u(r) : y(r), c;
575
+ }, "drawFace"), ot = /* @__PURE__ */ n(function(t, e) {
576
+ const s = t.append("circle");
577
+ return s.attr("cx", e.cx), s.attr("cy", e.cy), s.attr("class", "actor-" + e.pos), s.attr("fill", e.fill), s.attr("stroke", e.stroke), s.attr("r", e.r), s.class !== void 0 && s.attr("class", s.class), e.title !== void 0 && s.append("title").text(e.title), s;
578
+ }, "drawCircle"), ct = /* @__PURE__ */ n(function(t, e) {
579
+ return mt(t, e);
580
+ }, "drawText"), Wt = /* @__PURE__ */ n(function(t, e) {
581
+ function s(r, f, u, y, g) {
582
+ return r + "," + f + " " + (r + u) + "," + f + " " + (r + u) + "," + (f + y - g) + " " + (r + u - g * 1.2) + "," + (f + y) + " " + r + "," + (f + y);
583
+ }
584
+ n(s, "genPoints");
585
+ const c = t.append("polygon");
586
+ c.attr("points", s(e.x, e.y, 50, 20, 7)), c.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, ct(t, e);
587
+ }, "drawLabel"), zt = /* @__PURE__ */ n(function(t, e, s) {
588
+ const c = t.append("g"), r = lt();
589
+ r.x = e.x, r.y = e.y, r.fill = e.fill, r.width = s.width * e.taskCount + // width of the tasks
590
+ s.diagramMarginX * (e.taskCount - 1), r.height = s.height, r.class = "journey-section section-type-" + e.num, r.rx = 3, r.ry = 3, K(c, r), ht(s)(
591
+ e.text,
592
+ c,
593
+ r.x,
594
+ r.y,
595
+ r.width,
596
+ r.height,
597
+ { class: "journey-section section-type-" + e.num },
598
+ s,
599
+ e.colour
600
+ );
601
+ }, "drawSection"), nt = -1, Ot = /* @__PURE__ */ n(function(t, e, s) {
602
+ const c = e.x + s.width / 2, r = t.append("g");
603
+ nt++;
604
+ const f = 300 + 5 * 30;
605
+ r.append("line").attr("id", "task" + nt).attr("x1", c).attr("y1", e.y).attr("x2", c).attr("y2", f).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Nt(r, {
606
+ cx: c,
607
+ cy: 300 + (5 - e.score) * 30,
608
+ score: e.score
609
+ });
610
+ const u = lt();
611
+ u.x = e.x, u.y = e.y, u.fill = e.fill, u.width = s.width, u.height = s.height, u.class = "task task-type-" + e.num, u.rx = 3, u.ry = 3, K(r, u);
612
+ let y = e.x + 14;
613
+ e.people.forEach((g) => {
614
+ const m = e.actors[g].color, x = {
615
+ cx: y,
616
+ cy: e.y,
617
+ r: 7,
618
+ fill: m,
619
+ stroke: "#000",
620
+ title: g,
621
+ pos: e.actors[g].position
622
+ };
623
+ ot(r, x), y += 10;
624
+ }), ht(s)(
625
+ e.task,
626
+ r,
627
+ u.x,
628
+ u.y,
629
+ u.width,
630
+ u.height,
631
+ { class: "task" },
632
+ s,
633
+ e.colour
634
+ );
635
+ }, "drawTask"), Yt = /* @__PURE__ */ n(function(t, e) {
636
+ xt(t, e);
637
+ }, "drawBackgroundRect"), ht = /* @__PURE__ */ function() {
638
+ function t(r, f, u, y, g, m, x, h) {
639
+ const i = f.append("text").attr("x", u + g / 2).attr("y", y + m / 2 + 5).style("font-color", h).style("text-anchor", "middle").text(r);
640
+ c(i, x);
641
+ }
642
+ n(t, "byText");
643
+ function e(r, f, u, y, g, m, x, h, i) {
644
+ const { taskFontSize: a, taskFontFamily: l } = h, d = r.split(/<br\s*\/?>/gi);
645
+ for (let p = 0; p < d.length; p++) {
646
+ const o = p * a - a * (d.length - 1) / 2, b = f.append("text").attr("x", u + g / 2).attr("y", y).attr("fill", i).style("text-anchor", "middle").style("font-size", a).style("font-family", l);
647
+ b.append("tspan").attr("x", u + g / 2).attr("dy", o).text(d[p]), b.attr("y", y + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), c(b, x);
648
+ }
649
+ }
650
+ n(e, "byTspan");
651
+ function s(r, f, u, y, g, m, x, h) {
652
+ const i = f.append("switch"), l = i.append("foreignObject").attr("x", u).attr("y", y).attr("width", g).attr("height", m).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
653
+ l.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), e(r, i, u, y, g, m, x, h), c(l, x);
654
+ }
655
+ n(s, "byFo");
656
+ function c(r, f) {
657
+ for (const u in f)
658
+ u in f && r.attr(u, f[u]);
659
+ }
660
+ return n(c, "_setTextAttrs"), function(r) {
661
+ return r.textPlacement === "fo" ? s : r.textPlacement === "old" ? t : e;
662
+ };
663
+ }(), qt = /* @__PURE__ */ n(function(t) {
664
+ t.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");
665
+ }, "initGraphics"), j = {
666
+ drawRect: K,
667
+ drawCircle: ot,
668
+ drawSection: zt,
669
+ drawText: ct,
670
+ drawLabel: Wt,
671
+ drawTask: Ot,
672
+ drawBackgroundRect: Yt,
673
+ initGraphics: qt
674
+ }, Gt = /* @__PURE__ */ n(function(t) {
675
+ Object.keys(t).forEach(function(s) {
676
+ $[s] = t[s];
677
+ });
678
+ }, "setConf"), E = {}, z = 0;
679
+ function ut(t) {
680
+ const e = R().journey, s = e.maxLabelWidth;
681
+ z = 0;
682
+ let c = 60;
683
+ Object.keys(E).forEach((r) => {
684
+ const f = E[r].color, u = {
685
+ cx: 20,
686
+ cy: c,
687
+ r: 7,
688
+ fill: f,
689
+ stroke: "#000",
690
+ pos: E[r].position
691
+ };
692
+ j.drawCircle(t, u);
693
+ let y = t.append("text").attr("visibility", "hidden").text(r);
694
+ const g = y.node().getBoundingClientRect().width;
695
+ y.remove();
696
+ let m = [];
697
+ if (g <= s)
698
+ m = [r];
699
+ else {
700
+ const x = r.split(" ");
701
+ let h = "";
702
+ y = t.append("text").attr("visibility", "hidden"), x.forEach((i) => {
703
+ const a = h ? `${h} ${i}` : i;
704
+ if (y.text(a), y.node().getBoundingClientRect().width > s) {
705
+ if (h && m.push(h), h = i, y.text(i), y.node().getBoundingClientRect().width > s) {
706
+ let d = "";
707
+ for (const p of i)
708
+ d += p, y.text(d + "-"), y.node().getBoundingClientRect().width > s && (m.push(d.slice(0, -1) + "-"), d = p);
709
+ h = d;
710
+ }
711
+ } else
712
+ h = a;
713
+ }), h && m.push(h), y.remove();
714
+ }
715
+ m.forEach((x, h) => {
716
+ const i = {
717
+ x: 40,
718
+ y: c + 7 + h * 20,
719
+ fill: "#666",
720
+ text: x,
721
+ textMargin: e.boxTextMargin ?? 5
722
+ }, l = j.drawText(t, i).node().getBoundingClientRect().width;
723
+ l > z && l > e.leftMargin - l && (z = l);
724
+ }), c += Math.max(20, m.length * 20);
725
+ });
726
+ }
727
+ n(ut, "drawActorLegend");
728
+ var $ = R().journey, P = 0, Xt = /* @__PURE__ */ n(function(t, e, s, c) {
729
+ const r = R(), f = r.journey.titleColor, u = r.journey.titleFontSize, y = r.journey.titleFontFamily, g = r.securityLevel;
730
+ let m;
731
+ g === "sandbox" && (m = X("#i" + e));
732
+ const x = g === "sandbox" ? X(m.nodes()[0].contentDocument.body) : X("body");
733
+ S.init();
734
+ const h = x.select("#" + e);
735
+ j.initGraphics(h);
736
+ const i = c.db.getTasks(), a = c.db.getDiagramTitle(), l = c.db.getActors();
737
+ for (const C in E)
738
+ delete E[C];
739
+ let d = 0;
740
+ l.forEach((C) => {
741
+ E[C] = {
742
+ color: $.actorColours[d % $.actorColours.length],
743
+ position: d
744
+ }, d++;
745
+ }), ut(h), P = $.leftMargin + z, S.insert(0, 0, P, Object.keys(E).length * 50), Ht(h, i, 0);
746
+ const p = S.getBounds();
747
+ a && h.append("text").text(a).attr("x", P).attr("font-size", u).attr("font-weight", "bold").attr("y", 25).attr("fill", f).attr("font-family", y);
748
+ const o = p.stopy - p.starty + 2 * $.diagramMarginY, b = P + p.stopx + 2 * $.diagramMarginX;
749
+ Mt(h, o, b, $.useMaxWidth), h.append("line").attr("x1", P).attr("y1", $.height * 4).attr("x2", b - P - 4).attr("y2", $.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
750
+ const k = a ? 70 : 0;
751
+ h.attr("viewBox", `${p.startx} -25 ${b} ${o + k}`), h.attr("preserveAspectRatio", "xMinYMin meet"), h.attr("height", o + k + 25);
752
+ }, "draw"), S = {
753
+ data: {
754
+ startx: void 0,
755
+ stopx: void 0,
756
+ starty: void 0,
757
+ stopy: void 0
758
+ },
759
+ verticalPos: 0,
760
+ sequenceItems: [],
761
+ init: /* @__PURE__ */ n(function() {
762
+ this.sequenceItems = [], this.data = {
763
+ startx: void 0,
764
+ stopx: void 0,
765
+ starty: void 0,
766
+ stopy: void 0
767
+ }, this.verticalPos = 0;
768
+ }, "init"),
769
+ updateVal: /* @__PURE__ */ n(function(t, e, s, c) {
770
+ t[e] === void 0 ? t[e] = s : t[e] = c(s, t[e]);
771
+ }, "updateVal"),
772
+ updateBounds: /* @__PURE__ */ n(function(t, e, s, c) {
773
+ const r = R().journey, f = this;
774
+ let u = 0;
775
+ function y(g) {
776
+ return /* @__PURE__ */ n(function(x) {
777
+ u++;
778
+ const h = f.sequenceItems.length - u + 1;
779
+ f.updateVal(x, "starty", e - h * r.boxMargin, Math.min), f.updateVal(x, "stopy", c + h * r.boxMargin, Math.max), f.updateVal(S.data, "startx", t - h * r.boxMargin, Math.min), f.updateVal(S.data, "stopx", s + h * r.boxMargin, Math.max), g !== "activation" && (f.updateVal(x, "startx", t - h * r.boxMargin, Math.min), f.updateVal(x, "stopx", s + h * r.boxMargin, Math.max), f.updateVal(S.data, "starty", e - h * r.boxMargin, Math.min), f.updateVal(S.data, "stopy", c + h * r.boxMargin, Math.max));
780
+ }, "updateItemBounds");
781
+ }
782
+ n(y, "updateFn"), this.sequenceItems.forEach(y());
783
+ }, "updateBounds"),
784
+ insert: /* @__PURE__ */ n(function(t, e, s, c) {
785
+ const r = Math.min(t, s), f = Math.max(t, s), u = Math.min(e, c), y = Math.max(e, c);
786
+ this.updateVal(S.data, "startx", r, Math.min), this.updateVal(S.data, "starty", u, Math.min), this.updateVal(S.data, "stopx", f, Math.max), this.updateVal(S.data, "stopy", y, Math.max), this.updateBounds(r, u, f, y);
787
+ }, "insert"),
788
+ bumpVerticalPos: /* @__PURE__ */ n(function(t) {
789
+ this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
790
+ }, "bumpVerticalPos"),
791
+ getVerticalPos: /* @__PURE__ */ n(function() {
792
+ return this.verticalPos;
793
+ }, "getVerticalPos"),
794
+ getBounds: /* @__PURE__ */ n(function() {
795
+ return this.data;
796
+ }, "getBounds")
797
+ }, H = $.sectionFills, st = $.sectionColours, Ht = /* @__PURE__ */ n(function(t, e, s) {
798
+ const c = R().journey;
799
+ let r = "";
800
+ const f = c.height * 2 + c.diagramMarginY, u = s + f;
801
+ let y = 0, g = "#CCC", m = "black", x = 0;
802
+ for (const [h, i] of e.entries()) {
803
+ if (r !== i.section) {
804
+ g = H[y % H.length], x = y % H.length, m = st[y % st.length];
805
+ let l = 0;
806
+ const d = i.section;
807
+ for (let o = h; o < e.length && e[o].section == d; o++)
808
+ l = l + 1;
809
+ const p = {
810
+ x: h * c.taskMargin + h * c.width + P,
811
+ y: 50,
812
+ text: i.section,
813
+ fill: g,
814
+ num: x,
815
+ colour: m,
816
+ taskCount: l
817
+ };
818
+ j.drawSection(t, p, c), r = i.section, y++;
819
+ }
820
+ const a = i.people.reduce((l, d) => (E[d] && (l[d] = E[d]), l), {});
821
+ i.x = h * c.taskMargin + h * c.width + P, i.y = u, i.width = c.diagramMarginX, i.height = c.diagramMarginY, i.colour = m, i.fill = g, i.num = x, i.actors = a, j.drawTask(t, i, c), S.insert(i.x, i.y, i.x + i.width + c.taskMargin, 300 + 5 * 30);
822
+ }
823
+ }, "drawTasks"), at = {
824
+ setConf: Gt,
825
+ draw: Xt
826
+ }, Dt = {
827
+ parser: Et,
828
+ db: rt,
829
+ renderer: at,
830
+ styles: jt,
831
+ init: /* @__PURE__ */ n((t) => {
832
+ at.setConf(t.journey), rt.clear();
833
+ }, "init")
834
+ };
835
+ export {
836
+ Dt as diagram
837
+ };