@bkm016/basalt 0.1.33 → 0.1.35

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 (1001) hide show
  1. package/README.md +24 -0
  2. package/chunk-10y5hvt2.js +2 -0
  3. package/chunk-22k2be3e.js +13 -0
  4. package/chunk-28hye007.js +2 -0
  5. package/chunk-2fmsw1c6.js +5 -0
  6. package/chunk-2xj51v3m.js +3 -0
  7. package/chunk-3x0wm92n.js +3 -0
  8. package/chunk-4fgsqb1e.js +2 -0
  9. package/chunk-519eek65.js +39 -0
  10. package/chunk-5qa4dean.js +2 -0
  11. package/chunk-5x256mz8.js +2 -0
  12. package/chunk-6n01sefp.js +8 -0
  13. package/chunk-74xtmwpw.js +2 -0
  14. package/chunk-7mafj833.js +3 -0
  15. package/chunk-7v1sqn9k.js +59 -0
  16. package/chunk-8my52htr.js +3 -0
  17. package/chunk-8vh98e46.js +2 -0
  18. package/chunk-92mpgche.js +2 -0
  19. package/chunk-9vacevyf.js +3 -0
  20. package/chunk-9y44m27k.js +5 -0
  21. package/chunk-a5wv2shs.js +3 -0
  22. package/chunk-a78qhb4t.js +5 -0
  23. package/chunk-axsxx67j.js +3 -0
  24. package/chunk-b49fzzzn.js +2 -0
  25. package/chunk-bc8awbnt.js +2 -0
  26. package/chunk-crxs0n0r.js +3 -0
  27. package/chunk-csed8fsv.js +3 -0
  28. package/chunk-cspx3bz9.js +2 -0
  29. package/chunk-ctdtmwmd.js +63 -0
  30. package/chunk-d3xsmwbh.js +25 -0
  31. package/chunk-dvwgpsfz.js +3 -0
  32. package/chunk-dzd8k6bw.js +3 -0
  33. package/chunk-e2xqa46t.js +2 -0
  34. package/chunk-e41mpwx9.js +9 -0
  35. package/chunk-e5ccfgsk.js +3 -0
  36. package/chunk-e67wqhzh.js +12 -0
  37. package/chunk-emeb13nd.js +25 -0
  38. package/chunk-ers9s2c4.js +31 -0
  39. package/chunk-ezq0fnz6.js +3 -0
  40. package/chunk-ezqvx0hm.js +2 -0
  41. package/chunk-f10ca9ma.js +12 -0
  42. package/chunk-f72jhcp8.js +2 -0
  43. package/chunk-fjv41a8r.js +4155 -0
  44. package/chunk-gj0dhgbg.js +3 -0
  45. package/chunk-h0ggc6pv.js +60 -0
  46. package/chunk-hrt42rkh.js +4 -0
  47. package/chunk-j7m36g5w.js +3 -0
  48. package/chunk-jhn30hjp.js +2 -0
  49. package/chunk-ka41gq1g.js +16 -0
  50. package/chunk-kcp9byws.js +2 -0
  51. package/chunk-me72k64f.js +7 -0
  52. package/chunk-n4jemqf1.js +2 -0
  53. package/chunk-ndt4jvh1.js +3 -0
  54. package/chunk-pyxn4wqj.js +3 -0
  55. package/chunk-rajb3566.js +2 -0
  56. package/chunk-rbq2gsar.js +3 -0
  57. package/chunk-rd98e7kg.js +10 -0
  58. package/chunk-rm5dbbsg.js +3 -0
  59. package/chunk-rztw3tgx.js +3 -0
  60. package/chunk-s4mn41eh.js +8 -0
  61. package/chunk-s9p624fq.js +44 -0
  62. package/chunk-sawrte7v.js +3 -0
  63. package/chunk-sd8d792h.js +51 -0
  64. package/chunk-sgvmxx0d.js +2 -0
  65. package/chunk-sqbnt2t1.js +3 -0
  66. package/chunk-t2bvj735.js +2 -0
  67. package/chunk-t8tkamx6.js +2 -0
  68. package/chunk-tbehe5ky.js +18 -0
  69. package/chunk-tnay319j.js +3 -0
  70. package/chunk-tsha69rv.js +7 -0
  71. package/chunk-twqwer9t.js +5 -0
  72. package/chunk-vr2rtqeh.js +2 -0
  73. package/chunk-vr6eej6b.js +3 -0
  74. package/chunk-w41gswj8.js +3 -0
  75. package/chunk-x7tras0x.js +498 -0
  76. package/chunk-xakmebnm.js +10 -0
  77. package/chunk-xj453mny.js +286 -0
  78. package/chunk-xmrw19xj.js +2 -0
  79. package/chunk-xpj8fcjp.js +20 -0
  80. package/chunk-y218jsvc.js +3 -0
  81. package/chunk-y33fkh8m.js +2 -0
  82. package/chunk-z3h9ydyr.js +11 -0
  83. package/chunk-zc51vfhr.js +2 -0
  84. package/chunk-zm88mnds.js +7 -0
  85. package/chunk-zz9rj82y.js +3 -0
  86. package/compiled.js +10 -10
  87. package/package.json +1 -1
  88. package/ui-test-worker.js +42 -42
  89. package/web/chunk-0b5vh2pt.js +2 -0
  90. package/web/chunk-0b5vh2pt.js.br +0 -0
  91. package/web/chunk-0b5vh2pt.js.gz +0 -0
  92. package/web/chunk-0hkdqhkv.js +1 -0
  93. package/web/chunk-0hkdqhkv.js.br +0 -0
  94. package/web/chunk-0hkdqhkv.js.gz +0 -0
  95. package/web/chunk-0v7wrb32.js +2 -0
  96. package/web/chunk-0v7wrb32.js.br +0 -0
  97. package/web/chunk-0v7wrb32.js.gz +0 -0
  98. package/web/chunk-0x2fgw1m.js +1 -0
  99. package/web/chunk-0x2fgw1m.js.br +0 -0
  100. package/web/chunk-0x2fgw1m.js.gz +0 -0
  101. package/web/chunk-0xctxqvv.js +2 -0
  102. package/web/chunk-0xctxqvv.js.br +0 -0
  103. package/web/chunk-0xctxqvv.js.gz +0 -0
  104. package/web/chunk-0y9tf0rt.js +89 -0
  105. package/web/chunk-0y9tf0rt.js.br +0 -0
  106. package/web/chunk-0y9tf0rt.js.gz +0 -0
  107. package/web/chunk-0yrp0f6x.js +1 -0
  108. package/web/chunk-0yrp0f6x.js.br +0 -0
  109. package/web/chunk-0yrp0f6x.js.gz +0 -0
  110. package/web/chunk-10jk2pn9.js +1 -0
  111. package/web/chunk-10jk2pn9.js.br +0 -0
  112. package/web/chunk-10jk2pn9.js.gz +0 -0
  113. package/web/chunk-15ka35m9.js +2 -0
  114. package/web/chunk-15ka35m9.js.br +0 -0
  115. package/web/chunk-15ka35m9.js.gz +0 -0
  116. package/web/chunk-1700cges.js +1 -0
  117. package/web/chunk-1700cges.js.br +0 -0
  118. package/web/chunk-1700cges.js.gz +0 -0
  119. package/web/chunk-1apw6pnk.css +1 -0
  120. package/web/chunk-1apw6pnk.css.br +0 -0
  121. package/web/chunk-1apw6pnk.css.gz +0 -0
  122. package/web/chunk-1b005nqw.js +139 -0
  123. package/web/chunk-1b005nqw.js.br +0 -0
  124. package/web/chunk-1b005nqw.js.gz +0 -0
  125. package/web/chunk-1c9khgyt.js +1 -0
  126. package/web/chunk-1c9khgyt.js.br +2 -0
  127. package/web/chunk-1c9khgyt.js.gz +0 -0
  128. package/web/chunk-1pr20x9x.js +1 -0
  129. package/web/chunk-1pr20x9x.js.br +0 -0
  130. package/web/chunk-1pr20x9x.js.gz +0 -0
  131. package/web/chunk-1sjgdggk.js +7 -0
  132. package/web/chunk-1sjgdggk.js.br +0 -0
  133. package/web/chunk-1sjgdggk.js.gz +0 -0
  134. package/web/chunk-1tt5ympp.js +1 -0
  135. package/web/chunk-1tt5ympp.js.br +0 -0
  136. package/web/chunk-1tt5ympp.js.gz +0 -0
  137. package/web/chunk-29fpfs5q.js +1142 -0
  138. package/web/chunk-29fpfs5q.js.br +0 -0
  139. package/web/chunk-29fpfs5q.js.gz +0 -0
  140. package/web/chunk-2gr7vwnp.js +24 -0
  141. package/web/chunk-2gr7vwnp.js.br +0 -0
  142. package/web/chunk-2gr7vwnp.js.gz +0 -0
  143. package/web/chunk-2p84jch3.js +1 -0
  144. package/web/chunk-2p84jch3.js.br +0 -0
  145. package/web/chunk-2p84jch3.js.gz +0 -0
  146. package/web/chunk-2qs283mh.js +2 -0
  147. package/web/chunk-2qs283mh.js.br +0 -0
  148. package/web/chunk-2qs283mh.js.gz +0 -0
  149. package/web/chunk-3gf2d852.js +1 -0
  150. package/web/chunk-3gf2d852.js.br +0 -0
  151. package/web/chunk-3gf2d852.js.gz +0 -0
  152. package/web/chunk-3hswqkb0.js +1 -0
  153. package/web/chunk-3hswqkb0.js.br +0 -0
  154. package/web/chunk-3hswqkb0.js.gz +0 -0
  155. package/web/chunk-46yjp1x4.js +2 -0
  156. package/web/chunk-46yjp1x4.js.br +0 -0
  157. package/web/chunk-46yjp1x4.js.gz +0 -0
  158. package/web/chunk-4ezd1rkc.js +84 -0
  159. package/web/chunk-4ezd1rkc.js.br +0 -0
  160. package/web/chunk-4ezd1rkc.js.gz +0 -0
  161. package/web/chunk-4v9ar0sf.js +142 -0
  162. package/web/chunk-4v9ar0sf.js.br +0 -0
  163. package/web/chunk-4v9ar0sf.js.gz +0 -0
  164. package/web/chunk-51z88j1t.js +21 -0
  165. package/web/chunk-51z88j1t.js.br +0 -0
  166. package/web/chunk-51z88j1t.js.gz +0 -0
  167. package/web/chunk-5f5zcfga.js +1 -0
  168. package/web/chunk-5f5zcfga.js.br +2 -0
  169. package/web/chunk-5f5zcfga.js.gz +0 -0
  170. package/web/chunk-5n61r0rr.js +36 -0
  171. package/web/chunk-5n61r0rr.js.br +0 -0
  172. package/web/chunk-5n61r0rr.js.gz +0 -0
  173. package/web/chunk-5vcdeenv.js +2 -0
  174. package/web/chunk-5vcdeenv.js.br +0 -0
  175. package/web/chunk-5vcdeenv.js.gz +0 -0
  176. package/web/chunk-5y7ks8c3.js +30 -0
  177. package/web/chunk-5y7ks8c3.js.br +0 -0
  178. package/web/chunk-5y7ks8c3.js.gz +0 -0
  179. package/web/chunk-60v8qwec.js +2 -0
  180. package/web/chunk-60v8qwec.js.br +0 -0
  181. package/web/chunk-60v8qwec.js.gz +0 -0
  182. package/web/chunk-61m5t9wg.js +200 -0
  183. package/web/chunk-61m5t9wg.js.br +0 -0
  184. package/web/chunk-61m5t9wg.js.gz +0 -0
  185. package/web/chunk-669n37qf.js +70 -0
  186. package/web/chunk-669n37qf.js.br +0 -0
  187. package/web/chunk-669n37qf.js.gz +0 -0
  188. package/web/chunk-6kf1xwz9.js +2 -0
  189. package/web/chunk-6kf1xwz9.js.br +0 -0
  190. package/web/chunk-6kf1xwz9.js.gz +0 -0
  191. package/web/chunk-6rw72jmj.js +2 -0
  192. package/web/chunk-6rw72jmj.js.br +0 -0
  193. package/web/chunk-6rw72jmj.js.gz +0 -0
  194. package/web/chunk-6wyxxd9h.js +2 -0
  195. package/web/chunk-6wyxxd9h.js.br +0 -0
  196. package/web/chunk-6wyxxd9h.js.gz +0 -0
  197. package/web/chunk-77vj65dc.js +1 -0
  198. package/web/chunk-77vj65dc.js.br +0 -0
  199. package/web/chunk-77vj65dc.js.gz +0 -0
  200. package/web/chunk-8ktz0w1x.js +120 -0
  201. package/web/chunk-8ktz0w1x.js.br +0 -0
  202. package/web/chunk-8ktz0w1x.js.gz +0 -0
  203. package/web/chunk-8rcfpj02.js +2 -0
  204. package/web/chunk-8rcfpj02.js.br +0 -0
  205. package/web/chunk-8rcfpj02.js.gz +0 -0
  206. package/web/chunk-8x4s1c9g.js +1 -0
  207. package/web/chunk-8x4s1c9g.js.br +2 -0
  208. package/web/chunk-8x4s1c9g.js.gz +0 -0
  209. package/web/chunk-8zf4cywy.js +1 -0
  210. package/web/chunk-8zf4cywy.js.br +0 -0
  211. package/web/chunk-8zf4cywy.js.gz +0 -0
  212. package/web/chunk-a18y5dmf.js +2 -0
  213. package/web/chunk-a18y5dmf.js.br +0 -0
  214. package/web/chunk-a18y5dmf.js.gz +0 -0
  215. package/web/chunk-a36sfjyk.js +1 -0
  216. package/web/chunk-a36sfjyk.js.br +0 -0
  217. package/web/chunk-a36sfjyk.js.gz +0 -0
  218. package/web/chunk-aahzqxq7.js +34 -0
  219. package/web/chunk-aahzqxq7.js.br +0 -0
  220. package/web/chunk-aahzqxq7.js.gz +0 -0
  221. package/web/chunk-b2gtwatf.js +370 -0
  222. package/web/chunk-b2gtwatf.js.br +0 -0
  223. package/web/chunk-b2gtwatf.js.gz +0 -0
  224. package/web/chunk-bdp4y1zg.js +1 -0
  225. package/web/chunk-bdp4y1zg.js.br +0 -0
  226. package/web/chunk-bdp4y1zg.js.gz +0 -0
  227. package/web/chunk-be67vfx1.js +1 -0
  228. package/web/chunk-be67vfx1.js.br +0 -0
  229. package/web/chunk-be67vfx1.js.gz +0 -0
  230. package/web/chunk-bt6r78y9.js +106 -0
  231. package/web/chunk-bt6r78y9.js.br +0 -0
  232. package/web/chunk-bt6r78y9.js.gz +0 -0
  233. package/web/chunk-c97th1x0.js +1 -0
  234. package/web/chunk-c97th1x0.js.br +0 -0
  235. package/web/chunk-c97th1x0.js.gz +0 -0
  236. package/web/chunk-cfkp7taw.js +1 -0
  237. package/web/chunk-cfkp7taw.js.br +0 -0
  238. package/web/chunk-cfkp7taw.js.gz +0 -0
  239. package/web/chunk-cvf9k1fy.js +140 -0
  240. package/web/chunk-cvf9k1fy.js.br +0 -0
  241. package/web/chunk-cvf9k1fy.js.gz +0 -0
  242. package/web/chunk-d33n9fsr.js +1 -0
  243. package/web/chunk-d33n9fsr.js.br +1 -0
  244. package/web/chunk-d33n9fsr.js.gz +0 -0
  245. package/web/chunk-e667nxc9.js +1 -0
  246. package/web/chunk-e667nxc9.js.br +0 -0
  247. package/web/chunk-e667nxc9.js.gz +0 -0
  248. package/web/chunk-eejjsqm1.js +303 -0
  249. package/web/chunk-eejjsqm1.js.br +0 -0
  250. package/web/chunk-eejjsqm1.js.gz +0 -0
  251. package/web/chunk-eg3qjy7a.js +2 -0
  252. package/web/chunk-eg3qjy7a.js.br +0 -0
  253. package/web/chunk-eg3qjy7a.js.gz +0 -0
  254. package/web/chunk-embvjvdj.js +12 -0
  255. package/web/chunk-embvjvdj.js.br +0 -0
  256. package/web/chunk-embvjvdj.js.gz +0 -0
  257. package/web/chunk-etjfr79m.js +2 -0
  258. package/web/chunk-etjfr79m.js.br +0 -0
  259. package/web/chunk-etjfr79m.js.gz +0 -0
  260. package/web/chunk-ez36gbz3.js +7 -0
  261. package/web/chunk-ez36gbz3.js.br +0 -0
  262. package/web/chunk-ez36gbz3.js.gz +0 -0
  263. package/web/chunk-f0vcm8mk.js +214 -0
  264. package/web/chunk-f0vcm8mk.js.br +0 -0
  265. package/web/chunk-f0vcm8mk.js.gz +0 -0
  266. package/web/chunk-f3t3ey83.js +1 -0
  267. package/web/chunk-f3t3ey83.js.br +0 -0
  268. package/web/chunk-f3t3ey83.js.gz +0 -0
  269. package/web/chunk-f84sngcq.js +2 -0
  270. package/web/chunk-f84sngcq.js.br +0 -0
  271. package/web/chunk-f84sngcq.js.gz +0 -0
  272. package/web/chunk-f97hz4v5.js +99 -0
  273. package/web/chunk-f97hz4v5.js.br +0 -0
  274. package/web/chunk-f97hz4v5.js.gz +0 -0
  275. package/web/chunk-fnkp6s0g.js +1 -0
  276. package/web/chunk-fnkp6s0g.js.br +0 -0
  277. package/web/chunk-fnkp6s0g.js.gz +0 -0
  278. package/web/chunk-fpdyzyn8.js +16 -0
  279. package/web/chunk-fpdyzyn8.js.br +0 -0
  280. package/web/chunk-fpdyzyn8.js.gz +0 -0
  281. package/web/chunk-g43z223a.js +2 -0
  282. package/web/chunk-g43z223a.js.br +0 -0
  283. package/web/chunk-g43z223a.js.gz +0 -0
  284. package/web/chunk-gcm82aj8.js +1 -0
  285. package/web/chunk-gcm82aj8.js.br +0 -0
  286. package/web/chunk-gcm82aj8.js.gz +0 -0
  287. package/web/chunk-gffb3p4z.js +2 -0
  288. package/web/chunk-gffb3p4z.js.br +0 -0
  289. package/web/chunk-gffb3p4z.js.gz +0 -0
  290. package/web/chunk-gnzg3krt.js +1 -0
  291. package/web/chunk-gnzg3krt.js.br +0 -0
  292. package/web/chunk-gnzg3krt.js.gz +0 -0
  293. package/web/chunk-grqtpfdp.js +2 -0
  294. package/web/chunk-grqtpfdp.js.br +0 -0
  295. package/web/chunk-grqtpfdp.js.gz +0 -0
  296. package/web/chunk-gsm8spf8.js +1 -0
  297. package/web/chunk-gsm8spf8.js.br +0 -0
  298. package/web/chunk-gsm8spf8.js.gz +0 -0
  299. package/web/chunk-h6ygrnd0.js +38 -0
  300. package/web/chunk-h6ygrnd0.js.br +0 -0
  301. package/web/chunk-h6ygrnd0.js.gz +0 -0
  302. package/web/chunk-h8n9w5th.js +169 -0
  303. package/web/chunk-h8n9w5th.js.br +0 -0
  304. package/web/chunk-h8n9w5th.js.gz +0 -0
  305. package/web/chunk-hmdvm5pp.js +2 -0
  306. package/web/chunk-hmdvm5pp.js.br +0 -0
  307. package/web/chunk-hmdvm5pp.js.gz +0 -0
  308. package/web/chunk-hrntwvx8.js +1 -0
  309. package/web/chunk-hrntwvx8.js.br +0 -0
  310. package/web/chunk-hrntwvx8.js.gz +0 -0
  311. package/web/chunk-hrys15jh.js +324 -0
  312. package/web/chunk-hrys15jh.js.br +0 -0
  313. package/web/chunk-hrys15jh.js.gz +0 -0
  314. package/web/chunk-j0ng7zdq.js +41 -0
  315. package/web/chunk-j0ng7zdq.js.br +0 -0
  316. package/web/chunk-j0ng7zdq.js.gz +0 -0
  317. package/web/chunk-j2t5ycte.js +78 -0
  318. package/web/chunk-j2t5ycte.js.br +0 -0
  319. package/web/chunk-j2t5ycte.js.gz +0 -0
  320. package/web/chunk-jkjd1y3p.js +3 -0
  321. package/web/chunk-jkjd1y3p.js.br +0 -0
  322. package/web/chunk-jkjd1y3p.js.gz +0 -0
  323. package/web/chunk-jweahmyy.js +1 -0
  324. package/web/chunk-jweahmyy.js.br +0 -0
  325. package/web/chunk-jweahmyy.js.gz +0 -0
  326. package/web/chunk-k56v8k7n.js +4 -0
  327. package/web/chunk-k56v8k7n.js.br +0 -0
  328. package/web/chunk-k56v8k7n.js.gz +0 -0
  329. package/web/chunk-k59sk88z.js +7 -0
  330. package/web/chunk-k59sk88z.js.br +0 -0
  331. package/web/chunk-k59sk88z.js.gz +0 -0
  332. package/web/chunk-k75a0fpt.js +62 -0
  333. package/web/chunk-k75a0fpt.js.br +0 -0
  334. package/web/chunk-k75a0fpt.js.gz +0 -0
  335. package/web/chunk-kfx9q7xv.js +2 -0
  336. package/web/chunk-kfx9q7xv.js.br +0 -0
  337. package/web/chunk-kfx9q7xv.js.gz +0 -0
  338. package/web/chunk-ksp1gg3v.js +1 -0
  339. package/web/chunk-ksp1gg3v.js.br +0 -0
  340. package/web/chunk-ksp1gg3v.js.gz +0 -0
  341. package/web/chunk-kxxp1mn4.js +2 -0
  342. package/web/chunk-kxxp1mn4.js.br +0 -0
  343. package/web/chunk-kxxp1mn4.js.gz +0 -0
  344. package/web/chunk-mapbxzsz.js +1 -0
  345. package/web/chunk-mapbxzsz.js.br +0 -0
  346. package/web/chunk-mapbxzsz.js.gz +0 -0
  347. package/web/chunk-msw43fnq.js +2 -0
  348. package/web/chunk-msw43fnq.js.br +0 -0
  349. package/web/chunk-msw43fnq.js.gz +0 -0
  350. package/web/chunk-mzzjg4sn.js +2 -0
  351. package/web/chunk-mzzjg4sn.js.br +0 -0
  352. package/web/chunk-mzzjg4sn.js.gz +0 -0
  353. package/web/chunk-n1bmcj13.js +2 -0
  354. package/web/chunk-n1bmcj13.js.br +0 -0
  355. package/web/chunk-n1bmcj13.js.gz +0 -0
  356. package/web/chunk-n5y4ar3e.js +1 -0
  357. package/web/chunk-n5y4ar3e.js.br +0 -0
  358. package/web/chunk-n5y4ar3e.js.gz +0 -0
  359. package/web/chunk-n9vszqw9.js +1 -0
  360. package/web/chunk-n9vszqw9.js.br +0 -0
  361. package/web/chunk-n9vszqw9.js.gz +0 -0
  362. package/web/chunk-nzzcmxq8.js +1 -0
  363. package/web/chunk-nzzcmxq8.js.br +0 -0
  364. package/web/chunk-nzzcmxq8.js.gz +0 -0
  365. package/web/chunk-p25eppk1.js +1 -0
  366. package/web/chunk-p25eppk1.js.br +0 -0
  367. package/web/chunk-p25eppk1.js.gz +0 -0
  368. package/web/chunk-p9352vpw.js +1 -0
  369. package/web/chunk-p9352vpw.js.br +0 -0
  370. package/web/chunk-p9352vpw.js.gz +0 -0
  371. package/web/chunk-pdvm4n6f.js +1 -0
  372. package/web/chunk-pdvm4n6f.js.br +2 -0
  373. package/web/chunk-pdvm4n6f.js.gz +0 -0
  374. package/web/chunk-pjm2t9da.js +1 -0
  375. package/web/chunk-pjm2t9da.js.br +0 -0
  376. package/web/chunk-pjm2t9da.js.gz +0 -0
  377. package/web/chunk-pka3qm06.js +98 -0
  378. package/web/chunk-pka3qm06.js.br +0 -0
  379. package/web/chunk-pka3qm06.js.gz +0 -0
  380. package/web/chunk-pkbcbta6.js +1 -0
  381. package/web/chunk-pkbcbta6.js.br +0 -0
  382. package/web/chunk-pkbcbta6.js.gz +0 -0
  383. package/web/chunk-pq4vn3zh.js +1 -0
  384. package/web/chunk-pq4vn3zh.js.br +0 -0
  385. package/web/chunk-pq4vn3zh.js.gz +0 -0
  386. package/web/chunk-prk9ks5j.js +1 -0
  387. package/web/chunk-prk9ks5j.js.br +0 -0
  388. package/web/chunk-prk9ks5j.js.gz +0 -0
  389. package/web/chunk-px68tdjm.js +1 -0
  390. package/web/chunk-px68tdjm.js.br +2 -0
  391. package/web/chunk-px68tdjm.js.gz +0 -0
  392. package/web/chunk-px8k5edz.js +24 -0
  393. package/web/chunk-px8k5edz.js.br +0 -0
  394. package/web/chunk-px8k5edz.js.gz +0 -0
  395. package/web/chunk-pz4g2bem.js +292 -0
  396. package/web/chunk-pz4g2bem.js.br +0 -0
  397. package/web/chunk-pz4g2bem.js.gz +0 -0
  398. package/web/chunk-q0gx75nf.js +55 -0
  399. package/web/chunk-q0gx75nf.js.br +0 -0
  400. package/web/chunk-q0gx75nf.js.gz +0 -0
  401. package/web/chunk-q9rpxfmm.js +1 -0
  402. package/web/chunk-q9rpxfmm.js.br +0 -0
  403. package/web/chunk-q9rpxfmm.js.gz +0 -0
  404. package/web/chunk-qpfhs1x0.js +1 -0
  405. package/web/chunk-qpfhs1x0.js.br +0 -0
  406. package/web/chunk-qpfhs1x0.js.gz +0 -0
  407. package/web/chunk-qredmg6m.js +1 -0
  408. package/web/chunk-qredmg6m.js.br +0 -0
  409. package/web/chunk-qredmg6m.js.gz +0 -0
  410. package/web/chunk-qtc9ar2m.js +2 -0
  411. package/web/chunk-qtc9ar2m.js.br +0 -0
  412. package/web/chunk-qtc9ar2m.js.gz +0 -0
  413. package/web/chunk-r5dsw56r.js +1 -0
  414. package/web/chunk-r5dsw56r.js.br +0 -0
  415. package/web/chunk-r5dsw56r.js.gz +0 -0
  416. package/web/chunk-rkaps675.js +1 -0
  417. package/web/chunk-rkaps675.js.br +0 -0
  418. package/web/chunk-rkaps675.js.gz +0 -0
  419. package/web/chunk-rp87pgcp.js +40 -0
  420. package/web/chunk-rp87pgcp.js.br +0 -0
  421. package/web/chunk-rp87pgcp.js.gz +0 -0
  422. package/web/chunk-rs1mtd35.js +2 -0
  423. package/web/chunk-rs1mtd35.js.br +0 -0
  424. package/web/chunk-rs1mtd35.js.gz +0 -0
  425. package/web/chunk-s31n33g5.js +2 -0
  426. package/web/chunk-s31n33g5.js.br +0 -0
  427. package/web/chunk-s31n33g5.js.gz +0 -0
  428. package/web/chunk-sbcyvn42.js +1 -0
  429. package/web/chunk-sbcyvn42.js.br +0 -0
  430. package/web/chunk-sbcyvn42.js.gz +0 -0
  431. package/web/chunk-sew9vfwy.js +1 -0
  432. package/web/chunk-sew9vfwy.js.br +0 -0
  433. package/web/chunk-sew9vfwy.js.gz +0 -0
  434. package/web/chunk-sgaw26nc.js +2 -0
  435. package/web/chunk-sgaw26nc.js.br +0 -0
  436. package/web/chunk-sgaw26nc.js.gz +0 -0
  437. package/web/chunk-t2ak4a9d.js +1 -0
  438. package/web/chunk-t2ak4a9d.js.br +0 -0
  439. package/web/chunk-t2ak4a9d.js.gz +0 -0
  440. package/web/chunk-ta0e3dk6.js +2 -0
  441. package/web/chunk-ta0e3dk6.js.br +0 -0
  442. package/web/chunk-ta0e3dk6.js.gz +0 -0
  443. package/web/chunk-tqax5mb6.js +217 -0
  444. package/web/chunk-tqax5mb6.js.br +0 -0
  445. package/web/chunk-tqax5mb6.js.gz +0 -0
  446. package/web/chunk-v1wxeq38.js +2 -0
  447. package/web/chunk-v1wxeq38.js.br +0 -0
  448. package/web/chunk-v1wxeq38.js.gz +0 -0
  449. package/web/chunk-v3kwg4zn.js +2 -0
  450. package/web/chunk-v3kwg4zn.js.br +0 -0
  451. package/web/chunk-v3kwg4zn.js.gz +0 -0
  452. package/web/chunk-vcpvhkxh.js +39 -0
  453. package/web/chunk-vcpvhkxh.js.br +0 -0
  454. package/web/chunk-vcpvhkxh.js.gz +0 -0
  455. package/web/chunk-vg9qv3aa.js +1 -0
  456. package/web/chunk-vg9qv3aa.js.br +0 -0
  457. package/web/chunk-vg9qv3aa.js.gz +0 -0
  458. package/web/chunk-vwxnt3nh.js +1 -0
  459. package/web/chunk-vwxnt3nh.js.br +0 -0
  460. package/web/chunk-vwxnt3nh.js.gz +0 -0
  461. package/web/chunk-w1xjqhwy.js +1 -0
  462. package/web/chunk-w1xjqhwy.js.br +2 -0
  463. package/web/chunk-w1xjqhwy.js.gz +0 -0
  464. package/web/chunk-w3nfxvzd.js +1 -0
  465. package/web/chunk-w3nfxvzd.js.br +0 -0
  466. package/web/chunk-w3nfxvzd.js.gz +0 -0
  467. package/web/chunk-w7h3x3ys.js +1 -0
  468. package/web/chunk-w7h3x3ys.js.br +0 -0
  469. package/web/chunk-w7h3x3ys.js.gz +0 -0
  470. package/web/chunk-wb0yn3r4.js +8 -0
  471. package/web/chunk-wb0yn3r4.js.br +0 -0
  472. package/web/chunk-wb0yn3r4.js.gz +0 -0
  473. package/web/chunk-wff6hqjf.js +1 -0
  474. package/web/chunk-wff6hqjf.js.br +0 -0
  475. package/web/chunk-wff6hqjf.js.gz +0 -0
  476. package/web/chunk-whj4e4sb.js +89 -0
  477. package/web/chunk-whj4e4sb.js.br +0 -0
  478. package/web/chunk-whj4e4sb.js.gz +0 -0
  479. package/web/chunk-wn3kdpj0.js +1 -0
  480. package/web/chunk-wn3kdpj0.js.br +0 -0
  481. package/web/chunk-wn3kdpj0.js.gz +0 -0
  482. package/web/chunk-wzq3qxpb.js +1 -0
  483. package/web/chunk-wzq3qxpb.js.br +0 -0
  484. package/web/chunk-wzq3qxpb.js.gz +0 -0
  485. package/web/chunk-x2tezwv1.js +4 -0
  486. package/web/chunk-x2tezwv1.js.br +0 -0
  487. package/web/chunk-x2tezwv1.js.gz +0 -0
  488. package/web/chunk-xmajh4qe.js +2 -0
  489. package/web/chunk-xmajh4qe.js.br +0 -0
  490. package/web/chunk-xmajh4qe.js.gz +0 -0
  491. package/web/chunk-xz7py7yx.js +1 -0
  492. package/web/chunk-xz7py7yx.js.br +0 -0
  493. package/web/chunk-xz7py7yx.js.gz +0 -0
  494. package/web/chunk-y4af9gsm.js +291 -0
  495. package/web/chunk-y4af9gsm.js.br +0 -0
  496. package/web/chunk-y4af9gsm.js.gz +0 -0
  497. package/web/chunk-y512gr5a.js +332 -0
  498. package/web/chunk-y512gr5a.js.br +0 -0
  499. package/web/chunk-y512gr5a.js.gz +0 -0
  500. package/web/chunk-ywg44m2b.js +2 -0
  501. package/web/chunk-ywg44m2b.js.br +0 -0
  502. package/web/chunk-ywg44m2b.js.gz +0 -0
  503. package/web/chunk-zhzp4fm1.js +2 -0
  504. package/web/chunk-zhzp4fm1.js.br +0 -0
  505. package/web/chunk-zhzp4fm1.js.gz +0 -0
  506. package/web/index.html +1 -1
  507. package/web/index.html.br +0 -0
  508. package/web/index.html.gz +0 -0
  509. package/worker.js +1 -1
  510. package/chunk-04326385.js +0 -39
  511. package/chunk-11zc1b2w.js +0 -3
  512. package/chunk-12203fgm.js +0 -2
  513. package/chunk-194d4z7x.js +0 -7
  514. package/chunk-1apm7p2e.js +0 -2
  515. package/chunk-2csz31nh.js +0 -2
  516. package/chunk-2rqpfv4h.js +0 -3
  517. package/chunk-39cfcar4.js +0 -3
  518. package/chunk-3j26jsy0.js +0 -51
  519. package/chunk-4a5xttdp.js +0 -3
  520. package/chunk-4st5xeee.js +0 -2
  521. package/chunk-54zpktrq.js +0 -3
  522. package/chunk-5ggyf53b.js +0 -50
  523. package/chunk-5h17n6g1.js +0 -3
  524. package/chunk-5rn18vrq.js +0 -5
  525. package/chunk-5tdnvdmz.js +0 -2
  526. package/chunk-6qavr39k.js +0 -2
  527. package/chunk-6xn0r0dd.js +0 -3
  528. package/chunk-7h76jrss.js +0 -7
  529. package/chunk-7hss4hs3.js +0 -7
  530. package/chunk-7vdq0wye.js +0 -2
  531. package/chunk-7w187ycz.js +0 -10
  532. package/chunk-81s7mvf2.js +0 -16
  533. package/chunk-8j8acxde.js +0 -2
  534. package/chunk-9nfz04yr.js +0 -2
  535. package/chunk-9vth0w8q.js +0 -2
  536. package/chunk-9zcfam20.js +0 -2
  537. package/chunk-a6zvmsbh.js +0 -12
  538. package/chunk-anr8aghq.js +0 -59
  539. package/chunk-av8zh9yp.js +0 -2
  540. package/chunk-bwv97dtf.js +0 -2
  541. package/chunk-cjy4rssa.js +0 -10
  542. package/chunk-dmdyqq1k.js +0 -2
  543. package/chunk-dzvq7vt6.js +0 -2
  544. package/chunk-ejrksf6g.js +0 -3
  545. package/chunk-erxka5vh.js +0 -18
  546. package/chunk-fb2ydc2s.js +0 -8
  547. package/chunk-fc41dvhp.js +0 -12
  548. package/chunk-fdgrayj5.js +0 -3
  549. package/chunk-fgpzy3fe.js +0 -3
  550. package/chunk-fwcqcecb.js +0 -8
  551. package/chunk-hhwnmhbb.js +0 -2
  552. package/chunk-hvxc1wyv.js +0 -3
  553. package/chunk-jm2bn5mq.js +0 -3
  554. package/chunk-jm5j5jfy.js +0 -3
  555. package/chunk-jqtdf0ym.js +0 -63
  556. package/chunk-jsvr3s4q.js +0 -5
  557. package/chunk-jwk5a5tk.js +0 -25
  558. package/chunk-mwc59w50.js +0 -31
  559. package/chunk-mypbpphn.js +0 -3
  560. package/chunk-n3hfhbe4.js +0 -498
  561. package/chunk-ng5ncy65.js +0 -2
  562. package/chunk-nkmvqcge.js +0 -4073
  563. package/chunk-nmvayfq3.js +0 -3
  564. package/chunk-nw4h0wm9.js +0 -2
  565. package/chunk-p23eqet9.js +0 -2
  566. package/chunk-pxsgm6ff.js +0 -2
  567. package/chunk-qqs9fqsy.js +0 -4
  568. package/chunk-r0gsb1qs.js +0 -3
  569. package/chunk-r49sxmnc.js +0 -3
  570. package/chunk-rbfpa63e.js +0 -3
  571. package/chunk-rsrh5dgx.js +0 -2
  572. package/chunk-s2pm97nk.js +0 -286
  573. package/chunk-s6tnmg6x.js +0 -3
  574. package/chunk-se548edt.js +0 -20
  575. package/chunk-tsdeeqb8.js +0 -3
  576. package/chunk-vnv3a6t2.js +0 -3
  577. package/chunk-vrsh8cx1.js +0 -3
  578. package/chunk-w3v8zahw.js +0 -2
  579. package/chunk-w6m8c4vf.js +0 -11
  580. package/chunk-wd7sj5cv.js +0 -2
  581. package/chunk-we8v9wkw.js +0 -9
  582. package/chunk-x055cas0.js +0 -5
  583. package/chunk-x5vrtxkj.js +0 -3
  584. package/chunk-x83syrhw.js +0 -44
  585. package/chunk-xedzsj31.js +0 -5
  586. package/chunk-xp83v3zm.js +0 -2
  587. package/chunk-ykzm5g1b.js +0 -25
  588. package/chunk-yq2bwebb.js +0 -3
  589. package/chunk-yygcpnwc.js +0 -3
  590. package/chunk-zjf34acb.js +0 -2
  591. package/web/chunk-07kt1zpn.js +0 -1
  592. package/web/chunk-07kt1zpn.js.br +0 -0
  593. package/web/chunk-07kt1zpn.js.gz +0 -0
  594. package/web/chunk-0d068bmj.js +0 -1
  595. package/web/chunk-0d068bmj.js.br +0 -0
  596. package/web/chunk-0d068bmj.js.gz +0 -0
  597. package/web/chunk-0m15ghn0.js +0 -2
  598. package/web/chunk-0m15ghn0.js.br +0 -0
  599. package/web/chunk-0m15ghn0.js.gz +0 -0
  600. package/web/chunk-0swykhgr.js +0 -2
  601. package/web/chunk-0swykhgr.js.br +0 -0
  602. package/web/chunk-0swykhgr.js.gz +0 -0
  603. package/web/chunk-100a4th6.js +0 -4
  604. package/web/chunk-100a4th6.js.br +0 -0
  605. package/web/chunk-100a4th6.js.gz +0 -0
  606. package/web/chunk-1mdvm20t.js +0 -140
  607. package/web/chunk-1mdvm20t.js.br +0 -0
  608. package/web/chunk-1mdvm20t.js.gz +0 -0
  609. package/web/chunk-1mkzfr1m.js +0 -2
  610. package/web/chunk-1mkzfr1m.js.br +0 -0
  611. package/web/chunk-1mkzfr1m.js.gz +0 -0
  612. package/web/chunk-1p7wa1rq.js +0 -1
  613. package/web/chunk-1p7wa1rq.js.br +0 -0
  614. package/web/chunk-1p7wa1rq.js.gz +0 -0
  615. package/web/chunk-20gcnbgn.js +0 -2
  616. package/web/chunk-20gcnbgn.js.br +0 -0
  617. package/web/chunk-20gcnbgn.js.gz +0 -0
  618. package/web/chunk-2grspw9t.js +0 -1
  619. package/web/chunk-2grspw9t.js.br +0 -0
  620. package/web/chunk-2grspw9t.js.gz +0 -0
  621. package/web/chunk-2nwvdqxm.js +0 -1
  622. package/web/chunk-2nwvdqxm.js.br +0 -0
  623. package/web/chunk-2nwvdqxm.js.gz +0 -0
  624. package/web/chunk-2zz8t49r.js +0 -1
  625. package/web/chunk-2zz8t49r.js.br +0 -0
  626. package/web/chunk-2zz8t49r.js.gz +0 -0
  627. package/web/chunk-34g2xrgq.js +0 -120
  628. package/web/chunk-34g2xrgq.js.br +0 -0
  629. package/web/chunk-34g2xrgq.js.gz +0 -0
  630. package/web/chunk-34q3az4b.js +0 -1
  631. package/web/chunk-34q3az4b.js.br +0 -0
  632. package/web/chunk-34q3az4b.js.gz +0 -0
  633. package/web/chunk-39jqdq4r.js +0 -1
  634. package/web/chunk-39jqdq4r.js.br +0 -0
  635. package/web/chunk-39jqdq4r.js.gz +0 -0
  636. package/web/chunk-3d2fm4qc.js +0 -1
  637. package/web/chunk-3d2fm4qc.js.br +0 -0
  638. package/web/chunk-3d2fm4qc.js.gz +0 -0
  639. package/web/chunk-3s16fbrf.js +0 -40
  640. package/web/chunk-3s16fbrf.js.br +0 -0
  641. package/web/chunk-3s16fbrf.js.gz +0 -0
  642. package/web/chunk-3vsey6mw.js +0 -1
  643. package/web/chunk-3vsey6mw.js.br +0 -0
  644. package/web/chunk-3vsey6mw.js.gz +0 -0
  645. package/web/chunk-3y29sc9c.js +0 -7
  646. package/web/chunk-3y29sc9c.js.br +0 -0
  647. package/web/chunk-3y29sc9c.js.gz +0 -0
  648. package/web/chunk-40f59ze9.js +0 -39
  649. package/web/chunk-40f59ze9.js.br +0 -0
  650. package/web/chunk-40f59ze9.js.gz +0 -0
  651. package/web/chunk-414npx47.js +0 -1
  652. package/web/chunk-414npx47.js.br +0 -0
  653. package/web/chunk-414npx47.js.gz +0 -0
  654. package/web/chunk-495sjpc6.js +0 -2
  655. package/web/chunk-495sjpc6.js.br +0 -0
  656. package/web/chunk-495sjpc6.js.gz +0 -0
  657. package/web/chunk-4ab1dv3g.js +0 -142
  658. package/web/chunk-4ab1dv3g.js.br +0 -0
  659. package/web/chunk-4ab1dv3g.js.gz +0 -0
  660. package/web/chunk-545zx869.js +0 -2
  661. package/web/chunk-545zx869.js.br +0 -0
  662. package/web/chunk-545zx869.js.gz +0 -0
  663. package/web/chunk-55mx05jg.js +0 -2
  664. package/web/chunk-55mx05jg.js.br +0 -0
  665. package/web/chunk-55mx05jg.js.gz +0 -0
  666. package/web/chunk-58xhn7ry.js +0 -2
  667. package/web/chunk-58xhn7ry.js.br +0 -0
  668. package/web/chunk-58xhn7ry.js.gz +0 -0
  669. package/web/chunk-67pa4950.js +0 -1
  670. package/web/chunk-67pa4950.js.br +0 -0
  671. package/web/chunk-67pa4950.js.gz +0 -0
  672. package/web/chunk-690qxds4.js +0 -1
  673. package/web/chunk-690qxds4.js.br +0 -0
  674. package/web/chunk-690qxds4.js.gz +0 -0
  675. package/web/chunk-6ana63fs.js +0 -21
  676. package/web/chunk-6ana63fs.js.br +0 -0
  677. package/web/chunk-6ana63fs.js.gz +0 -0
  678. package/web/chunk-6ew54553.js +0 -2
  679. package/web/chunk-6ew54553.js.br +0 -0
  680. package/web/chunk-6ew54553.js.gz +0 -0
  681. package/web/chunk-6f1q0tjv.js +0 -1142
  682. package/web/chunk-6f1q0tjv.js.br +0 -0
  683. package/web/chunk-6f1q0tjv.js.gz +0 -0
  684. package/web/chunk-6gpzz5wm.js +0 -1
  685. package/web/chunk-6gpzz5wm.js.br +0 -0
  686. package/web/chunk-6gpzz5wm.js.gz +0 -0
  687. package/web/chunk-71g6vrx9.js +0 -62
  688. package/web/chunk-71g6vrx9.js.br +0 -0
  689. package/web/chunk-71g6vrx9.js.gz +0 -0
  690. package/web/chunk-77dnqrb6.js +0 -2
  691. package/web/chunk-77dnqrb6.js.br +0 -0
  692. package/web/chunk-77dnqrb6.js.gz +0 -0
  693. package/web/chunk-7fdrwy21.js +0 -1
  694. package/web/chunk-7fdrwy21.js.br +0 -0
  695. package/web/chunk-7fdrwy21.js.gz +0 -0
  696. package/web/chunk-84s7821x.js +0 -2
  697. package/web/chunk-84s7821x.js.br +0 -0
  698. package/web/chunk-84s7821x.js.gz +0 -0
  699. package/web/chunk-8e5qd73v.js +0 -7
  700. package/web/chunk-8e5qd73v.js.br +0 -0
  701. package/web/chunk-8e5qd73v.js.gz +0 -0
  702. package/web/chunk-8kyj945c.js +0 -2
  703. package/web/chunk-8kyj945c.js.br +0 -0
  704. package/web/chunk-8kyj945c.js.gz +0 -0
  705. package/web/chunk-9b0evht1.js +0 -292
  706. package/web/chunk-9b0evht1.js.br +0 -0
  707. package/web/chunk-9b0evht1.js.gz +0 -0
  708. package/web/chunk-9j7v0e4v.js +0 -2
  709. package/web/chunk-9j7v0e4v.js.br +0 -0
  710. package/web/chunk-9j7v0e4v.js.gz +0 -0
  711. package/web/chunk-9jb5xwya.js +0 -36
  712. package/web/chunk-9jb5xwya.js.br +0 -0
  713. package/web/chunk-9jb5xwya.js.gz +0 -0
  714. package/web/chunk-9kf8arqg.js +0 -1
  715. package/web/chunk-9kf8arqg.js.br +0 -0
  716. package/web/chunk-9kf8arqg.js.gz +0 -0
  717. package/web/chunk-9msmea44.js +0 -70
  718. package/web/chunk-9msmea44.js.br +0 -0
  719. package/web/chunk-9msmea44.js.gz +0 -0
  720. package/web/chunk-a7q85665.js +0 -3
  721. package/web/chunk-a7q85665.js.br +0 -0
  722. package/web/chunk-a7q85665.js.gz +0 -0
  723. package/web/chunk-aan5qk6x.js +0 -1
  724. package/web/chunk-aan5qk6x.js.br +0 -0
  725. package/web/chunk-aan5qk6x.js.gz +0 -0
  726. package/web/chunk-b9cjgxr1.js +0 -98
  727. package/web/chunk-b9cjgxr1.js.br +0 -0
  728. package/web/chunk-b9cjgxr1.js.gz +0 -0
  729. package/web/chunk-baaattjv.js +0 -2
  730. package/web/chunk-baaattjv.js.br +0 -0
  731. package/web/chunk-baaattjv.js.gz +0 -0
  732. package/web/chunk-bj9m08f9.js +0 -1
  733. package/web/chunk-bj9m08f9.js.br +0 -0
  734. package/web/chunk-bj9m08f9.js.gz +0 -0
  735. package/web/chunk-bm4fvq6q.js +0 -89
  736. package/web/chunk-bm4fvq6q.js.br +0 -0
  737. package/web/chunk-bm4fvq6q.js.gz +0 -0
  738. package/web/chunk-c4g2k9wp.js +0 -1
  739. package/web/chunk-c4g2k9wp.js.br +0 -0
  740. package/web/chunk-c4g2k9wp.js.gz +0 -0
  741. package/web/chunk-cnptxet3.js +0 -2
  742. package/web/chunk-cnptxet3.js.br +0 -0
  743. package/web/chunk-cnptxet3.js.gz +0 -0
  744. package/web/chunk-d5n2yz4e.js +0 -2
  745. package/web/chunk-d5n2yz4e.js.br +0 -0
  746. package/web/chunk-d5n2yz4e.js.gz +0 -0
  747. package/web/chunk-db2jge7w.js +0 -291
  748. package/web/chunk-db2jge7w.js.br +0 -0
  749. package/web/chunk-db2jge7w.js.gz +0 -0
  750. package/web/chunk-dfv95z6w.js +0 -1
  751. package/web/chunk-dfv95z6w.js.br +0 -0
  752. package/web/chunk-dfv95z6w.js.gz +0 -0
  753. package/web/chunk-dsxjv5an.js +0 -1
  754. package/web/chunk-dsxjv5an.js.br +0 -0
  755. package/web/chunk-dsxjv5an.js.gz +0 -0
  756. package/web/chunk-e362x35y.js +0 -1
  757. package/web/chunk-e362x35y.js.br +0 -0
  758. package/web/chunk-e362x35y.js.gz +0 -0
  759. package/web/chunk-e6jfnajp.js +0 -55
  760. package/web/chunk-e6jfnajp.js.br +0 -0
  761. package/web/chunk-e6jfnajp.js.gz +0 -0
  762. package/web/chunk-en5n60qw.js +0 -2
  763. package/web/chunk-en5n60qw.js.br +0 -0
  764. package/web/chunk-en5n60qw.js.gz +0 -0
  765. package/web/chunk-ex34kdxk.js +0 -217
  766. package/web/chunk-ex34kdxk.js.br +0 -0
  767. package/web/chunk-ex34kdxk.js.gz +0 -0
  768. package/web/chunk-exa2z1b4.js +0 -1
  769. package/web/chunk-exa2z1b4.js.br +0 -0
  770. package/web/chunk-exa2z1b4.js.gz +0 -0
  771. package/web/chunk-f5wyg9zh.js +0 -2
  772. package/web/chunk-f5wyg9zh.js.br +0 -0
  773. package/web/chunk-f5wyg9zh.js.gz +0 -0
  774. package/web/chunk-fjvd2dx2.js +0 -2
  775. package/web/chunk-fjvd2dx2.js.br +0 -0
  776. package/web/chunk-fjvd2dx2.js.gz +0 -0
  777. package/web/chunk-fs39pqet.js +0 -2
  778. package/web/chunk-fs39pqet.js.br +0 -0
  779. package/web/chunk-fs39pqet.js.gz +0 -0
  780. package/web/chunk-gvndjaan.js +0 -2
  781. package/web/chunk-gvndjaan.js.br +0 -0
  782. package/web/chunk-gvndjaan.js.gz +0 -0
  783. package/web/chunk-h3618s7t.js +0 -4
  784. package/web/chunk-h3618s7t.js.br +0 -0
  785. package/web/chunk-h3618s7t.js.gz +0 -0
  786. package/web/chunk-hks91ztk.js +0 -8
  787. package/web/chunk-hks91ztk.js.br +0 -0
  788. package/web/chunk-hks91ztk.js.gz +0 -0
  789. package/web/chunk-hqd97ez8.js +0 -200
  790. package/web/chunk-hqd97ez8.js.br +0 -0
  791. package/web/chunk-hqd97ez8.js.gz +0 -0
  792. package/web/chunk-hta68vm8.js +0 -2
  793. package/web/chunk-hta68vm8.js.br +0 -0
  794. package/web/chunk-hta68vm8.js.gz +0 -0
  795. package/web/chunk-jcbvhp3h.js +0 -1
  796. package/web/chunk-jcbvhp3h.js.br +0 -0
  797. package/web/chunk-jcbvhp3h.js.gz +0 -0
  798. package/web/chunk-jw6e38cy.js +0 -1
  799. package/web/chunk-jw6e38cy.js.br +0 -0
  800. package/web/chunk-jw6e38cy.js.gz +0 -0
  801. package/web/chunk-jzp1qd92.js +0 -1
  802. package/web/chunk-jzp1qd92.js.br +0 -0
  803. package/web/chunk-jzp1qd92.js.gz +0 -0
  804. package/web/chunk-kg39a24q.js +0 -16
  805. package/web/chunk-kg39a24q.js.br +0 -0
  806. package/web/chunk-kg39a24q.js.gz +0 -0
  807. package/web/chunk-kj75rme3.js +0 -1
  808. package/web/chunk-kj75rme3.js.br +0 -0
  809. package/web/chunk-kj75rme3.js.gz +0 -0
  810. package/web/chunk-kvxmwmen.js +0 -1
  811. package/web/chunk-kvxmwmen.js.br +0 -0
  812. package/web/chunk-kvxmwmen.js.gz +0 -0
  813. package/web/chunk-kzdmsaet.js +0 -1
  814. package/web/chunk-kzdmsaet.js.br +0 -0
  815. package/web/chunk-kzdmsaet.js.gz +0 -0
  816. package/web/chunk-m203pzza.js +0 -89
  817. package/web/chunk-m203pzza.js.br +0 -0
  818. package/web/chunk-m203pzza.js.gz +0 -0
  819. package/web/chunk-m3xw41vq.js +0 -1
  820. package/web/chunk-m3xw41vq.js.br +0 -0
  821. package/web/chunk-m3xw41vq.js.gz +0 -0
  822. package/web/chunk-m8jcx13t.js +0 -30
  823. package/web/chunk-m8jcx13t.js.br +0 -0
  824. package/web/chunk-m8jcx13t.js.gz +0 -0
  825. package/web/chunk-mpgz1bj6.js +0 -1
  826. package/web/chunk-mpgz1bj6.js.br +0 -0
  827. package/web/chunk-mpgz1bj6.js.gz +0 -0
  828. package/web/chunk-mzagmpq5.js +0 -1
  829. package/web/chunk-mzagmpq5.js.br +0 -0
  830. package/web/chunk-mzagmpq5.js.gz +0 -0
  831. package/web/chunk-n51q6d6e.js +0 -1
  832. package/web/chunk-n51q6d6e.js.br +0 -0
  833. package/web/chunk-n51q6d6e.js.gz +0 -0
  834. package/web/chunk-nbf2zaaj.js +0 -1
  835. package/web/chunk-nbf2zaaj.js.br +0 -0
  836. package/web/chunk-nbf2zaaj.js.gz +0 -0
  837. package/web/chunk-ngsv0xfb.js +0 -1
  838. package/web/chunk-ngsv0xfb.js.br +0 -0
  839. package/web/chunk-ngsv0xfb.js.gz +0 -0
  840. package/web/chunk-nxd7dn08.js +0 -1
  841. package/web/chunk-nxd7dn08.js.br +0 -0
  842. package/web/chunk-nxd7dn08.js.gz +0 -0
  843. package/web/chunk-p44ezwgh.js +0 -1
  844. package/web/chunk-p44ezwgh.js.br +0 -0
  845. package/web/chunk-p44ezwgh.js.gz +0 -0
  846. package/web/chunk-pdg3bxc0.js +0 -2
  847. package/web/chunk-pdg3bxc0.js.br +0 -0
  848. package/web/chunk-pdg3bxc0.js.gz +0 -0
  849. package/web/chunk-pjbp0xwn.css +0 -1
  850. package/web/chunk-pjbp0xwn.css.br +0 -0
  851. package/web/chunk-pjbp0xwn.css.gz +0 -0
  852. package/web/chunk-pkbyh261.js +0 -1
  853. package/web/chunk-pkbyh261.js.br +0 -0
  854. package/web/chunk-pkbyh261.js.gz +0 -0
  855. package/web/chunk-q3q25jr9.js +0 -324
  856. package/web/chunk-q3q25jr9.js.br +0 -0
  857. package/web/chunk-q3q25jr9.js.gz +0 -0
  858. package/web/chunk-q5nr5wjn.js +0 -169
  859. package/web/chunk-q5nr5wjn.js.br +0 -0
  860. package/web/chunk-q5nr5wjn.js.gz +0 -0
  861. package/web/chunk-qd9y8r3g.js +0 -84
  862. package/web/chunk-qd9y8r3g.js.br +0 -0
  863. package/web/chunk-qd9y8r3g.js.gz +0 -0
  864. package/web/chunk-qm039dan.js +0 -24
  865. package/web/chunk-qm039dan.js.br +0 -0
  866. package/web/chunk-qm039dan.js.gz +0 -0
  867. package/web/chunk-qqp31fyy.js +0 -1
  868. package/web/chunk-qqp31fyy.js.br +0 -0
  869. package/web/chunk-qqp31fyy.js.gz +0 -0
  870. package/web/chunk-r76we294.js +0 -1
  871. package/web/chunk-r76we294.js.br +0 -0
  872. package/web/chunk-r76we294.js.gz +0 -0
  873. package/web/chunk-r7st369j.js +0 -1
  874. package/web/chunk-r7st369j.js.br +0 -0
  875. package/web/chunk-r7st369j.js.gz +0 -0
  876. package/web/chunk-rc3sv7v4.js +0 -1
  877. package/web/chunk-rc3sv7v4.js.br +0 -0
  878. package/web/chunk-rc3sv7v4.js.gz +0 -0
  879. package/web/chunk-rj1rp0tc.js +0 -1
  880. package/web/chunk-rj1rp0tc.js.br +0 -0
  881. package/web/chunk-rj1rp0tc.js.gz +0 -0
  882. package/web/chunk-rtk95qme.js +0 -1
  883. package/web/chunk-rtk95qme.js.br +0 -0
  884. package/web/chunk-rtk95qme.js.gz +0 -0
  885. package/web/chunk-s4rfkyqn.js +0 -12
  886. package/web/chunk-s4rfkyqn.js.br +0 -0
  887. package/web/chunk-s4rfkyqn.js.gz +0 -0
  888. package/web/chunk-s6a0gfv3.js +0 -34
  889. package/web/chunk-s6a0gfv3.js.br +0 -0
  890. package/web/chunk-s6a0gfv3.js.gz +0 -0
  891. package/web/chunk-s7rwbxr5.js +0 -2
  892. package/web/chunk-s7rwbxr5.js.br +0 -0
  893. package/web/chunk-s7rwbxr5.js.gz +0 -0
  894. package/web/chunk-s8f6v2nn.js +0 -1
  895. package/web/chunk-s8f6v2nn.js.br +0 -0
  896. package/web/chunk-s8f6v2nn.js.gz +0 -0
  897. package/web/chunk-sawc81kc.js +0 -303
  898. package/web/chunk-sawc81kc.js.br +0 -0
  899. package/web/chunk-sawc81kc.js.gz +0 -0
  900. package/web/chunk-sex2gevj.js +0 -2
  901. package/web/chunk-sex2gevj.js.br +0 -0
  902. package/web/chunk-sex2gevj.js.gz +0 -0
  903. package/web/chunk-smmdqmcy.js +0 -1
  904. package/web/chunk-smmdqmcy.js.br +0 -0
  905. package/web/chunk-smmdqmcy.js.gz +0 -0
  906. package/web/chunk-tn39vbcz.js +0 -2
  907. package/web/chunk-tn39vbcz.js.br +0 -0
  908. package/web/chunk-tn39vbcz.js.gz +0 -0
  909. package/web/chunk-tntwwpyh.js +0 -2
  910. package/web/chunk-tntwwpyh.js.br +0 -0
  911. package/web/chunk-tntwwpyh.js.gz +0 -0
  912. package/web/chunk-tpzyyc2z.js +0 -2
  913. package/web/chunk-tpzyyc2z.js.br +0 -0
  914. package/web/chunk-tpzyyc2z.js.gz +0 -0
  915. package/web/chunk-txhvq81f.js +0 -106
  916. package/web/chunk-txhvq81f.js.br +0 -0
  917. package/web/chunk-txhvq81f.js.gz +0 -0
  918. package/web/chunk-txtm71rz.js +0 -41
  919. package/web/chunk-txtm71rz.js.br +0 -0
  920. package/web/chunk-txtm71rz.js.gz +0 -0
  921. package/web/chunk-tykcqm6v.js +0 -2
  922. package/web/chunk-tykcqm6v.js.br +0 -0
  923. package/web/chunk-tykcqm6v.js.gz +0 -0
  924. package/web/chunk-tyrmd7j6.js +0 -1
  925. package/web/chunk-tyrmd7j6.js.br +0 -0
  926. package/web/chunk-tyrmd7j6.js.gz +0 -0
  927. package/web/chunk-v6ebn3sf.js +0 -38
  928. package/web/chunk-v6ebn3sf.js.br +0 -0
  929. package/web/chunk-v6ebn3sf.js.gz +0 -0
  930. package/web/chunk-vbx7t0h5.js +0 -214
  931. package/web/chunk-vbx7t0h5.js.br +0 -0
  932. package/web/chunk-vbx7t0h5.js.gz +0 -0
  933. package/web/chunk-vj3wz0a2.js +0 -1
  934. package/web/chunk-vj3wz0a2.js.br +0 -0
  935. package/web/chunk-vj3wz0a2.js.gz +0 -0
  936. package/web/chunk-vndrjeyr.js +0 -2
  937. package/web/chunk-vndrjeyr.js.br +0 -0
  938. package/web/chunk-vndrjeyr.js.gz +0 -0
  939. package/web/chunk-vqgkd7q8.js +0 -1
  940. package/web/chunk-vqgkd7q8.js.br +0 -0
  941. package/web/chunk-vqgkd7q8.js.gz +0 -0
  942. package/web/chunk-vvsfwjrg.js +0 -1
  943. package/web/chunk-vvsfwjrg.js.br +0 -0
  944. package/web/chunk-vvsfwjrg.js.gz +0 -0
  945. package/web/chunk-w0k63gap.js +0 -2
  946. package/web/chunk-w0k63gap.js.br +0 -0
  947. package/web/chunk-w0k63gap.js.gz +0 -0
  948. package/web/chunk-wafwgky9.js +0 -1
  949. package/web/chunk-wafwgky9.js.br +0 -0
  950. package/web/chunk-wafwgky9.js.gz +0 -0
  951. package/web/chunk-wdd9pasx.js +0 -1
  952. package/web/chunk-wdd9pasx.js.br +0 -0
  953. package/web/chunk-wdd9pasx.js.gz +0 -0
  954. package/web/chunk-wk89vrvf.js +0 -78
  955. package/web/chunk-wk89vrvf.js.br +0 -0
  956. package/web/chunk-wk89vrvf.js.gz +0 -0
  957. package/web/chunk-wqjn3yz1.js +0 -370
  958. package/web/chunk-wqjn3yz1.js.br +0 -0
  959. package/web/chunk-wqjn3yz1.js.gz +0 -0
  960. package/web/chunk-wrej9qt0.js +0 -2
  961. package/web/chunk-wrej9qt0.js.br +0 -0
  962. package/web/chunk-wrej9qt0.js.gz +0 -0
  963. package/web/chunk-xbjv549c.js +0 -2
  964. package/web/chunk-xbjv549c.js.br +0 -0
  965. package/web/chunk-xbjv549c.js.gz +0 -0
  966. package/web/chunk-xmp1ag6z.js +0 -2
  967. package/web/chunk-xmp1ag6z.js.br +0 -0
  968. package/web/chunk-xmp1ag6z.js.gz +0 -0
  969. package/web/chunk-xsqd38a2.js +0 -332
  970. package/web/chunk-xsqd38a2.js.br +0 -0
  971. package/web/chunk-xsqd38a2.js.gz +0 -0
  972. package/web/chunk-y2fbz356.js +0 -1
  973. package/web/chunk-y2fbz356.js.br +0 -0
  974. package/web/chunk-y2fbz356.js.gz +0 -0
  975. package/web/chunk-y48mj5d7.js +0 -1
  976. package/web/chunk-y48mj5d7.js.br +0 -0
  977. package/web/chunk-y48mj5d7.js.gz +0 -0
  978. package/web/chunk-yebmbyrj.js +0 -1
  979. package/web/chunk-yebmbyrj.js.br +0 -2
  980. package/web/chunk-yebmbyrj.js.gz +0 -0
  981. package/web/chunk-ypytxmn6.js +0 -24
  982. package/web/chunk-ypytxmn6.js.br +0 -0
  983. package/web/chunk-ypytxmn6.js.gz +0 -0
  984. package/web/chunk-z6jy8edk.js +0 -99
  985. package/web/chunk-z6jy8edk.js.br +0 -0
  986. package/web/chunk-z6jy8edk.js.gz +0 -0
  987. package/web/chunk-zg5n1hx4.js +0 -1
  988. package/web/chunk-zg5n1hx4.js.br +0 -0
  989. package/web/chunk-zg5n1hx4.js.gz +0 -0
  990. package/web/chunk-zmrd0bnc.js +0 -139
  991. package/web/chunk-zmrd0bnc.js.br +0 -0
  992. package/web/chunk-zmrd0bnc.js.gz +0 -0
  993. package/web/chunk-zqm6n89p.js +0 -7
  994. package/web/chunk-zqm6n89p.js.br +0 -0
  995. package/web/chunk-zqm6n89p.js.gz +0 -0
  996. package/web/chunk-zvat895r.js +0 -1
  997. package/web/chunk-zvat895r.js.br +0 -0
  998. package/web/chunk-zvat895r.js.gz +0 -0
  999. package/web/chunk-zxt17pcp.js +0 -1
  1000. package/web/chunk-zxt17pcp.js.br +0 -0
  1001. package/web/chunk-zxt17pcp.js.gz +0 -0
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{Yc}from"./chunk-6f1q0tjv.js";export{Yc as QuestionDock};
Binary file
Binary file
@@ -1,62 +0,0 @@
1
- import{ie}from"./chunk-tykcqm6v.js";import{t,i,Qe,F,A,W,N,M,P,R,I,O,D,J,Z}from"./chunk-sawc81kc.js";import{fe}from"./chunk-4ab1dv3g.js";var ut=t(()=>({domains:new Map,transitions:[]}),"createDefaultData"),et=ut(),At=t(()=>et.domains,"getDomains"),Bt=t(()=>et.transitions,"getTransitions"),St=t((e)=>{if(!e)return;for(let n of e){let o=n.domain,a=(n.items??[]).map((l)=>({label:l.label}));et.domains.set(o,{name:o,items:a})}},"setDomains"),Mt=t((e)=>{if(!e)return;et.transitions=e.filter((n)=>{if(n.from===n.to)return i.warn(`Cynefin: self-loop transition on domain "${n.from}" is not meaningful and will be skipped.`),!1;return!0}).map((n)=>({from:n.from,to:n.to,label:n.label||void 0}))},"setTransitions"),zt=t(()=>Z({...F.cynefin,...A().cynefin}),"getConfig"),Lt=t(()=>{N(),et=ut()},"clear"),at={getDomains:At,getTransitions:Bt,setDomains:St,setTransitions:Mt,getConfig:zt,clear:Lt,setAccTitle:M,getAccTitle:P,setDiagramTitle:O,getDiagramTitle:D,getAccDescription:I,setAccDescription:R},Nt=t((e)=>{ie(e,at),at.setDomains(e.domains),at.setTransitions(e.transitions)},"populate"),Pt={parse:t(async(e)=>{let n=await fe("cynefin",e);i.debug(n),Nt(n)},"parse")};function tt(e){let n=e+1831565813|0;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}t(tt,"seededRandom");function gt(e){let n=0;for(let o=0;o<e.length;o++){let a=e.charCodeAt(o);n=(n<<5)-n+a,n|=0}return n}t(gt,"hashString");function ht(e,n){if(typeof e==="number"&&Number.isFinite(e)&&e!==0)return e;return gt(n)}t(ht,"resolveSeed");function xt(e,n,o,a){let l=e/2,p=a??e*0.015,nt=7,j=n/7,f=[];for(let r=0;r<=7;r++){let y=tt(o+r*17)*p*2-p;f.push({x:l+y,y:r*j})}let T=`M${f[0].x},${f[0].y}`;for(let r=0;r<f.length-1;r++){let y=f[r],c=f[r+1],m=(y.y+c.y)/2,C=r%2===0?1:-1,h=p*1.5*C*tt(o+r*31+7),q=y.x+h,U=m,Q=c.x-h;T+=` C${q},${U} ${Q},${m} ${c.x},${c.y}`}return T}t(xt,"generateFoldPath");function $t(e,n,o,a){let l=n/2,p=a??n*0.015,nt=7,j=e/7,f=[];for(let r=0;r<=7;r++){let y=tt(o+r*23)*p*2-p;f.push({x:r*j,y:l+y})}let T=`M${f[0].x},${f[0].y}`;for(let r=0;r<f.length-1;r++){let y=f[r],c=f[r+1],m=(y.x+c.x)/2,C=r%2===0?1:-1,h=p*1.5*C*tt(o+r*37+11),q=m,U=y.y+h,Q=m,E=c.y-h;T+=` C${q},${U} ${Q},${E} ${c.x},${c.y}`}return T}t($t,"generateHorizontalBoundary");function bt(e,n){let o=e/2,a=n*0.5,l=n,p=e*0.03;return[`M${o},${a}`,`C${o+p},${a+(l-a)*0.2}`,`${o-p*1.5},${a+(l-a)*0.55}`,`${o+p*0.5},${a+(l-a)*0.75}`,`C${o-p},${a+(l-a)*0.85}`,`${o+p*0.3},${a+(l-a)*0.95}`,`${o},${l}`].join(" ")}t(bt,"generateCliffPath");function wt(e,n,o,a){return[`M${e-o},${n}`,`A${o},${a} 0 1,1 ${e+o},${n}`,`A${o},${a} 0 1,1 ${e-o},${n}`,"Z"].join(" ")}t(wt,"generateConfusionPath");var yt={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},It=t((e,n)=>{let o=e/2,a=n/2;return{complex:{cx:o/2,cy:a/2,x:0,y:0,w:o,h:a},complicated:{cx:o+o/2,cy:a/2,x:o,y:0,w:o,h:a},chaotic:{cx:o/2,cy:a+a/2,x:0,y:a,w:o,h:a},clear:{cx:o+o/2,cy:a+a/2,x:o,y:a,w:o,h:a},confusion:{cx:o,cy:a,x:o*0.7,y:a*0.7,w:o*0.6,h:a*0.6}}},"getDomainLayouts"),Wt=t(()=>{let e=Qe(),n=A();return Z(e,n.themeVariables).cynefin},"getCynefinDomainColors"),st=3,Rt=t((e,n,o,a)=>{let l=a.db,p=l.getDomains(),nt=l.getTransitions(),j=l.getDiagramTitle(),f=l.getAccTitle(),T=l.getAccDescription(),r=l.getConfig(),y=Wt();i.debug("Rendering Cynefin diagram");let{width:c,height:m,padding:C,showDomainDescriptions:h,boundaryAmplitude:q}=r,U=c+C*2,Q=m+C*2,E={complex:y.complexBg,complicated:y.complicatedBg,clear:y.clearBg,chaotic:y.chaoticBg,confusion:y.confusionBg},B=J(n);if(W(B,Q,U,r.useMaxWidth??!0),B.attr("viewBox",`0 0 ${U} ${Q}`),f)B.append("title").text(f);if(T)B.append("desc").text(T);let S=B.append("g").attr("transform",`translate(${C}, ${C})`),K=It(c,m),ct=ht(r.seed,n),Ct=S.append("g").attr("class","cynefin-backgrounds"),rt=["complex","complicated","chaotic","clear"];for(let d of rt){let s=K[d];Ct.append("rect").attr("class","cynefinDomain").attr("x",s.x).attr("y",s.y).attr("width",s.w).attr("height",s.h).attr("fill",E[d]).attr("fill-opacity",0.4).attr("stroke","none")}let it=S.append("g").attr("class","cynefin-boundaries");it.append("path").attr("class","cynefinBoundary").attr("d",xt(c,m,ct,q)).attr("fill","none"),it.append("path").attr("class","cynefinBoundary").attr("d",$t(c,m,ct+100,q)).attr("fill","none"),it.append("path").attr("class","cynefinCliff").attr("d",bt(c,m)).attr("fill","none");let vt=c*0.15,Dt=m*0.15;S.append("path").attr("class","cynefinConfusion").attr("d",wt(c/2,m/2,vt,Dt)).attr("fill",E.confusion).attr("fill-opacity",0.5);let lt=S.append("g").attr("class","cynefin-labels");for(let d of rt){let s=K[d];lt.append("text").attr("class","cynefinDomainLabel").attr("x",s.cx).attr("y",h?s.cy-30:s.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d.charAt(0).toUpperCase()+d.slice(1))}if(lt.append("text").attr("class","cynefinDomainLabel").attr("x",c/2).attr("y",h?m/2-10:m/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){let d=S.append("g").attr("class","cynefin-subtitles");for(let s of rt){let g=K[s],u=yt[s];d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.model),d.append("text").attr("class","cynefinSubtitle").attr("x",g.cx).attr("y",g.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(u.practice)}d.append("text").attr("class","cynefinSubtitle").attr("x",c/2).attr("y",m/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(yt.confusion.practice)}let dt=S.append("g").attr("class","cynefin-items"),z=26,ft=10,kt=["complex","complicated","chaotic","clear","confusion"];for(let d of kt){let s=p.get(d);if(!s||s.items.length===0)continue;let g=K[d],u=d==="confusion",H=s.items,G=0;if(u&&s.items.length>st)G=s.items.length-st,H=s.items.slice(0,st);let L;if(u){let b=h?22:14;L=g.cy+b}else L=g.cy+(h?25:15);if([...H].forEach((b,V)=>{let v=L+V*(z+4),_=dt.append("g"),Y=_.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",z/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(b.label),w=b.label.length*7,x=Y.node();if(x&&typeof x.getBBox==="function"){let ot=x.getBBox();if(ot.width>0)w=ot.width}let k=w+ft*2,X=g.cx-k/2;_.attr("transform",`translate(${X}, ${v})`),_.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",k).attr("height",z).attr("rx",4).attr("ry",4).attr("fill",E[d]).attr("fill-opacity",0.95),Y.attr("x",k/2).attr("y",z/2)}),G>0){let b=L+H.length*(z+4),V=`+${G} more`,v=dt.append("g"),_=v.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",z/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(V),Y=V.length*7,w=_.node();if(w&&typeof w.getBBox==="function"){let X=w.getBBox();if(X.width>0)Y=X.width}let x=Y+ft*2,k=g.cx-x/2;v.attr("transform",`translate(${k}, ${b})`),v.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",z).attr("rx",4).attr("ry",4).attr("fill",E[d]).attr("fill-opacity",0.6),_.attr("x",x/2).attr("y",z/2)}}if(nt.length>0){let d=B.select("defs").empty()?B.append("defs"):B.select("defs"),s=`cynefin-arrow-${n}`;d.append("marker").attr("id",s).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let g=S.append("g").attr("class","cynefin-arrows");nt.forEach((u)=>{let H=K[u.from],G=K[u.to];if(!H||!G)return;if(u.from===u.to){i.warn(`Cynefin renderer: skipping self-loop on domain "${u.from}"`);return}let{cx:L,cy:b}=H,{cx:V,cy:v}=G,_=(L+V)/2,Y=(b+v)/2,w=V-L,x=v-b,k=Math.sqrt(w*w+x*x),X=k*0.15,ot=-x/k,Tt=w/k,mt=_+ot*X,pt=Y+Tt*X;if(g.append("path").attr("class","cynefinArrowLine").attr("d",`M${L},${b} Q${mt},${pt} ${V},${v}`).attr("fill","none").attr("marker-end",`url(#${s})`),u.label)g.append("text").attr("class","cynefinArrowLabel").attr("x",mt).attr("y",pt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(u.label)})}if(j)S.append("text").attr("class","cynefinTitle").attr("x",c/2).attr("y",-C/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(j)},"draw"),Ft={draw:Rt},Vt=t(()=>{let e=Qe(),n=A();return Z(e,n.themeVariables).cynefin},"getCynefinTheme"),_t=t(()=>{let e=Vt();return`
2
- .cynefinDomain {
3
- stroke: none;
4
- }
5
- .cynefinDomainLabel {
6
- font-size: ${e.domainFontSize}px;
7
- font-weight: bold;
8
- fill: ${e.labelColor};
9
- }
10
- .cynefinSubtitle {
11
- font-size: ${e.itemFontSize-1}px;
12
- fill: ${e.textColor};
13
- font-style: italic;
14
- }
15
- .cynefinItem {
16
- fill-opacity: 0.95;
17
- stroke: ${e.boundaryColor};
18
- stroke-width: 1;
19
- }
20
- .cynefinItemText {
21
- font-size: ${e.itemFontSize}px;
22
- fill: ${e.textColor};
23
- }
24
- .cynefinItemOverflow {
25
- fill-opacity: 0.6;
26
- stroke: ${e.boundaryColor};
27
- stroke-width: 1;
28
- stroke-dasharray: 3 2;
29
- }
30
- .cynefinBoundary {
31
- stroke: ${e.boundaryColor};
32
- stroke-width: ${e.boundaryWidth};
33
- stroke-dasharray: 6 3;
34
- }
35
- .cynefinCliff {
36
- stroke: ${e.cliffColor};
37
- stroke-width: ${e.cliffWidth};
38
- }
39
- .cynefinConfusion {
40
- stroke: ${e.boundaryColor};
41
- stroke-width: 1.5;
42
- stroke-dasharray: 4 2;
43
- }
44
- .cynefinArrowLine {
45
- stroke: ${e.arrowColor};
46
- stroke-width: ${e.arrowWidth};
47
- fill: none;
48
- }
49
- .cynefinArrowHead {
50
- fill: ${e.arrowColor};
51
- stroke: none;
52
- }
53
- .cynefinArrowLabel {
54
- font-size: ${e.itemFontSize-1}px;
55
- fill: ${e.textColor};
56
- }
57
- .cynefinTitle {
58
- font-size: ${e.domainFontSize+2}px;
59
- font-weight: bold;
60
- fill: ${e.labelColor};
61
- }
62
- `},"styles"),Et=_t,Ut={parser:Pt,db:at,renderer:Ft,styles:Et};export{Ut as diagram};
Binary file
Binary file
@@ -1,2 +0,0 @@
1
- import{l}from"./chunk-6f1q0tjv.js";var c=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Qi=l("circle-check",c);
2
- export{Qi};
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{a,e,n,b,l,en,Q,Ut}from"./chunk-6f1q0tjv.js";var h=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],s=l("check-check",h);var g={once:{label:"已允许本次控制电脑",tone:"text-success",icon:Q},session:{label:"本会话始终允许控制",tone:"text-success",icon:s},deny:{label:"已拒绝控制电脑",tone:"text-danger",icon:en},cancelled:{label:"控制电脑授权已取消",tone:"text-faint",icon:Ut}};function w(p){let{style:r,cn:i,Collapsible:c,CollapsibleTrigger:m,CollapsibleContent:u,Chevron:d}=b(),[f,C]=a(!1),t=p.payload;if(!t||typeof t.id!=="string"||t.state==="pending")return null;let o=g[t.state],x=o.icon;return n(c,{open:f,onOpenChange:C,className:"w-full text-xs text-ink/90 animate-fade",children:[n(m,{className:r("chat.timelineRow","cursor-pointer select-none"),children:[e("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e(x,{className:i("size-3.5",o.tone)})}),e("span",{className:"shrink-0",children:o.label}),n("span",{className:"min-w-0 flex-1 truncate font-mono text-xs opacity-80",title:t.app,children:[t.action," ",t.app,t.requester&&` · 子代理「${t.requester.title}」`]}),e(d,{className:"size-3.5 shrink-0 text-faint opacity-0 transition-opacity group-hover/collapsible:opacity-100 group-data-[state=open]/collapsible:opacity-100"})]}),e(u,{children:e("pre",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px] font-mono text-xs break-all whitespace-pre-wrap text-dim",children:t.detail})})]})}export{w as ApprovalCard};
Binary file
Binary file
@@ -1,2 +0,0 @@
1
- import{nt,v,s,ee,w,o,a,Bc,Fc,Cr,Rt,zc,lc,Bt,Gn,le,it,va,pi,Hc,Uc,m,e,n,pe,U,u,l,Jt,dr,Yn,fr,zt,Ar,Tr,Nn,an,st,ht,$e,_a,Xn,wa,ka,gt,be,Ht,ge,Oe,ut,vt,Ut,Kn,Ca,xe,ce,je,on,ve,Re,bn,Te,Aa,Zr,us,k,ds,p,qe,_,G,te,At,oe,yt,rt,Ee,Le,Se,Ve,ue,z,Pt,Jr,mc,qt,Ge,sn,ke,vr,We,ea,yi,bt,Ta,Xi,ne,Y,gs,Ye,Ki,vs,ys,ta,bs,bi,xi,tn,Ea,_s,ws,Xc,_i,Kc,ks,na,Zi}from"./chunk-6f1q0tjv.js";var Yt=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Qe=l("bell",Yt);var Xt=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Xe=l("chevron-left",Xt);var Zt=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Ze=l("cloud",Zt);var en=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],et=l("hard-drive",en);var nn=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Pe=l("network",nn);var rn=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Me=l("save",rn);var ln=[{value:"system",label:"跟随系统",icon:e(Xn,{})},{value:"light",label:"浅色",icon:e(Ca,{})},{value:"dark",label:"深色",icon:e(wa,{})}];function tt(){let t=k(),i=ds(),r=Uc();return n(ne,{title:"外观",description:"仅保存在当前浏览器本地",children:[e(Y,{title:"主题模式",description:"切换浅色、深色或跟随系统外观",children:e(Ea,{value:t.preference,onChange:Zr,options:ln})}),e(Y,{title:"主题风格",description:"选择宿主默认或由已启用插件提供的视觉主题",children:e(tn,{value:t.themeID,onValueChange:us,groups:[{options:i.map((d)=>({value:d.id,label:d.label,description:d.description}))}],className:"w-48"})}),r.canInstall&&e(Y,{title:"桌面应用",description:"将 Basalt 安装为独立窗口应用,可从桌面或任务栏直接启动",children:n(_,{size:"sm",onClick:()=>r.install().catch((d)=>z(d,"安装应用失败")),children:[e(Nn,{className:"size-3.5"}),"安装应用"]})})]})}function at(){let t=le(va),[i,r]=a(pi),[d,y]=a(!1),M=o(!1);s(()=>{M.current=!0;let h=()=>r(pi());return window.addEventListener("focus",h),document.addEventListener("visibilitychange",h),()=>{M.current=!1,window.removeEventListener("focus",h),document.removeEventListener("visibilitychange",h)}},[]);let B=async(h)=>{y(!0);try{let g=await Hc(h);if(M.current)r(g)}catch(g){if(M.current)z(g,"无法更新系统通知")}finally{if(M.current)y(!1)}};return e(ne,{title:"系统通知",description:"页面保持打开时生效;开关仅保存在当前浏览器",children:e(Y,{title:"完成与错误提醒",description:i==="unsupported"?"当前浏览器或访问方式不支持系统通知,请使用支持通知的浏览器,并通过 HTTPS 或 localhost 访问":i==="denied"?"浏览器已阻止通知,请在网站设置中允许通知,回到此页后再开启":t&&i==="granted"?"模型工作完成或运行出错时发送;点击通知可回到对应会话":"开启后在模型工作完成或运行出错时发送;首次开启需要浏览器授权",children:e(Ye,{label:"模型工作完成或出错时发送系统通知",checked:t&&i==="granted",disabled:d||i==="unsupported",onCheckedChange:(h)=>void B(h)})})})}function ot(t){let i=le(t.conn.state),r=Zi[i.status];return e(ne,{title:"已保存的服务器连接",description:"保存在当前浏览器中的服务器地址与设备凭证",action:n(_,{size:"sm",onClick:t.onAddServer,children:[e(be,{className:"size-3.5"}),"添加服务器"]}),children:t.servers.map((d)=>{let y=d.id===t.server.id;return e(Y,{title:n("span",{className:"flex items-center gap-2",children:[e("span",{className:"truncate",children:Gn(d)}),y&&n("span",{className:"inline-flex items-center gap-1.5 font-normal text-xs text-dim",children:[e("span",{className:u("size-1.5 rounded-full",r.dot)}),r.label]})]}),description:e("span",{className:"font-mono",children:d.url}),children:y?n(_,{size:"sm",variant:"danger-ghost",onClick:t.onRemoveServer,children:[e(xe,{className:"size-3.5"}),"移除"]}):e(_,{size:"sm",onClick:()=>t.onServer(d.id),children:"切换"})},d.id)})})}function lt(){return n(m,{children:[n(ne,{title:"全局",description:"当前浏览器前端快捷键",children:[e(Y,{title:"搜索与命令面板",description:"快速跳转会话、项目或执行常用操作",children:e(qe,{children:"mod+k"})}),e(Y,{title:"收起 / 展开侧栏",description:"在完整侧栏与窄图标栏之间切换",children:e(qe,{children:"alt+1"})}),e(Y,{title:"新建聊天",description:"立即回到新会话输入页",children:e(qe,{children:"mod+shift+o"})})]}),n(ne,{title:"对话输入",children:[e(Y,{title:"发送消息",children:e(qe,{children:"Enter"})}),e(Y,{title:"换行",children:e(qe,{children:"Shift+Enter"})})]})]})}var dt=["B","KB","MB","GB","TB"];function K(t){let i=t,r=0;while(i>=1024&&r<dt.length-1)i/=1024,r++;let d=r===0?0:i>=100?0:i>=10?1:2;return`${i.toFixed(d)} ${dt[r]}`}function ct({conn:t,server:i}){k();let r=i?.id??t.server.id,d=le(on(r)),[y,M]=a(!1),[B,I]=a();s(()=>{let g=new AbortController;return t.request("/api/search/settings",{signal:g.signal}).then((c)=>{if(!g.signal.aborted)on(r).set(c.status)}).catch(()=>{if(!g.signal.aborted)I("无法读取历史搜索设置,请重新打开设置重试")}),()=>g.abort()},[t,r]);async function h(){if(y)return;M(!0),I(void 0);try{let g=await t.request("/api/search/rebuild",{method:"POST"});on(r).set(g)}catch(g){I(g instanceof Error?g.message:"无法重建历史搜索索引,请重试")}finally{M(!1)}}return n(ne,{title:"历史搜索",children:[e(Y,{title:"搜索索引",description:n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-0.5",children:[e(_i,{status:d,showEnable:!1,className:"py-0 shrink-0"}),d&&n("span",{children:["体积 ",K(d.bytes)," / 预算 ",K(d.budget)]})]}),children:e(_,{disabled:y||!d||d.state==="rebuilding",loading:y,onClick:()=>{h().catch(()=>{return})},children:"重建索引"})}),d?.state==="rebuilding"&&e("div",{className:p("surface.subtle","space-y-3 border-line bg-raised/30 p-3.5"),children:n("div",{className:"flex items-center justify-between text-xs text-dim",children:[e("span",{children:"正在重建索引…"}),e("code",{className:p("markdown.inlineCode"),children:d.total>0?`${Math.round(d.indexed/d.total*100)}%`:"0%"})]})}),B&&e("p",{role:"alert",className:"p-4 text-sm text-danger",children:B})]})}var Ae=new WeakMap,dn={assistant:"bg-accent",tool:"bg-warning",user:"bg-success",run:"bg-ink/50",compaction:"bg-danger",notice:"bg-dim",notice_pending:"bg-faint"};function de(t){return e("span",{className:u("font-mono text-xs tabular-nums text-dim",t.className),children:t.children})}function mt(t){return e(Y,{title:n("span",{className:"flex items-center gap-2",children:[e("span",{children:t.title}),t.subtitle&&e("span",{className:"font-mono text-2xs font-normal text-faint",children:t.subtitle})]}),description:e("span",{className:"font-mono break-all text-dim",children:t.path}),children:e(Pt,{text:t.path,label:"复制路径",size:"icon-sm"})})}function Ue(t){return e("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:e("div",{className:u("h-full rounded-full transition-all duration-300",t.colorClass??"bg-accent"),style:{width:`${Math.max(t.percent>0?1:0,t.percent)}%`}})})}function _e(t,i){if(i<=0||t<=0)return"0%";let r=t/i*100;if(r<0.1)return"<0.1%";let d=r>=10?1:2;return`${r.toFixed(d)}%`}function ft(t){if(!t)return"—";return new Date(t).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function pt(t){return t.database.size+t.database.walSize+t.database.shmSize}function cn(t){let{table:i,totalDbBytes:r}=t,d=i.bytes??0,y=r>0?Math.min(100,d/r*100):0;return n("div",{className:"space-y-1",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:[e("code",{className:p("markdown.inlineCode"),children:i.name}),i.withoutRowid&&e("span",{className:p("control.badge","border border-line bg-raised/40 px-2 py-0.5 text-xs"),children:"WITHOUT ROWID"}),i.indexes!==void 0&&i.indexes>0&&n("span",{className:"rounded-md bg-raised/50 px-1.5 py-0.5 font-mono text-2xs text-faint",children:[i.indexes," 索引"]}),i.pages!==void 0&&n("span",{className:"font-mono text-2xs text-faint tabular-nums",children:[i.pages.toLocaleString()," 页"]})]}),n("div",{className:"flex shrink-0 items-center gap-3 font-mono tabular-nums",children:[n("span",{className:"text-ink",children:[i.rows.toLocaleString()," 行"]}),i.bytes!==void 0&&n("span",{className:"text-dim",children:[K(d)," ",n("span",{className:"text-2xs text-faint",children:["(",_e(d,r),")"]})]})]})]}),i.bytes!==void 0&&r>0&&e(Ue,{percent:y})]})}function xt(t){k();let[i,r]=a(()=>Ae.get(t.conn)),[d,y]=a(),[M,B]=a(!1),[I,h]=a(!0),[g,c]=a(!0),[D,C]=a(!1),E=v(async(F=!1)=>{B(!0);try{let j=await t.conn.storage(F);if(Ae.set(t.conn,j),r(j),j.search)on(t.server?.id??t.conn.server.id).set(j.search);y(void 0)}catch(j){y(je(j))}finally{B(!1)}},[t.conn,t.server?.id]);s(()=>{E()},[E]);async function O(){if(!i)return;let F=g?i.database.reclaimableBytes:0,j=I||g?i.database.walSize:0,X=F+j,Q=[];if(g)Q.push("VACUUM 数据库");if(I)Q.push("截断 WAL");if(!await Ge({title:"确认清理数据库?",description:`将${Q.join("并")},预计回收 ${K(X)}。不会删除会话、消息或设备。大库上 VACUUM 可能要几秒,期间写入会等待。`,action:"开始清理"}))return;C(!0);try{let ae=await t.conn.compactStorage({checkpoint:I,vacuum:g}),me=pt(ae.before),fe=pt(ae.after),he=Math.max(0,me-fe);Ae.set(t.conn,ae.after),r(ae.after);let Ce=he>0?"清理完成":"清理完成,没有可回收的空间";ue.success(Ce,{description:`数据库 ${K(me)} → ${K(fe)}`})}catch(ae){z(ae,"清理失败")}finally{C(!1)}}let L=n(_,{size:"sm",variant:"ghost",onClick:()=>void E(),loading:M,children:[e(ge,{className:"size-3.5"}),"刷新"]});if(!i)return e(ne,{title:"数据库",action:L,children:e(Y,{title:d?"无法读取数据库信息":"正在读取数据库信息…",description:d})});let{database:x,analytics:f}=i,W=x.size+x.walSize+x.shmSize,N=Math.max(0,x.size-x.reclaimableBytes),T=x.reclaimableBytes+x.walSize,A=x.pageCount>0?(x.pageCount-x.freelistCount)/x.pageCount*100:100,S=x.integrity?.toLowerCase()==="ok",P="neutral",H="未检查";if(x.integrity)P=S?"success":"danger",H=S?"正常 (OK)":"异常";let b=!I&&!g,V=[...i.tables].sort((F,j)=>(j.bytes??0)-(F.bytes??0)||j.rows-F.rows),R=(f?.totalBodyBytes??0)+(f?.totalRawBytes??0),J=(f?.mainSessionCount??0)+(f?.subSessionCount??0);return n(m,{children:[n(ne,{title:"存储总览",action:L,unboxed:!0,children:[n("div",{className:"auto-grid gap-3",children:[n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"数据库占用"}),e(Tr,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tabular-nums text-ink",children:K(W)}),n("div",{className:"mt-1 font-mono text-2xs text-dim",children:["主库 ",K(x.size)," · WAL ",K(x.walSize)]})]}),n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"数据目录"}),e(et,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tabular-nums text-ink",children:K(i.dataBytes)}),n("div",{className:"mt-1 text-2xs text-dim",children:["共 ",i.entries.length," 项"]})]}),n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"可回收空间"}),e(Yn,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tabular-nums text-ink",children:K(T)}),n("div",{className:"mt-1 font-mono text-2xs text-dim",children:["利用率 ",A.toFixed(1),"% · ",x.freelistCount," 空页"]})]}),n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"完整性"}),e(Kn,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 flex items-center gap-2",children:e(rt,{tone:P,children:H})}),n("div",{className:"mt-1.5 font-mono text-2xs text-dim",children:["SQLite ",x.sqliteVersion??"3.x"," · v",x.schemaVersion]})]})]}),W>0&&n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"mb-2 flex flex-wrap items-center justify-between gap-2 text-xs",children:[e("span",{className:"font-medium text-ink",children:"物理构成"}),n("span",{className:"font-mono text-faint tabular-nums",children:[x.pageCount.toLocaleString()," 页 × ",K(x.pageSize)]})]}),n("div",{className:"flex h-2.5 w-full overflow-hidden rounded-full bg-raised gap-0.5",children:[N>0&&e("div",{className:"h-full bg-accent transition-all duration-300",style:{width:`${N/W*100}%`},title:`数据页: ${K(N)}`}),x.reclaimableBytes>0&&e("div",{className:"h-full bg-warning transition-all duration-300",style:{width:`${x.reclaimableBytes/W*100}%`},title:`空闲页: ${K(x.reclaimableBytes)}`}),x.walSize>0&&e("div",{className:"h-full bg-ink/40 transition-all duration-300",style:{width:`${x.walSize/W*100}%`},title:`WAL: ${K(x.walSize)}`}),x.shmSize>0&&e("div",{className:"h-full bg-faint transition-all duration-300",style:{width:`${x.shmSize/W*100}%`},title:`SHM: ${K(x.shmSize)}`})]}),n("div",{className:"mt-2.5 flex flex-wrap items-center gap-x-5 gap-y-1.5 text-xs text-dim",children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"数据页 ",e(de,{children:K(N)})]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-warning"}),"空闲页 ",e(de,{children:K(x.reclaimableBytes)})]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-ink/40"}),"WAL ",e(de,{children:K(x.walSize)})]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-faint"}),"SHM ",e(de,{children:K(x.shmSize)})]})]})]})]}),e(ne,{title:"深度分析",children:e(Y,{title:"完整性检查与空间分布",description:d??"按需扫描数据库,获取表物理占用和日志类型分布;大库可能耗时数秒,期间其他请求可能等待。",children:e(_,{size:"sm",onClick:()=>void E(!0),loading:M,disabled:D,children:f?"重新分析":"开始分析"})})}),n(ne,{title:"存储路径",children:[e(mt,{title:"主数据库",subtitle:x.lastModified?bt(x.lastModified):void 0,path:i.databasePath}),e(mt,{title:"数据目录",path:i.dataDir})]}),e(ct,{conn:t.conn,server:t.server}),f&&n(ne,{title:"会话与日志",children:[e(Y,{title:"会话统计",description:`${f.projectCount} 个项目 · ${J.toLocaleString()} 个会话`,children:n("div",{className:"flex flex-wrap items-center gap-1.5 font-mono text-xs",children:[n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-ink",children:["主会话 ",f.mainSessionCount.toLocaleString()]}),n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-dim",children:["子代理 ",f.subSessionCount.toLocaleString()]}),f.forkedSessionCount>0&&n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-dim",children:["分叉 ",f.forkedSessionCount.toLocaleString()]}),f.automationSessionCount>0&&n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-dim",children:["自动化 ",f.automationSessionCount.toLocaleString()]})]})}),e(Y,{title:"日志载荷",children:e(de,{children:`body ${K(f.totalBodyBytes)} · raw ${K(f.totalRawBytes)}`})}),e(Y,{title:"日志记录",description:f.oldestEntryTime?`${ft(f.oldestEntryTime)} — ${ft(f.newestEntryTime)}`:void 0,children:e(de,{children:`${f.totalEntries.toLocaleString()} 条${f.compactionCount>0?` · ${f.compactionCount} 次压缩`:""}`})}),f.entryTypes.length>0&&n("div",{className:"p-4",children:[n("div",{className:"mb-3 flex items-center justify-between text-xs",children:[e("span",{className:"font-medium text-ink",children:"日志类型分布"}),e("span",{className:"font-mono text-faint",children:K(R)})]}),e("div",{className:"space-y-2.5",children:f.entryTypes.map((F)=>{let j=F.bodyBytes+F.rawBytes,X=dn[F.type]??"bg-dim",Q=R>0?Math.min(100,j/R*100):0,Z=F.count>0?Math.round(j/F.count):0;return n("div",{className:"space-y-1",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex items-center gap-2",children:[e("span",{className:u("size-2 rounded-full",X)}),e("span",{className:"font-mono font-medium text-ink",children:F.type}),n("span",{className:"font-mono text-2xs text-faint",children:[K(Z),"/条"]})]}),n("div",{className:"flex items-center gap-3 font-mono tabular-nums",children:[n("span",{className:"text-ink",children:[F.count.toLocaleString()," 条"]}),n("span",{className:"text-dim",children:[K(j)," ",n("span",{className:"text-2xs text-faint",children:["(",_e(j,R),")"]})]})]})]}),e(Ue,{percent:Q,colorClass:X})]},F.type)})})]})]}),e(ne,{title:"数据表",children:e("div",{className:"p-4 space-y-2.5",children:V.map((F)=>e(cn,{table:F,totalDbBytes:x.size},F.name))})}),f&&f.pluginNamespaces.length>0&&e(ne,{title:"插件存储",children:e("div",{className:"grid grid-cols-1 gap-x-10 gap-y-2.5 p-4 md:grid-cols-2",children:f.pluginNamespaces.map((F)=>n("div",{className:"flex items-center justify-between gap-3 text-xs",children:[n("span",{className:"flex min-w-0 items-center gap-2",children:[e(dr,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"truncate font-mono font-medium text-ink",children:F.namespace}),F.migrationVersion!==void 0&&n("span",{className:"rounded bg-raised px-1.5 py-0.5 font-mono text-2xs font-normal text-faint",children:["v",F.migrationVersion]})]}),n("div",{className:"flex shrink-0 items-center gap-3 font-mono tabular-nums text-xs",children:[n("span",{className:F.keys>0?"text-dim":"text-faint/50",children:[F.keys," 键"]}),e("span",{className:F.bytes>0?"font-medium text-ink":"text-faint/50",children:K(F.bytes)})]})]},F.namespace))})}),e(ne,{title:"引擎参数 (PRAGMA)",children:e("div",{className:"grid grid-cols-1 gap-x-10 gap-y-2.5 p-4 text-xs md:grid-cols-2",children:[{label:"内核版本",value:`SQLite ${x.sqliteVersion??"3.x"}`},{label:"忙锁超时",value:`${x.busyTimeout??5000}ms`},{label:"字符编码",value:x.encoding??"UTF-8"},{label:"单页大小",value:K(x.pageSize)},{label:"Schema 版本",value:`v${x.schemaVersion}`},{label:"总页数",value:`${x.pageCount.toLocaleString()} 页`},{label:"日志模式",value:x.journalMode.toUpperCase()},{label:"页缓存",value:x.cacheSizeBytes?K(x.cacheSizeBytes):"默认"},{label:"同步级别",value:x.synchronous??"FULL"},{label:"空闲页",value:`${x.freelistCount.toLocaleString()} 页 (${K(x.reclaimableBytes)})`},{label:"外键约束",value:x.foreignKeys!==!1?"ON":"OFF"},{label:"自动清理",value:x.autoVacuum??"NONE"}].map((F)=>n("div",{className:"flex items-center justify-between gap-3",children:[e("span",{className:"text-dim",children:F.label}),e(de,{className:"text-ink",children:F.value})]},F.label))})}),e(ne,{title:"数据目录明细",children:n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"mb-3 flex items-center justify-between text-xs",children:[e("span",{className:"font-mono text-dim break-all",children:i.dataDir}),n("div",{className:"flex shrink-0 items-center gap-3 font-mono text-xs",children:[n("span",{className:"text-dim",children:["共 ",i.entries.length," 项"]}),e("span",{className:"font-medium text-ink",children:K(i.dataBytes)})]})]}),i.entries.map((F)=>{let j=i.dataBytes>0?F.bytes/i.dataBytes*100:0;return n("div",{className:"space-y-1",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:[F.kind==="directory"?e(ht,{className:"size-3.5 shrink-0 text-accent"}):e(st,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"font-mono font-medium text-ink",children:F.name}),n("span",{className:"font-mono text-2xs text-faint",children:[F.kind==="directory"?`目录${F.files!==void 0?` · ${F.files.toLocaleString()} 个文件`:""}`:"文件",F.modified?` · ${bt(F.modified)}`:""]})]}),e("div",{className:"flex shrink-0 items-center gap-3 font-mono tabular-nums text-xs",children:n("span",{className:"text-dim",children:[K(F.bytes)," ",n("span",{className:"text-2xs text-faint",children:["(",_e(F.bytes,i.dataBytes),")"]})]})})]}),i.dataBytes>0&&e(Ue,{percent:j})]},F.name)})]})}),n(ne,{title:"空间维护",children:[e(Y,{title:"VACUUM 整理",description:`可回收 ${K(x.reclaimableBytes)}`,children:e(Ye,{checked:g,onCheckedChange:c,label:"VACUUM 数据库",disabled:D})}),e(Y,{title:"截断 WAL",description:`当前 ${K(x.walSize)}`,children:e(Ye,{checked:I,onCheckedChange:h,label:"截断 WAL",disabled:D})}),e(Y,{title:"执行清理",description:b?"请至少开启一项":`预计释放 ${K((g?x.reclaimableBytes:0)+(I||g?x.walSize:0))}`,children:e(_,{variant:"primary",size:"sm",onClick:()=>void O(),loading:D,disabled:b,children:"清理…"})})]})]})}var un=2000;function St(t){let i=le(t.state),[r,d]=a(void 0),[y,M]=a(!1),[B,I]=a("idle"),[h,g]=a(void 0),[c,D]=a(""),C=o(!1),E=o(void 0),O=o(void 0),L=o(0),x=o(!1),f=v((S)=>{let P=C.current&&!S.pending;if(!C.current&&S.pending)D("");if(C.current=S.pending,d(S),S.error)g(S.error),I("error");else if(S.pending)I(S.awaitingInput?"awaiting_input":"authorizing");else if(P&&S.connected)I("success");else if(!S.connected)I("idle")},[]);s(()=>{if(i.status!=="open")return;let S=new AbortController,P=!1;return t.providerAuthStatus(S.signal).then((H)=>{if(!P)f(H)},()=>{}),()=>{P=!0,S.abort()}},[t,i.status,f]);let W=v(async()=>{M(!0),g(void 0),I("authorizing"),x.current=!1;try{let S=await t.startProviderAuth();if(f(S),S.authorizeURL)window.open(S.authorizeURL,"_blank","noopener,noreferrer")}catch(S){g(S instanceof Error?S.message:String(S)),I("error")}finally{M(!1)}},[t,f]);s(()=>{if(!r?.pending)return;let S=!1,P=()=>{if(x.current)return;E.current?.abort();let H=new AbortController;E.current=H,t.providerAuthStatus(H.signal).then((b)=>{if(S||H.signal.aborted)return;let V=C.current&&!b.pending;if(f(b),V&&b.connected)Jr(t).catch((R)=>z(R,"刷新模型列表失败"))},()=>{})};return O.current=setInterval(P,un),()=>{if(S=!0,O.current)clearInterval(O.current);E.current?.abort()}},[t,r?.pending,f]);let N=v(async()=>{if(!c.trim())return;M(!0),g(void 0),x.current=!0;let S=++L.current;E.current?.abort();try{let P=await t.completeProviderAuth({url:c.trim()});if(S!==L.current)return;f(P),D("")}catch(P){if(S!==L.current)return;g(P instanceof Error?P.message:String(P)),I("error")}finally{if(x.current=!1,S===L.current)M(!1)}},[t,c,f]),T=v(async()=>{M(!0),g(void 0);try{await t.logoutProvider(),f({providerID:"openai",connected:!1,pending:!1}),I("idle"),await Jr(t)}catch(S){g(S instanceof Error?S.message:String(S)),I("error")}finally{M(!1)}},[t,f]),A=v(()=>{I("idle"),g(void 0),D("")},[]);return{status:r,busy:y,phase:B,error:h,manualURL:c,setManualURL:D,start:W,submitManual:N,logout:T,reset:A}}function wt(t){let{phase:i,busy:r}=t;if(t.connected)return n("div",{className:"flex items-center justify-between gap-3",children:[n("span",{className:"inline-flex items-center gap-1.5 text-xs text-success",children:[e("span",{className:"size-1.5 rounded-full bg-success"}),"已连接"]}),e(_,{variant:"ghost",className:"text-faint hover:text-danger",disabled:r,onClick:t.onLogout,children:r?"正在断开…":"断开连接"})]});return n(U.div,{layout:!0,className:"flex flex-col gap-3",children:[(i==="idle"||i==="success"||i==="error")&&n("div",{className:"flex flex-wrap items-center gap-2",children:[e(_,{disabled:r,onClick:t.onStart,children:r?"正在启动…":"登录 ChatGPT"}),i==="error"&&e(_,{variant:"ghost",className:"text-faint",onClick:t.onRetry,children:"重试"})]}),i==="authorizing"&&n("p",{className:"text-xs text-faint",children:["请在浏览器中完成授权。",t.authorizeURL&&n(m,{children:["未自动打开?",e("a",{href:t.authorizeURL,target:"_blank",rel:"noopener noreferrer",className:"ml-1 text-accent hover:underline",children:"手动打开"})]})]}),i==="awaiting_input"&&n("form",{className:"flex flex-col gap-2",onSubmit:(d)=>{d.preventDefault(),t.onSubmitManual()},children:[e("label",{htmlFor:"provider-auth-callback",className:"text-xs text-faint",children:t.instructions??"粘贴浏览器完成授权后跳转的完整 URL"}),e("input",{id:"provider-auth-callback",type:"url",className:"h-9 rounded-lg border border-line bg-raised px-3 text-xs text-ink outline-none placeholder:text-faint focus:border-accent",placeholder:"http://localhost:1455/auth/callback?code=…",value:t.manualURL,onChange:(d)=>t.onManualURLChange(d.target.value)}),e(_,{type:"submit",disabled:r||!t.manualURL.trim(),children:r?"正在提交…":"完成登录"})]}),i==="error"&&t.error&&e(yt,{children:t.error})]})}function Nt(t){let i=St(t.conn),r=i.status?.connected??!1;return e(ne,{title:"ChatGPT 订阅",description:"使用 ChatGPT 账号登录,访问你的订阅所包含的模型。登录由服务端完成,凭据不会离开服务器。",children:e(U.div,{layout:!0,className:"flex flex-col gap-3",children:e(Y,{title:r?"ChatGPT 账号":"连接 ChatGPT",description:r?`你好,${i.status?.displayName??"ChatGPT 用户"}`:"支持 ChatGPT Plus / Pro 订阅账号",children:e(wt,{connected:r,phase:i.phase,busy:i.busy,error:i.error,authorizeURL:i.status?.authorizeURL,instructions:i.status?.instructions,manualURL:i.manualURL,onManualURLChange:i.setManualURL,onStart:()=>void i.start(),onSubmitManual:()=>void i.submitManual(),onLogout:()=>void i.logout(),onRetry:i.reset})})})})}var He="off";function kt({conn:t}){let[i,r]=a(),[d,y]=a({models:[]});s(()=>{let h=new AbortController;return Promise.all([t.request("/api/folding/settings",{signal:h.signal}),t.models()]).then(([g,c])=>{if(h.signal.aborted)return;r(g),y(c)}).catch((g)=>{if(!h.signal.aborted)z(g,"读取折叠设置失败")}),()=>h.abort()},[t]);async function M(h){let g=i;r({digestModel:h});try{r(await t.request("/api/folding/settings",{method:"PUT",body:JSON.stringify({digestModel:h})}))}catch(c){r(g),z(c,"保存折叠设置失败")}}let B=i?.digestModel??null,I={models:[{id:He,name:"不使用"},...d.models.filter((h)=>h.available===!0||h.id===B)]};return e(ne,{title:"上下文折叠",children:e(Y,{title:"折叠摘要模型",description:"每轮结束后提炼关键事实,折叠后保留。建议选快速模型。",children:e("div",{className:"w-56",children:e(ea,{variant:"field",trustedOnly:!0,models:I,value:B??He,onChange:(h)=>{if(i)M(h===He?null:h).catch(()=>{return})}})})})})}function Ct(t){k();let i=ee(),[r,d]=a(""),[y,M]=a(0),[B,I]=a(null),[h,g]=a({name:"",contextWindow:"",maxTokens:""}),[c,D]=a(!1),[C,E]=a(),O=(S)=>{I(S),g({name:S.name,contextWindow:S.contextWindow?Rt(S.contextWindow):"",maxTokens:S.maxTokens?Rt(S.maxTokens):""}),E(void 0)},L=async(S)=>{if(S?.preventDefault(),!B||c)return;E(void 0);let P=h.contextWindow.trim(),H=P?Cr(P):void 0;if(P&&H===void 0){E("上下文窗口格式无效(支持 128k、200k、1m 或正整数)");return}let b=h.maxTokens.trim(),V=b?Cr(b):void 0;if(b&&V===void 0){E("最大输出格式无效(支持 8k、16k、8192 或正整数)");return}D(!0);try{let R={...B,name:h.name.trim()||B.id,contextWindow:H,maxTokens:V};await t.onUpdateModel?.(B.id,R),I(null)}catch(R){E(R instanceof Error?R.message:String(R))}finally{D(!1)}},x=r.trim().toLowerCase(),f=mc(t.provider.models).filter((S)=>`${S.id} ${S.name}`.toLowerCase().includes(x)),W=6,N=Math.max(1,Math.ceil(f.length/W)),T=Math.min(y,N-1),A=f.slice(T*W,(T+1)*W);return n(Ee,{children:[n("div",{className:p("surface.card","flex min-w-0 items-center gap-1 pr-2 transition-colors hover:bg-raised/60"),children:[n(Le,{className:"group/collapsible flex min-h-14 min-w-0 flex-1 items-center gap-3 py-2.5 pl-4 text-left focus-visible:-outline-offset-2",children:[e(Ve,{className:"shrink-0 text-faint"}),n("span",{className:"min-w-0 flex-1",children:[n("span",{className:"flex items-center gap-2",children:[e("span",{className:"truncate text-sm font-medium text-ink",title:t.provider.name,children:t.provider.name}),t.provider.untrusted&&n("span",{className:"inline-flex shrink-0 items-center gap-1.5 text-xs text-warning",title:"只能对话或委派给受信模型:不加载工具、技能与 MCP,不注入运行环境",children:[e(Ut,{"aria-hidden":!0,className:"size-3.5"}),"不受信"]}),!t.provider.apiKeyConfigured&&n("span",{className:"inline-flex shrink-0 items-center gap-1.5 text-xs text-warning",children:[e("span",{"aria-hidden":!0,className:"size-1.5 rounded-full bg-warning"}),"未设置 Key"]})]}),n("span",{className:"mt-0.5 block truncate text-xs text-dim",children:[t.provider.id!==t.provider.name&&n(m,{children:[t.provider.id," · "]}),t.provider.protocol," · ",t.provider.models.length," 个模型",t.provider.defaultContextWindow?` · 默认 ${Rt(t.provider.defaultContextWindow)}`:""]})]})]}),e("div",{className:"@md/panel:hidden",children:n(sn,{className:"min-w-44 [&_[role=menuitem]]:min-h-11",trigger:e(_,{size:"icon",variant:"ghost",className:"size-11","aria-label":`${t.provider.name} 提供方操作`,children:e(Jt,{className:"size-5"})}),children:[e(ke,{icon:e(gt,{}),onSelect:t.onEdit,children:"编辑配置"}),e(ke,{icon:e(ge,{className:t.refreshing?"animate-spin":void 0}),disabled:t.refreshing,onSelect:t.onDiscover,children:t.refreshing?"正在刷新模型":"刷新模型"}),e(vr,{}),e(ke,{icon:e(xe,{}),danger:!0,onSelect:t.onRemove,children:"移除提供方"})]})}),n("div",{className:"hidden shrink-0 items-center @md/panel:flex",children:[e(G,{label:"编辑",className:"size-10",onClick:t.onEdit,children:e(gt,{className:"size-4"})}),e(G,{label:"刷新模型",className:"size-10",disabled:t.refreshing,onClick:t.onDiscover,children:e(ge,{className:u("size-4",t.refreshing&&"animate-spin")})}),e(G,{label:"移除",className:"size-10 text-danger",onClick:t.onRemove,children:e(xe,{className:"size-4"})})]})]}),e("div",{children:e(Se,{children:n("div",{children:[n("div",{className:"relative my-3 min-w-0",children:[e(Oe,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),e(te,{type:"search","aria-label":`搜索 ${t.provider.name} 的模型`,placeholder:"搜索模型",value:r,onChange:(S)=>{d(S.target.value),M(0)},className:"h-10 min-w-0 pl-9"})]}),n("div",{className:"overflow-hidden rounded-2xl border border-line bg-panel",children:[e("div",{className:"auto-grid animate-fade gap-x-2 p-2",children:A.map((S)=>{let P="";if(S.contextWindow){let H=S.contextWindow.toLocaleString(),b=S.maxTokens?` (最大输出: ${S.maxTokens.toLocaleString()})`:"";P=`上下文窗口: ${H} tokens${b}`}return n("button",{type:"button",onClick:()=>O(S),className:"group/model flex min-w-0 items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left transition-colors hover:bg-raised/80 focus-visible:outline-accent",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e(We,{modelID:`${t.provider.id}/${S.id}`}),n("div",{className:"min-w-0",children:[e("div",{title:S.name,className:"truncate text-sm font-medium text-ink transition-colors group-hover/model:text-accent",children:S.name}),e("div",{title:S.id,className:"truncate font-mono text-2xs text-faint",children:S.id})]})]}),n("div",{className:"flex shrink-0 items-center gap-1.5",children:[S.contextWindow?e("span",{className:"rounded bg-raised px-1.5 py-0.5 font-mono text-3xs text-dim transition-colors group-hover/model:bg-panel",title:P,children:Rt(S.contextWindow)}):null,e(gt,{className:"size-3 text-faint opacity-0 transition-opacity group-hover/model:opacity-100"})]})]},S.id)})},`${x}:${T}`),f.length===0&&e("p",{className:"py-4 text-center text-sm text-faint",children:"没有匹配的模型"}),n("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-4 py-1",children:[n("span",{"aria-live":"polite",className:"text-xs text-faint",children:[f.length," 个模型 · ",T+1," / ",N," 页"]}),n("div",{className:"flex gap-1",children:[e(_,{size:"sm",variant:"ghost",disabled:T===0,onClick:()=>M(T-1),children:"上一页"}),e(_,{size:"sm",variant:"ghost",disabled:T+1>=N,onClick:()=>M(T+1),children:"下一页"})]})]})]})]})})}),e(qt,{open:Boolean(B),onOpenChange:(S)=>{if(!c&&!S)I(null)},title:"配置模型参数",description:B?n("span",{className:"flex items-center gap-1.5 font-mono text-xs",children:[e("span",{children:t.provider.name}),e("span",{children:"/"}),e("span",{className:"font-semibold text-ink",children:B.id})]}):void 0,size:"md",footer:n(m,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(_,{disabled:c,onClick:()=>I(null),children:"取消"}),e(_,{type:"submit",form:i,loading:c,variant:"primary",children:"保存参数"})]}),children:n(At,{id:i,onSubmit:L,children:[e(oe,{label:"显示名称",hint:"在模型选择器与对话界面中显示的名称",children:(S)=>e(te,{id:S,value:h.name,onChange:(P)=>g({...h,name:P.target.value}),placeholder:B?.id})}),e(oe,{label:"上下文窗口 (Context Window)",hint:"单次会话最大可用上下文;留空继承提供方默认",children:(S)=>{let P=t.provider.defaultContextWindow?`继承提供方默认 (${Rt(t.provider.defaultContextWindow)})`:"继承系统默认 (300k)";return n("div",{className:"space-y-1.5",children:[e(te,{id:S,value:h.contextWindow,onChange:(H)=>g({...h,contextWindow:H.target.value}),placeholder:P}),n("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[e("span",{className:"text-2xs text-faint",children:"常用:"}),["128k","200k","500k","1m","2m"].map((H)=>e("button",{type:"button",onClick:()=>g((b)=>({...b,contextWindow:H})),className:u("rounded px-1.5 py-0.5 font-mono text-2xs transition-colors",h.contextWindow.toLowerCase()===H?"bg-accent/20 font-medium text-accent":"bg-raised text-dim hover:bg-raised/80 hover:text-ink"),children:H},H)),h.contextWindow&&e("button",{type:"button",onClick:()=>g((H)=>({...H,contextWindow:""})),className:"ml-1 text-2xs text-faint transition-colors hover:text-ink",children:"清空(继承)"})]})]})}}),e(oe,{label:"最大输出 (Max Tokens)",hint:"单次响应最大生成的 Token 数量;留空继承提供方默认",children:(S)=>{let P=t.provider.defaultMaxTokens?`继承提供方默认 (${Rt(t.provider.defaultMaxTokens)})`:"继承系统默认 (64k)";return n("div",{className:"space-y-1.5",children:[e(te,{id:S,value:h.maxTokens,onChange:(H)=>g({...h,maxTokens:H.target.value}),placeholder:P}),n("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[e("span",{className:"text-2xs text-faint",children:"常用:"}),["16k","32k","64k","128k"].map((H)=>e("button",{type:"button",onClick:()=>g((b)=>({...b,maxTokens:H})),className:u("rounded px-1.5 py-0.5 font-mono text-2xs transition-colors",h.maxTokens.toLowerCase()===H?"bg-accent/20 font-medium text-accent":"bg-raised text-dim hover:bg-raised/80 hover:text-ink"),children:H},H)),h.maxTokens&&e("button",{type:"button",onClick:()=>g((H)=>({...H,maxTokens:""})),className:"ml-1 text-2xs text-faint transition-colors hover:text-ink",children:"清空(继承)"})]})]})}}),e(yt,{children:C})]})})]})}function Mt(t){return k(),n(m,{children:[e(Nt,{conn:t.conn}),e(mn,{...t}),e(kt,{conn:t.conn})]})}var ye=new WeakMap;function Tt(){return{id:"",name:"",protocol:"openai-completions",baseUrl:"https://api.openai.com/v1",apiKey:"",models:[],defaultContextWindow:"",defaultMaxTokens:"",untrusted:!1}}function mn(t){k();let i=le(t.conn.state),r=ee(),[d,y]=a(!1),[M,B]=a(()=>ye.get(t.conn)??null),[I,h]=a(),[g,c]=a(!1),[D,C]=a(),[E,O]=a(),[L,x]=a(Tt),f=ks(t.conn).kind==="form",W=()=>{y(!1),na(t.conn,"form",{kind:"provider"})};s(()=>()=>na(t.conn,"form",{kind:"provider"}),[t.conn]),s(()=>{let b=ye.get(t.conn);if(b)B(b);if(i.status!=="open")return;let V=!1;return t.conn.modelProviders().then((R)=>{if(ye.set(t.conn,R),!V)B(R)}).catch((R)=>{if(!V)h(R instanceof Error?R.message:String(R))}),()=>{V=!0}},[t.conn,i.status]);let N=async()=>{if(g)return;h(void 0);let b=L.defaultContextWindow.trim(),V=b?Cr(b):void 0;if(b&&V===void 0){h("默认上下文窗口格式无效(支持 128k、200k、1m 或正整数)");return}let R=L.defaultMaxTokens.trim(),J=R?Cr(R):void 0;if(R&&J===void 0){h("默认最大输出格式无效(支持 8k、16k、8192 或正整数)");return}c(!0);try{let F={name:L.name.trim()||L.id.trim(),protocol:L.protocol,baseUrl:L.baseUrl,apiKey:L.apiKey,models:lc(L.models),defaultContextWindow:V,defaultMaxTokens:J,untrusted:L.untrusted},j=await t.conn.saveModelProvider(L.id.trim(),F);B((X)=>{let Q=[...(X??[]).filter((Z)=>Z.id!==j.id),j];return ye.set(t.conn,Q),Q}),await Jr(t.conn),y(!1),na(t.conn,"form",{kind:"saved",providerID:j.id,models:j.models.length})}catch(F){h(F instanceof Error?F.message:String(F))}finally{c(!1)}},T=(b)=>{O(b.id),x({id:b.id,name:b.name,protocol:b.protocol,baseUrl:b.baseUrl,apiKey:"",defaultContextWindow:b.defaultContextWindow?Rt(b.defaultContextWindow):"",defaultMaxTokens:b.defaultMaxTokens?Rt(b.defaultMaxTokens):"",models:b.models,untrusted:b.untrusted}),h(void 0),y(!0)},A=()=>{O(void 0),x(Tt())},S=async(b)=>{h(void 0),C(b.id);try{let V=await t.conn.discoverModelProvider(b.id);B((R)=>R?.map((J)=>J.id===V.id?V:J)??[V]),await Jr(t.conn)}catch(V){h(V instanceof Error?V.message:String(V))}finally{C(void 0)}},P=async(b)=>{if(!await Ge({title:`移除提供方「${b.name}」?`,description:"服务端会删除保存的 API key,并恢复同名内置提供方(如果存在)。",action:"移除",danger:!0}))return;try{await t.conn.removeModelProvider(b.id),B((R)=>R?.filter((J)=>J.id!==b.id)??null),await Jr(t.conn)}catch(R){h(R instanceof Error?R.message:String(R))}},H=async(b,V,R)=>{let J=b.models.map((X)=>X.id===V?R:X),F={name:b.name,protocol:b.protocol,baseUrl:b.baseUrl,apiKey:"",defaultContextWindow:b.defaultContextWindow,defaultMaxTokens:b.defaultMaxTokens,untrusted:b.untrusted,models:lc(J)},j=await t.conn.saveModelProvider(b.id,F);B((X)=>{let Q=X?.map((Z)=>Z.id===j.id?j:Z)??[j];return ye.set(t.conn,Q),Q}),await Jr(t.conn)};return n(ne,{title:"模型提供方",description:"配置提供方与模型目录",unboxed:!0,action:e(G,{className:"size-10",label:"添加提供方","data-tour":"add-provider",disabled:i.status!=="open",onClick:()=>{A(),h(void 0),y(!0),na(t.conn,"provider",{kind:"form"})},children:e(be,{className:"size-4"})}),children:[e(pe,{initial:!1,children:(M??[]).map((b)=>e(U.div,{...Aa,className:"overflow-hidden","data-tour-provider":b.id,children:e(Ct,{provider:b,refreshing:D===b.id,onEdit:()=>T(b),onDiscover:()=>void S(b),onRemove:()=>void P(b),onUpdateModel:(V,R)=>H(b,V,R)})},b.id))}),M?.length===0&&e("div",{className:p("surface.emptyDashed","py-12"),children:e("p",{className:"text-sm text-dim",children:"暂无模型提供方,点击右上方按钮添加。"})}),!d&&I&&e("div",{className:"p-4",children:e(yt,{children:I})}),e(qt,{open:d,onOpenChange:(b)=>{if(!g)if(b)y(!0);else W()},title:E?`编辑提供方:${E}`:"添加模型提供方",size:"lg",footer:n(m,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(_,{disabled:g,onClick:W,children:"取消"}),n(_,{type:"submit",form:r,loading:g,disabled:i.status!=="open","aria-label":g?"保存中":"保存提供方",children:[e(Me,{className:"size-3.5"}),"保存提供方"]})]}),children:n(At,{id:r,onSubmit:(b)=>{b.preventDefault(),N()},children:[f&&n("div",{className:"rounded-lg bg-accent/8 px-3 py-2.5 text-xs leading-5 text-dim ring-1 ring-accent/25",children:[e("span",{className:"mr-1.5 font-medium text-ink tabular-nums",children:"3 / 4"}),"Provider ID 起个好记的名字(如 deepseek),协议和 Base URL 按服务商文档填,再填上 API key。模型列表留空会自动获取,最后点「保存提供方」。"]}),n("div",{className:"grid gap-4 sm:grid-cols-2",children:[e(oe,{label:"Provider ID",hint:"例如 openai、deepseek 或公司内部网关",children:(b)=>e(te,{id:b,value:L.id,disabled:Boolean(E),onChange:(V)=>x({...L,id:V.target.value}),placeholder:"openai"})}),e(oe,{label:"显示名称",hint:"不填就用 Provider ID",children:(b)=>e(te,{id:b,value:L.name,onChange:(V)=>x({...L,name:V.target.value}),placeholder:"OpenAI"})})]}),n("div",{className:"grid gap-4 sm:grid-cols-2",children:[e(oe,{label:"协议",children:(b)=>e(tn,{id:b,value:L.protocol,onValueChange:(V)=>x({...L,protocol:V}),groups:[{options:Bc.map((V)=>({value:V,label:Fc[V]}))}]})}),e(oe,{label:"Base URL",hint:"只填写协议端点,不要把 API key 放进 URL",children:(b)=>e(te,{id:b,type:"url",value:L.baseUrl,onChange:(V)=>x({...L,baseUrl:V.target.value}),placeholder:"https://api.example.com/v1"})})]}),e(oe,{label:"API key",hint:"留空表示保留已保存的 key;本地兼容服务可以留空",children:(b)=>e(te,{id:b,type:"password",value:L.apiKey,onChange:(V)=>x({...L,apiKey:V.target.value}),placeholder:"sk-…",autoComplete:"new-password"})}),n("div",{className:u("flex items-start justify-between gap-4 rounded-xl border border-line bg-bg/60 px-4 py-3",L.untrusted&&"border-warning/45 bg-warning/8"),children:[n("span",{className:"min-w-0",children:[e("span",{className:"block text-sm text-ink",children:"不受信的服务商"}),e("span",{className:"mt-0.5 block text-xs text-dim",children:"非官方或来源不明的服务商。开启后它的模型拿不到工具、技能、MCP、运行环境和项目信息,只能对话,或把需要动手的活委派给受信服务商的模型"})]}),e(Ye,{label:"不受信的服务商",checked:L.untrusted,onCheckedChange:(b)=>x({...L,untrusted:b}),className:"mt-0.5 shrink-0"})]}),n("div",{className:"grid gap-4 sm:grid-cols-2",children:[e(oe,{label:"默认上下文窗口",hint:"模型未单独指定时生效,例如 128k、200k、1m 或正整数",children:(b)=>e(te,{id:b,value:L.defaultContextWindow,onChange:(V)=>x({...L,defaultContextWindow:V.target.value}),placeholder:"300k"})}),e(oe,{label:"默认最大输出",hint:"单次回复生成上限,例如 16k、32k、64k 或正整数",children:(b)=>e(te,{id:b,value:L.defaultMaxTokens,onChange:(V)=>x({...L,defaultMaxTokens:V.target.value}),placeholder:"64k"})})]}),e(oe,{label:"模型列表",hint:"留空保存将从 Base URL 自动获取;也可在此手动添加或删除模型",children:(b)=>e(fn,{inputId:b,providerID:L.id.trim(),models:L.models,onChange:(V)=>x({...L,models:V})})}),e(yt,{children:I})]})})]})}function fn(t){let[i,r]=a(""),[d,y]=a(""),M=(g=i)=>{let c=g.split(/[\r\n;]+|,(?![^[\]]*\])/).map((O)=>O.trim()).filter(Boolean).join(`
2
- `),D=zc(c);if(D.length===0)return;let C=new Set(t.models.map((O)=>O.id)),E=D.filter((O)=>{if(C.has(O.id))return!1;return C.add(O.id),!0});if(E.length>0)t.onChange([...t.models,...E]);r("")},B=(g)=>{t.onChange(t.models.filter((c)=>c.id!==g))},I=d.trim().toLowerCase(),h=I?t.models.filter((g)=>`${g.id} ${g.name}`.toLowerCase().includes(I)):t.models;return n("div",{className:"space-y-2",children:[n("div",{className:"flex gap-2",children:[e(te,{id:t.inputId,value:i,onChange:(g)=>r(g.target.value),onKeyDown:(g)=>{if(g.key==="Enter")g.preventDefault(),M()},onPaste:(g)=>{let c=g.clipboardData.getData("text");if(/[\r\n,;]/.test(c))g.preventDefault(),M(c)},placeholder:"输入模型 ID(回车添加,支持逗号或换行批量粘贴)",className:"min-w-0 flex-1"}),n(_,{type:"button",disabled:!i.trim(),onClick:()=>M(),children:[e(be,{className:"size-3.5"}),"添加"]})]}),t.models.length===0?e("div",{className:"rounded-xl border border-dashed border-line bg-bg/40 px-3 py-3 text-center text-xs text-dim",children:"暂无手动指定模型,保存后将从 Base URL 自动获取"}):n("div",{className:"overflow-hidden rounded-xl border border-line bg-bg/50",children:[n("div",{className:"flex items-center justify-between gap-2 border-b border-line px-3 py-1.5 text-xs text-dim",children:[n("span",{children:["共 ",t.models.length," 个模型"]}),e("button",{type:"button",onClick:()=>{t.onChange([]),y("")},className:"text-dim transition-colors hover:text-danger",children:"清空列表"})]}),t.models.length>5&&n("div",{className:"relative border-b border-line px-2 py-1.5",children:[e(Oe,{"aria-hidden":!0,className:"pointer-events-none absolute top-3.5 left-4.5 size-3.5 text-faint"}),e(te,{type:"search",value:d,onChange:(g)=>y(g.target.value),placeholder:"筛选已添加的模型","aria-label":"筛选已添加的模型",className:"h-8 pl-8 text-xs"})]}),n("div",{className:"max-h-48 divide-y divide-line/60 overflow-y-auto",children:[h.map((g)=>{let c=[g.contextWindow?Rt(g.contextWindow):null,g.maxTokens?Rt(g.maxTokens):null].filter(Boolean).join(" / ");return n("div",{className:"flex items-center justify-between gap-2 px-3 py-1.5 text-sm hover:bg-raised/60",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e(We,{modelID:t.providerID?`${t.providerID}/${g.id}`:g.id,className:"size-4 shrink-0"}),e("span",{className:"truncate font-mono text-xs text-ink",title:g.id,children:g.id}),g.name!==g.id&&e("span",{className:"truncate text-xs text-dim",title:g.name,children:g.name})]}),n("div",{className:"flex shrink-0 items-center gap-2",children:[c&&e("span",{className:"rounded bg-raised px-1.5 py-0.5 font-mono text-2xs text-dim",children:c}),e("button",{type:"button","aria-label":`移除模型 ${g.id}`,onClick:()=>B(g.id),className:"rounded p-1 text-faint transition-colors hover:bg-raised hover:text-danger",children:e(ce,{className:"size-3.5"})})]})]},g.id)}),h.length===0&&e("p",{className:"py-3 text-center text-xs text-faint",children:"没有匹配的模型"})]})]})]})}function pn(t){return!(t.web?.some((r)=>r.kind==="tab")??!1)&&_s(t.id,"settings")}function Dt(t){let i={tools:[],commands:[],pages:[],routes:[],hooks:[],others:[]},r=new Map((t.web??[]).map((d)=>[d.id,d]));for(let d of t.registrations)switch(d.kind){case"tool":{i.tools.push(d.name);break}case"command":{let y=r.get(d.id)?.commandTitle??r.get(d.id)?.title??d.id;i.commands.push(y);break}case"web":{let y=r.get(d.id);if(y?.kind==="sidebar")i.pages.push(`侧栏: ${y.title}`);else if(y?.kind!=="command")i.pages.push(y?.title??d.id);break}case"route":{i.routes.push({method:d.method,path:d.path});break}case"websocket":{i.routes.push({method:"WS",path:d.path});break}case"hook":{i.hooks.push(d.name);break}case"policy":{i.others.push(`策略 ${d.id}`);break}case"history-resolver":{i.others.push("历史解析");break}}return i}function Ke(t){let i=new Map(t.map((c)=>[c.id,c])),r=new Map,d=new Map;for(let c of t){let D=(c.deps??[]).filter((C)=>C!==c.id);r.set(c.id,D);for(let C of D){let E=d.get(C)??[];if(!E.includes(c.id))E.push(c.id),d.set(C,E)}}let y=new Set;for(let[c,D]of r.entries())if(D.length>0)y.add(c);for(let[c,D]of d.entries())if(D.length>0)y.add(c);let M=[];for(let c of t)if(!y.has(c.id))M.push(c);let B=[],I=new Set;for(let c of y){let D=r.get(c)??[],C=d.get(c)??[],E=i.get(c);if(!E)continue;if(D.length===0&&C.length>0)B.push(E)}for(let c of y){let D=i.get(c);if(!D)continue;if(!(r.get(c)??[]).some((O)=>i.has(O))&&!B.some((O)=>O.id===c))B.push(D)}function h(c,D,C){I.add(c.id);let E=[...C,c.id],O=d.get(c.id)??[],L=[];for(let x of O){if(E.includes(x))continue;let f=i.get(x);if(f)L.push(h(f,D+1,E))}return{plugin:c,depth:D,depPath:E,children:L}}let g=B.map((c)=>h(c,0,[]));for(let c of y)if(!I.has(c)){let D=i.get(c);if(D)g.push(h(D,0,[]))}return{trees:g,standalones:M,depsMap:r,dependentsMap:d}}var gn=2400;function vn(t){let{plugin:i,busy:r,pending:d,reloaded:y,deps:M,offDeps:B,pluginMetadata:I,onSelect:h,onToggle:g,onConfigure:c}=t,D=I.get(i.id),C=D?.icon??Ht,E=i.status==="error",O=i.status==="disabled",L=!O&&pn(i),x=D?.description??i.description??"",f=x;if(d)f=e("span",{className:"animate-pulse text-dim",children:O?"卸载中…":"装载中…"});else if(E)f=e("span",{className:"text-danger/85",children:i.error??"加载失败"});else if(y)f=e("span",{className:"text-success",children:"刚刚已重载"});else if(O&&B.length>0)f=`随 ${B.join("、")} 停用`;return e(Ki,{name:e("span",{className:u(E&&"text-danger"),children:i.id}),selectLabel:`查看插件 ${i.id}`,onSelect:()=>h(i),title:E?i.error:x,meta:`v${i.version}`,description:f,icon:e(C,{}),inactive:O,highlight:y,aside:M.length>0&&n("span",{className:"font-mono text-2xs text-faint",title:"依赖的插件",children:["← ",M.join(" ")]}),actions:L&&e(G,{label:`${i.id} 设置`,size:"icon-sm",onClick:()=>c(i),children:e(vt,{className:"size-3.5"})}),toggle:{checked:!O,label:`启用 ${i.id}`,disabled:r,onCheckedChange:()=>g(i)}})}function It(t){return n("li",{className:"flex h-8 items-center gap-2 bg-raised/30 px-4 font-mono text-2xs text-faint uppercase tracking-wider",children:[t.label,e("span",{className:"text-faint/60",children:t.count})]})}function Lt(t){let{plugins:i,busy:r,pending:d,query:y,pluginMetadata:M,onSelect:B,onToggle:I,onConfigure:h}=t,g=w(()=>Ke(i),[i]),c=y.trim().toLowerCase(),D=o(new Map),C=o(new Set),[E,O]=a(new Set);s(()=>{let A=[];for(let P of i){if(D.current.has(P.id)&&P.webRevision&&D.current.get(P.id)!==P.webRevision)A.push(P.id);D.current.set(P.id,P.webRevision)}if(A.length===0)return;O((P)=>new Set([...P,...A]));let S=setTimeout(()=>{C.current.delete(S),O((P)=>new Set([...P].filter((H)=>!A.includes(H))))},gn);C.current.add(S)},[i]),s(()=>{let A=C.current;return()=>{for(let S of A)clearTimeout(S)}},[]);let L=w(()=>[...!c?i:i.filter((S)=>S.id.toLowerCase().includes(c)||(S.description??"").toLowerCase().includes(c)||(M.get(S.id)?.description??"").toLowerCase().includes(c))].sort((S,P)=>S.id.localeCompare(P.id,"en")),[i,c,M]);if(L.length===0)return n("p",{className:"p-6 text-center text-dim text-sm",children:["没有匹配「",y.trim(),"」的插件"]});let x=new Map(i.map((A)=>[A.id,A.status])),f=L.filter((A)=>!A.builtin),W=L.filter((A)=>A.builtin),N=f.length>0&&W.length>0;function T(A){let S=g.depsMap.get(A.id)??[];return e("li",{children:e(vn,{plugin:A,busy:r,pending:d===A.id,reloaded:E.has(A.id),deps:S,offDeps:S.filter((P)=>x.get(P)==="disabled"),pluginMetadata:M,onSelect:B,onToggle:I,onConfigure:h})},A.id)}return n("ul",{className:"divide-y divide-line",children:[N&&e(It,{label:"用户",count:f.length}),f.map(T),N&&e(It,{label:"内置",count:W.length}),W.map(T)]})}function Et(){return new Map(Re().map((t)=>[t.id,t.metadata]))}var ze=Et();bn(()=>{ze=Et()});var xn={enabled:{label:"已启用",dot:"bg-success"},disabled:{label:"已禁用",dot:"bg-faint"},error:{label:"出错",dot:"bg-danger"}};function hn(t){return!(t.web?.some((r)=>r.kind==="tab")??!1)&&_s(t.id,"settings")}function yn(t){Te();let{plugin:i,depsMap:r,dependentsMap:d}=t,y=w(()=>Dt(i),[i]),M=i.status==="disabled",B=y.hooks.length>0||y.routes.length>0||y.others.length>0,I=y.pages.length>0||y.tools.length>0||y.commands.length>0,h=(r?.get(i.id)??i.deps??[]).filter((c)=>c!==i.id),g=d?.get(i.id)??[];return n("div",{className:"space-y-3 text-xs leading-5",children:[ve.errors.get(i.id)&&n("p",{role:"alert",className:"text-danger",children:["Web: ",ve.errors.get(i.id)]}),i.error&&n("div",{role:"alert",className:"rounded-xl bg-danger/8 p-3 text-xs leading-5 text-danger",children:[e("p",{className:"mb-1 font-medium font-sans",children:i.status==="enabled"?"重载失败,仍在运行上一版本":"插件加载异常"}),e("pre",{className:"whitespace-pre-wrap font-mono [overflow-wrap:anywhere]",children:i.error})]}),n(ys,{children:[h.length>0&&e(ta,{label:"依赖",children:h.map((c)=>{let C=(t.plugins??[]).find((E)=>E.id===c)?.status==="disabled";return e("button",{type:"button",onClick:()=>t.onSelectPlugin?.(c),className:u(bi,"cursor-pointer transition-colors hover:text-ink",C&&"text-warning"),title:C?"依赖插件已停用,可能影响功能":"点击查看该插件",children:C?`${c}(未启用)`:c},c)})}),g.length>0&&e(ta,{label:"被依赖",children:g.map((c)=>e("button",{type:"button",onClick:()=>t.onSelectPlugin?.(c),className:u(bi,"cursor-pointer transition-colors hover:text-ink"),title:"点击查看依赖此插件的下游插件",children:c},c))}),M?e("p",{className:"py-2.5 text-faint",children:"该插件当前处于停用状态,启用后接管对应功能与服务。"}):n(m,{children:[y.pages.length>0&&e(ta,{label:"界面",children:y.pages.map((c)=>e(xi,{children:c},c))}),y.tools.length>0&&e(ta,{label:"工具",children:y.tools.map((c)=>e(xi,{mono:!0,children:c},c))}),y.commands.length>0&&e(ta,{label:"命令",children:y.commands.map((c)=>e(xi,{children:c},c))}),B&&n(bs,{label:"接口",summary:[y.hooks.length>0&&`${y.hooks.length} 个钩子`,y.routes.length>0&&`${y.routes.length} 条路由`,y.others.length>0&&`${y.others.length} 项其他注册`].filter(Boolean).join(","),children:[y.hooks.length>0&&n("div",{className:"space-y-1.5",children:[e("span",{className:"text-2xs text-faint",children:"生命周期事件钩子"}),e("div",{className:"flex flex-wrap gap-1.5",children:y.hooks.map((c)=>e("span",{className:u(bi,"font-mono text-2xs"),children:c},c))})]}),y.routes.length>0&&n("div",{className:"space-y-1.5",children:[e("span",{className:"text-2xs text-faint",children:"HTTP / WebSocket 路由"}),e("div",{className:"space-y-0.5 font-mono text-2xs text-dim",children:y.routes.map((c)=>n("div",{className:"grid grid-cols-[3rem_minmax(0,1fr)] gap-2",children:[e("span",{className:"text-faint",children:c.method}),e("span",{className:"[overflow-wrap:anywhere]",children:c.path})]},`${c.method} ${c.path}`))})]}),y.others.length>0&&n("div",{className:"space-y-1.5",children:[e("span",{className:"text-2xs text-faint",children:"其他注册"}),e("div",{className:"flex flex-wrap gap-1.5",children:y.others.map((c)=>e("span",{className:u(bi,"text-2xs"),children:c},c))})]})]}),!I&&!B&&!i.error&&e("p",{className:"py-2.5 text-faint",children:"该插件没有向外部暴露界面或工具能力"})]})]}),t.failed&&e("p",{role:"alert",className:"text-xs text-danger",children:t.failed})]})}function Sn(){return e("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2,3,4].map((t)=>n("div",{className:"flex h-13 items-center gap-3 px-4",children:[e("div",{className:"size-7 shrink-0 animate-pulse rounded-md bg-raised"}),e("div",{className:"h-3 w-20 animate-pulse rounded bg-raised"}),e("div",{className:"h-3 w-1/3 animate-pulse rounded bg-raised"})]},t))})}function $t({conn:t}){k(),Te();let[i,r]=a(()=>{let R=t.state.get();return R.pluginsLoaded?R.plugins:void 0}),[d,y]=a(""),[M,B]=a(),[I,h]=a(),[g,c]=a(""),[D,C]=a(),[E,O]=a("details"),[L,x]=a(null),f=o(0),W=o(!1),N=o({}),T=v(()=>{if(W.current)return;let R=++f.current;y(""),t.plugins().then(()=>{if(R===f.current)r(t.state.get().plugins)},(J)=>{if(R===f.current)y(je(J))})},[t]);s(()=>{B(void 0);let R=t.state.get().plugins,J=t.state.subscribe((F)=>{if(F.plugins===R)return;R=F.plugins,r(F.plugins)});return T(),()=>{J(),f.current++,W.current=!1}},[T,t]);async function A(R,J){if(W.current)return;if(J){let Q=Date.now(),Z=N.current[R.id]??0;if(Q-Z<500)return;N.current[R.id]=Q}let F=++f.current;W.current=!0,B(R.id),h(void 0);let j=R.status==="disabled",X=R.id;try{if(J){if(await t.reloadPlugin(R.id),F===f.current)r(t.state.get().plugins);return}let Q=await t.plugins();if(F!==f.current)return;r(t.state.get().plugins);let Z=new Map(Q.map((q)=>[q.id,q])),ae=[],me=new Set,fe=new Set,he=(q)=>{if(fe.has(q))return;if(me.has(q))throw Error(`插件依赖存在循环:${q}`);let se=Z.get(q);if(!se)throw Error(`找不到插件依赖:${q}`);if(me.add(q),j){if(se.status==="error")throw Error(`请先修复依赖插件 ${q} 的加载错误`);for(let ie of se.deps??[])he(ie)}else for(let ie of Q)if(ie.status!=="disabled"&&ie.deps?.includes(q))he(ie.id);if(me.delete(q),fe.add(q),j?se.status!=="enabled":se.status!=="disabled")ae.push(se)};he(R.id);let Ce=ae.filter((q)=>q.id!==R.id);if(Ce.length>0){let q=Ce.map((ie)=>ie.id).join("、");if(!await Ge({title:j?"同时启用依赖插件?":"同时禁用依赖此插件的插件?",description:j?`启用 ${R.id} 需要先启用:${q}。是否继续?`:`${q} 依赖 ${R.id},将先禁用这些插件,再禁用 ${R.id}。是否继续?`,action:j?"级联启用":"级联禁用",danger:!j}))return}for(let q of ae){if(F!==f.current)return;X=q.id,r((ie)=>ie?.map((Fe)=>Fe.id===q.id?{...Fe,status:j?"enabled":"disabled",error:void 0}:Fe));let se=await t.enablePlugin(q.id,j);if(F!==f.current)return;if(r(t.state.get().plugins),se.find((ie)=>ie.id===q.id)?.status!==(j?"enabled":"disabled"))throw Error(`插件 ${q.id} 未进入预期状态,请刷新后重试`)}}catch(Q){if(F!==f.current)return;let Z=J?"重载失败":`更新 ${X} 失败,后续操作已停止`;h({id:R.id,message:Z}),z(Q,Z);try{if(await t.plugins(),F===f.current)r(t.state.get().plugins)}catch(ae){if(F===f.current)y(`刷新插件状态失败:${je(ae)}`)}}finally{if(F===f.current)W.current=!1,B(void 0)}}let S=w(()=>Ke(i??[]),[i]),P=D?i?.find((R)=>R.id===D):void 0,H=o(void 0);if(P)H.current=P;let b=P??H.current,V=i?`内置 ${i.filter((R)=>R.builtin).length},用户 ${i.filter((R)=>!R.builtin).length}`:"";return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[e("h2",{className:"font-medium text-ui text-dim",children:"插件"}),e("p",{className:"mt-0.5 text-faint text-xs",children:V})]}),e(G,{label:"刷新",className:"size-10",disabled:M!==void 0,onClick:T,children:e(ge,{className:"size-4"})})]}),d&&n("div",{role:"alert",className:"mb-3 flex flex-wrap items-center gap-2 rounded-xl border border-line p-3",children:[n("p",{className:"min-w-0 flex-1 break-words text-danger text-sm",children:["无法读取插件:",d]}),e(_,{className:"h-10",onClick:T,children:"重试"})]}),n("div",{className:"relative mb-3 min-w-0",children:[e(Oe,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),e(te,{type:"search","aria-label":"搜索插件",placeholder:"搜索插件",value:g,onChange:(R)=>c(R.target.value),className:"h-10 min-w-0 pl-9"})]}),e("div",{className:p("settings.groupBox"),children:!i?!d&&e(Sn,{}):e(Lt,{plugins:i,busy:M!==void 0,pending:M,query:g,pluginMetadata:ze,onSelect:(R)=>{C(R.id),O("details")},onToggle:(R)=>void A(R,!1),onConfigure:(R)=>{C(R.id),O("settings")}})})]}),e(qt,{open:Boolean(D),onOpenChange:(R)=>{if(!R)C(void 0),O("details")},size:"lg",title:b&&(E==="settings"?n("div",{className:"flex items-center gap-2",children:[n(_,{variant:"ghost",size:"sm",className:"h-7 px-1.5 text-xs text-dim hover:text-ink",onClick:()=>O("details"),children:[e(fr,{className:"mr-1 size-3.5"}),"返回详情"]}),n("span",{className:"font-semibold text-ink text-base",children:[b.id," 设置"]})]}):e(vs,{icon:(()=>{let R=ze.get(b.id)?.icon??Ht;return e(R,{})})(),name:b.id,meta:[b.builtin?"内置":"用户插件",`v${b.version}`,b.webBundle&&"Web"]})),description:b&&(E==="settings"?void 0:e("span",{className:"mt-2 block leading-5.5",children:ze.get(b.id)?.description??b.description})),footer:b&&(E==="settings"?e("div",{ref:x,className:"flex w-full flex-wrap items-center justify-end gap-2"}):n("div",{className:"flex w-full items-center justify-between gap-2 max-sm:[&>*]:flex-none",children:[n("div",{className:"inline-flex items-center gap-2.5 text-ui text-dim",children:[e(Ye,{label:`启用 ${b.id}`,checked:b.status!=="disabled",disabled:M!==void 0,onCheckedChange:()=>void A(b,!1)}),e("span",{className:u(b.status==="error"&&"text-danger"),children:xn[b.status].label})]}),n("div",{className:"flex items-center gap-1.5",children:[e(G,{label:"重载插件",disabled:M!==void 0||b.status==="disabled",onClick:()=>void A(b,!0),children:e(ge,{className:u("size-4",M===b.id&&"animate-spin")})}),hn(b)&&b.status!=="disabled"&&n(_,{size:"sm",onClick:()=>O("settings"),children:[e(vt,{className:"size-3.5"}),e("span",{children:"设置"})]})]})]})),children:b&&(E==="settings"?e(Xi,{value:{footer:L},children:e("div",{className:"py-1",children:e(ws,{pluginID:b.id,viewID:"settings",connection:t,onClose:()=>{C(void 0),O("details")}})})}):e(yn,{plugin:b,busy:M===b.id,failed:I?.id===b.id?I.message:void 0,plugins:i??[],depsMap:S.depsMap,dependentsMap:S.dependentsMap,onSelectPlugin:(R)=>{C(R),O("details")}}))})]})}var we="__direct",Je="__inherit";function Ft({conn:t}){k();let i=le(t.state).status,[r,d]=a(),[y,M]=a(),[B,I]=a([]),[h,g]=a(),[c,D]=a(),C=o(void 0),E=v(async(N)=>{g("loading"),D(void 0);try{let T=await t.proxyConfiguration(N);if(N?.aborted)return;d(Ie(T)),M(Ie(T)),I(T.targets)}catch(T){if(!N?.aborted)D(T instanceof Error?T.message:String(T))}finally{if(!N?.aborted)g(void 0)}},[t]);s(()=>{let N=new AbortController;if(C.current=N,d(void 0),M(void 0),D(void 0),i==="open")E(N.signal);return()=>N.abort()},[i,E]);let O=(N)=>{d((T)=>T?N(T):T)},L=(N,T)=>{O((A)=>({...A,profiles:A.profiles.map((S)=>S.id===N?{...S,...T}:S)}))},x=async()=>{if(!r)return;let N=C.current;if(!N||N.signal.aborted)return;g("saving"),D(void 0);try{let T=await t.saveProxyConfiguration(r,N.signal);if(N.signal.aborted)return;d(Ie(T)),M(Ie(T)),I(T.targets)}catch(T){if(!N.signal.aborted)D(T instanceof Error?T.message:String(T))}finally{if(!N.signal.aborted)g(void 0)}},f=r&&y?JSON.stringify(r)!==JSON.stringify(y):!1,W=[{value:we,label:"直接连接"},...r?.profiles.map((N)=>({value:N.id,label:N.name}))??[]];if(i!=="open")return e(ne,{title:"代理",description:"控制当前服务器发起的外发 HTTP 请求。",children:e(Y,{title:"连接服务器后可配置代理",description:"代理设置保存在服务器上,连接后即可读取和保存。"})});if(!r)return e(ne,{title:"代理",description:"控制当前服务器发起的外发 HTTP 请求。",children:e(Y,{title:c?"无法读取代理设置":"正在读取代理设置…",description:c?e("span",{className:"text-danger",children:c}):void 0,children:c&&e(_,{loading:h==="loading",onClick:()=>void E(C.current?.signal),children:"重新加载"})})});return n(At,{className:"gap-6",noValidate:!0,onSubmit:(N)=>{N.preventDefault(),x()},children:[e(ne,{title:"代理",description:"控制当前服务器发起的外发 HTTP 请求;本机回环地址始终直连。",children:e(Y,{title:"默认线路",description:"没有单独分流的模型、订阅登录和程序更新使用这条线路。",children:e(tn,{ariaLabel:"默认代理线路",className:"w-56",value:r.defaultProfileID??we,disabled:h!==void 0,onValueChange:(N)=>O((T)=>({...T,defaultProfileID:N===we?void 0:N})),groups:[{options:W}]})})}),e(ne,{title:"代理服务器",description:"支持 HTTP / HTTPS 代理;地址中的账号密码请拆到独立字段。",unboxed:!0,action:n(_,{size:"sm",disabled:h!==void 0,onClick:()=>O((N)=>({...N,profiles:[...N.profiles,{id:Bt(),name:`代理 ${N.profiles.length+1}`,address:"http://127.0.0.1:8080",tls:"verify",noProxy:[]}]})),children:[e(be,{className:"size-3.5"}),"添加代理"]}),children:r.profiles.length===0?e("div",{className:p("surface.emptyDashed","py-10 text-sm text-dim"),children:"尚未添加代理,所有请求直接连接。"}):r.profiles.map((N)=>n("section",{className:p("surface.card","flex flex-col gap-4 p-4"),children:[n("div",{className:"flex items-center justify-between gap-3",children:[n("div",{className:"flex min-w-0 items-center gap-2 text-sm font-medium text-ink",children:[e(Pe,{className:"size-4 shrink-0 text-dim"}),e("span",{className:"truncate",children:N.name||"未命名代理"})]}),e(G,{label:`删除${N.name||"代理"}`,className:"text-danger",disabled:h!==void 0,onClick:()=>O((T)=>({...T,defaultProfileID:T.defaultProfileID===N.id?void 0:T.defaultProfileID,profiles:T.profiles.filter((A)=>A.id!==N.id),routes:Object.fromEntries(Object.entries(T.routes).filter(([,A])=>A!==N.id))})),children:e(xe,{className:"size-4"})})]}),n("div",{className:"grid gap-3 md:grid-cols-2",children:[e(oe,{label:"名称",children:(T)=>e(te,{id:T,value:N.name,onChange:(A)=>L(N.id,{name:A.target.value})})}),e(oe,{label:"代理地址",children:(T)=>e(te,{id:T,type:"url",value:N.address,placeholder:"http://proxy.example.com:8080",autoComplete:"off",spellCheck:!1,onChange:(A)=>L(N.id,{address:A.target.value})})}),e(oe,{label:"用户名(可选)",children:(T)=>e(te,{id:T,value:N.username??"",autoComplete:"off",onChange:(A)=>L(N.id,{username:A.target.value||void 0})})}),e(oe,{label:"密码(可选)",hint:"留空表示沿用已保存密码。",children:(T)=>e(te,{id:T,type:"password",value:N.password??"",autoComplete:"new-password",onChange:(A)=>L(N.id,{password:A.target.value||void 0})})}),e(oe,{label:"HTTPS 证书校验",children:(T)=>e(tn,{id:T,value:N.tls,onValueChange:(A)=>L(N.id,{tls:A==="insecure"?"insecure":"verify"}),groups:[{options:[{value:"verify",label:"校验证书(推荐)"},{value:"insecure",label:"跳过校验(仅调试)"}]}]})}),e(oe,{label:"额外直连主机",hint:"多个主机用逗号分隔;localhost 与回环地址无需填写。",children:(T)=>e(te,{id:T,value:N.noProxy?.join(", ")??"",placeholder:"internal.example.com",onChange:(A)=>L(N.id,{noProxy:A.target.value.split(",").map((S)=>S.trim()).filter(Boolean)})})})]})]},N.id))}),e(ne,{title:"分流规则",description:"可按模型提供方、ChatGPT 订阅登录或程序更新覆盖默认线路。",children:B.map((N)=>{let A=Object.hasOwn(r.routes,N.id)?r.routes[N.id]??we:Je;return e(Y,{title:N.name,description:e("span",{className:"font-mono",children:N.id}),children:e(tn,{ariaLabel:`${N.name}使用的代理线路`,className:"w-56",value:A,disabled:h!==void 0,onValueChange:(S)=>O((P)=>{let H={...P.routes};if(S===Je)delete H[N.id];else H[N.id]=S===we?null:S;return{...P,routes:H}}),groups:[{options:[{value:Je,label:"跟随默认线路"},...W]}]})},N.id)})}),e(yt,{children:c}),n(gs,{children:[e(_,{disabled:h!==void 0||!f,onClick:()=>y&&d(structuredClone(y)),children:"撤销更改"}),n(_,{type:"submit",variant:"primary",disabled:h!==void 0||!f,loading:h==="saving",children:[e(Me,{className:"size-3.5"}),"保存代理设置"]})]})]})}function Ie(t){return{version:1,defaultProfileID:t.defaultProfileID,routes:{...t.routes},profiles:t.profiles.map((i)=>({id:i.id,name:i.name,address:i.address,username:i.username,password:"",tls:i.tls,noProxy:[...i.noProxy??[]]}))}}function Wt({conn:t}){let[i,r]=a(0);return e(wn,{conn:t,onRetry:()=>r((d)=>d+1)},i)}function wn({conn:t,onRetry:i}){let r=le(t.state).status==="open",[d,y]=a(),[M,B]=a(),[I,h]=a(),g=o(void 0);s(()=>{let D=new AbortController;if(g.current=D,y(void 0),B(void 0),r)h("load"),t.networkSettings(D.signal).then((C)=>{if(D.signal.aborted)return;y(C),h(void 0)},(C)=>{if(D.signal.aborted)return;let E=C instanceof Error&&"status"in C&&C.status===404;B(E?"当前服务版本不支持局域网设置,请更新服务端。":Gt(C)),h(void 0)});return()=>D.abort()},[t,r]);async function c(D){let C=g.current;if(!C||C.signal.aborted||I)return;h("update"),B(void 0);try{let E=await t.saveNetworkSettings({lanEnabled:D},C.signal);if(C.signal.aborted)return;y(E)}catch(E){if(!C.signal.aborted)B(Gt(E))}finally{if(!C.signal.aborted)h(void 0)}}if(!r)return e(Y,{title:"开放局域网",description:"连接服务器后可查看网络设置。"});if(!d)return e(Y,{title:"开放局域网",description:M??"正在读取网络设置…",children:M&&e(_,{size:"sm",onClick:i,children:"重试"})});return n(m,{children:[e(Y,{title:"开放局域网",description:n("div",{className:"space-y-2",children:[e("p",{children:"设备需配对。HTTP 不加密,仅限可信网络。"}),d.disabledReason&&e("p",{children:d.disabledReason}),M&&e("p",{role:"alert",className:"text-danger",children:M})]}),children:e(Ye,{label:"开放局域网",checked:d.settings.lanEnabled,onCheckedChange:c,disabled:!d.editable||I!==void 0})}),d.current.remote&&e(Y,{title:"局域网连接地址",description:n("div",{className:"space-y-2",children:[e("p",{children:"其他设备使用配对码连接。"}),d.addresses.length===0&&e("p",{children:"未发现局域网 IPv4 地址,请检查网卡。"}),d.addresses.map((D)=>e(te,{"aria-label":`局域网地址 ${D.address}`,value:D.url,readOnly:!0,className:"font-mono",onFocus:(C)=>C.currentTarget.select()},D.address))]})})]})}function Gt(t){return t instanceof Error?t.message:"网络设置请求失败,请重试。"}var kn=/^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/,Cn=2000,Ot=15000,Pn={off:"已关闭",starting:"连接中",connected:"已连接",error:"连接失败,重试中","missing-binary":"未安装 cloudflared"},Tn=["c07321b023e944ff818fec44d8203567","4755a26eedb94da69e1066d98aa820be","c8fed203ed3043cba015a93ad1616f1f","1e13c5124ca64b72b1969a67e8829049","bfe0d8686a584fa680f4c53b5eb0de6d"],De=new URL("https://dash.cloudflare.com/");De.searchParams.set("to","/:account/api-tokens");De.searchParams.set("name","Basalt remote access");De.searchParams.set("permissionGroupKeys",JSON.stringify(Tn.map((t)=>({key:t,type:"edit"}))));function Mn(t){let i=it(t.state,(I)=>I.status==="open"),[r,d]=a(),[y,M]=a(),B=r?.state==="connected"||r?.enabled===!1;return s(()=>{if(!i)return;let I=!1,h=()=>void t.tunnelStatus().then((c)=>{if(I)return;d(c),M(void 0)}).catch((c)=>{if(I)return;if(c instanceof Error&&"status"in c&&c.status===404){d(null);return}M(c instanceof Error?c.message:String(c))});h();let g=setInterval(h,B?Ot:Cn);return()=>{I=!0,clearInterval(g)}},[t,i,B]),[r,d,y]}function Rn(t){let[i,r]=a(),d=i?.expires;return s(()=>{let y=!1,M=()=>void t.pairingCode().then((h)=>!y&&r(h)).catch(()=>!y&&r(null));M();let B=setInterval(M,Ot),I=d?setTimeout(M,Math.max(0,d-Date.now())+500):void 0;return()=>{y=!0,clearInterval(B),clearTimeout(I)}},[t,d]),[i,r]}function _t(t){k();let[i,r,d]=Mn(t.conn);return n(m,{children:[e(In,{conn:t.conn}),e(ne,{title:"局域网访问",description:"通过可信局域网访问这台 Basalt。",children:e(Wt,{conn:t.conn})}),i!==null&&e(ne,{title:"Cloudflare",description:"用自己的域名从外网访问;新设备仍需 Basalt 配对。",children:i?e(zn,{conn:t.conn,status:i,onChanged:r}):e(Y,{title:d?"状态读取失败":"正在读取状态…",description:d})})]})}function zn(t){let{conn:i,status:r}=t,d=it(i.state,(P)=>P.server?.auth===!1),[y,M]=a(),[B,I]=a(),[h,g]=a(""),[c,D]=a(r.accessEmail??""),[C,E]=a(!1),[O,L]=a(),x=(y??r.hostname??"").trim().toLowerCase(),f=r.enabled??r.configured,W=r.managedAccess??!!(r.cloudAccessTeam||r.access),N=r.cloudflareConnected&&r.managedAccess===void 0;s(()=>{if(!r.cloudflareConnected||!r.configured)return;let P=!1;return i.refreshCloudflare().then((H)=>{if(!P)t.onChanged(H)},(H)=>{if(!P)L(H instanceof Error?H.message:"读取云端配置失败")}),()=>{P=!0}},[i,r.cloudflareConnected,r.configured,t.onChanged]);async function T(P,H=!1){if(C)return;E(!0),L(void 0);try{if(t.onChanged(await P()),H)g(""),I(void 0)}catch(b){L(b instanceof Error?b.message:String(b))}finally{E(!1)}}function A(){L(void 0),g(""),I("connect")}async function S(P){if(!r.cloudflareConnected){A();return}if(P){D(r.accessEmail??""),L(void 0),I("access");return}if(await Ge({title:"取消 Cloudflare 登录?",description:"所有人将可以打开 Basalt 连接页面,新设备仍必须配对。只修改当前域名,不影响隧道连接。",action:"取消额外登录"}))await T(()=>i.configureManagedAccess({enabled:!1}))}return n(m,{children:[n(Y,{title:"状态",description:r.publicURL?e("span",{className:"font-mono break-all",children:r.publicURL}):"尚未配置访问域名",children:[e("span",{className:u("text-ui",r.state==="connected"?"text-success":"text-faint"),children:Pn[r.state]}),r.publicURL&&e(Pt,{text:r.publicURL,label:"复制地址",size:"icon-sm"}),r.publicURL&&e(G,{asChild:!0,size:"icon-sm",label:"打开公共地址",children:e("a",{href:r.publicURL,target:"_blank",rel:"noreferrer noopener",children:e(an,{className:"size-3.5"})})}),e(_,{variant:"ghost",size:"sm",disabled:C||d,onClick:A,children:r.cloudflareConnected?"更换授权":"连接 Cloudflare"})]}),e(Y,{title:"隧道",description:"关闭仅断开连接,保留域名和配置。",children:e(Ye,{label:"隧道",checked:f,disabled:C||d||!r.binary&&!f,onCheckedChange:(P)=>{if(P&&!r.configured&&!r.cloudflareConnected){A();return}T(()=>i.configureManagedTunnel({enabled:P,hostname:x}))}})}),e(Y,{title:"域名",description:"填写 Cloudflare 托管域名下的子域名。",children:n("div",{className:"flex max-w-full flex-wrap items-center gap-2",children:[e(te,{"aria-label":"域名",placeholder:"basalt.example.com",value:y??r.hostname??"",className:"w-56 max-w-full",spellCheck:!1,autoCapitalize:"off",disabled:C||d,onChange:(P)=>M(P.target.value)}),e(_,{size:"sm",variant:"secondary",loading:C,disabled:C||d||!kn.test(x)||x===r.hostname&&f,onClick:()=>{if(!r.cloudflareConnected){A();return}T(()=>i.configureManagedTunnel({enabled:!0,hostname:x}))},children:"保存并连接"})]})}),e(Y,{title:"Access 登录保护",description:N?"云端状态尚未确认,请重新检测;不会将未知状态视为关闭。":"仅允许指定邮箱通过 GitHub 登录。",children:N?e(_,{size:"sm",variant:"secondary",disabled:C,onClick:()=>void T(()=>i.refreshCloudflare()),children:"重新检测"}):e(Ye,{label:"Access 登录保护",checked:W,disabled:C||d||!r.configured,onCheckedChange:(P)=>void S(P)})}),(O||r.managementError||r.error||d||!r.binary)&&e("div",{className:"px-4 py-3",children:e(Ta,{tone:"danger",children:O||r.managementError||r.error||(d?"服务端已关闭认证,不能开启远程访问。":`请先安装 cloudflared:${r.install.command??r.install.url}`)})}),e(qt,{open:B==="connect",onOpenChange:(P)=>{if(!C&&!P)I(void 0),g(""),L(void 0)},title:"连接 Cloudflare",description:"创建令牌后,粘贴到下方即可连接。",children:n(At,{onSubmit:(P)=>{P.preventDefault(),T(()=>i.connectCloudflare(h.trim()),!0)},children:[n("div",{className:"space-y-2 text-ui text-dim",children:[e(_,{asChild:!0,variant:"secondary",children:n("a",{href:De.href,target:"_blank",rel:"noreferrer noopener",children:["创建令牌 ",e(an,{className:"size-3.5"})]})}),e("p",{className:"text-xs text-faint",children:"权限已预填,只需选择账号和域名。"})]}),e(oe,{label:"API Token",children:(P)=>e(te,{id:P,type:"password",placeholder:"粘贴令牌",autoComplete:"off",spellCheck:!1,value:h,disabled:C,onChange:(H)=>g(H.target.value)})}),e("p",{className:"text-xs text-faint",children:"令牌仅保存在本机,不发送给模型。"}),e(yt,{children:O}),e("div",{className:"flex justify-end",children:e(_,{type:"submit",loading:C,disabled:!h.trim(),children:"连接"})})]})}),e(qt,{open:B==="access",onOpenChange:(P)=>{if(!C&&!P)I(void 0),L(void 0)},title:"开启 Access 登录保护",description:"使用 GitHub 登录,并限定以下邮箱。",children:n(At,{onSubmit:(P)=>{P.preventDefault(),T(()=>i.configureManagedAccess({enabled:!0,email:c.trim()}),!0)},children:[e(oe,{label:"允许登录的邮箱",children:(P)=>e(te,{id:P,type:"email",autoComplete:"email",value:c,disabled:C,onChange:(H)=>D(H.target.value)})}),e(yt,{children:O}),e("div",{className:"flex justify-end",children:e(_,{type:"submit",loading:C,disabled:!c.trim(),children:"开启保护"})})]})})]})}function In(t){let[i,r]=Rn(t.conn),[d,y]=a(!1);if(!i)return null;let M=`${i.code.slice(0,4)}-${i.code.slice(4)}`,B=new Date(i.expires).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});async function I(){y(!0);try{r(await t.conn.renewPairingCode())}catch(h){z(h,"更换配对码失败")}finally{y(!1)}}return e(ne,{title:"设备配对",description:"局域网与 Cloudflare 隧道连接共用此码。",children:n(Y,{title:"配对码",description:`${B} 前有效,用一次即失效`,children:[e("code",{className:"font-mono text-sm font-medium tracking-wider text-ink",children:M}),e(Pt,{text:M,label:"复制配对码",size:"icon-sm"}),e(G,{size:"icon-sm",label:"换一个配对码",className:"text-faint",disabled:d,onClick:()=>void I(),children:e(ge,{className:u("size-3.5",d&&"animate-spin")})})]})})}var Dn=[{value:"auto",label:"自动检测 (Auto)",description:"Windows 优先探测 bash,未找到则回退 powershell;Unix 走 bash"},{value:"bash",label:"Bash",description:"使用 bash -c 执行(Git Bash / WSL / MSYS2 / Linux / macOS)"},{value:"powershell",label:"PowerShell",description:"使用 powershell -NoProfile -Command 执行"},{value:"cmd",label:"CMD",description:"使用 cmd.exe /c 执行"}];function Bn(t){if(!t)return"—";return`v${t.version}(协议 v${t.protocol})`}function Ln(t){if(!t)return"—";return t.auth?"需设备配对令牌":"免认证(--no-auth)"}function Vt(t){let i=le(t.conn.state),r=Zi[i.status],d=i.server,[y,M]=a(!1),[B,I]=a(!1),[h,g]=a(),[c,D]=a(!1),C=d?.shell??"auto";s(()=>{if(g(void 0),i.status!=="open")return;let x=!1;return t.conn.serverAutostart().then((f)=>{if(!x)g(f)},(f)=>{if(!x)z(f)}),()=>{x=!0}},[t.conn,i.status]);async function E(x){let f=x;M(!0);try{await t.conn.setServerShell(f)}catch(W){z(W)}finally{M(!1)}}async function O(x){D(!0);try{g(await t.conn.setServerAutostart(x))}catch(f){z(f)}finally{D(!1)}}async function L(){I(!0);try{await t.conn.restartServer(),ue("已请求重启",{description:"所有对话空闲后服务会按原参数重启,稍后自动重新连接"})}catch(x){z(x)}finally{I(!1)}}return n(m,{children:[n(ne,{title:"当前远程服务器",description:`正在管理 ${Gn(t.server)}(${t.server.url})`,children:[e(Y,{title:"连接状态",description:i.error??t.server.url,children:n("span",{className:"inline-flex items-center gap-2 text-xs font-medium text-ink",children:[e("span",{className:u("size-2 rounded-full",r.dot)}),i.status==="open"&&d?e("span",{className:"font-mono",children:Bn(d)}):r.label]})}),e(Y,{title:"认证策略",description:"服务端是否要求配对设备令牌",children:n("span",{className:"inline-flex items-center gap-2 text-xs font-medium text-ink",children:[d&&e("span",{className:u("size-2 rounded-full",d.auth?"bg-success":"bg-warning")}),Ln(d)]})})]}),n(ne,{title:"更新与启动",description:"服务端版本更新、重启与开机自启",children:[e(Kc,{conn:t.conn}),e(Y,{title:"服务重启",description:"按原参数重启,等所有对话空闲后执行,不会中断进行中的对话",children:e(_,{size:"sm",loading:B,disabled:i.status!=="open",onClick:L,children:"重启服务"})}),e(Y,{title:"开机自启",description:"当前用户登录系统后自动启动 Basalt;不影响正在运行的服务",children:e(Ye,{label:"开机自启",checked:h?.enabled??!1,disabled:!h||c||i.status!=="open",onCheckedChange:(x)=>void O(x)})})]}),n(ne,{title:"运行环境",description:"服务端执行命令与解释定时任务时使用的环境",children:[e(Y,{title:"执行 Shell",description:"服务端运行 bash 工具与后台长任务时调用的默认命令行解释器",children:e("div",{className:"w-56",children:e(tn,{value:C,disabled:y,onValueChange:E,groups:[{options:Dn.map((x)=>({value:x.value,label:x.label,description:x.description}))}]})})}),e(Y,{title:"服务器时区",description:"远程自动化定时任务(Cron)按此时区解释",children:e("span",{className:"font-mono text-xs text-dim",children:d?.timezone??"—"})})]})]})}function jt(t){let i=le(t.conn.state),r=t.devices;if(i.server?.auth===!1)return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:e(Y,{title:"当前服务器未启用设备认证",description:"服务端以 --no-auth 启动,无需配对设备令牌"})});if(!r){let d=i.status==="open"?"正在读取已配对设备…":"连接服务器后可查看";return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:e(Y,{title:"设备列表",description:d})})}if(r.length===0)return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:e(Y,{title:"暂无已配对设备"})});return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:r.map((d)=>e(Y,{title:n("span",{className:"flex items-center gap-2",children:[e("span",{className:"truncate",children:d.name}),(d.current||d.id===t.server.id)&&e("span",{className:"rounded-md bg-raised px-1.5 py-0.5 font-normal text-2xs text-dim",children:"当前设备"})]}),description:`最近活跃:${bt(d.lastSeen)} · 配对于 ${bt(d.created)}`,children:n(_,{size:"sm",variant:"danger-ghost",onClick:()=>t.onRevokeDevice(d),children:[e(xe,{className:"size-3.5"}),"吊销"]})},d.id))})}var Ne="浏览器设置(本地)",re="服务器设置(远程)",Kt=[{value:"appearance",group:Ne,label:"外观",icon:e(ka,{}),render:()=>e(tt,{})},{value:"notifications",group:Ne,label:"通知",icon:e(Qe,{}),render:()=>e(at,{})},{value:"connections",group:Ne,label:"连接列表",icon:e($e,{}),render:(t)=>e(ot,{...t})},{value:"shortcuts",group:Ne,label:"快捷键",icon:e(_a,{}),render:()=>e(lt,{})},{value:"models",group:re,label:"模型",icon:e(Ar,{}),render:(t)=>e(Mt,{...t})},{value:"plugins",group:re,label:"插件",icon:e(Ht,{}),render:(t)=>e($t,{conn:t.conn},t.server.id)},{value:"proxy",group:re,label:"代理",icon:e(Pe,{}),render:(t)=>e(Ft,{conn:t.conn},t.server.id)},{value:"database",group:re,label:"数据库",icon:e(Tr,{}),render:(t)=>e(xt,{conn:t.conn,server:t.server})},{value:"server",group:re,label:"服务器",icon:e(ut,{}),render:(t)=>e(Vt,{...t},t.server.id)},{value:"remote",group:re,label:"远程访问",icon:e(Ze,{}),render:(t)=>e(_t,{conn:t.conn},t.server.id)},{value:"devices",group:re,label:"已配对设备",icon:e(Kn,{}),render:(t)=>e(jt,{...t})}],Be=new WeakMap;function Qt(t){return t==="search"?"database":t??"appearance"}function cr(t){k();let[i,r]=a(()=>Qt(t.initialTab)),[d,y]=a(t.initialTab===void 0),M=o(null),B=o(!1);s(()=>{if(y(t.initialTab===void 0),t.initialTab===void 0)B.current=!1;if(M.current?.scrollTo({top:0}),t.initialTab)r(Qt(t.initialTab))},[t.initialTab]);let I=(f)=>{r(f),t.onTabChange?.(f)},h=le(t.conn.state),[g,c]=a(()=>Be.get(t.conn)??null),D=[];for(let f of h.plugins){if(f.status!=="enabled")continue;for(let W of f.web??[]){let N=W.view;if(W.kind!=="tab"||!N)continue;let T=W.id==="settings"?f.id:W.id;D.push({value:T,group:re,label:W.title,icon:Xc(W.icon),render:(A)=>e(ws,{pluginID:f.id,viewID:N,connection:A.conn},`${f.id}-${W.id}`)})}}let C=h.server?.localManagement===!0,E=[...Kt.slice(0,5),...D,...Kt.slice(5)].filter((f)=>C||f.value!=="remote"&&f.value!=="devices");s(()=>{let f=Be.get(t.conn)??null;if(c(f),!C||h.status!=="open"||h.server?.auth===!1)return;let W=!1;return t.conn.devices().then((N)=>{if(Be.set(t.conn,N),!W)c(N)}).catch(()=>{}),()=>{W=!0}},[t.conn,h.status,h.server?.auth,C]);let O=async(f)=>{if(!await Ge({title:`吊销设备「${f.name}」?`,description:"吊销后该设备的令牌立即失效,需重新配对才能连接此服务器。",action:"吊销",danger:!0}))return;try{await t.conn.revokeDevice(f.id),c((N)=>{let T=N?.filter((A)=>A.id!==f.id)??null;if(T)Be.set(t.conn,T);return T})}catch(N){z(N)}},L=E.find((f)=>f.value===i)??E[0],x={...t,devices:g,onRevokeDevice:(f)=>void O(f)};return e(yi,{className:"@container/settings",viewportClassName:"[scrollbar-gutter:stable]",viewportRef:M,children:n("div",{className:"mx-auto max-w-4xl animate-fade px-4 pt-3 pb-10 sm:px-6 md:pt-10 md:pb-16",children:[n("div",{className:"mb-6 flex min-h-10 items-center gap-1 md:mb-8",children:[!d&&e(G,{label:"返回设置分类",className:"-ml-2 size-10 rounded-full @min-[640px]/settings:hidden",onClick:()=>{if(B.current){B.current=!1,window.history.back();return}y(!0),t.onTabChange?.(void 0)},children:e(Xe,{className:"size-5"})}),n("h1",{className:"min-w-0 truncate text-xl font-semibold tracking-tight md:font-serif md:text-title md:font-normal",children:[e("span",{className:u(!d&&"@max-[640px]/settings:hidden"),children:"设置"}),!d&&e("span",{className:"@min-[640px]/settings:hidden",children:L?.label})]})]}),d&&e("nav",{"aria-label":"设置分类",className:"space-y-6 @min-[640px]/settings:hidden",children:[Ne,re].map((f)=>n("section",{children:[e("h2",{className:p("settings.groupTitle","mb-2.5 px-0.5"),children:f}),e("div",{className:p("settings.groupBox"),children:E.filter((W)=>W.group===f).map((W)=>n("button",{type:"button",onClick:()=>{r(W.value),y(!1),B.current=t.onTabChange!==void 0,t.onTabChange?.(W.value,!0)},className:"flex min-h-13 w-full items-center gap-3 px-4 text-left text-md text-ink transition-colors active:bg-raised [&_svg]:size-[18px] [&_svg]:shrink-0",children:[e("span",{className:"flex items-center text-dim",children:W.icon}),e("span",{className:"min-w-0 flex-1 truncate",children:W.label}),e(zt,{className:"text-faint"})]},W.value))})]},f))}),n("div",{className:u("flex items-start",d&&"@max-[640px]/settings:hidden"),children:[e("aside",{className:"settings-rail shrink-0",children:e("nav",{"aria-label":"设置分类",className:"flex w-48 flex-col gap-1",children:E.map((f,W)=>{let N=f.value===i,T=f.group&&(W===0||E[W-1]?.group!==f.group);return n(nt,{children:[T&&e("div",{className:u("px-2.5 pb-1 text-2xs font-medium tracking-wide text-faint",W>0&&"mt-3.5"),children:f.group}),n("button",{type:"button",onClick:()=>I(f.value),className:p("sidebar.navItem","px-2.5 text-ui",N?"bg-raised font-medium text-ink shadow-sheen":"text-dim hover:bg-raised/60 hover:text-ink"),children:[f.icon&&e("span",{className:u("relative flex items-center [&_svg]:size-4",N?"text-ink":"text-faint"),children:f.icon}),e("span",{className:"truncate",children:f.label})]})]},f.value)})})}),e("div",{className:"min-w-0 flex-1 animate-fade space-y-6 @container/panel",children:L?.render(x)},i)]})]})})}export{cr as Settings};
Binary file
Binary file
@@ -1,7 +0,0 @@
1
- import{t,i,Qe,F,A,q,W,N,M,P,R,I,O,D,ua,J,Z,ic}from"./chunk-sawc81kc.js";import"./chunk-07kt1zpn.js";import{xn}from"./chunk-6ew54553.js";import{Vt}from"./chunk-58xhn7ry.js";import{$n}from"./chunk-kvxmwmen.js";function vt(e,s,n){e=+e,s=+s,n=(o=arguments.length)<2?(s=e,e=0,1):o<3?1:+n;var a=-1,o=Math.max(0,Math.ceil((s-e)/n))|0,c=Array(o);while(++a<o)c[a]=e+a*n;return c}function xt(){var e=Vt().unknown(void 0),{domain:s,range:n}=e,a=0,o=1,c,l,f=!1,g=0,b=0,v=0.5;delete e.unknown;function _(){var w=s().length,H=o<a,z=H?o:a,V=H?a:o;if(c=(V-z)/Math.max(1,w-g+b*2),f)c=Math.floor(c);if(z+=(V-z-c*(w-g))*v,l=c*(1-g),f)z=Math.round(z),l=Math.round(l);var U=vt(w).map(function(it){return z+c*it});return n(H?U.reverse():U)}return e.domain=function(w){return arguments.length?(s(w),_()):s()},e.range=function(w){return arguments.length?([a,o]=w,a=+a,o=+o,_()):[a,o]},e.rangeRound=function(w){return[a,o]=w,a=+a,o=+o,f=!0,_()},e.bandwidth=function(){return l},e.step=function(){return c},e.round=function(w){return arguments.length?(f=!!w,_()):f},e.padding=function(w){return arguments.length?(g=Math.min(1,b=+w),_()):g},e.paddingInner=function(w){return arguments.length?(g=Math.min(1,w),_()):g},e.paddingOuter=function(w){return arguments.length?(b=+w,_()):b},e.align=function(w){return arguments.length?(v=Math.max(0,Math.min(1,w)),_()):v},e.copy=function(){return xt(s(),[a,o]).round(f).paddingInner(g).paddingOuter(b).align(v)},$n.apply(_(),arguments)}var Pt=function(){var e=t(function(K,h,u,x){for(u=u||{},x=K.length;x--;u[K[x]]=h);return u},"o"),s=[1,10,12,14,16,18,19,21,23],n=[2,6],a=[1,3],o=[1,5],c=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],g=[1,25],b=[1,26],v=[1,28],_=[1,29],w=[1,30],H=[1,31],z=[1,32],V=[1,33],U=[1,34],it=[1,35],nt=[1,36],k=[1,37],j=[1,43],d=[1,42],G=[1,47],Q=[1,50],S=[1,10,12,14,16,18,19,21,23,36,37,38],ot=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],X=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],gt=[1,65],E=[26,28],C={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:t(function(h,u,x,p,T,r,rt){var m=r.length-1;switch(T){case 5:p.setOrientation(r[m]);break;case 9:p.setDiagramTitle(r[m].text.trim());break;case 12:p.setLineData({text:"",type:"text"},r[m]);break;case 13:p.setLineData(r[m-1],r[m]);break;case 14:p.setBarData({text:"",type:"text"},r[m]);break;case 15:p.setBarData(r[m-1],r[m]);break;case 16:this.$=r[m].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=r[m].trim(),p.setAccDescription(this.$);break;case 19:this.$=r[m-1];break;case 20:case 30:this.$=[r[m-2],...r[m]];break;case 21:case 31:this.$=[r[m]];break;case 22:this.$={value:Number(r[m-1]),label:r[m]};break;case 23:this.$={value:Number(r[m]),label:""};break;case 24:p.setXAxisTitle(r[m]);break;case 25:p.setXAxisTitle(r[m-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(r[m]);break;case 28:p.setXAxisRangeData(Number(r[m-2]),Number(r[m]));break;case 29:this.$=r[m-1];break;case 32:p.setYAxisTitle(r[m]);break;case 33:p.setYAxisTitle(r[m-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(r[m-2]),Number(r[m]));break;case 39:this.$={text:r[m],type:"text"};break;case 40:this.$={text:r[m],type:"text"};break;case 41:this.$={text:r[m],type:"markdown"};break;case 42:this.$=r[m];break;case 43:this.$=r[m-1]+""+r[m];break}},"anonymous"),table:[e(s,n,{3:1,4:2,7:4,5:a,36:o,37:c,38:l}),{1:[3]},e(s,n,{4:2,7:4,3:8,5:a,36:o,37:c,38:l}),e(s,n,{4:2,7:4,6:9,3:10,5:a,8:[1,11],36:o,37:c,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(f,[2,36]),e(f,[2,37]),e(f,[2,38]),{1:[2,1]},e(s,n,{4:2,7:4,3:21,5:a,36:o,37:c,38:l}),{1:[2,3]},e(f,[2,5]),e(s,[2,7],{4:22,36:o,37:c,38:l}),{11:23,30:g,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},{11:39,13:38,24:j,29:d,30:g,31:40,32:41,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},{11:45,15:44,29:G,30:g,35:46,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},{11:49,17:48,24:Q,30:g,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},{11:52,17:51,24:Q,30:g,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(ot,[2,39],{41:55,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k}),e(ot,[2,40]),e(ot,[2,41]),e(X,[2,42]),e(X,[2,44]),e(X,[2,45]),e(X,[2,46]),e(X,[2,47]),e(X,[2,48]),e(X,[2,49]),e(X,[2,50]),e(X,[2,51]),e(X,[2,52]),e(X,[2,53]),e(S,[2,10]),e(S,[2,24],{32:41,31:56,24:j,29:d}),e(S,[2,26]),e(S,[2,27]),{33:[1,57]},{11:59,30:g,34:58,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},e(S,[2,11]),e(S,[2,32],{35:60,29:G}),e(S,[2,34]),{33:[1,61]},e(S,[2,12]),{17:62,24:Q},{25:63,27:64,29:gt},e(S,[2,14]),{17:66,24:Q},e(S,[2,16]),e(S,[2,17]),e(X,[2,43]),e(S,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(S,[2,33]),{29:[1,70]},e(S,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(E,[2,23],{30:[1,73]}),e(S,[2,15]),e(S,[2,28]),e(S,[2,29]),{11:59,30:g,34:74,39:24,40:b,41:27,42:v,43:_,44:w,45:H,46:z,47:V,48:U,49:it,50:nt,51:k},e(S,[2,35]),e(S,[2,19]),{25:75,27:64,29:gt},e(E,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:t(function(h,u){if(u.recoverable)this.trace(h);else{var x=Error(h);throw x.hash=u,x}},"parseError"),parse:t(function(h){var u=this,x=[0],p=[],T=[null],r=[],rt=this.table,m="",bt=0,Nt=0,Ht=0,xe=2,$t=1,fe=r.slice.call(arguments,1),B=Object.create(this.lexer),ht={yy:{}};for(var St in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,St))ht.yy[St]=this.yy[St];if(B.setInput(h,ht.yy),ht.yy.lexer=B,ht.yy.parser=this,typeof B.yylloc>"u")B.yylloc={};var Rt=B.yylloc;r.push(Rt);var pe=B.options&&B.options.ranges;if(typeof ht.yy.parseError==="function")this.parseError=ht.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(et){x.length=x.length-2*et,T.length=T.length-et,r.length=r.length-et}t(me,"popStack");function Ut(){var et=p.pop()||B.lex()||$t;if(typeof et!=="number"){if(et instanceof Array)p=et,et=p.pop();et=u.symbols_[et]||et}return et}t(Ut,"lex");var Y,_t,lt,tt,Be,Tt,ut={},yt,at,qt,wt;while(!0){if(lt=x[x.length-1],this.defaultActions[lt])tt=this.defaultActions[lt];else{if(Y===null||typeof Y>"u")Y=Ut();tt=rt[lt]&&rt[lt][Y]}if(typeof tt>"u"||!tt.length||!tt[0]){var Dt="";wt=[];for(yt in rt[lt])if(this.terminals_[yt]&&yt>xe)wt.push("'"+this.terminals_[yt]+"'");if(B.showPosition)Dt="Parse error on line "+(bt+1)+`:
2
- `+B.showPosition()+`
3
- Expecting `+wt.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'";else Dt="Parse error on line "+(bt+1)+": Unexpected "+(Y==$t?"end of input":"'"+(this.terminals_[Y]||Y)+"'");this.parseError(Dt,{text:B.match,token:this.terminals_[Y]||Y,line:B.yylineno,loc:Rt,expected:wt})}if(tt[0]instanceof Array&&tt.length>1)throw Error("Parse Error: multiple actions possible at state: "+lt+", token: "+Y);switch(tt[0]){case 1:if(x.push(Y),T.push(B.yytext),r.push(B.yylloc),x.push(tt[1]),Y=null,!_t){if(Nt=B.yyleng,m=B.yytext,bt=B.yylineno,Rt=B.yylloc,Ht>0)Ht--}else Y=_t,_t=null;break;case 2:if(at=this.productions_[tt[1]][1],ut.$=T[T.length-at],ut._$={first_line:r[r.length-(at||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(at||1)].first_column,last_column:r[r.length-1].last_column},pe)ut._$.range=[r[r.length-(at||1)].range[0],r[r.length-1].range[1]];if(Tt=this.performAction.apply(ut,[m,Nt,bt,ht.yy,tt[1],T,r].concat(fe)),typeof Tt<"u")return Tt;if(at)x=x.slice(0,-1*at*2),T=T.slice(0,-1*at),r=r.slice(0,-1*at);x.push(this.productions_[tt[1]][0]),T.push(ut.$),r.push(ut._$),qt=rt[x[x.length-2]][x[x.length-1]],x.push(qt);break;case 3:return!0}}return!0},"parse")},st=function(){var K={EOF:1,parseError:t(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw Error(u)},"parseError"),setInput:t(function(h,u){if(this.yy=u||this.yy||{},this._input=h,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 h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);if(u)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),h},"input"),unput:t(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var p=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),x.length-1)this.yylineno-=x.length-1;var T=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:x?(x.length===p.length?this.yylloc.first_column:0)+p[p.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges)this.yylloc.range=[T[0],T[0]+this.yyleng-u];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
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(h){this.unput(this.match.slice(h))},"less"),pastInput:t(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var h=this.match;if(h.length<20)h+=this._input.substr(0,20-h.length);return(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var h=this.pastInput(),u=Array(h.length+1).join("-");return h+this.upcomingInput()+`
5
- `+u+"^"},"showPosition"),test_match:t(function(h,u){var x,p,T;if(this.options.backtrack_lexer){if(T={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)T.yylloc.range=this.yylloc.range.slice(0)}if(p=h[0].match(/(?:\r\n?|\n).*/g),p)this.yylineno+=p.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],x=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(x)return x;else if(this._backtrack){for(var r in T)this[r]=T[r];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var h,u,x,p;if(!this._more)this.yytext="",this.match="";var T=this._currentRules();for(var r=0;r<T.length;r++)if(x=this._input.match(this.rules[T[r]]),x&&(!u||x[0].length>u[0].length)){if(u=x,p=r,this.options.backtrack_lexer)if(h=this.test_match(x,T[r]),h!==!1)return h;else if(this._backtrack){u=!1;continue}else return!1;else if(!this.options.flex)break}if(u){if(h=this.test_match(u,T[p]),h!==!1)return h;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 u=this.next();if(u)return u;else return this.lex()},"lex"),begin:t(function(u){this.conditionStack.push(u)},"begin"),popState:t(function(){var u=this.conditionStack.length-1;if(u>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(u){if(u=this.conditionStack.length-1-Math.abs(u||0),u>=0)return this.conditionStack[u];else return"INITIAL"},"topState"),pushState:t(function(u){this.begin(u)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(u,x,p,T){var r=T;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return K}();C.lexer=st;function L(){this.yy={}}return t(L,"Parser"),L.prototype=C,C.Parser=L,new L}();Pt.parser=Pt;var be=Pt;function kt(e){return e.type==="bar"}t(kt,"isBarPlot");function At(e){return e.type==="band"}t(At,"isBandAxisData");function dt(e){return e.type==="linear"}t(dt,"isLinearAxisData");var It=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,s){if(!this.parentGroup)return{width:e.reduce((g,b)=>Math.max(b.length,g),0)*s,height:s};let n={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",s),o=a.node()?.getScreenCTM?.(),c=t((g)=>g&&g>0?g:1,"toScale"),l=c(o?.a),f=c(o?.d);for(let g of e){let b=ic(a,1,g),v=b?b.width/l:g.length*s,_=b?b.height/f:s;n.width=Math.max(n.width,v),n.height=Math.max(n.height,_)}return a.remove(),n}},Gt=0.7,jt=0.2,Qt=class{constructor(e,s,n,a){this.axisConfig=e,this.title=s,this.textDimensionCalculator=n,this.axisThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else this.boundingRect.width=e[1]-e[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e)=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(Gt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Gt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let s=e.height;if(this.axisConfig.showAxisLine&&s>this.axisConfig.axisLineWidth)s-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let n=this.getLabelDimension(),a=jt*e.width;this.outerPadding=Math.min(n.width/2,a);let o=n.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)o=Math.max(o,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height));if(o+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,o<=s)s-=o,this.showLabel=!0}if(this.axisConfig.showTick&&s>=this.axisConfig.tickLength)this.showTick=!0,s-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=n.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=n.height,a<=s)s-=a,this.showTitle=!0}this.boundingRect.width=e.width,this.boundingRect.height=e.height-s}calculateSpaceIfDrawnVertical(e){let s=e.width;if(this.axisConfig.showAxisLine&&s>this.axisConfig.axisLineWidth)s-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let n=this.getLabelDimension(),a=jt*e.height;this.outerPadding=Math.min(n.height/2,a);let o=n.width+this.axisConfig.labelPadding*2;if(o<=s)s-=o,this.showLabel=!0}if(this.axisConfig.showTick&&s>=this.axisConfig.tickLength)this.showTick=!0,s-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=n.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=n.height,a<=s)s-=a,this.showTitle=!0}this.boundingRect.width=e.width-s,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let s=this.normalizedLabelRotationInRad;if(s===0)return 0;return Math.sin(s)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let s=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${s},${this.boundingRect.y} L ${s},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((s)=>({text:s.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(s),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let s=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((n)=>({path:`M ${s},${this.getScaleValue(n)} L ${s-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let s=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${s} L ${this.boundingRect.x+this.boundingRect.width},${s}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((s)=>({text:s.toString(),x:this.getScaleValue(s)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let s=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((n)=>({path:`M ${this.getScaleValue(n)},${s} L ${this.getScaleValue(n)},${s+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let s=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${s} L ${this.boundingRect.x+this.boundingRect.width},${s}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((s)=>({text:s.toString(),x:this.getScaleValue(s),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))});if(this.showTick){let s=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((n)=>({path:`M ${this.getScaleValue(n)},${s+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${s+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]});return e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},ye=class extends Qt{static{t(this,"BandAxis")}constructor(e,s,n,a,o){super(e,a,o,s);this.categories=n,this.scale=xt().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=xt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),i.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},we=class extends Qt{static{t(this,"LinearAxis")}constructor(e,s,n,a,o){super(e,a,o,s);this.domain=n,this.scale=xn().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=xn().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Lt(e,s,n,a){let o=new It(a);if(At(e))return new ye(s,n,e.categories,e.title,o);return new we(s,n,[e.min,e.max],e.title,o)}t(Lt,"getAxis");var ke=class{constructor(e,s,n,a){this.textDimensionCalculator=e,this.chartConfig=s,this.chartData=n,this.chartThemeConfig=a,this.titleWidth=0,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let s=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(s.width,e.width),a=s.height+2*this.chartConfig.titlePadding;if(a<=e.height&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=n,this.boundingRect.height=a,this.titleWidth=s.width,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}alignTo(e,s){let n=Math.min(this.titleWidth,this.chartConfig.width)/2,a=Math.min(Math.max((e+s)/2,n),this.chartConfig.width-n);this.boundingRect.x=a-n,this.boundingRect.width=n*2}getDrawableElements(){let e=[];if(this.showChartTitle)e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]});return e}};function Kt(e,s,n,a){let o=new It(a);return new ke(o,e,s,n)}t(Kt,"getChartTitleComponent");var Ae=0.75,Ce=0.5,Se=0.35;function Et(e){return{fontSize:e,markerSize:e*Ae,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Et,"getLegendLayout");var Re=class{constructor(e,s,n,a){this.textDimensionCalculator=e,this.chartConfig=s,this.chartData=n,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((g)=>g.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:s,markerSize:n,markerSpacing:a,itemSpacing:o}=Et(this.chartConfig.legendFontSize),c=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((g)=>g.title),s),l=this.chartConfig.legendPadding*2+n+a+c.width,f=this.chartConfig.legendPadding*2+this.visiblePlots.length*s+(this.visiblePlots.length-1)*o;if(l<=e.width&&f<=e.height)this.boundingRect.width=l,this.boundingRect.height=f;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:s,markerSpacing:n,itemSpacing:a}=Et(this.chartConfig.legendFontSize),o=e+a,c=this.boundingRect.x+this.chartConfig.legendPadding,l=this.boundingRect.y+this.chartConfig.legendPadding,f=[],g=[];for(let[b,v]of this.visiblePlots.entries())if(kt(v))f.push({x:c,y:l+b*o,width:s,height:s,fill:v.fill,strokeFill:v.fill,strokeWidth:0});else{let _=l+b*o+s/2;g.push({path:`M ${c},${_} L ${c+s},${_}`,strokeFill:v.strokeFill,strokeWidth:v.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:f},{groupTexts:["legend","markers"],type:"path",data:g},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((b,v)=>({text:b.title,x:c+s+n,y:l+v*o+s/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function Zt(e,s,n,a){let o=new It(a);return new Re(o,e,s,n)}t(Zt,"getChartLegendComponent");var _e=class{constructor(e,s,n,a,o){this.plotData=e,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=o}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),s;if(this.orientation==="horizontal")s=ua().y((a)=>a[0]).x((a)=>a[1])(e);else s=ua().x((a)=>a[0]).y((a)=>a[1])(e);if(!s)return[];let n=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:s,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let c=[];for(let[l,[f,g]]of e.entries()){let b=this.plotData.pointLabels[l];if(!b)continue;if(this.orientation==="horizontal")c.push({x:g+10,y:f,text:b,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else c.push({x:f,y:g-10,text:b,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(c.length>0)n.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:c})}return n}},Te=class{constructor(e,s,n,a,o,c){this.barData=e,this.boundingRect=s,this.xAxis=n,this.yAxis=a,this.orientation=o,this.plotIndex=c}static{t(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map((o)=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=0.05,n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,a=n/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((o)=>({x:this.boundingRect.x,y:o[0]-a,height:n,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((o)=>({x:o[0]-a,y:o[1],width:n,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},De=class{constructor(e,s,n){this.chartConfig=e,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,s){this.xAxis=e,this.yAxis=s}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[s,n]of this.chartData.plots.entries())switch(n.type){case"line":{let a=new _e(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,s);e.push(...a.getDrawableElement())}break;case"bar":{let a=new Te(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,s);e.push(...a.getDrawableElement())}break}return e}};function Jt(e,s,n){return new De(e,s,n)}t(Jt,"getPlotComponent");var ve=class{constructor(e,s,n,a){this.chartConfig=e,this.chartData=s,this.componentStore={title:Kt(e,s,n,a),plot:Jt(e,s,n),legend:Zt(e,s,n,a),xAxis:Lt(s.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},a),yAxis:Lt(s.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},a)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,s=this.chartConfig.height,n=0,a=0,o={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(s*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:l});if(e-=f.width,s-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:s}),a=f.height,s-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:e,height:s}),s-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:e,height:s}),n=f.width,e-=f.width,o=this.componentStore.legend.calculateSpace({width:e,height:l}),e-=o.width,e>0)c+=e,e=0;if(s>0)l+=s,s=0;if(this.componentStore.plot.calculateSpace({width:c,height:l}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.title.alignTo(n,n+c),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((l-o.height)/2,0)}),this.componentStore.xAxis.setRange([n,n+c]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:a+l}),this.componentStore.yAxis.setRange([a,a+l]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((g)=>kt(g)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,s=this.chartConfig.height,n=0,a=0,o=0,c={width:0,height:0},l=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(s*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:l,height:f});if(e-=g.width,s-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:s}),n=g.height,s-=g.height,this.componentStore.xAxis.setAxisPosition("left"),g=this.componentStore.xAxis.calculateSpace({width:e,height:s}),e-=g.width,a=g.width,this.componentStore.yAxis.setAxisPosition("top"),g=this.componentStore.yAxis.calculateSpace({width:e,height:s}),s-=g.height,o=n+g.height,c=this.componentStore.legend.calculateSpace({width:e,height:f}),e-=c.width,e>0)l+=e,e=0;if(s>0)f+=s,s=0;if(this.componentStore.plot.calculateSpace({width:l,height:f}),this.componentStore.plot.setBoundingBoxXY({x:a,y:o}),this.componentStore.title.alignTo(a,a+l),this.componentStore.legend.setBoundingBoxXY({x:a+l,y:o+Math.max((f-c.height)/2,0)}),this.componentStore.yAxis.setRange([a,a+l]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:n}),this.componentStore.xAxis.setRange([o,o+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some((b)=>kt(b)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let s of Object.values(this.componentStore))e.push(...s.getDrawableElements());return e}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,s,n,a){return new ve(e,s,n,a).getDrawableElement()}},ft=0,te,pt=Ot(),mt=zt(),y=Wt(),Mt=mt.plotColorPalette.split(",").map((e)=>e.trim()),Ct=!1,Bt=!1;function zt(){let e=Qe(),s=A();return Z(e.xyChart,s.themeVariables.xyChart)}t(zt,"getChartDefaultThemeConfig");function Ot(){let e=A();return Z(F.xyChart,e.xyChart)}t(Ot,"getChartDefaultConfig");function Wt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Wt,"getChartDefaultData");function ct(e){let s=A();return q(e.trim(),s)}t(ct,"textSanitizer");function ee(e){te=e}t(ee,"setTmpSVGG");function ie(e){if(e==="horizontal")pt.chartOrientation="horizontal";else pt.chartOrientation="vertical"}t(ie,"setOrientation");function se(e){y.xAxis.title=ct(e.text)}t(se,"setXAxisTitle");function Ft(e,s){y.xAxis={type:"linear",title:y.xAxis.title,min:e,max:s},Ct=!0}t(Ft,"setXAxisRangeData");function ne(e){y.xAxis={type:"band",title:y.xAxis.title,categories:e.map((s)=>ct(s.text))},Ct=!0}t(ne,"setXAxisBand");function ae(e){y.yAxis.title=ct(e.text)}t(ae,"setYAxisTitle");function oe(e,s){y.yAxis={type:"linear",title:y.yAxis.title,min:e,max:s},Bt=!0}t(oe,"setYAxisRangeData");function re(e){let s=Math.min(...e),n=Math.max(...e),a=dt(y.yAxis)?y.yAxis.min:1/0,o=dt(y.yAxis)?y.yAxis.max:-1/0;y.yAxis={type:"linear",title:y.yAxis.title,min:Math.min(a,s),max:Math.max(o,n)}}t(re,"setYAxisRangeFromPlotData");function Xt(e){let s=[];if(e.length===0)return s;if(!Ct){let n=dt(y.xAxis)?y.xAxis.min:1/0,a=dt(y.xAxis)?y.xAxis.max:-1/0;Ft(Math.min(n,1),Math.max(a,e.length))}if(At(y.xAxis)&&e.length>y.xAxis.categories.length)e=e.slice(0,y.xAxis.categories.length);if(!Bt)re(e);if(At(y.xAxis))s=y.xAxis.categories.map((n,a)=>[n,e[a]]);if(dt(y.xAxis)){let n=y.xAxis.min,a=y.xAxis.max;if(e.length===1)s=[[`${n}`,e[0]]];else{let o=(a-n)/(e.length-1);s=e.map((c,l)=>[`${n+l*o}`,c])}}return s}t(Xt,"transformDataWithoutCategory");function Yt(e){return Mt[e===0?0:e%Mt.length]}t(Yt,"getPlotColorFromPalette");function he(e,s){let n=s.map((l)=>l.value),a=s.map((l)=>l.label?ct(l.label):""),o=Xt(n),c=a.some((l)=>l!=="");y.plots.push({type:"line",title:ct(e.text),strokeFill:Yt(ft),strokeWidth:2,data:o,...c?{pointLabels:a}:{}}),ft++}t(he,"setLineData");function le(e,s){let n=s.map((o)=>o.value),a=Xt(n);y.plots.push({type:"bar",title:ct(e.text),fill:Yt(ft),data:a}),ft++}t(le,"setBarData");function ce(){if(y.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return y.title=D(),Pe.build(pt,y,mt,te)}t(ce,"getDrawableElem");function ge(){return mt}t(ge,"getChartThemeConfig");function ue(){return pt}t(ue,"getChartConfig");function de(){return y}t(de,"getXYChartData");var Le=t(function(){N(),ft=0,pt=Ot(),y=Wt(),mt=zt(),Mt=mt.plotColorPalette.split(",").map((e)=>e.trim()),Ct=!1,Bt=!1},"clear"),Ee={getDrawableElem:ce,clear:Le,setAccTitle:M,getAccTitle:P,setDiagramTitle:O,getDiagramTitle:D,getAccDescription:I,setAccDescription:R,setOrientation:ie,setXAxisTitle:se,setXAxisRangeData:Ft,setXAxisBand:ne,setYAxisTitle:ae,setYAxisRangeData:oe,setLineData:he,setBarData:le,setTmpSVGG:ee,getChartThemeConfig:ge,getChartConfig:ue,getXYChartData:de},Me=t((e,s,n,a)=>{let o=a.db,c=o.getChartThemeConfig(),l=o.getChartConfig(),f=o.getXYChartData().plots[0].data.map((k)=>k[1]);function g(k){return k==="top"?"text-before-edge":"middle"}t(g,"getDominantBaseLine");function b(k){return k==="left"?"start":k==="right"?"end":"middle"}t(b,"getTextAnchor");function v(k){return`translate(${k.x}, ${k.y}) rotate(${k.rotation||0})`}t(v,"getTextTransformation"),i.debug(`Rendering xychart chart
7
- `+e);let _=J(s),w=_.append("g").attr("class","main"),H=w.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");W(_,l.height,l.width,!0),_.attr("viewBox",`0 0 ${l.width} ${l.height}`),H.attr("fill",c.backgroundColor),o.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));let z=o.getDrawableElem(),V={};function U(k){let j=w,d="";for(let[G]of k.entries()){let Q=w;if(G>0&&V[d])Q=V[d];if(d+=k[G],j=V[d],!j)j=V[d]=Q.append("g").attr("class",k[G])}return j}t(U,"getGroup");for(let k of z){if(k.data.length===0)continue;let j=U(k.groupTexts);switch(k.type){case"rect":if(j.selectAll("rect").data(k.data).enter().append("rect").attr("x",(d)=>d.x).attr("y",(d)=>d.y).attr("width",(d)=>d.width).attr("height",(d)=>d.height).attr("fill",(d)=>d.fill).attr("stroke",(d)=>d.strokeFill).attr("stroke-width",(d)=>d.strokeWidth),l.showDataLabel){let d=l.showDataLabelOutsideBar;if(l.chartOrientation==="horizontal"){let G=function(C,st){let{data:L,label:K}=C;return st*K.length*Q<=L.width-S};var it=G;t(G,"fitsHorizontally");let Q=0.7,S=10,ot=k.data.map((C,st)=>({data:C,label:f[st].toString()})).filter((C)=>C.data.width>0&&C.data.height>0),X=ot.map((C)=>{let{data:st}=C,L=st.height*0.7;while(!G(C,L)&&L>0)L-=1;return L}),gt=Math.floor(Math.min(...X)),E=t((C)=>{if(d)return C.data.x+C.data.width+S;else return C.data.x+C.data.width-S},"determineLabelXPosition");j.selectAll("text").data(ot).enter().append("text").attr("x",E).attr("y",(C)=>C.data.y+C.data.height/2).attr("text-anchor",d?"start":"end").attr("dominant-baseline","middle").attr("fill",c.dataLabelColor).attr("font-size",`${gt}px`).text((C)=>C.label)}else{let G=function(E,C,st){let{data:L,label:K}=E,h=0.7,u=C*K.length*0.7,x=L.x+L.width/2,p=x-u/2,T=x+u/2,r=p>=L.x&&T<=L.x+L.width,rt=L.y+st+C<=L.y+L.height;return r&&rt};var nt=G;t(G,"fitsInBar");let Q=10,S=k.data.map((E,C)=>({data:E,label:f[C].toString()})).filter((E)=>E.data.width>0&&E.data.height>0),ot=S.map((E)=>{let{data:C,label:st}=E,L=C.width/(st.length*0.7);while(!G(E,L,Q)&&L>0)L-=1;return L}),X=Math.floor(Math.min(...ot)),gt=t((E)=>{if(d)return E.data.y-Q;else return E.data.y+Q},"determineLabelYPosition");j.selectAll("text").data(S).enter().append("text").attr("x",(E)=>E.data.x+E.data.width/2).attr("y",gt).attr("text-anchor","middle").attr("dominant-baseline",d?"auto":"hanging").attr("fill",c.dataLabelColor).attr("font-size",`${X}px`).text((E)=>E.label)}}break;case"text":j.selectAll("text").data(k.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(d)=>d.fill).attr("font-size",(d)=>d.fontSize).attr("dominant-baseline",(d)=>g(d.verticalPos)).attr("text-anchor",(d)=>b(d.horizontalPos)).attr("transform",(d)=>v(d)).text((d)=>d.text);break;case"path":j.selectAll("path").data(k.data).enter().append("path").attr("d",(d)=>d.path).attr("fill",(d)=>d.fill?d.fill:"none").attr("stroke",(d)=>d.strokeFill).attr("stroke-width",(d)=>d.strokeWidth);break}}},"draw"),Ie={draw:Me},Ze={parser:be,db:Ee,renderer:Ie};export{Ze as diagram};
Binary file
Binary file
@@ -1,2 +0,0 @@
1
- import{e,n,b,Oe}from"./chunk-6f1q0tjv.js";function wi(a){let t=a.filter((l)=>l.closedAt===null);if(!t.length)return[];return[{label:"项目",options:t.map((l)=>({value:l.id,label:l.name,description:l.directory}))}]}function ki(a){let{Input:t}=b();return n("div",{className:"relative mb-3 min-w-0",children:[e(Oe,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),e(t,{type:"search","aria-label":a.label,placeholder:a.placeholder,value:a.value,onChange:(l)=>a.onChange(l.target.value),className:"h-10 min-w-0 pl-9"})]})}function Ci(){return e("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2].map((a)=>n("div",{className:"h-16 space-y-2 px-4 py-3",children:[e("div",{className:"h-3 w-24 animate-pulse rounded bg-raised"}),e("div",{className:"h-3 w-2/3 animate-pulse rounded bg-raised"})]},a))})}
2
- export{wi,ki,Ci};
Binary file
Binary file