@bkm016/basalt 0.1.5 → 0.1.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 (199) hide show
  1. package/README.md +9 -7
  2. package/{chunk-gw05p4g3.js → chunk-053vb71h.js} +1 -1
  3. package/{chunk-3c330qna.js → chunk-063vbmtp.js} +2 -2
  4. package/{chunk-bgkegf0k.js → chunk-0javrjcm.js} +4 -4
  5. package/{chunk-pjr91g6k.js → chunk-10p3mb40.js} +1 -1
  6. package/{chunk-mkp28k1x.js → chunk-39vwrg8n.js} +2 -2
  7. package/{chunk-8xb636vr.js → chunk-6kdgk70p.js} +2 -2
  8. package/{chunk-9z7sdh5e.js → chunk-6ptv4g5e.js} +1 -1
  9. package/{chunk-zzwjt7fp.js → chunk-75434aay.js} +1 -1
  10. package/{chunk-ar3dbfp9.js → chunk-7hr6zw2m.js} +1 -1
  11. package/{chunk-h1rypb99.js → chunk-8gw5bvh3.js} +4 -4
  12. package/{chunk-a4b75ekk.js → chunk-8saewt61.js} +2 -2
  13. package/{chunk-sqaam5ak.js → chunk-8wj32837.js} +1 -1
  14. package/{chunk-539ekagy.js → chunk-8wv5t0w6.js} +5 -5
  15. package/{chunk-aw65h276.js → chunk-8x21n7y9.js} +1 -1
  16. package/{chunk-0n99m9m4.js → chunk-a0c989ky.js} +1 -1
  17. package/{chunk-srjgvdvs.js → chunk-a5apjjcn.js} +6 -6
  18. package/chunk-a81p46j7.js +2 -0
  19. package/chunk-agsfy9w7.js +2 -0
  20. package/{chunk-2qcpq99g.js → chunk-arcqjt91.js} +1 -1
  21. package/{chunk-rxj6tct8.js → chunk-bdy4jksd.js} +1 -1
  22. package/{chunk-zrkh5dw7.js → chunk-benrzwea.js} +1 -1
  23. package/chunk-bpw6q7g0.js +3 -0
  24. package/{chunk-36cqq0ga.js → chunk-c7rcw9fb.js} +5 -5
  25. package/{chunk-x89em726.js → chunk-ca982n62.js} +1 -1
  26. package/chunk-d20p02ny.js +2 -0
  27. package/{chunk-5v4g21rw.js → chunk-d6p2hgxh.js} +1 -1
  28. package/{chunk-t7sc0wwc.js → chunk-dnx91jrd.js} +2 -2
  29. package/{chunk-mat08ab1.js → chunk-dpz4hwqb.js} +2 -2
  30. package/{chunk-zn0g0859.js → chunk-ebpyvs1d.js} +2 -2
  31. package/{chunk-00gwse5r.js → chunk-ecf896fz.js} +1 -1
  32. package/{chunk-0stvywr8.js → chunk-ejsneb6f.js} +1 -1
  33. package/{chunk-7as47pcw.js → chunk-ey15ye2h.js} +1 -1
  34. package/{chunk-v4k3qmdm.js → chunk-f156y565.js} +1 -1
  35. package/{chunk-7tgqhveh.js → chunk-f544p9rh.js} +1 -1
  36. package/chunk-fmq3zwzk.js +2 -0
  37. package/{chunk-ebzkckyw.js → chunk-fx7f4m3c.js} +1 -1
  38. package/{chunk-3k7ejpkc.js → chunk-g0t9c3gv.js} +1 -1
  39. package/{chunk-7w0mefgk.js → chunk-gv7wqkey.js} +2 -2
  40. package/{chunk-2nkfxhef.js → chunk-hksqjts3.js} +252 -236
  41. package/{chunk-1xa7d5mh.js → chunk-j7yvh0ae.js} +1 -1
  42. package/{chunk-0j0qggej.js → chunk-n85qs7cs.js} +1 -1
  43. package/{chunk-7qq99360.js → chunk-n981vx1t.js} +4 -4
  44. package/{chunk-0fwdxd45.js → chunk-peja51xv.js} +1 -1
  45. package/{chunk-6dsq0fns.js → chunk-pg5nkf1y.js} +1 -1
  46. package/{chunk-jyrwk08p.js → chunk-prgm07j4.js} +1 -1
  47. package/{chunk-jvwg4rn1.js → chunk-q9dd6fhj.js} +4 -4
  48. package/{chunk-nxkmd29x.js → chunk-r8vvcp6c.js} +1 -1
  49. package/{chunk-stj493dn.js → chunk-r9aatvwm.js} +2 -2
  50. package/chunk-rfb85nj7.js +2 -0
  51. package/{chunk-980drajf.js → chunk-rfdt992v.js} +12 -12
  52. package/{chunk-e63c1186.js → chunk-s6dejhfj.js} +1 -1
  53. package/{chunk-wfyrfvfn.js → chunk-s7skpgm2.js} +1 -1
  54. package/{chunk-dddsrff6.js → chunk-tgfbtehh.js} +123 -121
  55. package/{chunk-r0jc8e7t.js → chunk-w67dvqtb.js} +2 -2
  56. package/{chunk-b9fqretv.js → chunk-whj87h4r.js} +2 -2
  57. package/{chunk-vt1anydc.js → chunk-y8dkfpmj.js} +3 -3
  58. package/{chunk-nx3jnbv8.js → chunk-z02sj1je.js} +2 -2
  59. package/{chunk-hq5ke1yp.js → chunk-zxkq9m8e.js} +1 -1
  60. package/compiled.js +3 -3
  61. package/package.json +1 -1
  62. package/ui-test-worker.js +27 -27
  63. package/web/{chunk-56krfj3b.js → chunk-03dmzvaq.js} +1 -1
  64. package/web/{chunk-affear07.js → chunk-0fgaepwm.js} +1 -1
  65. package/web/{chunk-vhzys0rr.js → chunk-0gg00f86.js} +1 -1
  66. package/web/chunk-0pecj6d7.js +1 -0
  67. package/web/chunk-0wt1dgny.js +1 -0
  68. package/web/{chunk-gxqaa4sv.js → chunk-12xxh71x.js} +5 -5
  69. package/web/chunk-1ves7sq5.js +1 -0
  70. package/web/chunk-1yj79b48.js +1 -0
  71. package/web/{chunk-x7sb3bwf.js → chunk-296hgy6k.js} +22 -22
  72. package/web/{chunk-jcdw85mv.js → chunk-2bmq1whf.js} +1 -1
  73. package/web/{chunk-1s2hp6h1.js → chunk-2wqxhqr9.js} +1 -1
  74. package/web/{chunk-y7jq61nv.js → chunk-30b33r2w.js} +2 -2
  75. package/web/{chunk-g8kkc6vz.js → chunk-30zfw7zg.js} +1 -1
  76. package/web/chunk-39ng8zwx.css +1 -0
  77. package/web/{chunk-0qr891eq.js → chunk-3de552rg.js} +1 -1
  78. package/web/{chunk-3hkgdw6f.js → chunk-3nbzj48p.js} +3 -3
  79. package/web/{chunk-12z7d0hp.js → chunk-3zebd9fq.js} +1 -1
  80. package/web/chunk-4r1n98zx.js +2 -0
  81. package/web/chunk-59678wmg.js +1 -0
  82. package/web/{chunk-pyg1mr80.js → chunk-5v44qv67.js} +20 -20
  83. package/web/chunk-5wdk97mk.js +4 -0
  84. package/web/{chunk-fnnrrzqa.js → chunk-64rafq66.js} +1 -1
  85. package/web/{chunk-qrdh9j62.js → chunk-6kkw9ptc.js} +1 -1
  86. package/web/{chunk-01hcjafh.js → chunk-718mr5gc.js} +1 -1
  87. package/web/chunk-7hs57qdr.js +1 -0
  88. package/web/{chunk-aqt7kc3s.js → chunk-7kp237t3.js} +1 -1
  89. package/web/chunk-86p42kym.js +1 -0
  90. package/web/chunk-8n79cqyd.js +1 -0
  91. package/web/{chunk-paywgcf7.js → chunk-96v2avmw.js} +2 -2
  92. package/web/{chunk-4a4j030b.js → chunk-9an6wcnr.js} +1 -1
  93. package/web/{chunk-dzg1pv80.js → chunk-9c1yt2ex.js} +3 -3
  94. package/web/{chunk-d60dpf69.js → chunk-a7gtb4kg.js} +1 -1
  95. package/web/chunk-b985y17w.js +2 -0
  96. package/web/{chunk-j34q5jn6.js → chunk-bz2v64xe.js} +1 -1
  97. package/web/{chunk-g9sqbafw.js → chunk-cb2rxtq9.js} +1 -1
  98. package/web/{chunk-g5jxwkdh.js → chunk-ck8rr0sr.js} +1 -1
  99. package/web/{chunk-zc1mk10n.js → chunk-cktmyc13.js} +2 -2
  100. package/web/{chunk-tcp77cp2.js → chunk-cm92fyr3.js} +1 -1
  101. package/web/chunk-cwtn2kdm.js +1 -0
  102. package/web/{chunk-ka7c5rhx.js → chunk-czq1yz51.js} +6 -6
  103. package/web/{chunk-qq5gh5zr.js → chunk-d4z2rgpx.js} +1 -1
  104. package/web/{chunk-0k9aec1s.js → chunk-d6tbw8br.js} +3 -3
  105. package/web/chunk-dpkyygej.js +1 -0
  106. package/web/{chunk-m8knte9z.js → chunk-dwajwrpk.js} +1 -1
  107. package/web/{chunk-7e47b1sn.js → chunk-et5ess72.js} +1 -1
  108. package/web/chunk-ez8b6neq.js +1 -0
  109. package/web/{chunk-9xgspn75.js → chunk-f5txt81n.js} +2 -2
  110. package/web/chunk-fd1kqwe3.js +1 -0
  111. package/web/chunk-fmthkpff.js +1 -0
  112. package/web/{chunk-h2ag4kvz.js → chunk-fp48zz2e.js} +1 -1
  113. package/web/{chunk-1pasbxwh.js → chunk-fx0n2g22.js} +1 -1
  114. package/web/{chunk-bnb9xhgw.js → chunk-fxs4nb93.js} +6 -6
  115. package/web/{chunk-sd22cnjy.js → chunk-g6k9z8zt.js} +1 -1
  116. package/web/{chunk-5shygfgb.js → chunk-g81h1e6n.js} +2 -2
  117. package/web/{chunk-zz397b0v.js → chunk-gsh80797.js} +1 -1
  118. package/web/chunk-hs5x78fb.js +1 -0
  119. package/web/{chunk-abhad4zj.js → chunk-ht1dzftc.js} +4 -4
  120. package/web/{chunk-zqht0jzx.js → chunk-hy4m34qp.js} +1 -1
  121. package/web/chunk-hyd5hzpa.js +1 -0
  122. package/web/chunk-hyt1nkaw.js +1 -0
  123. package/web/chunk-j6a4z530.js +1139 -0
  124. package/web/{chunk-h6gh63xj.js → chunk-jve1zc80.js} +1 -1
  125. package/web/{chunk-vttgyb5v.js → chunk-kegv14sg.js} +1 -1
  126. package/web/chunk-kw9emsqw.js +1 -0
  127. package/web/{chunk-kza0t0gj.js → chunk-kyawkpv2.js} +1 -1
  128. package/web/{chunk-xsrvw7dt.js → chunk-m2prjwk3.js} +1 -1
  129. package/web/{chunk-s24qs1bn.js → chunk-m9bzz9m0.js} +6 -6
  130. package/web/{chunk-c53xmf48.js → chunk-mqsyzzgt.js} +1 -1
  131. package/web/{chunk-26bwh1sb.js → chunk-n1jpg57t.js} +6 -6
  132. package/web/{chunk-yvgs6bm3.js → chunk-nyn9tghz.js} +1 -1
  133. package/web/{chunk-ybw6vgf6.js → chunk-nywdeb4m.js} +1 -1
  134. package/web/{chunk-1cfh0e2e.js → chunk-prvh9syp.js} +7 -7
  135. package/web/chunk-pxkhm40r.js +2 -0
  136. package/web/{chunk-d6ddkh6e.js → chunk-q9ekgjh6.js} +1 -1
  137. package/web/chunk-r3mj50zs.js +1 -0
  138. package/web/{chunk-2nht58dc.js → chunk-rf9dt6bg.js} +1 -1
  139. package/web/{chunk-4m3zdd41.js → chunk-s2920f21.js} +1 -1
  140. package/web/{chunk-crzseqbx.js → chunk-sc0ghp25.js} +1 -1
  141. package/web/{chunk-7a3c137d.js → chunk-sy7e4dmq.js} +1 -1
  142. package/web/{chunk-65nwc4cf.js → chunk-t74r2n8h.js} +1 -1
  143. package/web/{chunk-gcv91974.js → chunk-t851gdjh.js} +1 -1
  144. package/web/{chunk-mpfgr049.js → chunk-t9mvsgt9.js} +1 -1
  145. package/web/{chunk-mnzramhc.js → chunk-twdy2f67.js} +1 -1
  146. package/web/{chunk-advfpyb9.js → chunk-v4yqrx5y.js} +4 -4
  147. package/web/{chunk-z4aj066q.js → chunk-vf4vkcf9.js} +1 -1
  148. package/web/{chunk-6enn8p66.js → chunk-vtxw9rmr.js} +1 -1
  149. package/web/{chunk-k67v6dyg.js → chunk-vw1pbv1x.js} +2 -2
  150. package/web/chunk-x19v2sxv.js +1 -0
  151. package/web/{chunk-892nf39p.js → chunk-x5s7zr5f.js} +7 -7
  152. package/web/{chunk-f9k3xrwb.js → chunk-xc2sq3t5.js} +1 -1
  153. package/web/chunk-xvcfp1zh.js +2 -0
  154. package/web/chunk-y21zy3eh.js +1 -0
  155. package/web/{chunk-14bad871.js → chunk-ya3ghn3n.js} +1 -1
  156. package/web/chunk-yd74yxzt.js +8 -0
  157. package/web/{chunk-0p1nmj5n.js → chunk-z1geewdf.js} +1 -1
  158. package/web/chunk-z4ha8181.js +1 -0
  159. package/web/chunk-z8rarqe6.js +1 -0
  160. package/web/{chunk-xk1t58c4.js → chunk-zp3qrrkb.js} +4 -4
  161. package/web/{chunk-7znyd1mj.js → chunk-zsxw5fj7.js} +1 -1
  162. package/web/index.html +1 -1
  163. package/worker.js +1 -1
  164. package/chunk-2nb3d92s.js +0 -2
  165. package/chunk-2pa1z37c.js +0 -2
  166. package/chunk-4g5f43ea.js +0 -3
  167. package/chunk-eegztdzb.js +0 -2
  168. package/chunk-wd3z74av.js +0 -2
  169. package/chunk-yna8bwqc.js +0 -2
  170. package/web/chunk-0ytga215.js +0 -1
  171. package/web/chunk-1amzv4ha.js +0 -1
  172. package/web/chunk-2y0rc1fe.js +0 -1
  173. package/web/chunk-4w298aqs.js +0 -1
  174. package/web/chunk-6stt9d18.js +0 -1
  175. package/web/chunk-7pypx5h8.js +0 -2
  176. package/web/chunk-9dy7z3ej.js +0 -2
  177. package/web/chunk-9mq2cdtq.js +0 -1
  178. package/web/chunk-b5hah4mf.js +0 -1
  179. package/web/chunk-b8tfetd8.js +0 -1
  180. package/web/chunk-ckgpy4r4.js +0 -1
  181. package/web/chunk-dbnrfxt1.js +0 -8
  182. package/web/chunk-ddxf8e84.js +0 -1
  183. package/web/chunk-e8h45nyr.js +0 -1
  184. package/web/chunk-ej9vb61c.js +0 -1
  185. package/web/chunk-fjag6yg8.js +0 -2
  186. package/web/chunk-gxsb5tx3.js +0 -1
  187. package/web/chunk-jg6fmz2d.js +0 -1
  188. package/web/chunk-mz1dabxh.js +0 -1
  189. package/web/chunk-p53n0hwr.js +0 -1
  190. package/web/chunk-pfcnr9tw.js +0 -1
  191. package/web/chunk-q7xkscc5.js +0 -1
  192. package/web/chunk-qmbgb79a.js +0 -1139
  193. package/web/chunk-sfq6cw45.js +0 -2
  194. package/web/chunk-svqj4az8.js +0 -1
  195. package/web/chunk-t7jwyvvr.js +0 -1
  196. package/web/chunk-tf18d2dk.css +0 -1
  197. package/web/chunk-v0g4cqc1.js +0 -4
  198. package/web/chunk-vqfz99ff.js +0 -1
  199. package/web/chunk-zazs8p6c.js +0 -1
