@bkm016/basalt 0.1.20 → 0.1.22

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 (629) hide show
  1. package/{chunk-tb3zsqe8.js → chunk-09tdbx7b.js} +1 -1
  2. package/{chunk-cks36jdh.js → chunk-0rsyawz5.js} +2 -2
  3. package/{chunk-nszq2z0w.js → chunk-16yz5ebn.js} +1 -1
  4. package/chunk-1kdd7xry.js +2 -0
  5. package/chunk-1td9hjn9.js +25 -0
  6. package/{chunk-s819vmwh.js → chunk-1xjkzzyh.js} +2 -2
  7. package/{chunk-gg3kfa12.js → chunk-38932kzp.js} +2 -2
  8. package/chunk-3qxq264t.js +2 -0
  9. package/{chunk-cwrf78vs.js → chunk-3s8rpc1w.js} +2 -2
  10. package/{chunk-5ja0vsam.js → chunk-5415fcz7.js} +3 -3
  11. package/{chunk-3phf8eg6.js → chunk-5kezbmgw.js} +2 -2
  12. package/{chunk-bkhsva5n.js → chunk-5m51j40e.js} +3 -3
  13. package/{chunk-2fts9k52.js → chunk-5mt8xxex.js} +2 -2
  14. package/{chunk-tp885r8h.js → chunk-5ph58x6w.js} +11 -11
  15. package/{chunk-eps1epfr.js → chunk-6jdqe7sz.js} +2 -2
  16. package/{chunk-mde2dd79.js → chunk-6ztgzx9s.js} +1 -1
  17. package/{chunk-3r38vbt5.js → chunk-7dzcdpdt.js} +1 -1
  18. package/{chunk-w9fdcchk.js → chunk-82djd5fk.js} +1 -1
  19. package/{chunk-x1y4s01x.js → chunk-86vhsd3y.js} +11 -11
  20. package/chunk-8rfv9mm1.js +15 -0
  21. package/{chunk-30bbdzma.js → chunk-8tvz5ht1.js} +12 -12
  22. package/{chunk-a2z1cy84.js → chunk-9pjmwz01.js} +1 -1
  23. package/{chunk-7kz9435k.js → chunk-9w1m9av8.js} +3 -3
  24. package/{chunk-w6nc3jn7.js → chunk-9wjd9bxm.js} +1 -1
  25. package/chunk-b49005n2.js +471 -0
  26. package/{chunk-w045zk55.js → chunk-bdz2561d.js} +1 -1
  27. package/{chunk-wj09qkyw.js → chunk-bkvhwgeb.js} +2 -2
  28. package/{chunk-1gaj43fx.js → chunk-bp9tfav3.js} +1 -1
  29. package/chunk-cc9htxzx.js +3557 -0
  30. package/chunk-chfzk1fx.js +3 -0
  31. package/{chunk-p0e82mee.js → chunk-cr0tqn6j.js} +2 -2
  32. package/{chunk-e3bgzeb3.js → chunk-cv5kdnsw.js} +2 -2
  33. package/{chunk-svx7mz0w.js → chunk-d79s1s4t.js} +4 -4
  34. package/{chunk-29g01nrz.js → chunk-ec6bzt7w.js} +5 -5
  35. package/{chunk-h2pp8mnh.js → chunk-eq54cmsa.js} +1 -1
  36. package/{chunk-1tbv5t08.js → chunk-g54nd4fd.js} +1 -1
  37. package/{chunk-v7da0aqn.js → chunk-g8p5c4vx.js} +5 -5
  38. package/chunk-g9bemxpt.js +3 -0
  39. package/{chunk-fgjw0r6g.js → chunk-hk5p2eee.js} +4 -4
  40. package/{chunk-0bgg0hdd.js → chunk-jerp4pj5.js} +1 -1
  41. package/{chunk-3sg32v3n.js → chunk-jsvqp20s.js} +1 -1
  42. package/{chunk-0g8rtf05.js → chunk-k9x1r69s.js} +8 -8
  43. package/{chunk-5e7yegea.js → chunk-kb526065.js} +1 -1
  44. package/{chunk-y83tnkr3.js → chunk-kpw1qa2n.js} +3 -3
  45. package/chunk-mbvy2t23.js +2 -0
  46. package/{chunk-sm9fpy18.js → chunk-mmnsdje8.js} +9 -9
  47. package/{chunk-d2f0hq8z.js → chunk-nffwakxq.js} +1 -1
  48. package/chunk-nfj8sj53.js +2 -0
  49. package/{chunk-ak9rkrf3.js → chunk-pzwaz2ew.js} +2 -2
  50. package/{chunk-yk29stq0.js → chunk-qtgc74er.js} +2 -2
  51. package/chunk-qtrd33pp.js +7 -0
  52. package/{chunk-6en06hkk.js → chunk-rbk6jxcr.js} +1 -1
  53. package/{chunk-y3vap4a1.js → chunk-rpbxbb92.js} +1 -1
  54. package/{chunk-agb771ak.js → chunk-rx812nrp.js} +2 -2
  55. package/{chunk-tpetsqzt.js → chunk-scy1p7x2.js} +3 -3
  56. package/{chunk-4dgqcp6q.js → chunk-sfgw0vmt.js} +1 -1
  57. package/chunk-tmefdwxy.js +2 -0
  58. package/chunk-tvg54x0x.js +2 -0
  59. package/{chunk-eyyxqb6y.js → chunk-v878x8zr.js} +2 -2
  60. package/chunk-v89f2k9b.js +2 -0
  61. package/{chunk-ewr51fwc.js → chunk-vhe16b65.js} +2 -2
  62. package/{chunk-z9p2ry9w.js → chunk-w3skxmvx.js} +2 -2
  63. package/{chunk-qxpx8dn6.js → chunk-w4kasz4j.js} +5 -5
  64. package/chunk-w4zkgn1c.js +4 -0
  65. package/chunk-we5emq6f.js +2 -0
  66. package/{chunk-11xxfc0x.js → chunk-x0dcabw6.js} +2 -2
  67. package/chunk-xtj7b70y.js +5 -0
  68. package/{chunk-a1vdrgsh.js → chunk-xwew53k7.js} +5 -5
  69. package/{chunk-np2xnt1g.js → chunk-xyhr89y5.js} +2 -2
  70. package/chunk-yce46csn.js +2 -0
  71. package/{chunk-s8m4svhf.js → chunk-yetcb1z9.js} +2 -2
  72. package/chunk-ypmpf75h.js +2 -0
  73. package/chunk-zz48zvk5.js +2 -0
  74. package/compiled.js +8 -8
  75. package/package.json +1 -1
  76. package/ui-test-worker.js +16 -16
  77. package/web/chunk-04c54f1s.js +1 -0
  78. package/web/chunk-04c54f1s.js.br +2 -0
  79. package/web/chunk-04c54f1s.js.gz +0 -0
  80. package/web/chunk-04m1cb8w.js +1 -0
  81. package/web/chunk-04m1cb8w.js.br +0 -0
  82. package/web/chunk-04m1cb8w.js.gz +0 -0
  83. package/web/{chunk-js940jjj.js → chunk-08z6mkgz.js} +4 -4
  84. package/web/chunk-08z6mkgz.js.br +0 -0
  85. package/web/chunk-08z6mkgz.js.gz +0 -0
  86. package/web/{chunk-x2hxq5yr.js → chunk-0g9m3rpw.js} +1 -1
  87. package/web/chunk-0g9m3rpw.js.br +0 -0
  88. package/web/chunk-0g9m3rpw.js.gz +0 -0
  89. package/web/{chunk-gk1bc3c3.js → chunk-0jccrdw3.js} +1 -1
  90. package/web/chunk-0jccrdw3.js.br +0 -0
  91. package/web/chunk-0jccrdw3.js.gz +0 -0
  92. package/web/{chunk-59h87pvn.js → chunk-0vweazdh.js} +1 -1
  93. package/web/chunk-0vweazdh.js.br +0 -0
  94. package/web/chunk-0vweazdh.js.gz +0 -0
  95. package/web/chunk-1vtf555r.js +1 -0
  96. package/web/chunk-1vtf555r.js.br +0 -0
  97. package/web/chunk-1vtf555r.js.gz +0 -0
  98. package/web/{chunk-znrsm604.js → chunk-29z0ft67.js} +17 -17
  99. package/web/chunk-29z0ft67.js.br +0 -0
  100. package/web/chunk-29z0ft67.js.gz +0 -0
  101. package/web/{chunk-tg3f9xmp.js → chunk-2q3m4btb.js} +1 -1
  102. package/web/chunk-2q3m4btb.js.br +0 -0
  103. package/web/chunk-2q3m4btb.js.gz +0 -0
  104. package/web/{chunk-qjg6dw46.js → chunk-2s6fhjjc.js} +94 -94
  105. package/web/chunk-2s6fhjjc.js.br +0 -0
  106. package/web/chunk-2s6fhjjc.js.gz +0 -0
  107. package/web/{chunk-fjrgg82c.js → chunk-2vdx4ykn.js} +4 -4
  108. package/web/chunk-2vdx4ykn.js.br +0 -0
  109. package/web/chunk-2vdx4ykn.js.gz +0 -0
  110. package/web/{chunk-zthww0ws.js → chunk-2zgqe8r7.js} +1 -1
  111. package/web/chunk-2zgqe8r7.js.br +0 -0
  112. package/web/chunk-2zgqe8r7.js.gz +0 -0
  113. package/web/{chunk-mbpv2w5h.js → chunk-3kqpmg83.js} +2 -2
  114. package/web/chunk-3kqpmg83.js.br +0 -0
  115. package/web/chunk-3kqpmg83.js.gz +0 -0
  116. package/web/chunk-3rmqxna0.js +1 -0
  117. package/web/chunk-3rmqxna0.js.br +0 -0
  118. package/web/chunk-3rmqxna0.js.gz +0 -0
  119. package/web/{chunk-jmnzcm1f.js → chunk-3xmv2349.js} +4 -4
  120. package/web/chunk-3xmv2349.js.br +0 -0
  121. package/web/chunk-3xmv2349.js.gz +0 -0
  122. package/web/{chunk-08w40agf.js → chunk-46cdys11.js} +7 -7
  123. package/web/chunk-46cdys11.js.br +0 -0
  124. package/web/chunk-46cdys11.js.gz +0 -0
  125. package/web/chunk-46mw23f0.js +8 -0
  126. package/web/chunk-46mw23f0.js.br +0 -0
  127. package/web/chunk-46mw23f0.js.gz +0 -0
  128. package/web/{chunk-mwfrxgbs.js → chunk-4r0dvjrr.js} +1 -1
  129. package/web/chunk-4r0dvjrr.js.br +0 -0
  130. package/web/chunk-4r0dvjrr.js.gz +0 -0
  131. package/web/{chunk-aw9bwd4w.js → chunk-4v6m84pg.js} +2 -2
  132. package/web/chunk-4v6m84pg.js.br +0 -0
  133. package/web/chunk-4v6m84pg.js.gz +0 -0
  134. package/web/{chunk-wvqcbp4a.js → chunk-4ye31s2w.js} +1 -1
  135. package/web/chunk-4ye31s2w.js.br +4 -0
  136. package/web/chunk-4ye31s2w.js.gz +0 -0
  137. package/web/{chunk-ezj5rjqr.js → chunk-5kavsn22.js} +1 -1
  138. package/web/chunk-5kavsn22.js.br +0 -0
  139. package/web/chunk-5kavsn22.js.gz +0 -0
  140. package/web/{chunk-vxadngbp.js → chunk-5q2h4tg8.js} +1 -1
  141. package/web/chunk-5q2h4tg8.js.br +4 -0
  142. package/web/chunk-5q2h4tg8.js.gz +0 -0
  143. package/web/{chunk-dmzvhbpn.js → chunk-5tbk6dx6.js} +3 -3
  144. package/web/chunk-5tbk6dx6.js.br +0 -0
  145. package/web/chunk-5tbk6dx6.js.gz +0 -0
  146. package/web/{chunk-9n1nsdqs.js → chunk-5yb0sm1r.js} +1 -1
  147. package/web/chunk-5yb0sm1r.js.br +0 -0
  148. package/web/chunk-5yb0sm1r.js.gz +0 -0
  149. package/web/chunk-5yz46tjw.js +2 -0
  150. package/web/chunk-5yz46tjw.js.br +0 -0
  151. package/web/chunk-5yz46tjw.js.gz +0 -0
  152. package/web/{chunk-3fd6mgf0.js → chunk-619a8t38.js} +1 -1
  153. package/web/chunk-619a8t38.js.br +0 -0
  154. package/web/chunk-619a8t38.js.gz +0 -0
  155. package/web/{chunk-cmhxtckb.js → chunk-6areryyn.js} +1 -1
  156. package/web/chunk-6areryyn.js.br +0 -0
  157. package/web/chunk-6areryyn.js.gz +0 -0
  158. package/web/{chunk-tgeeggkh.js → chunk-6ms78sx5.js} +1 -1
  159. package/web/chunk-6ms78sx5.js.br +0 -0
  160. package/web/chunk-6ms78sx5.js.gz +0 -0
  161. package/web/{chunk-bks2k04k.js → chunk-6ts9mtye.js} +1 -1
  162. package/web/chunk-6ts9mtye.js.br +0 -0
  163. package/web/chunk-6ts9mtye.js.gz +0 -0
  164. package/web/{chunk-kedjfh66.js → chunk-79whhay2.js} +1 -1
  165. package/web/chunk-79whhay2.js.br +0 -0
  166. package/web/chunk-79whhay2.js.gz +0 -0
  167. package/web/{chunk-ye7vge7s.js → chunk-7n1abr86.js} +1 -1
  168. package/web/chunk-7n1abr86.js.br +0 -0
  169. package/web/chunk-7n1abr86.js.gz +0 -0
  170. package/web/chunk-7qxfx983.js +1 -0
  171. package/web/chunk-7qxfx983.js.br +0 -0
  172. package/web/chunk-7qxfx983.js.gz +0 -0
  173. package/web/chunk-91k30q92.js +1 -0
  174. package/web/chunk-91k30q92.js.br +0 -0
  175. package/web/chunk-91k30q92.js.gz +0 -0
  176. package/web/{chunk-k6fwzn0z.js → chunk-91nyvkrb.js} +1 -1
  177. package/web/chunk-91nyvkrb.js.br +0 -0
  178. package/web/chunk-91nyvkrb.js.gz +0 -0
  179. package/web/{chunk-ahdca62g.js → chunk-9mbr6znb.js} +1 -1
  180. package/web/chunk-9mbr6znb.js.br +0 -0
  181. package/web/chunk-9mbr6znb.js.gz +0 -0
  182. package/web/{chunk-1yvcxpp2.js → chunk-9mvw6a5v.js} +4 -4
  183. package/web/chunk-9mvw6a5v.js.br +0 -0
  184. package/web/chunk-9mvw6a5v.js.gz +0 -0
  185. package/web/{chunk-kdegb6pd.js → chunk-a6hdn8tb.js} +5 -5
  186. package/web/chunk-a6hdn8tb.js.br +0 -0
  187. package/web/chunk-a6hdn8tb.js.gz +0 -0
  188. package/web/{chunk-37hmswdk.js → chunk-ar6m9fza.js} +5 -5
  189. package/web/chunk-ar6m9fza.js.br +0 -0
  190. package/web/chunk-ar6m9fza.js.gz +0 -0
  191. package/web/{chunk-q0srq8g5.js → chunk-ayqakyyq.js} +1 -1
  192. package/web/chunk-ayqakyyq.js.br +0 -0
  193. package/web/chunk-ayqakyyq.js.gz +0 -0
  194. package/web/{chunk-1ps9fj5n.js → chunk-cc6hn5xv.js} +2 -2
  195. package/web/chunk-cc6hn5xv.js.br +0 -0
  196. package/web/chunk-cc6hn5xv.js.gz +0 -0
  197. package/web/{chunk-d7f85w1y.js → chunk-ccymg1hp.js} +1 -1
  198. package/web/chunk-ccymg1hp.js.br +0 -0
  199. package/web/chunk-ccymg1hp.js.gz +0 -0
  200. package/web/{chunk-mhzqgzh0.js → chunk-cg9fe42b.js} +1 -1
  201. package/web/chunk-cg9fe42b.js.br +0 -0
  202. package/web/chunk-cg9fe42b.js.gz +0 -0
  203. package/web/chunk-cmcgmf94.js +1 -0
  204. package/web/chunk-cmcgmf94.js.br +0 -0
  205. package/web/chunk-cmcgmf94.js.gz +0 -0
  206. package/web/chunk-cnbbvd6n.js +1 -0
  207. package/web/chunk-cnbbvd6n.js.br +0 -0
  208. package/web/chunk-cnbbvd6n.js.gz +0 -0
  209. package/web/{chunk-wa8wr2y9.js → chunk-cxp2nbtc.js} +9 -9
  210. package/web/chunk-cxp2nbtc.js.br +0 -0
  211. package/web/chunk-cxp2nbtc.js.gz +0 -0
  212. package/web/{chunk-vh2prc6k.js → chunk-dj2b64aj.js} +1 -1
  213. package/web/chunk-dj2b64aj.js.br +0 -0
  214. package/web/chunk-dj2b64aj.js.gz +0 -0
  215. package/web/{chunk-gbcf0rdk.js → chunk-dsga6rp3.js} +1 -1
  216. package/web/chunk-dsga6rp3.js.br +0 -0
  217. package/web/chunk-dsga6rp3.js.gz +0 -0
  218. package/web/chunk-ek6q6a08.js +1 -0
  219. package/web/chunk-ek6q6a08.js.br +2 -0
  220. package/web/chunk-ek6q6a08.js.gz +0 -0
  221. package/web/{chunk-53cg6pxm.js → chunk-et1nm6h1.js} +2 -2
  222. package/web/chunk-et1nm6h1.js.br +0 -0
  223. package/web/chunk-et1nm6h1.js.gz +0 -0
  224. package/web/chunk-f1016wh6.js +1 -0
  225. package/web/chunk-f1016wh6.js.br +0 -0
  226. package/web/chunk-f1016wh6.js.gz +0 -0
  227. package/web/{chunk-6pbhqbv0.js → chunk-f42mwg61.js} +1 -1
  228. package/web/chunk-f42mwg61.js.br +0 -0
  229. package/web/chunk-f42mwg61.js.gz +0 -0
  230. package/web/{chunk-1ratg1jd.js → chunk-fk35d3bz.js} +1 -1
  231. package/web/chunk-fk35d3bz.js.br +0 -0
  232. package/web/chunk-fk35d3bz.js.gz +0 -0
  233. package/web/{chunk-e2z3kdhw.js → chunk-fpwztdhn.js} +3 -3
  234. package/web/chunk-fpwztdhn.js.br +0 -0
  235. package/web/chunk-fpwztdhn.js.gz +0 -0
  236. package/web/{chunk-1cwyy3gh.js → chunk-g30nqfka.js} +1 -1
  237. package/web/chunk-g30nqfka.js.br +0 -0
  238. package/web/chunk-g30nqfka.js.gz +0 -0
  239. package/web/chunk-gbwy4pfg.css +1 -0
  240. package/web/chunk-gbwy4pfg.css.br +0 -0
  241. package/web/chunk-gbwy4pfg.css.gz +0 -0
  242. package/web/{chunk-gj6bdv1y.js → chunk-gepgx19m.js} +9 -9
  243. package/web/chunk-gepgx19m.js.br +0 -0
  244. package/web/chunk-gepgx19m.js.gz +0 -0
  245. package/web/{chunk-v5p2fds9.js → chunk-grz69q28.js} +4 -4
  246. package/web/chunk-grz69q28.js.br +0 -0
  247. package/web/chunk-grz69q28.js.gz +0 -0
  248. package/web/{chunk-vhpzp7zd.js → chunk-gt62acsh.js} +1 -1
  249. package/web/chunk-gt62acsh.js.br +0 -0
  250. package/web/chunk-gt62acsh.js.gz +0 -0
  251. package/web/{chunk-81xbfpbq.js → chunk-h28xrvmg.js} +1 -1
  252. package/web/chunk-h28xrvmg.js.br +0 -0
  253. package/web/chunk-h28xrvmg.js.gz +0 -0
  254. package/web/{chunk-gpjytpyw.js → chunk-h80ypke7.js} +2 -2
  255. package/web/chunk-h80ypke7.js.br +0 -0
  256. package/web/chunk-h80ypke7.js.gz +0 -0
  257. package/web/chunk-k1cd6e24.js +1 -0
  258. package/web/chunk-k1cd6e24.js.br +0 -0
  259. package/web/chunk-k1cd6e24.js.gz +0 -0
  260. package/web/chunk-k9248573.js +1 -0
  261. package/web/chunk-k9248573.js.br +0 -0
  262. package/web/chunk-k9248573.js.gz +0 -0
  263. package/web/{chunk-6n1ha6ta.js → chunk-kqgn9dsa.js} +1 -1
  264. package/web/chunk-kqgn9dsa.js.br +0 -0
  265. package/web/chunk-kqgn9dsa.js.gz +0 -0
  266. package/web/chunk-kqngpw5m.js +1 -0
  267. package/web/chunk-kqngpw5m.js.br +0 -0
  268. package/web/chunk-kqngpw5m.js.gz +0 -0
  269. package/web/{chunk-dmhezjv3.js → chunk-kzj105r1.js} +4 -4
  270. package/web/chunk-kzj105r1.js.br +0 -0
  271. package/web/chunk-kzj105r1.js.gz +0 -0
  272. package/web/chunk-m14v2en1.js +1 -0
  273. package/web/chunk-m14v2en1.js.br +0 -0
  274. package/web/chunk-m14v2en1.js.gz +0 -0
  275. package/web/{chunk-1ghnag5v.js → chunk-m34et8g4.js} +1 -1
  276. package/web/chunk-m34et8g4.js.br +0 -0
  277. package/web/chunk-m34et8g4.js.gz +0 -0
  278. package/web/{chunk-esckazz2.js → chunk-md1f6gmk.js} +1 -1
  279. package/web/chunk-md1f6gmk.js.br +0 -0
  280. package/web/chunk-md1f6gmk.js.gz +0 -0
  281. package/web/{chunk-vpbnyz43.js → chunk-n05xf20n.js} +1 -1
  282. package/web/chunk-n05xf20n.js.br +0 -0
  283. package/web/chunk-n05xf20n.js.gz +0 -0
  284. package/web/{chunk-mh3nkkpx.js → chunk-n2k1gd6n.js} +6 -6
  285. package/web/chunk-n2k1gd6n.js.br +0 -0
  286. package/web/chunk-n2k1gd6n.js.gz +0 -0
  287. package/web/{chunk-apr33amc.js → chunk-nm8yza3v.js} +1 -1
  288. package/web/chunk-nm8yza3v.js.br +0 -0
  289. package/web/chunk-nm8yza3v.js.gz +0 -0
  290. package/web/chunk-pbg9rdwv.js +1 -0
  291. package/web/chunk-pbg9rdwv.js.br +2 -0
  292. package/web/chunk-pbg9rdwv.js.gz +0 -0
  293. package/web/chunk-qj9nd038.js +1 -0
  294. package/web/chunk-qj9nd038.js.br +0 -0
  295. package/web/chunk-qj9nd038.js.gz +0 -0
  296. package/web/chunk-qjaex9c0.js +1 -0
  297. package/web/chunk-qjaex9c0.js.br +2 -0
  298. package/web/chunk-qjaex9c0.js.gz +0 -0
  299. package/web/{chunk-72st75n7.js → chunk-qq79vsm8.js} +3 -3
  300. package/web/chunk-qq79vsm8.js.br +0 -0
  301. package/web/chunk-qq79vsm8.js.gz +0 -0
  302. package/web/{chunk-6a3wt5c5.js → chunk-qs5wnwd6.js} +3 -3
  303. package/web/chunk-qs5wnwd6.js.br +0 -0
  304. package/web/chunk-qs5wnwd6.js.gz +0 -0
  305. package/web/{chunk-wbxz2bjb.js → chunk-r381n550.js} +1 -1
  306. package/web/chunk-r381n550.js.br +0 -0
  307. package/web/chunk-r381n550.js.gz +0 -0
  308. package/web/{chunk-2rnnvxa5.js → chunk-r48vazdm.js} +3 -3
  309. package/web/chunk-r48vazdm.js.br +0 -0
  310. package/web/chunk-r48vazdm.js.gz +0 -0
  311. package/web/{chunk-hqt1f3fm.js → chunk-r55seq42.js} +1 -1
  312. package/web/chunk-r55seq42.js.br +0 -0
  313. package/web/chunk-r55seq42.js.gz +0 -0
  314. package/web/{chunk-82q4e8ff.js → chunk-r79zekav.js} +1 -1
  315. package/web/chunk-r79zekav.js.br +0 -0
  316. package/web/chunk-r79zekav.js.gz +0 -0
  317. package/web/{chunk-nb58m79v.js → chunk-r8qyvcks.js} +1 -1
  318. package/web/chunk-r8qyvcks.js.br +0 -0
  319. package/web/chunk-r8qyvcks.js.gz +0 -0
  320. package/web/chunk-r9dt0730.js +1 -0
  321. package/web/chunk-r9dt0730.js.br +0 -0
  322. package/web/chunk-r9dt0730.js.gz +0 -0
  323. package/web/chunk-rpjzwknn.js +1 -0
  324. package/web/chunk-rpjzwknn.js.br +0 -0
  325. package/web/chunk-rpjzwknn.js.gz +0 -0
  326. package/web/{chunk-186rp10x.js → chunk-sk3065js.js} +1 -1
  327. package/web/chunk-sk3065js.js.br +0 -0
  328. package/web/chunk-sk3065js.js.gz +0 -0
  329. package/web/{chunk-hwxj58j5.js → chunk-smywa1zw.js} +1 -1
  330. package/web/chunk-smywa1zw.js.br +0 -0
  331. package/web/chunk-smywa1zw.js.gz +0 -0
  332. package/web/{chunk-a8qe7kvz.js → chunk-trssyq9a.js} +1 -1
  333. package/web/chunk-trssyq9a.js.br +0 -0
  334. package/web/chunk-trssyq9a.js.gz +0 -0
  335. package/web/{chunk-0h0whn75.js → chunk-v329f8df.js} +1 -1
  336. package/web/chunk-v329f8df.js.br +0 -0
  337. package/web/chunk-v329f8df.js.gz +0 -0
  338. package/web/{chunk-zbzgd8kn.js → chunk-vb2feptd.js} +1 -1
  339. package/web/chunk-vb2feptd.js.br +0 -0
  340. package/web/chunk-vb2feptd.js.gz +0 -0
  341. package/web/chunk-vff33vj3.js +1 -0
  342. package/web/chunk-vff33vj3.js.br +2 -0
  343. package/web/chunk-vff33vj3.js.gz +0 -0
  344. package/web/{chunk-k4pknkvp.js → chunk-w9adyaze.js} +1 -1
  345. package/web/chunk-w9adyaze.js.br +0 -0
  346. package/web/chunk-w9adyaze.js.gz +0 -0
  347. package/web/{chunk-v6snw1sw.js → chunk-wgc8z5jv.js} +1 -1
  348. package/web/chunk-wgc8z5jv.js.br +0 -0
  349. package/web/chunk-wgc8z5jv.js.gz +0 -0
  350. package/web/{chunk-recfg8af.js → chunk-wvdk3w03.js} +1 -1
  351. package/web/chunk-wvdk3w03.js.br +0 -0
  352. package/web/chunk-wvdk3w03.js.gz +0 -0
  353. package/web/{chunk-bg0qgabv.js → chunk-wxmaw4ht.js} +1 -1
  354. package/web/chunk-wxmaw4ht.js.br +0 -0
  355. package/web/chunk-wxmaw4ht.js.gz +0 -0
  356. package/web/{chunk-7h59ac2b.js → chunk-x19jdqnt.js} +1 -1
  357. package/web/chunk-x19jdqnt.js.br +0 -0
  358. package/web/chunk-x19jdqnt.js.gz +0 -0
  359. package/web/{chunk-mj8dzc8q.js → chunk-x4153gx3.js} +5 -5
  360. package/web/chunk-x4153gx3.js.br +0 -0
  361. package/web/chunk-x4153gx3.js.gz +0 -0
  362. package/web/{chunk-qx5ab39c.js → chunk-x7wmb5d3.js} +2 -2
  363. package/web/chunk-x7wmb5d3.js.br +0 -0
  364. package/web/chunk-x7wmb5d3.js.gz +0 -0
  365. package/web/{chunk-v2bkkhb8.js → chunk-xp2zpmpp.js} +41 -41
  366. package/web/chunk-xp2zpmpp.js.br +0 -0
  367. package/web/chunk-xp2zpmpp.js.gz +0 -0
  368. package/web/chunk-y09v3sz7.js +1 -0
  369. package/web/chunk-y09v3sz7.js.br +0 -0
  370. package/web/chunk-y09v3sz7.js.gz +0 -0
  371. package/web/{chunk-h1c0m3g4.js → chunk-ywmsxe5z.js} +3 -3
  372. package/web/chunk-ywmsxe5z.js.br +0 -0
  373. package/web/chunk-ywmsxe5z.js.gz +0 -0
  374. package/web/{chunk-0tcmnvab.js → chunk-yzyxa823.js} +1 -1
  375. package/web/chunk-yzyxa823.js.br +0 -0
  376. package/web/chunk-yzyxa823.js.gz +0 -0
  377. package/web/{chunk-c28crzwk.js → chunk-zwx48gb8.js} +1 -1
  378. package/web/chunk-zwx48gb8.js.br +0 -0
  379. package/web/chunk-zwx48gb8.js.gz +0 -0
  380. package/web/index.html +1 -1
  381. package/web/index.html.br +0 -0
  382. package/web/index.html.gz +0 -0
  383. package/worker.js +1 -1
  384. package/chunk-0wwd4q6h.js +0 -5
  385. package/chunk-204c01mz.js +0 -25
  386. package/chunk-4wc2gbhe.js +0 -2
  387. package/chunk-51pfvmhh.js +0 -470
  388. package/chunk-5tsfqsmf.js +0 -2
  389. package/chunk-6hatfwsq.js +0 -2
  390. package/chunk-78ky455y.js +0 -4
  391. package/chunk-8mqaq042.js +0 -2
  392. package/chunk-as2mwf79.js +0 -2
  393. package/chunk-b516bp7n.js +0 -3
  394. package/chunk-c5pg2875.js +0 -3552
  395. package/chunk-g9hsrrj5.js +0 -2
  396. package/chunk-gpceyezp.js +0 -2
  397. package/chunk-h4n0gg11.js +0 -2
  398. package/chunk-jzya0e5n.js +0 -7
  399. package/chunk-ncb0tyaw.js +0 -2
  400. package/chunk-tpeg9fkd.js +0 -2
  401. package/chunk-v0mw006s.js +0 -15
  402. package/chunk-ys2fds2x.js +0 -3
  403. package/chunk-yshdvnsp.js +0 -2
  404. package/web/chunk-08w40agf.js.br +0 -0
  405. package/web/chunk-08w40agf.js.gz +0 -0
  406. package/web/chunk-0bfypmyv.js +0 -1
  407. package/web/chunk-0bfypmyv.js.br +0 -2
  408. package/web/chunk-0bfypmyv.js.gz +0 -0
  409. package/web/chunk-0h0whn75.js.br +0 -0
  410. package/web/chunk-0h0whn75.js.gz +0 -0
  411. package/web/chunk-0pzs9k06.js +0 -1
  412. package/web/chunk-0pzs9k06.js.br +0 -0
  413. package/web/chunk-0pzs9k06.js.gz +0 -0
  414. package/web/chunk-0tcmnvab.js.br +0 -0
  415. package/web/chunk-0tcmnvab.js.gz +0 -0
  416. package/web/chunk-186rp10x.js.br +0 -0
  417. package/web/chunk-186rp10x.js.gz +0 -0
  418. package/web/chunk-1cwyy3gh.js.br +0 -0
  419. package/web/chunk-1cwyy3gh.js.gz +0 -0
  420. package/web/chunk-1ecsxh85.js +0 -1
  421. package/web/chunk-1ecsxh85.js.br +0 -0
  422. package/web/chunk-1ecsxh85.js.gz +0 -0
  423. package/web/chunk-1ghnag5v.js.br +0 -0
  424. package/web/chunk-1ghnag5v.js.gz +0 -0
  425. package/web/chunk-1ps9fj5n.js.br +0 -0
  426. package/web/chunk-1ps9fj5n.js.gz +0 -0
  427. package/web/chunk-1ratg1jd.js.br +0 -0
  428. package/web/chunk-1ratg1jd.js.gz +0 -0
  429. package/web/chunk-1yvcxpp2.js.br +0 -0
  430. package/web/chunk-1yvcxpp2.js.gz +0 -0
  431. package/web/chunk-2r3w0pt0.js +0 -8
  432. package/web/chunk-2r3w0pt0.js.br +0 -0
  433. package/web/chunk-2r3w0pt0.js.gz +0 -0
  434. package/web/chunk-2rnnvxa5.js.br +0 -0
  435. package/web/chunk-2rnnvxa5.js.gz +0 -0
  436. package/web/chunk-2stffcvc.js +0 -1
  437. package/web/chunk-2stffcvc.js.br +0 -0
  438. package/web/chunk-2stffcvc.js.gz +0 -0
  439. package/web/chunk-2svqgkqw.js +0 -1
  440. package/web/chunk-2svqgkqw.js.br +0 -0
  441. package/web/chunk-2svqgkqw.js.gz +0 -0
  442. package/web/chunk-37hmswdk.js.br +0 -0
  443. package/web/chunk-37hmswdk.js.gz +0 -0
  444. package/web/chunk-3fd6mgf0.js.br +0 -0
  445. package/web/chunk-3fd6mgf0.js.gz +0 -0
  446. package/web/chunk-53cg6pxm.js.br +0 -0
  447. package/web/chunk-53cg6pxm.js.gz +0 -0
  448. package/web/chunk-59h87pvn.js.br +0 -0
  449. package/web/chunk-59h87pvn.js.gz +0 -0
  450. package/web/chunk-6a3wt5c5.js.br +0 -0
  451. package/web/chunk-6a3wt5c5.js.gz +0 -0
  452. package/web/chunk-6n1ha6ta.js.br +0 -0
  453. package/web/chunk-6n1ha6ta.js.gz +0 -0
  454. package/web/chunk-6pbhqbv0.js.br +0 -0
  455. package/web/chunk-6pbhqbv0.js.gz +0 -0
  456. package/web/chunk-72st75n7.js.br +0 -0
  457. package/web/chunk-72st75n7.js.gz +0 -0
  458. package/web/chunk-7h59ac2b.js.br +0 -0
  459. package/web/chunk-7h59ac2b.js.gz +0 -0
  460. package/web/chunk-81xbfpbq.js.br +0 -0
  461. package/web/chunk-81xbfpbq.js.gz +0 -0
  462. package/web/chunk-82q4e8ff.js.br +0 -0
  463. package/web/chunk-82q4e8ff.js.gz +0 -0
  464. package/web/chunk-89e8629e.js +0 -1
  465. package/web/chunk-89e8629e.js.br +0 -0
  466. package/web/chunk-89e8629e.js.gz +0 -0
  467. package/web/chunk-9n1nsdqs.js.br +0 -0
  468. package/web/chunk-9n1nsdqs.js.gz +0 -0
  469. package/web/chunk-a8qe7kvz.js.br +0 -0
  470. package/web/chunk-a8qe7kvz.js.gz +0 -0
  471. package/web/chunk-ahdca62g.js.br +0 -0
  472. package/web/chunk-ahdca62g.js.gz +0 -0
  473. package/web/chunk-apr33amc.js.br +0 -0
  474. package/web/chunk-apr33amc.js.gz +0 -0
  475. package/web/chunk-aw9bwd4w.js.br +0 -0
  476. package/web/chunk-aw9bwd4w.js.gz +0 -0
  477. package/web/chunk-bg0qgabv.js.br +0 -0
  478. package/web/chunk-bg0qgabv.js.gz +0 -0
  479. package/web/chunk-bks2k04k.js.br +0 -0
  480. package/web/chunk-bks2k04k.js.gz +0 -0
  481. package/web/chunk-c28crzwk.js.br +0 -0
  482. package/web/chunk-c28crzwk.js.gz +0 -0
  483. package/web/chunk-cmhxtckb.js.br +0 -0
  484. package/web/chunk-cmhxtckb.js.gz +0 -0
  485. package/web/chunk-d7f85w1y.js.br +0 -0
  486. package/web/chunk-d7f85w1y.js.gz +0 -0
  487. package/web/chunk-dmhezjv3.js.br +0 -0
  488. package/web/chunk-dmhezjv3.js.gz +0 -0
  489. package/web/chunk-dmzvhbpn.js.br +0 -0
  490. package/web/chunk-dmzvhbpn.js.gz +0 -0
  491. package/web/chunk-e2z3kdhw.js.br +0 -0
  492. package/web/chunk-e2z3kdhw.js.gz +0 -0
  493. package/web/chunk-eqmghkwh.js +0 -1
  494. package/web/chunk-eqmghkwh.js.br +0 -0
  495. package/web/chunk-eqmghkwh.js.gz +0 -0
  496. package/web/chunk-esckazz2.js.br +0 -0
  497. package/web/chunk-esckazz2.js.gz +0 -0
  498. package/web/chunk-ezj5rjqr.js.br +0 -0
  499. package/web/chunk-ezj5rjqr.js.gz +0 -0
  500. package/web/chunk-fjrgg82c.js.br +0 -0
  501. package/web/chunk-fjrgg82c.js.gz +0 -0
  502. package/web/chunk-gbcf0rdk.js.br +0 -0
  503. package/web/chunk-gbcf0rdk.js.gz +0 -0
  504. package/web/chunk-gj6bdv1y.js.br +0 -0
  505. package/web/chunk-gj6bdv1y.js.gz +0 -0
  506. package/web/chunk-gk1bc3c3.js.br +0 -0
  507. package/web/chunk-gk1bc3c3.js.gz +0 -0
  508. package/web/chunk-gpjytpyw.js.br +0 -0
  509. package/web/chunk-gpjytpyw.js.gz +0 -0
  510. package/web/chunk-h1c0m3g4.js.br +0 -0
  511. package/web/chunk-h1c0m3g4.js.gz +0 -0
  512. package/web/chunk-h1qv0cpd.css +0 -1
  513. package/web/chunk-h1qv0cpd.css.br +0 -0
  514. package/web/chunk-h1qv0cpd.css.gz +0 -0
  515. package/web/chunk-hq7e5xgd.js +0 -1
  516. package/web/chunk-hq7e5xgd.js.br +0 -0
  517. package/web/chunk-hq7e5xgd.js.gz +0 -0
  518. package/web/chunk-hqt1f3fm.js.br +0 -0
  519. package/web/chunk-hqt1f3fm.js.gz +0 -0
  520. package/web/chunk-hwxj58j5.js.br +0 -0
  521. package/web/chunk-hwxj58j5.js.gz +0 -0
  522. package/web/chunk-hxzb25a8.js +0 -1
  523. package/web/chunk-hxzb25a8.js.br +0 -0
  524. package/web/chunk-hxzb25a8.js.gz +0 -0
  525. package/web/chunk-jmnzcm1f.js.br +0 -0
  526. package/web/chunk-jmnzcm1f.js.gz +0 -0
  527. package/web/chunk-js940jjj.js.br +0 -0
  528. package/web/chunk-js940jjj.js.gz +0 -0
  529. package/web/chunk-jy9vkfbf.js +0 -1
  530. package/web/chunk-jy9vkfbf.js.br +0 -0
  531. package/web/chunk-jy9vkfbf.js.gz +0 -0
  532. package/web/chunk-k4pknkvp.js.br +0 -0
  533. package/web/chunk-k4pknkvp.js.gz +0 -0
  534. package/web/chunk-k6fwzn0z.js.br +0 -0
  535. package/web/chunk-k6fwzn0z.js.gz +0 -0
  536. package/web/chunk-kdegb6pd.js.br +0 -0
  537. package/web/chunk-kdegb6pd.js.gz +0 -0
  538. package/web/chunk-kedjfh66.js.br +0 -0
  539. package/web/chunk-kedjfh66.js.gz +0 -0
  540. package/web/chunk-mbpv2w5h.js.br +0 -0
  541. package/web/chunk-mbpv2w5h.js.gz +0 -0
  542. package/web/chunk-mh3nkkpx.js.br +0 -0
  543. package/web/chunk-mh3nkkpx.js.gz +0 -0
  544. package/web/chunk-mhzqgzh0.js.br +0 -0
  545. package/web/chunk-mhzqgzh0.js.gz +0 -0
  546. package/web/chunk-mj8dzc8q.js.br +0 -0
  547. package/web/chunk-mj8dzc8q.js.gz +0 -0
  548. package/web/chunk-mwfrxgbs.js.br +0 -0
  549. package/web/chunk-mwfrxgbs.js.gz +0 -0
  550. package/web/chunk-nb58m79v.js.br +0 -0
  551. package/web/chunk-nb58m79v.js.gz +0 -0
  552. package/web/chunk-nsna2v2r.js +0 -1
  553. package/web/chunk-nsna2v2r.js.br +0 -0
  554. package/web/chunk-nsna2v2r.js.gz +0 -0
  555. package/web/chunk-nxdp58nf.js +0 -1
  556. package/web/chunk-nxdp58nf.js.br +0 -0
  557. package/web/chunk-nxdp58nf.js.gz +0 -0
  558. package/web/chunk-nytgs01h.js +0 -1
  559. package/web/chunk-nytgs01h.js.br +0 -0
  560. package/web/chunk-nytgs01h.js.gz +0 -0
  561. package/web/chunk-pkxn54jm.js +0 -1
  562. package/web/chunk-pkxn54jm.js.br +0 -0
  563. package/web/chunk-pkxn54jm.js.gz +0 -0
  564. package/web/chunk-q0srq8g5.js.br +0 -0
  565. package/web/chunk-q0srq8g5.js.gz +0 -0
  566. package/web/chunk-qjg6dw46.js.br +0 -0
  567. package/web/chunk-qjg6dw46.js.gz +0 -0
  568. package/web/chunk-qjjxevxe.js +0 -1
  569. package/web/chunk-qjjxevxe.js.br +0 -0
  570. package/web/chunk-qjjxevxe.js.gz +0 -0
  571. package/web/chunk-qx5ab39c.js.br +0 -0
  572. package/web/chunk-qx5ab39c.js.gz +0 -0
  573. package/web/chunk-recfg8af.js.br +0 -0
  574. package/web/chunk-recfg8af.js.gz +0 -0
  575. package/web/chunk-tg3f9xmp.js.br +0 -0
  576. package/web/chunk-tg3f9xmp.js.gz +0 -0
  577. package/web/chunk-tgeeggkh.js.br +0 -0
  578. package/web/chunk-tgeeggkh.js.gz +0 -0
  579. package/web/chunk-v2bkkhb8.js.br +0 -0
  580. package/web/chunk-v2bkkhb8.js.gz +0 -0
  581. package/web/chunk-v5p2fds9.js.br +0 -0
  582. package/web/chunk-v5p2fds9.js.gz +0 -0
  583. package/web/chunk-v6snw1sw.js.br +0 -0
  584. package/web/chunk-v6snw1sw.js.gz +0 -0
  585. package/web/chunk-veadbga2.js +0 -1
  586. package/web/chunk-veadbga2.js.br +0 -2
  587. package/web/chunk-veadbga2.js.gz +0 -0
  588. package/web/chunk-vh2prc6k.js.br +0 -0
  589. package/web/chunk-vh2prc6k.js.gz +0 -0
  590. package/web/chunk-vhpzp7zd.js.br +0 -0
  591. package/web/chunk-vhpzp7zd.js.gz +0 -0
  592. package/web/chunk-vpbnyz43.js.br +0 -0
  593. package/web/chunk-vpbnyz43.js.gz +0 -0
  594. package/web/chunk-vxadngbp.js.br +0 -3
  595. package/web/chunk-vxadngbp.js.gz +0 -0
  596. package/web/chunk-wa8wr2y9.js.br +0 -0
  597. package/web/chunk-wa8wr2y9.js.gz +0 -0
  598. package/web/chunk-wbxz2bjb.js.br +0 -0
  599. package/web/chunk-wbxz2bjb.js.gz +0 -0
  600. package/web/chunk-wgzatts8.js +0 -1
  601. package/web/chunk-wgzatts8.js.br +0 -0
  602. package/web/chunk-wgzatts8.js.gz +0 -0
  603. package/web/chunk-whczyxqw.js +0 -1
  604. package/web/chunk-whczyxqw.js.br +0 -0
  605. package/web/chunk-whczyxqw.js.gz +0 -0
  606. package/web/chunk-wmzz2crn.js +0 -1
  607. package/web/chunk-wmzz2crn.js.br +0 -0
  608. package/web/chunk-wmzz2crn.js.gz +0 -0
  609. package/web/chunk-wvqcbp4a.js.br +0 -0
  610. package/web/chunk-wvqcbp4a.js.gz +0 -0
  611. package/web/chunk-x2hxq5yr.js.br +0 -0
  612. package/web/chunk-x2hxq5yr.js.gz +0 -0
  613. package/web/chunk-x8bnp6vr.js +0 -1
  614. package/web/chunk-x8bnp6vr.js.br +0 -0
  615. package/web/chunk-x8bnp6vr.js.gz +0 -0
  616. package/web/chunk-xvmzsftt.js +0 -2
  617. package/web/chunk-xvmzsftt.js.br +0 -0
  618. package/web/chunk-xvmzsftt.js.gz +0 -0
  619. package/web/chunk-ye7vge7s.js.br +0 -0
  620. package/web/chunk-ye7vge7s.js.gz +0 -0
  621. package/web/chunk-zbzgd8kn.js.br +0 -0
  622. package/web/chunk-zbzgd8kn.js.gz +0 -0
  623. package/web/chunk-zhwqscat.js +0 -1
  624. package/web/chunk-zhwqscat.js.br +0 -0
  625. package/web/chunk-zhwqscat.js.gz +0 -0
  626. package/web/chunk-znrsm604.js.br +0 -0
  627. package/web/chunk-znrsm604.js.gz +0 -0
  628. package/web/chunk-zthww0ws.js.br +0 -0
  629. package/web/chunk-zthww0ws.js.gz +0 -0
