@bkm016/basalt 0.1.12 → 0.1.13

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 (271) hide show
  1. package/{chunk-7jezts2n.js → chunk-06s9pr82.js} +2 -2
  2. package/{chunk-jpnf71q7.js → chunk-095adzn5.js} +2 -2
  3. package/chunk-0a7ft50x.js +18 -0
  4. package/{chunk-vjne04dp.js → chunk-0nedq669.js} +4 -4
  5. package/chunk-0x9netvr.js +5 -0
  6. package/{chunk-9as0p561.js → chunk-15ve3nmv.js} +11 -11
  7. package/chunk-1dbfmejf.js +2 -0
  8. package/{chunk-hbnmymaq.js → chunk-1q6e3mj7.js} +2 -2
  9. package/{chunk-85v69h91.js → chunk-22az84sh.js} +2 -2
  10. package/{chunk-w0rr66z7.js → chunk-2q56egb8.js} +1 -1
  11. package/{chunk-fhxy6y34.js → chunk-2tf7qfbx.js} +2 -2
  12. package/{chunk-nw1xpt3s.js → chunk-2zbj8ny6.js} +2 -2
  13. package/chunk-302n9g7p.js +2 -0
  14. package/{chunk-bk4rpnm8.js → chunk-37ndxehw.js} +2 -2
  15. package/chunk-41das1ty.js +2 -0
  16. package/{chunk-6mges89p.js → chunk-44a7f5ta.js} +5 -5
  17. package/{chunk-jn5pqy5v.js → chunk-46vy2m29.js} +1 -1
  18. package/{chunk-1zj3zvw5.js → chunk-4k9t9jvx.js} +4 -4
  19. package/{chunk-eq4wqxzt.js → chunk-4rnmxtpx.js} +2 -2
  20. package/{chunk-1xfv4bd7.js → chunk-4w9zqv0k.js} +1 -1
  21. package/chunk-6d9r9p91.js +20 -0
  22. package/chunk-6f4ht2hw.js +2 -0
  23. package/{chunk-jj4hqbrx.js → chunk-6sea12mw.js} +3 -3
  24. package/chunk-74wwdx3y.js +3 -0
  25. package/{chunk-w6f2r052.js → chunk-77c2cqp2.js} +1 -1
  26. package/chunk-7chv3knf.js +2 -0
  27. package/chunk-86yr2c0r.js +3 -0
  28. package/{chunk-6sz5q3df.js → chunk-8cgz8xv7.js} +2 -2
  29. package/{chunk-tvm4zmgj.js → chunk-959z9efn.js} +2 -2
  30. package/{chunk-eyrtbbdd.js → chunk-9e8vhzy7.js} +1 -1
  31. package/chunk-b516bp7n.js +3 -0
  32. package/chunk-bja7p3em.js +25 -0
  33. package/chunk-bng72094.js +2 -0
  34. package/{chunk-ksk49hv0.js → chunk-bp61xdsc.js} +1 -1
  35. package/chunk-bq54argx.js +2 -0
  36. package/chunk-ct77cdg7.js +2 -0
  37. package/{chunk-02d3x4mj.js → chunk-dk6fgprw.js} +3 -3
  38. package/chunk-drett6hb.js +2 -0
  39. package/{chunk-4gtgqcct.js → chunk-edbq461k.js} +3 -3
  40. package/{chunk-p2pmdbt2.js → chunk-f0h2bv11.js} +12 -12
  41. package/{chunk-8mezk0cb.js → chunk-g2etemv5.js} +2 -2
  42. package/{chunk-n0ybj4h9.js → chunk-g5p9mj1r.js} +2 -2
  43. package/{chunk-fy82qxa1.js → chunk-gpnqmtbk.js} +1 -1
  44. package/{chunk-kpe7pnhy.js → chunk-h9zxqeqr.js} +4 -4
  45. package/{chunk-qfcr5g35.js → chunk-jjtt9aq8.js} +3 -3
  46. package/{chunk-5wnmbc1b.js → chunk-kbpbrr11.js} +2 -2
  47. package/chunk-m71pj3g1.js +2 -0
  48. package/chunk-mdkfm1ak.js +7 -0
  49. package/chunk-mf04h0yy.js +7 -0
  50. package/chunk-n22vd4at.js +2 -0
  51. package/{chunk-v7wcchy2.js → chunk-nbjnwd54.js} +1 -1
  52. package/{chunk-1h34mzh7.js → chunk-pryvvs96.js} +22 -22
  53. package/{chunk-2kxnw7vs.js → chunk-r1jn77q6.js} +2 -2
  54. package/{chunk-ypqjfv3a.js → chunk-rn3jwyh1.js} +2 -2
  55. package/chunk-sgrrxsnz.js +482 -0
  56. package/chunk-sgz87ht5.js +2 -0
  57. package/{chunk-stj493dn.js → chunk-snz19yc2.js} +2 -2
  58. package/{chunk-qs8zzg50.js → chunk-szj85dqe.js} +2 -2
  59. package/{chunk-nrsd810j.js → chunk-tfhp09nj.js} +2 -2
  60. package/{chunk-hc300148.js → chunk-tfhze1vq.js} +2 -2
  61. package/{chunk-01nve4qy.js → chunk-tjg0gcks.js} +1 -1
  62. package/{chunk-cbgpymt4.js → chunk-tnj2kqb8.js} +1 -1
  63. package/{chunk-3pf1d62g.js → chunk-vqm94hz2.js} +2 -2
  64. package/{chunk-82v8jh1h.js → chunk-xvm0y99b.js} +2 -2
  65. package/{chunk-rwks9zaw.js → chunk-y23dpz5e.js} +2 -2
  66. package/{chunk-ejjem0tc.js → chunk-y4pvhes1.js} +6 -6
  67. package/{chunk-bwawt15q.js → chunk-ydzag81d.js} +2 -2
  68. package/chunk-ymg7mtcx.js +3 -0
  69. package/chunk-yy1f9jxc.js +4044 -0
  70. package/{chunk-ntks40jd.js → chunk-z0c8ek0j.js} +5 -5
  71. package/chunk-zk91579b.js +3 -0
  72. package/{chunk-0fc9apfn.js → chunk-zx75vnw8.js} +18 -18
  73. package/compiled.js +85 -12
  74. package/package.json +1 -1
  75. package/ui-test-worker.js +53 -53
  76. package/web/{chunk-aeymdtm1.js → chunk-0jbf73pr.js} +3 -3
  77. package/web/{chunk-7vgh17es.js → chunk-0rhx7qb8.js} +1 -1
  78. package/web/{chunk-7adsmqv6.js → chunk-0rvwj2wh.js} +2 -2
  79. package/web/chunk-12qf1r6m.js +1 -0
  80. package/web/{chunk-dndd757x.js → chunk-14vmr99v.js} +3 -3
  81. package/web/{chunk-4f6a8dsk.js → chunk-16jc5m0f.js} +1 -1
  82. package/web/{chunk-bra33pt0.js → chunk-1m6fx2h7.js} +2 -2
  83. package/web/{chunk-hva7xyne.js → chunk-1xm9x7d6.js} +1 -1
  84. package/web/{chunk-8539865x.js → chunk-20jxvmbw.js} +1 -1
  85. package/web/chunk-2n5xbnrt.js +1 -0
  86. package/web/{chunk-bygwbpvq.js → chunk-2sef2wft.js} +2 -2
  87. package/web/{chunk-w9gnqkez.js → chunk-2x7vmhm0.js} +2 -2
  88. package/web/{chunk-19zd0tye.js → chunk-2y1avvqj.js} +8 -8
  89. package/web/chunk-36s08nye.js +1 -0
  90. package/web/chunk-3ctmehg4.js +1 -0
  91. package/web/{chunk-ncfzmf2g.js → chunk-3jjksgze.js} +1 -1
  92. package/web/{chunk-aebrw6cv.js → chunk-3p9w8sg5.js} +2 -2
  93. package/web/{chunk-sdr5wa4z.js → chunk-3wpxymxa.js} +3 -3
  94. package/web/{chunk-v34mr9ky.js → chunk-4py9sndw.js} +3 -3
  95. package/web/chunk-4swea9sn.js +1 -0
  96. package/web/chunk-4zz5a483.js +1 -0
  97. package/web/{chunk-3rkkp6ed.js → chunk-5cwxhhae.js} +5 -5
  98. package/web/{chunk-d57fm7k0.js → chunk-5ym5ffd5.js} +2 -2
  99. package/web/{chunk-gten0rpx.js → chunk-6e87m0nm.js} +2 -2
  100. package/web/{chunk-b99k8q22.js → chunk-6rsr2cyw.js} +8 -8
  101. package/web/chunk-6y55gk1n.js +1 -0
  102. package/web/chunk-7aep7k4v.js +1 -0
  103. package/web/{chunk-yf8ykk4v.js → chunk-8j4tzff5.js} +3 -3
  104. package/web/{chunk-ny436sqg.js → chunk-8tgavnwx.js} +1 -1
  105. package/web/{chunk-xvfeq8v2.js → chunk-97t3ngqf.js} +12 -12
  106. package/web/{chunk-gkmaryr4.js → chunk-980zhtht.js} +1 -1
  107. package/web/chunk-9k7fkx80.js +1 -0
  108. package/web/{chunk-hxbfkdjd.js → chunk-9wz8jne3.js} +1 -1
  109. package/web/chunk-a00vg115.js +1 -0
  110. package/web/chunk-a4gbxnm3.js +1 -0
  111. package/web/{chunk-6f2sz84q.js → chunk-a6g3nqp0.js} +1 -1
  112. package/web/{chunk-n9v14vyd.js → chunk-a9er7a7c.js} +22 -22
  113. package/web/chunk-atppv8fk.js +1 -0
  114. package/web/{chunk-xbyrgyy0.js → chunk-awkdw9rw.js} +2 -2
  115. package/web/{chunk-hqxc9m07.js → chunk-b4gcpsbg.js} +10 -10
  116. package/web/{chunk-qdd3bx8q.js → chunk-b9jry5a3.js} +1 -1
  117. package/web/{chunk-jyf7a7yp.js → chunk-ba9qy65y.js} +1 -1
  118. package/web/chunk-bq6mep6p.js +2 -0
  119. package/web/chunk-bwy3e58v.js +1 -0
  120. package/web/{chunk-aa46mrgh.js → chunk-c57f714b.js} +2 -2
  121. package/web/{chunk-b5zf1hs3.js → chunk-c6m4vfn5.js} +101 -101
  122. package/web/{chunk-5np514v5.js → chunk-cr04125j.js} +4 -4
  123. package/web/{chunk-ym7kv2hs.js → chunk-cr05dttm.js} +1 -1
  124. package/web/{chunk-2cyzaqjy.js → chunk-ct7z7bea.js} +3 -3
  125. package/web/{chunk-y2rzeb4v.js → chunk-ct90yf8z.js} +2 -2
  126. package/web/{chunk-yjs6jmdb.js → chunk-ddg8rz82.js} +3 -3
  127. package/web/{chunk-8cnjd0f2.js → chunk-dmha2y9c.js} +18 -18
  128. package/web/{chunk-jeafmjsm.js → chunk-e57h40qa.js} +6 -6
  129. package/web/chunk-eeesa5q1.js +1 -0
  130. package/web/{chunk-4wwd3pfz.js → chunk-eqndhs21.js} +2 -2
  131. package/web/{chunk-td83xf12.js → chunk-eqxy6535.js} +2 -2
  132. package/web/{chunk-wvrs986a.js → chunk-et1rsgmp.js} +3 -3
  133. package/web/chunk-f7jpakwh.js +1 -0
  134. package/web/{chunk-v1hfbjz9.js → chunk-fnvgdvrg.js} +4 -4
  135. package/web/chunk-fp62avjh.js +1 -0
  136. package/web/{chunk-6jb2zyp6.js → chunk-frnh4zqf.js} +2 -2
  137. package/web/chunk-g0be12na.js +1 -0
  138. package/web/{chunk-60mym60n.js → chunk-g7hqafb8.js} +1 -1
  139. package/web/{chunk-wqzbxzk3.js → chunk-ga07tv37.js} +1 -1
  140. package/web/chunk-gr163fex.js +1 -0
  141. package/web/chunk-gxtz10wf.js +1 -0
  142. package/web/{chunk-pjpre6de.js → chunk-h1k2kqbs.js} +6 -6
  143. package/web/{chunk-7tkgbbf9.js → chunk-h6k1x096.js} +2 -2
  144. package/web/{chunk-885kpj14.js → chunk-jccz14ye.js} +2 -2
  145. package/web/{chunk-d73zkc4q.js → chunk-jh33m2mq.js} +2 -2
  146. package/web/{chunk-g488hxx0.js → chunk-jh3k7xex.js} +3 -3
  147. package/web/{chunk-3qxxrwsp.js → chunk-jpem3qvs.js} +10 -10
  148. package/web/chunk-k9qnvx86.js +2 -0
  149. package/web/chunk-kcnj0gan.js +1 -0
  150. package/web/{chunk-2jfesv7m.js → chunk-ke8dffnk.js} +2 -2
  151. package/web/chunk-kpp5xqsb.js +1 -0
  152. package/web/chunk-m33yted6.js +1 -0
  153. package/web/chunk-me5jqqn6.js +1 -0
  154. package/web/{chunk-7v85yvb2.js → chunk-mkxeenph.js} +1 -1
  155. package/web/{chunk-mxkbmgcv.js → chunk-mnf4ngj9.js} +1 -1
  156. package/web/{chunk-30aeb767.js → chunk-mykrm8ba.js} +2 -2
  157. package/web/chunk-mzqqwbmr.js +1 -0
  158. package/web/chunk-npyrdsf8.css +1 -0
  159. package/web/chunk-p6e2vr51.js +34 -0
  160. package/web/{chunk-3n9ypydh.js → chunk-p7pa02k9.js} +2 -2
  161. package/web/chunk-q34as3v6.js +1 -0
  162. package/web/{chunk-7ksg3ccg.js → chunk-q4vy3dkk.js} +2 -2
  163. package/web/chunk-q6c8p73w.js +1 -0
  164. package/web/{chunk-h754ntg7.js → chunk-qb8mbptk.js} +1 -1
  165. package/web/{chunk-g4zm0crw.js → chunk-qbmtah1x.js} +1 -1
  166. package/web/chunk-qn93we3a.js +1 -0
  167. package/web/{chunk-c3fty2c2.js → chunk-qq06x2ce.js} +7 -7
  168. package/web/{chunk-fj753yzt.js → chunk-qq6m2my8.js} +2 -2
  169. package/web/chunk-r1f1egve.js +1 -0
  170. package/web/{chunk-80z8s8zb.js → chunk-s935z8er.js} +1 -1
  171. package/web/{chunk-3psgr0q8.js → chunk-sq75q603.js} +20 -20
  172. package/web/{chunk-qp3tjhaq.js → chunk-ss96cz1f.js} +1 -1
  173. package/web/{chunk-hn8m1vsg.js → chunk-t82sngk9.js} +7 -7
  174. package/web/chunk-tt9410zw.js +8 -0
  175. package/web/{chunk-act3rr85.js → chunk-v4cqc9f9.js} +1 -1
  176. package/web/chunk-ve8gy05p.js +1142 -0
  177. package/web/chunk-vg1ebkce.js +1 -0
  178. package/web/{chunk-k4dnjf8n.js → chunk-vk7ch6fh.js} +3 -3
  179. package/web/chunk-vnt34mkb.js +1 -0
  180. package/web/{chunk-kerfb21g.js → chunk-w28dn4dw.js} +1 -1
  181. package/web/{chunk-rdr6wt22.js → chunk-w4tfad6c.js} +4 -4
  182. package/web/{chunk-81s15c2e.js → chunk-wpxtkxjt.js} +2 -2
  183. package/web/{chunk-h24ybwp6.js → chunk-xcyqd7cn.js} +1 -1
  184. package/web/chunk-xe121vg7.js +1 -0
  185. package/web/chunk-xh4xn1az.js +1 -0
  186. package/web/{chunk-e94pd9rr.js → chunk-xk1vkcj4.js} +9 -9
  187. package/web/chunk-xrk5ewsn.js +1 -0
  188. package/web/{chunk-5g8md2wg.js → chunk-xvm66b7v.js} +4 -4
  189. package/web/{chunk-q1zxvjhs.js → chunk-xxmaqj1m.js} +2 -2
  190. package/web/chunk-xzwxcxb4.js +1 -0
  191. package/web/{chunk-xpecre7w.js → chunk-y9waq403.js} +4 -4
  192. package/web/chunk-ydhnkws0.js +1 -0
  193. package/web/{chunk-ar6jnhm5.js → chunk-yn4t5s9r.js} +1 -1
  194. package/web/chunk-ys2tns0p.js +1 -0
  195. package/web/chunk-zb61mf0a.js +1 -0
  196. package/web/{chunk-r6kk4vp1.js → chunk-ze6azq7z.js} +4 -4
  197. package/web/chunk-zh7193nq.js +2 -0
  198. package/web/chunk-zqcg6frm.js +1 -0
  199. package/web/{chunk-enwfd8d5.js → chunk-zxrbbbtp.js} +2 -2
  200. package/web/index.html +1 -1
  201. package/worker.js +1 -1
  202. package/chunk-2fyjph3f.js +0 -2
  203. package/chunk-37zystxb.js +0 -25
  204. package/chunk-3k627vf2.js +0 -3
  205. package/chunk-7er5pz7s.js +0 -479
  206. package/chunk-7g5smgjj.js +0 -2
  207. package/chunk-7m3jagqn.js +0 -2
  208. package/chunk-9c4gdg1q.js +0 -3
  209. package/chunk-b2bxqeb4.js +0 -2
  210. package/chunk-bpw6q7g0.js +0 -3
  211. package/chunk-cdw03j4t.js +0 -20
  212. package/chunk-ch1r3ted.js +0 -2
  213. package/chunk-cmwdjes8.js +0 -18
  214. package/chunk-db7ws33a.js +0 -7
  215. package/chunk-e1x629v0.js +0 -5
  216. package/chunk-j64dc767.js +0 -3
  217. package/chunk-m4bg1apa.js +0 -7
  218. package/chunk-nhm9z3d8.js +0 -2
  219. package/chunk-pnspvnyd.js +0 -2
  220. package/chunk-qnkrrwmg.js +0 -2
  221. package/chunk-r4gm8ngh.js +0 -2
  222. package/chunk-rks90mh1.js +0 -2
  223. package/chunk-t7te60m7.js +0 -2
  224. package/chunk-tv52xajf.js +0 -2
  225. package/chunk-wqqjzsjt.js +0 -3983
  226. package/chunk-xef4642x.js +0 -3
  227. package/web/chunk-04drx71p.js +0 -1
  228. package/web/chunk-0mdf1qja.js +0 -1
  229. package/web/chunk-0rdgt4jb.css +0 -1
  230. package/web/chunk-1m0kp0g3.js +0 -8
  231. package/web/chunk-3j2tcphs.js +0 -1
  232. package/web/chunk-3k9h7a73.js +0 -1142
  233. package/web/chunk-3m1bb2fw.js +0 -1
  234. package/web/chunk-55nvm2mj.js +0 -1
  235. package/web/chunk-5dkqfnh7.js +0 -2
  236. package/web/chunk-7ky5nrrr.js +0 -1
  237. package/web/chunk-8sdjgv3k.js +0 -1
  238. package/web/chunk-9bxtzwtc.js +0 -1
  239. package/web/chunk-9jy8nc4r.js +0 -1
  240. package/web/chunk-bcjgzwef.js +0 -1
  241. package/web/chunk-cxpnj495.js +0 -2
  242. package/web/chunk-d1btrqmw.js +0 -1
  243. package/web/chunk-d94t9z70.js +0 -1
  244. package/web/chunk-e68jw0bg.js +0 -1
  245. package/web/chunk-fr4fft89.js +0 -1
  246. package/web/chunk-gckmcef6.js +0 -1
  247. package/web/chunk-gnb09wmx.js +0 -1
  248. package/web/chunk-hrgqc1vr.js +0 -1
  249. package/web/chunk-j9c8fa82.js +0 -1
  250. package/web/chunk-jz5mmp64.js +0 -1
  251. package/web/chunk-kxeaj44h.js +0 -1
  252. package/web/chunk-m0136xav.js +0 -1
  253. package/web/chunk-m1rdyvb5.js +0 -1
  254. package/web/chunk-m6vyvgm5.js +0 -1
  255. package/web/chunk-my0ec787.js +0 -1
  256. package/web/chunk-nkpdd9hw.js +0 -1
  257. package/web/chunk-pbp1p5ex.js +0 -1
  258. package/web/chunk-ph75hddv.js +0 -1
  259. package/web/chunk-phdfyqaa.js +0 -1
  260. package/web/chunk-phxa5krt.js +0 -1
  261. package/web/chunk-r4zbw4zj.js +0 -2
  262. package/web/chunk-ry4ycah9.js +0 -1
  263. package/web/chunk-sqm16fat.js +0 -1
  264. package/web/chunk-tj1fn8v2.js +0 -1
  265. package/web/chunk-v0wtk059.js +0 -34
  266. package/web/chunk-v1qt3gq4.js +0 -1
  267. package/web/chunk-v854w9yn.js +0 -1
  268. package/web/chunk-ve56gxq0.js +0 -1
  269. package/web/chunk-w573ym17.js +0 -1
  270. package/web/chunk-x0mjydtp.js +0 -1
  271. package/web/chunk-zhybh04p.js +0 -1