@@ -1,9 +1,9 @@
1
- import{e,a,ce,b,v,B,C,l,p,Ma,Mn,un,Na,Ar,Lr,Rr,Ir,Pa,Oa,$a,Ba,Fa,za,Ua,ja,qa,Va,Wa,Ga,Ha,Ya,Za,Xa,Ka,dn,Ja,ue,oe,se,Ye,Ze,Et,gt,At,Zn,nn,Xn}from"./chunk-pyg1mr80.js";import{J}from"./chunk-fjag6yg8.js";import{je}from"./chunk-m8knte9z.js";import{Bt}from"./chunk-9dy7z3ej.js";function Te(t){return Array.isArray(t)}function Ne(t){if(Mn(t))return t;let o=un(t);if(!Qe(t))return{};if(Te(t)){let i=Array.from(t);if(t.length>0&&typeof t[0]==="string"&&Object.hasOwn(t,"index"))i.index=t.index,i.input=t.input;return i}if(dn(t)){let i=t;return new i.constructor(i.buffer,i.byteOffset,i.length)}if(o==="[object ArrayBuffer]")return new ArrayBuffer(t.byteLength);if(o==="[object DataView]"){let i=t,{buffer:g,byteOffset:f,byteLength:r}=i,d=new ArrayBuffer(r),y=new Uint8Array(g,f,r);return new Uint8Array(d).set(y),new DataView(d)}if(o==="[object Boolean]"||o==="[object Number]"||o==="[object String]"){let g=new t.constructor(t.valueOf());if(o==="[object String]")et(g,t);else pe(g,t);return g}if(o==="[object Date]")return new Date(Number(t));if(o==="[object RegExp]"){let i=t,g=new RegExp(i.source,i.flags);return g.lastIndex=i.lastIndex,g}if(o==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(t));if(o==="[object Map]"){let i=t,g=new Map;return i.forEach((f,r)=>{g.set(r,f)}),g}if(o==="[object Set]"){let i=t,g=new Set;return i.forEach((f)=>{g.add(f)}),g}if(o==="[object Arguments]"){let i=t,g={};return pe(g,i),g.length=i.length,g[Symbol.iterator]=i[Symbol.iterator],g}let u={};return tt(u,t),pe(u,t),$e(u,t),u}function Qe(t){switch(un(t)){case Ir:case Fa:case za:case ja:case Rr:case Oa:case Xa:case Ka:case Ha:case Ya:case Za:case $a:case Lr:case Ua:case Na:case Ba:case Ar:case Pa:case qa:case Va:case Wa:case Ga:return!0;default:return!1}}function pe(t,o){for(let u in o)if(Object.hasOwn(o,u))t[u]=o[u]}function $e(t,o){let u=Object.getOwnPropertySymbols(o);for(let i=0;i<u.length;i++){let g=u[i];if(Object.prototype.propertyIsEnumerable.call(o,g))t[g]=o[g]}}function et(t,o){let u=o.valueOf().length;for(let i in o)if(Object.hasOwn(o,i)&&(Number.isNaN(Number(i))||Number(i)>=u))t[i]=o[i]}function tt(t,o){let u=Object.getPrototypeOf(o);if(u!==null){if(typeof o.constructor==="function")Object.setPrototypeOf(t,u)}}var be=function(){var t=e(function(R,S,n,h){for(n=n||{},h=R.length;h--;n[R[h]]=S);return n},"o"),o=[1,15],u=[1,7],i=[1,13],g=[1,14],f=[1,19],r=[1,16],d=[1,17],y=[1,18],w=[8,30],L=[8,10,21,28,29,30,31,39,43,46],m=[1,23],E=[1,24],D=[8,10,15,16,21,28,29,30,31,39,43,46],k=[8,10,15,16,21,27,28,29,30,31,39,43,46],N=[1,49],T={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(S,n,h,x,_,s,H){var c=s.length-1;switch(_){case 4:x.getLogger().debug("Rule: separator (NL) ");break;case 5:x.getLogger().debug("Rule: separator (Space) ");break;case 6:x.getLogger().debug("Rule: separator (EOF) ");break;case 7:x.getLogger().debug("Rule: hierarchy: ",s[c-1]),x.setHierarchy(s[c-1]);break;case 8:x.getLogger().debug("Stop NL ");break;case 9:x.getLogger().debug("Stop EOF ");break;case 10:x.getLogger().debug("Stop NL2 ");break;case 11:x.getLogger().debug("Stop EOF2 ");break;case 12:x.getLogger().debug("Rule: statement: ",s[c]),typeof s[c].length==="number"?this.$=s[c]:this.$=[s[c]];break;case 13:x.getLogger().debug("Rule: statement #2: ",s[c-1]),this.$=[s[c-1]].concat(s[c]);break;case 14:x.getLogger().debug("Rule: link: ",s[c],S),this.$={edgeTypeStr:s[c],label:""};break;case 15:x.getLogger().debug("Rule: LABEL link: ",s[c-3],s[c-1],s[c]),this.$={edgeTypeStr:s[c],label:s[c-1]};break;case 18:let V=parseInt(s[c]),j=x.generateId();this.$={id:j,type:"space",label:"",width:V,children:[]};break;case 23:x.getLogger().debug("Rule: (nodeStatement link node) ",s[c-2],s[c-1],s[c]," typestr: ",s[c-1].edgeTypeStr);let G=x.edgeStrToEdgeData(s[c-1].edgeTypeStr),ie=x.edgeStrToEdgeStartData(s[c-1].edgeTypeStr),q=x.edgeStrToThickness(s[c-1].edgeTypeStr),ae=x.edgeStrToPattern(s[c-1].edgeTypeStr);this.$=[{id:s[c-2].id,label:s[c-2].label,type:s[c-2].type,directions:s[c-2].directions},{id:s[c-2].id+"-"+s[c].id,start:s[c-2].id,end:s[c].id,label:s[c-1].label,type:"edge",thickness:q,pattern:ae,directions:s[c].directions,arrowTypeEnd:G,arrowTypeStart:ie},{id:s[c].id,label:s[c].label,type:x.typeStr2Type(s[c].typeStr),directions:s[c].directions}];break;case 24:x.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[c-1],s[c]),this.$={id:s[c-1].id,label:s[c-1].label,type:x.typeStr2Type(s[c-1].typeStr),directions:s[c-1].directions,widthInColumns:parseInt(s[c],10)};break;case 25:x.getLogger().debug("Rule: nodeStatement (node) ",s[c]),this.$={id:s[c].id,label:s[c].label,type:x.typeStr2Type(s[c].typeStr),directions:s[c].directions,widthInColumns:1};break;case 26:x.getLogger().debug("APA123",this?this:"na"),x.getLogger().debug("COLUMNS: ",s[c]),this.$={type:"column-setting",columns:s[c]==="auto"?-1:parseInt(s[c])};break;case 27:x.getLogger().debug("Rule: id-block statement : ",s[c-2],s[c-1]);let I=x.generateId();this.$={...s[c-2],type:"composite",children:s[c-1]};break;case 28:x.getLogger().debug("Rule: blockStatement : ",s[c-2],s[c-1],s[c]);let K=x.generateId();this.$={id:K,type:"composite",label:"",children:s[c-1]};break;case 29:x.getLogger().debug("Rule: node (NODE_ID separator): ",s[c]),this.$={id:s[c]};break;case 30:x.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[c-1],s[c]),this.$={id:s[c-1],label:s[c].label,typeStr:s[c].typeStr,directions:s[c].directions};break;case 31:x.getLogger().debug("Rule: dirList: ",s[c]),this.$=[s[c]];break;case 32:x.getLogger().debug("Rule: dirList: ",s[c-1],s[c]),this.$=[s[c-1]].concat(s[c]);break;case 33:x.getLogger().debug("Rule: nodeShapeNLabel: ",s[c-2],s[c-1],s[c]),this.$={typeStr:s[c-2]+s[c],label:s[c-1]};break;case 34:x.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[c-3],s[c-2]," #3:",s[c-1],s[c]),this.$={typeStr:s[c-3]+s[c],label:s[c-2],directions:s[c-1]};break;case 35:case 36:this.$={type:"classDef",id:s[c-1].trim(),css:s[c].trim()};break;case 37:this.$={type:"applyClass",id:s[c-1].trim(),styleClass:s[c].trim()};break;case 38:this.$={type:"applyStyles",id:s[c-1].trim(),stylesStr:s[c].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:o,11:3,13:4,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:y},{8:[1,20]},t(w,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:o,21:u,28:i,29:g,31:f,39:r,43:d,46:y}),t(L,[2,16],{14:22,15:m,16:E}),t(L,[2,17]),t(L,[2,18]),t(L,[2,19]),t(L,[2,20]),t(L,[2,21]),t(L,[2,22]),t(D,[2,25],{27:[1,25]}),t(L,[2,26]),{19:26,26:12,31:f},{10:o,11:27,13:4,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:y},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(k,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(w,[2,13]),{26:35,31:f},{31:[2,14]},{17:[1,36]},t(D,[2,24]),{10:o,11:37,13:4,14:22,15:m,16:E,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:y},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(k,[2,30]),{18:[1,43]},{18:[1,44]},t(D,[2,23]),{18:[1,45]},{30:[1,46]},t(L,[2,28]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),{36:[1,47]},{33:48,34:N},{15:[1,50]},t(L,[2,27]),t(k,[2,33]),{38:[1,51]},{33:52,34:N,38:[2,31]},{31:[2,15]},t(k,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(S,n){if(n.recoverable)this.trace(S);else{var h=Error(S);throw h.hash=n,h}},"parseError"),parse:e(function(S){var n=this,h=[0],x=[],_=[null],s=[],H=this.table,c="",V=0,j=0,G=0,ie=2,q=1,ae=s.slice.call(arguments,1),I=Object.create(this.lexer),K={yy:{}};for(var ne in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ne))K.yy[ne]=this.yy[ne];if(I.setInput(S,K.yy),K.yy.lexer=I,K.yy.parser=this,typeof I.yylloc>"u")I.yylloc={};var le=I.yylloc;s.push(le);var qe=I.options&&I.options.ranges;if(typeof K.yy.parseError==="function")this.parseError=K.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Je(F){h.length=h.length-2*F,_.length=_.length-F,s.length=s.length-F}e(Je,"popStack");function _e(){var F=x.pop()||I.lex()||q;if(typeof F!=="number"){if(F instanceof Array)x=F,F=x.pop();F=n.symbols_[F]||F}return F}e(_e,"lex");var A,he,W,P,vt,ge,U={},Z,Y,De,Q;while(!0){if(W=h[h.length-1],this.defaultActions[W])P=this.defaultActions[W];else{if(A===null||typeof A>"u")A=_e();P=H[W]&&H[W][A]}if(typeof P>"u"||!P.length||!P[0]){var de="";Q=[];for(Z in H[W])if(this.terminals_[Z]&&Z>ie)Q.push("'"+this.terminals_[Z]+"'");if(I.showPosition)de="Parse error on line "+(V+1)+`:
1
+ import{e,a,ce,b,v,B,C,l,p,Ma,Mn,un,Na,Ar,Lr,Rr,Ir,Pa,Oa,$a,Ba,Fa,za,Ua,ja,qa,Va,Wa,Ga,Ha,Ya,Za,Xa,Ka,dn,Ja,ue,oe,se,Ye,Ze,Et,yt,At,Zn,nn,Xn}from"./chunk-5v44qv67.js";import{te}from"./chunk-xvcfp1zh.js";import{je}from"./chunk-dwajwrpk.js";import{Bt}from"./chunk-pxkhm40r.js";function Te(t){return Array.isArray(t)}function Ne(t){if(Mn(t))return t;let o=un(t);if(!Qe(t))return{};if(Te(t)){let i=Array.from(t);if(t.length>0&&typeof t[0]==="string"&&Object.hasOwn(t,"index"))i.index=t.index,i.input=t.input;return i}if(dn(t)){let i=t;return new i.constructor(i.buffer,i.byteOffset,i.length)}if(o==="[object ArrayBuffer]")return new ArrayBuffer(t.byteLength);if(o==="[object DataView]"){let i=t,{buffer:g,byteOffset:f,byteLength:r}=i,d=new ArrayBuffer(r),y=new Uint8Array(g,f,r);return new Uint8Array(d).set(y),new DataView(d)}if(o==="[object Boolean]"||o==="[object Number]"||o==="[object String]"){let g=new t.constructor(t.valueOf());if(o==="[object String]")et(g,t);else pe(g,t);return g}if(o==="[object Date]")return new Date(Number(t));if(o==="[object RegExp]"){let i=t,g=new RegExp(i.source,i.flags);return g.lastIndex=i.lastIndex,g}if(o==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(t));if(o==="[object Map]"){let i=t,g=new Map;return i.forEach((f,r)=>{g.set(r,f)}),g}if(o==="[object Set]"){let i=t,g=new Set;return i.forEach((f)=>{g.add(f)}),g}if(o==="[object Arguments]"){let i=t,g={};return pe(g,i),g.length=i.length,g[Symbol.iterator]=i[Symbol.iterator],g}let u={};return tt(u,t),pe(u,t),$e(u,t),u}function Qe(t){switch(un(t)){case Ir:case Fa:case za:case ja:case Rr:case Oa:case Xa:case Ka:case Ha:case Ya:case Za:case $a:case Lr:case Ua:case Na:case Ba:case Ar:case Pa:case qa:case Va:case Wa:case Ga:return!0;default:return!1}}function pe(t,o){for(let u in o)if(Object.hasOwn(o,u))t[u]=o[u]}function $e(t,o){let u=Object.getOwnPropertySymbols(o);for(let i=0;i<u.length;i++){let g=u[i];if(Object.prototype.propertyIsEnumerable.call(o,g))t[g]=o[g]}}function et(t,o){let u=o.valueOf().length;for(let i in o)if(Object.hasOwn(o,i)&&(Number.isNaN(Number(i))||Number(i)>=u))t[i]=o[i]}function tt(t,o){let u=Object.getPrototypeOf(o);if(u!==null){if(typeof o.constructor==="function")Object.setPrototypeOf(t,u)}}var be=function(){var t=e(function(R,S,n,h){for(n=n||{},h=R.length;h--;n[R[h]]=S);return n},"o"),o=[1,15],u=[1,7],i=[1,13],g=[1,14],f=[1,19],r=[1,16],d=[1,17],y=[1,18],w=[8,30],L=[8,10,21,28,29,30,31,39,43,46],m=[1,23],E=[1,24],D=[8,10,15,16,21,28,29,30,31,39,43,46],k=[8,10,15,16,21,27,28,29,30,31,39,43,46],N=[1,49],T={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(S,n,h,x,_,s,H){var c=s.length-1;switch(_){case 4:x.getLogger().debug("Rule: separator (NL) ");break;case 5:x.getLogger().debug("Rule: separator (Space) ");break;case 6:x.getLogger().debug("Rule: separator (EOF) ");break;case 7:x.getLogger().debug("Rule: hierarchy: ",s[c-1]),x.setHierarchy(s[c-1]);break;case 8:x.getLogger().debug("Stop NL ");break;case 9:x.getLogger().debug("Stop EOF ");break;case 10:x.getLogger().debug("Stop NL2 ");break;case 11:x.getLogger().debug("Stop EOF2 ");break;case 12:x.getLogger().debug("Rule: statement: ",s[c]),typeof s[c].length==="number"?this.$=s[c]:this.$=[s[c]];break;case 13:x.getLogger().debug("Rule: statement #2: ",s[c-1]),this.$=[s[c-1]].concat(s[c]);break;case 14:x.getLogger().debug("Rule: link: ",s[c],S),this.$={edgeTypeStr:s[c],label:""};break;case 15:x.getLogger().debug("Rule: LABEL link: ",s[c-3],s[c-1],s[c]),this.$={edgeTypeStr:s[c],label:s[c-1]};break;case 18:let V=parseInt(s[c]),j=x.generateId();this.$={id:j,type:"space",label:"",width:V,children:[]};break;case 23:x.getLogger().debug("Rule: (nodeStatement link node) ",s[c-2],s[c-1],s[c]," typestr: ",s[c-1].edgeTypeStr);let G=x.edgeStrToEdgeData(s[c-1].edgeTypeStr),ie=x.edgeStrToEdgeStartData(s[c-1].edgeTypeStr),q=x.edgeStrToThickness(s[c-1].edgeTypeStr),ae=x.edgeStrToPattern(s[c-1].edgeTypeStr);this.$=[{id:s[c-2].id,label:s[c-2].label,type:s[c-2].type,directions:s[c-2].directions},{id:s[c-2].id+"-"+s[c].id,start:s[c-2].id,end:s[c].id,label:s[c-1].label,type:"edge",thickness:q,pattern:ae,directions:s[c].directions,arrowTypeEnd:G,arrowTypeStart:ie},{id:s[c].id,label:s[c].label,type:x.typeStr2Type(s[c].typeStr),directions:s[c].directions}];break;case 24:x.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[c-1],s[c]),this.$={id:s[c-1].id,label:s[c-1].label,type:x.typeStr2Type(s[c-1].typeStr),directions:s[c-1].directions,widthInColumns:parseInt(s[c],10)};break;case 25:x.getLogger().debug("Rule: nodeStatement (node) ",s[c]),this.$={id:s[c].id,label:s[c].label,type:x.typeStr2Type(s[c].typeStr),directions:s[c].directions,widthInColumns:1};break;case 26:x.getLogger().debug("APA123",this?this:"na"),x.getLogger().debug("COLUMNS: ",s[c]),this.$={type:"column-setting",columns:s[c]==="auto"?-1:parseInt(s[c])};break;case 27:x.getLogger().debug("Rule: id-block statement : ",s[c-2],s[c-1]);let I=x.generateId();this.$={...s[c-2],type:"composite",children:s[c-1]};break;case 28:x.getLogger().debug("Rule: blockStatement : ",s[c-2],s[c-1],s[c]);let K=x.generateId();this.$={id:K,type:"composite",label:"",children:s[c-1]};break;case 29:x.getLogger().debug("Rule: node (NODE_ID separator): ",s[c]),this.$={id:s[c]};break;case 30:x.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[c-1],s[c]),this.$={id:s[c-1],label:s[c].label,typeStr:s[c].typeStr,directions:s[c].directions};break;case 31:x.getLogger().debug("Rule: dirList: ",s[c]),this.$=[s[c]];break;case 32:x.getLogger().debug("Rule: dirList: ",s[c-1],s[c]),this.$=[s[c-1]].concat(s[c]);break;case 33:x.getLogger().debug("Rule: nodeShapeNLabel: ",s[c-2],s[c-1],s[c]),this.$={typeStr:s[c-2]+s[c],label:s[c-1]};break;case 34:x.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[c-3],s[c-2]," #3:",s[c-1],s[c]),this.$={typeStr:s[c-3]+s[c],label:s[c-2],directions:s[c-1]};break;case 35:case 36:this.$={type:"classDef",id:s[c-1].trim(),css:s[c].trim()};break;case 37:this.$={type:"applyClass",id:s[c-1].trim(),styleClass:s[c].trim()};break;case 38:this.$={type:"applyStyles",id:s[c-1].trim(),stylesStr:s[c].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:o,11:3,13:4,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:y},{8:[1,20]},t(w,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:o,21:u,28:i,29:g,31:f,39:r,43:d,46:y}),t(L,[2,16],{14:22,15:m,16:E}),t(L,[2,17]),t(L,[2,18]),t(L,[2,19]),t(L,[2,20]),t(L,[2,21]),t(L,[2,22]),t(D,[2,25],{27:[1,25]}),t(L,[2,26]),{19:26,26:12,31:f},{10:o,11:27,13:4,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:y},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(k,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(w,[2,13]),{26:35,31:f},{31:[2,14]},{17:[1,36]},t(D,[2,24]),{10:o,11:37,13:4,14:22,15:m,16:E,19:5,20:6,21:u,22:8,23:9,24:10,25:11,26:12,28:i,29:g,31:f,39:r,43:d,46:y},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(k,[2,30]),{18:[1,43]},{18:[1,44]},t(D,[2,23]),{18:[1,45]},{30:[1,46]},t(L,[2,28]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),{36:[1,47]},{33:48,34:N},{15:[1,50]},t(L,[2,27]),t(k,[2,33]),{38:[1,51]},{33:52,34:N,38:[2,31]},{31:[2,15]},t(k,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(S,n){if(n.recoverable)this.trace(S);else{var h=Error(S);throw h.hash=n,h}},"parseError"),parse:e(function(S){var n=this,h=[0],x=[],_=[null],s=[],H=this.table,c="",V=0,j=0,G=0,ie=2,q=1,ae=s.slice.call(arguments,1),I=Object.create(this.lexer),K={yy:{}};for(var ne in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ne))K.yy[ne]=this.yy[ne];if(I.setInput(S,K.yy),K.yy.lexer=I,K.yy.parser=this,typeof I.yylloc>"u")I.yylloc={};var le=I.yylloc;s.push(le);var qe=I.options&&I.options.ranges;if(typeof K.yy.parseError==="function")this.parseError=K.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Je(F){h.length=h.length-2*F,_.length=_.length-F,s.length=s.length-F}e(Je,"popStack");function _e(){var F=x.pop()||I.lex()||q;if(typeof F!=="number"){if(F instanceof Array)x=F,F=x.pop();F=n.symbols_[F]||F}return F}e(_e,"lex");var A,he,W,P,vt,ge,U={},J,Y,De,Z;while(!0){if(W=h[h.length-1],this.defaultActions[W])P=this.defaultActions[W];else{if(A===null||typeof A>"u")A=_e();P=H[W]&&H[W][A]}if(typeof P>"u"||!P.length||!P[0]){var de="";Z=[];for(J in H[W])if(this.terminals_[J]&&J>ie)Z.push("'"+this.terminals_[J]+"'");if(I.showPosition)de="Parse error on line "+(V+1)+`:
2
2
  `+I.showPosition()+`
3
- Expecting `+Q.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else de="Parse error on line "+(V+1)+": Unexpected "+(A==q?"end of input":"'"+(this.terminals_[A]||A)+"'");this.parseError(de,{text:I.match,token:this.terminals_[A]||A,line:I.yylineno,loc:le,expected:Q})}if(P[0]instanceof Array&&P.length>1)throw Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(P[0]){case 1:if(h.push(A),_.push(I.yytext),s.push(I.yylloc),h.push(P[1]),A=null,!he){if(j=I.yyleng,c=I.yytext,V=I.yylineno,le=I.yylloc,G>0)G--}else A=he,he=null;break;case 2:if(Y=this.productions_[P[1]][1],U.$=_[_.length-Y],U._$={first_line:s[s.length-(Y||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(Y||1)].first_column,last_column:s[s.length-1].last_column},qe)U._$.range=[s[s.length-(Y||1)].range[0],s[s.length-1].range[1]];if(ge=this.performAction.apply(U,[c,j,V,K.yy,P[1],_,s].concat(ae)),typeof ge<"u")return ge;if(Y)h=h.slice(0,-1*Y*2),_=_.slice(0,-1*Y),s=s.slice(0,-1*Y);h.push(this.productions_[P[1]][0]),_.push(U.$),s.push(U._$),De=H[h[h.length-2]][h[h.length-1]],h.push(De);break;case 3:return!0}}return!0},"parse")},O=function(){var R={EOF:1,parseError:e(function(n,h){if(this.yy.parser)this.yy.parser.parseError(n,h);else throw Error(n)},"parseError"),setInput:e(function(S,n){if(this.yy=n||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var n=S.match(/(?:\r\n?|\n).*/g);if(n)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),S},"input"),unput:e(function(S){var n=S.length,h=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var x=this.match.split(/(?:\r\n?|\n)/g);if(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;var _=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===x.length?this.yylloc.first_column:0)+x[x.length-h.length].length-h[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[_[0],_[0]+this.yyleng-n];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
3
+ Expecting `+Z.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else de="Parse error on line "+(V+1)+": Unexpected "+(A==q?"end of input":"'"+(this.terminals_[A]||A)+"'");this.parseError(de,{text:I.match,token:this.terminals_[A]||A,line:I.yylineno,loc:le,expected:Z})}if(P[0]instanceof Array&&P.length>1)throw Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(P[0]){case 1:if(h.push(A),_.push(I.yytext),s.push(I.yylloc),h.push(P[1]),A=null,!he){if(j=I.yyleng,c=I.yytext,V=I.yylineno,le=I.yylloc,G>0)G--}else A=he,he=null;break;case 2:if(Y=this.productions_[P[1]][1],U.$=_[_.length-Y],U._$={first_line:s[s.length-(Y||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(Y||1)].first_column,last_column:s[s.length-1].last_column},qe)U._$.range=[s[s.length-(Y||1)].range[0],s[s.length-1].range[1]];if(ge=this.performAction.apply(U,[c,j,V,K.yy,P[1],_,s].concat(ae)),typeof ge<"u")return ge;if(Y)h=h.slice(0,-1*Y*2),_=_.slice(0,-1*Y),s=s.slice(0,-1*Y);h.push(this.productions_[P[1]][0]),_.push(U.$),s.push(U._$),De=H[h[h.length-2]][h[h.length-1]],h.push(De);break;case 3:return!0}}return!0},"parse")},O=function(){var R={EOF:1,parseError:e(function(n,h){if(this.yy.parser)this.yy.parser.parseError(n,h);else throw Error(n)},"parseError"),setInput:e(function(S,n){if(this.yy=n||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var n=S.match(/(?:\r\n?|\n).*/g);if(n)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),S},"input"),unput:e(function(S){var n=S.length,h=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var x=this.match.split(/(?:\r\n?|\n)/g);if(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;var _=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===x.length?this.yylloc.first_column:0)+x[x.length-h.length].length-h[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[_[0],_[0]+this.yyleng-n];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(S){this.unput(this.match.slice(S))},"less"),pastInput:e(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var S=this.match;if(S.length<20)S+=this._input.substr(0,20-S.length);return(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var S=this.pastInput(),n=Array(S.length+1).join("-");return S+this.upcomingInput()+`
5
5
  `+n+"^"},"showPosition"),test_match:e(function(S,n){var h,x,_;if(this.options.backtrack_lexer){if(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)_.yylloc.range=this.yylloc.range.slice(0)}if(x=S[0].match(/(?:\r\n?|\n).*/g),x)this.yylineno+=x.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],h=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var s in _)this[s]=_[s];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var S,n,h,x;if(!this._more)this.yytext="",this.match="";var _=this._currentRules();for(var s=0;s<_.length;s++)if(h=this._input.match(this.rules[_[s]]),h&&(!n||h[0].length>n[0].length)){if(n=h,x=s,this.options.backtrack_lexer)if(S=this.test_match(h,_[s]),S!==!1)return S;else if(this._backtrack){n=!1;continue}else return!1;else if(!this.options.flex)break}if(n){if(S=this.test_match(n,_[x]),S!==!1)return S;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:e(function(n){this.conditionStack.push(n)},"begin"),popState:e(function(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:e(function(n){this.begin(n)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(n,h,x,_){var s=_;switch(x){case 0:return n.getLogger().debug("Found block-beta"),10;break;case 1:return n.getLogger().debug("Found id-block"),29;break;case 2:return n.getLogger().debug("Found block"),10;break;case 3:n.getLogger().debug(".",h.yytext);break;case 4:n.getLogger().debug("_",h.yytext);break;case 5:return 5;case 6:return h.yytext=-1,28;break;case 7:return h.yytext=h.yytext.replace(/columns\s+/,""),n.getLogger().debug("COLUMNS (LEX)",h.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:n.getLogger().debug("LEX: POPPING STR:",h.yytext),this.popState();break;case 13:return n.getLogger().debug("LEX: STR end:",h.yytext),"STR";break;case 14:return h.yytext=h.yytext.replace(/space\:/,""),n.getLogger().debug("SPACE NUM (LEX)",h.yytext),21;break;case 15:return h.yytext="1",n.getLogger().debug("COLUMNS (LEX)",h.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),n.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),n.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),n.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),n.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),n.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),n.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),n.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),n.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),n.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),n.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),n.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),n.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return n.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return n.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return n.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return n.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return n.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return n.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return n.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),n.getLogger().debug("LEX ARR START"),37;break;case 74:return n.getLogger().debug("Lex: NODE_ID",h.yytext),31;break;case 75:return n.getLogger().debug("Lex: EOF",h.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:n.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:n.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return n.getLogger().debug("LEX: NODE_DESCR:",h.yytext),"NODE_DESCR";break;case 83:n.getLogger().debug("LEX POPPING"),this.popState();break;case 84:n.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (right): dir:",h.yytext),"DIR";break;case 86:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (left):",h.yytext),"DIR";break;case 87:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (x):",h.yytext),"DIR";break;case 88:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (y):",h.yytext),"DIR";break;case 89:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (up):",h.yytext),"DIR";break;case 90:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (down):",h.yytext),"DIR";break;case 91:return h.yytext="]>",n.getLogger().debug("Lex (ARROW_DIR end):",h.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return n.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 93:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 94:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 95:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 96:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 97:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 98:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return n.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),n.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 102:return this.popState(),n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 103:return this.popState(),n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 104:return n.getLogger().debug("Lex: COLON",h.yytext),h.yytext=h.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return R}();T.lexer=O;function z(){this.yy={}}return e(z,"Parser"),z.prototype=T,T.Parser=z,new z}();be.parser=be;var rt=be,M=new Map,me=[],Se=new Map,Ie="color",Oe="fill",st="bgFill",ve=",",ee=new Map,Le="",it=e((t)=>v.sanitizeText(t,l()),"sanitizeText"),at=e(function(t,o=""){let u=ee.get(t);if(!u)u={id:t,styles:[],textStyles:[]},ee.set(t,u);if(o!==void 0&&o!==null)o.split(ve).forEach((i)=>{let g=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Ie).exec(i)){let r=g.replace(Oe,st).replace(Ie,Oe);u.textStyles.push(r)}u.styles.push(g)})},"addStyleClass"),nt=e(function(t,o=""){let u=M.get(t);if(o!==void 0&&o!==null)u.styles=o.split(ve)},"addStyle2Node"),ot=e(function(t,o){t.split(",").forEach(function(u){let i=M.get(u);if(i===void 0){let g=u.trim();i={id:g,type:"na",children:[]},M.set(g,i)}if(!i.classes)i.classes=[];i.classes.push(o)})},"setCssClass"),Ae=0,ze=e((t,o)=>{let u=t.flat(),i=[],f=u.find((r)=>r?.type==="column-setting")?.columns??-1;for(let r of u){if(typeof f==="number"&&f>0&&r.type!=="column-setting"&&typeof r.widthInColumns==="number"&&r.widthInColumns>f)a.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${f}`);if(r.label)r.label=it(r.label);if(r.type==="classDef"){at(r.id,r.css);continue}if(r.type==="applyClass"){ot(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){if(r?.stylesStr)nt(r.id,r?.stylesStr);continue}if(r.type==="column-setting")o.columns=r.columns??-1;else if(r.type==="edge"){let d=(Se.get(r.id)??0)+1;Se.set(r.id,d),r.id=d+"-"+r.id,me.push(r)}else{if(!r.label)if(r.type==="composite")r.label="";else r.label=r.id;let d=M.get(r.id);if(d===void 0){if(r.type==="composite")r.colorIndex=Ae++;M.set(r.id,r)}else{if(r.type!=="na")d.type=r.type;if(r.label!==r.id)d.label=r.label}if(r.children)ze(r.children,r);if(r.type==="space"){let y=r.width??1;for(let w=0;w<y;w++){let L=Ne(r);L.id=L.id+"-"+w,M.set(L.id,L),i.push(L)}}else if(d===void 0)i.push(r)}}o.children=i},"populateBlockDatabase"),ke=[],X={id:"root",type:"composite",children:[],columns:-1},lt=e(()=>{a.debug("Clear called"),C(),X={id:"root",type:"composite",children:[],columns:-1},M=new Map([["root",X]]),ke=[],ee=new Map,me=[],Se=new Map,Le="",Ae=0},"clear");function Be(t){switch(a.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return a.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}e(Be,"typeStr2Type");function Re(t){switch(a.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}e(Re,"edgeTypeStr2Type");function Pe(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}e(Pe,"edgeStrToEdgeData");function Fe(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}e(Fe,"edgeStrToEdgeStartData");function Me(t){return t.includes("==")?"thick":"normal"}e(Me,"edgeStrToThickness");function Ke(t){if(t.includes(".-"))return"dotted";return"solid"}e(Ke,"edgeStrToPattern");var Ce=0,ct=e(()=>(Ce++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ce),"generateId"),ut=e((t)=>{X.children=t,ze(t,X),ke=X.children},"setHierarchy"),ht=e((t)=>{let o=M.get(t);if(!o)return-1;if(o.columns)return o.columns;if(!o.children)return-1;return o.children.length},"getColumns"),dt=e(()=>[...M.values()],"getBlocksFlat"),pt=e(()=>ke||[],"getBlocks"),ft=e(()=>me,"getEdges"),bt=e((t)=>M.get(t),"getBlock"),St=e((t)=>{M.set(t.id,t)},"setBlock"),xt=e((t)=>{Le=t},"setDiagramId"),mt=e(()=>Le,"getDiagramId"),Lt=e(()=>a,"getLogger"),kt=e(function(){return ee},"getClasses"),yt={getConfig:e(()=>b().block,"getConfig"),typeStr2Type:Be,edgeTypeStr2Type:Re,edgeStrToEdgeData:Pe,edgeStrToEdgeStartData:Fe,edgeStrToThickness:Me,edgeStrToPattern:Ke,getLogger:Lt,getBlocksFlat:dt,getBlocks:pt,getEdges:ft,setHierarchy:ut,getBlock:bt,setBlock:St,getColumns:ht,getClasses:kt,clear:lt,generateId:ct,setDiagramId:xt,getDiagramId:mt},wt=yt,_t=e((t)=>{let{theme:o,bkgColorArray:u,borderColorArray:i}=t;if(!oe(o,i))return"";let g=se(t.look),f=ue(u),r="";for(let d=0;d<Ye(t.THEME_COLOR_LIMIT,i);d++){let y=i[d%i.length],w=f?`fill: ${u[d%u.length]};`:"",L=`[data-look="${g}"][data-color-id="color-${d}"]`;r+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:e(function(n){this.conditionStack.push(n)},"begin"),popState:e(function(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:e(function(n){this.begin(n)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:e(function(n,h,x,_){var s=_;switch(x){case 0:return n.getLogger().debug("Found block-beta"),10;break;case 1:return n.getLogger().debug("Found id-block"),29;break;case 2:return n.getLogger().debug("Found block"),10;break;case 3:n.getLogger().debug(".",h.yytext);break;case 4:n.getLogger().debug("_",h.yytext);break;case 5:return 5;case 6:return h.yytext=-1,28;break;case 7:return h.yytext=h.yytext.replace(/columns\s+/,""),n.getLogger().debug("COLUMNS (LEX)",h.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:n.getLogger().debug("LEX: POPPING STR:",h.yytext),this.popState();break;case 13:return n.getLogger().debug("LEX: STR end:",h.yytext),"STR";break;case 14:return h.yytext=h.yytext.replace(/space\:/,""),n.getLogger().debug("SPACE NUM (LEX)",h.yytext),21;break;case 15:return h.yytext="1",n.getLogger().debug("COLUMNS (LEX)",h.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),n.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),n.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),n.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),n.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),n.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),n.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),n.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),n.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),n.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),n.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),n.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),n.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),n.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return n.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return n.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return n.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return n.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return n.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return n.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return n.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return n.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),n.getLogger().debug("LEX ARR START"),37;break;case 74:return n.getLogger().debug("Lex: NODE_ID",h.yytext),31;break;case 75:return n.getLogger().debug("Lex: EOF",h.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:n.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:n.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return n.getLogger().debug("LEX: NODE_DESCR:",h.yytext),"NODE_DESCR";break;case 83:n.getLogger().debug("LEX POPPING"),this.popState();break;case 84:n.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (right): dir:",h.yytext),"DIR";break;case 86:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (left):",h.yytext),"DIR";break;case 87:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (x):",h.yytext),"DIR";break;case 88:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (y):",h.yytext),"DIR";break;case 89:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (up):",h.yytext),"DIR";break;case 90:return h.yytext=h.yytext.replace(/^,\s*/,""),n.getLogger().debug("Lex (down):",h.yytext),"DIR";break;case 91:return h.yytext="]>",n.getLogger().debug("Lex (ARROW_DIR end):",h.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return n.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 93:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 94:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 95:return n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 96:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 97:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 98:return n.getLogger().debug("Lex: START_LINK",h.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return n.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),n.getLogger().debug("Lex: LINK","#"+h.yytext+"#"),15;break;case 102:return this.popState(),n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 103:return this.popState(),n.getLogger().debug("Lex: LINK",h.yytext),15;break;case 104:return n.getLogger().debug("Lex: COLON",h.yytext),h.yytext=h.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return R}();T.lexer=O;function z(){this.yy={}}return e(z,"Parser"),z.prototype=T,T.Parser=z,new z}();be.parser=be;var rt=be,M=new Map,me=[],Se=new Map,Ie="color",Oe="fill",st="bgFill",ve=",",Q=new Map,Le="",it=e((t)=>v.sanitizeText(t,l()),"sanitizeText"),at=e(function(t,o=""){let u=Q.get(t);if(!u)u={id:t,styles:[],textStyles:[]},Q.set(t,u);if(o!==void 0&&o!==null)o.split(ve).forEach((i)=>{let g=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Ie).exec(i)){let r=g.replace(Oe,st).replace(Ie,Oe);u.textStyles.push(r)}u.styles.push(g)})},"addStyleClass"),nt=e(function(t,o=""){let u=M.get(t);if(o!==void 0&&o!==null)u.styles=o.split(ve)},"addStyle2Node"),ot=e(function(t,o){t.split(",").forEach(function(u){let i=M.get(u);if(i===void 0){let g=u.trim();i={id:g,type:"na",children:[]},M.set(g,i)}if(!i.classes)i.classes=[];i.classes.push(o)})},"setCssClass"),Ae=0,ze=e((t,o)=>{let u=t.flat(),i=[],f=u.find((r)=>r?.type==="column-setting")?.columns??-1;for(let r of u){if(typeof f==="number"&&f>0&&r.type!=="column-setting"&&typeof r.widthInColumns==="number"&&r.widthInColumns>f)a.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${f}`);if(r.label)r.label=it(r.label);if(r.type==="classDef"){at(r.id,r.css);continue}if(r.type==="applyClass"){ot(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){if(r?.stylesStr)nt(r.id,r?.stylesStr);continue}if(r.type==="column-setting")o.columns=r.columns??-1;else if(r.type==="edge"){let d=(Se.get(r.id)??0)+1;Se.set(r.id,d),r.id=d+"-"+r.id,me.push(r)}else{if(!r.label)if(r.type==="composite")r.label="";else r.label=r.id;let d=M.get(r.id);if(d===void 0){if(r.type==="composite")r.colorIndex=Ae++;M.set(r.id,r)}else{if(r.type!=="na")d.type=r.type;if(r.label!==r.id)d.label=r.label}if(r.children)ze(r.children,r);if(r.type==="space"){let y=r.width??1;for(let w=0;w<y;w++){let L=Ne(r);L.id=L.id+"-"+w,M.set(L.id,L),i.push(L)}}else if(d===void 0)i.push(r)}}o.children=i},"populateBlockDatabase"),ke=[],X={id:"root",type:"composite",children:[],columns:-1},lt=e(()=>{a.debug("Clear called"),C(),X={id:"root",type:"composite",children:[],columns:-1},M=new Map([["root",X]]),ke=[],Q=new Map,me=[],Se=new Map,Le="",Ae=0},"clear");function Be(t){switch(a.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return a.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}e(Be,"typeStr2Type");function Re(t){switch(a.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}e(Re,"edgeTypeStr2Type");function Pe(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}e(Pe,"edgeStrToEdgeData");function Fe(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}e(Fe,"edgeStrToEdgeStartData");function Me(t){return t.includes("==")?"thick":"normal"}e(Me,"edgeStrToThickness");function Ke(t){if(t.includes(".-"))return"dotted";return"solid"}e(Ke,"edgeStrToPattern");var Ce=0,ct=e(()=>(Ce++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ce),"generateId"),ut=e((t)=>{X.children=t,ze(t,X),ke=X.children},"setHierarchy"),ht=e((t)=>{let o=M.get(t);if(!o)return-1;if(o.columns)return o.columns;if(!o.children)return-1;return o.children.length},"getColumns"),gt=e(()=>[...M.values()],"getBlocksFlat"),dt=e(()=>ke||[],"getBlocks"),pt=e(()=>me,"getEdges"),ft=e((t)=>M.get(t),"getBlock"),bt=e((t)=>{M.set(t.id,t)},"setBlock"),St=e((t)=>{Le=t},"setDiagramId"),xt=e(()=>Le,"getDiagramId"),mt=e(()=>a,"getLogger"),Lt=e(function(){return Q},"getClasses"),kt={getConfig:e(()=>b().block,"getConfig"),typeStr2Type:Be,edgeTypeStr2Type:Re,edgeStrToEdgeData:Pe,edgeStrToEdgeStartData:Fe,edgeStrToThickness:Me,edgeStrToPattern:Ke,getLogger:mt,getBlocksFlat:gt,getBlocks:dt,getEdges:pt,setHierarchy:ut,getBlock:ft,setBlock:bt,getColumns:ht,getClasses:Lt,clear:lt,generateId:ct,setDiagramId:St,getDiagramId:xt},wt=kt,_t=e((t)=>{let{theme:o,bkgColorArray:u,borderColorArray:i}=t;if(!oe(o,i))return"";let g=se(t.look),f=ue(u),r="";for(let d=0;d<Ye(t.THEME_COLOR_LIMIT,i);d++){let y=i[d%i.length],w=f?`fill: ${u[d%u.length]};`:"",L=`[data-look="${g}"][data-color-id="color-${d}"]`;r+=`
7
7
 
8
8
  ${L}.node rect.composite {
9
9
  stroke: ${y};
@@ -137,4 +137,4 @@ Expecting `+Q.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else de="Parse er
137
137
  fill: ${t.textColor};
138
138
  }
139
139
  ${je()}
140
- `,"getStyles"),Tt=Dt;function xe(t,o){if(t===0||!Number.isInteger(t))throw Error("Columns must be an integer !== 0.");if(o<0||!Number.isInteger(o))throw Error("Position must be a non-negative integer."+o);if(t<0)return{px:o,py:0};if(t===1)return{px:0,py:o};let u=o%t,i=Math.floor(o/t);return{px:u,py:i}}e(xe,"calculateBlockPosition");var Nt=e((t)=>{let o=0,u=0;for(let i of t.children){let{width:g,height:f,x:r,y:d}=i.size??{width:0,height:0,x:0,y:0};if(a.debug("getMaxChildSize abc95 child:",i.id,"width:",g,"height:",f,"x:",r,"y:",d,i.type),i.type==="space")continue;let y=g/(i.widthInColumns??1);if(y>o)o=y;if(f>u)u=f}return{width:o,height:u}},"getMaxChildSize");function te(t,o,u=0,i=0,g=8){if(a.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",u),!t?.size?.width)t.size={width:u,height:i,x:0,y:0};let f=0,r=0;if(t.children?.length>0){for(let k of t.children)te(k,o,0,0,g);let d=Nt(t);f=d.width,r=d.height,a.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",f,r);for(let k of t.children)if(k.size)a.debug(`abc95 Setting size of children of ${t.id} id=${k.id} ${f} ${r} ${JSON.stringify(k.size)}`),k.size.width=f*(k.widthInColumns??1)+g*((k.widthInColumns??1)-1),k.size.height=r,k.size.x=0,k.size.y=0,a.debug(`abc95 updating size of ${t.id} children child:${k.id} maxWidth:${f} maxHeight:${r}`);for(let k of t.children)te(k,o,f,r,g);let y=t.columns??-1,w=0;for(let k of t.children)w+=k.widthInColumns??1;let L=t.children.length;if(y>0&&y<w)L=y;let m=Math.ceil(w/L),E=L*(f+g)+g,D=m*(r+g)+g;if(E<u){a.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${u} siblingHeight ${i} width ${E}`),E=u,D=i;let k=(u-L*g-g)/L,N=(i-m*g-g)/m;a.debug("Size indata abc88",t.id,"childWidth",k,"maxWidth",f),a.debug("Size indata abc88",t.id,"childHeight",N,"maxHeight",r),a.debug("Size indata abc88 xSize",L,"padding",g);for(let T of t.children)if(T.size)T.size.width=k,T.size.height=N,T.size.x=0,T.size.y=0}if(a.debug(`abc95 (finale calc) ${t.id} xSize ${L} ySize ${m} columns ${y}${t.children.length} width=${Math.max(E,t.size?.width||0)}`),E<(t?.size?.width||0)){E=t?.size?.width||0;let k=y>0?Math.min(t.children.length,y):t.children.length;if(k>0){let N=(E-k*g-g)/k;a.debug("abc95 (growing to fit) width",t.id,E,t.size?.width,N);for(let T of t.children)if(T.size)T.size.width=N}}t.size={width:E,height:D,x:0,y:0}}a.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}e(te,"setBlockSizes");function ye(t,o,u=8){a.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let i=t.columns??-1;if(a.debug("layoutBlocks columns abc95",t.id,"=>",i,t),t.children&&t.children.length>0){let g=t?.children[0]?.size?.width??0,f=t.children.length*g+(t.children.length-1)*u;a.debug("widthOfChildren 88",f,"posX");let r=new Map;{let m=0;for(let E of t.children){if(!E.size)continue;let{py:D}=xe(i,m),k=r.get(D)??0;if(E.size.height>k)r.set(D,E.size.height);let N=E?.widthInColumns??1;if(i>0)N=Math.min(N,i-m%i);m+=N}}let d=new Map;{let m=0,E=[...r.keys()].sort((D,k)=>D-k);for(let D of E)d.set(D,m),m+=(r.get(D)??0)+u}let y=0;a.debug("abc91 block?.size?.x",t.id,t?.size?.x);let w=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-u,L=0;for(let m of t.children){let E=t;if(!m.size)continue;let{width:D,height:k}=m.size,{px:N,py:T}=xe(i,y);if(T!=L)L=T,w=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-u,a.debug("New row in layout for block",t.id," and child ",m.id,L);if(a.debug(`abc89 layout blocks (child) id: ${m.id} Pos: ${y} (px, py) ${N},${T} (${E?.size?.x},${E?.size?.y}) parent: ${E.id} width: ${D}${u}`),E.size){let z=D/2;m.size.x=w+u+z,a.debug(`abc91 layout blocks (calc) px, pyid:${m.id} startingPos=X${w} new startingPosX${m.size.x} ${z} padding=${u} width=${D} halfWidth=${z} => x:${m.size.x} y:${m.size.y} ${m.widthInColumns} (width * (child?.w || 1)) / 2 ${D*(m?.widthInColumns??1)/2}`),w=m.size.x+z;let R=d.get(T)??0,S=r.get(T)??k;m.size.y=E.size.y-E.size.height/2+R+S/2+u,a.debug(`abc88 layout blocks (calc) px, pyid:${m.id}startingPosX${w}${u}${z}=>x:${m.size.x}y:${m.size.y}${m.widthInColumns}(width * (child?.w || 1)) / 2${D*(m?.widthInColumns??1)/2}`)}if(m.children)ye(m,o,u);let O=m?.widthInColumns??1;if(i>0)O=Math.min(O,i-y%i);y+=O,a.debug("abc88 columnsPos",m,y)}}a.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}e(ye,"layoutBlocks");function we(t,{minX:o,minY:u,maxX:i,maxY:g}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:f,y:r,width:d,height:y}=t.size;if(f-d/2<o)o=f-d/2;if(r-y/2<u)u=r-y/2;if(f+d/2>i)i=f+d/2;if(r+y/2>g)g=r+y/2}if(t.children)for(let f of t.children)({minX:o,minY:u,maxX:i,maxY:g}=we(f,{minX:o,minY:u,maxX:i,maxY:g}));return{minX:o,minY:u,maxX:i,maxY:g}}e(we,"findBounds");function We(t){let o=t.getBlock("root");if(!o)return;let u=l()?.block?.padding??8;te(o,t,0,0,u),ye(o,t,u),a.debug("getBlocks",JSON.stringify(o,null,2));let{minX:i,minY:g,maxX:f,maxY:r}=we(o),d=r-g,y=f-i;return{x:i,y:g,width:y,height:d}}e(We,"layout");function Ee(t,o,u=!1){let i=t,g="default";if((i?.classes?.length||0)>0)g=(i?.classes??[]).join(" ");g=g+" flowchart-label";let f=(i?.classes??[]).flatMap((k)=>o.getClasses().get(k)?.styles??[]),r=0,d="rect",y;switch(i.type){case"round":r=5,d="rect";break;case"composite":r=0,d="composite",y=0;break;case"square":d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"block_arrow":d="block_arrow";break;case"odd":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"rect_left_inv_arrow":d="rect_left_inv_arrow";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"group":d="rect";break;case"doublecircle":d="doublecircle";break;default:d="rect"}let w=Ja(i?.styles??[]),L=i.label,m=i.size??{width:0,height:0,x:0,y:0},E=o.getDiagramId();return{labelStyle:w.labelStyle,shape:d,label:L,labelText:L,rx:r,ry:r,class:g,cssClasses:g,cssStyles:i?.styles??[],cssCompiledStyles:f,style:w.style,id:i.id,domId:E?`${E}-${i.id}`:i.id,isGroup:!1,directions:i.directions,width:m.width||void 0,height:m.height||void 0,wrappingWidth:m.width||Number.POSITIVE_INFINITY,x:m.x,y:m.y,positioned:u,intersect:void 0,padding:y??b()?.block?.padding??0,widthInColumns:i.widthInColumns??1,colorIndex:i.colorIndex,look:b().look}}e(Ee,"getNodeFromBlock");async function Ve(t,o,u){let i=Ee(o,u,!1);if(o.type==="group")return;let g=b(),f=await Et(t,i,{config:g}),r=f.node()?.getBBox()??{width:0,height:0},d=u.getBlock(i.id);d.size={width:r.width,height:r.height,x:0,y:0,node:f},u.setBlock(d),f.remove()}e(Ve,"calculateBlockSize");async function Ue(t,o,u){let i=Ee(o,u,!0);if(u.getBlock(i.id).type!=="space"){let f=b(),r=await Et(t,i,{config:f});if(i.colorIndex!==void 0)Ze(r,i.colorIndex,f.theme,f.themeVariables?.borderColorArray);o.intersect=i?.intersect,gt(i)}}e(Ue,"insertBlockPositioned");async function re(t,o,u,i){for(let g of o)if(await i(t,g,u),g.children)await re(t,g.children,u,i)}e(re,"performOperations");async function He(t,o,u){await re(t,o,u,Ve)}e(He,"calculateBlockSizes");async function Xe(t,o,u){await re(t,o,u,Ue)}e(Xe,"insertBlocks");async function Ge(t,o,u,i,g){let f=new J({multigraph:!0,compound:!0});f.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let r of u)if(r.size)f.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(let r of o)if(r.start&&r.end){let d=i.getBlock(r.start),y=i.getBlock(r.end);if(d?.size&&y?.size){let w=d.size,L=y.size,m=[{x:w.x,y:w.y},{x:w.x+(L.x-w.x)/2,y:w.y+(L.y-w.y)/2},{x:L.x,y:L.y}],E=g?`${g}-${r.id}`:r.id,D=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",k=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",N=`${D} ${k} flowchart-link LS-a1 LE-b1`;if(nn(t,{...r,id:E,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:m,classes:N},{},"block",f.node(r.start),f.node(r.end),g),r.label)await At(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:m,classes:N}),Zn({...r,x:m[1].x,y:m[1].y},{originalPath:m})}}}e(Ge,"insertEdges");var It=e(function(t,o){return o.db.getClasses()},"getClasses"),Ot=e(async function(t,o,u,i){let{securityLevel:g,block:f}=b(),r=i.db;r.setDiagramId(o);let d;if(g==="sandbox")d=p("#i"+o);let y=g==="sandbox"?p(d.nodes()[0].contentDocument.body):p("body"),w=g==="sandbox"?y.select(`[id="${o}"]`):p(`[id="${o}"]`);Ma(w,b()),Xn(w,["point","circle","cross"],i.type,o);let m=r.getBlocks(),E=r.getBlocksFlat(),D=r.getEdges(),k=w.insert("g").attr("class","block");await He(k,m,r);let N=We(r);await Xe(k,m,r),await Ge(k,D,E,r,o);let T=k.node()?.getBBox(),O=T&&Number.isFinite(T.width)&&Number.isFinite(T.height)?T:N;if(O){let z=Math.max(1,Math.round(0.125*(O.width/O.height))),R=O.height+z+10,S=O.width+10,{useMaxWidth:n}=f;B(w,R,S,!!n),a.debug("Here Bounds",N,O),w.attr("viewBox",`${O.x-5} ${O.y-5} ${O.width+10} ${O.height+10}`)}},"draw"),Ct={draw:Ot,getClasses:It},ar={parser:rt,db:wt,renderer:Ct,styles:Tt};export{ar as diagram};
140
+ `,"getStyles"),Tt=Dt;function xe(t,o){if(t===0||!Number.isInteger(t))throw Error("Columns must be an integer !== 0.");if(o<0||!Number.isInteger(o))throw Error("Position must be a non-negative integer."+o);if(t<0)return{px:o,py:0};if(t===1)return{px:0,py:o};let u=o%t,i=Math.floor(o/t);return{px:u,py:i}}e(xe,"calculateBlockPosition");var Nt=e((t)=>{let o=0,u=0;for(let i of t.children){let{width:g,height:f,x:r,y:d}=i.size??{width:0,height:0,x:0,y:0};if(a.debug("getMaxChildSize abc95 child:",i.id,"width:",g,"height:",f,"x:",r,"y:",d,i.type),i.type==="space")continue;let y=g/(i.widthInColumns??1);if(y>o)o=y;if(f>u)u=f}return{width:o,height:u}},"getMaxChildSize");function ee(t,o,u=0,i=0,g=8){if(a.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",u),!t?.size?.width)t.size={width:u,height:i,x:0,y:0};let f=0,r=0;if(t.children?.length>0){for(let k of t.children)ee(k,o,0,0,g);let d=Nt(t);f=d.width,r=d.height,a.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",f,r);for(let k of t.children)if(k.size)a.debug(`abc95 Setting size of children of ${t.id} id=${k.id} ${f} ${r} ${JSON.stringify(k.size)}`),k.size.width=f*(k.widthInColumns??1)+g*((k.widthInColumns??1)-1),k.size.height=r,k.size.x=0,k.size.y=0,a.debug(`abc95 updating size of ${t.id} children child:${k.id} maxWidth:${f} maxHeight:${r}`);for(let k of t.children)ee(k,o,f,r,g);let y=t.columns??-1,w=0;for(let k of t.children)w+=k.widthInColumns??1;let L=t.children.length;if(y>0&&y<w)L=y;let m=Math.ceil(w/L),E=L*(f+g)+g,D=m*(r+g)+g;if(E<u){a.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${u} siblingHeight ${i} width ${E}`),E=u,D=i;let k=(u-L*g-g)/L,N=(i-m*g-g)/m;a.debug("Size indata abc88",t.id,"childWidth",k,"maxWidth",f),a.debug("Size indata abc88",t.id,"childHeight",N,"maxHeight",r),a.debug("Size indata abc88 xSize",L,"padding",g);for(let T of t.children)if(T.size)T.size.width=k,T.size.height=N,T.size.x=0,T.size.y=0}if(a.debug(`abc95 (finale calc) ${t.id} xSize ${L} ySize ${m} columns ${y}${t.children.length} width=${Math.max(E,t.size?.width||0)}`),E<(t?.size?.width||0)){E=t?.size?.width||0;let k=y>0?Math.min(t.children.length,y):t.children.length;if(k>0){let N=(E-k*g-g)/k;a.debug("abc95 (growing to fit) width",t.id,E,t.size?.width,N);for(let T of t.children)if(T.size)T.size.width=N}}t.size={width:E,height:D,x:0,y:0}}a.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}e(ee,"setBlockSizes");function ye(t,o,u=8){a.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let i=t.columns??-1;if(a.debug("layoutBlocks columns abc95",t.id,"=>",i,t),t.children&&t.children.length>0){let g=t?.children[0]?.size?.width??0,f=t.children.length*g+(t.children.length-1)*u;a.debug("widthOfChildren 88",f,"posX");let r=new Map;{let m=0;for(let E of t.children){if(!E.size)continue;let{py:D}=xe(i,m),k=r.get(D)??0;if(E.size.height>k)r.set(D,E.size.height);let N=E?.widthInColumns??1;if(i>0)N=Math.min(N,i-m%i);m+=N}}let d=new Map;{let m=0,E=[...r.keys()].sort((D,k)=>D-k);for(let D of E)d.set(D,m),m+=(r.get(D)??0)+u}let y=0;a.debug("abc91 block?.size?.x",t.id,t?.size?.x);let w=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-u,L=0;for(let m of t.children){let E=t;if(!m.size)continue;let{width:D,height:k}=m.size,{px:N,py:T}=xe(i,y);if(T!=L)L=T,w=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-u,a.debug("New row in layout for block",t.id," and child ",m.id,L);if(a.debug(`abc89 layout blocks (child) id: ${m.id} Pos: ${y} (px, py) ${N},${T} (${E?.size?.x},${E?.size?.y}) parent: ${E.id} width: ${D}${u}`),E.size){let z=D/2;m.size.x=w+u+z,a.debug(`abc91 layout blocks (calc) px, pyid:${m.id} startingPos=X${w} new startingPosX${m.size.x} ${z} padding=${u} width=${D} halfWidth=${z} => x:${m.size.x} y:${m.size.y} ${m.widthInColumns} (width * (child?.w || 1)) / 2 ${D*(m?.widthInColumns??1)/2}`),w=m.size.x+z;let R=d.get(T)??0,S=r.get(T)??k;m.size.y=E.size.y-E.size.height/2+R+S/2+u,a.debug(`abc88 layout blocks (calc) px, pyid:${m.id}startingPosX${w}${u}${z}=>x:${m.size.x}y:${m.size.y}${m.widthInColumns}(width * (child?.w || 1)) / 2${D*(m?.widthInColumns??1)/2}`)}if(m.children)ye(m,o,u);let O=m?.widthInColumns??1;if(i>0)O=Math.min(O,i-y%i);y+=O,a.debug("abc88 columnsPos",m,y)}}a.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}e(ye,"layoutBlocks");function we(t,{minX:o,minY:u,maxX:i,maxY:g}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:f,y:r,width:d,height:y}=t.size;if(f-d/2<o)o=f-d/2;if(r-y/2<u)u=r-y/2;if(f+d/2>i)i=f+d/2;if(r+y/2>g)g=r+y/2}if(t.children)for(let f of t.children)({minX:o,minY:u,maxX:i,maxY:g}=we(f,{minX:o,minY:u,maxX:i,maxY:g}));return{minX:o,minY:u,maxX:i,maxY:g}}e(we,"findBounds");function We(t){let o=t.getBlock("root");if(!o)return;let u=l()?.block?.padding??8;ee(o,t,0,0,u),ye(o,t,u),a.debug("getBlocks",JSON.stringify(o,null,2));let{minX:i,minY:g,maxX:f,maxY:r}=we(o),d=r-g,y=f-i;return{x:i,y:g,width:y,height:d}}e(We,"layout");function Ee(t,o,u=!1){let i=t,g="default";if((i?.classes?.length||0)>0)g=(i?.classes??[]).join(" ");g=g+" flowchart-label";let f=(i?.classes??[]).flatMap((k)=>o.getClasses().get(k)?.styles??[]),r=0,d="rect",y;switch(i.type){case"round":r=5,d="rect";break;case"composite":r=0,d="composite",y=0;break;case"square":d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"block_arrow":d="block_arrow";break;case"odd":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"rect_left_inv_arrow":d="rect_left_inv_arrow";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"group":d="rect";break;case"doublecircle":d="doublecircle";break;default:d="rect"}let w=Ja(i?.styles??[]),L=i.label,m=i.size??{width:0,height:0,x:0,y:0},E=o.getDiagramId();return{labelStyle:w.labelStyle,shape:d,label:L,labelText:L,rx:r,ry:r,class:g,cssClasses:g,cssStyles:i?.styles??[],cssCompiledStyles:f,style:w.style,id:i.id,domId:E?`${E}-${i.id}`:i.id,isGroup:!1,directions:i.directions,width:m.width||void 0,height:m.height||void 0,wrappingWidth:m.width||Number.POSITIVE_INFINITY,x:m.x,y:m.y,positioned:u,intersect:void 0,padding:y??b()?.block?.padding??0,widthInColumns:i.widthInColumns??1,colorIndex:i.colorIndex,look:b().look}}e(Ee,"getNodeFromBlock");async function Ve(t,o,u){let i=Ee(o,u,!1);if(o.type==="group")return;let g=b(),f=await Et(t,i,{config:g}),r=f.node()?.getBBox()??{width:0,height:0},d=u.getBlock(i.id);d.size={width:r.width,height:r.height,x:0,y:0,node:f},u.setBlock(d),f.remove()}e(Ve,"calculateBlockSize");async function Ue(t,o,u){let i=Ee(o,u,!0);if(u.getBlock(i.id).type!=="space"){let f=b(),r=await Et(t,i,{config:f});if(i.colorIndex!==void 0)Ze(r,i.colorIndex,f.theme,f.themeVariables?.borderColorArray);o.intersect=i?.intersect,yt(i)}}e(Ue,"insertBlockPositioned");async function re(t,o,u,i){for(let g of o)if(await i(t,g,u),g.children)await re(t,g.children,u,i)}e(re,"performOperations");async function He(t,o,u){await re(t,o,u,Ve)}e(He,"calculateBlockSizes");async function Xe(t,o,u){await re(t,o,u,Ue)}e(Xe,"insertBlocks");async function Ge(t,o,u,i,g){let f=new te({multigraph:!0,compound:!0});f.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let r of u)if(r.size)f.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(let r of o)if(r.start&&r.end){let d=i.getBlock(r.start),y=i.getBlock(r.end);if(d?.size&&y?.size){let w=d.size,L=y.size,m=[{x:w.x,y:w.y},{x:w.x+(L.x-w.x)/2,y:w.y+(L.y-w.y)/2},{x:L.x,y:L.y}],E=g?`${g}-${r.id}`:r.id,D=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",k=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",N=`${D} ${k} flowchart-link LS-a1 LE-b1`;if(nn(t,{...r,id:E,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:m,classes:N},{},"block",f.node(r.start),f.node(r.end),g),r.label)await At(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:m,classes:N}),Zn({...r,x:m[1].x,y:m[1].y},{originalPath:m})}}}e(Ge,"insertEdges");var It=e(function(t,o){return o.db.getClasses()},"getClasses"),Ot=e(async function(t,o,u,i){let{securityLevel:g,block:f}=b(),r=i.db;r.setDiagramId(o);let d;if(g==="sandbox")d=p("#i"+o);let y=g==="sandbox"?p(d.nodes()[0].contentDocument.body):p("body"),w=g==="sandbox"?y.select(`[id="${o}"]`):p(`[id="${o}"]`);Ma(w,b()),Xn(w,["point","circle","cross"],i.type,o);let m=r.getBlocks(),E=r.getBlocksFlat(),D=r.getEdges(),k=w.insert("g").attr("class","block");await He(k,m,r);let N=We(r);await Xe(k,m,r),await Ge(k,D,E,r,o);let T=k.node()?.getBBox(),O=T&&Number.isFinite(T.width)&&Number.isFinite(T.height)?T:N;if(O){let z=Math.max(1,Math.round(0.125*(O.width/O.height))),R=O.height+z+10,S=O.width+10,{useMaxWidth:n}=f;B(w,R,S,!!n),a.debug("Here Bounds",N,O),w.attr("viewBox",`${O.x-5} ${O.y-5} ${O.width+10} ${O.height+10}`)}},"draw"),Ct={draw:Ot,getClasses:It},ar={parser:rt,db:wt,renderer:Ct,styles:Tt};export{ar as diagram};
@@ -1,4 +1,4 @@
1
- import{G}from"./chunk-14bad871.js";import{e,a,ke,D,b,B,C,S,E,T,A,R,L,p,V,Hr,k,U}from"./chunk-pyg1mr80.js";import{Pt}from"./chunk-5nda24gv.js";import{X}from"./chunk-zc1mk10n.js";import{Xe}from"./chunk-07agqp8h.js";import{le}from"./chunk-01hcjafh.js";function je(t){var n=0,l=t.children,o=l&&l.length;if(!o)n=1;else while(--o>=0)n+=l[o].value;t.value=n}function ge(){return this.eachAfter(je)}function ye(t,n){let l=-1;for(let o of this)t.call(n,o,++l,this);return this}function xe(t,n){var l=this,o=[l],s,d,f=-1;while(l=o.pop())if(t.call(n,l,++f,this),s=l.children)for(d=s.length-1;d>=0;--d)o.push(s[d]);return this}function Se(t,n){var l=this,o=[l],s=[],d,f,h,v=-1;while(l=o.pop())if(s.push(l),d=l.children)for(f=0,h=d.length;f<h;++f)o.push(d[f]);while(l=s.pop())t.call(n,l,++v,this);return this}function ve(t,n){let l=-1;for(let o of this)if(t.call(n,o,++l,this))return o}function be(t){return this.eachAfter(function(n){var l=+t(n.data)||0,o=n.children,s=o&&o.length;while(--s>=0)l+=o[s].value;n.value=l})}function we(t){return this.eachBefore(function(n){if(n.children)n.children.sort(t)})}function Ce(t){var n=this,l=Ze(n,t),o=[n];while(n!==l)n=n.parent,o.push(n);var s=o.length;while(t!==l)o.splice(s,0,t),t=t.parent;return o}function Ze(t,n){if(t===n)return t;var l=t.ancestors(),o=n.ancestors(),s=null;t=l.pop(),n=o.pop();while(t===n)s=t,t=l.pop(),n=o.pop();return s}function Te(){var t=this,n=[t];while(t=t.parent)n.push(t);return n}function Le(){return Array.from(this)}function $e(){var t=[];return this.eachBefore(function(n){if(!n.children)t.push(n)}),t}function Ae(){var t=this,n=[];return t.each(function(l){if(l!==t)n.push({source:l.parent,target:l})}),n}function*Fe(){var t=this,n,l=[t],o,s,d;do{n=l.reverse(),l=[];while(t=n.pop())if(yield t,o=t.children)for(s=0,d=o.length;s<d;++s)l.push(o[s])}while(l.length)}function re(t,n){if(t instanceof Map){if(t=[void 0,t],n===void 0)n=Ke}else if(n===void 0)n=Je;var l=new ce(t),o,s=[l],d,f,h,v;while(o=s.pop())if((f=n(o.data))&&(v=(f=Array.from(f)).length)){o.children=f;for(h=v-1;h>=0;--h)s.push(d=f[h]=new ce(f[h])),d.parent=o,d.depth=o.depth+1}return l.eachBefore(et)}function Ue(){return re(this).eachBefore(Qe)}function Je(t){return t.children}function Ke(t){return Array.isArray(t)?t[1]:null}function Qe(t){if(t.data.value!==void 0)t.value=t.data.value;t.data=t.data.data}function et(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function ce(t){this.data=t,this.depth=this.height=0,this.parent=null}ce.prototype=re.prototype={constructor:ce,count:ge,each:ye,eachAfter:Se,eachBefore:xe,find:ve,sum:be,sort:we,path:Ce,ancestors:Te,descendants:Le,leaves:$e,links:Ae,copy:Ue,[Symbol.iterator]:Fe};function Be(t){if(typeof t!=="function")throw Error();return t}function ne(){return 0}function Q(t){return function(){return t}}function Ne(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Me(t,n,l,o,s){var d=t.children,f,h=-1,v=d.length,u=t.value&&(o-n)/t.value;while(++h<v)f=d[h],f.y0=l,f.y1=s,f.x0=n,f.x1=n+=f.value*u}function _e(t,n,l,o,s){var d=t.children,f,h=-1,v=d.length,u=t.value&&(s-l)/t.value;while(++h<v)f=d[h],f.x0=n,f.x1=o,f.y0=l,f.y1=l+=f.value*u}var tt=(1+Math.sqrt(5))/2;function at(t,n,l,o,s,d){var f=[],h=n.children,v,u,m=0,_=0,i=h.length,M,F,N=n.value,g,w,Y,O,ee,se,j;while(m<i){M=s-l,F=d-o;do g=h[_++].value;while(!g&&_<i);w=Y=g,se=Math.max(F/M,M/F)/(N*t),j=g*g*se,ee=Math.max(Y/j,j/w);for(;_<i;++_){if(g+=u=h[_].value,u<w)w=u;if(u>Y)Y=u;if(j=g*g*se,O=Math.max(Y/j,j/w),O>ee){g-=u;break}ee=O}if(f.push(v={value:g,dice:M<F,children:h.slice(m,_)}),v.dice)Me(v,l,o,s,N?o+=F*g/N:d);else _e(v,l,o,N?l+=M*g/N:s,d);N-=g,m=_}return f}var Ee=function t(n){function l(o,s,d,f,h){at(n,o,s,d,f,h)}return l.ratio=function(o){return t((o=+o)>1?o:1)},l}(tt);function fe(){var t=Ee,n=!1,l=1,o=1,s=[0],d=ne,f=ne,h=ne,v=ne,u=ne;function m(i){if(i.x0=i.y0=0,i.x1=l,i.y1=o,i.eachBefore(_),s=[0],n)i.eachBefore(Ne);return i}function _(i){var M=s[i.depth],F=i.x0+M,N=i.y0+M,g=i.x1-M,w=i.y1-M;if(g<F)F=g=(F+g)/2;if(w<N)N=w=(N+w)/2;if(i.x0=F,i.y0=N,i.x1=g,i.y1=w,i.children){if(M=s[i.depth+1]=d(i)/2,F+=u(i)-M,N+=f(i)-M,g-=h(i)-M,w-=v(i)-M,g<F)F=g=(F+g)/2;if(w<N)N=w=(N+w)/2;t(i,F,N,g,w)}}return m.round=function(i){return arguments.length?(n=!!i,m):n},m.size=function(i){return arguments.length?(l=+i[0],o=+i[1],m):[l,o]},m.tile=function(i){return arguments.length?(t=Be(i),m):t},m.padding=function(i){return arguments.length?m.paddingInner(i).paddingOuter(i):m.paddingInner()},m.paddingInner=function(i){return arguments.length?(d=typeof i==="function"?i:Q(+i),m):d},m.paddingOuter=function(i){return arguments.length?m.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):m.paddingTop()},m.paddingTop=function(i){return arguments.length?(f=typeof i==="function"?i:Q(+i),m):f},m.paddingRight=function(i){return arguments.length?(h=typeof i==="function"?i:Q(+i),m):h},m.paddingBottom=function(i){return arguments.length?(v=typeof i==="function"?i:Q(+i),m):v},m.paddingLeft=function(i){return arguments.length?(u=typeof i==="function"?i:Q(+i),m):u},m}var Re=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T}static{e(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let t=D,n=b();return U({...t.treemap,...n.treemap??{}})}addNode(t,n){if(this.nodes.push(t),this.levels.set(t,n),n===0)this.outerNodes.push(t),this.root??=t}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,n){let l=this.classes.get(t)??{id:t,styles:[],textStyles:[]},o=n.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(Hr(s))if(l?.textStyles)l.textStyles.push(s);else l.textStyles=[s];if(l?.styles)l.styles.push(s);else l.styles=[s]});this.classes.set(t,l)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){C(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function We(t){if(!t.length)return[];let n=[],l=[];return t.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(l.length>0&&l[l.length-1].level>=o.level)l.pop();if(l.length===0)n.push(s);else{let d=l[l.length-1].node;if(d.children)d.children.push(s);else d.children=[s]}if(o.type!=="Leaf")l.push({node:s,level:o.level})}),n}e(We,"buildHierarchy");var rt=e((t,n)=>{G(t,n);let l=[];for(let d of t.TreemapRows??[])if(d.$type==="ClassDefStatement")n.addClass(d.className??"",d.styleText??"");for(let d of t.TreemapRows??[]){let f=d.item;if(!f)continue;let h=d.indent?parseInt(d.indent):0,v=nt(f),u=f.classSelector?n.getStylesForClass(f.classSelector):[],m=u.length>0?u:void 0,_={level:h,name:v,type:f.$type,value:f.value,classSelector:f.classSelector,cssCompiledStyles:m};l.push(_)}let o=We(l),s=e((d,f)=>{for(let h of d)if(n.addNode(h,f),h.children&&h.children.length>0)s(h.children,f+1)},"addNodesRecursively");s(o,0)},"populate"),nt=e((t)=>t.name?String(t.name):"","getItemName"),He={parser:{yy:void 0},parse:e(async(t)=>{try{let l=await X("treemap",t);a.debug("Treemap AST:",l);let o=He.parser?.yy;if(!(o instanceof Re))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");rt(l,o)}catch(n){throw a.error("Error parsing treemap:",n),n}},"parse")},lt=10,oe=10,pe=25,ot=e((t,n,l,o)=>{let s=o.db,d=s.getConfig(),f=d.padding??lt,h=s.getDiagramTitle(),v=s.getRoot(),{themeVariables:u}=b();if(!v)return;let m=h?30:0,_=V(n),i=d.nodeWidth?d.nodeWidth*oe:960,M=d.nodeHeight?d.nodeHeight*oe:500,F=i,N=M+m;_.attr("viewBox",`0 0 ${F} ${N}`),B(_,N,F,d.useMaxWidth);let g;try{let r=d.valueFormat||",";if(r==="$0,0")g=e((c)=>"$"+Pt(",")(c),"valueFormat");else if(r.startsWith("$")&&r.includes(",")){let c=/\.\d+/.exec(r),y=c?c[0]:"";g=e((z)=>"$"+Pt(","+y)(z),"valueFormat")}else if(r.startsWith("$")){let c=r.substring(1);g=e((y)=>"$"+Pt(c||"")(y),"valueFormat")}else g=Pt(r)}catch(r){a.error("Error creating format function:",r),g=Pt(",")}let w=Xe().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),Y=Xe().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),O=Xe().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);if(h)_.append("text").attr("x",F/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let ee=_.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),se=re(v).sum((r)=>r.value??0).sort((r,c)=>(c.value??0)-(r.value??0)),ze=fe().size([i,M]).paddingTop((r)=>r.children&&r.children.length>0?pe+oe:0).paddingInner(f).paddingLeft((r)=>r.children&&r.children.length>0?oe:0).paddingRight((r)=>r.children&&r.children.length>0?oe:0).paddingBottom((r)=>r.children&&r.children.length>0?oe:0).round(!0)(se),Ie=ze.descendants().filter((r)=>r.children&&r.children.length>0),ie=ee.selectAll(".treemapSection").data(Ie).enter().append("g").attr("class","treemapSection").attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(ie.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",pe).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(r)=>{if(r.depth===0)return"display: none;";return""}),ie.append("clipPath").attr("id",(r,c)=>`clip-section-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-12)).attr("height",pe),ie.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class",(r,c)=>`treemapSection section${c}`).attr("fill",(r)=>w(r.data.name)).attr("fill-opacity",0.6).attr("stroke",(r)=>Y(r.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c=k({cssCompiledStyles:r.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),ie.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",pe/2).attr("dominant-baseline","middle").text((r)=>r.depth===0?"":r.data.name).attr("font-weight","bold").attr("clip-path",(r,c)=>`url(#clip-section-${n}-${c})`).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).each(function(r){if(r.depth===0)return;let c=p(this),y=r.data.name;c.text(y);let z=r.x1-r.x0,W=6,P;if(d.showValues!==!1&&r.value){let I=z-10,K=30,Ge=10;P=I-30-10-W}else P=z-W-6;let x=Math.max(15,P),J=c.node();if(J.getComputedTextLength()>x){let K=y;while(K.length>0){if(K=y.substring(0,K.length-1),K.length===0){if(c.text("..."),J.getComputedTextLength()>x)c.text("");break}if(c.text(K+"..."),J.getComputedTextLength()<=x)break}}}),d.showValues!==!1)ie.append("text").attr("class","treemapSectionValue").attr("x",(r)=>r.x1-r.x0-10).attr("y",pe/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((r)=>r.value?g(r.value):"").attr("font-style","italic").attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")});let De=ze.leaves(),q=De.length>20,Oe=q?16:38,de=q?14:28,te=q?4:8,ae=q?4:6,he=q?2:4,Ve=q?8:10,me=q?1:2,ue=ee.selectAll(".treemapLeafGroup").data(De).enter().append("g").attr("class",(r,c)=>`treemapNode treemapLeafGroup leaf${c}${r.data.classSelector?` ${r.data.classSelector}`:""}x`).attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(ue.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class","treemapLeaf").attr("fill",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("style",(r)=>k({cssCompiledStyles:r.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("stroke-width",3),ue.append("clipPath").attr("id",(r,c)=>`clip-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-4)).attr("height",(r)=>Math.max(0,r.y1-r.y0-4)),ue.append("text").attr("class","treemapLabel").attr("x",(r)=>(r.x1-r.x0)/2).attr("y",(r)=>(r.y1-r.y0)/2).attr("style",(r)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${Oe}px;fill:`+O(r.data.name)+";",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).attr("clip-path",(r,c)=>`url(#clip-${n}-${c})`).text((r)=>r.data.name).each(function(r){let c=p(this),y=r.x1-r.x0,z=r.y1-r.y0,W=c.node(),P=y-2*he,Z=z-2*he;if(P<Ve||Z<Ve){c.style("display","none");return}let x=parseInt(c.style("font-size"),10),J=0.6;while(W.getComputedTextLength()>P&&x>te)x--,c.style("font-size",`${x}px`);let H=Math.max(ae,Math.min(de,Math.round(x*J))),I=x+me+H;while(I>Z&&x>te){if(x--,H=Math.max(ae,Math.min(de,Math.round(x*J))),H<ae&&x===te)break;if(c.style("font-size",`${x}px`),I=x+me+H,H<=ae&&I>Z);}if(c.style("font-size",`${x}px`),q){if(x<te||Z<te)c.style("display","none")}else if(W.getComputedTextLength()>P||x<te||Z<x)c.style("display","none")}),d.showValues!==!1)ue.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let y=`text-anchor: middle; dominant-baseline: hanging; font-size: ${de}px;fill:`+O(c.data.name)+";",z=k({cssCompiledStyles:c.data.cssCompiledStyles});return y+z.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,y)=>`url(#clip-${n}-${y})`).text((c)=>c.value?g(c.value):"").each(function(c){let y=p(this),z=this.parentNode;if(!z){y.style("display","none");return}let W=p(z).select(".treemapLabel");if(W.empty()||W.style("display")==="none"){y.style("display","none");return}let P=parseFloat(W.style("font-size")),x=Math.max(ae,Math.min(de,Math.round(P*0.6)));y.style("font-size",`${x}px`);let H=(c.y1-c.y0)/2+P/2+me;y.attr("y",H);let I=c.x1-c.x0,Pe=c.y1-c.y0-4,Ye=I-2*he;if(y.node().getComputedTextLength()>Ye||H+x>Pe||x<ae)y.style("display","none");else y.style("display",null)});let qe=d.diagramPadding??8;le(_,qe,"flowchart",d?.useMaxWidth||!1)},"draw"),st=e(function(t,n){return n.db.getClasses()},"getClasses"),it={draw:ot,getClasses:st},ct={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=e(({treemap:t}={})=>{let n=ke(),l=b(),o=U(n,l.themeVariables),s=U(ct,t),d=s.titleColor??o.titleColor,f=s.labelColor??o.textColor,h=s.valueColor??o.textColor;return`
1
+ import{G}from"./chunk-ya3ghn3n.js";import{e,a,ke,D,b,B,C,S,E,T,A,R,L,p,V,Hr,k,U}from"./chunk-5v44qv67.js";import{Pt}from"./chunk-5nda24gv.js";import{X}from"./chunk-cktmyc13.js";import{Xe}from"./chunk-07agqp8h.js";import{le}from"./chunk-718mr5gc.js";function je(t){var n=0,l=t.children,o=l&&l.length;if(!o)n=1;else while(--o>=0)n+=l[o].value;t.value=n}function ge(){return this.eachAfter(je)}function ye(t,n){let l=-1;for(let o of this)t.call(n,o,++l,this);return this}function xe(t,n){var l=this,o=[l],s,d,f=-1;while(l=o.pop())if(t.call(n,l,++f,this),s=l.children)for(d=s.length-1;d>=0;--d)o.push(s[d]);return this}function Se(t,n){var l=this,o=[l],s=[],d,f,h,v=-1;while(l=o.pop())if(s.push(l),d=l.children)for(f=0,h=d.length;f<h;++f)o.push(d[f]);while(l=s.pop())t.call(n,l,++v,this);return this}function ve(t,n){let l=-1;for(let o of this)if(t.call(n,o,++l,this))return o}function be(t){return this.eachAfter(function(n){var l=+t(n.data)||0,o=n.children,s=o&&o.length;while(--s>=0)l+=o[s].value;n.value=l})}function we(t){return this.eachBefore(function(n){if(n.children)n.children.sort(t)})}function Ce(t){var n=this,l=Ze(n,t),o=[n];while(n!==l)n=n.parent,o.push(n);var s=o.length;while(t!==l)o.splice(s,0,t),t=t.parent;return o}function Ze(t,n){if(t===n)return t;var l=t.ancestors(),o=n.ancestors(),s=null;t=l.pop(),n=o.pop();while(t===n)s=t,t=l.pop(),n=o.pop();return s}function Te(){var t=this,n=[t];while(t=t.parent)n.push(t);return n}function Le(){return Array.from(this)}function $e(){var t=[];return this.eachBefore(function(n){if(!n.children)t.push(n)}),t}function Ae(){var t=this,n=[];return t.each(function(l){if(l!==t)n.push({source:l.parent,target:l})}),n}function*Fe(){var t=this,n,l=[t],o,s,d;do{n=l.reverse(),l=[];while(t=n.pop())if(yield t,o=t.children)for(s=0,d=o.length;s<d;++s)l.push(o[s])}while(l.length)}function re(t,n){if(t instanceof Map){if(t=[void 0,t],n===void 0)n=Ke}else if(n===void 0)n=Je;var l=new ce(t),o,s=[l],d,f,h,v;while(o=s.pop())if((f=n(o.data))&&(v=(f=Array.from(f)).length)){o.children=f;for(h=v-1;h>=0;--h)s.push(d=f[h]=new ce(f[h])),d.parent=o,d.depth=o.depth+1}return l.eachBefore(et)}function Ue(){return re(this).eachBefore(Qe)}function Je(t){return t.children}function Ke(t){return Array.isArray(t)?t[1]:null}function Qe(t){if(t.data.value!==void 0)t.value=t.data.value;t.data=t.data.data}function et(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function ce(t){this.data=t,this.depth=this.height=0,this.parent=null}ce.prototype=re.prototype={constructor:ce,count:ge,each:ye,eachAfter:Se,eachBefore:xe,find:ve,sum:be,sort:we,path:Ce,ancestors:Te,descendants:Le,leaves:$e,links:Ae,copy:Ue,[Symbol.iterator]:Fe};function Be(t){if(typeof t!=="function")throw Error();return t}function ne(){return 0}function Q(t){return function(){return t}}function Ne(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Me(t,n,l,o,s){var d=t.children,f,h=-1,v=d.length,u=t.value&&(o-n)/t.value;while(++h<v)f=d[h],f.y0=l,f.y1=s,f.x0=n,f.x1=n+=f.value*u}function _e(t,n,l,o,s){var d=t.children,f,h=-1,v=d.length,u=t.value&&(s-l)/t.value;while(++h<v)f=d[h],f.x0=n,f.x1=o,f.y0=l,f.y1=l+=f.value*u}var tt=(1+Math.sqrt(5))/2;function at(t,n,l,o,s,d){var f=[],h=n.children,v,u,m=0,_=0,i=h.length,M,F,N=n.value,g,w,Y,O,ee,se,j;while(m<i){M=s-l,F=d-o;do g=h[_++].value;while(!g&&_<i);w=Y=g,se=Math.max(F/M,M/F)/(N*t),j=g*g*se,ee=Math.max(Y/j,j/w);for(;_<i;++_){if(g+=u=h[_].value,u<w)w=u;if(u>Y)Y=u;if(j=g*g*se,O=Math.max(Y/j,j/w),O>ee){g-=u;break}ee=O}if(f.push(v={value:g,dice:M<F,children:h.slice(m,_)}),v.dice)Me(v,l,o,s,N?o+=F*g/N:d);else _e(v,l,o,N?l+=M*g/N:s,d);N-=g,m=_}return f}var Ee=function t(n){function l(o,s,d,f,h){at(n,o,s,d,f,h)}return l.ratio=function(o){return t((o=+o)>1?o:1)},l}(tt);function fe(){var t=Ee,n=!1,l=1,o=1,s=[0],d=ne,f=ne,h=ne,v=ne,u=ne;function m(i){if(i.x0=i.y0=0,i.x1=l,i.y1=o,i.eachBefore(_),s=[0],n)i.eachBefore(Ne);return i}function _(i){var M=s[i.depth],F=i.x0+M,N=i.y0+M,g=i.x1-M,w=i.y1-M;if(g<F)F=g=(F+g)/2;if(w<N)N=w=(N+w)/2;if(i.x0=F,i.y0=N,i.x1=g,i.y1=w,i.children){if(M=s[i.depth+1]=d(i)/2,F+=u(i)-M,N+=f(i)-M,g-=h(i)-M,w-=v(i)-M,g<F)F=g=(F+g)/2;if(w<N)N=w=(N+w)/2;t(i,F,N,g,w)}}return m.round=function(i){return arguments.length?(n=!!i,m):n},m.size=function(i){return arguments.length?(l=+i[0],o=+i[1],m):[l,o]},m.tile=function(i){return arguments.length?(t=Be(i),m):t},m.padding=function(i){return arguments.length?m.paddingInner(i).paddingOuter(i):m.paddingInner()},m.paddingInner=function(i){return arguments.length?(d=typeof i==="function"?i:Q(+i),m):d},m.paddingOuter=function(i){return arguments.length?m.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):m.paddingTop()},m.paddingTop=function(i){return arguments.length?(f=typeof i==="function"?i:Q(+i),m):f},m.paddingRight=function(i){return arguments.length?(h=typeof i==="function"?i:Q(+i),m):h},m.paddingBottom=function(i){return arguments.length?(v=typeof i==="function"?i:Q(+i),m):v},m.paddingLeft=function(i){return arguments.length?(u=typeof i==="function"?i:Q(+i),m):u},m}var Re=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T}static{e(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let t=D,n=b();return U({...t.treemap,...n.treemap??{}})}addNode(t,n){if(this.nodes.push(t),this.levels.set(t,n),n===0)this.outerNodes.push(t),this.root??=t}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,n){let l=this.classes.get(t)??{id:t,styles:[],textStyles:[]},o=n.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(Hr(s))if(l?.textStyles)l.textStyles.push(s);else l.textStyles=[s];if(l?.styles)l.styles.push(s);else l.styles=[s]});this.classes.set(t,l)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){C(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function We(t){if(!t.length)return[];let n=[],l=[];return t.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(l.length>0&&l[l.length-1].level>=o.level)l.pop();if(l.length===0)n.push(s);else{let d=l[l.length-1].node;if(d.children)d.children.push(s);else d.children=[s]}if(o.type!=="Leaf")l.push({node:s,level:o.level})}),n}e(We,"buildHierarchy");var rt=e((t,n)=>{G(t,n);let l=[];for(let d of t.TreemapRows??[])if(d.$type==="ClassDefStatement")n.addClass(d.className??"",d.styleText??"");for(let d of t.TreemapRows??[]){let f=d.item;if(!f)continue;let h=d.indent?parseInt(d.indent):0,v=nt(f),u=f.classSelector?n.getStylesForClass(f.classSelector):[],m=u.length>0?u:void 0,_={level:h,name:v,type:f.$type,value:f.value,classSelector:f.classSelector,cssCompiledStyles:m};l.push(_)}let o=We(l),s=e((d,f)=>{for(let h of d)if(n.addNode(h,f),h.children&&h.children.length>0)s(h.children,f+1)},"addNodesRecursively");s(o,0)},"populate"),nt=e((t)=>t.name?String(t.name):"","getItemName"),He={parser:{yy:void 0},parse:e(async(t)=>{try{let l=await X("treemap",t);a.debug("Treemap AST:",l);let o=He.parser?.yy;if(!(o instanceof Re))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");rt(l,o)}catch(n){throw a.error("Error parsing treemap:",n),n}},"parse")},lt=10,oe=10,pe=25,ot=e((t,n,l,o)=>{let s=o.db,d=s.getConfig(),f=d.padding??lt,h=s.getDiagramTitle(),v=s.getRoot(),{themeVariables:u}=b();if(!v)return;let m=h?30:0,_=V(n),i=d.nodeWidth?d.nodeWidth*oe:960,M=d.nodeHeight?d.nodeHeight*oe:500,F=i,N=M+m;_.attr("viewBox",`0 0 ${F} ${N}`),B(_,N,F,d.useMaxWidth);let g;try{let r=d.valueFormat||",";if(r==="$0,0")g=e((c)=>"$"+Pt(",")(c),"valueFormat");else if(r.startsWith("$")&&r.includes(",")){let c=/\.\d+/.exec(r),y=c?c[0]:"";g=e((z)=>"$"+Pt(","+y)(z),"valueFormat")}else if(r.startsWith("$")){let c=r.substring(1);g=e((y)=>"$"+Pt(c||"")(y),"valueFormat")}else g=Pt(r)}catch(r){a.error("Error creating format function:",r),g=Pt(",")}let w=Xe().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),Y=Xe().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),O=Xe().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);if(h)_.append("text").attr("x",F/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let ee=_.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),se=re(v).sum((r)=>r.value??0).sort((r,c)=>(c.value??0)-(r.value??0)),ze=fe().size([i,M]).paddingTop((r)=>r.children&&r.children.length>0?pe+oe:0).paddingInner(f).paddingLeft((r)=>r.children&&r.children.length>0?oe:0).paddingRight((r)=>r.children&&r.children.length>0?oe:0).paddingBottom((r)=>r.children&&r.children.length>0?oe:0).round(!0)(se),Ie=ze.descendants().filter((r)=>r.children&&r.children.length>0),ie=ee.selectAll(".treemapSection").data(Ie).enter().append("g").attr("class","treemapSection").attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(ie.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",pe).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(r)=>{if(r.depth===0)return"display: none;";return""}),ie.append("clipPath").attr("id",(r,c)=>`clip-section-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-12)).attr("height",pe),ie.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class",(r,c)=>`treemapSection section${c}`).attr("fill",(r)=>w(r.data.name)).attr("fill-opacity",0.6).attr("stroke",(r)=>Y(r.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c=k({cssCompiledStyles:r.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),ie.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",pe/2).attr("dominant-baseline","middle").text((r)=>r.depth===0?"":r.data.name).attr("font-weight","bold").attr("clip-path",(r,c)=>`url(#clip-section-${n}-${c})`).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).each(function(r){if(r.depth===0)return;let c=p(this),y=r.data.name;c.text(y);let z=r.x1-r.x0,W=6,P;if(d.showValues!==!1&&r.value){let I=z-10,K=30,Ge=10;P=I-30-10-W}else P=z-W-6;let x=Math.max(15,P),J=c.node();if(J.getComputedTextLength()>x){let K=y;while(K.length>0){if(K=y.substring(0,K.length-1),K.length===0){if(c.text("..."),J.getComputedTextLength()>x)c.text("");break}if(c.text(K+"..."),J.getComputedTextLength()<=x)break}}}),d.showValues!==!1)ie.append("text").attr("class","treemapSectionValue").attr("x",(r)=>r.x1-r.x0-10).attr("y",pe/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((r)=>r.value?g(r.value):"").attr("font-style","italic").attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")});let De=ze.leaves(),q=De.length>20,Oe=q?16:38,de=q?14:28,te=q?4:8,ae=q?4:6,he=q?2:4,Ve=q?8:10,me=q?1:2,ue=ee.selectAll(".treemapLeafGroup").data(De).enter().append("g").attr("class",(r,c)=>`treemapNode treemapLeafGroup leaf${c}${r.data.classSelector?` ${r.data.classSelector}`:""}x`).attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(ue.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class","treemapLeaf").attr("fill",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("style",(r)=>k({cssCompiledStyles:r.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("stroke-width",3),ue.append("clipPath").attr("id",(r,c)=>`clip-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-4)).attr("height",(r)=>Math.max(0,r.y1-r.y0-4)),ue.append("text").attr("class","treemapLabel").attr("x",(r)=>(r.x1-r.x0)/2).attr("y",(r)=>(r.y1-r.y0)/2).attr("style",(r)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${Oe}px;fill:`+O(r.data.name)+";",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).attr("clip-path",(r,c)=>`url(#clip-${n}-${c})`).text((r)=>r.data.name).each(function(r){let c=p(this),y=r.x1-r.x0,z=r.y1-r.y0,W=c.node(),P=y-2*he,Z=z-2*he;if(P<Ve||Z<Ve){c.style("display","none");return}let x=parseInt(c.style("font-size"),10),J=0.6;while(W.getComputedTextLength()>P&&x>te)x--,c.style("font-size",`${x}px`);let H=Math.max(ae,Math.min(de,Math.round(x*J))),I=x+me+H;while(I>Z&&x>te){if(x--,H=Math.max(ae,Math.min(de,Math.round(x*J))),H<ae&&x===te)break;if(c.style("font-size",`${x}px`),I=x+me+H,H<=ae&&I>Z);}if(c.style("font-size",`${x}px`),q){if(x<te||Z<te)c.style("display","none")}else if(W.getComputedTextLength()>P||x<te||Z<x)c.style("display","none")}),d.showValues!==!1)ue.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let y=`text-anchor: middle; dominant-baseline: hanging; font-size: ${de}px;fill:`+O(c.data.name)+";",z=k({cssCompiledStyles:c.data.cssCompiledStyles});return y+z.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,y)=>`url(#clip-${n}-${y})`).text((c)=>c.value?g(c.value):"").each(function(c){let y=p(this),z=this.parentNode;if(!z){y.style("display","none");return}let W=p(z).select(".treemapLabel");if(W.empty()||W.style("display")==="none"){y.style("display","none");return}let P=parseFloat(W.style("font-size")),x=Math.max(ae,Math.min(de,Math.round(P*0.6)));y.style("font-size",`${x}px`);let H=(c.y1-c.y0)/2+P/2+me;y.attr("y",H);let I=c.x1-c.x0,Pe=c.y1-c.y0-4,Ye=I-2*he;if(y.node().getComputedTextLength()>Ye||H+x>Pe||x<ae)y.style("display","none");else y.style("display",null)});let qe=d.diagramPadding??8;le(_,qe,"flowchart",d?.useMaxWidth||!1)},"draw"),st=e(function(t,n){return n.db.getClasses()},"getClasses"),it={draw:ot,getClasses:st},ct={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=e(({treemap:t}={})=>{let n=ke(),l=b(),o=U(n,l.themeVariables),s=U(ct,t),d=s.titleColor??o.titleColor,f=s.labelColor??o.textColor,h=s.valueColor??o.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${s.sectionStrokeColor};
4
4
  stroke-width: ${s.sectionStrokeWidth};
@@ -1 +1 @@
1
- import{r,y,t,n,_,s,Z,re,j,st}from"./chunk-qmbgb79a.js";var I=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],g=s("circle-slash",I);function R(o){let{Button:h,Panel:N,style:k}=_(),e=o.payload,[i,c]=r(!1),[b,C]=r(!1),[l,p]=r();if(!e)return null;let a=b?"killed":e.state,m=a==="running",d=a==="exited"&&e.code===0,u=a==="killed"||a==="timeout",f=e.output?.trim(),P=async()=>{if(i)return;c(!0),p(void 0);try{await o.connection.request(`/api/sessions/${encodeURIComponent(o.sessionID)}/jobs/${encodeURIComponent(e.id)}/kill`,{method:"POST"}),C(!0)}catch(x){p(x instanceof Error?x.message:"停止失败,后台任务可能已结束")}finally{c(!1)}};return n(N,{className:"my-2",header:n(y,{children:[t(st,{className:"size-3.5 shrink-0 text-faint"}),t("span",{className:"truncate font-mono text-ink/90",title:e.command??e.id,children:e.command??`任务 ${e.id}`})]}),actions:n(y,{children:[m&&n(y,{children:[n("span",{className:"flex items-center gap-1 text-warning",children:[t(re,{className:"size-3.5 animate-spin"}),t("span",{children:"后台运行中"})]}),t(h,{size:"sm",variant:"danger-ghost",className:"h-6 rounded-md px-2 text-xs",disabled:i,onClick:()=>{P()},children:"停止"})]}),d&&n("span",{className:"flex items-center gap-1 text-success",children:[t(j,{className:"size-3.5"}),t("span",{children:"已完成"})]}),u&&n("span",{className:"flex items-center gap-1 text-faint",children:[t(g,{className:"size-3.5"}),t("span",{children:a==="timeout"?"已超时":"已停止"})]}),!m&&!d&&!u&&n("span",{className:"flex items-center gap-1 text-danger",children:[t(Z,{className:"size-3.5"}),n("span",{children:["退出码 ",e.code??"异常"]})]})]}),children:[l&&t("p",{role:"status",className:"border-b border-line px-4 py-2.5 text-xs text-danger",children:l}),f&&t("pre",{className:k("chat.toolOutput","max-h-60 text-ink/90 select-text"),children:f})]})}export{R as BashJobCard};
1
+ import{r,y,t,n,_,s,Z,ae,j,lt}from"./chunk-j6a4z530.js";var I=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],g=s("circle-slash",I);function R(o){let{Button:h,Panel:N,style:k}=_(),e=o.payload,[i,c]=r(!1),[b,C]=r(!1),[l,p]=r();if(!e)return null;let a=b?"killed":e.state,m=a==="running",d=a==="exited"&&e.code===0,u=a==="killed"||a==="timeout",f=e.output?.trim(),P=async()=>{if(i)return;c(!0),p(void 0);try{await o.connection.request(`/api/sessions/${encodeURIComponent(o.sessionID)}/jobs/${encodeURIComponent(e.id)}/kill`,{method:"POST"}),C(!0)}catch(x){p(x instanceof Error?x.message:"停止失败,后台任务可能已结束")}finally{c(!1)}};return n(N,{className:"my-2",header:n(y,{children:[t(lt,{className:"size-3.5 shrink-0 text-faint"}),t("span",{className:"truncate font-mono text-ink/90",title:e.command??e.id,children:e.command??`任务 ${e.id}`})]}),actions:n(y,{children:[m&&n(y,{children:[n("span",{className:"flex items-center gap-1 text-warning",children:[t(ae,{className:"size-3.5 animate-spin"}),t("span",{children:"后台运行中"})]}),t(h,{size:"sm",variant:"danger-ghost",className:"h-6 rounded-md px-2 text-xs",disabled:i,onClick:()=>{P()},children:"停止"})]}),d&&n("span",{className:"flex items-center gap-1 text-success",children:[t(j,{className:"size-3.5"}),t("span",{children:"已完成"})]}),u&&n("span",{className:"flex items-center gap-1 text-faint",children:[t(g,{className:"size-3.5"}),t("span",{children:a==="timeout"?"已超时":"已停止"})]}),!m&&!d&&!u&&n("span",{className:"flex items-center gap-1 text-danger",children:[t(Z,{className:"size-3.5"}),n("span",{children:["退出码 ",e.code??"异常"]})]})]}),children:[l&&t("p",{role:"status",className:"border-b border-line px-4 py-2.5 text-xs text-danger",children:l}),f&&t("pre",{className:k("chat.toolOutput","max-h-60 text-ink/90 select-text"),children:f})]})}export{R as BashJobCard};
@@ -1,9 +1,9 @@
1
- import{e,Qt,a,Y,u,d,b,ft,Aa,C,l,p,V,We,oe,Ye}from"./chunk-pyg1mr80.js";import{_t}from"./chunk-f9k3xrwb.js";var ht=function(){var r=e(function(E,o,y,g){for(y=y||{},g=E.length;g--;y[E[g]]=o);return y},"o"),t=[6,11,13,14,15,17,19,20,23,24],s=[1,12],i=[1,13],n=[1,14],f=[1,15],h=[1,16],c=[1,19],_=[1,20],x={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(o,y,g,k,w,m,I){var T=m.length-1;switch(w){case 1:return m[T-1];case 3:k.setDirection("LR");break;case 4:k.setDirection("TD");break;case 5:this.$=[];break;case 6:m[T-1].push(m[T]),this.$=m[T-1];break;case 7:case 8:this.$=m[T];break;case 9:case 10:this.$=[];break;case 11:k.getCommonDb().setDiagramTitle(m[T].substr(6)),this.$=m[T].substr(6);break;case 12:this.$=m[T].trim(),k.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=m[T].trim(),k.getCommonDb().setAccDescription(this.$);break;case 15:k.addSection(m[T].substr(8)),this.$=m[T].substr(8);break;case 18:k.addTask(m[T],0,""),this.$=m[T];break;case 19:k.addEvent(m[T].substr(2)),this.$=m[T];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},r(t,[2,5],{5:6}),r(t,[2,2]),r(t,[2,3]),r(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:s,15:i,17:n,19:f,20:h,21:17,22:18,23:c,24:_},r(t,[2,10],{1:[2,1]}),r(t,[2,6]),{12:21,14:s,15:i,17:n,19:f,20:h,21:17,22:18,23:c,24:_},r(t,[2,8]),r(t,[2,9]),r(t,[2,11]),{16:[1,22]},{18:[1,23]},r(t,[2,14]),r(t,[2,15]),r(t,[2,16]),r(t,[2,17]),r(t,[2,18]),r(t,[2,19]),r(t,[2,7]),r(t,[2,12]),r(t,[2,13])],defaultActions:{},parseError:e(function(o,y){if(y.recoverable)this.trace(o);else{var g=Error(o);throw g.hash=y,g}},"parseError"),parse:e(function(o){var y=this,g=[0],k=[],w=[null],m=[],I=this.table,T="",W=0,D=0,K=0,J=2,B=1,G=m.slice.call(arguments,1),L=Object.create(this.lexer),z={yy:{}};for(var X in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,X))z.yy[X]=this.yy[X];if(L.setInput(o,z.yy),z.yy.lexer=L,z.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var Q=L.yylloc;m.push(Q);var A=L.options&&L.options.ranges;if(typeof z.yy.parseError==="function")this.parseError=z.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function N(U){g.length=g.length-2*U,w.length=w.length-U,m.length=m.length-U}e(N,"popStack");function M(){var U=k.pop()||L.lex()||B;if(typeof U!=="number"){if(U instanceof Array)k=U,U=k.pop();U=y.symbols_[U]||U}return U}e(M,"lex");var H,P,F,R,lt,rt,q={},nt,Z,kt,it;while(!0){if(F=g[g.length-1],this.defaultActions[F])R=this.defaultActions[F];else{if(H===null||typeof H>"u")H=M();R=I[F]&&I[F][H]}if(typeof R>"u"||!R.length||!R[0]){var ct="";it=[];for(nt in I[F])if(this.terminals_[nt]&&nt>J)it.push("'"+this.terminals_[nt]+"'");if(L.showPosition)ct="Parse error on line "+(W+1)+`:
1
+ import{e,Qt,a,Y,u,d,b,ht,Aa,C,l,p,V,We,oe,Ye}from"./chunk-5v44qv67.js";import{_t}from"./chunk-xc2sq3t5.js";var dt=function(){var r=e(function(E,o,y,g){for(y=y||{},g=E.length;g--;y[E[g]]=o);return y},"o"),t=[6,11,13,14,15,17,19,20,23,24],s=[1,12],i=[1,13],n=[1,14],f=[1,15],h=[1,16],c=[1,19],_=[1,20],x={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(o,y,g,k,w,m,I){var T=m.length-1;switch(w){case 1:return m[T-1];case 3:k.setDirection("LR");break;case 4:k.setDirection("TD");break;case 5:this.$=[];break;case 6:m[T-1].push(m[T]),this.$=m[T-1];break;case 7:case 8:this.$=m[T];break;case 9:case 10:this.$=[];break;case 11:k.getCommonDb().setDiagramTitle(m[T].substr(6)),this.$=m[T].substr(6);break;case 12:this.$=m[T].trim(),k.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=m[T].trim(),k.getCommonDb().setAccDescription(this.$);break;case 15:k.addSection(m[T].substr(8)),this.$=m[T].substr(8);break;case 18:k.addTask(m[T],0,""),this.$=m[T];break;case 19:k.addEvent(m[T].substr(2)),this.$=m[T];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},r(t,[2,5],{5:6}),r(t,[2,2]),r(t,[2,3]),r(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:s,15:i,17:n,19:f,20:h,21:17,22:18,23:c,24:_},r(t,[2,10],{1:[2,1]}),r(t,[2,6]),{12:21,14:s,15:i,17:n,19:f,20:h,21:17,22:18,23:c,24:_},r(t,[2,8]),r(t,[2,9]),r(t,[2,11]),{16:[1,22]},{18:[1,23]},r(t,[2,14]),r(t,[2,15]),r(t,[2,16]),r(t,[2,17]),r(t,[2,18]),r(t,[2,19]),r(t,[2,7]),r(t,[2,12]),r(t,[2,13])],defaultActions:{},parseError:e(function(o,y){if(y.recoverable)this.trace(o);else{var g=Error(o);throw g.hash=y,g}},"parseError"),parse:e(function(o){var y=this,g=[0],k=[],w=[null],m=[],I=this.table,T="",W=0,D=0,K=0,J=2,B=1,G=m.slice.call(arguments,1),L=Object.create(this.lexer),z={yy:{}};for(var X in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,X))z.yy[X]=this.yy[X];if(L.setInput(o,z.yy),z.yy.lexer=L,z.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var Q=L.yylloc;m.push(Q);var A=L.options&&L.options.ranges;if(typeof z.yy.parseError==="function")this.parseError=z.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function N(U){g.length=g.length-2*U,w.length=w.length-U,m.length=m.length-U}e(N,"popStack");function M(){var U=k.pop()||L.lex()||B;if(typeof U!=="number"){if(U instanceof Array)k=U,U=k.pop();U=y.symbols_[U]||U}return U}e(M,"lex");var H,P,F,R,lt,rt,q={},nt,Z,kt,it;while(!0){if(F=g[g.length-1],this.defaultActions[F])R=this.defaultActions[F];else{if(H===null||typeof H>"u")H=M();R=I[F]&&I[F][H]}if(typeof R>"u"||!R.length||!R[0]){var ct="";it=[];for(nt in I[F])if(this.terminals_[nt]&&nt>J)it.push("'"+this.terminals_[nt]+"'");if(L.showPosition)ct="Parse error on line "+(W+1)+`:
2
2
  `+L.showPosition()+`
3
3
  Expecting `+it.join(", ")+", got '"+(this.terminals_[H]||H)+"'";else ct="Parse error on line "+(W+1)+": Unexpected "+(H==B?"end of input":"'"+(this.terminals_[H]||H)+"'");this.parseError(ct,{text:L.match,token:this.terminals_[H]||H,line:L.yylineno,loc:Q,expected:it})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+F+", token: "+H);switch(R[0]){case 1:if(g.push(H),w.push(L.yytext),m.push(L.yylloc),g.push(R[1]),H=null,!P){if(D=L.yyleng,T=L.yytext,W=L.yylineno,Q=L.yylloc,K>0)K--}else H=P,P=null;break;case 2:if(Z=this.productions_[R[1]][1],q.$=w[w.length-Z],q._$={first_line:m[m.length-(Z||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(Z||1)].first_column,last_column:m[m.length-1].last_column},A)q._$.range=[m[m.length-(Z||1)].range[0],m[m.length-1].range[1]];if(rt=this.performAction.apply(q,[T,D,W,z.yy,R[1],w,m].concat(G)),typeof rt<"u")return rt;if(Z)g=g.slice(0,-1*Z*2),w=w.slice(0,-1*Z),m=m.slice(0,-1*Z);g.push(this.productions_[R[1]][0]),w.push(q.$),m.push(q._$),kt=I[g[g.length-2]][g[g.length-1]],g.push(kt);break;case 3:return!0}}return!0},"parse")},S=function(){var E={EOF:1,parseError:e(function(y,g){if(this.yy.parser)this.yy.parser.parseError(y,g);else throw Error(y)},"parseError"),setInput:e(function(o,y){if(this.yy=y||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var y=o.match(/(?:\r\n?|\n).*/g);if(y)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),o},"input"),unput:e(function(o){var y=o.length,g=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-y),this.offset-=y;var k=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1)this.yylineno-=g.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===k.length?this.yylloc.first_column:0)+k[k.length-g.length].length-g[0].length:this.yylloc.first_column-y},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-y];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(o){this.unput(this.match.slice(o))},"less"),pastInput:e(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var o=this.match;if(o.length<20)o+=this._input.substr(0,20-o.length);return(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var o=this.pastInput(),y=Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
5
  `+y+"^"},"showPosition"),test_match:e(function(o,y){var g,k,w;if(this.options.backtrack_lexer){if(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)w.yylloc.range=this.yylloc.range.slice(0)}if(k=o[0].match(/(?:\r\n?|\n).*/g),k)this.yylineno+=k.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],g=this.performAction.call(this,this.yy,this,y,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(g)return g;else if(this._backtrack){for(var m in w)this[m]=w[m];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var o,y,g,k;if(!this._more)this.yytext="",this.match="";var w=this._currentRules();for(var m=0;m<w.length;m++)if(g=this._input.match(this.rules[w[m]]),g&&(!y||g[0].length>y[0].length)){if(y=g,k=m,this.options.backtrack_lexer)if(o=this.test_match(g,w[m]),o!==!1)return o;else if(this._backtrack){y=!1;continue}else return!1;else if(!this.options.flex)break}if(y){if(o=this.test_match(y,w[k]),o!==!1)return o;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var y=this.next();if(y)return y;else return this.lex()},"lex"),begin:e(function(y){this.conditionStack.push(y)},"begin"),popState:e(function(){var y=this.conditionStack.length-1;if(y>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(y){if(y=this.conditionStack.length-1-Math.abs(y||0),y>=0)return this.conditionStack[y];else return"INITIAL"},"topState"),pushState:e(function(y){this.begin(y)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(y,g,k,w){var m=w;switch(k){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/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],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return E}();x.lexer=S;function v(){this.yy={}}return e(v,"Parser"),v.prototype=x,x.Parser=v,new v}();ht.parser=ht;var Gt=ht,Et={};Qt(Et,{addEvent:()=>Rt,addSection:()=>Lt,addTask:()=>Ct,addTaskOrg:()=>Wt,clear:()=>Nt,default:()=>Dt,getCommonDb:()=>$t,getDirection:()=>Ht,getSections:()=>Mt,getTasks:()=>At,setDirection:()=>It});var tt="",Tt=0,ut="LR",pt=[],st=[],et=[],$t=e(()=>Aa,"getCommonDb"),Nt=e(function(){pt.length=0,st.length=0,tt="",et.length=0,ut="LR",C()},"clear"),It=e(function(r){ut=r},"setDirection"),Ht=e(function(){return ut},"getDirection"),Lt=e(function(r){tt=r,pt.push(r)},"addSection"),Mt=e(function(){return pt},"getSections"),At=e(function(){let r=xt(),t=100,s=0;while(!r&&s<t)r=xt(),s++;return st.push(...et),st},"getTasks"),Ct=e(function(r,t,s){let i={id:Tt++,section:tt,type:tt,task:r,score:t?t:0,events:s?[s]:[]};et.push(i)},"addTask"),Rt=e(function(r){et.find((s)=>s.id===Tt-1).events.push(r)},"addEvent"),Wt=e(function(r){let t={section:tt,type:tt,description:r,task:r,classes:[]};st.push(t)},"addTaskOrg"),xt=e(function(){let r=e(function(s){return et[s].processed},"compileTask"),t=!0;for(let[s,i]of et.entries())r(s),t=t&&i.processed;return t},"compileTasks"),Dt={clear:Nt,getCommonDb:$t,getDirection:Ht,setDirection:It,addSection:Lt,getSections:Mt,getTasks:At,addTask:Ct,addTaskOrg:Wt,addEvent:Rt},Pt=0,at=e(function(r,t){let s=r.append("rect");if(s.attr("x",t.x),s.attr("y",t.y),s.attr("fill",t.fill),s.attr("stroke",t.stroke),s.attr("width",t.width),s.attr("height",t.height),s.attr("rx",t.rx),s.attr("ry",t.ry),t.class!==void 0)s.attr("class",t.class);return s},"drawRect"),Kt=e(function(r,t){let i=r.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=r.append("g");n.append("circle").attr("cx",t.cx-5).attr("cy",t.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",t.cx+5).attr("cy",t.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function f(_){let x=_t().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}e(f,"smile");function h(_){let x=_t().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}e(h,"sad");function c(_){_.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")}if(e(c,"ambivalent"),t.score>3)f(n);else if(t.score<3)h(n);else c(n);return i},"drawFace"),Ut=e(function(r,t){let s=r.append("circle");if(s.attr("cx",t.cx),s.attr("cy",t.cy),s.attr("class","actor-"+t.pos),s.attr("fill",t.fill),s.attr("stroke",t.stroke),s.attr("r",t.r),s.class!==void 0)s.attr("class",s.class);if(t.title!==void 0)s.append("title").text(t.title);return s},"drawCircle"),Bt=e(function(r,t){let s=t.text.replace(/<br\s*\/?>/gi," "),i=r.append("text");if(i.attr("x",t.x),i.attr("y",t.y),i.attr("class","legend"),i.style("text-anchor",t.anchor),t.class!==void 0)i.attr("class",t.class);let n=i.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(s),i},"drawText"),Xt=e(function(r,t){function s(n,f,h,c,_){return n+","+f+" "+(n+h)+","+f+" "+(n+h)+","+(f+c-_)+" "+(n+h-_*1.2)+","+(f+c)+" "+n+","+(f+c)}e(s,"genPoints");let i=r.append("polygon");i.attr("points",s(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+0.5*t.labelMargin,Bt(r,t)},"drawLabel"),Zt=e(function(r,t,s){let i=r.append("g"),n=gt();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=s.width,n.height=s.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,at(i,n),Vt(s)(t.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},s,t.colour)},"drawSection"),dt=-1,jt=e(function(r,t,s,i){let n=t.x+s.width/2,f=r.append("g");dt++;let h=450;f.append("line").attr("id",i+"-task"+dt).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",h).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Kt(f,{cx:n,cy:300+(5-t.score)*30,score:t.score});let c=gt();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=s.width,c.height=s.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,at(f,c),Vt(s)(t.task,f,c.x,c.y,c.width,c.height,{class:"task"},s,t.colour)},"drawTask"),qt=e(function(r,t){at(r,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Jt=e(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),gt=e(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Vt=function(){function r(n,f,h,c,_,x,S,v){let E=f.append("text").attr("x",h+_/2).attr("y",c+x/2+5).style("font-color",v).style("text-anchor","middle").text(n);i(E,S)}e(r,"byText");function t(n,f,h,c,_,x,S,v,E){let{taskFontSize:o,taskFontFamily:y}=v,g=n.split(/<br\s*\/?>/gi);for(let k=0;k<g.length;k++){let w=k*o-o*(g.length-1)/2,m=f.append("text").attr("x",h+_/2).attr("y",c).attr("fill",E).style("text-anchor","middle").style("font-size",o).style("font-family",y);m.append("tspan").attr("x",h+_/2).attr("dy",w).text(g[k]),m.attr("y",c+x/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(m,S)}}e(t,"byTspan");function s(n,f,h,c,_,x,S,v){let E=f.append("switch"),y=E.append("foreignObject").attr("x",h).attr("y",c).attr("width",_).attr("height",x).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),t(n,E,h,c,_,x,S,v),i(y,S)}e(s,"byFo");function i(n,f){for(let h in f)if(h in f)n.attr(h,f[h])}return e(i,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?r:t}}(),Yt=e(function(r,t){Pt=0,dt=-1,r.append("defs").append("marker").attr("id",t+"-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")},"initGraphics");function yt(r,t){r.each(function(){var s=p(this),i=s.text().split(/(\s+|<br>)/).reverse(),n,f=[],h=1.1,c=s.attr("y"),_=parseFloat(s.attr("dy")),x=s.text(null).append("tspan").attr("x",0).attr("y",c).attr("dy",_+"em");for(let S=0;S<i.length;S++)if(n=i[i.length-1-S],f.push(n),x.text(f.join(" ").trim()),x.node().getComputedTextLength()>t||n==="<br>"){if(f.pop(),x.text(f.join(" ").trim()),n==="<br>")f=[""];else f=[n];x=s.append("tspan").attr("x",0).attr("y",c).attr("dy",h+"em").text(n)}})}e(yt,"wrap");var te=e(function(r,t,s,i,n,f=!1){let{theme:h,look:c}=i,_=h?.includes("redux"),x=i?.themeVariables?.THEME_COLOR_LIMIT??12,S=s%x-1,v=r.append("g");t.section=S,v.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+S));let E=v.append("g"),o=v.append("g"),g=o.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(yt,t.width).node().getBBox(),k=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(t.height=g.height+k*1.1*0.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,o.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),_)o.attr("transform",`translate(${t.width/2}, ${f?t.padding/2+3:t.padding})`);if(re(E,t,S,n,i),c==="neo"){if(v.attr("data-look","neo"),_){let w=h.includes("dark"),m=r.node()?.ownerSVGElement??r.node(),I=p(m),T=I.attr("id")??"",W=T?`${T}-drop-shadow`:"drop-shadow";if(I.select(`#${W}`).empty()){let D=I.select("defs");(D.empty()?I.append("defs"):D).append("filter").attr("id",W).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",w?"0.2":"0.06").attr("flood-color",w?"#FFFFFF":"#000000")}}}return t},"drawNode"),ee=e(function(r,t,s){let i=r.append("g"),f=i.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(yt,t.width).node().getBBox(),h=s.fontSize?.replace?s.fontSize.replace("px",""):s.fontSize;return i.remove(),f.height+h*1.1*0.5+t.padding},"getVirtualNodeHeight"),re=e(function(r,t,s,i,n){let{theme:f}=n,h=f?.includes("redux")?0:5,c=5,_=h>0?`M0 ${t.height-5} v${-t.height+10} q0,-${h},${h},-${h} h${t.width-10} q${h},0,${h},${h} v${t.height-5} H0 Z`:`M0 ${t.height-5} v${-(t.height-5)} h${t.width} v${t.height} H0 Z`;if(r.append("path").attr("id",i+"-node-"+Pt++).attr("class","node-bkg node-"+t.type).attr("d",_),!f?.includes("redux"))r.append("line").attr("class","node-line-"+s).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),O={drawRect:at,drawCircle:Ut,drawSection:Zt,drawText:Bt,drawLabel:Xt,drawTask:jt,drawBackgroundRect:qt,getTextObj:Jt,getNoteRect:gt,initGraphics:Yt,drawNode:te,getVirtualNodeHeight:ee},ne=e(function(r,t,s,i){let n=l(),{look:f,theme:h,themeVariables:c}=n,{useGradient:_,gradientStart:x,gradientStop:S}=c,v=n.timeline?.leftMargin??50;a.debug("timeline",i.db);let E=n.securityLevel,o;if(E==="sandbox")o=p("#i"+t);let g=(E==="sandbox"?p(o.nodes()[0].contentDocument.body):p("body")).select("#"+t);g.append("g");let k=i.db.getTasks(),w=i.db.getCommonDb().getDiagramTitle();a.debug("task",k),O.initGraphics(g,t);let m=i.db.getSections();a.debug("sections",m);let I=0,T=0,W=0,D=0,K=50+v,J=50;D=50;let B=0,G=!0;m.forEach(function(A){let N={number:B,descr:A,section:B,width:150,padding:20,maxHeight:I},M=O.getVirtualNodeHeight(g,N,n);a.debug("sectionHeight before draw",M),I=Math.max(I,M+20)});let L=0,z=0;a.debug("tasks.length",k.length);for(let[A,N]of k.entries()){let M={number:A,descr:N,section:N.section,width:150,padding:20,maxHeight:T},H=O.getVirtualNodeHeight(g,M,n);a.debug("taskHeight before draw",H),T=Math.max(T,H+20),L=Math.max(L,N.events.length);let P=0;for(let F of N.events){let R={descr:F,section:N.section,number:N.section,width:150,padding:20,maxHeight:50};P+=O.getVirtualNodeHeight(g,R,n)}if(N.events.length>0)P+=(N.events.length-1)*10;z=Math.max(z,P)}if(a.debug("maxSectionHeight before draw",I),a.debug("maxTaskHeight before draw",T),m&&m.length>0)m.forEach((A)=>{let N=k.filter((F)=>F.section===A),M={number:B,descr:A,section:B,width:200*Math.max(N.length,1)-50,padding:20,maxHeight:I};a.debug("sectionNode",M);let H=g.append("g"),P=O.drawNode(H,M,B,n,t);if(a.debug("sectionNode output",P),H.attr("transform",`translate(${K}, ${D})`),J+=I+50,N.length>0)bt(g,N,B,K,J,T,n,L,z,I,!1,t);K+=200*Math.max(N.length,1),J=D,B++});else G=!1,bt(g,k,B,K,J,T,n,L,z,I,!0,t);let X=g.node().getBBox();if(a.debug("bounds",X),w)g.append("text").text(w).attr("x",f==="neo"?X.x*2+v:X.width/2-v).attr("font-size","4ex").attr("font-weight","bold").attr("y",20);if(W=G?I+T+150:T+100,g.append("g").attr("class","lineWrapper").append("line").attr("x1",v).attr("y1",W).attr("x2",X.width+3*v).attr("y2",W).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),f==="neo"&&_&&h!=="neutral"){let A=g.select("defs"),M=(A.empty()?g.append("defs"):A).append("linearGradient").attr("id",g.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");M.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),M.append("stop").attr("offset","100%").attr("stop-color",S).attr("stop-opacity",1)}ft(void 0,g,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),bt=e(function(r,t,s,i,n,f,h,c,_,x,S,v){for(let E of t){let o={descr:E.task,section:s,number:s,width:150,padding:20,maxHeight:f};a.debug("taskNode",o);let y=r.append("g").attr("class","taskWrapper"),k=O.drawNode(y,o,s,h,v).height;if(a.debug("taskHeight after draw",k),y.attr("transform",`translate(${i}, ${n})`),f=Math.max(f,k),E.events){let w=r.append("g").attr("class","lineWrapper"),m=f;n+=100,m=m+ie(r,E.events,s,i,n,h,v),n-=100,w.append("line").attr("x1",i+95).attr("y1",n+f).attr("x2",i+95).attr("y2",n+f+100+_+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${v}-arrowhead)`).attr("stroke-dasharray","5,5")}if(i=i+200,S&&!h.timeline?.disableMulticolor)s++}n=n-10},"drawTasks"),ie=e(function(r,t,s,i,n,f,h){let c=0,_=n;n=n+100;for(let x of t){let S={descr:x,section:s,number:s,width:150,padding:20,maxHeight:50};a.debug("eventNode",S);let v=r.append("g").attr("class","eventWrapper"),o=O.drawNode(v,S,s,f,h,!0).height;c=c+o,v.attr("transform",`translate(${i}, ${n})`),n=n+10+o}return n=_,c},"drawEvents"),se={setConf:e(()=>{},"setConf"),draw:ne},ot=200,j=5,ae=ot+j*2,mt=ot+100,le=mt+j*2,Ft=10,ce=0,vt=20,zt=20,wt=30,Ot=50,he=e(function(r,t,s,i){let n=l(),f=n.timeline?.leftMargin??50;a.debug("timeline",i.db);let h=V(t);h.append("g");let c=i.db.getTasks(),_=i.db.getCommonDb().getDiagramTitle();a.debug("task",c),O.initGraphics(h);let x=i.db.getSections();a.debug("sections",x);let S=0,v=0,E=50+f,o=50,y=o,g=E,k=ae+zt,w=le+Ot,m=g+k,I=0,T=x&&x.length>0,W=T?m:E+k,D=Math.max(50,k+w-j*2);x.forEach(function(A){let N={number:I,descr:A,section:I,width:D,padding:j,maxHeight:S},M=O.getVirtualNodeHeight(h,N,n);a.debug("sectionHeight before draw",M),S=Math.max(S,M)});let K=0;a.debug("tasks.length",c.length);for(let[A,N]of c.entries()){let M={number:A,descr:N,section:N.section,width:ot,padding:j,maxHeight:v},H=O.getVirtualNodeHeight(h,M,n);a.debug("taskHeight before draw",H),v=Math.max(v,H);let P=0;for(let F of N.events){let R={descr:F,section:N.section,number:N.section,width:mt,padding:j,maxHeight:50};P+=O.getVirtualNodeHeight(h,R,n)}if(N.events.length>0)P+=(N.events.length-1)*Ft;K=Math.max(K,P)+ce}a.debug("maxSectionHeight before draw",S),a.debug("maxTaskHeight before draw",v);let B=Math.max(v,K)+wt;if(T)x.forEach((A)=>{let N=c.filter((q)=>q.section===A),M={number:I,descr:A,section:I,width:D,padding:j,maxHeight:S};a.debug("sectionNode",M);let H=h.append("g"),P=O.drawNode(H,M,I,n);a.debug("sectionNode output",P);let F=W-k;H.attr("transform",`translate(${F}, ${o})`);let R=o+P.height+vt;if(N.length>0)St(h,N,I,W,R,v,n,B,!1);let lt=N.length,rt=P.height+vt+B*Math.max(lt,1)-(lt>0?wt*2:0);o+=rt,I++});else St(h,c,I,W,o,v,n,B,!0);let G=h.node()?.getBBox();if(!G)throw Error("bbox not found");if(a.debug("bounds",G),_){if(h.append("text").text(_).attr("x",G.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),G=h.node()?.getBBox(),!G)throw Error("bbox not found");a.debug("bounds after title",G)}let[L]=We(n.fontSize),z=(L??16)*2,X=(L??16)*0.5+20,Q=h.append("g").attr("class","lineWrapper");Q.append("line").attr("x1",W).attr("y1",y-z).attr("x2",W).attr("y2",G.y+G.height+X).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Q.lower(),ft(void 0,h,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),St=e(function(r,t,s,i,n,f,h,c,_){for(let x of t){let S={descr:x.task,section:s,number:s,width:ot,padding:j,maxHeight:f};a.debug("taskNode",S);let v=r.append("g").attr("class","taskWrapper"),E=O.drawNode(v,S,s,h),o=E.height;a.debug("taskHeight after draw",o);let y=i-zt-E.width;if(v.attr("transform",`translate(${y}, ${n})`),f=Math.max(f,o),x.events&&x.events.length>0){let g=n,k=i+Ot;de(r,x.events,s,i,k,g,h)}if(n=n+c,_&&!h.timeline?.disableMulticolor)s++}},"drawTasks"),de=e(function(r,t,s,i,n,f,h){let c=f;for(let _ of t){let x={descr:_,section:s,number:s,width:mt,padding:j,maxHeight:0};a.debug("eventNode",x);let S=r.append("g").attr("class","eventWrapper"),E=O.drawNode(S,x,s,h).height;S.attr("transform",`translate(${n}, ${c})`);let o=r.append("g").attr("class","lineWrapper"),y=c+E/2;o.append("line").attr("x1",i).attr("y1",y).attr("x2",n).attr("y2",y).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),c=c+E+Ft}return c-f},"drawEvents"),ue={setConf:e(()=>{},"setConf"),draw:he},pe=e((r)=>{let{theme:t}=b(),s=t?.includes("dark"),i=oe(t,r.borderColorArray),n=r.svgId?.replace(/^#/,"")??"",f=n?`url(#${n}-drop-shadow)`:r.dropShadow??"none",h="";for(let c=0;c<Ye(r.THEME_COLOR_LIMIT);c++){let _=`${17-3*c}`,x=i?r.borderColorArray[c%r.borderColorArray.length]:void 0,S=x??r.mainBkg,v=x??r.nodeBorder;h+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var y=this.next();if(y)return y;else return this.lex()},"lex"),begin:e(function(y){this.conditionStack.push(y)},"begin"),popState:e(function(){var y=this.conditionStack.length-1;if(y>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(y){if(y=this.conditionStack.length-1-Math.abs(y||0),y>=0)return this.conditionStack[y];else return"INITIAL"},"topState"),pushState:e(function(y){this.begin(y)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(y,g,k,w){var m=w;switch(k){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/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],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return E}();x.lexer=S;function v(){this.yy={}}return e(v,"Parser"),v.prototype=x,x.Parser=v,new v}();dt.parser=dt;var Gt=dt,Et={};Qt(Et,{addEvent:()=>Rt,addSection:()=>Lt,addTask:()=>Ct,addTaskOrg:()=>Wt,clear:()=>Nt,default:()=>Dt,getCommonDb:()=>$t,getDirection:()=>Ht,getSections:()=>Mt,getTasks:()=>At,setDirection:()=>It});var tt="",Tt=0,pt="LR",gt=[],st=[],et=[],$t=e(()=>Aa,"getCommonDb"),Nt=e(function(){gt.length=0,st.length=0,tt="",et.length=0,pt="LR",C()},"clear"),It=e(function(r){pt=r},"setDirection"),Ht=e(function(){return pt},"getDirection"),Lt=e(function(r){tt=r,gt.push(r)},"addSection"),Mt=e(function(){return gt},"getSections"),At=e(function(){let r=xt(),t=100,s=0;while(!r&&s<t)r=xt(),s++;return st.push(...et),st},"getTasks"),Ct=e(function(r,t,s){let i={id:Tt++,section:tt,type:tt,task:r,score:t?t:0,events:s?[s]:[]};et.push(i)},"addTask"),Rt=e(function(r){et.find((s)=>s.id===Tt-1).events.push(r)},"addEvent"),Wt=e(function(r){let t={section:tt,type:tt,description:r,task:r,classes:[]};st.push(t)},"addTaskOrg"),xt=e(function(){let r=e(function(s){return et[s].processed},"compileTask"),t=!0;for(let[s,i]of et.entries())r(s),t=t&&i.processed;return t},"compileTasks"),Dt={clear:Nt,getCommonDb:$t,getDirection:Ht,setDirection:It,addSection:Lt,getSections:Mt,getTasks:At,addTask:Ct,addTaskOrg:Wt,addEvent:Rt},Pt=0,at=e(function(r,t){let s=r.append("rect");if(s.attr("x",t.x),s.attr("y",t.y),s.attr("fill",t.fill),s.attr("stroke",t.stroke),s.attr("width",t.width),s.attr("height",t.height),s.attr("rx",t.rx),s.attr("ry",t.ry),t.class!==void 0)s.attr("class",t.class);return s},"drawRect"),Kt=e(function(r,t){let i=r.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=r.append("g");n.append("circle").attr("cx",t.cx-5).attr("cy",t.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",t.cx+5).attr("cy",t.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function f(_){let x=_t().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}e(f,"smile");function h(_){let x=_t().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}e(h,"sad");function c(_){_.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")}if(e(c,"ambivalent"),t.score>3)f(n);else if(t.score<3)h(n);else c(n);return i},"drawFace"),Ut=e(function(r,t){let s=r.append("circle");if(s.attr("cx",t.cx),s.attr("cy",t.cy),s.attr("class","actor-"+t.pos),s.attr("fill",t.fill),s.attr("stroke",t.stroke),s.attr("r",t.r),s.class!==void 0)s.attr("class",s.class);if(t.title!==void 0)s.append("title").text(t.title);return s},"drawCircle"),Bt=e(function(r,t){let s=t.text.replace(/<br\s*\/?>/gi," "),i=r.append("text");if(i.attr("x",t.x),i.attr("y",t.y),i.attr("class","legend"),i.style("text-anchor",t.anchor),t.class!==void 0)i.attr("class",t.class);let n=i.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(s),i},"drawText"),Xt=e(function(r,t){function s(n,f,h,c,_){return n+","+f+" "+(n+h)+","+f+" "+(n+h)+","+(f+c-_)+" "+(n+h-_*1.2)+","+(f+c)+" "+n+","+(f+c)}e(s,"genPoints");let i=r.append("polygon");i.attr("points",s(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+0.5*t.labelMargin,Bt(r,t)},"drawLabel"),Zt=e(function(r,t,s){let i=r.append("g"),n=ft();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=s.width,n.height=s.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,at(i,n),Vt(s)(t.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},s,t.colour)},"drawSection"),ut=-1,jt=e(function(r,t,s,i){let n=t.x+s.width/2,f=r.append("g");ut++;let h=450;f.append("line").attr("id",i+"-task"+ut).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",h).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Kt(f,{cx:n,cy:300+(5-t.score)*30,score:t.score});let c=ft();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=s.width,c.height=s.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,at(f,c),Vt(s)(t.task,f,c.x,c.y,c.width,c.height,{class:"task"},s,t.colour)},"drawTask"),qt=e(function(r,t){at(r,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Jt=e(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),ft=e(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Vt=function(){function r(n,f,h,c,_,x,S,v){let E=f.append("text").attr("x",h+_/2).attr("y",c+x/2+5).style("font-color",v).style("text-anchor","middle").text(n);i(E,S)}e(r,"byText");function t(n,f,h,c,_,x,S,v,E){let{taskFontSize:o,taskFontFamily:y}=v,g=n.split(/<br\s*\/?>/gi);for(let k=0;k<g.length;k++){let w=k*o-o*(g.length-1)/2,m=f.append("text").attr("x",h+_/2).attr("y",c).attr("fill",E).style("text-anchor","middle").style("font-size",o).style("font-family",y);m.append("tspan").attr("x",h+_/2).attr("dy",w).text(g[k]),m.attr("y",c+x/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(m,S)}}e(t,"byTspan");function s(n,f,h,c,_,x,S,v){let E=f.append("switch"),y=E.append("foreignObject").attr("x",h).attr("y",c).attr("width",_).attr("height",x).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),t(n,E,h,c,_,x,S,v),i(y,S)}e(s,"byFo");function i(n,f){for(let h in f)if(h in f)n.attr(h,f[h])}return e(i,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?r:t}}(),Yt=e(function(r,t){Pt=0,ut=-1,r.append("defs").append("marker").attr("id",t+"-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")},"initGraphics");function yt(r,t){r.each(function(){var s=p(this),i=s.text().split(/(\s+|<br>)/).reverse(),n,f=[],h=1.1,c=s.attr("y"),_=parseFloat(s.attr("dy")),x=s.text(null).append("tspan").attr("x",0).attr("y",c).attr("dy",_+"em");for(let S=0;S<i.length;S++)if(n=i[i.length-1-S],f.push(n),x.text(f.join(" ").trim()),x.node().getComputedTextLength()>t||n==="<br>"){if(f.pop(),x.text(f.join(" ").trim()),n==="<br>")f=[""];else f=[n];x=s.append("tspan").attr("x",0).attr("y",c).attr("dy",h+"em").text(n)}})}e(yt,"wrap");var te=e(function(r,t,s,i,n,f=!1){let{theme:h,look:c}=i,_=h?.includes("redux"),x=i?.themeVariables?.THEME_COLOR_LIMIT??12,S=s%x-1,v=r.append("g");t.section=S,v.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+S));let E=v.append("g"),o=v.append("g"),g=o.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(yt,t.width).node().getBBox(),k=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(t.height=g.height+k*1.1*0.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,o.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),_)o.attr("transform",`translate(${t.width/2}, ${f?t.padding/2+3:t.padding})`);if(re(E,t,S,n,i),c==="neo"){if(v.attr("data-look","neo"),_){let w=h.includes("dark"),m=r.node()?.ownerSVGElement??r.node(),I=p(m),T=I.attr("id")??"",W=T?`${T}-drop-shadow`:"drop-shadow";if(I.select(`#${W}`).empty()){let D=I.select("defs");(D.empty()?I.append("defs"):D).append("filter").attr("id",W).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",w?"0.2":"0.06").attr("flood-color",w?"#FFFFFF":"#000000")}}}return t},"drawNode"),ee=e(function(r,t,s){let i=r.append("g"),f=i.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(yt,t.width).node().getBBox(),h=s.fontSize?.replace?s.fontSize.replace("px",""):s.fontSize;return i.remove(),f.height+h*1.1*0.5+t.padding},"getVirtualNodeHeight"),re=e(function(r,t,s,i,n){let{theme:f}=n,h=f?.includes("redux")?0:5,c=5,_=h>0?`M0 ${t.height-5} v${-t.height+10} q0,-${h},${h},-${h} h${t.width-10} q${h},0,${h},${h} v${t.height-5} H0 Z`:`M0 ${t.height-5} v${-(t.height-5)} h${t.width} v${t.height} H0 Z`;if(r.append("path").attr("id",i+"-node-"+Pt++).attr("class","node-bkg node-"+t.type).attr("d",_),!f?.includes("redux"))r.append("line").attr("class","node-line-"+s).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),O={drawRect:at,drawCircle:Ut,drawSection:Zt,drawText:Bt,drawLabel:Xt,drawTask:jt,drawBackgroundRect:qt,getTextObj:Jt,getNoteRect:ft,initGraphics:Yt,drawNode:te,getVirtualNodeHeight:ee},ne=e(function(r,t,s,i){let n=l(),{look:f,theme:h,themeVariables:c}=n,{useGradient:_,gradientStart:x,gradientStop:S}=c,v=n.timeline?.leftMargin??50;a.debug("timeline",i.db);let E=n.securityLevel,o;if(E==="sandbox")o=p("#i"+t);let g=(E==="sandbox"?p(o.nodes()[0].contentDocument.body):p("body")).select("#"+t);g.append("g");let k=i.db.getTasks(),w=i.db.getCommonDb().getDiagramTitle();a.debug("task",k),O.initGraphics(g,t);let m=i.db.getSections();a.debug("sections",m);let I=0,T=0,W=0,D=0,K=50+v,J=50;D=50;let B=0,G=!0;m.forEach(function(A){let N={number:B,descr:A,section:B,width:150,padding:20,maxHeight:I},M=O.getVirtualNodeHeight(g,N,n);a.debug("sectionHeight before draw",M),I=Math.max(I,M+20)});let L=0,z=0;a.debug("tasks.length",k.length);for(let[A,N]of k.entries()){let M={number:A,descr:N,section:N.section,width:150,padding:20,maxHeight:T},H=O.getVirtualNodeHeight(g,M,n);a.debug("taskHeight before draw",H),T=Math.max(T,H+20),L=Math.max(L,N.events.length);let P=0;for(let F of N.events){let R={descr:F,section:N.section,number:N.section,width:150,padding:20,maxHeight:50};P+=O.getVirtualNodeHeight(g,R,n)}if(N.events.length>0)P+=(N.events.length-1)*10;z=Math.max(z,P)}if(a.debug("maxSectionHeight before draw",I),a.debug("maxTaskHeight before draw",T),m&&m.length>0)m.forEach((A)=>{let N=k.filter((F)=>F.section===A),M={number:B,descr:A,section:B,width:200*Math.max(N.length,1)-50,padding:20,maxHeight:I};a.debug("sectionNode",M);let H=g.append("g"),P=O.drawNode(H,M,B,n,t);if(a.debug("sectionNode output",P),H.attr("transform",`translate(${K}, ${D})`),J+=I+50,N.length>0)bt(g,N,B,K,J,T,n,L,z,I,!1,t);K+=200*Math.max(N.length,1),J=D,B++});else G=!1,bt(g,k,B,K,J,T,n,L,z,I,!0,t);let X=g.node().getBBox();if(a.debug("bounds",X),w)g.append("text").text(w).attr("x",f==="neo"?X.x*2+v:X.width/2-v).attr("font-size","4ex").attr("font-weight","bold").attr("y",20);if(W=G?I+T+150:T+100,g.append("g").attr("class","lineWrapper").append("line").attr("x1",v).attr("y1",W).attr("x2",X.width+3*v).attr("y2",W).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),f==="neo"&&_&&h!=="neutral"){let A=g.select("defs"),M=(A.empty()?g.append("defs"):A).append("linearGradient").attr("id",g.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");M.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),M.append("stop").attr("offset","100%").attr("stop-color",S).attr("stop-opacity",1)}ht(void 0,g,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),bt=e(function(r,t,s,i,n,f,h,c,_,x,S,v){for(let E of t){let o={descr:E.task,section:s,number:s,width:150,padding:20,maxHeight:f};a.debug("taskNode",o);let y=r.append("g").attr("class","taskWrapper"),k=O.drawNode(y,o,s,h,v).height;if(a.debug("taskHeight after draw",k),y.attr("transform",`translate(${i}, ${n})`),f=Math.max(f,k),E.events){let w=r.append("g").attr("class","lineWrapper"),m=f;n+=100,m=m+ie(r,E.events,s,i,n,h,v),n-=100,w.append("line").attr("x1",i+95).attr("y1",n+f).attr("x2",i+95).attr("y2",n+f+100+_+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${v}-arrowhead)`).attr("stroke-dasharray","5,5")}if(i=i+200,S&&!h.timeline?.disableMulticolor)s++}n=n-10},"drawTasks"),ie=e(function(r,t,s,i,n,f,h){let c=0,_=n;n=n+100;for(let x of t){let S={descr:x,section:s,number:s,width:150,padding:20,maxHeight:50};a.debug("eventNode",S);let v=r.append("g").attr("class","eventWrapper"),o=O.drawNode(v,S,s,f,h,!0).height;c=c+o,v.attr("transform",`translate(${i}, ${n})`),n=n+10+o}return n=_,c},"drawEvents"),se={setConf:e(()=>{},"setConf"),draw:ne},ot=200,j=5,ae=ot+j*2,mt=ot+100,le=mt+j*2,Ft=10,ce=0,vt=20,zt=20,wt=30,Ot=50,he=e(function(r,t,s,i){let n=l(),f=n.timeline?.leftMargin??50;a.debug("timeline",i.db);let h=V(t);h.append("g");let c=i.db.getTasks(),_=i.db.getCommonDb().getDiagramTitle();a.debug("task",c),O.initGraphics(h);let x=i.db.getSections();a.debug("sections",x);let S=0,v=0,E=50+f,o=50,y=o,g=E,k=ae+zt,w=le+Ot,m=g+k,I=0,T=x&&x.length>0,W=T?m:E+k,D=Math.max(50,k+w-j*2);x.forEach(function(A){let N={number:I,descr:A,section:I,width:D,padding:j,maxHeight:S},M=O.getVirtualNodeHeight(h,N,n);a.debug("sectionHeight before draw",M),S=Math.max(S,M)});let K=0;a.debug("tasks.length",c.length);for(let[A,N]of c.entries()){let M={number:A,descr:N,section:N.section,width:ot,padding:j,maxHeight:v},H=O.getVirtualNodeHeight(h,M,n);a.debug("taskHeight before draw",H),v=Math.max(v,H);let P=0;for(let F of N.events){let R={descr:F,section:N.section,number:N.section,width:mt,padding:j,maxHeight:50};P+=O.getVirtualNodeHeight(h,R,n)}if(N.events.length>0)P+=(N.events.length-1)*Ft;K=Math.max(K,P)+ce}a.debug("maxSectionHeight before draw",S),a.debug("maxTaskHeight before draw",v);let B=Math.max(v,K)+wt;if(T)x.forEach((A)=>{let N=c.filter((q)=>q.section===A),M={number:I,descr:A,section:I,width:D,padding:j,maxHeight:S};a.debug("sectionNode",M);let H=h.append("g"),P=O.drawNode(H,M,I,n);a.debug("sectionNode output",P);let F=W-k;H.attr("transform",`translate(${F}, ${o})`);let R=o+P.height+vt;if(N.length>0)St(h,N,I,W,R,v,n,B,!1);let lt=N.length,rt=P.height+vt+B*Math.max(lt,1)-(lt>0?wt*2:0);o+=rt,I++});else St(h,c,I,W,o,v,n,B,!0);let G=h.node()?.getBBox();if(!G)throw Error("bbox not found");if(a.debug("bounds",G),_){if(h.append("text").text(_).attr("x",G.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),G=h.node()?.getBBox(),!G)throw Error("bbox not found");a.debug("bounds after title",G)}let[L]=We(n.fontSize),z=(L??16)*2,X=(L??16)*0.5+20,Q=h.append("g").attr("class","lineWrapper");Q.append("line").attr("x1",W).attr("y1",y-z).attr("x2",W).attr("y2",G.y+G.height+X).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Q.lower(),ht(void 0,h,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),St=e(function(r,t,s,i,n,f,h,c,_){for(let x of t){let S={descr:x.task,section:s,number:s,width:ot,padding:j,maxHeight:f};a.debug("taskNode",S);let v=r.append("g").attr("class","taskWrapper"),E=O.drawNode(v,S,s,h),o=E.height;a.debug("taskHeight after draw",o);let y=i-zt-E.width;if(v.attr("transform",`translate(${y}, ${n})`),f=Math.max(f,o),x.events&&x.events.length>0){let g=n,k=i+Ot;de(r,x.events,s,i,k,g,h)}if(n=n+c,_&&!h.timeline?.disableMulticolor)s++}},"drawTasks"),de=e(function(r,t,s,i,n,f,h){let c=f;for(let _ of t){let x={descr:_,section:s,number:s,width:mt,padding:j,maxHeight:0};a.debug("eventNode",x);let S=r.append("g").attr("class","eventWrapper"),E=O.drawNode(S,x,s,h).height;S.attr("transform",`translate(${n}, ${c})`);let o=r.append("g").attr("class","lineWrapper"),y=c+E/2;o.append("line").attr("x1",i).attr("y1",y).attr("x2",n).attr("y2",y).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),c=c+E+Ft}return c-f},"drawEvents"),ue={setConf:e(()=>{},"setConf"),draw:he},pe=e((r)=>{let{theme:t}=b(),s=t?.includes("dark"),i=oe(t,r.borderColorArray),n=r.svgId?.replace(/^#/,"")??"",f=n?`url(#${n}-drop-shadow)`:r.dropShadow??"none",h="";for(let c=0;c<Ye(r.THEME_COLOR_LIMIT);c++){let _=`${17-3*c}`,x=i?r.borderColorArray[c%r.borderColorArray.length]:void 0,S=x??r.mainBkg,v=x??r.nodeBorder;h+=`
7
7
  .section-${c-1} rect,
8
8
  .section-${c-1} path,
9
9
  .section-${c-1} circle {
@@ -0,0 +1 @@
1
+ import{xi}from"./chunk-cktmyc13.js";export{xi as createCynefinServices};