Binary file
Binary file
@@ -0,0 +1 @@
1
+ import{Ca}from"./chunk-et1nm6h1.js";export{Ca as createRailroadAbnfServices};
Binary file
Binary file
@@ -1,9 +1,9 @@
1
- import{t,Zn,a,Ie,k,A,R,I,L,D,P,M,u,h,F,bt,Ri,De,Te,Ee,ln,ze,Ue}from"./chunk-v2bkkhb8.js";import{Dn}from"./chunk-xvmzsftt.js";import{Fe}from"./chunk-1ghnag5v.js";import{Le}from"./chunk-vhpzp7zd.js";var Ye=function(){var s=t(function(q,o,c,f){for(c=c||{},f=q.length;f--;c[q[f]]=o);return c},"o"),l=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],p=[2,2],n=[1,7],d=[1,9],y=[1,10],T=[1,11],_=[1,12],C=[1,30],g=[1,23],m=[1,24],w=[1,25],W=[1,26],X=[1,27],O=[1,19],G=[1,28],te=[1,29],V=[1,20],Y=[1,18],z=[1,21],U=[1,22],Pe=[2,6],b=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],Ce=[1,36],Oe=[1,37],Ne=[1,38],xe=[1,39],Ae=[1,40],se=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],K=[1,46],Z=[1,47],ie=[1,57],re=[43,51,53,54,55,74,75],ae=[1,70],ne=[1,68],j=[1,65],oe=[1,69],le=[1,71],ue=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],de=[1,78],be=[1,77],pe=[1,76],Ke=[69,70,71,72,73],Ze=[1,91],je=[6,9,45,50],J=[6,9,12,44,45,50,51,52],fe=[1,101],ke=[1,100],ge=[1,99],ce=[18,61],qe=[1,110],We=[1,109],He=[20,43,51,53,54,55],Re=[18,61,64,66],ve={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:t(function(o,c,f,r,E,e,he){var i=e.length-1;switch(E){case 1:break;case 2:this.$=[];break;case 3:this.$=e[i-1].concat(e[i]);break;case 4:this.$=e[i];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(e[i-4]),r.addEntity(e[i-2]),r.addRelationship(e[i-4],e[i],e[i-2],e[i-3]),this.$=[e[i-4],e[i-2]];break;case 8:r.addEntity(e[i-8]),r.addEntity(e[i-4]),r.addRelationship(e[i-8],e[i],e[i-4],e[i-5]),r.setClass([e[i-8]],e[i-6]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-8],e[i-4]];break;case 9:r.addEntity(e[i-6]),r.addEntity(e[i-2]),r.addRelationship(e[i-6],e[i],e[i-2],e[i-3]),r.setClass([e[i-6]],e[i-4]),this.$=[e[i-6],e[i-2]];break;case 10:r.addEntity(e[i-6]),r.addEntity(e[i-4]),r.addRelationship(e[i-6],e[i],e[i-4],e[i-5]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-6],e[i-4]];break;case 11:r.addEntity(e[i-3]),r.addAttributes(e[i-3],e[i-1]),this.$=[e[i-3]];break;case 12:r.addEntity(e[i-5]),r.addAttributes(e[i-5],e[i-1]),r.setClass([e[i-5]],e[i-3]),this.$=[e[i-5]];break;case 13:r.addEntity(e[i-2]),this.$=[e[i-2]];break;case 14:r.addEntity(e[i-4]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-4]];break;case 15:r.addEntity(e[i]),this.$=[e[i]];break;case 16:r.addEntity(e[i-2]),r.setClass([e[i-2]],e[i]),this.$=[e[i-2]];break;case 17:r.addEntity(e[i-6],e[i-4]),r.addAttributes(e[i-6],e[i-1]),this.$=[e[i-6]];break;case 18:r.addEntity(e[i-8],e[i-6]),r.addAttributes(e[i-8],e[i-1]),r.setClass([e[i-8]],e[i-3]),this.$=[e[i-8]];break;case 19:r.addEntity(e[i-5],e[i-3]),this.$=[e[i-5]];break;case 20:r.addEntity(e[i-7],e[i-5]),r.setClass([e[i-7]],e[i-2]),this.$=[e[i-7]];break;case 21:r.addEntity(e[i-3],e[i-1]);break;case 22:r.addEntity(e[i-5],e[i-3]),r.setClass([e[i-5]],e[i]);break;case 23:case 24:this.$=e[i].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=e[i].trim(),r.setAccDescription(this.$);break;case 27:if(!r.subgraphDepth)r.setDirection(e[i].value),this.$=[];else this.$=e[i];break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:e[i-2].id},e[i-1],{text:e[i-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-1],text:e[i-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-4],text:e[i-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=e[i];break;case 35:this.$=e[i-1]+" "+e[i];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=e[i-3],r.addClass(e[i-2],e[i-1]);break;case 41:case 42:case 63:case 72:this.$=[e[i]];break;case 43:case 44:this.$=e[i-2].concat([e[i]]);break;case 45:this.$=e[i-2],r.setClass(e[i-1],e[i]);break;case 46:this.$=e[i-3],r.addCssStyles(e[i-2],e[i-1]);break;case 47:this.$=[e[i]];break;case 48:e[i-2].push(e[i]),this.$=e[i-2];break;case 50:this.$=e[i-1]+e[i];break;case 58:case 84:case 85:this.$=e[i].replace(/"/g,"");break;case 64:e[i].push(e[i-1]),this.$=e[i];break;case 65:this.$={type:e[i-1],name:e[i]};break;case 66:this.$={type:e[i-2],name:e[i-1],keys:e[i]};break;case 67:this.$={type:e[i-2],name:e[i-1],comment:e[i]};break;case 68:this.$={type:e[i-3],name:e[i-2],keys:e[i-1],comment:e[i]};break;case 69:case 71:case 74:this.$=e[i];break;case 70:this.$=e[i-1]+e[i];break;case 73:e[i-2].push(e[i]),this.$=e[i-2];break;case 75:this.$=e[i].replace(/"/g,"");break;case 76:this.$={cardA:e[i],relType:e[i-1],cardB:e[i-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(l,p,{5:3}),{6:[1,4],7:5,8:6,9:n,10:8,21:d,23:y,25:T,27:_,28:13,29:14,30:15,31:16,32:17,34:C,37:g,38:m,39:w,40:W,41:X,43:O,46:G,47:te,51:V,53:Y,54:z,55:U},s(l,Pe,{1:[2,1]}),s(b,[2,3]),s(b,[2,4]),s(b,[2,5]),s(b,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:Ce,70:Oe,71:Ne,72:xe,73:Ae}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(b,[2,26]),s(b,[2,27]),s(b,[2,28]),s(b,[2,29]),s(b,[2,30]),s(b,p,{5:44}),s(se,[2,58]),s(se,[2,59]),s(se,[2,60]),s(se,[2,61]),s(se,[2,62]),s(b,[2,36]),s(b,[2,37]),s(b,[2,38]),s(b,[2,39]),{15:45,43:K,44:Z},{15:48,43:K,44:Z},{15:49,43:K,44:Z},{10:50,43:O,51:V,53:Y,54:z,55:U},{10:51,43:O,51:V,53:Y,54:z,55:U},{15:52,43:K,44:Z},{17:53,18:[1,54],56:55,57:56,61:ie},{10:58,43:O,51:V,53:Y,54:z,55:U},{68:59,74:[1,60],75:[1,61]},s(re,[2,77]),s(re,[2,78]),s(re,[2,79]),s(re,[2,80]),s(re,[2,81]),s(b,[2,23]),s(b,[2,24]),s(b,[2,25]),{6:[1,63],7:5,8:6,9:n,10:8,21:d,23:y,25:T,27:_,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:C,37:g,38:m,39:w,40:W,41:X,43:O,46:G,47:te,51:V,53:Y,54:z,55:U},{12:ae,42:64,44:ne,45:j,48:66,49:67,51:oe,52:le},s(ue,[2,41]),s(ue,[2,42]),{15:72,43:K,44:Z,45:j},{12:ae,42:73,44:ne,45:j,48:66,49:67,51:oe,52:le},{6:de,9:be,19:[1,75],35:74,50:pe},{12:[1,79],14:[1,80]},s(b,[2,16],{67:35,11:81,16:[1,82],45:j,69:Ce,70:Oe,71:Ne,72:xe,73:Ae}),{18:[1,83]},s(b,[2,13]),{17:84,18:[2,63],56:55,57:56,61:ie},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:Ce,70:Oe,71:Ne,72:xe,73:Ae},s(Ke,[2,82]),s(Ke,[2,83]),s(b,[2,31]),s(b,Pe),{6:de,9:be,35:90,45:Ze,50:pe},{43:[1,92],44:[1,93]},s(je,[2,47],{49:94,12:ae,44:ne,51:oe,52:le}),s(J,[2,49]),s(J,[2,54]),s(J,[2,55]),s(J,[2,56]),s(J,[2,57]),s(b,[2,45],{45:j}),{6:de,9:be,35:95,45:Ze,50:pe},s(b,[2,32]),{10:97,36:96,43:O,51:V,53:Y,54:z,55:U},s(b,[2,51]),s(b,[2,52]),s(b,[2,53]),{13:98,43:fe,53:ke,76:ge},{15:102,43:K,44:Z},{10:103,43:O,51:V,53:Y,54:z,55:U},{17:104,18:[1,105],56:55,57:56,61:ie},s(b,[2,11]),{18:[2,64]},s(ce,[2,65],{59:106,60:107,63:108,65:qe,66:We}),s([18,61,65,66],[2,71]),{61:[2,70]},s(b,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(b,[2,40]),{12:ae,44:ne,48:113,49:67,51:oe,52:le},s(ue,[2,43]),s(ue,[2,44]),s(J,[2,50]),s(b,[2,46]),{10:115,20:[1,114],43:O,51:V,53:Y,54:z,55:U},s(He,[2,34]),s(b,[2,7]),s(b,[2,84]),s(b,[2,85]),s(b,[2,86]),{12:[1,116],45:j},{12:[1,118],14:[1,117]},{18:[1,119]},s(b,[2,14]),s(ce,[2,66],{60:120,64:[1,121],66:We}),s(ce,[2,67]),s(Re,[2,72]),s(ce,[2,75]),s(Re,[2,74]),{17:122,18:[1,123],56:55,57:56,61:ie},{15:124,43:K,44:Z},s(je,[2,48],{49:94,12:ae,44:ne,51:oe,52:le}),{6:de,9:be,35:125,50:pe},s(He,[2,35]),{13:126,43:fe,53:ke,76:ge},{15:127,43:K,44:Z},{13:128,43:fe,53:ke,76:ge},s(b,[2,12]),s(ce,[2,68]),{63:129,65:qe},{18:[1,130]},s(b,[2,19]),s(b,[2,22],{16:[1,131],45:j}),s(b,[2,33]),s(b,[2,10]),{12:[1,132],45:j},s(b,[2,9]),s(Re,[2,73]),s(b,[2,17]),{17:133,18:[1,134],56:55,57:56,61:ie},{13:135,43:fe,53:ke,76:ge},{18:[1,136]},s(b,[2,20]),s(b,[2,8]),s(b,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:t(function(o,c){if(c.recoverable)this.trace(o);else{var f=Error(o);throw f.hash=c,f}},"parseError"),parse:t(function(o){var c=this,f=[0],r=[],E=[null],e=[],he=this.table,i="",_e=0,Qe=0,Xe=0,rt=2,Je=1,at=e.slice.call(arguments,1),S=Object.create(this.lexer),H={yy:{}};for(var we in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,we))H.yy[we]=this.yy[we];if(S.setInput(o,H.yy),H.yy.lexer=S,H.yy.parser=this,typeof S.yylloc>"u")S.yylloc={};var Ve=S.yylloc;e.push(Ve);var nt=S.options&&S.options.ranges;if(typeof H.yy.parseError==="function")this.parseError=H.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ot(v){f.length=f.length-2*v,E.length=E.length-v,e.length=e.length-v}t(ot,"popStack");function $e(){var v=r.pop()||S.lex()||Je;if(typeof v!=="number"){if(v instanceof Array)r=v,v=r.pop();v=c.symbols_[v]||v}return v}t($e,"lex");var N,Me,Q,x,ft,Be,ee={},me,B,et,Se;while(!0){if(Q=f[f.length-1],this.defaultActions[Q])x=this.defaultActions[Q];else{if(N===null||typeof N>"u")N=$e();x=he[Q]&&he[Q][N]}if(typeof x>"u"||!x.length||!x[0]){var Ge="";Se=[];for(me in he[Q])if(this.terminals_[me]&&me>rt)Se.push("'"+this.terminals_[me]+"'");if(S.showPosition)Ge="Parse error on line "+(_e+1)+`:
1
+ import{t,Zn,a,Ie,k,A,R,I,L,D,P,N,u,h,F,bt,Ri,De,Te,Ee,ln,ze,Ue}from"./chunk-xp2zpmpp.js";import{Dn}from"./chunk-5yz46tjw.js";import{Fe}from"./chunk-m34et8g4.js";import{Le}from"./chunk-gt62acsh.js";var Ye=function(){var s=t(function(q,o,c,f){for(c=c||{},f=q.length;f--;c[q[f]]=o);return c},"o"),l=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],p=[2,2],n=[1,7],d=[1,9],y=[1,10],T=[1,11],_=[1,12],C=[1,30],g=[1,23],m=[1,24],V=[1,25],W=[1,26],X=[1,27],O=[1,19],G=[1,28],te=[1,29],M=[1,20],Y=[1,18],z=[1,21],U=[1,22],Pe=[2,6],b=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],Ce=[1,36],Oe=[1,37],Ne=[1,38],xe=[1,39],Ae=[1,40],se=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],K=[1,46],Z=[1,47],ie=[1,57],re=[43,51,53,54,55,74,75],ae=[1,70],ne=[1,68],j=[1,65],oe=[1,69],le=[1,71],ue=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],de=[1,78],be=[1,77],pe=[1,76],Ke=[69,70,71,72,73],Ze=[1,91],je=[6,9,45,50],J=[6,9,12,44,45,50,51,52],fe=[1,101],ke=[1,100],ge=[1,99],ce=[18,61],qe=[1,110],We=[1,109],He=[20,43,51,53,54,55],Re=[18,61,64,66],ve={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:t(function(o,c,f,r,E,e,he){var i=e.length-1;switch(E){case 1:break;case 2:this.$=[];break;case 3:this.$=e[i-1].concat(e[i]);break;case 4:this.$=e[i];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(e[i-4]),r.addEntity(e[i-2]),r.addRelationship(e[i-4],e[i],e[i-2],e[i-3]),this.$=[e[i-4],e[i-2]];break;case 8:r.addEntity(e[i-8]),r.addEntity(e[i-4]),r.addRelationship(e[i-8],e[i],e[i-4],e[i-5]),r.setClass([e[i-8]],e[i-6]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-8],e[i-4]];break;case 9:r.addEntity(e[i-6]),r.addEntity(e[i-2]),r.addRelationship(e[i-6],e[i],e[i-2],e[i-3]),r.setClass([e[i-6]],e[i-4]),this.$=[e[i-6],e[i-2]];break;case 10:r.addEntity(e[i-6]),r.addEntity(e[i-4]),r.addRelationship(e[i-6],e[i],e[i-4],e[i-5]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-6],e[i-4]];break;case 11:r.addEntity(e[i-3]),r.addAttributes(e[i-3],e[i-1]),this.$=[e[i-3]];break;case 12:r.addEntity(e[i-5]),r.addAttributes(e[i-5],e[i-1]),r.setClass([e[i-5]],e[i-3]),this.$=[e[i-5]];break;case 13:r.addEntity(e[i-2]),this.$=[e[i-2]];break;case 14:r.addEntity(e[i-4]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-4]];break;case 15:r.addEntity(e[i]),this.$=[e[i]];break;case 16:r.addEntity(e[i-2]),r.setClass([e[i-2]],e[i]),this.$=[e[i-2]];break;case 17:r.addEntity(e[i-6],e[i-4]),r.addAttributes(e[i-6],e[i-1]),this.$=[e[i-6]];break;case 18:r.addEntity(e[i-8],e[i-6]),r.addAttributes(e[i-8],e[i-1]),r.setClass([e[i-8]],e[i-3]),this.$=[e[i-8]];break;case 19:r.addEntity(e[i-5],e[i-3]),this.$=[e[i-5]];break;case 20:r.addEntity(e[i-7],e[i-5]),r.setClass([e[i-7]],e[i-2]),this.$=[e[i-7]];break;case 21:r.addEntity(e[i-3],e[i-1]);break;case 22:r.addEntity(e[i-5],e[i-3]),r.setClass([e[i-5]],e[i]);break;case 23:case 24:this.$=e[i].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=e[i].trim(),r.setAccDescription(this.$);break;case 27:if(!r.subgraphDepth)r.setDirection(e[i].value),this.$=[];else this.$=e[i];break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:e[i-2].id},e[i-1],{text:e[i-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-1],text:e[i-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-4],text:e[i-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=e[i];break;case 35:this.$=e[i-1]+" "+e[i];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=e[i-3],r.addClass(e[i-2],e[i-1]);break;case 41:case 42:case 63:case 72:this.$=[e[i]];break;case 43:case 44:this.$=e[i-2].concat([e[i]]);break;case 45:this.$=e[i-2],r.setClass(e[i-1],e[i]);break;case 46:this.$=e[i-3],r.addCssStyles(e[i-2],e[i-1]);break;case 47:this.$=[e[i]];break;case 48:e[i-2].push(e[i]),this.$=e[i-2];break;case 50:this.$=e[i-1]+e[i];break;case 58:case 84:case 85:this.$=e[i].replace(/"/g,"");break;case 64:e[i].push(e[i-1]),this.$=e[i];break;case 65:this.$={type:e[i-1],name:e[i]};break;case 66:this.$={type:e[i-2],name:e[i-1],keys:e[i]};break;case 67:this.$={type:e[i-2],name:e[i-1],comment:e[i]};break;case 68:this.$={type:e[i-3],name:e[i-2],keys:e[i-1],comment:e[i]};break;case 69:case 71:case 74:this.$=e[i];break;case 70:this.$=e[i-1]+e[i];break;case 73:e[i-2].push(e[i]),this.$=e[i-2];break;case 75:this.$=e[i].replace(/"/g,"");break;case 76:this.$={cardA:e[i],relType:e[i-1],cardB:e[i-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(l,p,{5:3}),{6:[1,4],7:5,8:6,9:n,10:8,21:d,23:y,25:T,27:_,28:13,29:14,30:15,31:16,32:17,34:C,37:g,38:m,39:V,40:W,41:X,43:O,46:G,47:te,51:M,53:Y,54:z,55:U},s(l,Pe,{1:[2,1]}),s(b,[2,3]),s(b,[2,4]),s(b,[2,5]),s(b,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:Ce,70:Oe,71:Ne,72:xe,73:Ae}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(b,[2,26]),s(b,[2,27]),s(b,[2,28]),s(b,[2,29]),s(b,[2,30]),s(b,p,{5:44}),s(se,[2,58]),s(se,[2,59]),s(se,[2,60]),s(se,[2,61]),s(se,[2,62]),s(b,[2,36]),s(b,[2,37]),s(b,[2,38]),s(b,[2,39]),{15:45,43:K,44:Z},{15:48,43:K,44:Z},{15:49,43:K,44:Z},{10:50,43:O,51:M,53:Y,54:z,55:U},{10:51,43:O,51:M,53:Y,54:z,55:U},{15:52,43:K,44:Z},{17:53,18:[1,54],56:55,57:56,61:ie},{10:58,43:O,51:M,53:Y,54:z,55:U},{68:59,74:[1,60],75:[1,61]},s(re,[2,77]),s(re,[2,78]),s(re,[2,79]),s(re,[2,80]),s(re,[2,81]),s(b,[2,23]),s(b,[2,24]),s(b,[2,25]),{6:[1,63],7:5,8:6,9:n,10:8,21:d,23:y,25:T,27:_,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:C,37:g,38:m,39:V,40:W,41:X,43:O,46:G,47:te,51:M,53:Y,54:z,55:U},{12:ae,42:64,44:ne,45:j,48:66,49:67,51:oe,52:le},s(ue,[2,41]),s(ue,[2,42]),{15:72,43:K,44:Z,45:j},{12:ae,42:73,44:ne,45:j,48:66,49:67,51:oe,52:le},{6:de,9:be,19:[1,75],35:74,50:pe},{12:[1,79],14:[1,80]},s(b,[2,16],{67:35,11:81,16:[1,82],45:j,69:Ce,70:Oe,71:Ne,72:xe,73:Ae}),{18:[1,83]},s(b,[2,13]),{17:84,18:[2,63],56:55,57:56,61:ie},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:Ce,70:Oe,71:Ne,72:xe,73:Ae},s(Ke,[2,82]),s(Ke,[2,83]),s(b,[2,31]),s(b,Pe),{6:de,9:be,35:90,45:Ze,50:pe},{43:[1,92],44:[1,93]},s(je,[2,47],{49:94,12:ae,44:ne,51:oe,52:le}),s(J,[2,49]),s(J,[2,54]),s(J,[2,55]),s(J,[2,56]),s(J,[2,57]),s(b,[2,45],{45:j}),{6:de,9:be,35:95,45:Ze,50:pe},s(b,[2,32]),{10:97,36:96,43:O,51:M,53:Y,54:z,55:U},s(b,[2,51]),s(b,[2,52]),s(b,[2,53]),{13:98,43:fe,53:ke,76:ge},{15:102,43:K,44:Z},{10:103,43:O,51:M,53:Y,54:z,55:U},{17:104,18:[1,105],56:55,57:56,61:ie},s(b,[2,11]),{18:[2,64]},s(ce,[2,65],{59:106,60:107,63:108,65:qe,66:We}),s([18,61,65,66],[2,71]),{61:[2,70]},s(b,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(b,[2,40]),{12:ae,44:ne,48:113,49:67,51:oe,52:le},s(ue,[2,43]),s(ue,[2,44]),s(J,[2,50]),s(b,[2,46]),{10:115,20:[1,114],43:O,51:M,53:Y,54:z,55:U},s(He,[2,34]),s(b,[2,7]),s(b,[2,84]),s(b,[2,85]),s(b,[2,86]),{12:[1,116],45:j},{12:[1,118],14:[1,117]},{18:[1,119]},s(b,[2,14]),s(ce,[2,66],{60:120,64:[1,121],66:We}),s(ce,[2,67]),s(Re,[2,72]),s(ce,[2,75]),s(Re,[2,74]),{17:122,18:[1,123],56:55,57:56,61:ie},{15:124,43:K,44:Z},s(je,[2,48],{49:94,12:ae,44:ne,51:oe,52:le}),{6:de,9:be,35:125,50:pe},s(He,[2,35]),{13:126,43:fe,53:ke,76:ge},{15:127,43:K,44:Z},{13:128,43:fe,53:ke,76:ge},s(b,[2,12]),s(ce,[2,68]),{63:129,65:qe},{18:[1,130]},s(b,[2,19]),s(b,[2,22],{16:[1,131],45:j}),s(b,[2,33]),s(b,[2,10]),{12:[1,132],45:j},s(b,[2,9]),s(Re,[2,73]),s(b,[2,17]),{17:133,18:[1,134],56:55,57:56,61:ie},{13:135,43:fe,53:ke,76:ge},{18:[1,136]},s(b,[2,20]),s(b,[2,8]),s(b,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:t(function(o,c){if(c.recoverable)this.trace(o);else{var f=Error(o);throw f.hash=c,f}},"parseError"),parse:t(function(o){var c=this,f=[0],r=[],E=[null],e=[],he=this.table,i="",_e=0,Qe=0,Xe=0,rt=2,Je=1,at=e.slice.call(arguments,1),S=Object.create(this.lexer),H={yy:{}};for(var we in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,we))H.yy[we]=this.yy[we];if(S.setInput(o,H.yy),H.yy.lexer=S,H.yy.parser=this,typeof S.yylloc>"u")S.yylloc={};var Ve=S.yylloc;e.push(Ve);var nt=S.options&&S.options.ranges;if(typeof H.yy.parseError==="function")this.parseError=H.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ot(w){f.length=f.length-2*w,E.length=E.length-w,e.length=e.length-w}t(ot,"popStack");function $e(){var w=r.pop()||S.lex()||Je;if(typeof w!=="number"){if(w instanceof Array)r=w,w=r.pop();w=c.symbols_[w]||w}return w}t($e,"lex");var x,Me,Q,v,ft,Be,ee={},me,B,et,Se;while(!0){if(Q=f[f.length-1],this.defaultActions[Q])v=this.defaultActions[Q];else{if(x===null||typeof x>"u")x=$e();v=he[Q]&&he[Q][x]}if(typeof v>"u"||!v.length||!v[0]){var Ge="";Se=[];for(me in he[Q])if(this.terminals_[me]&&me>rt)Se.push("'"+this.terminals_[me]+"'");if(S.showPosition)Ge="Parse error on line "+(_e+1)+`:
2
2
  `+S.showPosition()+`
3
- Expecting `+Se.join(", ")+", got '"+(this.terminals_[N]||N)+"'";else Ge="Parse error on line "+(_e+1)+": Unexpected "+(N==Je?"end of input":"'"+(this.terminals_[N]||N)+"'");this.parseError(Ge,{text:S.match,token:this.terminals_[N]||N,line:S.yylineno,loc:Ve,expected:Se})}if(x[0]instanceof Array&&x.length>1)throw Error("Parse Error: multiple actions possible at state: "+Q+", token: "+N);switch(x[0]){case 1:if(f.push(N),E.push(S.yytext),e.push(S.yylloc),f.push(x[1]),N=null,!Me){if(Qe=S.yyleng,i=S.yytext,_e=S.yylineno,Ve=S.yylloc,Xe>0)Xe--}else N=Me,Me=null;break;case 2:if(B=this.productions_[x[1]][1],ee.$=E[E.length-B],ee._$={first_line:e[e.length-(B||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(B||1)].first_column,last_column:e[e.length-1].last_column},nt)ee._$.range=[e[e.length-(B||1)].range[0],e[e.length-1].range[1]];if(Be=this.performAction.apply(ee,[i,Qe,_e,H.yy,x[1],E,e].concat(at)),typeof Be<"u")return Be;if(B)f=f.slice(0,-1*B*2),E=E.slice(0,-1*B),e=e.slice(0,-1*B);f.push(this.productions_[x[1]][0]),E.push(ee.$),e.push(ee._$),et=he[f[f.length-2]][f[f.length-1]],f.push(et);break;case 3:return!0}}return!0},"parse")},it=function(){var q={EOF:1,parseError:t(function(c,f){if(this.yy.parser)this.yy.parser.parseError(c,f);else throw Error(c)},"parseError"),setInput:t(function(o,c){if(this.yy=c||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 c=o.match(/(?:\r\n?|\n).*/g);if(c)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 c=o.length,f=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var r=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),f.length-1)this.yylineno-=f.length-1;var E=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:f?(f.length===r.length?this.yylloc.first_column:0)+r[r.length-f.length].length-f[0].length:this.yylloc.first_column-c},this.options.ranges)this.yylloc.range=[E[0],E[0]+this.yyleng-c];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 `+Se.join(", ")+", got '"+(this.terminals_[x]||x)+"'";else Ge="Parse error on line "+(_e+1)+": Unexpected "+(x==Je?"end of input":"'"+(this.terminals_[x]||x)+"'");this.parseError(Ge,{text:S.match,token:this.terminals_[x]||x,line:S.yylineno,loc:Ve,expected:Se})}if(v[0]instanceof Array&&v.length>1)throw Error("Parse Error: multiple actions possible at state: "+Q+", token: "+x);switch(v[0]){case 1:if(f.push(x),E.push(S.yytext),e.push(S.yylloc),f.push(v[1]),x=null,!Me){if(Qe=S.yyleng,i=S.yytext,_e=S.yylineno,Ve=S.yylloc,Xe>0)Xe--}else x=Me,Me=null;break;case 2:if(B=this.productions_[v[1]][1],ee.$=E[E.length-B],ee._$={first_line:e[e.length-(B||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(B||1)].first_column,last_column:e[e.length-1].last_column},nt)ee._$.range=[e[e.length-(B||1)].range[0],e[e.length-1].range[1]];if(Be=this.performAction.apply(ee,[i,Qe,_e,H.yy,v[1],E,e].concat(at)),typeof Be<"u")return Be;if(B)f=f.slice(0,-1*B*2),E=E.slice(0,-1*B),e=e.slice(0,-1*B);f.push(this.productions_[v[1]][0]),E.push(ee.$),e.push(ee._$),et=he[f[f.length-2]][f[f.length-1]],f.push(et);break;case 3:return!0}}return!0},"parse")},it=function(){var q={EOF:1,parseError:t(function(c,f){if(this.yy.parser)this.yy.parser.parseError(c,f);else throw Error(c)},"parseError"),setInput:t(function(o,c){if(this.yy=c||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 c=o.match(/(?:\r\n?|\n).*/g);if(c)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 c=o.length,f=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var r=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),f.length-1)this.yylineno-=f.length-1;var E=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:f?(f.length===r.length?this.yylloc.first_column:0)+r[r.length-f.length].length-f[0].length:this.yylloc.first_column-c},this.options.ranges)this.yylloc.range=[E[0],E[0]+this.yyleng-c];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(),c=Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
5
  `+c+"^"},"showPosition"),test_match:t(function(o,c){var f,r,E;if(this.options.backtrack_lexer){if(E={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)E.yylloc.range=this.yylloc.range.slice(0)}if(r=o[0].match(/(?:\r\n?|\n).*/g),r)this.yylineno+=r.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.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],f=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(f)return f;else if(this._backtrack){for(var e in E)this[e]=E[e];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var o,c,f,r;if(!this._more)this.yytext="",this.match="";var E=this._currentRules();for(var e=0;e<E.length;e++)if(f=this._input.match(this.rules[E[e]]),f&&(!c||f[0].length>c[0].length)){if(c=f,r=e,this.options.backtrack_lexer)if(o=this.test_match(f,E[e]),o!==!1)return o;else if(this._backtrack){c=!1;continue}else return!1;else if(!this.options.flex)break}if(c){if(o=this.test_match(c,E[r]),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 c=this.next();if(c)return c;else return this.lex()},"lex"),begin:t(function(c){this.conditionStack.push(c)},"begin"),popState:t(function(){var c=this.conditionStack.length-1;if(c>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(c){if(c=this.conditionStack.length-1-Math.abs(c||0),c>=0)return this.conditionStack[c];else return"INITIAL"},"topState"),pushState:t(function(c){this.begin(c)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(c,f,r,E){var e=E;switch(r){case 0:return this.begin("acc_title"),23;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),25;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;break;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;break;case 32:return f.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;break;case 36:return this.popState(),9;break;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;break;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return f.yytext[0];case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}};return q}();ve.lexer=it;function ye(){this.yy={}}return t(ye,"Parser"),ye.prototype=ve,ve.Parser=ye,new ye}();Ye.parser=Ye;var lt=Ye,ct=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=R,this.getAccTitle=I,this.setAccDescription=L,this.getAccDescription=D,this.setDiagramTitle=P,this.getDiagramTitle=M,this.getConfig=t(()=>u().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{t(this,"ErDB")}addEntity(s,l=""){if(!this.entities.has(s))this.entities.set(s,{id:`entity-${s}-${this.entities.size}`,label:s,attributes:[],alias:l,shape:"erBox",look:u().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),a.info("Added new entity :",s);else if(!this.entities.get(s)?.alias&&l)this.entities.get(s).alias=l,a.info(`Add alias '${l}' to entity '${s}'`);return this.entities.get(s)}getEntity(s){return this.entities.get(s)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(s,l){let p=this.addEntity(s),n;for(n=l.length-1;n>=0;n--){if(!l[n].keys)l[n].keys=[];if(!l[n].comment)l[n].comment="";p.attributes.push(l[n]),a.debug("Added attribute ",l[n].name)}}addRelationship(s,l,p,n){let d;if(this.subGraphLookup.has(s))d=s;else{let _=this.addEntity(s);if(!_)return;d=_.id}let y;if(this.subGraphLookup.has(p))y=p;else{let _=this.addEntity(p);if(!_)return;y=_.id}let T={entityA:d,roleA:l,entityB:y,relSpec:n};this.relationships.push(T),a.debug("Added new relationship :",T)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(s){this.direction=s}getCompiledStyles(s){let l=[];for(let p of s){let n=this.classes.get(p);if(n?.styles)l=[...l,...n.styles??[]].map((d)=>d.trim());if(n?.textStyles)l=[...l,...n.textStyles??[]].map((d)=>d.trim())}return l}addCssStyles(s,l){for(let p of s){let n=this.entities.get(p),d=this.subGraphLookup.get(p);if(!l)continue;if(n)for(let y of l)n.cssStyles.push(y);if(d){if(!d.cssStyles)d.cssStyles=[];for(let y of l)d.cssStyles.push(y)}}}addClass(s,l){s.forEach((p)=>{let n=this.classes.get(p);if(n===void 0)n={id:p,styles:[],textStyles:[]},this.classes.set(p,n);if(l)l.forEach(function(d){if(/color/.exec(d)){let y=d.replace("fill","bgFill");n.textStyles.push(y)}n.styles.push(d)})})}addSubGraph(s,l,p){let n=s.text.trim(),d=p.text,T=t((m)=>{let w=new Set,W;return{nodeList:m.filter((O)=>{if(O?.stmt){if(O.stmt==="dir")W=O.value;return!1}if(typeof O!=="string")return!1;let G=O.trim();if(!G)return!1;if(w.has(G))return!1;return w.add(G),!0}),dir:W}},"uniq")(l.flat()),{nodeList:_,dir:C}=T;n=n??"subGraph"+this.subCount,d=d||"",d=this.sanitizeText(d),this.subCount=this.subCount+1;let g={id:n,nodes:_,title:d.trim(),classes:[],cssStyles:[],dir:C,labelType:this.sanitizeNodeLabelType(p?.type)};return a.info("Adding",g.id,g.nodes,g.dir),g.nodes=this.makeUniq(g,this.subGraphs).nodes,this.subGraphs.push(g),this.subGraphLookup.set(n,g),n}getSubGraphs(){return this.subGraphs}setClass(s,l){for(let p of s){let n=this.entities.get(p);if(n)for(let y of l)n.cssClasses+=" "+y;let d=this.subGraphLookup.get(p);if(d)for(let y of l)d.classes.push(y)}}subgraphNodeCache(s){let l=new Set;for(let p of s)for(let n of p.nodes)l.add(n);return l}makeUniq(s,l){let p=this.subgraphNodeCache(l),n=[];return s.nodes.forEach((d,y)=>{if(p.has(d))a.warn(`Entity '${d}' already belongs to another subgraph and will be ignored`);else n.push(s.nodes[y])}),{nodes:n}}sanitizeText(s){return k.sanitizeText(s,u())}sanitizeNodeLabelType(s){switch(s){case"markdown":case"string":case"text":return s;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,A()}getData(){let s=[],l=[],p=u(),n=this.getSubGraphs(),d=new Map,y=new Map;for(let g=n.length-1;g>=0;g--){let m=n[g];if(m.nodes.length>0)y.set(m.id,!0);for(let w of m.nodes)d.set(w,m.id)}for(let g=n.length-1;g>=0;g--){let m=n[g];s.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:d.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssStyles:m.cssStyles,cssClasses:m.classes.join(" "),shape:"rect",dir:m.dir,isGroup:!0,look:p.look})}let T=new Set(n.map((g)=>g.id)),_=0;for(let g of this.entities.keys()){if(T.has(g))continue;let m=this.entities.get(g);if(m)m.cssCompiledStyles=this.getCompiledStyles(m.cssClasses.split(" ")),m.colorIndex=_++,s.push({...m,parentId:d.get(g),isGroup:!1})}let C=0;for(let g of this.relationships){let m={id:bt(g.entityA,g.entityB,{prefix:"id",counter:C++}),type:"normal",curve:"basis",start:g.entityA,end:g.entityB,label:g.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:g.relSpec.cardB.toLowerCase(),arrowTypeEnd:g.relSpec.cardA.toLowerCase(),pattern:g.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:p.look,labelType:"markdown"};l.push(m)}return{nodes:s,edges:l,other:{},config:p,direction:this.direction}}},st={};Zn(st,{draw:()=>ht});var ht=t(async function(s,l,p,n){a.info("REF0:"),a.info("Drawing er diagram (unified)",l);let{securityLevel:d,er:y,layout:T}=u(),_=n.db.getData(),C=Fe(l,d);_.type=n.type,_.layoutAlgorithm=Ue(T),_.config.flowchart.nodeSpacing=y?.nodeSpacing||140,_.config.flowchart.rankSpacing=y?.rankSpacing||80,_.direction=n.db.getDirection();let{config:g}=_,{look:m}=g;if(m==="neo")_.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"];else _.markers=["only_one","zero_or_one","one_or_more","zero_or_more"];_.diagramId=l,await ze(_,C);let w=C.selectAll('[id*="-background"]');if(Array.from(w).length>0)w.each(function(){let X=h(this),G=X.attr("id").replace("-background",""),te=C.select(`#${CSS.escape(G)}`);if(!te.empty()){let V=te.attr("transform");X.attr("transform",V)}});let W=8;F.insertTitle(C,"erDiagramTitleText",y?.titleTopMargin??25,n.db.getDiagramTitle()),Le(C,W,"erDiagram",y?.useMaxWidth??!0)},"draw"),tt=t((s,l)=>{let p=Dn,n=p(s,"r"),d=p(s,"g"),y=p(s,"b");return Ie(n,d,y,l)},"fade"),ut=t((s)=>{let{theme:l,bkgColorArray:p,borderColorArray:n}=s;if(!Te(l,n))return"";let d=Ee(s.look),y=De(p),T="";for(let _=0;_<ln(n);_++){let C=n[_],g=y?`fill: ${p[_%p.length]};`:"";T+=`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var c=this.next();if(c)return c;else return this.lex()},"lex"),begin:t(function(c){this.conditionStack.push(c)},"begin"),popState:t(function(){var c=this.conditionStack.length-1;if(c>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(c){if(c=this.conditionStack.length-1-Math.abs(c||0),c>=0)return this.conditionStack[c];else return"INITIAL"},"topState"),pushState:t(function(c){this.begin(c)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(c,f,r,E){var e=E;switch(r){case 0:return this.begin("acc_title"),23;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),25;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;break;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;break;case 32:return f.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;break;case 36:return this.popState(),9;break;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;break;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return f.yytext[0];case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}};return q}();ve.lexer=it;function ye(){this.yy={}}return t(ye,"Parser"),ye.prototype=ve,ve.Parser=ye,new ye}();Ye.parser=Ye;var lt=Ye,ct=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=R,this.getAccTitle=I,this.setAccDescription=L,this.getAccDescription=D,this.setDiagramTitle=P,this.getDiagramTitle=N,this.getConfig=t(()=>u().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{t(this,"ErDB")}addEntity(s,l=""){if(!this.entities.has(s))this.entities.set(s,{id:`entity-${s}-${this.entities.size}`,label:s,attributes:[],alias:l,shape:"erBox",look:u().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),a.info("Added new entity :",s);else if(!this.entities.get(s)?.alias&&l)this.entities.get(s).alias=l,a.info(`Add alias '${l}' to entity '${s}'`);return this.entities.get(s)}getEntity(s){return this.entities.get(s)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(s,l){let p=this.addEntity(s),n;for(n=l.length-1;n>=0;n--){if(!l[n].keys)l[n].keys=[];if(!l[n].comment)l[n].comment="";p.attributes.push(l[n]),a.debug("Added attribute ",l[n].name)}}addRelationship(s,l,p,n){let d;if(this.subGraphLookup.has(s))d=s;else{let _=this.addEntity(s);if(!_)return;d=_.id}let y;if(this.subGraphLookup.has(p))y=p;else{let _=this.addEntity(p);if(!_)return;y=_.id}let T={entityA:d,roleA:l,entityB:y,relSpec:n};this.relationships.push(T),a.debug("Added new relationship :",T)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(s){this.direction=s}getCompiledStyles(s){let l=[];for(let p of s){let n=this.classes.get(p);if(n?.styles)l=[...l,...n.styles??[]].map((d)=>d.trim());if(n?.textStyles)l=[...l,...n.textStyles??[]].map((d)=>d.trim())}return l}addCssStyles(s,l){for(let p of s){let n=this.entities.get(p),d=this.subGraphLookup.get(p);if(!l)continue;if(n)for(let y of l)n.cssStyles.push(y);if(d){if(!d.cssStyles)d.cssStyles=[];for(let y of l)d.cssStyles.push(y)}}}addClass(s,l){s.forEach((p)=>{let n=this.classes.get(p);if(n===void 0)n={id:p,styles:[],textStyles:[]},this.classes.set(p,n);if(l)l.forEach(function(d){if(/color/.exec(d)){let y=d.replace("fill","bgFill");n.textStyles.push(y)}n.styles.push(d)})})}addSubGraph(s,l,p){let n=s.text.trim(),d=p.text,T=t((m)=>{let V=new Set,W;return{nodeList:m.filter((O)=>{if(O?.stmt){if(O.stmt==="dir")W=O.value;return!1}if(typeof O!=="string")return!1;let G=O.trim();if(!G)return!1;if(V.has(G))return!1;return V.add(G),!0}),dir:W}},"uniq")(l.flat()),{nodeList:_,dir:C}=T;n=n??"subGraph"+this.subCount,d=d||"",d=this.sanitizeText(d),this.subCount=this.subCount+1;let g={id:n,nodes:_,title:d.trim(),classes:[],cssStyles:[],dir:C,labelType:this.sanitizeNodeLabelType(p?.type)};return a.info("Adding",g.id,g.nodes,g.dir),g.nodes=this.makeUniq(g,this.subGraphs).nodes,this.subGraphs.push(g),this.subGraphLookup.set(n,g),n}getSubGraphs(){return this.subGraphs}setClass(s,l){for(let p of s){let n=this.entities.get(p);if(n)for(let y of l)n.cssClasses+=" "+y;let d=this.subGraphLookup.get(p);if(d)for(let y of l)d.classes.push(y)}}subgraphNodeCache(s){let l=new Set;for(let p of s)for(let n of p.nodes)l.add(n);return l}makeUniq(s,l){let p=this.subgraphNodeCache(l),n=[];return s.nodes.forEach((d,y)=>{if(p.has(d))a.warn(`Entity '${d}' already belongs to another subgraph and will be ignored`);else n.push(s.nodes[y])}),{nodes:n}}sanitizeText(s){return k.sanitizeText(s,u())}sanitizeNodeLabelType(s){switch(s){case"markdown":case"string":case"text":return s;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,A()}getData(){let s=[],l=[],p=u(),n=this.getSubGraphs(),d=new Map,y=new Map;for(let g=n.length-1;g>=0;g--){let m=n[g];if(m.nodes.length>0)y.set(m.id,!0);for(let V of m.nodes)d.set(V,m.id)}for(let g=n.length-1;g>=0;g--){let m=n[g];s.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:d.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssStyles:m.cssStyles,cssClasses:m.classes.join(" "),shape:"rect",dir:m.dir,isGroup:!0,look:p.look})}let T=new Set(n.map((g)=>g.id)),_=0;for(let g of this.entities.keys()){if(T.has(g))continue;let m=this.entities.get(g);if(m)m.cssCompiledStyles=this.getCompiledStyles(m.cssClasses.split(" ")),m.colorIndex=_++,s.push({...m,parentId:d.get(g),isGroup:!1})}let C=0;for(let g of this.relationships){let m={id:bt(g.entityA,g.entityB,{prefix:"id",counter:C++}),type:"normal",curve:"basis",start:g.entityA,end:g.entityB,label:g.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:g.relSpec.cardB.toLowerCase(),arrowTypeEnd:g.relSpec.cardA.toLowerCase(),pattern:g.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:p.look,labelType:"markdown"};l.push(m)}return{nodes:s,edges:l,other:{},config:p,direction:this.direction}}},st={};Zn(st,{draw:()=>ht});var ht=t(async function(s,l,p,n){a.info("REF0:"),a.info("Drawing er diagram (unified)",l);let{securityLevel:d,er:y,layout:T}=u(),_=n.db.getData(),C=Fe(l,d);_.type=n.type,_.layoutAlgorithm=Ue(T),_.config.flowchart.nodeSpacing=y?.nodeSpacing||140,_.config.flowchart.rankSpacing=y?.rankSpacing||80,_.direction=n.db.getDirection();let{config:g}=_,{look:m}=g;if(m==="neo")_.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"];else _.markers=["only_one","zero_or_one","one_or_more","zero_or_more"];_.diagramId=l,await ze(_,C);let V=C.selectAll('[id*="-background"]');if(Array.from(V).length>0)V.each(function(){let X=h(this),G=X.attr("id").replace("-background",""),te=C.select(`#${CSS.escape(G)}`);if(!te.empty()){let M=te.attr("transform");X.attr("transform",M)}});let W=8;F.insertTitle(C,"erDiagramTitleText",y?.titleTopMargin??25,n.db.getDiagramTitle()),Le(C,W,"erDiagram",y?.useMaxWidth??!0)},"draw"),tt=t((s,l)=>{let p=Dn,n=p(s,"r"),d=p(s,"g"),y=p(s,"b");return Ie(n,d,y,l)},"fade"),ut=t((s)=>{let{theme:l,bkgColorArray:p,borderColorArray:n}=s;if(!Te(l,n))return"";let d=Ee(s.look),y=De(p),T="";for(let _=0;_<ln(n);_++){let C=n[_],g=y?`fill: ${p[_%p.length]};`:"";T+=`
7
7
 
8
8
  [data-look="${d}"][data-color-id="color-${_}"].node path {
9
9
  stroke: ${C};
Binary file
Binary file
@@ -1,2 +1,2 @@
1
- import{r,p,e,n,y,s,be,tr,le}from"./chunk-qjg6dw46.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 yi(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(le,{className:"size-3 animate-spin"}),"生成",t.title]}):n(p,{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(tr,{})}),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(be,{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})]})}
1
+ import{r,p,e,n,y,s,be,tr,le}from"./chunk-2s6fhjjc.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 yi(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(le,{className:"size-3 animate-spin"}),"生成",t.title]}):n(p,{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(tr,{})}),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(be,{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
2
  export{yi};
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- import{t,Zn,a,ce,m,f,S,sn,wo,A,u,h,Q,Et,Te,Lt}from"./chunk-v2bkkhb8.js";import{hn}from"./chunk-bks2k04k.js";var ct=function(){var r=t(function(E,o,g,d){for(g=g||{},d=E.length;d--;g[E[d]]=o);return g},"o"),e=[6,11,13,14,15,17,19,20,23,24],s=[1,12],i=[1,13],n=[1,14],p=[1,15],c=[1,16],l=[1,19],v=[1,20],x={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:t(function(o,g,d,k,_,y,I){var T=y.length-1;switch(_){case 1:return y[T-1];case 3:k.setDirection("LR");break;case 4:k.setDirection("TD");break;case 5:this.$=[];break;case 6:y[T-1].push(y[T]),this.$=y[T-1];break;case 7:case 8:this.$=y[T];break;case 9:case 10:this.$=[];break;case 11:k.getCommonDb().setDiagramTitle(y[T].substr(6)),this.$=y[T].substr(6);break;case 12:this.$=y[T].trim(),k.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=y[T].trim(),k.getCommonDb().setAccDescription(this.$);break;case 15:k.addSection(y[T].substr(8)),this.$=y[T].substr(8);break;case 18:k.addTask(y[T],0,""),this.$=y[T];break;case 19:k.addEvent(y[T].substr(2)),this.$=y[T];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},r(e,[2,5],{5:6}),r(e,[2,2]),r(e,[2,3]),r(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:s,15:i,17:n,19:p,20:c,21:17,22:18,23:l,24:v},r(e,[2,10],{1:[2,1]}),r(e,[2,6]),{12:21,14:s,15:i,17:n,19:p,20:c,21:17,22:18,23:l,24:v},r(e,[2,8]),r(e,[2,9]),r(e,[2,11]),{16:[1,22]},{18:[1,23]},r(e,[2,14]),r(e,[2,15]),r(e,[2,16]),r(e,[2,17]),r(e,[2,18]),r(e,[2,19]),r(e,[2,7]),r(e,[2,12]),r(e,[2,13])],defaultActions:{},parseError:t(function(o,g){if(g.recoverable)this.trace(o);else{var d=Error(o);throw d.hash=g,d}},"parseError"),parse:t(function(o){var g=this,d=[0],k=[],_=[null],y=[],I=this.table,T="",W=0,G=0,D=0,q=2,B=1,O=y.slice.call(arguments,1),L=Object.create(this.lexer),F={yy:{}};for(var U in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,U))F.yy[U]=this.yy[U];if(L.setInput(o,F.yy),F.yy.lexer=L,F.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var J=L.yylloc;y.push(J);var C=L.options&&L.options.ranges;if(typeof F.yy.parseError==="function")this.parseError=F.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function N(K){d.length=d.length-2*K,_.length=_.length-K,y.length=y.length-K}t(N,"popStack");function M(){var K=k.pop()||L.lex()||B;if(typeof K!=="number"){if(K instanceof Array)k=K,K=k.pop();K=g.symbols_[K]||K}return K}t(M,"lex");var H,P,V,R,ot,et,j={},rt,X,yt,nt;while(!0){if(V=d[d.length-1],this.defaultActions[V])R=this.defaultActions[V];else{if(H===null||typeof H>"u")H=M();R=I[V]&&I[V][H]}if(typeof R>"u"||!R.length||!R[0]){var lt="";nt=[];for(rt in I[V])if(this.terminals_[rt]&&rt>q)nt.push("'"+this.terminals_[rt]+"'");if(L.showPosition)lt="Parse error on line "+(W+1)+`:
1
+ import{t,Zn,a,ce,m,f,S,sn,wo,A,u,h,Q,Et,Te,Lt}from"./chunk-xp2zpmpp.js";import{hn}from"./chunk-6ts9mtye.js";var ct=function(){var r=t(function(E,o,g,d){for(g=g||{},d=E.length;d--;g[E[d]]=o);return g},"o"),e=[6,11,13,14,15,17,19,20,23,24],s=[1,12],i=[1,13],n=[1,14],p=[1,15],c=[1,16],l=[1,19],v=[1,20],x={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:t(function(o,g,d,k,_,y,I){var T=y.length-1;switch(_){case 1:return y[T-1];case 3:k.setDirection("LR");break;case 4:k.setDirection("TD");break;case 5:this.$=[];break;case 6:y[T-1].push(y[T]),this.$=y[T-1];break;case 7:case 8:this.$=y[T];break;case 9:case 10:this.$=[];break;case 11:k.getCommonDb().setDiagramTitle(y[T].substr(6)),this.$=y[T].substr(6);break;case 12:this.$=y[T].trim(),k.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=y[T].trim(),k.getCommonDb().setAccDescription(this.$);break;case 15:k.addSection(y[T].substr(8)),this.$=y[T].substr(8);break;case 18:k.addTask(y[T],0,""),this.$=y[T];break;case 19:k.addEvent(y[T].substr(2)),this.$=y[T];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},r(e,[2,5],{5:6}),r(e,[2,2]),r(e,[2,3]),r(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:s,15:i,17:n,19:p,20:c,21:17,22:18,23:l,24:v},r(e,[2,10],{1:[2,1]}),r(e,[2,6]),{12:21,14:s,15:i,17:n,19:p,20:c,21:17,22:18,23:l,24:v},r(e,[2,8]),r(e,[2,9]),r(e,[2,11]),{16:[1,22]},{18:[1,23]},r(e,[2,14]),r(e,[2,15]),r(e,[2,16]),r(e,[2,17]),r(e,[2,18]),r(e,[2,19]),r(e,[2,7]),r(e,[2,12]),r(e,[2,13])],defaultActions:{},parseError:t(function(o,g){if(g.recoverable)this.trace(o);else{var d=Error(o);throw d.hash=g,d}},"parseError"),parse:t(function(o){var g=this,d=[0],k=[],_=[null],y=[],I=this.table,T="",W=0,G=0,D=0,q=2,B=1,O=y.slice.call(arguments,1),L=Object.create(this.lexer),F={yy:{}};for(var U in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,U))F.yy[U]=this.yy[U];if(L.setInput(o,F.yy),F.yy.lexer=L,F.yy.parser=this,typeof L.yylloc>"u")L.yylloc={};var J=L.yylloc;y.push(J);var C=L.options&&L.options.ranges;if(typeof F.yy.parseError==="function")this.parseError=F.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function N(K){d.length=d.length-2*K,_.length=_.length-K,y.length=y.length-K}t(N,"popStack");function M(){var K=k.pop()||L.lex()||B;if(typeof K!=="number"){if(K instanceof Array)k=K,K=k.pop();K=g.symbols_[K]||K}return K}t(M,"lex");var H,P,V,R,ot,et,j={},rt,X,yt,nt;while(!0){if(V=d[d.length-1],this.defaultActions[V])R=this.defaultActions[V];else{if(H===null||typeof H>"u")H=M();R=I[V]&&I[V][H]}if(typeof R>"u"||!R.length||!R[0]){var lt="";nt=[];for(rt in I[V])if(this.terminals_[rt]&&rt>q)nt.push("'"+this.terminals_[rt]+"'");if(L.showPosition)lt="Parse error on line "+(W+1)+`:
2
2
  `+L.showPosition()+`
3
3
  Expecting `+nt.join(", ")+", got '"+(this.terminals_[H]||H)+"'";else lt="Parse error on line "+(W+1)+": Unexpected "+(H==B?"end of input":"'"+(this.terminals_[H]||H)+"'");this.parseError(lt,{text:L.match,token:this.terminals_[H]||H,line:L.yylineno,loc:J,expected:nt})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+V+", token: "+H);switch(R[0]){case 1:if(d.push(H),_.push(L.yytext),y.push(L.yylloc),d.push(R[1]),H=null,!P){if(G=L.yyleng,T=L.yytext,W=L.yylineno,J=L.yylloc,D>0)D--}else H=P,P=null;break;case 2:if(X=this.productions_[R[1]][1],j.$=_[_.length-X],j._$={first_line:y[y.length-(X||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(X||1)].first_column,last_column:y[y.length-1].last_column},C)j._$.range=[y[y.length-(X||1)].range[0],y[y.length-1].range[1]];if(et=this.performAction.apply(j,[T,G,W,F.yy,R[1],_,y].concat(O)),typeof et<"u")return et;if(X)d=d.slice(0,-1*X*2),_=_.slice(0,-1*X),y=y.slice(0,-1*X);d.push(this.productions_[R[1]][0]),_.push(j.$),y.push(j._$),yt=I[d[d.length-2]][d[d.length-1]],d.push(yt);break;case 3:return!0}}return!0},"parse")},w=function(){var E={EOF:1,parseError:t(function(g,d){if(this.yy.parser)this.yy.parser.parseError(g,d);else throw Error(g)},"parseError"),setInput:t(function(o,g){if(this.yy=g||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 g=o.match(/(?:\r\n?|\n).*/g);if(g)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 g=o.length,d=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var k=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1)this.yylineno-=d.length-1;var _=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===k.length?this.yylloc.first_column:0)+k[k.length-d.length].length-d[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[_[0],_[0]+this.yyleng-g];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(),g=Array(o.length+1).join("-");return o+this.upcomingInput()+`
Binary file
Binary file
package/web/index.html CHANGED
@@ -27,7 +27,7 @@
27
27
  .catch(() => {})
28
28
  } catch {}
29
29
  </script>
30
- <link rel="stylesheet" crossorigin href="./chunk-h1qv0cpd.css"><script type="module" crossorigin src="./chunk-qjg6dw46.js"></script></head>
30
+ <link rel="stylesheet" crossorigin href="./chunk-gbwy4pfg.css"><script type="module" crossorigin src="./chunk-2s6fhjjc.js"></script></head>
31
31
  <body>
32
32
  <div id="root"></div>
33
33
 
package/web/index.html.br CHANGED
Binary file
package/web/index.html.gz CHANGED
Binary file
package/worker.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Xe,At,Tn,rr,ps,gs,yo,ys,$e,Ss,ot,ws}from"./chunk-svx7mz0w.js";var S="backfill";function c(e){return e.query("SELECT sum((SELECT max(seq) FROM store.entries WHERE session_id = sessions.id)) AS n FROM store.sessions").get()?.n??0}function q(e){let t=Tn(e,S);return t?JSON.parse(t):void 0}function g(e,t){rr(e,S,JSON.stringify(t))}class b{db;indexer;batch;todo;page;state;constructor(e,t,s=500){this.db=e;this.indexer=t;this.batch=s;this.todo=e.query("SELECT session_id FROM main.backfill_todo WHERE ord = ?"),this.page=e.query("SELECT seq, time, body FROM store.entries WHERE session_id = ? AND seq > ? ORDER BY seq LIMIT ?"),this.state=q(e)}get running(){return this.state?.state==="running"}begin(e){this.db.transaction(()=>{let t=this.db.query("SELECT max(id) AS id FROM store.search_queue").get()?.id??0;rr(this.db,"queue_done",t),this.db.run("DELETE FROM main.backfill_todo"),this.db.run("INSERT INTO main.backfill_todo (ord, session_id) SELECT row_number() OVER (ORDER BY updated DESC, id), id FROM store.sessions");let s=this.db.query("SELECT count(*) AS n FROM main.backfill_todo").get()?.n??0,r=c(this.db);this.state={state:s?"running":"done",reason:e,ord:1,seq:-1,total:r,sessionsTotal:s,done:0,sessionsDone:0,startedAt:Date.now()},g(this.db,this.state)})()}step(e){let t=this.state;if(t?.state!=="running")return!1;let s={...t};return this.db.transaction(()=>{let r=this.batch;while(r>0&&s.state==="running"){let n=this.todo.get(s.ord)?.session_id;if(n===void 0){s.state="done",this.db.run("DELETE FROM main.backfill_todo");break}if(s.seq<0)this.indexer.reindex(n,0),s.seq=0;let i=this.page.all(n,s.seq,r);for(let a of i)if(this.indexer.indexRow(n,a.seq,a.time,a.body),s.seq=a.seq,s.done++,r--,performance.now()>e){r=0;break}if(r>0)s.ord++,s.seq=-1,s.sessionsDone++;if(performance.now()>e)break}g(this.db,s)})(),this.state=s,!0}}function M(e,t){return BigInt.asIntN(64,Bun.hash.wyhash(`${e?"B":"M"}${t}`))}class p{db;layout;readEntry;readTitle;previousModel;selectRefs;deleteRefs;insertRef;findDoc;insertDoc;increment;decrement;docRefs;deleteDoc;insertMsg;insertOut;deleteMsg;deleteOut;stats={entries:0,fields:0,bytes:0,newDocs:0,newBytes:0};outChanges=0;constructor(e,t){this.db=e;this.layout=t;this.readEntry=e.query("SELECT time, body FROM store.entries WHERE session_id = ? AND seq = ?"),this.readTitle=e.query("SELECT title, created FROM store.sessions WHERE id = ?"),this.previousModel=e.query("SELECT json_extract(body, '$.model') AS model FROM store.entries WHERE session_id = ? AND seq < ? AND json_extract(body, '$.type') = 'assistant' ORDER BY seq DESC LIMIT 1"),this.selectRefs=e.query("SELECT doc FROM main.ref WHERE session_id = ? AND seq = ?"),this.deleteRefs=e.query("DELETE FROM main.ref WHERE session_id = ? AND seq = ?"),this.insertRef=e.query("INSERT INTO main.ref (session_id, seq, part, doc, kind, tool, err, model, time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"),this.findDoc=e.query("SELECT id FROM main.doc WHERE hash = ?"),this.insertDoc=e.query("INSERT INTO main.doc (hash, refs, len, bulk) VALUES (?, 1, ?, ?)"),this.increment=e.query("UPDATE main.doc SET refs = refs + 1 WHERE id = ?"),this.decrement=e.query("UPDATE main.doc SET refs = refs - 1 WHERE id = ?"),this.docRefs=e.query("SELECT refs, bulk FROM main.doc WHERE id = ?"),this.deleteDoc=e.query("DELETE FROM main.doc WHERE id = ?"),this.insertMsg=e.query("INSERT INTO main.fts (rowid, text) VALUES (?, ?)"),this.insertOut=e.query("INSERT INTO main.fts_out (rowid, text) VALUES (?, ?)"),this.deleteMsg=e.query("DELETE FROM main.fts WHERE rowid = ?"),this.deleteOut=e.query("DELETE FROM main.fts_out WHERE rowid = ?")}reindex(e,t){let s=0,r=[];if(t===0){let n=this.readTitle.get(e);if(n)s=n.created,r=ws(n.title)}else{let n=this.readEntry.get(e,t);if(n)s=n.time,r=this.fields(e,t,n.body)}this.apply(e,t,s,r)}indexRow(e,t,s,r){this.apply(e,t,s,this.fields(e,t,r))}fields(e,t,s){let r;try{r=JSON.parse(s)}catch{return[]}if(!r||typeof r!=="object")return[];let n=ot(r);if(r.type==="tool_result"&&n.length){let i=this.previousModel.get(e,t)?.model??void 0;if(i)for(let a of n)a.model=i}return n}apply(e,t,s,r){let n=this.selectRefs.all(e,t);if(n.length)this.deleteRefs.run(e,t);this.stats.entries++;for(let i of r){let a=Ss(i.kind),l=M(a,i.text);this.stats.fields++,this.stats.bytes+=i.text.length;let o=this.findDoc.get(l)?.id;if(o===void 0){if(o=Number(this.insertDoc.run(l,i.text.length,a?1:0).lastInsertRowid),a)this.insertOut.run(o,yo(i.text)),this.outChanges++;else this.insertMsg.run(o,this.layout.msg==="trigram"?ys(i.text):yo(i.text));this.stats.newDocs++,this.stats.newBytes+=i.text.length}else this.increment.run(o);this.insertRef.run(e,t,i.part,o,$e[i.kind],i.tool??null,i.err?1:0,i.model??null,s)}for(let{doc:i}of n)this.release(i)}release(e){this.decrement.run(e);let t=this.docRefs.get(e);if(!t||t.refs>0)return;if(this.deleteDoc.run(e),t.bulk)this.deleteOut.run(e),this.outChanges++;else this.deleteMsg.run(e)}}class y{db;page;clearRange;clearTail;upsert;constructor(e){this.db=e;this.page=e.query("SELECT term, doc FROM main.fts_out_vocab WHERE term > ? ORDER BY term LIMIT ?"),this.clearRange=e.query("DELETE FROM main.term WHERE t > ? AND t <= ?"),this.clearTail=e.query("DELETE FROM main.term WHERE t > ?"),this.upsert=e.query("INSERT OR REPLACE INTO main.term (t, n) VALUES (?, ?)")}step(e,t){let s=this.page.all(e,t),r=s.at(-1)?.term;if(s.length<t||r===void 0)this.clearTail.run(e);else this.clearRange.run(e,r);for(let{term:n,doc:i}of s)if(n.length<=gs)this.upsert.run(n,i);return s.length<t?void 0:r}}var w=2000,x=30000;class T{options;db;layout;reset;indexer;backfill;terms;queueRows;queueMax;sliceMs;backfillSliceMs;queueBatch;termRefreshMs;queueDone;termCursor;termStale;lastTermRefresh=Number.NEGATIVE_INFINITY;rateStart;estimate;closed=!1;constructor(e){this.options=e;let t=ps(e.indexPath,e.storePath,e.features);if(this.db=t.db,this.layout=t.layout,this.reset=t.reset,this.sliceMs=e.sliceMs??20,this.backfillSliceMs=e.backfillSliceMs??200,this.queueBatch=e.queueBatch??200,this.termRefreshMs=e.termRefreshMs??60000,this.indexer=new p(this.db,this.layout),this.terms=new y(this.db),this.backfill=new b(this.db,this.indexer,e.batch??500),this.queueRows=this.db.query("SELECT id, session_id, seq FROM store.search_queue WHERE id > ? ORDER BY id LIMIT ?"),this.queueMax=this.db.query("SELECT max(id) AS id FROM store.search_queue"),!this.backfill.state)this.backfill.begin(this.reset?"rebuild":"initial");this.queueDone=Number(Tn(this.db,"queue_done")??0),this.termStale=Number(Tn(this.db,"term_stale")??0)===1}step(e){if(this.closed)return!1;if(this.drainQueue(e??performance.now()+this.sliceMs))return!0;if(this.backfill.running){this.rateStart??={time:performance.now(),done:this.backfill.state?.done??0};let t=this.indexer.outChanges;if(this.backfill.step(e??performance.now()+this.backfillSliceMs),this.markTerms(t),!this.backfill.running)this.lastTermRefresh=Number.NEGATIVE_INFINITY;return!0}return this.refreshTerms(e??performance.now()+this.sliceMs)}drain(){while(this.step());}drainQueue(e){let t=!1;return this.db.transaction(()=>{let s=this.queueRows.all(this.queueDone,this.queueBatch);if(!s.length)return;t=!0;let r=this.indexer.outChanges,n=new Set,i=this.queueDone;for(let a of s){let l=`${a.seq}\x00${a.session_id}`;if(!n.has(l))n.add(l),this.indexer.reindex(a.session_id,a.seq);if(i=a.id,performance.now()>e)break}rr(this.db,"queue_done",i),this.markTerms(r),this.queueDone=i})(),t}markTerms(e){if(this.indexer.outChanges===e||this.termStale)return;this.termStale=!0,rr(this.db,"term_stale",1)}refreshTerms(e){if(this.termCursor===void 0){if(!this.termStale||performance.now()-this.lastTermRefresh<this.termRefreshMs)return!1;this.termCursor="",this.termStale=!1,this.indexer.outChanges=0,rr(this.db,"term_stale",0)}while(this.termCursor!==void 0&&performance.now()<=e){let t=this.termCursor;this.db.transaction(()=>{this.termCursor=this.terms.step(t,w)})()}if(this.termCursor===void 0)this.lastTermRefresh=performance.now();return!0}status(){let e=this.queueMax.get()?.id??this.queueDone,t=this.backfill.state,s;if(t?.state==="running"&&this.rateStart){let n=(performance.now()-this.rateStart.time)/1000,i=(t.done-this.rateStart.done)/n;if(n>0.5&&i>0)s=Math.max(0,Math.round(Math.max(0,t.total-t.done)/i))}let r=t?{state:t.state,reason:t.reason,total:t.total,done:t.done,sessionsTotal:t.sessionsTotal,sessionsDone:t.sessionsDone,startedAt:t.startedAt}:void 0;if(!this.estimate||performance.now()-this.estimate.time>x)this.estimate={time:performance.now(),entries:c(this.db)};return{queueDone:this.queueDone,lag:Math.max(0,e-this.queueDone),entries:this.estimate.entries,...r?{backfill:r}:{},...s!==void 0?{etaSec:s}:{},layout:this.layout,reset:this.reset}}withIndex(e){return e(this.db)}close(){if(this.closed)return;this.closed=!0,this.db.close()}}var R=1000,v=100;function D(e){let t,s,r,n=!1,i=!1,a=0,l=[],o=(d)=>e.postMessage(d),m=(d)=>{if(i)return;if(r)clearTimeout(r);r=setTimeout(k,d)},E=()=>{if(!s||Atomics.load(s,Xe)!==1)return;Atomics.store(s,At,1),Atomics.notify(s,At);while(Atomics.load(s,Xe)===1)Atomics.wait(s,Xe,1,1e4);Atomics.store(s,At,0)};function k(){if(r=void 0,i||!t)return;E();let d=!1;try{d=t.step()}catch(f){o({type:"error",message:f instanceof Error?f.message:String(f),fatal:!1}),n=!1,m(R);return}let u=performance.now();if(d){if(n=!0,u-a>=v)a=u,o({type:"status",status:t.status()});m(0);return}n=!1,a=u;let h=t.status();o({type:"status",status:h});for(let f of l.splice(0))o({type:"flushed",id:f,status:h});m(R)}e.onmessage=(d)=>{let u=d.data;if(u.type==="init"){s=new Int32Array(u.flags);try{t=new T(u.options)}catch(h){o({type:"error",message:h instanceof Error?h.message:String(h),fatal:!0});return}o({type:"status",status:t.status()}),m(0)}else if(u.type==="dirty"){if(!n)m(0)}else if(u.type==="pause")E();else if(u.type==="flush"){if(l.push(u.id),!n)m(0)}else if(u.type==="stop"){if(i=!0,r)clearTimeout(r);t?.close(),o({type:"stopped"})}}}if(!Bun.isMainThread)D(globalThis);export{T as SearchEngine};
2
+ import{Xe,Et,Tn,rr,ps,gs,bo,ys,$e,Ss,it,ws}from"./chunk-d79s1s4t.js";var S="backfill";function c(e){return e.query("SELECT sum((SELECT max(seq) FROM store.entries WHERE session_id = sessions.id)) AS n FROM store.sessions").get()?.n??0}function q(e){let t=Tn(e,S);return t?JSON.parse(t):void 0}function g(e,t){rr(e,S,JSON.stringify(t))}class b{db;indexer;batch;todo;page;state;constructor(e,t,s=500){this.db=e;this.indexer=t;this.batch=s;this.todo=e.query("SELECT session_id FROM main.backfill_todo WHERE ord = ?"),this.page=e.query("SELECT seq, time, body FROM store.entries WHERE session_id = ? AND seq > ? ORDER BY seq LIMIT ?"),this.state=q(e)}get running(){return this.state?.state==="running"}begin(e){this.db.transaction(()=>{let t=this.db.query("SELECT max(id) AS id FROM store.search_queue").get()?.id??0;rr(this.db,"queue_done",t),this.db.run("DELETE FROM main.backfill_todo"),this.db.run("INSERT INTO main.backfill_todo (ord, session_id) SELECT row_number() OVER (ORDER BY updated DESC, id), id FROM store.sessions");let s=this.db.query("SELECT count(*) AS n FROM main.backfill_todo").get()?.n??0,r=c(this.db);this.state={state:s?"running":"done",reason:e,ord:1,seq:-1,total:r,sessionsTotal:s,done:0,sessionsDone:0,startedAt:Date.now()},g(this.db,this.state)})()}step(e){let t=this.state;if(t?.state!=="running")return!1;let s={...t};return this.db.transaction(()=>{let r=this.batch;while(r>0&&s.state==="running"){let n=this.todo.get(s.ord)?.session_id;if(n===void 0){s.state="done",this.db.run("DELETE FROM main.backfill_todo");break}if(s.seq<0)this.indexer.reindex(n,0),s.seq=0;let i=this.page.all(n,s.seq,r);for(let a of i)if(this.indexer.indexRow(n,a.seq,a.time,a.body),s.seq=a.seq,s.done++,r--,performance.now()>e){r=0;break}if(r>0)s.ord++,s.seq=-1,s.sessionsDone++;if(performance.now()>e)break}g(this.db,s)})(),this.state=s,!0}}function M(e,t){return BigInt.asIntN(64,Bun.hash.wyhash(`${e?"B":"M"}${t}`))}class p{db;layout;readEntry;readTitle;previousModel;selectRefs;deleteRefs;insertRef;findDoc;insertDoc;increment;decrement;docRefs;deleteDoc;insertMsg;insertOut;deleteMsg;deleteOut;stats={entries:0,fields:0,bytes:0,newDocs:0,newBytes:0};outChanges=0;constructor(e,t){this.db=e;this.layout=t;this.readEntry=e.query("SELECT time, body FROM store.entries WHERE session_id = ? AND seq = ?"),this.readTitle=e.query("SELECT title, created FROM store.sessions WHERE id = ?"),this.previousModel=e.query("SELECT json_extract(body, '$.model') AS model FROM store.entries WHERE session_id = ? AND seq < ? AND json_extract(body, '$.type') = 'assistant' ORDER BY seq DESC LIMIT 1"),this.selectRefs=e.query("SELECT doc FROM main.ref WHERE session_id = ? AND seq = ?"),this.deleteRefs=e.query("DELETE FROM main.ref WHERE session_id = ? AND seq = ?"),this.insertRef=e.query("INSERT INTO main.ref (session_id, seq, part, doc, kind, tool, err, model, time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"),this.findDoc=e.query("SELECT id FROM main.doc WHERE hash = ?"),this.insertDoc=e.query("INSERT INTO main.doc (hash, refs, len, bulk) VALUES (?, 1, ?, ?)"),this.increment=e.query("UPDATE main.doc SET refs = refs + 1 WHERE id = ?"),this.decrement=e.query("UPDATE main.doc SET refs = refs - 1 WHERE id = ?"),this.docRefs=e.query("SELECT refs, bulk FROM main.doc WHERE id = ?"),this.deleteDoc=e.query("DELETE FROM main.doc WHERE id = ?"),this.insertMsg=e.query("INSERT INTO main.fts (rowid, text) VALUES (?, ?)"),this.insertOut=e.query("INSERT INTO main.fts_out (rowid, text) VALUES (?, ?)"),this.deleteMsg=e.query("DELETE FROM main.fts WHERE rowid = ?"),this.deleteOut=e.query("DELETE FROM main.fts_out WHERE rowid = ?")}reindex(e,t){let s=0,r=[];if(t===0){let n=this.readTitle.get(e);if(n)s=n.created,r=ws(n.title)}else{let n=this.readEntry.get(e,t);if(n)s=n.time,r=this.fields(e,t,n.body)}this.apply(e,t,s,r)}indexRow(e,t,s,r){this.apply(e,t,s,this.fields(e,t,r))}fields(e,t,s){let r;try{r=JSON.parse(s)}catch{return[]}if(!r||typeof r!=="object")return[];let n=it(r);if(r.type==="tool_result"&&n.length){let i=this.previousModel.get(e,t)?.model??void 0;if(i)for(let a of n)a.model=i}return n}apply(e,t,s,r){let n=this.selectRefs.all(e,t);if(n.length)this.deleteRefs.run(e,t);this.stats.entries++;for(let i of r){let a=Ss(i.kind),l=M(a,i.text);this.stats.fields++,this.stats.bytes+=i.text.length;let o=this.findDoc.get(l)?.id;if(o===void 0){if(o=Number(this.insertDoc.run(l,i.text.length,a?1:0).lastInsertRowid),a)this.insertOut.run(o,bo(i.text)),this.outChanges++;else this.insertMsg.run(o,this.layout.msg==="trigram"?ys(i.text):bo(i.text));this.stats.newDocs++,this.stats.newBytes+=i.text.length}else this.increment.run(o);this.insertRef.run(e,t,i.part,o,$e[i.kind],i.tool??null,i.err?1:0,i.model??null,s)}for(let{doc:i}of n)this.release(i)}release(e){this.decrement.run(e);let t=this.docRefs.get(e);if(!t||t.refs>0)return;if(this.deleteDoc.run(e),t.bulk)this.deleteOut.run(e),this.outChanges++;else this.deleteMsg.run(e)}}class y{db;page;clearRange;clearTail;upsert;constructor(e){this.db=e;this.page=e.query("SELECT term, doc FROM main.fts_out_vocab WHERE term > ? ORDER BY term LIMIT ?"),this.clearRange=e.query("DELETE FROM main.term WHERE t > ? AND t <= ?"),this.clearTail=e.query("DELETE FROM main.term WHERE t > ?"),this.upsert=e.query("INSERT OR REPLACE INTO main.term (t, n) VALUES (?, ?)")}step(e,t){let s=this.page.all(e,t),r=s.at(-1)?.term;if(s.length<t||r===void 0)this.clearTail.run(e);else this.clearRange.run(e,r);for(let{term:n,doc:i}of s)if(n.length<=gs)this.upsert.run(n,i);return s.length<t?void 0:r}}var w=2000,x=30000;class T{options;db;layout;reset;indexer;backfill;terms;queueRows;queueMax;sliceMs;backfillSliceMs;queueBatch;termRefreshMs;queueDone;termCursor;termStale;lastTermRefresh=Number.NEGATIVE_INFINITY;rateStart;estimate;closed=!1;constructor(e){this.options=e;let t=ps(e.indexPath,e.storePath,e.features);if(this.db=t.db,this.layout=t.layout,this.reset=t.reset,this.sliceMs=e.sliceMs??20,this.backfillSliceMs=e.backfillSliceMs??200,this.queueBatch=e.queueBatch??200,this.termRefreshMs=e.termRefreshMs??60000,this.indexer=new p(this.db,this.layout),this.terms=new y(this.db),this.backfill=new b(this.db,this.indexer,e.batch??500),this.queueRows=this.db.query("SELECT id, session_id, seq FROM store.search_queue WHERE id > ? ORDER BY id LIMIT ?"),this.queueMax=this.db.query("SELECT max(id) AS id FROM store.search_queue"),!this.backfill.state)this.backfill.begin(this.reset?"rebuild":"initial");this.queueDone=Number(Tn(this.db,"queue_done")??0),this.termStale=Number(Tn(this.db,"term_stale")??0)===1}step(e){if(this.closed)return!1;if(this.drainQueue(e??performance.now()+this.sliceMs))return!0;if(this.backfill.running){this.rateStart??={time:performance.now(),done:this.backfill.state?.done??0};let t=this.indexer.outChanges;if(this.backfill.step(e??performance.now()+this.backfillSliceMs),this.markTerms(t),!this.backfill.running)this.lastTermRefresh=Number.NEGATIVE_INFINITY;return!0}return this.refreshTerms(e??performance.now()+this.sliceMs)}drain(){while(this.step());}drainQueue(e){let t=!1;return this.db.transaction(()=>{let s=this.queueRows.all(this.queueDone,this.queueBatch);if(!s.length)return;t=!0;let r=this.indexer.outChanges,n=new Set,i=this.queueDone;for(let a of s){let l=`${a.seq}\x00${a.session_id}`;if(!n.has(l))n.add(l),this.indexer.reindex(a.session_id,a.seq);if(i=a.id,performance.now()>e)break}rr(this.db,"queue_done",i),this.markTerms(r),this.queueDone=i})(),t}markTerms(e){if(this.indexer.outChanges===e||this.termStale)return;this.termStale=!0,rr(this.db,"term_stale",1)}refreshTerms(e){if(this.termCursor===void 0){if(!this.termStale||performance.now()-this.lastTermRefresh<this.termRefreshMs)return!1;this.termCursor="",this.termStale=!1,this.indexer.outChanges=0,rr(this.db,"term_stale",0)}while(this.termCursor!==void 0&&performance.now()<=e){let t=this.termCursor;this.db.transaction(()=>{this.termCursor=this.terms.step(t,w)})()}if(this.termCursor===void 0)this.lastTermRefresh=performance.now();return!0}status(){let e=this.queueMax.get()?.id??this.queueDone,t=this.backfill.state,s;if(t?.state==="running"&&this.rateStart){let n=(performance.now()-this.rateStart.time)/1000,i=(t.done-this.rateStart.done)/n;if(n>0.5&&i>0)s=Math.max(0,Math.round(Math.max(0,t.total-t.done)/i))}let r=t?{state:t.state,reason:t.reason,total:t.total,done:t.done,sessionsTotal:t.sessionsTotal,sessionsDone:t.sessionsDone,startedAt:t.startedAt}:void 0;if(!this.estimate||performance.now()-this.estimate.time>x)this.estimate={time:performance.now(),entries:c(this.db)};return{queueDone:this.queueDone,lag:Math.max(0,e-this.queueDone),entries:this.estimate.entries,...r?{backfill:r}:{},...s!==void 0?{etaSec:s}:{},layout:this.layout,reset:this.reset}}withIndex(e){return e(this.db)}close(){if(this.closed)return;this.closed=!0,this.db.close()}}var R=1000,v=100;function D(e){let t,s,r,n=!1,i=!1,a=0,l=[],o=(d)=>e.postMessage(d),m=(d)=>{if(i)return;if(r)clearTimeout(r);r=setTimeout(k,d)},E=()=>{if(!s||Atomics.load(s,Xe)!==1)return;Atomics.store(s,Et,1),Atomics.notify(s,Et);while(Atomics.load(s,Xe)===1)Atomics.wait(s,Xe,1,1e4);Atomics.store(s,Et,0)};function k(){if(r=void 0,i||!t)return;E();let d=!1;try{d=t.step()}catch(f){o({type:"error",message:f instanceof Error?f.message:String(f),fatal:!1}),n=!1,m(R);return}let u=performance.now();if(d){if(n=!0,u-a>=v)a=u,o({type:"status",status:t.status()});m(0);return}n=!1,a=u;let h=t.status();o({type:"status",status:h});for(let f of l.splice(0))o({type:"flushed",id:f,status:h});m(R)}e.onmessage=(d)=>{let u=d.data;if(u.type==="init"){s=new Int32Array(u.flags);try{t=new T(u.options)}catch(h){o({type:"error",message:h instanceof Error?h.message:String(h),fatal:!0});return}o({type:"status",status:t.status()}),m(0)}else if(u.type==="dirty"){if(!n)m(0)}else if(u.type==="pause")E();else if(u.type==="flush"){if(l.push(u.id),!n)m(0)}else if(u.type==="stop"){if(i=!0,r)clearTimeout(r);t?.close(),o({type:"stopped"})}}}if(!Bun.isMainThread)D(globalThis);export{T as SearchEngine};
package/chunk-0wwd4q6h.js DELETED
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{z}from"./chunk-ak9rkrf3.js";import{Wr}from"./chunk-9qzyn98b.js";import{at}from"./chunk-z9p2ry9w.js";import{se}from"./chunk-keq5kv9b.js";import{Se,he,Y,we}from"./chunk-gg3kfa12.js";import{w}from"./chunk-b516bp7n.js";import{J}from"./chunk-0b2brwjc.js";import{W,q,Be,ce,ae,Z,K}from"./chunk-fgjw0r6g.js";var R=9,j=4000,N=(t,e,n)=>{let r=new W,o=ae(e,t.compat?.supportsMidConvoSystemMessages);return(async()=>{let s=U(t);try{let l=n?.apiKey;if(!l)throw Error(`No API key for provider: ${t.provider}`);let f=D(),u=we(o.messages,t,(d)=>f(d)),a=ne(t,o,u,n),i=await n?.onPayload?.(a,t);if(i!==void 0)a=i;let c=await G(t,a,l,n);if(r.push({type:"start",partial:s}),await oe(t,s,r,c,n?.onProviderStreamEvent),n?.signal?.aborted)throw Error("Request was aborted");if(s.stopReason==="pending")throw Error("Mistral stream ended without a finish reason");if(s.stopReason==="aborted"||s.stopReason==="error")throw Error(s.errorMessage||"An unknown error occurred");r.push({type:"done",reason:s.stopReason,message:s}),r.end()}catch(l){for(let f of s.content)delete f.partialArgs;s.stopReason=n?.signal?.aborted?"aborted":"error",s.errorMessage=B(l),r.push({type:"error",reason:s.stopReason,error:s}),r.end()}})(),r},Ie=(t,e,n)=>{let r=n?.apiKey;if(!r)throw Error(`No API key for provider: ${t.provider}`);let o={...Y(t,e,n,r),toolChoice:n?.toolChoice},s=n?.reasoning?K(t,n.reasoning):void 0,l=s==="off"?void 0:s,f=t.reasoning?t.thinkingLevelMap:void 0,u=f?l?f[l]??"high":f.off??void 0:void 0;return N(t,e,{...o,promptMode:t.reasoning&&!f&&l?"reasoning":void 0,reasoningEffort:u})};function U(t){return{role:"assistant",content:[],api:t.api,provider:t.provider,model:t.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()}}function D(){let t=new Map,e=new Map;return(n)=>{let r=t.get(n);if(r)return r;let o=0;while(!0){let s=v(n,o),l=e.get(s);if(!l||l===n)return t.set(n,s),e.set(s,n),s;o++}}}function v(t,e){let n=t.replace(/[^a-zA-Z0-9]/g,"");if(e===0&&n.length===R)return n;let r=n||t,o=e===0?r:`${r}:${e}`;return at(o).replace(/[^a-zA-Z0-9]/g,"").slice(0,R)}function B(t){if(t instanceof Error){let e=t,n=typeof e.statusCode==="number"?e.statusCode:void 0,r=typeof e.body==="string"?e.body.trim():void 0;if(n!==void 0&&r)return`Mistral API error (${n}): ${H(r,j)}`;if(n!==void 0)return`Mistral API error (${n}): ${t.message}`;return t.message}return F(t)}function H(t,e){if(t.length<=e)return t;return`${t.slice(0,e)}... [truncated ${t.length-e} chars]`}function F(t){try{let e=JSON.stringify(t);return e===void 0?String(t):e}catch{return String(t)}}async function G(t,e,n,r){let o=new URL(t.baseUrl);o.pathname=`${o.pathname.replace(/\/+$/u,"")}/`;let s=new URL("v1/chat/completions",o),l=X(t,n,r),f=r?.timeoutMs??60000,u=AbortSignal.timeout(f),a=Wr([r?.signal,u]),i;try{i=await(r?.fetch??globalThis.fetch)(s,{method:"POST",headers:l,body:JSON.stringify(Q(e)),signal:a.signal})}catch(c){if(u.aborted&&!r?.signal?.aborted)throw Error(`Mistral response headers timed out after ${f}ms`);throw c}finally{a.cleanup()}if(await r?.onResponse?.({status:i.status,headers:J(i.headers)},t),!i.ok){let c=await i.text();throw new P(i.status,c,i.statusText)}if(!i.body)throw Error("Mistral response has no body");return te(i.body,r?.signal)}class P extends Error{statusCode;body;constructor(t,e,n){super(n||`Request failed with status ${t}`);this.name="MistralHttpError",this.statusCode=t,this.body=e}}function X(t,e,n){let r=new Headers({"User-Agent":se(),accept:"text/event-stream",authorization:`Bearer ${e}`,"content-type":"application/json"});S(r,t.headers),S(r,n?.headers);let o=A(t.headers,"x-affinity")||A(n?.headers,"x-affinity");if(O(n)&&!o)r.set("x-affinity",n.sessionId);return r}function S(t,e){if(!e)return;for(let[n,r]of Object.entries(e))if(r===null)t.delete(n);else t.set(n,r)}function A(t,e){return!!t&&Object.keys(t).some((n)=>n.toLowerCase()===e)}function Q(t){let e={...t};for(let[r,o]of[["topP","top_p"],["maxTokens","max_tokens"],["randomSeed","random_seed"],["responseFormat","response_format"],["toolChoice","tool_choice"],["presencePenalty","presence_penalty"],["frequencyPenalty","frequency_penalty"],["parallelToolCalls","parallel_tool_calls"],["reasoningEffort","reasoning_effort"],["promptMode","prompt_mode"],["promptCacheKey","prompt_cache_key"],["safePrompt","safe_prompt"]])_(e,r,o);e.messages=t.messages.map((r)=>V(r));let n=e.response_format;if(M(n)){let r={...n};_(r,"jsonSchema","json_schema");let o=r.json_schema;if(M(o)){let s={...o};_(s,"schemaDefinition","schema"),r.json_schema=s}e.response_format=r}return e}function V(t){let e={...t};if(_(e,"toolCalls","tool_calls"),_(e,"toolCallId","tool_call_id"),Array.isArray(t.content))e.content=t.content.map((n)=>ee(n));return e}function ee(t){let e={...t};for(let[n,r]of[["imageUrl","image_url"],["documentUrl","document_url"],["documentName","document_name"],["fileId","file_id"],["referenceIds","reference_ids"],["inputAudio","input_audio"]])_(e,n,r);return e}function _(t,e,n){if(!(e in t))return;t[n]=t[e],delete t[e]}function M(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)}var k=Symbol("mistral-stream-done");async function*te(t,e){let n=t.getReader(),r=new TextDecoder,o="",s=()=>{n.cancel().catch(()=>{})};e?.addEventListener("abort",s,{once:!0});try{while(!0){if(e?.aborted)throw e.reason;let{done:l,value:f}=await n.read();if(e?.aborted)throw e.reason;o+=l?r.decode():r.decode(f,{stream:!0});let u=I(o);while(u){let a=E(o.slice(0,u.index));if(o=o.slice(u.index+u.length),a===k)return;if(a)yield a;u=I(o)}if(l)break}if(o.trim()){let l=E(o);if(l!==k&&l)yield l}}finally{e?.removeEventListener("abort",s);try{await n.cancel()}catch{}try{n.releaseLock()}catch{}}}function I(t){let e=/\r\n\r\n|\r\n\r|\r\n\n|\r\r\n|\n\r\n|\r\r|\n\r|\n\n/u.exec(t);return e?.index===void 0?void 0:{index:e.index,length:e[0].length}}function E(t){let e=t.split(/\r\n|\r|\n/u).filter((r)=>r.startsWith("data:")).map((r)=>r.slice(5).trimStart()).join(`
3
- `).trim();if(!e)return;if(e==="[DONE]")return k;let n=JSON.parse(e);if(!M(n)||!Array.isArray(n.choices))throw Error("Invalid Mistral streaming event");return{data:n}}function ne(t,e,n,r){let o={model:t.id,stream:!0,messages:le(n,t.input.includes("image"))},s=ce(e.messages);if(s.length>0)o.tools=ie(s);if(r?.temperature!==void 0)o.temperature=r.temperature;if(r?.maxTokens!==void 0)o.maxTokens=r.maxTokens;if(r?.toolChoice)o.toolChoice=de(r.toolChoice);if(r?.promptMode)o.promptMode=r.promptMode;if(r?.reasoningEffort)o.reasoningEffort=r.reasoningEffort;if(O(r))o.promptCacheKey=r.sessionId;return o}function O(t){return t?.cacheRetention!=="none"&&!!t?.sessionId}function re(t,e){let n=t,r=n.promptTokensDetails?.cachedTokens??n.prompt_tokens_details?.cached_tokens??n.promptTokenDetails?.cachedTokens??n.prompt_token_details?.cached_tokens??n.numCachedTokens??n.num_cached_tokens??0,o=typeof r==="number"&&Number.isFinite(r)?r:0;return Math.min(e,Math.max(0,o))}async function oe(t,e,n,r,o){let s=null,l=e.content,f=()=>l.length-1,u=new Map,a=(i)=>{if(!i)return;if(i.type==="text"){n.push({type:"text_end",contentIndex:f(),content:i.text,partial:e});return}if(i.type==="thinking")n.push({type:"thinking_end",contentIndex:f(),content:i.thinking,partial:e})};for await(let i of r){let c=i.data;if(await o?.(c,t),e.responseId||=c.id,c.usage){let p=c.usage.prompt_tokens||0,h=re(c.usage,p);e.usage.input=Math.max(0,p-h),e.usage.output=c.usage.completion_tokens||0,e.usage.cacheRead=h,e.usage.cacheWrite=0,e.usage.totalTokens=c.usage.total_tokens||e.usage.input+e.usage.output+e.usage.cacheRead+e.usage.cacheWrite,Z(t,e.usage)}let d=c.choices[0];if(!d)continue;if(d.finish_reason){e.rawStopReason=d.finish_reason;let p=ue(d.finish_reason);if(e.stopReason=p.stopReason,p.errorMessage)e.errorMessage=p.errorMessage}let y=d.delta;if(y.content!==null&&y.content!==void 0){let p=typeof y.content==="string"?[y.content]:y.content;for(let h of p){if(typeof h==="string"){let m=w(h);if(!m)continue;if(!s||s.type!=="text")a(s),s={type:"text",text:""},e.content.push(s),n.push({type:"text_start",contentIndex:f(),partial:e});s.text+=m,n.push({type:"text_delta",contentIndex:f(),delta:m,partial:e});continue}if(h.type==="thinking"){let m=(h.thinking??[]).map((g)=>g.text??"").filter((g)=>g.length>0).join(""),x=w(m);if(!x)continue;if(!s||s.type!=="thinking")a(s),s={type:"thinking",thinking:""},e.content.push(s),n.push({type:"thinking_start",contentIndex:f(),partial:e});s.thinking+=x,n.push({type:"thinking_delta",contentIndex:f(),delta:x,partial:e});continue}if(h.type==="text"){let m=w(h.text??"");if(!m)continue;if(!s||s.type!=="text")a(s),s={type:"text",text:""},e.content.push(s),n.push({type:"text_start",contentIndex:f(),partial:e});s.text+=m,n.push({type:"text_delta",contentIndex:f(),delta:m,partial:e})}}}let L=y.tool_calls||[];for(let p of L){if(s)a(s),s=null;let h=p.id&&p.id!=="null"?p.id:v(`toolcall:${p.index??0}`,0),m=p.index??h,x=u.get(m),g;if(x!==void 0){let C=e.content[x];if(C?.type==="toolCall")g=C}if(!g)g={type:"toolCall",id:h,name:p.function.name,arguments:{},partialArgs:""},e.content.push(g),u.set(m,e.content.length-1),n.push({type:"toolcall_start",contentIndex:e.content.length-1,partial:e});let T=typeof p.function.arguments==="string"?p.function.arguments:JSON.stringify(p.function.arguments||{});g.partialArgs=(g.partialArgs||"")+T,g.arguments=z(g.partialArgs),n.push({type:"toolcall_delta",contentIndex:u.get(m),delta:T,partial:e})}}a(s);for(let i of u.values()){let c=e.content[i];if(c.type!=="toolCall")continue;let d=c;d.arguments=z(d.partialArgs),delete d.partialArgs,n.push({type:"toolcall_end",contentIndex:i,toolCall:d,partial:e})}}function ie(t){return t.map((e)=>{let n=he(e,!0);return{type:"function",function:{name:e.name,description:e.description,parameters:b(Se(e,n)),strict:n??!1}}})}function b(t){if(Array.isArray(t))return t.map((e)=>b(e));if(t&&typeof t==="object"){let e={};for(let[n,r]of Object.entries(t))e[n]=b(r);return e}return t}function le(t,e){let n=[];for(let[r,o]of t.entries()){if(o.role==="system"){let a=r===0?q(o):Be(o);if(a.length>0)n.push({role:"system",content:w(a)});continue}if(o.role==="user"){if(typeof o.content==="string"){n.push({role:"user",content:w(o.content)});continue}let a=o.content.some((c)=>c.type==="image"),i=o.content.filter((c)=>c.type==="text"||e).map((c)=>{if(c.type==="text")return{type:"text",text:w(c.text)};return{type:"image_url",imageUrl:`data:${c.mimeType};base64,${c.data}`}});if(i.length>0){n.push({role:"user",content:i});continue}if(a&&!e)n.push({role:"user",content:"(image omitted: model does not support images)"});continue}if(o.role==="assistant"){let a=[],i=[];for(let d of o.content){if(d.type==="text"){if(d.text.trim().length>0)a.push({type:"text",text:w(d.text)});continue}if(d.type==="thinking"){if(d.thinking.trim().length>0)a.push({type:"thinking",thinking:[{type:"text",text:w(d.thinking)}]});continue}i.push({id:d.id,type:"function",function:{name:d.name,arguments:JSON.stringify(d.arguments||{})},index:0})}let c={role:"assistant",prefix:!1};if(a.length>0)c.content=a;if(i.length>0)c.toolCalls=i;if(a.length>0||i.length>0)n.push(c);continue}let s=[],l=o.content.filter((a)=>a.type==="text").map((a)=>a.type==="text"?w(a.text):"").join(`
4
- `),f=o.content.some((a)=>a.type==="image"),u=fe(l,f,e,o.isError);s.push({type:"text",text:u});for(let a of o.content){if(!e)continue;if(a.type!=="image")continue;s.push({type:"image_url",imageUrl:`data:${a.mimeType};base64,${a.data}`})}n.push({role:"tool",toolCallId:o.toolCallId,name:o.toolName,content:s})}return n}function fe(t,e,n,r){let o=t.trim(),s=r?"[tool error] ":"";if(o.length>0)return`${s}${o}${e&&!n?`
5
- [tool image omitted: model does not support images]`:""}`;if(e){if(n)return r?"[tool error] (see attached image)":"(see attached image)";return r?"[tool error] (image omitted: model does not support images)":"(image omitted: model does not support images)"}return r?"[tool error] (no tool output)":"(no tool output)"}function de(t){if(!t)return;if(t==="auto"||t==="none"||t==="any"||t==="required")return t;return{type:"function",function:{name:t.function.name}}}function ue(t){if(t===null)return{stopReason:"stop"};switch(t){case"stop":return{stopReason:"stop"};case"length":case"model_length":return{stopReason:"length"};case"tool_calls":return{stopReason:"toolUse"};case"error":return{stopReason:"error",errorMessage:"Provider stopped with: error (server error)"};default:return{stopReason:"error",errorMessage:`Provider stopped with: ${t}`}}}export{N as stream,Ie as streamSimple};