@@ -1,9 +1,9 @@
1
- import{t,a,de,x,b,F,C,l,p,Ba,In,cn,Fa,Er,Ar,Rr,Lr,za,Ua,ja,qa,Va,Wa,Ga,Ha,Ya,Za,Xa,Ka,Qa,Ja,ei,ti,ni,un,ai,pe,se,le,Ze,Xe,Tt,vt,Et,Yn,en,Zn}from"./chunk-b5zf1hs3.js";import{re}from"./chunk-3n9ypydh.js";import{qe}from"./chunk-h754ntg7.js";import{Bt}from"./chunk-r4zbw4zj.js";function Te(e){return Array.isArray(e)}function Ne(e){if(In(e))return e;let o=cn(e);if(!Qe(e))return{};if(Te(e)){let i=Array.from(e);if(e.length>0&&typeof e[0]==="string"&&Object.hasOwn(e,"index"))i.index=e.index,i.input=e.input;return i}if(un(e)){let i=e;return new i.constructor(i.buffer,i.byteOffset,i.length)}if(o==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(o==="[object DataView]"){let i=e,{buffer:g,byteOffset:f,byteLength:r}=i,d=new ArrayBuffer(r),w=new Uint8Array(g,f,r);return new Uint8Array(d).set(w),new DataView(d)}if(o==="[object Boolean]"||o==="[object Number]"||o==="[object String]"){let g=new e.constructor(e.valueOf());if(o==="[object String]")et(g,e);else ge(g,e);return g}if(o==="[object Date]")return new Date(Number(e));if(o==="[object RegExp]"){let i=e,g=new RegExp(i.source,i.flags);return g.lastIndex=i.lastIndex,g}if(o==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(o==="[object Map]"){let i=e,g=new Map;return i.forEach((f,r)=>{g.set(r,f)}),g}if(o==="[object Set]"){let i=e,g=new Set;return i.forEach((f)=>{g.add(f)}),g}if(o==="[object Arguments]"){let i=e,g={};return ge(g,i),g.length=i.length,g[Symbol.iterator]=i[Symbol.iterator],g}let u={};return tt(u,e),ge(u,e),$e(u,e),u}function Qe(e){switch(cn(e)){case Lr:case Va:case Wa:case Ha:case Rr:case Ua:case ti:case ni:case Qa:case Ja:case ei:case ja:case Ar:case Ga:case Fa:case qa:case Er:case za:case Ya:case Za:case Xa:case Ka:return!0;default:return!1}}function ge(e,o){for(let u in o)if(Object.hasOwn(o,u))e[u]=o[u]}function $e(e,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))e[g]=o[g]}}function et(e,o){let u=o.valueOf().length;for(let i in o)if(Object.hasOwn(o,i)&&(Number.isNaN(Number(i))||Number(i)>=u))e[i]=o[i]}function tt(e,o){let u=Object.getPrototypeOf(o);if(u!==null){if(typeof o.constructor==="function")Object.setPrototypeOf(e,u)}}var be=function(){var e=t(function(B,S,n,h){for(n=n||{},h=B.length;h--;n[B[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],w=[1,18],E=[8,30],k=[8,10,21,28,29,30,31,39,43,46],L=[1,23],_=[1,24],T=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],I=[1,49],N={trace:t(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:t(function(S,n,h,m,D,s,H){var c=s.length-1;switch(D){case 4:m.getLogger().debug("Rule: separator (NL) ");break;case 5:m.getLogger().debug("Rule: separator (Space) ");break;case 6:m.getLogger().debug("Rule: separator (EOF) ");break;case 7:m.getLogger().debug("Rule: hierarchy: ",s[c-1]),m.setHierarchy(s[c-1]);break;case 8:m.getLogger().debug("Stop NL ");break;case 9:m.getLogger().debug("Stop EOF ");break;case 10:m.getLogger().debug("Stop NL2 ");break;case 11:m.getLogger().debug("Stop EOF2 ");break;case 12:m.getLogger().debug("Rule: statement: ",s[c]),typeof s[c].length==="number"?this.$=s[c]:this.$=[s[c]];break;case 13:m.getLogger().debug("Rule: statement #2: ",s[c-1]),this.$=[s[c-1]].concat(s[c]);break;case 14:m.getLogger().debug("Rule: link: ",s[c],S),this.$={edgeTypeStr:s[c],label:""};break;case 15:m.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=m.generateId();this.$={id:j,type:"space",label:"",width:V,children:[]};break;case 23:m.getLogger().debug("Rule: (nodeStatement link node) ",s[c-2],s[c-1],s[c]," typestr: ",s[c-1].edgeTypeStr);let G=m.edgeStrToEdgeData(s[c-1].edgeTypeStr),ie=m.edgeStrToEdgeStartData(s[c-1].edgeTypeStr),q=m.edgeStrToThickness(s[c-1].edgeTypeStr),ae=m.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:m.typeStr2Type(s[c].typeStr),directions:s[c].directions}];break;case 24:m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[c-1],s[c]),this.$={id:s[c-1].id,label:s[c-1].label,type:m.typeStr2Type(s[c-1].typeStr),directions:s[c-1].directions,widthInColumns:parseInt(s[c],10)};break;case 25:m.getLogger().debug("Rule: nodeStatement (node) ",s[c]),this.$={id:s[c].id,label:s[c].label,type:m.typeStr2Type(s[c].typeStr),directions:s[c].directions,widthInColumns:1};break;case 26:m.getLogger().debug("APA123",this?this:"na"),m.getLogger().debug("COLUMNS: ",s[c]),this.$={type:"column-setting",columns:s[c]==="auto"?-1:parseInt(s[c])};break;case 27:m.getLogger().debug("Rule: id-block statement : ",s[c-2],s[c-1]);let O=m.generateId();this.$={...s[c-2],type:"composite",children:s[c-1]};break;case 28:m.getLogger().debug("Rule: blockStatement : ",s[c-2],s[c-1],s[c]);let K=m.generateId();this.$={id:K,type:"composite",label:"",children:s[c-1]};break;case 29:m.getLogger().debug("Rule: node (NODE_ID separator): ",s[c]),this.$={id:s[c]};break;case 30:m.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:m.getLogger().debug("Rule: dirList: ",s[c]),this.$=[s[c]];break;case 32:m.getLogger().debug("Rule: dirList: ",s[c-1],s[c]),this.$=[s[c-1]].concat(s[c]);break;case 33:m.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:m.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:w},{8:[1,20]},e(E,[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:w}),e(k,[2,16],{14:22,15:L,16:_}),e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),e(k,[2,21]),e(k,[2,22]),e(T,[2,25],{27:[1,25]}),e(k,[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:w},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(E,[2,13]),{26:35,31:f},{31:[2,14]},{17:[1,36]},e(T,[2,24]),{10:o,11:37,13:4,14:22,15:L,16:_,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:w},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(T,[2,23]),{18:[1,45]},{30:[1,46]},e(k,[2,28]),e(k,[2,35]),e(k,[2,36]),e(k,[2,37]),e(k,[2,38]),{36:[1,47]},{33:48,34:I},{15:[1,50]},e(k,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:I,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:t(function(S,n){if(n.recoverable)this.trace(S);else{var h=Error(S);throw h.hash=n,h}},"parseError"),parse:t(function(S){var n=this,h=[0],m=[],D=[null],s=[],H=this.table,c="",V=0,j=0,G=0,ie=2,q=1,ae=s.slice.call(arguments,1),O=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(O.setInput(S,K.yy),K.yy.lexer=O,K.yy.parser=this,typeof O.yylloc>"u")O.yylloc={};var oe=O.yylloc;s.push(oe);var Ge=O.options&&O.options.ranges;if(typeof K.yy.parseError==="function")this.parseError=K.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Je(P){h.length=h.length-2*P,D.length=D.length-P,s.length=s.length-P}t(Je,"popStack");function _e(){var P=m.pop()||O.lex()||q;if(typeof P!=="number"){if(P instanceof Array)m=P,P=m.pop();P=n.symbols_[P]||P}return P}t(_e,"lex");var A,ce,W,R,At,ue,U={},J,Y,De,Z;while(!0){if(W=h[h.length-1],this.defaultActions[W])R=this.defaultActions[W];else{if(A===null||typeof A>"u")A=_e();R=H[W]&&H[W][A]}if(typeof R>"u"||!R.length||!R[0]){var he="";Z=[];for(J in H[W])if(this.terminals_[J]&&J>ie)Z.push("'"+this.terminals_[J]+"'");if(O.showPosition)he="Parse error on line "+(V+1)+`:
1
+ import{t,a,de,x,b,F,C,l,p,za,Dn,cn,Ua,Ar,Rr,Lr,Ir,ja,qa,Va,Ga,Wa,Ha,Ya,Za,Xa,Ka,Qa,Ja,ei,ti,ni,ri,ai,un,oi,pe,le,ce,Ze,Xe,Tt,vt,Et,Zn,en,Xn}from"./chunk-c6m4vfn5.js";import{re}from"./chunk-p7pa02k9.js";import{qe}from"./chunk-qb8mbptk.js";import{Bt}from"./chunk-bq6mep6p.js";function Te(e){return Array.isArray(e)}function Ne(e){if(Dn(e))return e;let o=cn(e);if(!Qe(e))return{};if(Te(e)){let i=Array.from(e);if(e.length>0&&typeof e[0]==="string"&&Object.hasOwn(e,"index"))i.index=e.index,i.input=e.input;return i}if(un(e)){let i=e;return new i.constructor(i.buffer,i.byteOffset,i.length)}if(o==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(o==="[object DataView]"){let i=e,{buffer:g,byteOffset:f,byteLength:r}=i,d=new ArrayBuffer(r),w=new Uint8Array(g,f,r);return new Uint8Array(d).set(w),new DataView(d)}if(o==="[object Boolean]"||o==="[object Number]"||o==="[object String]"){let g=new e.constructor(e.valueOf());if(o==="[object String]")et(g,e);else ge(g,e);return g}if(o==="[object Date]")return new Date(Number(e));if(o==="[object RegExp]"){let i=e,g=new RegExp(i.source,i.flags);return g.lastIndex=i.lastIndex,g}if(o==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(o==="[object Map]"){let i=e,g=new Map;return i.forEach((f,r)=>{g.set(r,f)}),g}if(o==="[object Set]"){let i=e,g=new Set;return i.forEach((f)=>{g.add(f)}),g}if(o==="[object Arguments]"){let i=e,g={};return ge(g,i),g.length=i.length,g[Symbol.iterator]=i[Symbol.iterator],g}let u={};return tt(u,e),ge(u,e),$e(u,e),u}function Qe(e){switch(cn(e)){case Ir:case Wa:case Ha:case Za:case Lr:case qa:case ri:case ai:case ei:case ti:case ni:case Va:case Rr:case Ya:case Ua:case Ga:case Ar:case ja:case Xa:case Ka:case Qa:case Ja:return!0;default:return!1}}function ge(e,o){for(let u in o)if(Object.hasOwn(o,u))e[u]=o[u]}function $e(e,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))e[g]=o[g]}}function et(e,o){let u=o.valueOf().length;for(let i in o)if(Object.hasOwn(o,i)&&(Number.isNaN(Number(i))||Number(i)>=u))e[i]=o[i]}function tt(e,o){let u=Object.getPrototypeOf(o);if(u!==null){if(typeof o.constructor==="function")Object.setPrototypeOf(e,u)}}var be=function(){var e=t(function(B,S,n,h){for(n=n||{},h=B.length;h--;n[B[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],w=[1,18],E=[8,30],k=[8,10,21,28,29,30,31,39,43,46],L=[1,23],_=[1,24],T=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],I=[1,49],N={trace:t(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:t(function(S,n,h,m,D,s,H){var c=s.length-1;switch(D){case 4:m.getLogger().debug("Rule: separator (NL) ");break;case 5:m.getLogger().debug("Rule: separator (Space) ");break;case 6:m.getLogger().debug("Rule: separator (EOF) ");break;case 7:m.getLogger().debug("Rule: hierarchy: ",s[c-1]),m.setHierarchy(s[c-1]);break;case 8:m.getLogger().debug("Stop NL ");break;case 9:m.getLogger().debug("Stop EOF ");break;case 10:m.getLogger().debug("Stop NL2 ");break;case 11:m.getLogger().debug("Stop EOF2 ");break;case 12:m.getLogger().debug("Rule: statement: ",s[c]),typeof s[c].length==="number"?this.$=s[c]:this.$=[s[c]];break;case 13:m.getLogger().debug("Rule: statement #2: ",s[c-1]),this.$=[s[c-1]].concat(s[c]);break;case 14:m.getLogger().debug("Rule: link: ",s[c],S),this.$={edgeTypeStr:s[c],label:""};break;case 15:m.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=m.generateId();this.$={id:j,type:"space",label:"",width:V,children:[]};break;case 23:m.getLogger().debug("Rule: (nodeStatement link node) ",s[c-2],s[c-1],s[c]," typestr: ",s[c-1].edgeTypeStr);let G=m.edgeStrToEdgeData(s[c-1].edgeTypeStr),se=m.edgeStrToEdgeStartData(s[c-1].edgeTypeStr),q=m.edgeStrToThickness(s[c-1].edgeTypeStr),ie=m.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:ie,directions:s[c].directions,arrowTypeEnd:G,arrowTypeStart:se},{id:s[c].id,label:s[c].label,type:m.typeStr2Type(s[c].typeStr),directions:s[c].directions}];break;case 24:m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[c-1],s[c]),this.$={id:s[c-1].id,label:s[c-1].label,type:m.typeStr2Type(s[c-1].typeStr),directions:s[c-1].directions,widthInColumns:parseInt(s[c],10)};break;case 25:m.getLogger().debug("Rule: nodeStatement (node) ",s[c]),this.$={id:s[c].id,label:s[c].label,type:m.typeStr2Type(s[c].typeStr),directions:s[c].directions,widthInColumns:1};break;case 26:m.getLogger().debug("APA123",this?this:"na"),m.getLogger().debug("COLUMNS: ",s[c]),this.$={type:"column-setting",columns:s[c]==="auto"?-1:parseInt(s[c])};break;case 27:m.getLogger().debug("Rule: id-block statement : ",s[c-2],s[c-1]);let O=m.generateId();this.$={...s[c-2],type:"composite",children:s[c-1]};break;case 28:m.getLogger().debug("Rule: blockStatement : ",s[c-2],s[c-1],s[c]);let K=m.generateId();this.$={id:K,type:"composite",label:"",children:s[c-1]};break;case 29:m.getLogger().debug("Rule: node (NODE_ID separator): ",s[c]),this.$={id:s[c]};break;case 30:m.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:m.getLogger().debug("Rule: dirList: ",s[c]),this.$=[s[c]];break;case 32:m.getLogger().debug("Rule: dirList: ",s[c-1],s[c]),this.$=[s[c-1]].concat(s[c]);break;case 33:m.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:m.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:w},{8:[1,20]},e(E,[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:w}),e(k,[2,16],{14:22,15:L,16:_}),e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),e(k,[2,21]),e(k,[2,22]),e(T,[2,25],{27:[1,25]}),e(k,[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:w},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(E,[2,13]),{26:35,31:f},{31:[2,14]},{17:[1,36]},e(T,[2,24]),{10:o,11:37,13:4,14:22,15:L,16:_,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:w},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(T,[2,23]),{18:[1,45]},{30:[1,46]},e(k,[2,28]),e(k,[2,35]),e(k,[2,36]),e(k,[2,37]),e(k,[2,38]),{36:[1,47]},{33:48,34:I},{15:[1,50]},e(k,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:I,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:t(function(S,n){if(n.recoverable)this.trace(S);else{var h=Error(S);throw h.hash=n,h}},"parseError"),parse:t(function(S){var n=this,h=[0],m=[],D=[null],s=[],H=this.table,c="",V=0,j=0,G=0,se=2,q=1,ie=s.slice.call(arguments,1),O=Object.create(this.lexer),K={yy:{}};for(var ae in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ae))K.yy[ae]=this.yy[ae];if(O.setInput(S,K.yy),K.yy.lexer=O,K.yy.parser=this,typeof O.yylloc>"u")O.yylloc={};var ne=O.yylloc;s.push(ne);var Ge=O.options&&O.options.ranges;if(typeof K.yy.parseError==="function")this.parseError=K.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Je(P){h.length=h.length-2*P,D.length=D.length-P,s.length=s.length-P}t(Je,"popStack");function _e(){var P=m.pop()||O.lex()||q;if(typeof P!=="number"){if(P instanceof Array)m=P,P=m.pop();P=n.symbols_[P]||P}return P}t(_e,"lex");var A,oe,W,R,At,ue,U={},J,Y,De,Z;while(!0){if(W=h[h.length-1],this.defaultActions[W])R=this.defaultActions[W];else{if(A===null||typeof A>"u")A=_e();R=H[W]&&H[W][A]}if(typeof R>"u"||!R.length||!R[0]){var he="";Z=[];for(J in H[W])if(this.terminals_[J]&&J>se)Z.push("'"+this.terminals_[J]+"'");if(O.showPosition)he="Parse error on line "+(V+1)+`:
2
2
  `+O.showPosition()+`
3
- Expecting `+Z.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else he="Parse error on line "+(V+1)+": Unexpected "+(A==q?"end of input":"'"+(this.terminals_[A]||A)+"'");this.parseError(he,{text:O.match,token:this.terminals_[A]||A,line:O.yylineno,loc:oe,expected:Z})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(R[0]){case 1:if(h.push(A),D.push(O.yytext),s.push(O.yylloc),h.push(R[1]),A=null,!ce){if(j=O.yyleng,c=O.yytext,V=O.yylineno,oe=O.yylloc,G>0)G--}else A=ce,ce=null;break;case 2:if(Y=this.productions_[R[1]][1],U.$=D[D.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},Ge)U._$.range=[s[s.length-(Y||1)].range[0],s[s.length-1].range[1]];if(ue=this.performAction.apply(U,[c,j,V,K.yy,R[1],D,s].concat(ae)),typeof ue<"u")return ue;if(Y)h=h.slice(0,-1*Y*2),D=D.slice(0,-1*Y),s=s.slice(0,-1*Y);h.push(this.productions_[R[1]][0]),D.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")},v=function(){var B={EOF:1,parseError:t(function(n,h){if(this.yy.parser)this.yy.parser.parseError(n,h);else throw Error(n)},"parseError"),setInput:t(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:t(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:t(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 m=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 D=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===m.length?this.yylloc.first_column:0)+m[m.length-h.length].length-h[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[D[0],D[0]+this.yyleng-n];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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 he="Parse error on line "+(V+1)+": Unexpected "+(A==q?"end of input":"'"+(this.terminals_[A]||A)+"'");this.parseError(he,{text:O.match,token:this.terminals_[A]||A,line:O.yylineno,loc:ne,expected:Z})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(R[0]){case 1:if(h.push(A),D.push(O.yytext),s.push(O.yylloc),h.push(R[1]),A=null,!oe){if(j=O.yyleng,c=O.yytext,V=O.yylineno,ne=O.yylloc,G>0)G--}else A=oe,oe=null;break;case 2:if(Y=this.productions_[R[1]][1],U.$=D[D.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},Ge)U._$.range=[s[s.length-(Y||1)].range[0],s[s.length-1].range[1]];if(ue=this.performAction.apply(U,[c,j,V,K.yy,R[1],D,s].concat(ie)),typeof ue<"u")return ue;if(Y)h=h.slice(0,-1*Y*2),D=D.slice(0,-1*Y),s=s.slice(0,-1*Y);h.push(this.productions_[R[1]][0]),D.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")},v=function(){var B={EOF:1,parseError:t(function(n,h){if(this.yy.parser)this.yy.parser.parseError(n,h);else throw Error(n)},"parseError"),setInput:t(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:t(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:t(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 m=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 D=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===m.length?this.yylloc.first_column:0)+m[m.length-h.length].length-h[0].length:this.yylloc.first_column-n},this.options.ranges)this.yylloc.range=[D[0],D[0]+this.yyleng-n];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(S){this.unput(this.match.slice(S))},"less"),pastInput:t(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:t(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:t(function(){var S=this.pastInput(),n=Array(S.length+1).join("-");return S+this.upcomingInput()+`
5
5
  `+n+"^"},"showPosition"),test_match:t(function(S,n){var h,m,D;if(this.options.backtrack_lexer){if(D={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)D.yylloc.range=this.yylloc.range.slice(0)}if(m=S[0].match(/(?:\r\n?|\n).*/g),m)this.yylineno+=m.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.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 D)this[s]=D[s];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var S,n,h,m;if(!this._more)this.yytext="",this.match="";var D=this._currentRules();for(var s=0;s<D.length;s++)if(h=this._input.match(this.rules[D[s]]),h&&(!n||h[0].length>n[0].length)){if(n=h,m=s,this.options.backtrack_lexer)if(S=this.test_match(h,D[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,D[m]),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:t(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:t(function(n){this.conditionStack.push(n)},"begin"),popState:t(function(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:t(function(n){this.begin(n)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(n,h,m,D){var s=D;switch(m){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 B}();N.lexer=v;function z(){this.yy={}}return t(z,"Parser"),z.prototype=N,N.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=t((e)=>b.sanitizeText(e,l()),"sanitizeText"),at=t(function(e,o=""){let u=Q.get(e);if(!u)u={id:e,styles:[],textStyles:[]},Q.set(e,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=t(function(e,o=""){let u=M.get(e);if(o!==void 0&&o!==null)u.styles=o.split(ve)},"addStyle2Node"),ot=t(function(e,o){e.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=t((e,o)=>{let u=e.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 w=r.width??1;for(let E=0;E<w;E++){let k=Ne(r);k.id=k.id+"-"+E,M.set(k.id,k),i.push(k)}}else if(d===void 0)i.push(r)}}o.children=i},"populateBlockDatabase"),ke=[],X={id:"root",type:"composite",children:[],columns:-1},lt=t(()=>{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(e){switch(a.debug("typeStr2Type",e),e){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"}}t(Be,"typeStr2Type");function Re(e){switch(a.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}t(Re,"edgeTypeStr2Type");function Pe(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}t(Pe,"edgeStrToEdgeData");function Fe(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}t(Fe,"edgeStrToEdgeStartData");function Me(e){return e.includes("==")?"thick":"normal"}t(Me,"edgeStrToThickness");function Ke(e){if(e.includes(".-"))return"dotted";return"solid"}t(Ke,"edgeStrToPattern");var Ce=0,ct=t(()=>(Ce++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ce),"generateId"),ut=t((e)=>{X.children=e,ze(e,X),ke=X.children},"setHierarchy"),ht=t((e)=>{let o=M.get(e);if(!o)return-1;if(o.columns)return o.columns;if(!o.children)return-1;return o.children.length},"getColumns"),gt=t(()=>[...M.values()],"getBlocksFlat"),dt=t(()=>ke||[],"getBlocks"),pt=t(()=>me,"getEdges"),ft=t((e)=>M.get(e),"getBlock"),bt=t((e)=>{M.set(e.id,e)},"setBlock"),St=t((e)=>{Le=e},"setDiagramId"),xt=t(()=>Le,"getDiagramId"),mt=t(()=>a,"getLogger"),Lt=t(function(){return Q},"getClasses"),kt={getConfig:t(()=>x().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},yt=kt,wt=t((e)=>{let{theme:o,bkgColorArray:u,borderColorArray:i}=e;if(!se(o,i))return"";let g=le(e.look),f=pe(u),r="";for(let d=0;d<Ze(e.THEME_COLOR_LIMIT,i);d++){let w=i[d%i.length],E=f?`fill: ${u[d%u.length]};`:"",k=`[data-look="${g}"][data-color-id="color-${d}"]`;r+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var n=this.next();if(n)return n;else return this.lex()},"lex"),begin:t(function(n){this.conditionStack.push(n)},"begin"),popState:t(function(){var n=this.conditionStack.length-1;if(n>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(n){if(n=this.conditionStack.length-1-Math.abs(n||0),n>=0)return this.conditionStack[n];else return"INITIAL"},"topState"),pushState:t(function(n){this.begin(n)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(n,h,m,D){var s=D;switch(m){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 B}();N.lexer=v;function z(){this.yy={}}return t(z,"Parser"),z.prototype=N,N.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=t((e)=>b.sanitizeText(e,l()),"sanitizeText"),at=t(function(e,o=""){let u=Q.get(e);if(!u)u={id:e,styles:[],textStyles:[]},Q.set(e,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=t(function(e,o=""){let u=M.get(e);if(o!==void 0&&o!==null)u.styles=o.split(ve)},"addStyle2Node"),ot=t(function(e,o){e.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=t((e,o)=>{let u=e.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 w=r.width??1;for(let E=0;E<w;E++){let k=Ne(r);k.id=k.id+"-"+E,M.set(k.id,k),i.push(k)}}else if(d===void 0)i.push(r)}}o.children=i},"populateBlockDatabase"),ke=[],X={id:"root",type:"composite",children:[],columns:-1},lt=t(()=>{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(e){switch(a.debug("typeStr2Type",e),e){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"}}t(Be,"typeStr2Type");function Re(e){switch(a.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}t(Re,"edgeTypeStr2Type");function Pe(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}t(Pe,"edgeStrToEdgeData");function Fe(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}t(Fe,"edgeStrToEdgeStartData");function Me(e){return e.includes("==")?"thick":"normal"}t(Me,"edgeStrToThickness");function Ke(e){if(e.includes(".-"))return"dotted";return"solid"}t(Ke,"edgeStrToPattern");var Ce=0,ct=t(()=>(Ce++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ce),"generateId"),ut=t((e)=>{X.children=e,ze(e,X),ke=X.children},"setHierarchy"),ht=t((e)=>{let o=M.get(e);if(!o)return-1;if(o.columns)return o.columns;if(!o.children)return-1;return o.children.length},"getColumns"),gt=t(()=>[...M.values()],"getBlocksFlat"),dt=t(()=>ke||[],"getBlocks"),pt=t(()=>me,"getEdges"),ft=t((e)=>M.get(e),"getBlock"),bt=t((e)=>{M.set(e.id,e)},"setBlock"),St=t((e)=>{Le=e},"setDiagramId"),xt=t(()=>Le,"getDiagramId"),mt=t(()=>a,"getLogger"),Lt=t(function(){return Q},"getClasses"),kt={getConfig:t(()=>x().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},yt=kt,wt=t((e)=>{let{theme:o,bkgColorArray:u,borderColorArray:i}=e;if(!le(o,i))return"";let g=ce(e.look),f=pe(u),r="";for(let d=0;d<Ze(e.THEME_COLOR_LIMIT,i);d++){let w=i[d%i.length],E=f?`fill: ${u[d%u.length]};`:"",k=`[data-look="${g}"][data-color-id="color-${d}"]`;r+=`
7
7
 
8
8
  ${k}.node rect.composite {
9
9
  stroke: ${w};
@@ -137,4 +137,4 @@ Expecting `+Z.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else he="Parse er
137
137
  fill: ${e.textColor};
138
138
  }
139
139
  ${qe()}
140
- `,"getStyles"),Dt=_t;function xe(e,o){if(e===0||!Number.isInteger(e))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(e<0)return{px:o,py:0};if(e===1)return{px:0,py:o};let u=o%e,i=Math.floor(o/e);return{px:u,py:i}}t(xe,"calculateBlockPosition");var Nt=t((e)=>{let o=0,u=0;for(let i of e.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 w=g/(i.widthInColumns??1);if(w>o)o=w;if(f>u)u=f}return{width:o,height:u}},"getMaxChildSize");function ee(e,o,u=0,i=0,g=8){if(a.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",u),!e?.size?.width)e.size={width:u,height:i,x:0,y:0};let f=0,r=0;if(e.children?.length>0){for(let y of e.children)ee(y,o,0,0,g);let d=Nt(e);f=d.width,r=d.height,a.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",f,r);for(let y of e.children)if(y.size)a.debug(`abc95 Setting size of children of ${e.id} id=${y.id} ${f} ${r} ${JSON.stringify(y.size)}`),y.size.width=f*(y.widthInColumns??1)+g*((y.widthInColumns??1)-1),y.size.height=r,y.size.x=0,y.size.y=0,a.debug(`abc95 updating size of ${e.id} children child:${y.id} maxWidth:${f} maxHeight:${r}`);for(let y of e.children)ee(y,o,f,r,g);let w=e.columns??-1,E=0;for(let y of e.children)E+=y.widthInColumns??1;let k=e.children.length;if(w>0&&w<E)k=w;let L=Math.ceil(E/k),_=k*(f+g)+g,T=L*(r+g)+g;if(_<u){a.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${u} siblingHeight ${i} width ${_}`),_=u,T=i;let y=(u-k*g-g)/k,I=(i-L*g-g)/L;a.debug("Size indata abc88",e.id,"childWidth",y,"maxWidth",f),a.debug("Size indata abc88",e.id,"childHeight",I,"maxHeight",r),a.debug("Size indata abc88 xSize",k,"padding",g);for(let N of e.children)if(N.size)N.size.width=y,N.size.height=I,N.size.x=0,N.size.y=0}if(a.debug(`abc95 (finale calc) ${e.id} xSize ${k} ySize ${L} columns ${w}${e.children.length} width=${Math.max(_,e.size?.width||0)}`),_<(e?.size?.width||0)){_=e?.size?.width||0;let y=w>0?Math.min(e.children.length,w):e.children.length;if(y>0){let I=(_-y*g-g)/y;a.debug("abc95 (growing to fit) width",e.id,_,e.size?.width,I);for(let N of e.children)if(N.size)N.size.width=I}}e.size={width:_,height:T,x:0,y:0}}a.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}t(ee,"setBlockSizes");function ye(e,o,u=8){a.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(a.debug("layoutBlocks columns abc95",e.id,"=>",i,e),e.children&&e.children.length>0){let g=e?.children[0]?.size?.width??0,f=e.children.length*g+(e.children.length-1)*u;a.debug("widthOfChildren 88",f,"posX");let r=new Map;{let L=0;for(let _ of e.children){if(!_.size)continue;let{py:T}=xe(i,L),y=r.get(T)??0;if(_.size.height>y)r.set(T,_.size.height);let I=_?.widthInColumns??1;if(i>0)I=Math.min(I,i-L%i);L+=I}}let d=new Map;{let L=0,_=[...r.keys()].sort((T,y)=>T-y);for(let T of _)d.set(T,L),L+=(r.get(T)??0)+u}let w=0;a.debug("abc91 block?.size?.x",e.id,e?.size?.x);let E=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-u,k=0;for(let L of e.children){let _=e;if(!L.size)continue;let{width:T,height:y}=L.size,{px:I,py:N}=xe(i,w);if(N!=k)k=N,E=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-u,a.debug("New row in layout for block",e.id," and child ",L.id,k);if(a.debug(`abc89 layout blocks (child) id: ${L.id} Pos: ${w} (px, py) ${I},${N} (${_?.size?.x},${_?.size?.y}) parent: ${_.id} width: ${T}${u}`),_.size){let z=T/2;L.size.x=E+u+z,a.debug(`abc91 layout blocks (calc) px, pyid:${L.id} startingPos=X${E} new startingPosX${L.size.x} ${z} padding=${u} width=${T} halfWidth=${z} => x:${L.size.x} y:${L.size.y} ${L.widthInColumns} (width * (child?.w || 1)) / 2 ${T*(L?.widthInColumns??1)/2}`),E=L.size.x+z;let B=d.get(N)??0,S=r.get(N)??y;L.size.y=_.size.y-_.size.height/2+B+S/2+u,a.debug(`abc88 layout blocks (calc) px, pyid:${L.id}startingPosX${E}${u}${z}=>x:${L.size.x}y:${L.size.y}${L.widthInColumns}(width * (child?.w || 1)) / 2${T*(L?.widthInColumns??1)/2}`)}if(L.children)ye(L,o,u);let v=L?.widthInColumns??1;if(i>0)v=Math.min(v,i-w%i);w+=v,a.debug("abc88 columnsPos",L,w)}}a.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}t(ye,"layoutBlocks");function we(e,{minX:o,minY:u,maxX:i,maxY:g}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:f,y:r,width:d,height:w}=e.size;if(f-d/2<o)o=f-d/2;if(r-w/2<u)u=r-w/2;if(f+d/2>i)i=f+d/2;if(r+w/2>g)g=r+w/2}if(e.children)for(let f of e.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}}t(we,"findBounds");function Ye(e){let o=e.getBlock("root");if(!o)return;let u=l()?.block?.padding??8;ee(o,e,0,0,u),ye(o,e,u),a.debug("getBlocks",JSON.stringify(o,null,2));let{minX:i,minY:g,maxX:f,maxY:r}=we(o),d=r-g,w=f-i;return{x:i,y:g,width:w,height:d}}t(Ye,"layout");function Ee(e,o,u=!1){let i=e,g="default";if((i?.classes?.length||0)>0)g=(i?.classes??[]).join(" ");g=g+" flowchart-label";let f=(i?.classes??[]).flatMap((y)=>o.getClasses().get(y)?.styles??[]),r=0,d="rect",w;switch(i.type){case"round":r=5,d="rect";break;case"composite":r=0,d="composite",w=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 E=ai(i?.styles??[]),k=i.label,L=i.size??{width:0,height:0,x:0,y:0},_=o.getDiagramId();return{labelStyle:E.labelStyle,shape:d,label:k,labelText:k,rx:r,ry:r,class:g,cssClasses:g,cssStyles:i?.styles??[],cssCompiledStyles:f,style:E.style,id:i.id,domId:_?`${_}-${i.id}`:i.id,isGroup:!1,directions:i.directions,width:L.width||void 0,height:L.height||void 0,wrappingWidth:L.width||Number.POSITIVE_INFINITY,x:L.x,y:L.y,positioned:u,intersect:void 0,padding:w??x()?.block?.padding??0,widthInColumns:i.widthInColumns??1,colorIndex:i.colorIndex,look:x().look}}t(Ee,"getNodeFromBlock");async function We(e,o,u){let i=Ee(o,u,!1);if(o.type==="group")return;let g=x(),f=await Tt(e,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()}t(We,"calculateBlockSize");async function Ve(e,o,u){let i=Ee(o,u,!0);if(u.getBlock(i.id).type!=="space"){let f=x(),r=await Tt(e,i,{config:f});if(i.colorIndex!==void 0)Xe(r,i.colorIndex,f.theme,f.themeVariables?.borderColorArray);o.intersect=i?.intersect,vt(i)}}t(Ve,"insertBlockPositioned");async function te(e,o,u,i){for(let g of o)if(await i(e,g,u),g.children)await te(e,g.children,u,i)}t(te,"performOperations");async function Ue(e,o,u){await te(e,o,u,We)}t(Ue,"calculateBlockSizes");async function He(e,o,u){await te(e,o,u,Ve)}t(He,"insertBlocks");async function je(e,o,u,i,g){let f=new re({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),w=i.getBlock(r.end);if(d?.size&&w?.size){let E=d.size,k=w.size,L=[{x:E.x,y:E.y},{x:E.x+(k.x-E.x)/2,y:E.y+(k.y-E.y)/2},{x:k.x,y:k.y}],_=g?`${g}-${r.id}`:r.id,T=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",y=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",I=`${T} ${y} flowchart-link LS-a1 LE-b1`;if(en(e,{...r,id:_,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:L,classes:I},{},"block",f.node(r.start),f.node(r.end),g),r.label)await Et(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:L,classes:I}),Yn({...r,x:L[1].x,y:L[1].y},{originalPath:L})}}}t(je,"insertEdges");var It=t(function(e,o){return o.db.getClasses()},"getClasses"),Ot=t(async function(e,o,u,i){let{securityLevel:g,block:f}=x(),r=i.db;r.setDiagramId(o);let d;if(g==="sandbox")d=p("#i"+o);let w=g==="sandbox"?p(d.nodes()[0].contentDocument.body):p("body"),E=g==="sandbox"?w.select(`[id="${o}"]`):p(`[id="${o}"]`);Ba(E,x()),Zn(E,["point","circle","cross"],i.type,o);let L=r.getBlocks(),_=r.getBlocksFlat(),T=r.getEdges(),y=E.insert("g").attr("class","block");await Ue(y,L,r);let I=Ye(r);await He(y,L,r),await je(y,T,_,r,o);let N=y.node()?.getBBox(),v=N&&Number.isFinite(N.width)&&Number.isFinite(N.height)?N:I;if(v){let z=Math.max(1,Math.round(0.125*(v.width/v.height))),B=v.height+z+10,S=v.width+10,{useMaxWidth:n}=f;F(E,B,S,!!n),a.debug("Here Bounds",I,v),E.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),Ct={draw:Ot,getClasses:It},ar={parser:rt,db:yt,renderer:Ct,styles:Dt};export{ar as diagram};
140
+ `,"getStyles"),Dt=_t;function xe(e,o){if(e===0||!Number.isInteger(e))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(e<0)return{px:o,py:0};if(e===1)return{px:0,py:o};let u=o%e,i=Math.floor(o/e);return{px:u,py:i}}t(xe,"calculateBlockPosition");var Nt=t((e)=>{let o=0,u=0;for(let i of e.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 w=g/(i.widthInColumns??1);if(w>o)o=w;if(f>u)u=f}return{width:o,height:u}},"getMaxChildSize");function ee(e,o,u=0,i=0,g=8){if(a.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",u),!e?.size?.width)e.size={width:u,height:i,x:0,y:0};let f=0,r=0;if(e.children?.length>0){for(let y of e.children)ee(y,o,0,0,g);let d=Nt(e);f=d.width,r=d.height,a.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",f,r);for(let y of e.children)if(y.size)a.debug(`abc95 Setting size of children of ${e.id} id=${y.id} ${f} ${r} ${JSON.stringify(y.size)}`),y.size.width=f*(y.widthInColumns??1)+g*((y.widthInColumns??1)-1),y.size.height=r,y.size.x=0,y.size.y=0,a.debug(`abc95 updating size of ${e.id} children child:${y.id} maxWidth:${f} maxHeight:${r}`);for(let y of e.children)ee(y,o,f,r,g);let w=e.columns??-1,E=0;for(let y of e.children)E+=y.widthInColumns??1;let k=e.children.length;if(w>0&&w<E)k=w;let L=Math.ceil(E/k),_=k*(f+g)+g,T=L*(r+g)+g;if(_<u){a.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${u} siblingHeight ${i} width ${_}`),_=u,T=i;let y=(u-k*g-g)/k,I=(i-L*g-g)/L;a.debug("Size indata abc88",e.id,"childWidth",y,"maxWidth",f),a.debug("Size indata abc88",e.id,"childHeight",I,"maxHeight",r),a.debug("Size indata abc88 xSize",k,"padding",g);for(let N of e.children)if(N.size)N.size.width=y,N.size.height=I,N.size.x=0,N.size.y=0}if(a.debug(`abc95 (finale calc) ${e.id} xSize ${k} ySize ${L} columns ${w}${e.children.length} width=${Math.max(_,e.size?.width||0)}`),_<(e?.size?.width||0)){_=e?.size?.width||0;let y=w>0?Math.min(e.children.length,w):e.children.length;if(y>0){let I=(_-y*g-g)/y;a.debug("abc95 (growing to fit) width",e.id,_,e.size?.width,I);for(let N of e.children)if(N.size)N.size.width=I}}e.size={width:_,height:T,x:0,y:0}}a.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}t(ee,"setBlockSizes");function ye(e,o,u=8){a.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(a.debug("layoutBlocks columns abc95",e.id,"=>",i,e),e.children&&e.children.length>0){let g=e?.children[0]?.size?.width??0,f=e.children.length*g+(e.children.length-1)*u;a.debug("widthOfChildren 88",f,"posX");let r=new Map;{let L=0;for(let _ of e.children){if(!_.size)continue;let{py:T}=xe(i,L),y=r.get(T)??0;if(_.size.height>y)r.set(T,_.size.height);let I=_?.widthInColumns??1;if(i>0)I=Math.min(I,i-L%i);L+=I}}let d=new Map;{let L=0,_=[...r.keys()].sort((T,y)=>T-y);for(let T of _)d.set(T,L),L+=(r.get(T)??0)+u}let w=0;a.debug("abc91 block?.size?.x",e.id,e?.size?.x);let E=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-u,k=0;for(let L of e.children){let _=e;if(!L.size)continue;let{width:T,height:y}=L.size,{px:I,py:N}=xe(i,w);if(N!=k)k=N,E=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-u,a.debug("New row in layout for block",e.id," and child ",L.id,k);if(a.debug(`abc89 layout blocks (child) id: ${L.id} Pos: ${w} (px, py) ${I},${N} (${_?.size?.x},${_?.size?.y}) parent: ${_.id} width: ${T}${u}`),_.size){let z=T/2;L.size.x=E+u+z,a.debug(`abc91 layout blocks (calc) px, pyid:${L.id} startingPos=X${E} new startingPosX${L.size.x} ${z} padding=${u} width=${T} halfWidth=${z} => x:${L.size.x} y:${L.size.y} ${L.widthInColumns} (width * (child?.w || 1)) / 2 ${T*(L?.widthInColumns??1)/2}`),E=L.size.x+z;let B=d.get(N)??0,S=r.get(N)??y;L.size.y=_.size.y-_.size.height/2+B+S/2+u,a.debug(`abc88 layout blocks (calc) px, pyid:${L.id}startingPosX${E}${u}${z}=>x:${L.size.x}y:${L.size.y}${L.widthInColumns}(width * (child?.w || 1)) / 2${T*(L?.widthInColumns??1)/2}`)}if(L.children)ye(L,o,u);let v=L?.widthInColumns??1;if(i>0)v=Math.min(v,i-w%i);w+=v,a.debug("abc88 columnsPos",L,w)}}a.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}t(ye,"layoutBlocks");function we(e,{minX:o,minY:u,maxX:i,maxY:g}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:f,y:r,width:d,height:w}=e.size;if(f-d/2<o)o=f-d/2;if(r-w/2<u)u=r-w/2;if(f+d/2>i)i=f+d/2;if(r+w/2>g)g=r+w/2}if(e.children)for(let f of e.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}}t(we,"findBounds");function Ye(e){let o=e.getBlock("root");if(!o)return;let u=l()?.block?.padding??8;ee(o,e,0,0,u),ye(o,e,u),a.debug("getBlocks",JSON.stringify(o,null,2));let{minX:i,minY:g,maxX:f,maxY:r}=we(o),d=r-g,w=f-i;return{x:i,y:g,width:w,height:d}}t(Ye,"layout");function Ee(e,o,u=!1){let i=e,g="default";if((i?.classes?.length||0)>0)g=(i?.classes??[]).join(" ");g=g+" flowchart-label";let f=(i?.classes??[]).flatMap((y)=>o.getClasses().get(y)?.styles??[]),r=0,d="rect",w;switch(i.type){case"round":r=5,d="rect";break;case"composite":r=0,d="composite",w=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 E=oi(i?.styles??[]),k=i.label,L=i.size??{width:0,height:0,x:0,y:0},_=o.getDiagramId();return{labelStyle:E.labelStyle,shape:d,label:k,labelText:k,rx:r,ry:r,class:g,cssClasses:g,cssStyles:i?.styles??[],cssCompiledStyles:f,style:E.style,id:i.id,domId:_?`${_}-${i.id}`:i.id,isGroup:!1,directions:i.directions,width:L.width||void 0,height:L.height||void 0,wrappingWidth:L.width||Number.POSITIVE_INFINITY,x:L.x,y:L.y,positioned:u,intersect:void 0,padding:w??x()?.block?.padding??0,widthInColumns:i.widthInColumns??1,colorIndex:i.colorIndex,look:x().look}}t(Ee,"getNodeFromBlock");async function We(e,o,u){let i=Ee(o,u,!1);if(o.type==="group")return;let g=x(),f=await Tt(e,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()}t(We,"calculateBlockSize");async function Ve(e,o,u){let i=Ee(o,u,!0);if(u.getBlock(i.id).type!=="space"){let f=x(),r=await Tt(e,i,{config:f});if(i.colorIndex!==void 0)Xe(r,i.colorIndex,f.theme,f.themeVariables?.borderColorArray);o.intersect=i?.intersect,vt(i)}}t(Ve,"insertBlockPositioned");async function te(e,o,u,i){for(let g of o)if(await i(e,g,u),g.children)await te(e,g.children,u,i)}t(te,"performOperations");async function Ue(e,o,u){await te(e,o,u,We)}t(Ue,"calculateBlockSizes");async function He(e,o,u){await te(e,o,u,Ve)}t(He,"insertBlocks");async function je(e,o,u,i,g){let f=new re({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),w=i.getBlock(r.end);if(d?.size&&w?.size){let E=d.size,k=w.size,L=[{x:E.x,y:E.y},{x:E.x+(k.x-E.x)/2,y:E.y+(k.y-E.y)/2},{x:k.x,y:k.y}],_=g?`${g}-${r.id}`:r.id,T=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",y=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",I=`${T} ${y} flowchart-link LS-a1 LE-b1`;if(en(e,{...r,id:_,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:L,classes:I},{},"block",f.node(r.start),f.node(r.end),g),r.label)await Et(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:L,classes:I}),Zn({...r,x:L[1].x,y:L[1].y},{originalPath:L})}}}t(je,"insertEdges");var It=t(function(e,o){return o.db.getClasses()},"getClasses"),Ot=t(async function(e,o,u,i){let{securityLevel:g,block:f}=x(),r=i.db;r.setDiagramId(o);let d;if(g==="sandbox")d=p("#i"+o);let w=g==="sandbox"?p(d.nodes()[0].contentDocument.body):p("body"),E=g==="sandbox"?w.select(`[id="${o}"]`):p(`[id="${o}"]`);za(E,x()),Xn(E,["point","circle","cross"],i.type,o);let L=r.getBlocks(),_=r.getBlocksFlat(),T=r.getEdges(),y=E.insert("g").attr("class","block");await Ue(y,L,r);let I=Ye(r);await He(y,L,r),await je(y,T,_,r,o);let N=y.node()?.getBBox(),v=N&&Number.isFinite(N.width)&&Number.isFinite(N.height)?N:I;if(v){let z=Math.max(1,Math.round(0.125*(v.width/v.height))),B=v.height+z+10,S=v.width+10,{useMaxWidth:n}=f;F(E,B,S,!!n),a.debug("Here Bounds",I,v),E.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),Ct={draw:Ot,getClasses:It},ar={parser:rt,db:yt,renderer:Ct,styles:Dt};export{ar as diagram};
@@ -1,2 +1,2 @@
1
- import{r,f,e,n,y,s,te,tn,K}from"./chunk-3k9h7a73.js";var u=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7",key:"lw07rv"}]],d=s("chart-spline",u);function ta(t){let i=y();i.useTheme();let[m,c]=r("preview"),o=t.streaming&&!t.rendered,l=!t.streaming&&!t.rendered&&Boolean(t.error),a=m==="code"||o;return n(i.Panel,{"aria-label":t.title,"data-render-pending":t.pending&&!l?"true":void 0,className:"group/graph relative my-4 font-sans not-italic first:mt-0 last:mb-0",children:[e("div",{role:"toolbar","aria-label":`${t.title}操作`,className:o?"absolute top-2 right-2 z-10 flex items-center":i.style("surface.toolbarFloating","absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-150 group-hover/graph:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-70"),children:o?n("span",{className:i.style("control.badge","gap-1.5 rounded-full px-2 py-0.5 text-[11px]"),children:[e(K,{className:"size-3 animate-spin"}),"生成",t.title]}):n(f,{children:[e("button",{type:"button","aria-label":a?"查看图表":"查看代码",title:a?"查看图表":"查看代码",onClick:()=>c(a?"preview":"code"),className:"flex size-6 items-center justify-center rounded-md text-dim hover:bg-raised hover:text-ink [&_svg]:size-3.5",children:a?e(d,{}):e(tn,{})}),e(i.CopyButton,{text:t.code,size:"icon-sm",label:"复制代码"})]})}),a&&e(i.Code,{code:t.code,lang:t.codeLang,className:"px-4 py-3"}),l&&!a&&n("div",{role:"alert",className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[e(te,{className:"size-5 text-warning"}),e("p",{className:"max-w-full text-xs break-words text-dim",children:t.error}),e("button",{type:"button",onClick:()=>c("code"),className:"text-xs text-accent-strong underline underline-offset-2",children:"查看代码"})]}),e("div",{hidden:a||l,children:t.children})]})}
2
- export{ta};
1
+ import{r,m,e,n,y,s,te,tn,K}from"./chunk-ve8gy05p.js";var g=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7",key:"lw07rv"}]],d=s("chart-spline",g);function ra(t){let i=y();i.useTheme();let[u,c]=r("preview"),o=t.streaming&&!t.rendered,l=!t.streaming&&!t.rendered&&Boolean(t.error),a=u==="code"||o;return n(i.Panel,{"aria-label":t.title,"data-render-pending":t.pending&&!l?"true":void 0,className:"group/graph relative my-4 font-sans not-italic first:mt-0 last:mb-0",children:[e("div",{role:"toolbar","aria-label":`${t.title}操作`,className:o?"absolute top-2 right-2 z-10 flex items-center":i.style("surface.toolbarFloating","absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-150 group-hover/graph:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-70"),children:o?n("span",{className:i.style("control.badge","gap-1.5 rounded-full px-2 py-0.5 text-[11px]"),children:[e(K,{className:"size-3 animate-spin"}),"生成",t.title]}):n(m,{children:[e("button",{type:"button","aria-label":a?"查看图表":"查看代码",title:a?"查看图表":"查看代码",onClick:()=>c(a?"preview":"code"),className:"flex size-6 items-center justify-center rounded-md text-dim hover:bg-raised hover:text-ink [&_svg]:size-3.5",children:a?e(d,{}):e(tn,{})}),e(i.CopyButton,{text:t.code,size:"icon-sm",label:"复制代码"})]})}),a&&e(i.Code,{code:t.code,lang:t.codeLang,className:"px-4 py-3"}),l&&!a&&n("div",{role:"alert",className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[e(te,{className:"size-5 text-warning"}),e("p",{className:"max-w-full text-xs break-words text-dim",children:t.error}),e("button",{type:"button",onClick:()=>c("code"),className:"text-xs text-accent-strong underline underline-offset-2",children:"查看代码"})]}),e("div",{hidden:a||l,children:t.children})]})}
2
+ export{ra};
@@ -0,0 +1 @@
1
+ import{xi}from"./chunk-qq6m2my8.js";export{xi as default};
@@ -1,10 +1,10 @@
1
- import{t,a,X,u,d,M,x,mo,O,l,ge,ye}from"./chunk-b5zf1hs3.js";import{he}from"./chunk-7v85yvb2.js";import{ue}from"./chunk-qdd3bx8q.js";var _e=new Uint8Array(16);function ee(){return crypto.getRandomValues(_e)}var S=[];for(let e=0;e<256;++e)S.push((e+256).toString(16).slice(1));function de(e,i=0){return(S[e[i+0]]+S[e[i+1]]+S[e[i+2]]+S[e[i+3]]+"-"+S[e[i+4]]+S[e[i+5]]+"-"+S[e[i+6]]+S[e[i+7]]+"-"+S[e[i+8]]+S[e[i+9]]+"-"+S[e[i+10]]+S[e[i+11]]+S[e[i+12]]+S[e[i+13]]+S[e[i+14]]+S[e[i+15]]).toLowerCase()}function Se(e,i,p){if(!i&&!e&&crypto.randomUUID)return crypto.randomUUID();return xe(e,i,p)}function xe(e,i,p){e=e||{};let h=e.random??e.rng?.()??ee();if(h.length<16)throw Error("Random bytes length must be >= 16");if(h[6]=h[6]&15|64,h[8]=h[8]&63|128,i){if(p=p||0,p<0||p+16>i.length)throw RangeError(`UUID byte range ${p}:${p+15} is out of buffer bounds`);for(let n=0;n<16;++n)i[p+n]=h[n];return i}return de(h)}var te=Se;var ne=function(){var e=t(function(C,o,r,c){for(r=r||{},c=C.length;c--;r[C[c]]=o);return r},"o"),i=[1,4],p=[1,13],h=[1,12],n=[1,15],f=[1,16],k=[1,20],E=[1,19],N=[6,7,8],A=[1,26],B=[1,24],P=[1,25],m=[6,7,11],V=[1,6,13,15,16,19,22],ie=[1,33],re=[1,34],F=[1,6,7,11,13,15,16,19,22],Y={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:t(function(o,r,c,g,b,s,G){var y=s.length-1;switch(b){case 6:case 7:return g;case 8:g.getLogger().trace("Stop NL ");break;case 9:g.getLogger().trace("Stop EOF ");break;case 11:g.getLogger().trace("Stop NL2 ");break;case 12:g.getLogger().trace("Stop EOF2 ");break;case 15:g.getLogger().info("Node: ",s[y].id),g.addNode(s[y-1].length,s[y].id,s[y].descr,s[y].type);break;case 16:g.getLogger().trace("Icon: ",s[y]),g.decorateNode({icon:s[y]});break;case 17:case 21:g.decorateNode({class:s[y]});break;case 18:g.getLogger().trace("SPACELIST");break;case 19:g.getLogger().trace("Node: ",s[y].id),g.addNode(0,s[y].id,s[y].descr,s[y].type);break;case 20:g.decorateNode({icon:s[y]});break;case 25:g.getLogger().trace("node found ..",s[y-2]),this.$={id:s[y-1],descr:s[y-1],type:g.getType(s[y-2],s[y])};break;case 26:this.$={id:s[y],descr:s[y],type:g.nodeType.DEFAULT};break;case 27:g.getLogger().trace("node found ..",s[y-3]),this.$={id:s[y-3],descr:s[y-1],type:g.getType(s[y-2],s[y])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:i},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:i},{6:p,7:[1,10],9:9,12:11,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},e(N,[2,3]),{1:[2,2]},e(N,[2,4]),e(N,[2,5]),{1:[2,6],6:p,12:21,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},{6:p,9:22,12:11,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},{6:A,7:B,10:23,11:P},e(m,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:k,22:E}),e(m,[2,18]),e(m,[2,19]),e(m,[2,20]),e(m,[2,21]),e(m,[2,23]),e(m,[2,24]),e(m,[2,26],{19:[1,30]}),{20:[1,31]},{6:A,7:B,10:32,11:P},{1:[2,7],6:p,12:21,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},e(V,[2,14],{7:ie,11:re}),e(F,[2,8]),e(F,[2,9]),e(F,[2,10]),e(m,[2,15]),e(m,[2,16]),e(m,[2,17]),{20:[1,35]},{21:[1,36]},e(V,[2,13],{7:ie,11:re}),e(F,[2,11]),e(F,[2,12]),{21:[1,37]},e(m,[2,25]),e(m,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(o,r){if(r.recoverable)this.trace(o);else{var c=Error(o);throw c.hash=r,c}},"parseError"),parse:t(function(o){var r=this,c=[0],g=[],b=[null],s=[],G=this.table,y="",H=0,se=0,oe=0,me=2,ae=1,ke=s.slice.call(arguments,1),_=Object.create(this.lexer),w={yy:{}};for(var q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,q))w.yy[q]=this.yy[q];if(_.setInput(o,w.yy),w.yy.lexer=_,w.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var J=_.yylloc;s.push(J);var be=_.options&&_.options.ranges;if(typeof w.yy.parseError==="function")this.parseError=w.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Ee(v){c.length=c.length-2*v,b.length=b.length-v,s.length=s.length-v}t(Ee,"popStack");function ce(){var v=g.pop()||_.lex()||ae;if(typeof v!=="number"){if(v instanceof Array)g=v,v=g.pop();v=r.symbols_[v]||v}return v}t(ce,"lex");var L,K,R,D,we,Q,U={},W,T,le,z;while(!0){if(R=c[c.length-1],this.defaultActions[R])D=this.defaultActions[R];else{if(L===null||typeof L>"u")L=ce();D=G[R]&&G[R][L]}if(typeof D>"u"||!D.length||!D[0]){var Z="";z=[];for(W in G[R])if(this.terminals_[W]&&W>me)z.push("'"+this.terminals_[W]+"'");if(_.showPosition)Z="Parse error on line "+(H+1)+`:
1
+ import{t,a,X,u,d,N,x,ho,O,l,ge,ye}from"./chunk-c6m4vfn5.js";import{he}from"./chunk-mkxeenph.js";import{ue}from"./chunk-b9jry5a3.js";var _e=new Uint8Array(16);function ee(){return crypto.getRandomValues(_e)}var S=[];for(let e=0;e<256;++e)S.push((e+256).toString(16).slice(1));function de(e,i=0){return(S[e[i+0]]+S[e[i+1]]+S[e[i+2]]+S[e[i+3]]+"-"+S[e[i+4]]+S[e[i+5]]+"-"+S[e[i+6]]+S[e[i+7]]+"-"+S[e[i+8]]+S[e[i+9]]+"-"+S[e[i+10]]+S[e[i+11]]+S[e[i+12]]+S[e[i+13]]+S[e[i+14]]+S[e[i+15]]).toLowerCase()}function Se(e,i,p){if(!i&&!e&&crypto.randomUUID)return crypto.randomUUID();return xe(e,i,p)}function xe(e,i,p){e=e||{};let h=e.random??e.rng?.()??ee();if(h.length<16)throw Error("Random bytes length must be >= 16");if(h[6]=h[6]&15|64,h[8]=h[8]&63|128,i){if(p=p||0,p<0||p+16>i.length)throw RangeError(`UUID byte range ${p}:${p+15} is out of buffer bounds`);for(let n=0;n<16;++n)i[p+n]=h[n];return i}return de(h)}var te=Se;var ne=function(){var e=t(function(w,o,r,c){for(r=r||{},c=w.length;c--;r[w[c]]=o);return r},"o"),i=[1,4],p=[1,13],h=[1,12],n=[1,15],f=[1,16],k=[1,20],E=[1,19],L=[6,7,8],U=[1,26],M=[1,24],P=[1,25],m=[6,7,11],V=[1,6,13,15,16,19,22],ie=[1,33],re=[1,34],F=[1,6,7,11,13,15,16,19,22],Y={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:t(function(o,r,c,g,b,s,G){var y=s.length-1;switch(b){case 6:case 7:return g;case 8:g.getLogger().trace("Stop NL ");break;case 9:g.getLogger().trace("Stop EOF ");break;case 11:g.getLogger().trace("Stop NL2 ");break;case 12:g.getLogger().trace("Stop EOF2 ");break;case 15:g.getLogger().info("Node: ",s[y].id),g.addNode(s[y-1].length,s[y].id,s[y].descr,s[y].type);break;case 16:g.getLogger().trace("Icon: ",s[y]),g.decorateNode({icon:s[y]});break;case 17:case 21:g.decorateNode({class:s[y]});break;case 18:g.getLogger().trace("SPACELIST");break;case 19:g.getLogger().trace("Node: ",s[y].id),g.addNode(0,s[y].id,s[y].descr,s[y].type);break;case 20:g.decorateNode({icon:s[y]});break;case 25:g.getLogger().trace("node found ..",s[y-2]),this.$={id:s[y-1],descr:s[y-1],type:g.getType(s[y-2],s[y])};break;case 26:this.$={id:s[y],descr:s[y],type:g.nodeType.DEFAULT};break;case 27:g.getLogger().trace("node found ..",s[y-3]),this.$={id:s[y-3],descr:s[y-1],type:g.getType(s[y-2],s[y])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:i},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:i},{6:p,7:[1,10],9:9,12:11,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},e(L,[2,3]),{1:[2,2]},e(L,[2,4]),e(L,[2,5]),{1:[2,6],6:p,12:21,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},{6:p,9:22,12:11,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},{6:U,7:M,10:23,11:P},e(m,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:k,22:E}),e(m,[2,18]),e(m,[2,19]),e(m,[2,20]),e(m,[2,21]),e(m,[2,23]),e(m,[2,24]),e(m,[2,26],{19:[1,30]}),{20:[1,31]},{6:U,7:M,10:32,11:P},{1:[2,7],6:p,12:21,13:h,14:14,15:n,16:f,17:17,18:18,19:k,22:E},e(V,[2,14],{7:ie,11:re}),e(F,[2,8]),e(F,[2,9]),e(F,[2,10]),e(m,[2,15]),e(m,[2,16]),e(m,[2,17]),{20:[1,35]},{21:[1,36]},e(V,[2,13],{7:ie,11:re}),e(F,[2,11]),e(F,[2,12]),{21:[1,37]},e(m,[2,25]),e(m,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(o,r){if(r.recoverable)this.trace(o);else{var c=Error(o);throw c.hash=r,c}},"parseError"),parse:t(function(o){var r=this,c=[0],g=[],b=[null],s=[],G=this.table,y="",H=0,se=0,oe=0,me=2,ae=1,ke=s.slice.call(arguments,1),_=Object.create(this.lexer),R={yy:{}};for(var q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,q))R.yy[q]=this.yy[q];if(_.setInput(o,R.yy),R.yy.lexer=_,R.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var J=_.yylloc;s.push(J);var be=_.options&&_.options.ranges;if(typeof R.yy.parseError==="function")this.parseError=R.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Ee(T){c.length=c.length-2*T,b.length=b.length-T,s.length=s.length-T}t(Ee,"popStack");function ce(){var T=g.pop()||_.lex()||ae;if(typeof T!=="number"){if(T instanceof Array)g=T,T=g.pop();T=r.symbols_[T]||T}return T}t(ce,"lex");var D,K,A,v,we,Q,B={},W,I,le,z;while(!0){if(A=c[c.length-1],this.defaultActions[A])v=this.defaultActions[A];else{if(D===null||typeof D>"u")D=ce();v=G[A]&&G[A][D]}if(typeof v>"u"||!v.length||!v[0]){var Z="";z=[];for(W in G[A])if(this.terminals_[W]&&W>me)z.push("'"+this.terminals_[W]+"'");if(_.showPosition)Z="Parse error on line "+(H+1)+`:
2
2
  `+_.showPosition()+`
3
- Expecting `+z.join(", ")+", got '"+(this.terminals_[L]||L)+"'";else Z="Parse error on line "+(H+1)+": Unexpected "+(L==ae?"end of input":"'"+(this.terminals_[L]||L)+"'");this.parseError(Z,{text:_.match,token:this.terminals_[L]||L,line:_.yylineno,loc:J,expected:z})}if(D[0]instanceof Array&&D.length>1)throw Error("Parse Error: multiple actions possible at state: "+R+", token: "+L);switch(D[0]){case 1:if(c.push(L),b.push(_.yytext),s.push(_.yylloc),c.push(D[1]),L=null,!K){if(se=_.yyleng,y=_.yytext,H=_.yylineno,J=_.yylloc,oe>0)oe--}else L=K,K=null;break;case 2:if(T=this.productions_[D[1]][1],U.$=b[b.length-T],U._$={first_line:s[s.length-(T||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(T||1)].first_column,last_column:s[s.length-1].last_column},be)U._$.range=[s[s.length-(T||1)].range[0],s[s.length-1].range[1]];if(Q=this.performAction.apply(U,[y,se,H,w.yy,D[1],b,s].concat(ke)),typeof Q<"u")return Q;if(T)c=c.slice(0,-1*T*2),b=b.slice(0,-1*T),s=s.slice(0,-1*T);c.push(this.productions_[D[1]][0]),b.push(U.$),s.push(U._$),le=G[c[c.length-2]][c[c.length-1]],c.push(le);break;case 3:return!0}}return!0},"parse")},fe=function(){var C={EOF:1,parseError:t(function(r,c){if(this.yy.parser)this.yy.parser.parseError(r,c);else throw Error(r)},"parseError"),setInput:t(function(o,r){if(this.yy=r||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:t(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var r=o.match(/(?:\r\n?|\n).*/g);if(r)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:t(function(o){var r=o.length,c=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var g=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),c.length-1)this.yylineno-=c.length-1;var b=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:c?(c.length===g.length?this.yylloc.first_column:0)+g[g.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges)this.yylloc.range=[b[0],b[0]+this.yyleng-r];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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_[D]||D)+"'";else Z="Parse error on line "+(H+1)+": Unexpected "+(D==ae?"end of input":"'"+(this.terminals_[D]||D)+"'");this.parseError(Z,{text:_.match,token:this.terminals_[D]||D,line:_.yylineno,loc:J,expected:z})}if(v[0]instanceof Array&&v.length>1)throw Error("Parse Error: multiple actions possible at state: "+A+", token: "+D);switch(v[0]){case 1:if(c.push(D),b.push(_.yytext),s.push(_.yylloc),c.push(v[1]),D=null,!K){if(se=_.yyleng,y=_.yytext,H=_.yylineno,J=_.yylloc,oe>0)oe--}else D=K,K=null;break;case 2:if(I=this.productions_[v[1]][1],B.$=b[b.length-I],B._$={first_line:s[s.length-(I||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(I||1)].first_column,last_column:s[s.length-1].last_column},be)B._$.range=[s[s.length-(I||1)].range[0],s[s.length-1].range[1]];if(Q=this.performAction.apply(B,[y,se,H,R.yy,v[1],b,s].concat(ke)),typeof Q<"u")return Q;if(I)c=c.slice(0,-1*I*2),b=b.slice(0,-1*I),s=s.slice(0,-1*I);c.push(this.productions_[v[1]][0]),b.push(B.$),s.push(B._$),le=G[c[c.length-2]][c[c.length-1]],c.push(le);break;case 3:return!0}}return!0},"parse")},fe=function(){var w={EOF:1,parseError:t(function(r,c){if(this.yy.parser)this.yy.parser.parseError(r,c);else throw Error(r)},"parseError"),setInput:t(function(o,r){if(this.yy=r||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:t(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var r=o.match(/(?:\r\n?|\n).*/g);if(r)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:t(function(o){var r=o.length,c=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var g=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),c.length-1)this.yylineno-=c.length-1;var b=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:c?(c.length===g.length?this.yylloc.first_column:0)+g[g.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges)this.yylloc.range=[b[0],b[0]+this.yyleng-r];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(o){this.unput(this.match.slice(o))},"less"),pastInput:t(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:t(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:t(function(){var o=this.pastInput(),r=Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
5
  `+r+"^"},"showPosition"),test_match:t(function(o,r){var c,g,b;if(this.options.backtrack_lexer){if(b={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)b.yylloc.range=this.yylloc.range.slice(0)}if(g=o[0].match(/(?:\r\n?|\n).*/g),g)this.yylineno+=g.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.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],c=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(c)return c;else if(this._backtrack){for(var s in b)this[s]=b[s];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var o,r,c,g;if(!this._more)this.yytext="",this.match="";var b=this._currentRules();for(var s=0;s<b.length;s++)if(c=this._input.match(this.rules[b[s]]),c&&(!r||c[0].length>r[0].length)){if(r=c,g=s,this.options.backtrack_lexer)if(o=this.test_match(c,b[s]),o!==!1)return o;else if(this._backtrack){r=!1;continue}else return!1;else if(!this.options.flex)break}if(r){if(o=this.test_match(r,b[g]),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:t(function(){var r=this.next();if(r)return r;else return this.lex()},"lex"),begin:t(function(r){this.conditionStack.push(r)},"begin"),popState:t(function(){var r=this.conditionStack.length-1;if(r>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(r){if(r=this.conditionStack.length-1-Math.abs(r||0),r>=0)return this.conditionStack[r];else return"INITIAL"},"topState"),pushState:t(function(r){this.begin(r)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(r,c,g,b){var s=b;switch(g){case 0:return r.getLogger().trace("Found comment",c.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:r.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return r.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:r.getLogger().trace("end icon"),this.popState();break;case 10:return r.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return r.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return r.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return r.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:r.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return r.getLogger().trace("description:",c.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),r.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),r.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),r.getLogger().trace("node end ...",c.yytext),"NODE_DEND";break;case 30:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),r.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),r.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return r.getLogger().trace("Long description:",c.yytext),20;break;case 36:return r.getLogger().trace("Long description:",c.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return C}();Y.lexer=fe;function j(){this.yy={}}return t(j,"Parser"),j.prototype=Y,Y.Parser=j,new j}();ne.parser=ne;var Ne=ne,pe=12,I={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Le=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=I,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{t(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let i=this.nodes.length-1;i>=0;i--)if(this.nodes[i].level<e)return this.nodes[i];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,i,p,h){a.info("addNode",e,i,p,h);let n=!1;if(this.nodes.length===0)this.baseLevel=e,e=0,n=!0;else if(this.baseLevel!==void 0)e=e-this.baseLevel,n=!1;let f=l(),k=f.mindmap?.padding??M.mindmap.padding;switch(h){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:k*=2;break}let E={id:this.count++,nodeId:O(i,f),level:e,descr:O(p,f),type:h,children:[],width:f.mindmap?.maxNodeWidth??M.mindmap.maxNodeWidth,padding:k,isRoot:n},N=this.getParent(e);if(N)N.children.push(E),this.nodes.push(E);else if(n)this.nodes.push(E);else throw Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,i){switch(a.debug("In get type",e,i),e){case"[":return this.nodeType.RECT;case"(":return i===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,i){this.elements[e]=i}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let i=l(),p=this.nodes[this.nodes.length-1];if(e.icon)p.icon=O(e.icon,i);if(e.class)p.class=O(e.class,i)}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,i,p=0,h=!1){if(e.level===0)e.section=void 0;else e.section=h?(p-1)%(pe-1):i;if(e.children)for(let[n,f]of e.children.entries()){let k=e.level===0?n%(pe-1):i;this.assignSections(f,k,p+1,h)}}flattenNodes(e,i){let p=l(),h=["mindmap-node"];if(e.isRoot===!0)h.push("section-root","section--1");else if(e.section!==void 0)h.push(`section-${e.section}`);if(e.class)h.push(e.class);let n=h.join(" "),f=t((E)=>{let A=(p.theme?.toLowerCase()??"").includes("redux");switch(E){case I.CIRCLE:return"mindmapCircle";case I.RECT:return"rect";case I.ROUNDED_RECT:return"rounded";case I.CLOUD:return"cloud";case I.BANG:return"bang";case I.HEXAGON:return"hexagon";case I.DEFAULT:return A?"rounded":"defaultMindmapNode";case I.NO_BORDER:default:return"rect"}},"getShapeFromType"),k={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:f(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:n,cssStyles:[],centerLabel:!0,look:p.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(i.push(k),e.children)for(let E of e.children)this.flattenNodes(E,i)}generateEdges(e,i){if(!e.children)return;let p=l();for(let h of e.children){let n="edge";if(h.section!==void 0)n+=` section-edge-${h.section}`;let f=e.level+1;n+=` edge-depth-${f}`;let k={id:`edge_${e.id}_${h.id}`,start:e.id.toString(),end:h.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:p.look,classes:n,depth:e.level,section:h.section};i.push(k),this.generateEdges(h,i)}}getData(){let e=this.getMindmap(),i=l(),h=mo().layout!==void 0,n=i;if(!h)n.layout="cose-bilkent";if(!e)return{nodes:[],edges:[],config:n};a.debug("getData: mindmapRoot",e,i),this.assignSections(e,void 0,0,i.mindmap?.colorBy==="depth");let f=[],k=[];this.flattenNodes(e,f),this.generateEdges(e,k),a.debug(`getData: processed ${f.length} nodes and ${k.length} edges`);let E=new Map;for(let N of f)E.set(N.id,{shape:N.shape,width:N.width,height:N.height,padding:N.padding});return{nodes:f,edges:k,config:n,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+te()}}getLogger(){return a}},De=t(async(e,i,p,h)=>{a.debug(`Rendering mindmap diagram
7
- `+e);let n=h.db,f=n.getData(),k=he(i,f.config.securityLevel);if(f.type=h.type,f.layoutAlgorithm=ye(f.config.layout,{fallback:"cose-bilkent"}),f.diagramId=i,!n.getMindmap())return;f.nodes.forEach((m)=>{if(m.shape==="rounded")m.radius=15,m.taper=15,m.stroke="none",m.width=0,m.padding=15;else if(m.shape==="circle")m.padding=10;else if(m.shape==="rect")m.width=0,m.padding=10;else if(m.shape==="hexagon")m.width=0,m.height=0}),await ge(f,k);let{themeVariables:N}=x(),{useGradient:A,gradientStart:B,gradientStop:P}=N;if(A&&B&&P){let m=k.attr("id"),V=k.append("defs").append("linearGradient").attr("id",`${m}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");V.append("stop").attr("offset","0%").attr("stop-color",B).attr("stop-opacity",1),V.append("stop").attr("offset","100%").attr("stop-color",P).attr("stop-opacity",1)}ue(k,f.config.mindmap?.padding??M.mindmap.padding,"mindmapDiagram",f.config.mindmap?.useMaxWidth??M.mindmap.useMaxWidth)},"draw"),ve={draw:De},Te=t((e)=>{let{theme:i,look:p}=e,h="";for(let n=0;n<e.THEME_COLOR_LIMIT;n++)if(e["lineColor"+n]=e["lineColor"+n]||e["cScaleInv"+n],X(e["lineColor"+n]))e["lineColor"+n]=u(e["lineColor"+n],20);else e["lineColor"+n]=d(e["lineColor"+n],20);for(let n=0;n<e.THEME_COLOR_LIMIT;n++){let f=""+(p==="neo"?Math.max(10-(n-1)*2,2):17-3*n),k=i==="redux"||i==="redux-dark"?e.nodeBorder:e["cScaleLabel"+(i==="neutral"?1:n)];h+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var r=this.next();if(r)return r;else return this.lex()},"lex"),begin:t(function(r){this.conditionStack.push(r)},"begin"),popState:t(function(){var r=this.conditionStack.length-1;if(r>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(r){if(r=this.conditionStack.length-1-Math.abs(r||0),r>=0)return this.conditionStack[r];else return"INITIAL"},"topState"),pushState:t(function(r){this.begin(r)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(r,c,g,b){var s=b;switch(g){case 0:return r.getLogger().trace("Found comment",c.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:r.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return r.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:r.getLogger().trace("end icon"),this.popState();break;case 10:return r.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return r.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return r.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return r.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:r.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return r.getLogger().trace("description:",c.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),r.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),r.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),r.getLogger().trace("node end ...",c.yytext),"NODE_DEND";break;case 30:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),r.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),r.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),r.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return r.getLogger().trace("Long description:",c.yytext),20;break;case 36:return r.getLogger().trace("Long description:",c.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return w}();Y.lexer=fe;function j(){this.yy={}}return t(j,"Parser"),j.prototype=Y,Y.Parser=j,new j}();ne.parser=ne;var Ne=ne,pe=12,C={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Le=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=C,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{t(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let i=this.nodes.length-1;i>=0;i--)if(this.nodes[i].level<e)return this.nodes[i];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,i,p,h){a.info("addNode",e,i,p,h);let n=!1;if(this.nodes.length===0)this.baseLevel=e,e=0,n=!0;else if(this.baseLevel!==void 0)e=e-this.baseLevel,n=!1;let f=l(),k=f.mindmap?.padding??N.mindmap.padding;switch(h){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:k*=2;break}let E={id:this.count++,nodeId:O(i,f),level:e,descr:O(p,f),type:h,children:[],width:f.mindmap?.maxNodeWidth??N.mindmap.maxNodeWidth,padding:k,isRoot:n},L=this.getParent(e);if(L)L.children.push(E),this.nodes.push(E);else if(n)this.nodes.push(E);else throw Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,i){switch(a.debug("In get type",e,i),e){case"[":return this.nodeType.RECT;case"(":return i===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,i){this.elements[e]=i}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let i=l(),p=this.nodes[this.nodes.length-1];if(e.icon)p.icon=O(e.icon,i);if(e.class)p.class=O(e.class,i)}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,i,p=0,h=!1){if(e.level===0)e.section=void 0;else e.section=h?(p-1)%(pe-1):i;if(e.children)for(let[n,f]of e.children.entries()){let k=e.level===0?n%(pe-1):i;this.assignSections(f,k,p+1,h)}}flattenNodes(e,i){let p=l(),h=["mindmap-node"];if(e.isRoot===!0)h.push("section-root","section--1");else if(e.section!==void 0)h.push(`section-${e.section}`);if(e.class)h.push(e.class);let n=h.join(" "),f=t((E)=>{let U=(p.theme?.toLowerCase()??"").includes("redux");switch(E){case C.CIRCLE:return"mindmapCircle";case C.RECT:return"rect";case C.ROUNDED_RECT:return"rounded";case C.CLOUD:return"cloud";case C.BANG:return"bang";case C.HEXAGON:return"hexagon";case C.DEFAULT:return U?"rounded":"defaultMindmapNode";case C.NO_BORDER:default:return"rect"}},"getShapeFromType"),k={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:f(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:n,cssStyles:[],centerLabel:!0,look:p.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(i.push(k),e.children)for(let E of e.children)this.flattenNodes(E,i)}generateEdges(e,i){if(!e.children)return;let p=l();for(let h of e.children){let n="edge";if(h.section!==void 0)n+=` section-edge-${h.section}`;let f=e.level+1;n+=` edge-depth-${f}`;let k={id:`edge_${e.id}_${h.id}`,start:e.id.toString(),end:h.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:p.look,classes:n,depth:e.level,section:h.section};i.push(k),this.generateEdges(h,i)}}getData(){let e=this.getMindmap(),i=l(),h=ho().layout!==void 0,n=i;if(!h)n.layout="cose-bilkent";if(!e)return{nodes:[],edges:[],config:n};a.debug("getData: mindmapRoot",e,i),this.assignSections(e,void 0,0,i.mindmap?.colorBy==="depth");let f=[],k=[];this.flattenNodes(e,f),this.generateEdges(e,k),a.debug(`getData: processed ${f.length} nodes and ${k.length} edges`);let E=new Map;for(let L of f)E.set(L.id,{shape:L.shape,width:L.width,height:L.height,padding:L.padding});return{nodes:f,edges:k,config:n,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+te()}}getLogger(){return a}},De=t(async(e,i,p,h)=>{a.debug(`Rendering mindmap diagram
7
+ `+e);let n=h.db,f=n.getData(),k=he(i,f.config.securityLevel);if(f.type=h.type,f.layoutAlgorithm=ye(f.config.layout,{fallback:"cose-bilkent"}),f.diagramId=i,!n.getMindmap())return;f.nodes.forEach((m)=>{if(m.shape==="rounded")m.radius=15,m.taper=15,m.stroke="none",m.width=0,m.padding=15;else if(m.shape==="circle")m.padding=10;else if(m.shape==="rect")m.width=0,m.padding=10;else if(m.shape==="hexagon")m.width=0,m.height=0}),await ge(f,k);let{themeVariables:L}=x(),{useGradient:U,gradientStart:M,gradientStop:P}=L;if(U&&M&&P){let m=k.attr("id"),V=k.append("defs").append("linearGradient").attr("id",`${m}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");V.append("stop").attr("offset","0%").attr("stop-color",M).attr("stop-opacity",1),V.append("stop").attr("offset","100%").attr("stop-color",P).attr("stop-opacity",1)}ue(k,f.config.mindmap?.padding??N.mindmap.padding,"mindmapDiagram",f.config.mindmap?.useMaxWidth??N.mindmap.useMaxWidth)},"draw"),ve={draw:De},Te=t((e)=>{let{theme:i,look:p}=e,h="";for(let n=0;n<e.THEME_COLOR_LIMIT;n++)if(e["lineColor"+n]=e["lineColor"+n]||e["cScaleInv"+n],X(e["lineColor"+n]))e["lineColor"+n]=u(e["lineColor"+n],20);else e["lineColor"+n]=d(e["lineColor"+n],20);for(let n=0;n<e.THEME_COLOR_LIMIT;n++){let f=""+(p==="neo"?Math.max(10-(n-1)*2,2):17-3*n),k=i==="redux"||i==="redux-dark"?e.nodeBorder:e["cScaleLabel"+(i==="neutral"?1:n)];h+=`
8
8
  .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
9
9
  fill: ${e["cScale"+n]};
10
10
  }
@@ -0,0 +1 @@
1
+ import{ao,Do,io,No,Mo,oo}from"./chunk-5ym5ffd5.js";import"./chunk-wpxtkxjt.js";import"./chunk-p7pa02k9.js";import"./chunk-c6m4vfn5.js";export{Do as applyDagreLayoutResult,ao as getEdgesToRender,No as measureDagreLayout,io as prepareLayoutForDagre,oo as render,Mo as runDagreLayoutCore};
@@ -1,2 +1,2 @@
1
- import{t,a,F,V}from"./chunk-b5zf1hs3.js";import{Q}from"./chunk-n9v14vyd.js";var i={parse:t(async(r)=>{let e=await Q("info",r);a.debug(e)},"parse")},s={version:"12.2.0"},p=t(()=>s.version,"getVersion"),g={getVersion:p},m=t((r,e,n)=>{a.debug(`rendering info diagram
1
+ import{t,a,F,V}from"./chunk-c6m4vfn5.js";import{J}from"./chunk-a9er7a7c.js";var i={parse:t(async(r)=>{let e=await J("info",r);a.debug(e)},"parse")},s={version:"12.2.0"},p=t(()=>s.version,"getVersion"),g={getVersion:p},m=t((r,e,n)=>{a.debug(`rendering info diagram
2
2
  `+r);let o=V(e);F(o,100,400,!0),o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),v={draw:m},y={parser:i,db:g,renderer:v};export{y as diagram};
@@ -0,0 +1 @@
1
+ import{wi}from"./chunk-jccz14ye.js";export{wi as default};
@@ -0,0 +1 @@
1
+ import{o,i,r,it,m,e,n,y,Mr,s,K,pn,ot,ie,tr,Z}from"./chunk-ve8gy05p.js";var ke=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],L=s("at-sign",ke);var Ce=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],pe=s("file-code-2",Ce);var we=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],ue=s("maximize-2",we);var Me=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],te=s("notebook-pen",Me);var Ie=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],xe=s("user",Ie);var w={approve:{label:"通过",text:"text-success",ring:"ring-success/80",soft:"bg-success/12 text-success"},reject:{label:"反对",text:"text-danger",ring:"ring-danger/80",soft:"bg-danger/12 text-danger"},abstain:{label:"弃权",text:"text-dim",ring:"ring-line-strong",soft:"bg-raised text-dim"},pending:{label:"未表态",text:"text-faint",ring:"ring-line",soft:"bg-raised text-faint"}},ze={thinking:"思考中",reading:"查阅中",speaking:"发言中",idle:"等待中",error:"出错",aborted:"已中止"},F={success:"text-success",warning:"text-warning",danger:"text-danger",neutral:"text-faint"},ne={success:"bg-success",warning:"bg-warning",danger:"bg-danger",neutral:"bg-faint"};function V(t){return t==="thinking"||t==="reading"||t==="speaking"}function W(t){let u=V(t.status);return{busy:u,text:u&&t.activeTool?t.activeTool:ze[t.status]}}function se(t){let u=t.members.filter((b)=>b.verdict==="approve").length,f=t.members.filter((b)=>b.verdict==="reject").length;if(t.state==="running"){if(t.phase==="research")return{tone:"warning",label:"调研中"};if(t.phase==="opening")return{tone:"warning",label:"开场表态"};return{tone:"warning",label:"群聊交流"}}if(t.state==="consensus"){if(u===t.members.length)return{tone:"success",label:"全票通过"};if(f===t.members.length)return{tone:"danger",label:"全票反对"};if(f>u)return{tone:"danger",label:"共识:反对"};return{tone:"success",label:"共识:通过"}}if(t.state==="diverged")return{tone:"warning",label:"存在分歧"};if(t.state==="error")return{tone:"danger",label:"失败"};return{tone:"neutral",label:"已中止"}}function G(t){let u=Math.max(1,Math.round(t/1000));if(u<60)return`${u}s`;return`${Math.floor(u/60)}m ${String(u%60).padStart(2,"0")}s`}var De={research:"调研",opening:"开场表态",discussion:"群聊交流"};function J(t){let{cn:u}=y(),{room:f}=t,b=se(f),g=f.state==="running",v=f.research?["research","opening","discussion"]:["opening","discussion"],a=g?v.indexOf(f.phase==="closed"?"discussion":f.phase??"discussion"):-1,h=[...v.map((d,p)=>({key:d,label:De[d],done:!g||p<a,active:p===a})),{key:"closed",label:g?"结论":b.label,done:!g,active:!1}];return e("ol",{className:u("flex min-w-0 gap-1",t.className),children:h.map((d,p)=>{let c=p===h.length-1&&!g;return n("li",{className:"min-w-0 flex-1",children:[e("span",{className:u("block h-[3px] rounded-full transition-colors duration-300",c?ne[b.tone]:d.active?"bg-accent animate-pulse":d.done?"bg-line-strong":"bg-line/60")}),e("span",{className:u("mt-1.5 block truncate text-[11px]",c?u("font-medium",F[b.tone]):d.active?"font-medium text-ink":d.done?"text-dim":"text-faint"),children:d.label})]},d.key)})})}function ge(t){let{Collapsible:u,CollapsibleContent:f,Composer:b,Markdown:g,ModelIcon:v,ScrollArea:a,SessionView:h,cn:d,confirm:p}=y(),{room:c,onClose:C}=t,[M,x]=r(!1),[X,D]=r(""),[R,H]=r(!1),[_,E]=r(),[S,B]=r(!1),[N,I]=r(!0),[T,z]=r(),ae=i(!1);ae.current=T!==void 0;let[U,Y]=r(),[oe,A]=r(!1),re=i(!1);re.current=U!==void 0;let le=(l)=>{A(!1),Y(l)},ce=i(null),Q=i(null),P=c.state==="running",j=se(c),be=new Map(c.members.map((l)=>[l.id,l]));o(()=>{let l=(de)=>{if(de.key!=="Escape"||de.defaultPrevented||ae.current)return;if(re.current)A(!0);else x(!0)},k=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",l),()=>{window.removeEventListener("keydown",l),document.body.style.overflow=k}},[]);let me=c.messages.length;o(()=>{let l=Q.current;if(!l||!N||me===0)return;l.scrollTo({top:l.scrollHeight,behavior:"smooth"})},[me,N]);let ve=async(l)=>{await t.onPost(l),I(!0)},he=async()=>{if(R)return;if(!await p({title:"中止理事会?",description:"所有成员会立即停止,已有发言保留。",action:"中止",danger:!0}))return;H(!0),E(void 0);try{await t.onAbort()}catch(k){E(k instanceof Error?k.message:"中止理事会失败")}finally{H(!1)}},ee=(l)=>{Y(void 0),D((k)=>k.includes(`@${l}`)?k:`${k?`${k.trimEnd()} `:""}@${l} `),requestAnimationFrame(()=>ce.current?.focus())},Ne=c.members.filter((l)=>l.verdict==="approve").length,ye=c.members.filter((l)=>l.verdict==="reject").length,q=c.members.find((l)=>l.id===T),O=c.members.find((l)=>l.id===U);return it(n("div",{role:"dialog","aria-modal":"true","aria-label":`理事会:${c.topic}`,onAnimationEnd:(l)=>{if(M&&l.target===l.currentTarget)C()},className:d("fixed inset-0 z-50 flex flex-col bg-bg pt-[env(safe-area-inset-top)] text-ink",M?"pointer-events-none animate-dialog-out":"animate-dialog-in"),children:[n(u,{open:S,onOpenChange:B,className:"shrink-0 border-b border-line px-4 pt-3 pb-3 sm:px-6",children:[n("div",{className:"flex items-start gap-3",children:[n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-3 text-[11px] text-faint",children:[e("span",{className:"font-medium tracking-[0.2em] text-dim",children:"COUNCIL"}),e("span",{className:"tabular-nums",children:G(t.elapsedMs)}),n("span",{className:"tabular-nums",children:[c.messages.length," 条发言"]})]}),n("button",{type:"button","aria-expanded":S,onClick:()=>B((l)=>!l),className:"mt-0.5 flex max-w-full cursor-pointer items-start gap-1.5 text-left md:items-center",children:[e("h2",{className:"line-clamp-2 text-[15px] leading-snug font-semibold md:truncate md:text-lg",children:c.topic}),e(ie,{className:d("mt-0.5 size-4 shrink-0 text-faint transition-transform duration-300 ease-out-quint md:mt-0",!S&&"-rotate-90")})]})]}),n("div",{className:"flex shrink-0 items-center gap-1",children:[n("span",{className:d("inline-flex items-center gap-1.5 rounded-full border border-line px-2.5 py-1 text-xs font-medium",F[j.tone]),children:[e("span",{className:d("size-1.5 rounded-full",ne[j.tone],P&&"animate-pulse")}),j.label]}),e("button",{type:"button","aria-label":"关闭理事会页面",title:"关闭(Esc)",onClick:()=>x(!0),className:"ml-1 inline-flex size-10 -mr-2 cursor-pointer items-center justify-center rounded-full text-faint transition-colors hover:bg-raised hover:text-ink md:size-8 md:mr-0",children:e(Z,{className:"size-4"})})]})]}),e(f,{children:e("div",{className:"mt-2 max-h-[40dvh] overflow-y-auto overscroll-contain rounded-xl bg-panel px-3.5 py-2.5 text-[13px] leading-relaxed text-dim md:max-h-48",children:e(g,{text:c.brief})})}),e(J,{room:c,className:"mt-3"})]}),n("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row",children:[e("div",{className:"flex shrink-0 gap-2 overflow-x-auto overscroll-x-contain border-b border-line px-4 py-2.5 [scrollbar-width:none] md:hidden",children:c.members.map((l)=>e(Se,{member:l,onSelect:()=>z(l.id)},l.id))}),n("aside",{className:"hidden w-72 shrink-0 flex-col gap-2 overflow-y-auto border-r border-line p-4 md:flex",children:[n("div",{className:"flex items-center justify-between text-[11px] text-faint",children:[e("span",{className:"font-medium tracking-wide",children:"席位"}),n("span",{className:"tabular-nums",children:[e("span",{className:"text-success",children:Ne})," / ",e("span",{className:"text-danger",children:ye})," /"," ",c.members.length]})]}),c.members.map((l)=>e(Re,{member:l,viewing:l.id===U,onMention:()=>ee(l.name),onOpen:()=>l.id===U?A(!0):le(l.id)},l.id))]}),O&&n("main",{onAnimationEnd:(l)=>{if(!oe||l.target!==l.currentTarget)return;A(!1),Y(void 0)},className:d("flex min-h-0 min-w-0 flex-1 flex-col",oe?"pointer-events-none animate-overlay-out":"animate-fade"),children:[n("div",{className:"flex shrink-0 items-center gap-2 border-b border-line px-3 py-2 sm:px-4",children:[n("button",{type:"button",onClick:()=>A(!0),className:"inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-lg px-2 text-[13px] text-dim transition-colors hover:bg-raised hover:text-ink",children:[e(pn,{className:"size-4"}),"群聊"]}),e("span",{className:"text-line-strong",children:"/"}),n("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-[13px] font-medium",children:[e(v,{modelID:O.model,className:"size-4 shrink-0",size:16}),n("span",{className:"truncate",children:[O.name," 的推理过程"]})]}),e("button",{type:"button","aria-label":"在完整页面打开",title:"在完整页面打开",onClick:()=>t.onOpenMember(O.childSessionID),className:"inline-flex size-8 cursor-pointer items-center justify-center rounded-lg text-faint transition-colors hover:bg-raised hover:text-ink",children:e(ot,{className:"size-4"})})]}),e(h,{sessionID:O.childSessionID},O.childSessionID)]}),n("main",{className:d("min-h-0 min-w-0 flex-1 flex-col animate-fade",O?"hidden":"flex"),children:[e(a,{viewportRef:Q,onScrollCapture:(l)=>{let k=Q.current;if(!k||l.target!==k)return;I(k.scrollHeight-k.scrollTop-k.clientHeight<80)},children:n("div",{className:"mx-auto w-full max-w-3xl px-4 py-4 sm:px-6 md:py-5",children:[c.messages.length===0?n("div",{className:"flex flex-col items-center justify-center gap-3 py-24 text-center text-faint",children:[P?e(K,{className:"size-5 animate-spin"}):null,e("p",{className:"text-sm",children:P?c.phase==="research"?"成员正在各自调研,笔记不会进入群聊":"成员正在独立准备开场观点,彼此不可见":"这场理事会没有产生发言"})]}):e("ol",{className:"space-y-5",children:c.messages.map((l)=>e(Te,{message:l,membersByID:be,onMention:()=>ee(l.senderName)},l.floor))}),c.summary&&!P&&n("section",{className:"mt-8 rounded-2xl border border-line bg-panel px-4 py-3",children:[n("h3",{className:d("text-xs font-semibold",F[j.tone]),children:["结论:",j.label]}),e("div",{className:"mt-1.5 text-[13px] leading-relaxed text-dim",children:e(g,{text:c.summary})})]})]})}),e("div",{className:"shrink-0 px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] sm:px-6 md:pb-4",children:n("div",{className:"mx-auto w-full max-w-3xl",children:[_&&e("p",{role:"status",className:"px-1 pb-2 text-[13px] text-danger",children:_}),e(b,{draftKey:`council:${c.roomID}`,placeholder:P?"插话,@ 某位成员会点名要求其回应":"理事会已结束,插话会重新唤醒成员",busy:P,allowAttachments:!1,text:X,onTextChange:D,inputRef:ce,onSend:ve,onAbort:()=>void he()})]})})]})]}),q&&e(Oe,{member:q,onClose:()=>z(void 0),onMention:()=>{z(void 0),ee(q.name)},onOpen:()=>{z(void 0),le(q.id)}})]}),document.body)}function Se(t){let{ModelIcon:u,cn:f}=y(),{member:b}=t,g=w[b.verdict]??w.pending,{busy:v}=W(b);return n("button",{type:"button",onClick:t.onSelect,"aria-label":`${b.name},${g.label},查看详情`,className:"flex h-11 max-w-[11rem] shrink-0 cursor-pointer items-center gap-2 rounded-full border border-line bg-panel/60 pr-3.5 pl-1.5 active:bg-raised",children:[n("span",{className:f("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",g.ring),children:[e(u,{modelID:b.model,className:"size-4",size:16}),v&&e(K,{className:"absolute -right-1 -bottom-1 size-3.5 animate-spin rounded-full bg-bg text-accent"})]}),n("span",{className:"min-w-0 text-left leading-tight",children:[e("span",{className:"block truncate text-[13px] font-medium",children:b.name}),e("span",{className:f("block text-[11px]",g.text),children:g.label})]})]})}function Oe(t){let{Button:u,Dialog:f,Markdown:b,ModelIcon:g,cn:v}=y(),{member:a}=t,h=w[a.verdict]??w.pending,d=W(a);return e(f,{open:!0,onOpenChange:(p)=>!p&&t.onClose(),title:n("span",{className:"flex min-w-0 items-center gap-2.5",children:[e("span",{className:v("flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",h.ring),children:e(g,{modelID:a.model,className:"size-4",size:16})}),e("span",{className:"min-w-0 truncate",children:a.name}),e("span",{className:v("shrink-0 rounded px-1.5 py-px text-[11px] font-medium",h.soft),children:h.label})]}),description:a.model,footer:n(m,{children:[n(u,{variant:"secondary",onClick:t.onMention,children:[e(L,{className:"size-4"}),"点名"]}),n(u,{variant:"secondary",onClick:t.onOpen,children:[e(ot,{className:"size-4"}),"查看推理"]})]}),children:n("div",{className:"space-y-3 pb-1",children:[n("div",{className:"flex items-center gap-3 text-[13px]",children:[n("span",{className:v("flex min-w-0 flex-1 items-center gap-1.5",d.busy?"text-accent":"text-dim"),children:[d.busy&&e(K,{className:"size-3.5 shrink-0 animate-spin"}),e("span",{className:"truncate",children:d.text})]}),n("span",{className:"shrink-0 text-faint tabular-nums",children:["发言 ",a.turns??0," 次"]})]}),a.notes?n("section",{children:[n("h3",{className:"mb-1.5 flex items-center gap-1.5 text-xs font-medium text-faint",children:[e(te,{className:"size-3.5"}),"调研笔记"]}),e("div",{className:"rounded-xl bg-bg/60 px-3.5 py-2.5 text-[13px] leading-relaxed text-dim",children:e(b,{text:a.notes})})]}):e("p",{className:"text-[13px] text-faint",children:"没有调研笔记"})]})})}function Re(t){let{Collapsible:u,CollapsibleContent:f,Markdown:b,ModelIcon:g,cn:v}=y(),{member:a}=t,[h,d]=r(!1),p=w[a.verdict]??w.pending,{busy:c,text:C}=W(a);return n(u,{open:h,onOpenChange:d,className:v("relative shrink-0 rounded-xl border p-2.5 transition-colors",t.viewing?"border-line-strong bg-raised/60":"border-line bg-panel/60 hover:bg-raised/40"),children:[e("button",{type:"button","aria-label":t.viewing?"返回群聊":`查看 ${a.name} 的推理过程`,"aria-pressed":t.viewing,title:t.viewing?"返回群聊":"查看推理与工具调用",onClick:t.onOpen,className:"absolute inset-0 cursor-pointer rounded-xl"}),n("div",{className:"pointer-events-none relative flex items-center gap-2.5",children:[e("span",{className:v("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-raised ring-2",p.ring),children:e(g,{modelID:a.model,className:"size-4",size:16})}),n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"truncate text-[13px] font-medium",title:a.model,children:a.name}),e("span",{className:v("shrink-0 rounded px-1 text-[10.5px] font-medium",p.soft),children:p.label})]}),n("div",{className:v("flex min-w-0 items-center gap-1 text-[11px]",c?"text-accent":"text-faint"),children:[c&&e(K,{className:"size-3 shrink-0 animate-spin"}),e("span",{className:"truncate",children:C})]})]})]}),n("div",{className:"pointer-events-none relative mt-2 flex items-center gap-1 text-[11px] text-faint",children:[n("span",{className:"tabular-nums",children:["发言 ",a.turns??0," 次"]}),e("span",{className:"ml-auto"}),a.notes&&n("button",{type:"button","aria-expanded":h,onClick:()=>d((M)=>!M),className:v("pointer-events-auto inline-flex cursor-pointer items-center gap-1 rounded px-1.5 py-0.5 hover:bg-raised hover:text-ink",h&&"text-ink"),children:[e(te,{className:"size-3"}),"笔记"]}),e("button",{type:"button","aria-label":`@ ${a.name}`,title:`@ ${a.name}`,onClick:t.onMention,className:"pointer-events-auto inline-flex cursor-pointer items-center rounded p-1 hover:bg-raised hover:text-ink",children:e(L,{className:"size-3"})})]}),a.notes&&e(f,{children:e("div",{className:"relative mt-2 max-h-56 overflow-y-auto rounded-lg bg-bg/60 px-2.5 py-2 text-xs leading-relaxed text-dim",children:e(b,{text:a.notes})})})]})}function Te(t){let{Code:u,Collapsible:f,CollapsibleContent:b,Markdown:g,cn:v}=y(),{message:a}=t,[h,d]=r(!1),p=a.senderID==="user"||a.senderID==="host",c=a.verdict&&a.verdict!=="pending"?w[a.verdict]:void 0,C=a.evidences??[],M=(a.mentions??[]).map((x)=>t.membersByID.get(x)).filter((x)=>x!==void 0);return n("li",{id:`council-floor-${a.floor}`,className:"group flex gap-3 animate-fade",children:[e(fe,{message:a,isHuman:p,className:"mt-0.5 hidden size-8 md:flex"}),n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs",children:[e(fe,{message:a,isHuman:p,className:"flex size-6 md:hidden"}),e("span",{className:"font-semibold text-ink",title:a.senderModel,children:a.senderName}),n("a",{href:`#council-floor-${a.floor}`,className:"font-mono text-[11px] text-faint hover:text-dim",onClick:(x)=>x.preventDefault(),children:["#",a.floor]}),c&&e("span",{className:v("rounded px-1.5 py-px text-[10.5px] font-medium",c.soft),children:c.label}),!p&&n("button",{type:"button",onClick:t.onMention,className:"ml-auto inline-flex cursor-pointer items-center gap-1 rounded-md px-2 py-1 text-[11px] text-faint transition-opacity hover:bg-raised hover:text-ink focus-visible:opacity-100 md:px-1.5 md:py-0.5 md:opacity-0 md:group-hover:opacity-100",children:[e(L,{className:"size-3"}),"回复"]})]}),(a.replyToFloor||M.length>0)&&n("div",{className:"mt-1 flex flex-wrap items-center gap-1.5 text-[11px] text-faint",children:[a.replyToFloor&&n("button",{type:"button",onClick:()=>document.getElementById(`council-floor-${a.replyToFloor}`)?.scrollIntoView({block:"center",behavior:"smooth"}),className:"inline-flex min-w-0 max-w-full cursor-pointer items-center gap-1 rounded-md bg-raised/70 px-1.5 py-0.5 hover:text-ink",children:[e(tr,{className:"size-3 shrink-0"}),n("span",{className:"shrink-0 text-dim",children:["#",a.replyToFloor," ",a.replyToName]}),a.replyToPreview&&e("span",{className:"truncate",children:a.replyToPreview})]}),M.map((x)=>n("span",{className:"inline-flex items-center gap-1 rounded-md bg-accent/10 px-1.5 py-0.5 text-accent",children:[e(L,{className:"size-3"}),x.name]},x.id))]}),e("div",{className:"mt-1.5 break-words text-[14px] leading-relaxed text-ink/90 md:text-[13.5px] [&_p]:my-1.5 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:e(g,{text:a.text})}),C.length>0&&n(f,{open:h,onOpenChange:d,className:"mt-2",children:[n("button",{type:"button","aria-expanded":h,onClick:()=>d((x)=>!x),className:"inline-flex max-w-full cursor-pointer items-center gap-1 text-[11px] text-faint hover:text-ink",children:[e(pe,{className:"size-3 shrink-0"}),n("span",{className:"shrink-0",children:["查阅 ",C.length," 处"]}),!h&&e("span",{className:"truncate font-mono",children:C.map((x)=>x.label).join(",")}),e(ie,{className:v("size-3 shrink-0 transition-transform duration-300 ease-out-quint",!h&&"-rotate-90")})]}),e(b,{children:e("div",{className:"mt-1.5 space-y-1.5",children:C.map((x)=>n("div",{className:"overflow-hidden rounded-lg border border-line bg-panel text-xs",children:[e("div",{className:"truncate border-b border-line/70 px-2.5 py-1 font-mono text-[11px] text-dim",children:x.label}),x.snippet&&e(u,{code:x.snippet,lang:x.lang||"ts",className:"max-h-40 overflow-auto px-2.5 py-1.5 text-[11.5px]"})]},`${x.tool}:${x.label}:${x.snippet?.slice(0,32)??""}`))})})]})]})]})}function fe(t){let{ModelIcon:u,cn:f}=y();return e("span",{className:f("shrink-0 items-center justify-center rounded-full",t.isHuman?"bg-accent/12 text-accent":"bg-raised",t.className),children:t.message.senderModel?e(u,{modelID:t.message.senderModel,className:"size-4",size:16}):e(xe,{className:"size-4"})})}function rt(t){let{ModelIcon:u,cn:f,useTheme:b}=y();b();let{connection:g,sessionID:v,payload:a,onOpen:h}=t,d=a,[p,c]=r(d),[C,M]=r(()=>{try{return sessionStorage.getItem(Mr)===d.roomID}catch{return!1}}),[x,X]=r(Date.now);o(()=>{c(d)},[d]),o(()=>{if(!C)return;try{if(sessionStorage.getItem(Mr)===d.roomID)sessionStorage.removeItem(Mr)}catch{}},[C,d.roomID]);let D=p.state==="running",R=`/api/sessions/${encodeURIComponent(v)}/council/${encodeURIComponent(p.roomID)}`;o(()=>{if(!D)return;let N=!1,T=setInterval(()=>{if(g.request(R).then((z)=>{if(!N&&z&&typeof z==="object"&&"roomID"in z)c(z)}).catch(()=>{}),!N)X(Date.now())},1200);return()=>{N=!0,clearInterval(T)}},[g,R,D]);let H=async(N)=>{let I=await g.request(`${R}/post`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:N})});c(I)},_=async()=>{let N=await g.request(`${R}/kill`,{method:"POST"});c(N)},E=(D?x:p.updatedAt)-p.createdAt,S=p.messages.at(-1),B=p.members.filter((N)=>V(N.status)).length;return n(m,{children:[n("button",{type:"button","aria-label":`进入理事会:${p.topic}`,onClick:()=>M(!0),className:"group relative my-2 block w-full cursor-pointer overflow-hidden rounded-2xl border border-line bg-panel text-left transition-colors hover:border-line-strong animate-fade",children:[n("div",{className:"px-4 pt-3.5",children:[n("div",{className:"flex items-center gap-1.5 text-[11px] text-faint",children:[e("span",{className:"font-medium text-dim",children:"理事会"}),e("span",{"aria-hidden":!0,children:"·"}),e("span",{className:"tabular-nums",children:G(E)}),n("span",{className:"ml-auto tabular-nums",children:[p.members.length," 位成员"]})]}),e("h4",{className:"mt-1 line-clamp-2 text-sm font-semibold text-ink md:truncate",title:p.topic,children:p.topic})]}),e(J,{room:p,className:"mt-3 px-4"}),e("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-2 px-4",children:p.members.map((N)=>{let I=w[N.verdict]??w.pending,T=V(N.status);return n("span",{className:"flex min-w-0 items-center gap-1.5 text-xs",title:N.model,children:[n("span",{className:f("relative flex size-6 shrink-0 items-center justify-center rounded-full bg-raised ring-2",I.ring),children:[e(u,{modelID:N.model,className:"size-3.5",size:14}),T&&e(K,{className:"absolute -right-1 -bottom-1 size-3 animate-spin rounded-full bg-panel text-accent"})]}),e("span",{className:"truncate text-dim",children:N.name}),e("span",{className:f("shrink-0 text-[11px]",I.text),children:I.label})]},N.id)})}),n("div",{className:"mt-3 flex items-center gap-2 border-t border-line/70 px-4 py-2.5 text-xs",children:[S?n(m,{children:[e("span",{className:"shrink-0 font-medium text-dim",children:S.senderName}),e("span",{className:"min-w-0 flex-1 truncate text-faint",children:S.text.replace(/\s+/g," ")})]}):e("span",{className:"min-w-0 flex-1 truncate text-faint",children:D?`${B} 位成员正在${p.phase==="research"?"调研":"思考"}…`:"没有发言"}),n("span",{className:"inline-flex shrink-0 items-center gap-1 text-faint transition-colors group-hover:text-ink",children:[p.messages.length>0&&n("span",{className:"tabular-nums",children:[p.messages.length," 条"]}),e(ue,{className:"size-3.5"})]})]})]}),C&&e(ge,{room:p,elapsedMs:E,onClose:()=>M(!1),onOpenMember:h,onPost:H,onAbort:_})]})}export{rt as CouncilCard};