@bkm016/basalt 0.1.16 → 0.1.17

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 (534) hide show
  1. package/{chunk-9ymm1gge.js → chunk-9jtvj8md.js} +202 -202
  2. package/compiled.js +1 -1
  3. package/package.json +1 -1
  4. package/web/{chunk-75meb0dh.js → chunk-013et20n.js} +2 -2
  5. package/web/chunk-013et20n.js.br +0 -0
  6. package/web/chunk-013et20n.js.gz +0 -0
  7. package/web/chunk-0ernj3c0.js +1 -0
  8. package/web/chunk-0ernj3c0.js.br +0 -0
  9. package/web/chunk-0ernj3c0.js.gz +0 -0
  10. package/web/chunk-0j65yg1p.js +1 -0
  11. package/web/chunk-0j65yg1p.js.br +0 -0
  12. package/web/chunk-0j65yg1p.js.gz +0 -0
  13. package/web/chunk-0khcpaa8.js +1 -0
  14. package/web/chunk-0khcpaa8.js.br +0 -0
  15. package/web/chunk-0khcpaa8.js.gz +0 -0
  16. package/web/chunk-0wbdd74r.js +1 -0
  17. package/web/chunk-0wbdd74r.js.br +2 -0
  18. package/web/chunk-0wbdd74r.js.gz +0 -0
  19. package/web/chunk-1f2wvhq9.js +1 -0
  20. package/web/chunk-1f2wvhq9.js.br +0 -0
  21. package/web/chunk-1f2wvhq9.js.gz +0 -0
  22. package/web/{chunk-75kzvpf3.js → chunk-1q2kmv35.js} +18 -18
  23. package/web/chunk-1q2kmv35.js.br +0 -0
  24. package/web/chunk-1q2kmv35.js.gz +0 -0
  25. package/web/{chunk-36e78034.js → chunk-1tfrm3pk.js} +2 -2
  26. package/web/chunk-1tfrm3pk.js.br +0 -0
  27. package/web/chunk-1tfrm3pk.js.gz +0 -0
  28. package/web/chunk-2qt5fy5n.js +1 -0
  29. package/web/chunk-2qt5fy5n.js.br +0 -0
  30. package/web/chunk-2qt5fy5n.js.gz +0 -0
  31. package/web/chunk-2sxtb709.js +1 -0
  32. package/web/chunk-2sxtb709.js.br +0 -0
  33. package/web/chunk-2sxtb709.js.gz +0 -0
  34. package/web/chunk-2wrwm0qe.js +1 -0
  35. package/web/chunk-2wrwm0qe.js.br +0 -0
  36. package/web/chunk-2wrwm0qe.js.gz +0 -0
  37. package/web/{chunk-5sss3r97.js → chunk-2wwj27b9.js} +3 -3
  38. package/web/chunk-2wwj27b9.js.br +0 -0
  39. package/web/chunk-2wwj27b9.js.gz +0 -0
  40. package/web/chunk-33mmrjdp.js +1 -0
  41. package/web/chunk-33mmrjdp.js.br +2 -0
  42. package/web/chunk-33mmrjdp.js.gz +0 -0
  43. package/web/chunk-33tb7q04.js +2 -0
  44. package/web/chunk-33tb7q04.js.br +0 -0
  45. package/web/chunk-33tb7q04.js.gz +0 -0
  46. package/web/chunk-3txb4sha.js +1 -0
  47. package/web/chunk-3txb4sha.js.br +0 -0
  48. package/web/chunk-3txb4sha.js.gz +0 -0
  49. package/web/{chunk-n3f5a91k.js → chunk-3xgfsx7y.js} +2 -2
  50. package/web/chunk-3xgfsx7y.js.br +0 -0
  51. package/web/chunk-3xgfsx7y.js.gz +0 -0
  52. package/web/chunk-40jka4r7.js +2 -0
  53. package/web/chunk-40jka4r7.js.br +0 -0
  54. package/web/chunk-40jka4r7.js.gz +0 -0
  55. package/web/{chunk-mcm3t5wr.js → chunk-41vh5n86.js} +1 -1
  56. package/web/chunk-41vh5n86.js.br +0 -0
  57. package/web/chunk-41vh5n86.js.gz +0 -0
  58. package/web/chunk-4wd9r73y.js.br +0 -0
  59. package/web/chunk-4wd9r73y.js.gz +0 -0
  60. package/web/chunk-5kz048x3.js +2 -0
  61. package/web/chunk-5kz048x3.js.br +0 -0
  62. package/web/chunk-5kz048x3.js.gz +0 -0
  63. package/web/chunk-5mbz8yj9.js +3 -0
  64. package/web/chunk-5mbz8yj9.js.br +0 -0
  65. package/web/chunk-5mbz8yj9.js.gz +0 -0
  66. package/web/chunk-6024wfxb.js +30 -0
  67. package/web/chunk-6024wfxb.js.br +0 -0
  68. package/web/chunk-6024wfxb.js.gz +0 -0
  69. package/web/chunk-6ey4c6gw.js +2 -0
  70. package/web/chunk-6ey4c6gw.js.br +0 -0
  71. package/web/chunk-6ey4c6gw.js.gz +0 -0
  72. package/web/chunk-6q3p851n.js +1 -0
  73. package/web/chunk-6q3p851n.js.br +2 -0
  74. package/web/chunk-6q3p851n.js.gz +0 -0
  75. package/web/{chunk-qbhv18t0.js → chunk-74g3wh08.js} +2 -2
  76. package/web/chunk-74g3wh08.js.br +0 -0
  77. package/web/chunk-74g3wh08.js.gz +0 -0
  78. package/web/{chunk-vcnsvj49.js → chunk-78akzkgs.js} +14 -14
  79. package/web/chunk-78akzkgs.js.br +0 -0
  80. package/web/chunk-78akzkgs.js.gz +0 -0
  81. package/web/chunk-7ck99bsp.js +62 -0
  82. package/web/chunk-7ck99bsp.js.br +0 -0
  83. package/web/chunk-7ck99bsp.js.gz +0 -0
  84. package/web/chunk-7fjbyns9.js +1 -0
  85. package/web/chunk-7fjbyns9.js.br +0 -0
  86. package/web/chunk-7fjbyns9.js.gz +0 -0
  87. package/web/chunk-7n6b2xra.js +21 -0
  88. package/web/chunk-7n6b2xra.js.br +0 -0
  89. package/web/chunk-7n6b2xra.js.gz +0 -0
  90. package/web/chunk-7p4mcqkd.js +78 -0
  91. package/web/chunk-7p4mcqkd.js.br +0 -0
  92. package/web/chunk-7p4mcqkd.js.gz +0 -0
  93. package/web/chunk-7ztwkhg5.js +1 -0
  94. package/web/chunk-7ztwkhg5.js.br +0 -0
  95. package/web/chunk-7ztwkhg5.js.gz +0 -0
  96. package/web/{chunk-t89tfrpj.js → chunk-823etvc3.js} +19 -19
  97. package/web/chunk-823etvc3.js.br +0 -0
  98. package/web/chunk-823etvc3.js.gz +0 -0
  99. package/web/{chunk-ps489yjy.js → chunk-8ec53vjd.js} +1 -1
  100. package/web/chunk-8ec53vjd.js.br +0 -0
  101. package/web/chunk-8ec53vjd.js.gz +0 -0
  102. package/web/chunk-8g239029.js.br +0 -0
  103. package/web/chunk-8g239029.js.gz +0 -0
  104. package/web/{chunk-p0jghn6b.js → chunk-8g55ytgz.js} +1 -1
  105. package/web/chunk-8g55ytgz.js.br +0 -0
  106. package/web/chunk-8g55ytgz.js.gz +0 -0
  107. package/web/chunk-8nxjthxc.js +1 -0
  108. package/web/chunk-8nxjthxc.js.br +0 -0
  109. package/web/chunk-8nxjthxc.js.gz +0 -0
  110. package/web/chunk-8q76yd76.js +291 -0
  111. package/web/chunk-8q76yd76.js.br +0 -0
  112. package/web/chunk-8q76yd76.js.gz +0 -0
  113. package/web/chunk-9kbrjmtz.js +1 -0
  114. package/web/chunk-9kbrjmtz.js.br +0 -0
  115. package/web/chunk-9kbrjmtz.js.gz +0 -0
  116. package/web/chunk-9s4bh6qm.js +40 -0
  117. package/web/chunk-9s4bh6qm.js.br +0 -0
  118. package/web/chunk-9s4bh6qm.js.gz +0 -0
  119. package/web/chunk-9v1f6yc8.js.br +0 -0
  120. package/web/chunk-9v1f6yc8.js.gz +0 -0
  121. package/web/{chunk-a205cj09.js → chunk-9vf3zy3d.js} +2 -2
  122. package/web/chunk-9vf3zy3d.js.br +0 -0
  123. package/web/chunk-9vf3zy3d.js.gz +0 -0
  124. package/web/{chunk-ef03t1mb.js → chunk-a449xjq6.js} +6 -6
  125. package/web/chunk-a449xjq6.js.br +0 -0
  126. package/web/chunk-a449xjq6.js.gz +0 -0
  127. package/web/chunk-ad6x47yy.js.br +0 -0
  128. package/web/chunk-ad6x47yy.js.gz +0 -0
  129. package/web/chunk-b05eay33.js +1 -0
  130. package/web/chunk-b05eay33.js.br +0 -0
  131. package/web/chunk-b05eay33.js.gz +0 -0
  132. package/web/{chunk-tfsrk2rc.js → chunk-bdypt5mj.js} +55 -55
  133. package/web/chunk-bdypt5mj.js.br +0 -0
  134. package/web/chunk-bdypt5mj.js.gz +0 -0
  135. package/web/chunk-bvyjy17t.js +14 -0
  136. package/web/chunk-bvyjy17t.js.br +0 -0
  137. package/web/chunk-bvyjy17t.js.gz +0 -0
  138. package/web/{chunk-ctmxm4qd.js → chunk-ccy2q2z0.js} +2 -2
  139. package/web/chunk-ccy2q2z0.js.br +0 -0
  140. package/web/chunk-ccy2q2z0.js.gz +0 -0
  141. package/web/{chunk-wvt76598.js → chunk-ceg13tma.js} +2 -2
  142. package/web/chunk-ceg13tma.js.br +0 -0
  143. package/web/chunk-ceg13tma.js.gz +0 -0
  144. package/web/{chunk-z2hvvkf5.js → chunk-ch60a61d.js} +2 -2
  145. package/web/chunk-ch60a61d.js.br +0 -0
  146. package/web/chunk-ch60a61d.js.gz +0 -0
  147. package/web/chunk-czvdg0c5.js +1 -0
  148. package/web/chunk-czvdg0c5.js.br +0 -0
  149. package/web/chunk-czvdg0c5.js.gz +0 -0
  150. package/web/chunk-d18r4m14.js.br +0 -0
  151. package/web/chunk-d18r4m14.js.gz +0 -0
  152. package/web/chunk-dmqtdeb4.js.br +0 -0
  153. package/web/chunk-dmqtdeb4.js.gz +0 -0
  154. package/web/chunk-drr7mqg2.js +1 -0
  155. package/web/chunk-drr7mqg2.js.br +0 -0
  156. package/web/chunk-drr7mqg2.js.gz +0 -0
  157. package/web/{chunk-chh8bg2h.js → chunk-dsa5m3h6.js} +34 -34
  158. package/web/chunk-dsa5m3h6.js.br +0 -0
  159. package/web/chunk-dsa5m3h6.js.gz +0 -0
  160. package/web/chunk-dww3grm3.js +24 -0
  161. package/web/chunk-dww3grm3.js.br +0 -0
  162. package/web/chunk-dww3grm3.js.gz +0 -0
  163. package/web/chunk-e187gt5x.js +1 -0
  164. package/web/chunk-e187gt5x.js.br +0 -0
  165. package/web/chunk-e187gt5x.js.gz +0 -0
  166. package/web/{chunk-pf65cank.js → chunk-emxa4wv3.js} +2 -2
  167. package/web/chunk-emxa4wv3.js.br +0 -0
  168. package/web/chunk-emxa4wv3.js.gz +0 -0
  169. package/web/{chunk-gjchc4kg.js → chunk-ey0zwvbx.js} +1 -1
  170. package/web/chunk-ey0zwvbx.js.br +0 -0
  171. package/web/chunk-ey0zwvbx.js.gz +0 -0
  172. package/web/chunk-ey14knbn.js +2 -0
  173. package/web/chunk-ey14knbn.js.br +0 -0
  174. package/web/chunk-ey14knbn.js.gz +0 -0
  175. package/web/chunk-fba06jm8.js +1132 -0
  176. package/web/chunk-fba06jm8.js.br +0 -0
  177. package/web/chunk-fba06jm8.js.gz +0 -0
  178. package/web/chunk-fh56vgfx.js +39 -0
  179. package/web/chunk-fh56vgfx.js.br +0 -0
  180. package/web/chunk-fh56vgfx.js.gz +0 -0
  181. package/web/chunk-ft05x3my.js +169 -0
  182. package/web/chunk-ft05x3my.js.br +0 -0
  183. package/web/chunk-ft05x3my.js.gz +0 -0
  184. package/web/chunk-fzmrnh17.js +303 -0
  185. package/web/chunk-fzmrnh17.js.br +0 -0
  186. package/web/chunk-fzmrnh17.js.gz +0 -0
  187. package/web/{chunk-ybqt106a.js → chunk-gbt7asd7.js} +2 -2
  188. package/web/chunk-gbt7asd7.js.br +0 -0
  189. package/web/chunk-gbt7asd7.js.gz +0 -0
  190. package/web/chunk-gh9fkn3t.js +1 -0
  191. package/web/chunk-gh9fkn3t.js.br +2 -0
  192. package/web/chunk-gh9fkn3t.js.gz +0 -0
  193. package/web/{chunk-sd3cdqcm.js → chunk-h1syyjqq.js} +2 -2
  194. package/web/chunk-h1syyjqq.js.br +0 -0
  195. package/web/chunk-h1syyjqq.js.gz +0 -0
  196. package/web/{chunk-mv5axm2y.js → chunk-h7byk4z3.js} +12 -12
  197. package/web/chunk-h7byk4z3.js.br +0 -0
  198. package/web/chunk-h7byk4z3.js.gz +0 -0
  199. package/web/chunk-hby0hkv4.js +1 -0
  200. package/web/chunk-hby0hkv4.js.br +0 -0
  201. package/web/chunk-hby0hkv4.js.gz +0 -0
  202. package/web/chunk-hjvsp2yx.js +1 -0
  203. package/web/chunk-hjvsp2yx.js.br +0 -0
  204. package/web/chunk-hjvsp2yx.js.gz +0 -0
  205. package/web/chunk-hp167dbv.js.br +0 -0
  206. package/web/chunk-hp167dbv.js.gz +0 -0
  207. package/web/{chunk-qwwqdmhv.js → chunk-hpjzy5ww.js} +1 -1
  208. package/web/chunk-hpjzy5ww.js.br +0 -0
  209. package/web/chunk-hpjzy5ww.js.gz +0 -0
  210. package/web/{chunk-1np2aamb.js → chunk-hzfp8kqx.js} +11 -11
  211. package/web/chunk-hzfp8kqx.js.br +0 -0
  212. package/web/chunk-hzfp8kqx.js.gz +0 -0
  213. package/web/{chunk-5d9veaef.js → chunk-j6jjk46a.js} +2 -2
  214. package/web/chunk-j6jjk46a.js.br +0 -0
  215. package/web/chunk-j6jjk46a.js.gz +0 -0
  216. package/web/chunk-j8f0m1dq.js +1 -0
  217. package/web/chunk-j8f0m1dq.js.br +0 -0
  218. package/web/chunk-j8f0m1dq.js.gz +0 -0
  219. package/web/{chunk-t9pg7qf8.js → chunk-jc178ad5.js} +2 -2
  220. package/web/chunk-jc178ad5.js.br +0 -0
  221. package/web/chunk-jc178ad5.js.gz +0 -0
  222. package/web/chunk-jcsf0ke5.js +41 -0
  223. package/web/chunk-jcsf0ke5.js.br +0 -0
  224. package/web/chunk-jcsf0ke5.js.gz +0 -0
  225. package/web/chunk-jg43a2xk.js +139 -0
  226. package/web/chunk-jg43a2xk.js.br +0 -0
  227. package/web/chunk-jg43a2xk.js.gz +0 -0
  228. package/web/chunk-jrgdxqtq.js +7 -0
  229. package/web/chunk-jrgdxqtq.js.br +0 -0
  230. package/web/chunk-jrgdxqtq.js.gz +0 -0
  231. package/web/chunk-js8dvtfg.js +2 -0
  232. package/web/chunk-js8dvtfg.js.br +0 -0
  233. package/web/chunk-js8dvtfg.js.gz +0 -0
  234. package/web/chunk-jt0s9qs7.js +1 -0
  235. package/web/chunk-jt0s9qs7.js.br +0 -0
  236. package/web/chunk-jt0s9qs7.js.gz +0 -0
  237. package/web/chunk-jv5faf88.js +34 -0
  238. package/web/chunk-jv5faf88.js.br +0 -0
  239. package/web/chunk-jv5faf88.js.gz +0 -0
  240. package/web/{chunk-vb2z2azk.js → chunk-k295x81w.js} +79 -79
  241. package/web/chunk-k295x81w.js.br +0 -0
  242. package/web/chunk-k295x81w.js.gz +0 -0
  243. package/web/{chunk-wcj3bxdf.js → chunk-k3aa37pw.js} +2 -2
  244. package/web/chunk-k3aa37pw.js.br +0 -0
  245. package/web/chunk-k3aa37pw.js.gz +0 -0
  246. package/web/{chunk-wgmwgaw4.js → chunk-k6wxwgp1.js} +26 -26
  247. package/web/chunk-k6wxwgp1.js.br +0 -0
  248. package/web/chunk-k6wxwgp1.js.gz +0 -0
  249. package/web/chunk-k9vc7kp2.js +292 -0
  250. package/web/chunk-k9vc7kp2.js.br +0 -0
  251. package/web/chunk-k9vc7kp2.js.gz +0 -0
  252. package/web/chunk-kxyws7q7.js +1 -0
  253. package/web/chunk-kxyws7q7.js.br +0 -0
  254. package/web/chunk-kxyws7q7.js.gz +0 -0
  255. package/web/{chunk-c0hdp2zj.js → chunk-mcgf645h.js} +1 -1
  256. package/web/chunk-mcgf645h.js.br +4 -0
  257. package/web/chunk-mcgf645h.js.gz +0 -0
  258. package/web/{chunk-3gj2t10x.js → chunk-mj3tshy8.js} +31 -31
  259. package/web/chunk-mj3tshy8.js.br +0 -0
  260. package/web/chunk-mj3tshy8.js.gz +0 -0
  261. package/web/chunk-mnb2wdvy.js +24 -0
  262. package/web/chunk-mnb2wdvy.js.br +0 -0
  263. package/web/chunk-mnb2wdvy.js.gz +0 -0
  264. package/web/chunk-ndf58dgc.js +1 -0
  265. package/web/chunk-ndf58dgc.js.br +0 -0
  266. package/web/chunk-ndf58dgc.js.gz +0 -0
  267. package/web/chunk-nhpm5nd5.js +2 -0
  268. package/web/chunk-nhpm5nd5.js.br +0 -0
  269. package/web/chunk-nhpm5nd5.js.gz +0 -0
  270. package/web/chunk-nj0cv1cq.js.br +0 -0
  271. package/web/chunk-nj0cv1cq.js.gz +0 -0
  272. package/web/{chunk-0zyekjym.js → chunk-nwxjdetb.js} +1 -1
  273. package/web/chunk-nwxjdetb.js.br +0 -0
  274. package/web/chunk-nwxjdetb.js.gz +0 -0
  275. package/web/chunk-nyjfcard.js +106 -0
  276. package/web/chunk-nyjfcard.js.br +0 -0
  277. package/web/chunk-nyjfcard.js.gz +0 -0
  278. package/web/chunk-nzey7cpv.js.br +0 -0
  279. package/web/chunk-nzey7cpv.js.gz +0 -0
  280. package/web/{chunk-g8wy9sa6.js → chunk-pcfjcy3a.js} +23 -23
  281. package/web/chunk-pcfjcy3a.js.br +0 -0
  282. package/web/chunk-pcfjcy3a.js.gz +0 -0
  283. package/web/chunk-pry6wdbe.js +1 -0
  284. package/web/chunk-pry6wdbe.js.br +0 -0
  285. package/web/chunk-pry6wdbe.js.gz +0 -0
  286. package/web/chunk-pvahdcgy.js +2 -0
  287. package/web/chunk-pvahdcgy.js.br +0 -0
  288. package/web/chunk-pvahdcgy.js.gz +0 -0
  289. package/web/{chunk-ffn1a0zw.js → chunk-q3njnnef.js} +2 -2
  290. package/web/chunk-q3njnnef.js.br +0 -0
  291. package/web/chunk-q3njnnef.js.gz +0 -0
  292. package/web/chunk-qxvqkkmw.js +1 -0
  293. package/web/chunk-qxvqkkmw.js.br +0 -0
  294. package/web/chunk-qxvqkkmw.js.gz +0 -0
  295. package/web/chunk-qych3sbs.js +1 -0
  296. package/web/chunk-qych3sbs.js.br +0 -0
  297. package/web/chunk-qych3sbs.js.gz +0 -0
  298. package/web/chunk-r1dnh0s8.js.br +0 -0
  299. package/web/chunk-r1dnh0s8.js.gz +0 -0
  300. package/web/chunk-r5eakmw6.js.br +0 -0
  301. package/web/chunk-r5eakmw6.js.gz +0 -0
  302. package/web/chunk-rbmp2e4b.js +1 -0
  303. package/web/chunk-rbmp2e4b.js.br +0 -0
  304. package/web/chunk-rbmp2e4b.js.gz +0 -0
  305. package/web/chunk-rcre1stj.js +1 -0
  306. package/web/chunk-rcre1stj.js.br +0 -0
  307. package/web/chunk-rcre1stj.js.gz +0 -0
  308. package/web/chunk-rdb6091n.js +89 -0
  309. package/web/chunk-rdb6091n.js.br +0 -0
  310. package/web/chunk-rdb6091n.js.gz +0 -0
  311. package/web/chunk-ryw7xnab.js +1 -0
  312. package/web/chunk-ryw7xnab.js.br +0 -0
  313. package/web/chunk-ryw7xnab.js.gz +0 -0
  314. package/web/{chunk-1hx4xtdk.js → chunk-sbbmy02e.js} +2 -2
  315. package/web/chunk-sbbmy02e.js.br +0 -0
  316. package/web/chunk-sbbmy02e.js.gz +0 -0
  317. package/web/{chunk-s0xy00v5.js → chunk-sgbc835w.js} +2 -2
  318. package/web/chunk-sgbc835w.js.br +0 -0
  319. package/web/chunk-sgbc835w.js.gz +0 -0
  320. package/web/chunk-sydy10mb.js +1 -0
  321. package/web/chunk-sydy10mb.js.br +0 -0
  322. package/web/chunk-sydy10mb.js.gz +0 -0
  323. package/web/chunk-t0ywnp5e.js +1 -0
  324. package/web/chunk-t0ywnp5e.js.br +0 -0
  325. package/web/chunk-t0ywnp5e.js.gz +0 -0
  326. package/web/chunk-t6agpn2z.js.br +0 -0
  327. package/web/chunk-t6agpn2z.js.gz +0 -0
  328. package/web/{chunk-hhnhgthx.js → chunk-t72jq97z.js} +2 -2
  329. package/web/chunk-t72jq97z.js.br +0 -0
  330. package/web/chunk-t72jq97z.js.gz +0 -0
  331. package/web/{chunk-6ty9vw27.js → chunk-tfcc9bcz.js} +3 -3
  332. package/web/chunk-tfcc9bcz.js.br +0 -0
  333. package/web/chunk-tfcc9bcz.js.gz +0 -0
  334. package/web/{chunk-27tchdxd.js → chunk-v2bvbgfc.js} +2 -2
  335. package/web/chunk-v2bvbgfc.js.br +0 -0
  336. package/web/chunk-v2bvbgfc.js.gz +0 -0
  337. package/web/{chunk-madrcnm1.js → chunk-v7zq4vc9.js} +5 -5
  338. package/web/chunk-v7zq4vc9.js.br +0 -0
  339. package/web/chunk-v7zq4vc9.js.gz +0 -0
  340. package/web/chunk-vh8pkcem.css.br +0 -0
  341. package/web/chunk-vh8pkcem.css.gz +0 -0
  342. package/web/chunk-vq3sby7x.js +1 -0
  343. package/web/chunk-vq3sby7x.js.br +0 -0
  344. package/web/chunk-vq3sby7x.js.gz +0 -0
  345. package/web/{chunk-vvvd3grf.js → chunk-vszya05r.js} +2 -2
  346. package/web/chunk-vszya05r.js.br +0 -0
  347. package/web/chunk-vszya05r.js.gz +0 -0
  348. package/web/chunk-was9xf03.js +8 -0
  349. package/web/chunk-was9xf03.js.br +0 -0
  350. package/web/chunk-was9xf03.js.gz +0 -0
  351. package/web/chunk-we1v1829.js +2 -0
  352. package/web/chunk-we1v1829.js.br +0 -0
  353. package/web/chunk-we1v1829.js.gz +0 -0
  354. package/web/chunk-wfa1c8dn.js +1 -0
  355. package/web/chunk-wfa1c8dn.js.br +0 -0
  356. package/web/chunk-wfa1c8dn.js.gz +0 -0
  357. package/web/chunk-wg2exnxe.js +1 -0
  358. package/web/chunk-wg2exnxe.js.br +2 -0
  359. package/web/chunk-wg2exnxe.js.gz +0 -0
  360. package/web/chunk-wvd3zj1m.js +70 -0
  361. package/web/chunk-wvd3zj1m.js.br +0 -0
  362. package/web/chunk-wvd3zj1m.js.gz +0 -0
  363. package/web/chunk-wzmxtr30.js +1 -0
  364. package/web/chunk-wzmxtr30.js.br +0 -0
  365. package/web/chunk-wzmxtr30.js.gz +0 -0
  366. package/web/chunk-x815g7yp.js +1 -0
  367. package/web/chunk-x815g7yp.js.br +0 -0
  368. package/web/chunk-x815g7yp.js.gz +0 -0
  369. package/web/{chunk-0qnetvsc.js → chunk-x8ps0p82.js} +14 -14
  370. package/web/chunk-x8ps0p82.js.br +0 -0
  371. package/web/chunk-x8ps0p82.js.gz +0 -0
  372. package/web/{chunk-y2ykn1gm.js → chunk-xea3snym.js} +1 -1
  373. package/web/chunk-xea3snym.js.br +0 -0
  374. package/web/chunk-xea3snym.js.gz +0 -0
  375. package/web/chunk-xet1jjy9.js.br +0 -0
  376. package/web/chunk-xet1jjy9.js.gz +0 -0
  377. package/web/{chunk-vjnvfb8z.js → chunk-xg4v60m7.js} +1 -1
  378. package/web/chunk-xg4v60m7.js.br +0 -0
  379. package/web/chunk-xg4v60m7.js.gz +0 -0
  380. package/web/chunk-xhr9jrjt.js +89 -0
  381. package/web/chunk-xhr9jrjt.js.br +0 -0
  382. package/web/chunk-xhr9jrjt.js.gz +0 -0
  383. package/web/chunk-xp90g2e7.js +36 -0
  384. package/web/chunk-xp90g2e7.js.br +0 -0
  385. package/web/chunk-xp90g2e7.js.gz +0 -0
  386. package/web/{chunk-e229cr90.js → chunk-xs1g97qa.js} +2 -2
  387. package/web/chunk-xs1g97qa.js.br +0 -0
  388. package/web/chunk-xs1g97qa.js.gz +0 -0
  389. package/web/chunk-xyk1wpr4.js +1 -0
  390. package/web/chunk-xyk1wpr4.js.br +3 -0
  391. package/web/chunk-xyk1wpr4.js.gz +0 -0
  392. package/web/chunk-yavbdwyt.js +1 -0
  393. package/web/chunk-yavbdwyt.js.br +0 -0
  394. package/web/chunk-yavbdwyt.js.gz +0 -0
  395. package/web/chunk-yfnhnsxe.js +4 -0
  396. package/web/chunk-yfnhnsxe.js.br +0 -0
  397. package/web/chunk-yfnhnsxe.js.gz +0 -0
  398. package/web/chunk-yk965yth.js +1 -0
  399. package/web/chunk-yk965yth.js.br +0 -0
  400. package/web/chunk-yk965yth.js.gz +0 -0
  401. package/web/{chunk-c1z290wm.js → chunk-ynhcjhsx.js} +2 -2
  402. package/web/chunk-ynhcjhsx.js.br +0 -0
  403. package/web/chunk-ynhcjhsx.js.gz +0 -0
  404. package/web/chunk-ypmm1gts.js +1 -0
  405. package/web/chunk-ypmm1gts.js.br +0 -0
  406. package/web/chunk-ypmm1gts.js.gz +0 -0
  407. package/web/chunk-yssx5a5q.js +1 -0
  408. package/web/chunk-yssx5a5q.js.br +0 -0
  409. package/web/chunk-yssx5a5q.js.gz +0 -0
  410. package/web/chunk-z09emmrb.js.br +0 -0
  411. package/web/chunk-z09emmrb.js.gz +0 -0
  412. package/web/chunk-z0a8cnq8.js +1 -0
  413. package/web/chunk-z0a8cnq8.js.br +0 -0
  414. package/web/chunk-z0a8cnq8.js.gz +0 -0
  415. package/web/{chunk-gaf9brzv.js → chunk-z1afsvbv.js} +2 -2
  416. package/web/chunk-z1afsvbv.js.br +0 -0
  417. package/web/chunk-z1afsvbv.js.gz +0 -0
  418. package/web/{chunk-w60dxtyz.js → chunk-z1ka8jtd.js} +2 -2
  419. package/web/chunk-z1ka8jtd.js.br +0 -0
  420. package/web/chunk-z1ka8jtd.js.gz +0 -0
  421. package/web/chunk-z7tdzen9.js +1 -0
  422. package/web/chunk-z7tdzen9.js.br +0 -0
  423. package/web/chunk-z7tdzen9.js.gz +0 -0
  424. package/web/{chunk-444xfger.js → chunk-zbwjj06m.js} +7 -7
  425. package/web/chunk-zbwjj06m.js.br +0 -0
  426. package/web/chunk-zbwjj06m.js.gz +0 -0
  427. package/web/chunk-zd2j189j.js +1 -0
  428. package/web/chunk-zd2j189j.js.br +0 -0
  429. package/web/chunk-zd2j189j.js.gz +0 -0
  430. package/web/chunk-zfgpq4n4.js +120 -0
  431. package/web/chunk-zfgpq4n4.js.br +0 -0
  432. package/web/chunk-zfgpq4n4.js.gz +0 -0
  433. package/web/chunk-zgas56xw.js +1 -0
  434. package/web/chunk-zgas56xw.js.br +0 -0
  435. package/web/chunk-zgas56xw.js.gz +0 -0
  436. package/web/chunk-zkfepf91.js +1 -0
  437. package/web/chunk-zkfepf91.js.br +0 -0
  438. package/web/chunk-zkfepf91.js.gz +0 -0
  439. package/web/icon-1wgy7kzy.svg.br +0 -0
  440. package/web/icon-1wgy7kzy.svg.gz +0 -0
  441. package/web/icon.svg.br +0 -0
  442. package/web/icon.svg.gz +0 -0
  443. package/web/index.html +11 -1
  444. package/web/index.html.br +0 -0
  445. package/web/index.html.gz +0 -0
  446. package/web/manifest-txf6vfbq.webmanifest.br +0 -0
  447. package/web/manifest-txf6vfbq.webmanifest.gz +0 -0
  448. package/web/manifest.webmanifest.br +0 -0
  449. package/web/manifest.webmanifest.gz +0 -0
  450. package/web/sw.js +146 -27
  451. package/web/sw.js.br +0 -0
  452. package/web/sw.js.gz +0 -0
  453. package/web/chunk-0zb330w3.js +0 -89
  454. package/web/chunk-11byy7vm.js +0 -1
  455. package/web/chunk-160x5pv7.js +0 -1
  456. package/web/chunk-19g09ekr.js +0 -40
  457. package/web/chunk-1gzprnyd.js +0 -1
  458. package/web/chunk-1je4p601.js +0 -139
  459. package/web/chunk-1rjtqf8h.js +0 -2
  460. package/web/chunk-1y387f45.js +0 -1
  461. package/web/chunk-23258z1r.js +0 -1
  462. package/web/chunk-27592nd8.js +0 -36
  463. package/web/chunk-2hqmdqn3.js +0 -41
  464. package/web/chunk-2q79n966.js +0 -2
  465. package/web/chunk-2ws74tfa.js +0 -21
  466. package/web/chunk-2z8epr8f.js +0 -34
  467. package/web/chunk-4k62e61g.js +0 -291
  468. package/web/chunk-4z6wma3s.js +0 -78
  469. package/web/chunk-5wkqqa59.js +0 -1
  470. package/web/chunk-5yczs6sb.js +0 -1
  471. package/web/chunk-5yn7mwvt.js +0 -1
  472. package/web/chunk-705tkt2r.js +0 -1
  473. package/web/chunk-753qp8sa.js +0 -4
  474. package/web/chunk-76e3npmd.js +0 -2
  475. package/web/chunk-7p04dn0k.js +0 -1
  476. package/web/chunk-7qq1ypvj.js +0 -1
  477. package/web/chunk-7rb3v8gy.js +0 -1
  478. package/web/chunk-7yz88k97.js +0 -39
  479. package/web/chunk-85d7jkp0.js +0 -2
  480. package/web/chunk-90kgn35s.js +0 -1
  481. package/web/chunk-931y1g0h.js +0 -1
  482. package/web/chunk-at0xtfhy.js +0 -1
  483. package/web/chunk-bcp6na49.js +0 -1145
  484. package/web/chunk-bz1q7qdd.js +0 -8
  485. package/web/chunk-c0evk1xy.js +0 -1
  486. package/web/chunk-cge0cjfm.js +0 -2
  487. package/web/chunk-e9mmkrc3.js +0 -7
  488. package/web/chunk-f8nnrk6y.js +0 -292
  489. package/web/chunk-fcrswzgm.js +0 -106
  490. package/web/chunk-fw4fa7j6.js +0 -1
  491. package/web/chunk-fx8hheqz.js +0 -1
  492. package/web/chunk-gj16e7z0.js +0 -1
  493. package/web/chunk-h0c42zy3.js +0 -1
  494. package/web/chunk-h1y8y203.js +0 -1
  495. package/web/chunk-h6vy008x.js +0 -24
  496. package/web/chunk-h8mhnze5.js +0 -303
  497. package/web/chunk-j27mtdr2.js +0 -1
  498. package/web/chunk-jys02310.js +0 -1
  499. package/web/chunk-kew13yzg.js +0 -1
  500. package/web/chunk-kx5r8nf2.js +0 -1
  501. package/web/chunk-m7c0xk69.js +0 -1
  502. package/web/chunk-mrnx4f74.js +0 -70
  503. package/web/chunk-mtdsrtc5.js +0 -1
  504. package/web/chunk-n3spc397.js +0 -24
  505. package/web/chunk-nbcpbqq4.js +0 -1
  506. package/web/chunk-nhc280n0.js +0 -1
  507. package/web/chunk-nx1bcekh.js +0 -2
  508. package/web/chunk-p8t7s4z4.js +0 -1
  509. package/web/chunk-pgh1cx6w.js +0 -1
  510. package/web/chunk-qgzn0ha5.js +0 -89
  511. package/web/chunk-qtwxq6hj.js +0 -3
  512. package/web/chunk-qwp3dhmf.js +0 -1
  513. package/web/chunk-rjh54ygb.js +0 -120
  514. package/web/chunk-ryh8jdzy.js +0 -1
  515. package/web/chunk-s3t8dkkz.js +0 -1
  516. package/web/chunk-sk1w7f7h.js +0 -1
  517. package/web/chunk-smkrxjm5.js +0 -1
  518. package/web/chunk-sv5ph7fa.js +0 -1
  519. package/web/chunk-t9twxmsg.js +0 -1
  520. package/web/chunk-tfdchqn4.js +0 -62
  521. package/web/chunk-tvvggvjt.js +0 -169
  522. package/web/chunk-ty87gdvr.js +0 -1
  523. package/web/chunk-v16s0x7c.js +0 -1
  524. package/web/chunk-vgyp8wa2.js +0 -2
  525. package/web/chunk-vphzndz8.js +0 -2
  526. package/web/chunk-xtss82z2.js +0 -1
  527. package/web/chunk-y0mef85j.js +0 -1
  528. package/web/chunk-ym9qfsjs.js +0 -30
  529. package/web/chunk-ypdptddq.js +0 -1
  530. package/web/chunk-z08c63ph.js +0 -2
  531. package/web/chunk-z6x74qfh.js +0 -1
  532. package/web/chunk-z86pjpqp.js +0 -1
  533. package/web/chunk-zh0vjc6g.js +0 -1
  534. package/web/chunk-zns9wmab.js +0 -1
@@ -0,0 +1,1132 @@
1
+ var $X=Object.create;var{getPrototypeOf:KX,defineProperty:kb,getOwnPropertyNames:WX}=Object;var M4=Object.prototype.hasOwnProperty;function XX(t){return this[t]}var YX,QX,Ye=(t,a,c)=>{var u=t!=null&&typeof t==="object";if(u){var f=a?YX??=new WeakMap:QX??=new WeakMap,m=f.get(t);if(m)return m}c=t!=null?$X(KX(t)):{};let p=a||!t||!t.__esModule||!M4.call(t,"default")?kb(c,"default",{value:t,enumerable:!0}):c;if(t&&typeof t==="object"||typeof t==="function"){for(let g of WX(t))if(!M4.call(p,g))kb(p,g,{get:XX.bind(t,g),enumerable:!0})}if(u)f.set(t,p);return p};var Ze=(t,a)=>()=>(a||t((a={exports:{}}).exports,a),a.exports);var ZX=(t)=>t;function JX(t,a){this[t]=ZX.bind(null,a)}var wn=(t,a)=>{for(var c in a)kb(t,c,{get:a[c],enumerable:!0,configurable:!0,set:JX.bind(a,c)})};var ng=(t,a,c)=>{for(var u in a)kb(t,u,{get:a[u],set:c[u],enumerable:!0,configurable:!0})};var D4,x2,wb,C=(t,a)=>{for(var[c,u,f]of D4||[])for(var m=[t],p=globalThis,g=p.document,v,k,S,I,T;k=m.pop();)if(!x2[k]&&(S=u[k])){x2[k]=1;for(I=1;I<S.length;I++)m.push(f[S[I]]);if(!a&&k!==t&&(v=g&&g.head)){if(wb===void 0)wb=(I=g.querySelector("meta[property=csp-nonce]"))&&(I.nonce||I.getAttribute("nonce"))||"";if(T=g.createElement("link"),T.rel="modulepreload",T.crossOrigin="",wb)T.nonce=wb;T.href=new p.URL(S[0],c),v.appendChild(T)}}},eY=(t,a,c,u)=>{for(var f={},m=0;m<a.length;m++)f[a[m]]=c[m];(D4||=[]).push([t,f,a]),x2||={},C(a[u],1)};eY(import.meta.url,["fba06jm8","pcfjcy3a","xyk1wpr4","sydy10mb","bvyjy17t","yssx5a5q","kxyws7q7","7n6b2xra","rcre1stj","yavbdwyt","8ec53vjd","33mmrjdp","xea3snym","2wwj27b9","nj0cv1cq","7ztwkhg5","e187gt5x","0j65yg1p","yk965yth","zd2j189j","hpjzy5ww","tfcc9bcz","k6wxwgp1","ad6x47yy","xg4v60m7","8g55ytgz","v7zq4vc9","d18r4m14","xet1jjy9","9v1f6yc8","v2bvbgfc","nzey7cpv","qxvqkkmw","4wd9r73y","t6agpn2z","t0ywnp5e","6q3p851n","ryw7xnab","hp167dbv","r5eakmw6","z09emmrb","dmqtdeb4","8nxjthxc","qych3sbs","0khcpaa8","r1dnh0s8","9kbrjmtz","pry6wdbe","rbmp2e4b","wfa1c8dn","z7tdzen9","ypmm1gts","8g239029","wg2exnxe","z1ka8jtd","5kz048x3","zgas56xw","jv5faf88","mnb2wdvy","k295x81w","7p4mcqkd","7ck99bsp","j8f0m1dq","7fjbyns9","jt0s9qs7","9s4bh6qm","dww3grm3","jcsf0ke5","h7byk4z3","6024wfxb","xp90g2e7","5mbz8yj9","wvd3zj1m","78akzkgs","ft05x3my","hzfp8kqx","8q76yd76","jg43a2xk","zfgpq4n4","x8ps0p82","xhr9jrjt","nyjfcard","k9vc7kp2","nhpm5nd5","fh56vgfx","jrgdxqtq","a449xjq6","dsa5m3h6","was9xf03","823etvc3","zbwjj06m","0ernj3c0","fzmrnh17","33tb7q04","74g3wh08","j6jjk46a","ccy2q2z0","h1syyjqq","9vf3zy3d","vszya05r","xs1g97qa","ynhcjhsx","1tfrm3pk","z1afsvbv","sgbc835w","gbt7asd7","jc178ad5","013et20n","sbbmy02e","rdb6091n","js8dvtfg","bdypt5mj","41vh5n86","k3aa37pw","ceg13tma","pvahdcgy","emxa4wv3","6ey4c6gw","q3njnnef","we1v1829","3xgfsx7y","1q2kmv35","ch60a61d","40jka4r7","t72jq97z","drr7mqg2","mj3tshy8","z0a8cnq8","hby0hkv4","ey0zwvbx","nwxjdetb","3txb4sha","2sxtb709","0wbdd74r","czvdg0c5","2qt5fy5n","x815g7yp","2wrwm0qe","wzmxtr30","zkfepf91","1f2wvhq9","vq3sby7x","hjvsp2yx","gh9fkn3t","ndf58dgc","b05eay33","ey14knbn","yfnhnsxe","mcgf645h"],[["./chunk-fba06jm8.js"],["./chunk-pcfjcy3a.js",0],["./chunk-xyk1wpr4.js",0,54,55],["./chunk-sydy10mb.js",0,55],["./chunk-bvyjy17t.js"],["./chunk-yssx5a5q.js",0],["./chunk-kxyws7q7.js",0],["./chunk-7n6b2xra.js",0,92,93],["./chunk-rcre1stj.js",0,94],["./chunk-yavbdwyt.js",0,54,55],["./chunk-8ec53vjd.js",0],["./chunk-33mmrjdp.js",0],["./chunk-xea3snym.js",0,94],["./chunk-2wwj27b9.js",0],["./chunk-nj0cv1cq.js"],["./chunk-7ztwkhg5.js",0],["./chunk-e187gt5x.js",0,54,55],["./chunk-0j65yg1p.js",0],["./chunk-yk965yth.js",0],["./chunk-zd2j189j.js",0,54,55],["./chunk-hpjzy5ww.js",0],["./chunk-tfcc9bcz.js",0],["./chunk-k6wxwgp1.js",0,93],["./chunk-ad6x47yy.js"],["./chunk-xg4v60m7.js",95,96,97,98,99,100,101,102,103,104,105,106],["./chunk-8g55ytgz.js",95,98,99,100,104,107],["./chunk-v7zq4vc9.js",0],["./chunk-d18r4m14.js"],["./chunk-xet1jjy9.js"],["./chunk-9v1f6yc8.js"],["./chunk-v2bvbgfc.js",0],["./chunk-nzey7cpv.js"],["./chunk-qxvqkkmw.js",95],["./chunk-4wd9r73y.js"],["./chunk-t6agpn2z.js"],["./chunk-t0ywnp5e.js",97],["./chunk-6q3p851n.js",96],["./chunk-ryw7xnab.js",108],["./chunk-hp167dbv.js"],["./chunk-r5eakmw6.js"],["./chunk-z09emmrb.js"],["./chunk-dmqtdeb4.js"],["./chunk-8nxjthxc.js",99],["./chunk-qych3sbs.js",98],["./chunk-0khcpaa8.js",100],["./chunk-r1dnh0s8.js"],["./chunk-9kbrjmtz.js",101],["./chunk-pry6wdbe.js",102],["./chunk-rbmp2e4b.js",103],["./chunk-wfa1c8dn.js",104],["./chunk-z7tdzen9.js",105],["./chunk-ypmm1gts.js",107],["./chunk-8g239029.js"],["./chunk-wg2exnxe.js",106],["./chunk-z1ka8jtd.js",0,55],["./chunk-5kz048x3.js",0],["./chunk-zgas56xw.js",92,109,110,111],["./chunk-jv5faf88.js",92],["./chunk-mnb2wdvy.js",110,92,112,111,113,114],["./chunk-k295x81w.js",92,115,114],["./chunk-7p4mcqkd.js",110,92,111],["./chunk-7ck99bsp.js",110,92,111],["./chunk-j8f0m1dq.js",92,109,110,111],["./chunk-7fjbyns9.js",92,109,110,111],["./chunk-jt0s9qs7.js",92,109,110,111],["./chunk-9s4bh6qm.js",92,116,113],["./chunk-dww3grm3.js",110,92,111],["./chunk-jcsf0ke5.js",110,92,111],["./chunk-h7byk4z3.js",92,117,118,119],["./chunk-6024wfxb.js",120,110,92,111],["./chunk-xp90g2e7.js",110,92,111,121,0],["./chunk-5mbz8yj9.js",110,92,111],["./chunk-wvd3zj1m.js",92],["./chunk-78akzkgs.js",92,115,114],["./chunk-ft05x3my.js",120,92,122,0],["./chunk-hzfp8kqx.js",92,122,118,115,114],["./chunk-8q76yd76.js",92,122,115,114],["./chunk-jg43a2xk.js",92,122,123,118],["./chunk-zfgpq4n4.js",92,123],["./chunk-x8ps0p82.js",92,115,114],["./chunk-xhr9jrjt.js",92,118],["./chunk-nyjfcard.js",120,110,92,111],["./chunk-k9vc7kp2.js",92,112,116,124,125,0],["./chunk-nhpm5nd5.js",92,111],["./chunk-fh56vgfx.js",110,92,111,123,113],["./chunk-jrgdxqtq.js",92,112,124],["./chunk-a449xjq6.js",92,112,113,124,125],["./chunk-dsa5m3h6.js",92,122,118,119,115,114],["./chunk-was9xf03.js",92,122,126,118,119,115,114],["./chunk-823etvc3.js",92,119,115,114],["./chunk-zbwjj06m.js",92,122],["./chunk-0ernj3c0.js",92,122,126,118,119,115,114],["./chunk-fzmrnh17.js",0],["./chunk-33tb7q04.js",0],["./chunk-74g3wh08.js",0],["./chunk-j6jjk46a.js"],["./chunk-ccy2q2z0.js",97],["./chunk-h1syyjqq.js"],["./chunk-9vf3zy3d.js",99,104],["./chunk-vszya05r.js"],["./chunk-xs1g97qa.js",108],["./chunk-ynhcjhsx.js"],["./chunk-1tfrm3pk.js"],["./chunk-z1afsvbv.js"],["./chunk-sgbc835w.js"],["./chunk-gbt7asd7.js"],["./chunk-jc178ad5.js"],["./chunk-013et20n.js"],["./chunk-sbbmy02e.js"],["./chunk-rdb6091n.js",92],["./chunk-js8dvtfg.js",92],["./chunk-bdypt5mj.js",0],["./chunk-41vh5n86.js"],["./chunk-k3aa37pw.js",125],["./chunk-ceg13tma.js",92],["./chunk-pvahdcgy.js",92],["./chunk-emxa4wv3.js"],["./chunk-6ey4c6gw.js",0],["./chunk-q3njnnef.js",92],["./chunk-we1v1829.js",92],["./chunk-3xgfsx7y.js",92],["./chunk-1q2kmv35.js",0],["./chunk-ch60a61d.js",92,0],["./chunk-40jka4r7.js",92],["./chunk-t72jq97z.js",112,125,92],["./chunk-drr7mqg2.js"],["./chunk-mj3tshy8.js",92,122,118,119,115,114],["./chunk-z0a8cnq8.js",92,117,146,147],["./chunk-hby0hkv4.js",147,146,117,92],["./chunk-ey0zwvbx.js",92,117,146],["./chunk-nwxjdetb.js",92,121,0],["./chunk-3txb4sha.js",111],["./chunk-2sxtb709.js",111],["./chunk-0wbdd74r.js",111],["./chunk-czvdg0c5.js",111],["./chunk-2qt5fy5n.js",111],["./chunk-x815g7yp.js",111],["./chunk-2wrwm0qe.js",111],["./chunk-wzmxtr30.js",111],["./chunk-zkfepf91.js",111],["./chunk-1f2wvhq9.js",111],["./chunk-vq3sby7x.js",111],["./chunk-hjvsp2yx.js",111],["./chunk-gh9fkn3t.js",111],["./chunk-ndf58dgc.js",111],["./chunk-b05eay33.js",111],["./chunk-ey14knbn.js",92,117,0],["./chunk-yfnhnsxe.js",92,117,146,0],["./chunk-mcgf645h.js",92]],0);
2
+ var GU=Ze(function(KWn,jU){var VU=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,cme=/\n/g,ume=/^\s*/,dme=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,fme=/^:\s*/,mme=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,pme=/^[;\s]*/,hme=/^\s+|\s+$/g,gme=`
3
+ `,UU="/",qU="*",cm="",xme="comment",vme="declaration";function bme(t,a){if(typeof t!=="string")throw TypeError("First argument must be a string");if(!t)return[];a=a||{};var c=1,u=1;function f(R){var A=R.match(cme);if(A)c+=A.length;var E=R.lastIndexOf(gme);u=~E?R.length-E:u+R.length}function m(){var R={line:c,column:u};return function(A){return A.position=new p(R),k(),A}}function p(R){this.start=R,this.end={line:c,column:u},this.source=a.source}p.prototype.content=t;function g(R){var A=Error(a.source+":"+c+":"+u+": "+R);if(A.reason=R,A.filename=a.source,A.line=c,A.column=u,A.source=t,a.silent);else throw A}function v(R){var A=R.exec(t);if(!A)return;var E=A[0];return f(E),t=t.slice(E.length),A}function k(){v(ume)}function S(R){var A;R=R||[];while(A=I())if(A!==!1)R.push(A);return R}function I(){var R=m();if(UU!=t.charAt(0)||qU!=t.charAt(1))return;var A=2;while(cm!=t.charAt(A)&&(qU!=t.charAt(A)||UU!=t.charAt(A+1)))++A;if(A+=2,cm===t.charAt(A-1))return g("End of comment missing");var E=t.slice(2,A-2);return u+=2,f(E),t=t.slice(A),u+=2,R({type:xme,comment:E})}function T(){var R=m(),A=v(dme);if(!A)return;if(I(),!v(fme))return g("property missing ':'");var E=v(mme),P=R({type:vme,property:HU(A[0].replace(VU,cm)),value:E?HU(E[0].replace(VU,cm)):cm});return v(pme),P}function L(){var R=[];S(R);var A;while(A=T())if(A!==!1)R.push(A),S(R);return R}return k(),L()}function HU(t){return t?t.replace(hme,cm):cm}jU.exports=bme});var $U=Ze(function(Pv){var yme=Pv&&Pv.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Pv,"__esModule",{value:!0});Pv.default=kme;var wme=yme(GU());function kme(t,a){let c=null;if(!t||typeof t!=="string")return c;let u=(0,wme.default)(t),f=typeof a==="function";return u.forEach((m)=>{if(m.type!=="declaration")return;let{property:p,value:g}=m;if(f)a(p,g,m);else if(g)c=c||{},c[p]=g}),c}});var YU=Ze(function(WU){Object.defineProperty(WU,"__esModule",{value:!0});WU.camelCase=void 0;var Sme=/^--[a-zA-Z0-9_-]+$/,Cme=/-([a-z])/g,Ime=/^[^-]+$/,Tme=/^-(webkit|moz|ms|o|khtml)-/,Lme=/^-(ms)-/,Rme=function(t){return!t||Ime.test(t)||Sme.test(t)},Eme=function(t,a){return a.toUpperCase()},KU=function(t,a){return"".concat(a,"-")},Pme=function(t,a){if(a===void 0)a={};if(Rme(t))return t;if(t=t.toLowerCase(),a.reactCompat)t=t.replace(Lme,KU);else t=t.replace(Tme,KU);return t.replace(Cme,Eme)};WU.camelCase=Pme});var ZU=Ze(function(AE,QU){var Ame=AE&&AE.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Mme=Ame($U()),Dme=YU();function PE(t,a){var c={};if(!t||typeof t!=="string")return c;return(0,Mme.default)(t,function(u,f){if(u&&f)c[(0,Dme.camelCase)(u,a)]=f}),c}PE.default=PE;QU.exports=PE});var yH=Ze(function(jer,bH){var xS=Object.prototype.hasOwnProperty,vH=Object.prototype.toString,{defineProperty:fH,getOwnPropertyDescriptor:mH}=Object,pH=function(a){if(typeof Array.isArray==="function")return Array.isArray(a);return vH.call(a)==="[object Array]"},hH=function(a){if(!a||vH.call(a)!=="[object Object]")return!1;var c=xS.call(a,"constructor"),u=a.constructor&&a.constructor.prototype&&xS.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!c&&!u)return!1;var f;for(f in a);return typeof f>"u"||xS.call(a,f)},gH=function(a,c){if(fH&&c.name==="__proto__")fH(a,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0});else a[c.name]=c.newValue},xH=function(a,c){if(c==="__proto__"){if(!xS.call(a,c))return;else if(mH)return mH(a,c).value}return a[c]};bH.exports=function t(){var a,c,u,f,m,p,g=arguments[0],v=1,k=arguments.length,S=!1;if(typeof g==="boolean")S=g,g=arguments[1]||{},v=2;if(g==null||typeof g!=="object"&&typeof g!=="function")g={};for(;v<k;++v)if(a=arguments[v],a!=null){for(c in a)if(u=xH(g,c),f=xH(a,c),g!==f){if(S&&f&&(hH(f)||(m=pH(f)))){if(m)m=!1,p=u&&pH(u)?u:[];else p=u&&hH(u)?u:{};gH(g,{name:c,newValue:t(S,p,f)})}else if(typeof f<"u")gH(g,{name:c,newValue:f})}}return g}});var Ct={};ng(Ct,{Activity:()=>$4,Children:()=>Uo,Component:()=>Vc,Fragment:()=>Xe,Profiler:()=>K4,PureComponent:()=>W4,StrictMode:()=>Cb,Suspense:()=>qo,ViewTransition:()=>X4,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:()=>Nm,__COMPILER_RUNTIME:()=>Y4,addTransitionType:()=>Q4,cache:()=>Z4,cacheSignal:()=>J4,cloneElement:()=>wa,createContext:()=>jt,createElement:()=>ct,createRef:()=>eM,forwardRef:()=>_e,isValidElement:()=>eo,lazy:()=>Ib,memo:()=>q,startTransition:()=>Om,unstable_useCacheRefresh:()=>tM,use:()=>Tb,useActionState:()=>nM,useCallback:()=>y,useContext:()=>M,useDebugValue:()=>rM,useDeferredValue:()=>oM,useEffect:()=>o,useEffectEvent:()=>aM,useId:()=>ee,useImperativeHandle:()=>Lb,useInsertionEffect:()=>Uc,useLayoutEffect:()=>K,useMemo:()=>w,useOptimistic:()=>iM,useReducer:()=>qc,useRef:()=>i,useState:()=>r,useSyncExternalStore:()=>Kr,useTransition:()=>sM,version:()=>Rb},{Activity:($1e)=>$4=$1e,Children:($1e)=>Uo=$1e,Component:($1e)=>Vc=$1e,Fragment:($1e)=>Xe=$1e,Profiler:($1e)=>K4=$1e,PureComponent:($1e)=>W4=$1e,StrictMode:($1e)=>Cb=$1e,Suspense:($1e)=>qo=$1e,ViewTransition:($1e)=>X4=$1e,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:($1e)=>Nm=$1e,__COMPILER_RUNTIME:($1e)=>Y4=$1e,addTransitionType:($1e)=>Q4=$1e,cache:($1e)=>Z4=$1e,cacheSignal:($1e)=>J4=$1e,cloneElement:($1e)=>wa=$1e,createContext:($1e)=>jt=$1e,createElement:($1e)=>ct=$1e,createRef:($1e)=>eM=$1e,forwardRef:($1e)=>_e=$1e,isValidElement:($1e)=>eo=$1e,lazy:($1e)=>Ib=$1e,memo:($1e)=>q=$1e,startTransition:($1e)=>Om=$1e,unstable_useCacheRefresh:($1e)=>tM=$1e,use:($1e)=>Tb=$1e,useActionState:($1e)=>nM=$1e,useCallback:($1e)=>y=$1e,useContext:($1e)=>M=$1e,useDebugValue:($1e)=>rM=$1e,useDeferredValue:($1e)=>oM=$1e,useEffect:($1e)=>o=$1e,useEffectEvent:($1e)=>aM=$1e,useId:($1e)=>ee=$1e,useImperativeHandle:($1e)=>Lb=$1e,useInsertionEffect:($1e)=>Uc=$1e,useLayoutEffect:($1e)=>K=$1e,useMemo:($1e)=>w=$1e,useOptimistic:($1e)=>iM=$1e,useReducer:($1e)=>qc=$1e,useRef:($1e)=>i=$1e,useState:($1e)=>r=$1e,useSyncExternalStore:($1e)=>Kr=$1e,useTransition:($1e)=>sM=$1e,version:($1e)=>Rb=$1e});var bd={};ng(bd,{unstable_now:()=>Qi,unstable_IdlePriority:()=>Nb,unstable_ImmediatePriority:()=>Ob,unstable_LowPriority:()=>_b,unstable_NormalPriority:()=>yd,unstable_Profiling:()=>pM,unstable_UserBlockingPriority:()=>zb,unstable_cancelCallback:()=>Bb,unstable_forceFrameRate:()=>hM,unstable_getCurrentPriorityLevel:()=>Fb,unstable_next:()=>gM,unstable_requestPaint:()=>Vb,unstable_runWithPriority:()=>xM,unstable_scheduleCallback:()=>wd,unstable_shouldYield:()=>Ub,unstable_wrapCallback:()=>vM},{unstable_now:(K1e)=>Qi=K1e,unstable_IdlePriority:(K1e)=>Nb=K1e,unstable_ImmediatePriority:(K1e)=>Ob=K1e,unstable_LowPriority:(K1e)=>_b=K1e,unstable_NormalPriority:(K1e)=>yd=K1e,unstable_Profiling:(K1e)=>pM=K1e,unstable_UserBlockingPriority:(K1e)=>zb=K1e,unstable_cancelCallback:(K1e)=>Bb=K1e,unstable_forceFrameRate:(K1e)=>hM=K1e,unstable_getCurrentPriorityLevel:(K1e)=>Fb=K1e,unstable_next:(K1e)=>gM=K1e,unstable_requestPaint:(K1e)=>Vb=K1e,unstable_runWithPriority:(K1e)=>xM=K1e,unstable_scheduleCallback:(K1e)=>wd=K1e,unstable_shouldYield:(K1e)=>Ub=K1e,unstable_wrapCallback:(K1e)=>vM=K1e});var ql={};ng(ql,{__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:()=>Hb,browser:()=>wM,createPortal:()=>Vt,flushSync:()=>kd,preconnect:()=>kM,prefetchDNS:()=>SM,preinit:()=>CM,preinitModule:()=>IM,preload:()=>TM,preloadModule:()=>LM,requestFormReset:()=>RM,unstable_batchedUpdates:()=>EM,useFormState:()=>PM,useFormStatus:()=>AM,version:()=>MM},{});var kT={};ng(kT,{Fragment:()=>h,jsx:()=>e,jsxs:()=>n},{Fragment:(ewe)=>h=ewe,jsx:(ewe)=>e=ewe,jsxs:(ewe)=>n=ewe});var yL={};wn(yL,{PluginWebUIContext:()=>Je,SlotButton:()=>Are,useDraftReplace:()=>Pre,usePluginWebUI:()=>x});var Ev={};wn(Ev,{boolean:()=>qt,booleanish:()=>xr,commaOrSpaceSeparated:()=>Oa,commaSeparated:()=>Nc,number:()=>We,overloadedBoolean:()=>jk,spaceSeparated:()=>Tn});var QE={};wn(QE,{attentionMarkers:()=>ghe,contentInitial:()=>uhe,disable:()=>xhe,document:()=>che,flow:()=>fhe,flowInitial:()=>dhe,insideSpan:()=>hhe,string:()=>mhe,text:()=>phe});var p4={};ng(p4,{Fragment:()=>UW,jsxDEV:()=>qW},{Fragment:(t2r)=>UW=t2r,jsxDEV:(t2r)=>qW=t2r});var h4={};wn(h4,{Button:()=>b,Callout:()=>ba,CatalogRow:()=>Mi,Chevron:()=>tt,Code:()=>Ts,CodeBlock:()=>dE,Collapsible:()=>Oe,CollapsibleContent:()=>De,CollapsibleTrigger:()=>$e,CopyButton:()=>Ot,DEFAULT_DARK_TOKENS:()=>Uw,DEFAULT_FONTS:()=>Fw,DEFAULT_LIGHT_TOKENS:()=>Vw,DEFAULT_RECIPES:()=>Zn,DEFAULT_THEME_ID:()=>sl,Dialog:()=>Yt,DialogFooter:()=>im,DialogHost:()=>gE,Field:()=>ue,Form:()=>Zt,FormError:()=>wt,IconButton:()=>j,Input:()=>te,Kbd:()=>je,Menu:()=>Jt,MenuCheckItem:()=>Uh,MenuGroup:()=>j0e,MenuItem:()=>ke,MenuLabel:()=>vA,MenuSeparator:()=>rr,NavTabs:()=>wfe,Panel:()=>Ro,Popover:()=>Tm,Segmented:()=>Pi,Select:()=>Xt,StatusChip:()=>it,Switch:()=>_t,Textarea:()=>yr,Toaster:()=>kE,Tooltip:()=>ui,TooltipProvider:()=>kv,buttonVariants:()=>yU,cn:()=>d,confirm:()=>Ke,confirmChoice:()=>pE,control:()=>Sv,dialogPanel:()=>yh,dialogSheetMedia:()=>zk,floating:()=>xE,floatingItem:()=>vfe,floatingLabel:()=>bfe,floatingSeparator:()=>yfe,focusPanel:()=>Bk,formatShortcut:()=>bU,getResolvedTheme:()=>zL,overlay:()=>td,promptText:()=>hE,radixDisabled:()=>wh,setTheme:()=>jr,setThemeID:()=>Jo,style:()=>l,toast:()=>le,toastError:()=>V,useAvailableThemes:()=>es,useTheme:()=>_});var y2=Symbol.for("react.transitional.element"),tY=Symbol.for("react.portal"),nY=Symbol.for("react.fragment"),rY=Symbol.for("react.strict_mode"),oY=Symbol.for("react.profiler"),aY=Symbol.for("react.consumer"),iY=Symbol.for("react.context"),sY=Symbol.for("react.forward_ref"),lY=Symbol.for("react.suspense"),cY=Symbol.for("react.memo"),B4=Symbol.for("react.lazy"),uY=Symbol.for("react.activity"),dY=Symbol.for("react.view_transition"),N4=Symbol.iterator;function fY(t){if(t===null||typeof t!=="object")return null;return t=N4&&t[N4]||t["@@iterator"],typeof t==="function"?t:null}var F4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V4=Object.assign,U4={};function Dm(t,a,c){this.props=t,this.context=a,this.refs=U4,this.updater=c||F4}Dm.prototype.isReactComponent={};Dm.prototype.setState=function(t,a){if(typeof t!=="object"&&typeof t!=="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,a,"setState")};Dm.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function q4(){}q4.prototype=Dm.prototype;function w2(t,a,c){this.props=t,this.context=a,this.refs=U4,this.updater=c||F4}var k2=w2.prototype=new q4;k2.constructor=w2;V4(k2,Dm.prototype);k2.isPureReactComponent=!0;var O4=Array.isArray;function b2(){}var Un={H:null,A:null,T:null,S:null},H4=Object.prototype.hasOwnProperty;function S2(t,a,c){var u=c.ref;return{$$typeof:y2,type:t,key:a,ref:u!==void 0?u:null,props:c}}function mY(t,a){return S2(t.type,a,t.props)}function C2(t){return typeof t==="object"&&t!==null&&t.$$typeof===y2}function pY(t){var a={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(c){return a[c]})}var _4=/\/+/g;function v2(t,a){return typeof t==="object"&&t!==null&&t.key!=null?pY(""+t.key):a.toString(36)}function hY(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status==="string"?t.then(b2,b2):(t.status="pending",t.then(function(a){t.status==="pending"&&(t.status="fulfilled",t.value=a)},function(a){t.status==="pending"&&(t.status="rejected",t.reason=a)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function Mm(t,a,c,u,f){var m=typeof t;if(m==="undefined"||m==="boolean")t=null;var p=!1;if(t===null)p=!0;else switch(m){case"bigint":case"string":case"number":p=!0;break;case"object":switch(t.$$typeof){case y2:case tY:p=!0;break;case B4:return p=t._init,Mm(p(t._payload),a,c,u,f)}}if(p)return f=f(t),p=u===""?"."+v2(t,0):u,O4(f)?(c="",p!=null&&(c=p.replace(_4,"$&/")+"/"),Mm(f,a,c,"",function(k){return k})):f!=null&&(C2(f)&&(f=mY(f,c+(f.key==null||t&&t.key===f.key?"":(""+f.key).replace(_4,"$&/")+"/")+p)),a.push(f)),1;p=0;var g=u===""?".":u+":";if(O4(t))for(var v=0;v<t.length;v++)u=t[v],m=g+v2(u,v),p+=Mm(u,a,c,m,f);else if(v=fY(t),typeof v==="function")for(t=v.call(t),v=0;!(u=t.next()).done;)u=u.value,m=g+v2(u,v++),p+=Mm(u,a,c,m,f);else if(m==="object"){if(typeof t.then==="function")return Mm(hY(t),a,c,u,f);throw a=String(t),Error("Objects are not valid as a React child (found: "+(a==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.")}return p}function Sb(t,a,c){if(t==null)return t;var u=[],f=0;return Mm(t,u,"","",function(m){return a.call(c,m,f++)}),u}function gY(t){if(t._status===-1){var a=t._result,c=a();c.then(function(u){if(t._status===0||t._status===-1)t._status=1,t._result=u,c.status===void 0&&(c.status="fulfilled",c.value=u)},function(u){if(t._status===0||t._status===-1)t._status=2,t._result=u,c.status===void 0&&(c.status="rejected",c.reason=u)}),t._status===-1&&(t._status=0,t._result=c)}if(t._status===1)return t._result.default;throw t._result}var z4=typeof reportError==="function"?reportError:function(t){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t==="object"&&t!==null&&typeof t.message==="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",t);return}console.error(t)};function j4(t){var a=Un.T,c={};c.types=a!==null?a.types:null,Un.T=c;try{var u=t(),f=Un.S;f!==null&&f(c,u),typeof u==="object"&&u!==null&&typeof u.then==="function"&&u.then(b2,z4)}catch(m){z4(m)}finally{a!==null&&c.types!==null&&(a.types=c.types),Un.T=a}}function G4(t){var a=Un.T;if(a!==null){var c=a.types;c===null?a.types=[t]:c.indexOf(t)===-1&&c.push(t)}else j4(G4.bind(null,t))}var xY={map:Sb,forEach:function(t,a,c){Sb(t,function(){a.apply(this,arguments)},c)},count:function(t){var a=0;return Sb(t,function(){a++}),a},toArray:function(t){return Sb(t,function(a){return a})||[]},only:function(t){if(!C2(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};var $4=uY,Uo=xY,Vc=Dm,Xe=nY,K4=oY,W4=w2,Cb=rY,qo=lY,X4=dY,Nm=Un,Y4={__proto__:null,c:function(t){return Un.H.useMemoCache(t)}},Q4=G4,Z4=function(t){return function(){return t.apply(null,arguments)}},J4=function(){return null},wa=function(t,a,c){if(t===null||t===void 0)throw Error("The argument must be a React element, but you passed "+t+".");var u=V4({},t.props),f=t.key;if(a!=null)for(m in a.key!==void 0&&(f=""+a.key),a)!H4.call(a,m)||m==="key"||m==="__self"||m==="__source"||m==="ref"&&a.ref===void 0||(u[m]=a[m]);var m=arguments.length-2;if(m===1)u.children=c;else if(1<m){for(var p=Array(m),g=0;g<m;g++)p[g]=arguments[g+2];u.children=p}return S2(t.type,f,u)},jt=function(t){return t={$$typeof:iY,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:aY,_context:t},t},ct=function(t,a,c){var u,f={},m=null;if(a!=null)for(u in a.key!==void 0&&(m=""+a.key),a)H4.call(a,u)&&u!=="key"&&u!=="__self"&&u!=="__source"&&(f[u]=a[u]);var p=arguments.length-2;if(p===1)f.children=c;else if(1<p){for(var g=Array(p),v=0;v<p;v++)g[v]=arguments[v+2];f.children=g}if(t&&t.defaultProps)for(u in p=t.defaultProps,p)f[u]===void 0&&(f[u]=p[u]);return S2(t,m,f)},eM=function(){return{current:null}},_e=function(t){return{$$typeof:sY,render:t}},eo=C2,Ib=function(t){return{$$typeof:B4,_payload:{_status:-1,_result:t},_init:gY}},q=function(t,a){return{$$typeof:cY,type:t,compare:a===void 0?null:a}},Om=j4,tM=function(){return Un.H.useCacheRefresh()},Tb=function(t){return Un.H.use(t)},nM=function(t,a,c){return Un.H.useActionState(t,a,c)},y=function(t,a){return Un.H.useCallback(t,a)},M=function(t){return Un.H.useContext(t)},rM=function(){},oM=function(t,a){return Un.H.useDeferredValue(t,a)},o=function(t,a){return Un.H.useEffect(t,a)},aM=function(t){return Un.H.useEffectEvent(t)},ee=function(){return Un.H.useId()},Lb=function(t,a,c){return Un.H.useImperativeHandle(t,a,c)},Uc=function(t,a){return Un.H.useInsertionEffect(t,a)},K=function(t,a){return Un.H.useLayoutEffect(t,a)},w=function(t,a){return Un.H.useMemo(t,a)},iM=function(t,a){return Un.H.useOptimistic(t,a)},qc=function(t,a,c){return Un.H.useReducer(t,a,c)},i=function(t){return Un.H.useRef(t)},r=function(t){return Un.H.useState(t)},Kr=function(t,a,c){return Un.H.useSyncExternalStore(t,a,c)},sM=function(){return Un.H.useTransition()},Rb="19.3.1";function d8(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d8)}catch(t){console.error(t)}}function T2(t,a){var c=t.length;t.push(a);e:for(;0<c;){var u=c-1>>>1,f=t[u];if(0<Eb(f,a))t[u]=a,t[c]=f,c=u;else break e}}function Ds(t){return t.length===0?null:t[0]}function Db(t){if(t.length===0)return null;var a=t[0],c=t.pop();if(c!==a){t[0]=c;e:for(var u=0,f=t.length,m=f>>>1;u<m;){var p=2*(u+1)-1,g=t[p],v=p+1,k=t[v];if(0>Eb(g,c))v<f&&0>Eb(k,g)?(t[u]=k,t[v]=c,u=v):(t[u]=g,t[p]=c,u=p);else if(v<f&&0>Eb(k,c))t[u]=k,t[v]=c,u=v;else break e}}return a}function Eb(t,a){var c=t.sortIndex-a.sortIndex;return c!==0?c:t.id-a.id}var Qi=void 0;if(typeof performance==="object"&&typeof performance.now==="function")L2=performance,Qi=function(){return L2.now()};else Pb=Date,R2=Pb.now(),Qi=function(){return Pb.now()-R2};var L2,Pb,R2,Ul=[],Hc=[],vY=1,hi=null,Mo=3,E2=!1,rg=!1,og=!1,A2=!1,cM=typeof setTimeout==="function"?setTimeout:null,uM=typeof clearTimeout==="function"?clearTimeout:null,lM=typeof setImmediate<"u"?setImmediate:null;function Ab(t){for(var a=Ds(Hc);a!==null;){if(a.callback===null)Db(Hc);else if(a.startTime<=t)Db(Hc),a.sortIndex=a.expirationTime,T2(Ul,a);else break;a=Ds(Hc)}}function M2(t){if(og=!1,Ab(t),!rg)if(Ds(Ul)!==null)rg=!0,zm||(zm=!0,_m());else{var a=Ds(Hc);a!==null&&D2(M2,a.startTime-t)}}var zm=!1,ag=-1,dM=5,fM=-1;function mM(){return A2?!0:bd.unstable_now()-fM<dM?!1:!0}function I2(){if(A2=!1,zm){var t=bd.unstable_now();fM=t;var a=!0;try{e:{rg=!1,og&&(og=!1,uM(ag),ag=-1),E2=!0;var c=Mo;try{t:{Ab(t);for(hi=Ds(Ul);hi!==null&&!(hi.expirationTime>t&&mM());){var u=hi.callback;if(typeof u==="function"){hi.callback=null,Mo=hi.priorityLevel;var f=u(hi.expirationTime<=t);if(t=bd.unstable_now(),typeof f==="function"){hi.callback=f,Ab(t),a=!0;break t}hi===Ds(Ul)&&Db(Ul),Ab(t)}else Db(Ul);hi=Ds(Ul)}if(hi!==null)a=!0;else{var m=Ds(Hc);m!==null&&D2(M2,m.startTime-t),a=!1}}break e}finally{hi=null,Mo=c,E2=!1}a=void 0}}finally{a?_m():zm=!1}}}var _m;if(typeof lM==="function")_m=function(){lM(I2)};else if(typeof MessageChannel<"u")Mb=new MessageChannel,P2=Mb.port2,Mb.port1.onmessage=I2,_m=function(){P2.postMessage(null)};else _m=function(){cM(I2,0)};var Mb,P2;function D2(t,a){ag=cM(function(){t(bd.unstable_now())},a)}var Nb=5,Ob=1,_b=4,yd=3,pM=null,zb=2,Bb=function(t){t.callback=null},hM=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):dM=0<t?Math.floor(1000/t):5},Fb=function(){return Mo},gM=function(t){switch(Mo){case 1:case 2:case 3:var a=3;break;default:a=Mo}var c=Mo;Mo=a;try{return t()}finally{Mo=c}},Vb=function(){A2=!0},xM=function(t,a){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var c=Mo;Mo=t;try{return a()}finally{Mo=c}},wd=function(t,a,c){var u=bd.unstable_now();switch(typeof c==="object"&&c!==null?(c=c.delay,c=typeof c==="number"&&0<c?u+c:u):c=u,t){case 1:var f=-1;break;case 2:f=250;break;case 5:f=1073741823;break;case 4:f=1e4;break;default:f=5000}return f=c+f,t={id:vY++,callback:a,priorityLevel:t,startTime:c,expirationTime:f,sortIndex:-1},c>u?(t.sortIndex=c,T2(Hc,t),Ds(Ul)===null&&t===Ds(Hc)&&(og?(uM(ag),ag=-1):og=!0,D2(M2,c-u))):(t.sortIndex=f,T2(Ul,t),rg||E2||(rg=!0,zm||(zm=!0,_m()))),t},Ub=mM,vM=function(t){var a=Mo;return function(){var c=Mo;Mo=a;try{return t.apply(this,arguments)}finally{Mo=c}}};function DM(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(DM)}catch(t){console.error(t)}}function yM(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function jc(){}var jo={d:{f:jc,r:function(){throw Error(yM(522))},D:jc,C:jc,L:jc,m:jc,X:jc,S:jc,M:jc},p:0,findDOMNode:null},bY=Symbol.for("react.portal"),yY=Symbol.for("react.recoverable"),bM=Symbol.for("react.optimistic_key");function wY(t,a,c){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bY,key:u==null?null:u===bM?bM:""+u,children:t,containerInfo:a,implementation:c}}var ig=Nm;function qb(t,a){if(t==="font")return"";if(typeof a==="string")return a==="use-credentials"?a:""}var Hb=jo,wM=function(t){return{$$typeof:yY,_reason:t}},Vt=function(t,a){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error(yM(299));return wY(t,a,null,c)},kd=function(t){var a=ig.T,c=jo.p;try{if(ig.T=null,jo.p=2,t)return t()}finally{ig.T=a,jo.p=c,jo.d.f()}},kM=function(t,a){typeof t==="string"&&(a?(a=a.crossOrigin,a=typeof a==="string"?a==="use-credentials"?a:"":void 0):a=null,jo.d.C(t,a))},SM=function(t){typeof t==="string"&&jo.d.D(t)},CM=function(t,a){if(typeof t==="string"&&a&&typeof a.as==="string"){var c=a.as,u=qb(c,a.crossOrigin),f=typeof a.integrity==="string"?a.integrity:void 0,m=typeof a.fetchPriority==="string"?a.fetchPriority:void 0;c==="style"?jo.d.S(t,typeof a.precedence==="string"?a.precedence:void 0,{crossOrigin:u,integrity:f,fetchPriority:m}):c==="script"&&jo.d.X(t,{crossOrigin:u,integrity:f,fetchPriority:m,nonce:typeof a.nonce==="string"?a.nonce:void 0})}},IM=function(t,a){if(typeof t==="string")if(typeof a==="object"&&a!==null){if(a.as==null||a.as==="script"){var c=qb(a.as,a.crossOrigin);jo.d.M(t,{crossOrigin:c,integrity:typeof a.integrity==="string"?a.integrity:void 0,nonce:typeof a.nonce==="string"?a.nonce:void 0,fetchPriority:typeof a.fetchPriority==="string"?a.fetchPriority:void 0})}}else a==null&&jo.d.M(t)},TM=function(t,a){if(typeof t==="string"&&typeof a==="object"&&a!==null&&typeof a.as==="string"){var c=a.as,u=qb(c,a.crossOrigin);jo.d.L(t,c,{crossOrigin:u,integrity:typeof a.integrity==="string"?a.integrity:void 0,nonce:typeof a.nonce==="string"?a.nonce:void 0,type:typeof a.type==="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority==="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy==="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet==="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes==="string"?a.imageSizes:void 0,media:typeof a.media==="string"?a.media:void 0})}},LM=function(t,a){if(typeof t==="string")if(a){var c=qb(a.as,a.crossOrigin);jo.d.m(t,{as:typeof a.as==="string"&&a.as!=="script"?a.as:void 0,crossOrigin:c,integrity:typeof a.integrity==="string"?a.integrity:void 0,nonce:typeof a.nonce==="string"?a.nonce:void 0,fetchPriority:typeof a.fetchPriority==="string"?a.fetchPriority:void 0})}else jo.d.m(t)},RM=function(t){jo.d.r(t)},EM=function(t,a){return t(a)},PM=function(t,a,c){return ig.H.useFormState(t,a,c)},AM=function(){return ig.H.useHostTransitionStatus()},MM="19.3.1";DM();function Ve(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function kY(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Yg(t){for(var a=t,c=a;c&&!c.alternate;)a=c,(a.flags&4098)!==0&&(t=a.return),c=a.return;for(;a.return;)a=a.return;return a.tag===3?t:null}function gD(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function xD(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function NM(t){if(Yg(t)!==t)throw Error(Ve(188))}function SY(t){var a=t.alternate;if(!a){if(a=Yg(t),a===null)throw Error(Ve(188));return a!==t?null:t}for(var c=t,u=a;;){var f=c.return;if(f===null)break;var m=f.alternate;if(m===null){if(u=f.return,u!==null){c=u;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===c)return NM(f),t;if(m===u)return NM(f),a;m=m.sibling}throw Error(Ve(188))}if(c.return!==u.return)c=f,u=m;else{for(var p=!1,g=f.child;g;){if(g===c){p=!0,c=f,u=m;break}if(g===u){p=!0,u=f,c=m;break}g=g.sibling}if(!p){for(g=m.child;g;){if(g===c){p=!0,c=m,u=f;break}if(g===u){p=!0,u=m,c=f;break}g=g.sibling}if(!p)throw Error(Ve(189))}}if(c.alternate!==u)throw Error(Ve(190))}if(c.tag!==3)throw Error(Ve(188));return c.stateNode.current===c?t:a}function vD(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=vD(t),a!==null)return a;t=t.sibling}return null}function La(t,a,c,u,f,m){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&c(t,u,f,m)||(t.tag!==22||t.memoizedState===null)&&(a||t.tag!==5&&t.tag!==27)&&La(t.child,a,c,u,f,m))return!0;t=t.sibling}return!1}function $d(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function OM(t){var a=!1;for(t=t.return;t!==null;){if(t.tag===4&&(a=!0),t.tag===3||t.tag===5||t.tag===27)break;t=t.return}return a}function bD(t){var a=[null,null],c=$d(t);if(c===null)return a;return yD(a,t,c.child,{foundSelf:!1}),a}function yD(t,a,c,u){for(;c!==null;){if(c===a)u.foundSelf=!0;else if(c.tag===5||c.tag===27||c.tag===6){if(u.foundSelf)return t[1]=c,!0;t[0]=c}else if((c.tag!==22||c.memoizedState===null)&&yD(t,a,c.child,u))return!0;c=c.sibling}return!1}function Yr(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(Ve(559))}}var jm=null,uC=null;function CY(t,a,c){return t===c?!0:t===a?(jm=t,!0):!1}function IY(t,a,c){return t===c?(uC=t,!1):t===a?(uC!==null&&(jm=t),!0):!1}function _M(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t?t:null}function dC(t,a,c){for(var u=0,f=t;f;f=c(f))u++;f=0;for(var m=a;m;m=c(m))f++;for(;0<u-f;)t=c(t),u--;for(;0<f-u;)a=c(a),f--;for(;u--;){if(t===a||a!==null&&t===a.alternate)return t;t=c(t),a=c(a)}return null}var _n=Object.assign,TY=Symbol.for("react.element"),jb=Symbol.for("react.transitional.element"),fg=Symbol.for("react.portal"),Gm=Symbol.for("react.fragment"),wD=Symbol.for("react.strict_mode"),fC=Symbol.for("react.profiler"),kD=Symbol.for("react.consumer"),Fs=Symbol.for("react.context"),SI=Symbol.for("react.forward_ref"),mC=Symbol.for("react.suspense"),pC=Symbol.for("react.suspense_list"),CI=Symbol.for("react.memo"),Wc=Symbol.for("react.lazy"),hC=Symbol.for("react.activity"),LY=Symbol.for("react.legacy_hidden"),RY=Symbol.for("react.memo_cache_sentinel"),gC=Symbol.for("react.view_transition"),EY=Symbol.for("react.recoverable"),zM=Symbol.iterator;function sg(t){if(t===null||typeof t!=="object")return null;return t=zM&&t[zM]||t["@@iterator"],typeof t==="function"?t:null}var PY=Symbol.for("react.client.reference");function xC(t){if(t==null)return null;if(typeof t==="function")return t.$$typeof===PY?null:t.displayName||t.name||null;if(typeof t==="string")return t;switch(t){case Gm:return"Fragment";case fC:return"Profiler";case wD:return"StrictMode";case mC:return"Suspense";case pC:return"SuspenseList";case hC:return"Activity";case gC:return"ViewTransition"}if(typeof t==="object")switch(t.$$typeof){case fg:return"Portal";case Fs:return t.displayName||"Context";case kD:return(t._context.displayName||"Context")+".Consumer";case SI:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case CI:return a=t.displayName||null,a!==null?a:xC(t.type)||"Memo";case Wc:a=t._payload,t=t._init;try{return xC(t(a))}catch(c){}}return null}var mg=Array.isArray,Ft=Nm,yn=Hb,Ad={pending:!1,data:null,method:null,action:null},vC=[],$m=-1;function Qs(t){return{current:t}}function ko(t){0>$m||(t.current=vC[$m],vC[$m]=null,$m--)}function jn(t,a){$m++,vC[$m]=t.current,t.current=a}var $s=Qs(null),Ng=Qs(null),ru=Qs(null),Ly=Qs(null);function Ry(t,a){switch(jn(ru,a),jn(Ng,t),jn($s,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)?(t=t.namespaceURI)?X3(t):0:0;break;default:if(t=a.tagName,a=a.namespaceURI)a=X3(a),t=H6(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}ko($s),jn($s,t)}function fp(){ko($s),ko(Ng),ko(ru)}function bC(t){var a=t.memoizedState;a!==null&&(kp._currentValue=a.memoizedState,jn(Ly,t)),a=$s.current;var c=H6(a,t.type);a!==c&&(jn(Ng,t),jn($s,c))}function Ey(t){Ng.current===t&&(ko($s),ko(Ng)),Ly.current===t&&(ko(Ly),kp._currentValue=Ad)}var N2,BM;function $c(t){if(N2===void 0)try{throw Error()}catch(c){var a=c.stack.trim().match(/\n( *(at )?)/);N2=a&&a[1]||"",BM=-1<c.stack.indexOf(`
4
+ at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
5
+ `+N2+t+BM}var O2=!1;function _2(t,a){if(!t||O2)return"";O2=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(R){var T=R}Reflect.construct(t,[],I)}else{try{I.call()}catch(R){T=R}I=!1;try{var L=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),I=!0,new t}finally{I&&(L!==void 0?Object.defineProperty(t.prototype,"props",L):delete t.prototype.props)}}}else{try{throw Error()}catch(R){T=R}(I=t())&&typeof I.catch==="function"&&I.catch(function(){})}}catch(R){if(R&&T&&typeof R.stack==="string")return[R.stack,T.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=u.DetermineComponentFrameRoot(),p=m[0],g=m[1];if(p&&g){var v=p.split(`
6
+ `),k=g.split(`
7
+ `);for(f=u=0;u<v.length&&!v[u].includes("DetermineComponentFrameRoot");)u++;for(;f<k.length&&!k[f].includes("DetermineComponentFrameRoot");)f++;if(u===v.length||f===k.length)for(u=v.length-1,f=k.length-1;1<=u&&0<=f&&v[u]!==k[f];)f--;for(;1<=u&&0<=f;u--,f--)if(v[u]!==k[f]){if(u!==1||f!==1)do if(u--,f--,0>f||v[u]!==k[f]){var S=`
8
+ `+v[u].replace(" at new "," at ");return t.displayName&&S.includes("<anonymous>")&&(S=S.replace("<anonymous>",t.displayName)),S}while(1<=u&&0<=f);break}}}finally{O2=!1,Error.prepareStackTrace=c}return(c=t?t.displayName||t.name:"")?$c(c):""}function AY(t,a){switch(t.tag){case 26:case 27:case 5:return $c(t.type);case 16:return $c("Lazy");case 13:return t.child!==a&&a!==null?$c("Suspense Fallback"):$c("Suspense");case 19:return $c("SuspenseList");case 0:case 15:return _2(t.type,!1);case 11:return _2(t.type.render,!1);case 1:return _2(t.type,!0);case 31:return $c("Activity");case 30:return $c("ViewTransition");default:return""}}function FM(t){try{var a="",c=null;do a+=AY(t,c),c=t,t=t.return;while(t);return a}catch(u){return`
9
+ Error generating stack: `+u.message+`
10
+ `+u.stack}}var yC=Object.prototype.hasOwnProperty,II=wd,z2=Bb,MY=Ub,DY=Vb,ja=Qi,NY=Fb,SD=Ob,CD=zb,Py=yd,OY=_b,ID=Nb,_Y=void 0,zY=void 0,Qg=null,Ga=null;function Qc(t){if(typeof _Y==="function"&&zY(t),Ga&&typeof Ga.setStrictMode==="function")try{Ga.setStrictMode(Qg,t)}catch(a){}}var $a=Math.clz32?Math.clz32:VY,{log:BY,LN2:FY}=Math;function VY(t){return t>>>=0,t===0?32:31-(BY(t)/FY|0)|0}var Gb=256,$b=262144,Kb=4194304;function Id(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function n1(t,a,c){var u=t.pendingLanes;if(u===0)return 0;var f=0,m=t.suspendedLanes,p=t.pingedLanes;t=t.warmLanes;var g=u&134217727;return g!==0?(u=g&~m,u!==0?f=Id(u):(p&=g,p!==0?f=Id(p):c||(c=g&~t,c!==0&&(f=Id(c))))):(g=u&~m,g!==0?f=Id(g):p!==0?f=Id(p):c||(c=u&~t,c!==0&&(f=Id(c)))),f===0?0:a!==0&&a!==f&&(a&m)===0&&(m=f&-f,c=a&-a,m>=c||m===32&&(c&4194048)!==0)?a:f}function Zg(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function TD(t,a){(a&8)!==0&&(a|=a&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=a;0<c;){var u=31-$a(c),f=1<<u;a|=t[u],c&=~f}return a}function UY(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5000;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function LD(){var t=Kb;return Kb<<=1,(Kb&62914560)===0&&(Kb=4194304),t}function B2(t){for(var a=[],c=0;31>c;c++)a.push(t);return a}function r1(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function qY(t,a,c,u,f,m){var p=t.pendingLanes;t.pendingLanes=c,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=c,t.entangledLanes&=c,t.errorRecoveryDisabledLanes&=c,t.shellSuspendCounter=0;var{entanglements:g,expirationTimes:v,hiddenUpdates:k}=t;for(c=p&~c;0<c;){var S=31-$a(c),I=1<<S;g[S]=0,v[S]=-1;var T=k[S];if(T!==null)for(k[S]=null,S=0;S<T.length;S++){var L=T[S];L!==null&&(L.lane&=-536870913)}c&=~I}u!==0&&RD(t,u,0),m!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=m&~(p&~a))}function RD(t,a,c){t.pendingLanes|=a,t.suspendedLanes&=~a;var u=31-$a(a);t.entangledLanes|=a,t.entanglements[u]=t.entanglements[u]|1073741824|c&261930}function ED(t,a){var c=t.entangledLanes|=a;for(t=t.entanglements;c;){var u=31-$a(c),f=1<<u;f&a|t[u]&a&&(t[u]|=a),c&=~f}}function PD(t,a){var c=a&-a;return c=(c&42)!==0?1:AD(c),(c&(t.suspendedLanes|a))!==0?0:c}function AD(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function TI(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function MD(){var t=yn.p;if(t!==0)return t;return t=window.event,t===void 0?32:c8(t.type)}function VM(t,a){var c=yn.p;try{return yn.p=t,a()}finally{yn.p=c}}var tc=Math.random().toString(36).slice(2),yo="__reactFiber$"+tc,Ra="__reactProps$"+tc,Jg="__reactContainer$"+tc,UM="__reactEvents$"+tc,HY="__reactListeners$"+tc,jY="__reactHandles$"+tc,qM="__reactResources$"+tc,ex="__reactMarker$"+tc,Ay="__reactLoad$"+tc;function o1(t){delete t[yo],delete t[Ra],delete t[HY],delete t[jY]}function Ed(t){var a;if(a=t[yo])return a;for(var c=t.parentNode;c;){if(a=c[Jg]||c[yo]){if(c=a.alternate,a.child!==null||c!==null&&c.child!==null)for(t=rD(t);t!==null;){if(c=t[yo])return c;t=rD(t)}return a}t=c,c=t.parentNode}return null}function Ip(t){if(t=t[yo]||t[Jg]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function pg(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(Ve(33))}function np(t){var a=t[qM];return a||(a=t[qM]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function ro(t){t[ex]=!0}function DD(t){t[Ay]=void 0}var ND=new Set,OD={};function Kd(t,a){mp(t,a),mp(t+"Capture",a)}function mp(t,a){OD[t]=a;for(t=0;t<a.length;t++)ND.add(a[t])}var GY=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),HM={},jM={};function $Y(t){if(yC.call(jM,t))return!0;if(yC.call(HM,t))return!1;if(GY.test(t))return jM[t]=!0;return HM[t]=!0,!1}var gn=!1;function GM(){var t=gn;return gn=!1,t}function sy(t,a,c){if($Y(a))if(c===null)t.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,c)}}function Wb(t,a,c){if(c===null)t.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,c)}}function Hl(t,a,c,u){if(u===null)t.removeAttribute(c);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(c);return}t.setAttributeNS(a,c,u)}}function Va(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function _D(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function KY(t,a,c){var u=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get==="function"&&typeof u.set==="function"){var{get:f,set:m}=u;return Object.defineProperty(t,a,{configurable:!0,get:function(){return f.call(this)},set:function(p){c=""+p,m.call(this,p)}}),Object.defineProperty(t,a,{enumerable:u.enumerable}),{getValue:function(){return c},setValue:function(p){c=""+p},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function wC(t){if(!t._valueTracker){var a=_D(t)?"checked":"value";t._valueTracker=KY(t,a,""+t[a])}}function zD(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var c=a.getValue(),u="";return t&&(u=_D(t)?t.checked?"true":"false":t.value),t=u,t!==c?(a.setValue(t),!0):!1}var WY=/[\n"\\]/g;function yi(t){return t.replace(WY,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function kC(t,a,c,u,f,m,p,g){if(t.name="",p!=null&&typeof p!=="function"&&typeof p!=="symbol"&&typeof p!=="boolean"?t.type=p:t.removeAttribute("type"),a!=null)if(p==="number"){if(a===0&&t.value===""||t.value!=a)t.value=""+Va(a)}else t.value!==""+Va(a)&&(t.value=""+Va(a));else p!=="submit"&&p!=="reset"||t.removeAttribute("value");a!=null?p==="number"&&t.value==a?F2(t,Va(t.value)):F2(t,Va(a)):c!=null?F2(t,Va(c)):u!=null&&t.removeAttribute("value"),f==null&&m!=null&&(t.defaultChecked=!!m),f!=null&&(t.checked=f&&typeof f!=="function"&&typeof f!=="symbol"),g!=null&&typeof g!=="function"&&typeof g!=="symbol"&&typeof g!=="boolean"?t.name=""+Va(g):t.removeAttribute("name")}function BD(t,a,c,u,f,m,p,g){if(m!=null&&typeof m!=="function"&&typeof m!=="symbol"&&typeof m!=="boolean"&&(t.type=m),a!=null||c!=null){if(!(m!=="submit"&&m!=="reset"||a!==void 0&&a!==null)){wC(t);return}c=c!=null?""+Va(c):"",a=a!=null?""+Va(a):c,g||a===t.value||(t.value=a),t.defaultValue=a}u=u!=null?u:f,u=typeof u!=="function"&&typeof u!=="symbol"&&!!u,t.checked=g?t.checked:!!u,t.defaultChecked=!!u,p!=null&&typeof p!=="function"&&typeof p!=="symbol"&&typeof p!=="boolean"&&(t.name=p),wC(t)}function F2(t,a){t.defaultValue!==""+a&&(t.defaultValue=""+a)}function rp(t,a,c,u){if(t=t.options,a){a={};for(var f=0;f<c.length;f++)a["$"+c[f]]=!0;for(c=0;c<t.length;c++)f=a.hasOwnProperty("$"+t[c].value),t[c].selected!==f&&(t[c].selected=f),f&&u&&(t[c].defaultSelected=!0)}else{c=""+Va(c),a=null;for(f=0;f<t.length;f++){if(t[f].value===c){t[f].selected=!0,u&&(t[f].defaultSelected=!0);return}a!==null||t[f].disabled||(a=t[f])}a!==null&&(a.selected=!0)}}function FD(t,a,c){if(a!=null&&(a=""+Va(a),a!==t.value&&(t.value=a),c==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=c!=null?""+Va(c):""}function VD(t,a,c,u){if(a==null){if(u!=null){if(c!=null)throw Error(Ve(92));if(mg(u)){if(1<u.length)throw Error(Ve(93));u=u[0]}c=u}c==null&&(c=""),a=c}c=Va(a),t.defaultValue=c,u=t.textContent,u===c&&u!==""&&u!==null&&(t.value=u),wC(t)}function pp(t,a){if(a){var c=t.firstChild;if(c&&c===t.lastChild&&c.nodeType===3){c.nodeValue=a;return}}t.textContent=a}var XY=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function $M(t,a,c){var u=a.indexOf("--")===0;c==null||typeof c==="boolean"||c===""?u?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":u?t.setProperty(a,c):typeof c!=="number"||c===0||XY.has(a)?a==="float"?t.cssFloat=c:t[a]=(""+c).trim():t[a]=c+"px"}function UD(t,a,c){if(a!=null&&typeof a!=="object")throw Error(Ve(62));if(t=t.style,c!=null){for(var u in c)!c.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="",gn=!0);for(var f in a)u=a[f],a.hasOwnProperty(f)&&c[f]!==u&&($M(t,f,u),gn=!0)}else for(var m in a)a.hasOwnProperty(m)&&$M(t,m,a[m])}function LI(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var YY=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),QY=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ly(t){return QY.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Us(){}var SC=null;function RI(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Km=null,op=null;function KM(t){var a=Ip(t);if(a&&(t=a.stateNode)){var c=t[Ra]||null;e:switch(t=a.stateNode,a.type){case"input":if(kC(t,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),a=c.name,c.type==="radio"&&a!=null){for(c=t;c.parentNode;)c=c.parentNode;c=c.querySelectorAll('input[name="'+yi(""+a)+'"][type="radio"]');for(a=0;a<c.length;a++){var u=c[a];if(u!==t&&u.form===t.form){var f=u[Ra]||null;if(!f)throw Error(Ve(90));kC(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(a=0;a<c.length;a++)u=c[a],u.form===t.form&&zD(u)}break e;case"textarea":FD(t,c.value,c.defaultValue);break e;case"select":a=c.value,a!=null&&rp(t,!!c.multiple,a,!1)}}}var V2=!1;function qD(t,a,c){if(V2)return t(a,c);V2=!0;try{var u=t(a);return u}finally{if(V2=!1,Km!==null||op!==null){if(v1(),Km&&(a=Km,t=op,op=Km=null,KM(a),t))for(a=0;a<t.length;a++)KM(t[a])}}}function Og(t,a){var c=t.stateNode;if(c===null)return null;var u=c[Ra]||null;if(u===null)return null;c=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(c&&typeof c!=="function")throw Error(Ve(231,a,typeof c));return c}var Xl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),CC=!1;if(Xl)try{Td={},Object.defineProperty(Td,"passive",{get:function(){CC=!0}}),window.addEventListener("test",Td,Td),window.removeEventListener("test",Td,Td)}catch(t){CC=!1}var Td,Zc=null,EI=null,cy=null;function HD(){if(cy)return cy;var t,a=EI,c=a.length,u,f="value"in Zc?Zc.value:Zc.textContent,m=f.length;for(t=0;t<c&&a[t]===f[t];t++);var p=c-t;for(u=1;u<=p&&a[c-u]===f[m-u];u++);return cy=f.slice(t,1<u?1-u:void 0)}function uy(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function Xb(){return!0}function WM(){return!1}function na(t){function a(c,u,f,m,p){this._reactName=c,this._targetInst=f,this.type=u,this.nativeEvent=m,this.target=p,this.currentTarget=null;for(var g in t)t.hasOwnProperty(g)&&(c=t[g],this[g]=c?c(m):m[g]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Xb:WM,this.isPropagationStopped=WM,this}return _n(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!=="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Xb)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!=="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Xb)},persist:function(){},isPersistent:Xb}),a}var gu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},a1=na(gu),tx=_n({},gu,{view:0,detail:0}),ZY=na(tx),U2,q2,lg,i1=_n({},tx,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:PI,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){if("movementX"in t)return t.movementX;return t!==lg&&(lg&&t.type==="mousemove"?(U2=t.screenX-lg.screenX,q2=t.screenY-lg.screenY):q2=U2=0,lg=t),U2},movementY:function(t){return"movementY"in t?t.movementY:q2}}),XM=na(i1),JY=_n({},i1,{dataTransfer:0}),eQ=na(JY),tQ=_n({},tx,{relatedTarget:0}),H2=na(tQ),nQ=_n({},gu,{animationName:0,elapsedTime:0,pseudoElement:0}),rQ=na(nQ),oQ=_n({},gu,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),aQ=na(oQ),iQ=_n({},gu,{data:0}),YM=na(iQ),sQ={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lQ={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},cQ={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uQ(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=cQ[t])?!!a[t]:!1}function PI(){return uQ}var dQ=_n({},tx,{key:function(t){if(t.key){var a=sQ[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=uy(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?lQ[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:PI,charCode:function(t){return t.type==="keypress"?uy(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?uy(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),fQ=na(dQ),mQ=_n({},i1,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),QM=na(mQ),pQ=_n({},gu,{submitter:0}),hQ=na(pQ),gQ=_n({},tx,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:PI}),xQ=na(gQ),vQ=_n({},gu,{propertyName:0,elapsedTime:0,pseudoElement:0}),bQ=na(vQ),yQ=_n({},i1,{deltaX:function(t){return"deltaX"in t?t.deltaX:("wheelDeltaX"in t)?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:("wheelDeltaY"in t)?-t.wheelDeltaY:("wheelDelta"in t)?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),wQ=na(yQ),kQ=_n({},gu,{newState:0,oldState:0,source:0}),SQ=na(kQ),CQ=[9,13,27,32],AI=Xl&&"CompositionEvent"in window,wg=null;Xl&&"documentMode"in document&&(wg=document.documentMode);var IQ=Xl&&"TextEvent"in window&&!wg,jD=Xl&&(!AI||wg&&8<wg&&11>=wg),ZM=String.fromCharCode(32),JM=!1;function GD(t,a){switch(t){case"keyup":return CQ.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $D(t){return t=t.detail,typeof t==="object"&&"data"in t?t.data:null}var Wm=!1;function TQ(t,a){switch(t){case"compositionend":return $D(a);case"keypress":if(a.which!==32)return null;return JM=!0,ZM;case"textInput":return t=a.data,t===ZM&&JM?null:t;default:return null}}function LQ(t,a){if(Wm)return t==="compositionend"||!AI&&GD(t,a)?(t=HD(),cy=EI=Zc=null,Wm=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return jD&&a.locale!=="ko"?null:a.data;default:return null}}var RQ={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function e3(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!RQ[t.type]:a==="textarea"?!0:!1}function KD(t,a,c,u){Km?op?op.push(u):op=[u]:Km=u,a=Jy(a,"onChange"),0<a.length&&(c=new a1("onChange","change",null,c,u),t.push({event:c,listeners:a}))}var kg=null,_g=null;function EQ(t){F6(t,0)}function s1(t){var a=pg(t);if(zD(a))return t}function t3(t,a){if(t==="change")return a}var WD=!1;if(Xl){if(Xl){if(gg="oninput"in document,!gg)dy=document.createElement("div"),dy.setAttribute("oninput","return;"),gg=typeof dy.oninput==="function";hg=gg}else hg=!1;WD=hg&&(!document.documentMode||9<document.documentMode)}var hg,gg,dy;function n3(){kg&&(kg.detachEvent("onpropertychange",XD),_g=kg=null)}function XD(t){if(t.propertyName==="value"&&s1(_g)){var a=[];KD(a,_g,t,RI(t)),qD(EQ,a)}}function PQ(t,a,c){t==="focusin"?(n3(),kg=a,_g=c,kg.attachEvent("onpropertychange",XD)):t==="focusout"&&n3()}function AQ(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return s1(_g)}function MQ(t,a){if(t==="click")return s1(a)}function DQ(t,a){if(t==="input"||t==="change")return s1(a)}function NQ(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var Ka=typeof Object.is==="function"?Object.is:NQ;function zg(t,a){if(Ka(t,a))return!0;if(typeof t!=="object"||t===null||typeof a!=="object"||a===null)return!1;var c=Object.keys(t),u=Object.keys(a);if(c.length!==u.length)return!1;for(u=0;u<c.length;u++){var f=c[u];if(!yC.call(a,f)||!Ka(t[f],a[f]))return!1}return!0}function IC(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch(a){return t.body}}function r3(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function o3(t,a){var c=r3(t);t=0;for(var u;c;){if(c.nodeType===3){if(u=t+c.textContent.length,t<=a&&u>=a)return{node:c,offset:a-t};t=u}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=r3(c)}}function YD(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?YD(t,a.parentNode):("contains"in t)?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function QD(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=IC(t.document);a instanceof t.HTMLIFrameElement;){try{var c=typeof a.contentWindow.location.href==="string"}catch(u){c=!1}if(c)t=a.contentWindow;else break;a=IC(t.document)}return a}function MI(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var OQ=Xl&&"documentMode"in document&&11>=document.documentMode,Xm=null,TC=null,Sg=null,LC=!1;function a3(t,a,c){var u=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;LC||Xm==null||Xm!==IC(u)||(u=Xm,("selectionStart"in u)&&MI(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Sg&&zg(Sg,u)||(Sg=u,u=Jy(TC,"onSelect"),0<u.length&&(a=new a1("onSelect","select",null,a,c),t.push({event:a,listeners:u}),a.target=Xm)))}function Sd(t,a){var c={};return c[t.toLowerCase()]=a.toLowerCase(),c["Webkit"+t]="webkit"+a,c["Moz"+t]="moz"+a,c}var Ym={animationend:Sd("Animation","AnimationEnd"),animationiteration:Sd("Animation","AnimationIteration"),animationstart:Sd("Animation","AnimationStart"),transitionrun:Sd("Transition","TransitionRun"),transitionstart:Sd("Transition","TransitionStart"),transitioncancel:Sd("Transition","TransitionCancel"),transitionend:Sd("Transition","TransitionEnd")},j2={},ZD={};Xl&&(ZD=document.createElement("div").style,("AnimationEvent"in window)||(delete Ym.animationend.animation,delete Ym.animationiteration.animation,delete Ym.animationstart.animation),("TransitionEvent"in window)||delete Ym.transitionend.transition);function Wd(t){if(j2[t])return j2[t];if(!Ym[t])return t;var a=Ym[t],c;for(c in a)if(a.hasOwnProperty(c)&&c in ZD)return j2[t]=a[c];return t}var JD=Wd("animationend"),eN=Wd("animationiteration"),tN=Wd("animationstart"),_Q=Wd("transitionrun"),zQ=Wd("transitionstart"),BQ=Wd("transitioncancel"),nN=Wd("transitionend"),rN=new Map,RC="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");RC.push("scrollEnd");function fs(t,a){rN.set(t,a),Kd(a,[t])}var FQ=0;function Yl(t,a){if(t.name!=null&&t.name!=="auto")return t.name;if(a.autoName!==null)return a.autoName;t=ds.identifierPrefix;var c=FQ++;return t="_"+t+"t_"+c.toString(32)+"_",a.autoName=t}function i3(t){if(t==null||typeof t==="string")return t;var a=null,c=dp;if(c!==null)for(var u=0;u<c.length;u++){var f=t[c[u]];if(f!=null){if(f==="none")return"none";a=a==null?f:a+(" "+f)}}return a==null?t.default:a}function nc(t,a){return t=i3(t),a=i3(a),a==null?t==="auto"?null:t:a==="auto"?null:a}var My=typeof reportError==="function"?reportError:function(t){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t==="object"&&t!==null&&typeof t.message==="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",t);return}console.error(t)},xi=[],Qm=0,DI=0;function l1(){for(var t=Qm,a=DI=Qm=0;a<t;){var c=xi[a];xi[a++]=null;var u=xi[a];xi[a++]=null;var f=xi[a];xi[a++]=null;var m=xi[a];if(xi[a++]=null,u!==null&&f!==null){var p=u.pending;p===null?f.next=f:(f.next=p.next,p.next=f),u.pending=f}m!==0&&oN(c,f,m)}}function c1(t,a,c,u){xi[Qm++]=t,xi[Qm++]=a,xi[Qm++]=c,xi[Qm++]=u,DI|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function NI(t,a,c,u){return c1(t,a,c,u),Dy(t)}function Xd(t,a){return c1(t,null,null,a),Dy(t)}function oN(t,a,c){t.lanes|=c;var u=t.alternate;u!==null&&(u.lanes|=c);for(var f=!1,m=t.return;m!==null;)m.childLanes|=c,u=m.alternate,u!==null&&(u.childLanes|=c),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(f=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,f&&a!==null&&(f=31-$a(c),t=m.hiddenUpdates,u=t[f],u===null?t[f]=[a]:u.push(a),a.lane=c|536870912),m):null}function Dy(t){if(50<Dg)throw Dg=0,wy=null,Error(Ve(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var Zm={};function VQ(t,a,c,u){this.tag=t,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ia(t,a,c,u){return new VQ(t,a,c,u)}function OI(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Kl(t,a){var c=t.alternate;return c===null?(c=Ia(t.tag,a,t.key,t.mode),c.elementType=t.elementType,c.type=t.type,c.stateNode=t.stateNode,c.alternate=t,t.alternate=c):(c.pendingProps=a,c.type=t.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=t.flags&1206910976,c.childLanes=t.childLanes,c.lanes=t.lanes,c.child=t.child,c.memoizedProps=t.memoizedProps,c.memoizedState=t.memoizedState,c.updateQueue=t.updateQueue,a=t.dependencies,c.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},c.sibling=t.sibling,c.index=t.index,c.ref=t.ref,c.refCleanup=t.refCleanup,c}function aN(t,a){t.flags&=1206910978;var c=t.alternate;return c===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=c.childLanes,t.lanes=c.lanes,t.child=c.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=c.memoizedProps,t.memoizedState=c.memoizedState,t.updateQueue=c.updateQueue,t.type=c.type,a=c.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function fy(t,a,c,u,f,m){var p=0;if(u=t,typeof u==="function")OI(u)&&(p=1);else if(typeof u==="string")p=hJ(t,c,$s.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(u){case hC:return t=Ia(31,c,a,f),t.elementType=hC,t.lanes=m,t;case Gm:return Md(c.children,f,m,a);case wD:p=8,f|=24;break;case fC:return t=Ia(12,c,a,f|2),t.elementType=fC,t.lanes=m,t;case mC:return t=Ia(13,c,a,f),t.elementType=mC,t.lanes=m,t;case pC:return t=Ia(19,c,a,f),t.elementType=pC,t.lanes=m,t;case LY:case gC:return t=f|32,t=Ia(30,c,a,t),t.elementType=gC,t.lanes=m,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof u==="object"&&u!==null)switch(u.$$typeof){case Fs:p=10;break e;case kD:p=9;break e;case SI:p=11;break e;case CI:p=14;break e;case Wc:p=16,u=null;break e}p=29,c=Error(Ve(130,t===null?"null":typeof t,"")),u=null}return a=Ia(p,c,a,f),a.elementType=t,a.type=u,a.lanes=m,a}function Md(t,a,c,u){return t=Ia(7,t,u,a),t.lanes=c,t}function G2(t,a,c){return t=Ia(6,t,null,a),t.lanes=c,t}function iN(t){var a=Ia(18,null,null,0);return a.stateNode=t,a}function $2(t,a,c){return a=Ia(4,t.children!==null?t.children:[],t.key,a),a.lanes=c,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var s3=new WeakMap;function wi(t,a){if(typeof t==="object"&&t!==null){var c=s3.get(t);if(c!==void 0)return c;return a={value:t,source:a,stack:FM(a)},s3.set(t,a),a}return{value:t,source:a,stack:FM(a)}}var Jm=[],ep=0,Ny=null,Bg=0,vi=[],bi=0,du=null,qs=1,js="";function Gl(t,a){Jm[ep++]=Bg,Jm[ep++]=Ny,Ny=t,Bg=a}function sN(t,a,c){vi[bi++]=qs,vi[bi++]=js,vi[bi++]=du,du=t;var u=qs;t=js;var f=32-$a(u)-1;u&=~(1<<f),c+=1;var m=32-$a(a)+f;if(30<m){var p=f-f%5;m=(u&(1<<p)-1).toString(32),u>>=p,f-=p,qs=1<<32-$a(a)+f|c<<f|u,js=m+t}else qs=1<<m|c<<f|u,js=t}function u1(t){t.return!==null&&(Gl(t,1),sN(t,1,0))}function _I(t){for(;t===Ny;)Ny=Jm[--ep],Jm[ep]=null,Bg=Jm[--ep],Jm[ep]=null;for(;t===du;)du=vi[--bi],vi[bi]=null,js=vi[--bi],vi[bi]=null,qs=vi[--bi],vi[bi]=null}function lN(t,a){vi[bi++]=qs,vi[bi++]=js,vi[bi++]=du,qs=a.id,js=a.overflow,du=t}var oo=null,Hn=null,rn=!1,ou=null,ki=!1,EC=Error(Ve(519));function fu(t){var a=Error(Ve(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fg(wi(a,t)),EC}function l3(t){var{stateNode:a,type:c,memoizedProps:u}=t;switch(a[yo]=t,a[Ra]=u,c){case"dialog":sn("cancel",a),sn("close",a);break;case"iframe":case"object":case"embed":sn("load",a);break;case"video":case"audio":for(c=0;c<Hg.length;c++)sn(Hg[c],a);break;case"source":sn("error",a);break;case"img":case"image":case"link":sn("error",a),sn("load",a);break;case"details":sn("toggle",a);break;case"input":sn("invalid",a),BD(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":sn("invalid",a);break;case"textarea":sn("invalid",a),VD(a,u.value,u.defaultValue,u.children)}c=u.children,typeof c!=="string"&&typeof c!=="number"&&typeof c!=="bigint"||a.textContent===""+c||u.suppressHydrationWarning===!0||q6(a.textContent,c)?(u.popover!=null&&(sn("beforetoggle",a),sn("toggle",a)),u.onScroll!=null&&sn("scroll",a),u.onScrollEnd!=null&&sn("scrollend",a),u.onClick!=null&&(a.onclick=Us),a=!0):a=!1,a||fu(t,!0)}function Oy(t){for(oo=t.return;oo;)switch(oo.tag){case 5:case 31:case 13:ki=!1;return;case 27:case 3:ki=!0;return;default:oo=oo.return}}function Bm(t){if(t!==oo)return!1;if(!rn)return Oy(t),rn=!0,!1;var a=t.tag,c;if(c=a!==3&&a!==27){if(c=a===5)c=t.type,c=!(c!=="form"&&c!=="button")||hI(t.type,t.memoizedProps);c=!c}if(c&&Hn&&fu(t),Oy(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Ve(317));Hn=nD(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Ve(317));Hn=nD(t)}else a===27?(a=Hn,xu(t.type)?(t=bI,bI=null,Hn=t):Hn=a):Hn=oo?Ci(t.stateNode.nextSibling):null;return!0}function Bd(){Hn=oo=null,rn=!1}function K2(){var t=ou;return t!==null&&(Sa===null?Sa=t:Sa.push.apply(Sa,t),ou=null),t}function Fg(t){ou===null?ou=[t]:ou.push(t)}var PC=Qs(null),Yd=null,$l=null;function Jc(t,a,c){jn(PC,a._currentValue),a._currentValue=c}function Wl(t){t._currentValue=PC.current,ko(PC)}function my(t,a,c){for(;t!==null;){var u=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),t===c)break;t=t.return}}function AC(t,a,c,u){var f=t.child;f!==null&&(f.return=t);for(;f!==null;){var m=f.dependencies;if(m!==null){var p=f.child;m=m.firstContext;e:for(;m!==null;){var g=m;m=f;for(var v=0;v<a.length;v++)if(g.context===a[v]){m.lanes|=c,g=m.alternate,g!==null&&(g.lanes|=c),my(m.return,c,t),u||(p=null);break e}m=g.next}}else if(f.tag===18){if(p=f.return,p===null)throw Error(Ve(341));p.lanes|=c,m=p.alternate,m!==null&&(m.lanes|=c),my(p,c,t),p=null}else f.tag===13&&f.memoizedState!==null&&f.memoizedState.dehydrated===null?(f.lanes|=c,p=f.alternate,p!==null&&(p.lanes|=c),my(f.return,c,t),p=f.child,p=p!==null?p.sibling:null):p=f.child;if(p!==null)p.return=f;else for(p=f;p!==null;){if(p===t){p=null;break}if(f=p.sibling,f!==null){f.return=p.return,p=f;break}p=p.return}f=p}}function Fd(t,a,c,u){t=null;for(var f=a,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var p=f.alternate;if(p===null)throw Error(Ve(387));if(p=p.memoizedProps,p!==null){var g=f.type;Ka(f.pendingProps.value,p.value)||(t!==null?t.push(g):t=[g])}}else if(f===Ly.current){if(p=f.alternate,p===null)throw Error(Ve(387));p.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(kp):t=[kp])}f=f.return}return t!==null&&AC(a,t,c,u),a.flags|=262144,t!==null}function _y(t){for(t=t.firstContext;t!==null;){if(!Ka(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Vd(t){Yd=t,$l=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function wo(t){return cN(Yd,t)}function Yb(t,a){return Yd===null&&Vd(t),cN(t,a)}function cN(t,a){var c=a._currentValue;if(a={context:a,memoizedValue:c,next:null},$l===null){if(t===null)throw Error(Ve(308));$l=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else $l=$l.next=a;return c}var UQ=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(c,u){t.push(u)}};this.abort=function(){a.aborted=!0,t.forEach(function(c){return c()})}},qQ=wd,HQ=yd,Pr={$$typeof:Fs,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zI(){return{controller:new UQ,data:new Map,refCount:0}}function nx(t){t.refCount--,t.refCount===0&&qQ(HQ,function(){t.controller.abort()})}function c3(t,a){if((t.pendingLanes&4194048)!==0){var c=t.transitionTypes;c===null&&(c=t.transitionTypes=[]);for(t=0;t<a.length;t++){var u=a[t];c.indexOf(u)===-1&&c.push(u)}}}var xg=null;function jQ(t){var a=t.transitionTypes;return t.transitionTypes=null,a}var Cg=null,MC=0,Ud=0,ap=null;function GQ(t,a){if(Cg===null){var c=Cg=[];MC=0,Ud=dT(),ap={status:"pending",value:void 0,then:function(u){c.push(u)}}}return MC++,a.then(u3,u3),a}function u3(){if(--MC===0&&(xg=null,Cg!==null)){ap!==null&&(ap.status="fulfilled");var t=Cg;Cg=null,Ud=0,ap=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function $Q(t,a){var c=[],u={status:"pending",value:null,reason:null,then:function(f){c.push(f)}};return t.then(function(){u.status="fulfilled",u.value=a;for(var f=0;f<c.length;f++)(0,c[f])(a)},function(f){u.status="rejected",u.reason=f;for(f=0;f<c.length;f++)(0,c[f])(void 0)}),u}var d3=Ft.S;Ft.S=function(t,a){if(C6=ja(),typeof a==="object"&&a!==null&&typeof a.then==="function"&&GQ(t,a),xg!==null)for(var c=bp;c!==null;)c3(c,xg),c=c.next;if(c=t.types,c!==null){for(var u=bp;u!==null;)c3(u,c),u=u.next;if(Ud!==0){u=xg,u===null&&(u=xg=[]);for(var f=0;f<c.length;f++){var m=c[f];u.indexOf(m)===-1&&u.push(m)}}}d3!==null&&d3(t,a)};var Dd=Qs(null);function BI(){var t=Dd.current;return t!==null?t:On.pooledCache}function py(t,a){a===null?jn(Dd,Dd.current):jn(Dd,a.pool)}function uN(){var t=BI();return t===null?null:{parent:Pr._currentValue,pool:t}}var Tp=Error(Ve(460)),FI=Error(Ve(474)),d1=Error(Ve(542)),zy={then:function(){}};function f3(t){return t=t.status,t==="fulfilled"||t==="rejected"}function dN(t,a,c){switch(c=t[c],c===void 0?t.push(a):c!==a&&(a.then(Us,Us),a=c),a.status){case"fulfilled":return a.value;case"rejected":if(t=a.reason,p3(t),t===void 0&&!("reason"in a))throw Error(Ve(600));throw t;default:if(typeof a.status==="string")a.then(Us,Us);else{if(t=On,t!==null&&100<t.shellSuspendCounter)throw Error(Ve(482));t=a,t.status="pending",t.then(function(u){if(a.status==="pending"){var f=a;f.status="fulfilled",f.value=u}},function(u){if(a.status==="pending"){var f=a;f.status="rejected",f.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,p3(t),t}throw Nd=a,Tp}}function Ld(t){try{var a=t._init;return a(t._payload)}catch(c){if(c!==null&&typeof c==="object"&&typeof c.then==="function")throw Nd=c,Tp;throw c}}var Nd=null;function m3(){if(Nd===null)throw Error(Ve(459));var t=Nd;return Nd=null,t}function p3(t){if(t===Tp||t===d1)throw Error(Ve(483))}var ip=null,Vg=0;function Qb(t){var a=Vg;return Vg+=1,ip===null&&(ip=[]),dN(ip,t,a)}function Gc(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Zb(t,a){if(a.$$typeof===TY)throw Error(Ve(525));throw t=Object.prototype.toString.call(a),Error(Ve(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t))}function fN(t){function a(P,D){if(t){var N=P.deletions;N===null?(P.deletions=[D],P.flags|=16):N.push(D)}}function c(P,D){if(!t)return null;for(;D!==null;)a(P,D),D=D.sibling;return null}function u(P){for(var D=new Map;P!==null;)P.key===null?D.set(P.index,P):D.set(P.key,P),P=P.sibling;return D}function f(P,D){return P=Kl(P,D),P.index=0,P.sibling=null,P}function m(P,D,N){if(P.index=N,!t)return P.flags|=1048576,D;if(N=P.alternate,N!==null)return N=N.index,N<D?(P.flags|=2,D):N;return P.flags|=134217730,D}function p(P){return t&&P.alternate===null&&(P.flags|=134217730),P}function g(P,D,N,O){if(D===null||D.tag!==6)return D=G2(N,P.mode,O),D.return=P,D;return D=f(D,N),D.return=P,D}function v(P,D,N,O){var F=N.type;if(F===Gm)return P=S(P,D,N.props.children,O,N.key),Gc(P,N),P;if(D!==null&&(D.elementType===F||typeof F==="object"&&F!==null&&F.$$typeof===Wc&&Ld(F)===D.type))return D=f(D,N.props),Gc(D,N),D.return=P,D;return D=fy(N.type,N.key,N.props,null,P.mode,O),Gc(D,N),D.return=P,D}function k(P,D,N,O){if(D===null||D.tag!==4||D.stateNode.containerInfo!==N.containerInfo||D.stateNode.implementation!==N.implementation)return D=$2(N,P.mode,O),D.return=P,D;return D=f(D,N.children||[]),D.return=P,D}function S(P,D,N,O,F){if(D===null||D.tag!==7)return D=Md(N,P.mode,O,F),D.return=P,D;return D=f(D,N),D.return=P,D}function I(P,D,N){if(typeof D==="string"&&D!==""||typeof D==="number"||typeof D==="bigint")return D=G2(""+D,P.mode,N),D.return=P,D;if(typeof D==="object"&&D!==null){switch(D.$$typeof){case jb:return N=fy(D.type,D.key,D.props,null,P.mode,N),Gc(N,D),N.return=P,N;case fg:return D=$2(D,P.mode,N),D.return=P,D;case Wc:return D=Ld(D),I(P,D,N)}if(mg(D)||sg(D))return D=Md(D,P.mode,N,null),D.return=P,D;if(typeof D.then==="function")return I(P,Qb(D),N);if(D.$$typeof===Fs)return I(P,Yb(P,D),N);Zb(P,D)}return null}function T(P,D,N,O){var F=D!==null?D.key:null;if(typeof N==="string"&&N!==""||typeof N==="number"||typeof N==="bigint")return F!==null?null:g(P,D,""+N,O);if(typeof N==="object"&&N!==null){switch(N.$$typeof){case jb:return N.key===F?v(P,D,N,O):null;case fg:return N.key===F?k(P,D,N,O):null;case Wc:return N=Ld(N),T(P,D,N,O)}if(mg(N)||sg(N))return F!==null?null:S(P,D,N,O,null);if(typeof N.then==="function")return T(P,D,Qb(N),O);if(N.$$typeof===Fs)return T(P,D,Yb(P,N),O);Zb(P,N)}return null}function L(P,D,N,O,F){if(typeof O==="string"&&O!==""||typeof O==="number"||typeof O==="bigint")return P=P.get(N)||null,g(D,P,""+O,F);if(typeof O==="object"&&O!==null){switch(O.$$typeof){case jb:return P=P.get(O.key===null?N:O.key)||null,v(D,P,O,F);case fg:return P=P.get(O.key===null?N:O.key)||null,k(D,P,O,F);case Wc:return O=Ld(O),L(P,D,N,O,F)}if(mg(O)||sg(O))return P=P.get(N)||null,S(D,P,O,F,null);if(typeof O.then==="function")return L(P,D,N,Qb(O),F);if(O.$$typeof===Fs)return L(P,D,N,Yb(D,O),F);Zb(D,O)}return null}function R(P,D,N,O){for(var F=null,z=null,B=D,U=D=0,Y=null;B!==null&&U<N.length;U++){B.index>U?(Y=B,B=null):Y=B.sibling;var G=T(P,B,N[U],O);if(G===null){B===null&&(B=Y);break}t&&B&&G.alternate===null&&a(P,B),D=m(G,D,U),z===null?F=G:z.sibling=G,z=G,B=Y}if(U===N.length)return c(P,B),rn&&Gl(P,U),F;if(B===null){for(;U<N.length;U++)B=I(P,N[U],O),B!==null&&(D=m(B,D,U),z===null?F=B:z.sibling=B,z=B);return rn&&Gl(P,U),F}for(B=u(B);U<N.length;U++)Y=L(B,P,U,N[U],O),Y!==null&&(t&&(G=Y.alternate,G!==null&&B.delete(G.key===null?U:G.key)),D=m(Y,D,U),z===null?F=Y:z.sibling=Y,z=Y);return t&&B.forEach(function(ce){return a(P,ce)}),rn&&Gl(P,U),F}function A(P,D,N,O){if(N==null)throw Error(Ve(151));for(var F=null,z=null,B=D,U=D=0,Y=null,G=N.next();B!==null&&!G.done;U++,G=N.next()){B.index>U?(Y=B,B=null):Y=B.sibling;var ce=T(P,B,G.value,O);if(ce===null){B===null&&(B=Y);break}t&&B&&ce.alternate===null&&a(P,B),D=m(ce,D,U),z===null?F=ce:z.sibling=ce,z=ce,B=Y}if(G.done)return c(P,B),rn&&Gl(P,U),F;if(B===null){for(;!G.done;U++,G=N.next())G=I(P,G.value,O),G!==null&&(D=m(G,D,U),z===null?F=G:z.sibling=G,z=G);return rn&&Gl(P,U),F}for(B=u(B);!G.done;U++,G=N.next())G=L(B,P,U,G.value,O),G!==null&&(t&&(Y=G.alternate,Y!==null&&B.delete(Y.key===null?U:Y.key)),D=m(G,D,U),z===null?F=G:z.sibling=G,z=G);return t&&B.forEach(function(re){return a(P,re)}),rn&&Gl(P,U),F}function E(P,D,N,O){if(typeof N==="object"&&N!==null&&N.type===Gm&&N.key===null&&N.props.ref===void 0&&(N=N.props.children),typeof N==="object"&&N!==null){switch(N.$$typeof){case jb:e:{for(var F=N.key;D!==null;){if(D.key===F){if(F=N.type,F===Gm){if(D.tag===7){c(P,D.sibling),O=f(D,N.props.children),Gc(O,N),O.return=P,P=O;break e}}else if(D.elementType===F||typeof F==="object"&&F!==null&&F.$$typeof===Wc&&Ld(F)===D.type){c(P,D.sibling),O=f(D,N.props),Gc(O,N),O.return=P,P=O;break e}c(P,D);break}else a(P,D);D=D.sibling}N.type===Gm?(O=Md(N.props.children,P.mode,O,N.key),Gc(O,N),O.return=P,P=O):(O=fy(N.type,N.key,N.props,null,P.mode,O),Gc(O,N),O.return=P,P=O)}return p(P);case fg:e:{for(F=N.key;D!==null;){if(D.key===F)if(D.tag===4&&D.stateNode.containerInfo===N.containerInfo&&D.stateNode.implementation===N.implementation){c(P,D.sibling),O=f(D,N.children||[]),O.return=P,P=O;break e}else{c(P,D);break}else a(P,D);D=D.sibling}O=$2(N,P.mode,O),O.return=P,P=O}return p(P);case Wc:return N=Ld(N),E(P,D,N,O)}if(mg(N))return R(P,D,N,O);if(sg(N)){if(F=sg(N),typeof F!=="function")throw Error(Ve(150));return N=F.call(N),A(P,D,N,O)}if(typeof N.then==="function")return E(P,D,Qb(N),O);if(N.$$typeof===Fs)return E(P,D,Yb(P,N),O);Zb(P,N)}return typeof N==="string"&&N!==""||typeof N==="number"||typeof N==="bigint"?(N=""+N,D!==null&&D.tag===6?(c(P,D.sibling),O=f(D,N),O.return=P,P=O):(c(P,D),O=G2(N,P.mode,O),O.return=P,P=O),p(P)):c(P,D)}return function(P,D,N,O){try{Vg=0;var F=E(P,D,N,O);return ip=null,F}catch(B){if(B===Tp||B===d1)throw B;var z=Ia(29,B,null,P.mode);return z.lanes=O,z.return=P,z}finally{}}}var qd=fN(!0),mN=fN(!1),Xc=!1;function VI(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function DC(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Od(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function _d(t,a,c){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(bn&2)!==0){var f=u.pending;return f===null?a.next=a:(a.next=f.next,f.next=a),u.pending=a,a=Dy(t),oN(t,null,c),a}return c1(t,u,a,c),Dy(t)}function Ig(t,a,c){if(a=a.updateQueue,a!==null&&(a=a.shared,(c&4194048)!==0)){var u=a.lanes;u&=t.pendingLanes,c|=u,a.lanes=c,ED(t,c)}}function W2(t,a){var c=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,c===u)){var f=null,m=null;if(c=c.firstBaseUpdate,c!==null){do{var p={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};m===null?f=m=p:m=m.next=p,c=c.next}while(c!==null);m===null?f=m=a:m=m.next=a}else f=m=a;c={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},t.updateQueue=c;return}t=c.lastBaseUpdate,t===null?c.firstBaseUpdate=a:t.next=a,c.lastBaseUpdate=a}var NC=!1;function Tg(){if(NC){var t=ap;if(t!==null)throw t}}function Lg(t,a,c,u){NC=!1;var f=t.updateQueue;Xc=!1;var{firstBaseUpdate:m,lastBaseUpdate:p}=f,g=f.shared.pending;if(g!==null){f.shared.pending=null;var v=g,k=v.next;v.next=null,p===null?m=k:p.next=k,p=v;var S=t.alternate;S!==null&&(S=S.updateQueue,g=S.lastBaseUpdate,g!==p&&(g===null?S.firstBaseUpdate=k:g.next=k,S.lastBaseUpdate=v))}if(m!==null){var I=f.baseState;p=0,S=k=v=null,g=m;do{var T=g.lane&-536870913,L=T!==g.lane;if(L?(cn&T)===T:(u&T)===T){T!==0&&T===Ud&&(NC=!0),S!==null&&(S=S.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var R=t,A=g;T=a;var E=c;switch(A.tag){case 1:if(R=A.payload,typeof R==="function"){I=R.call(E,I,T);break e}I=R;break e;case 3:R.flags=R.flags&-65537|128;case 0:if(R=A.payload,T=typeof R==="function"?R.call(E,I,T):R,T===null||T===void 0)break e;I=_n({},I,T);break e;case 2:Xc=!0}}T=g.callback,T!==null&&(t.flags|=64,L&&(t.flags|=8192),L=f.callbacks,L===null?f.callbacks=[T]:L.push(T))}else L={lane:T,tag:g.tag,payload:g.payload,callback:g.callback,next:null},S===null?(k=S=L,v=I):S=S.next=L,p|=T;if(g=g.next,g===null)if(g=f.shared.pending,g===null)break;else L=g,g=L.next,L.next=null,f.lastBaseUpdate=L,f.shared.pending=null}while(1);S===null&&(v=I),f.baseState=v,f.firstBaseUpdate=k,f.lastBaseUpdate=S,m===null&&(f.shared.lanes=0),hu|=p,t.lanes=p,t.memoizedState=I}}function pN(t,a){if(typeof t!=="function")throw Error(Ve(191,t));t.call(a)}function hN(t,a){var c=t.callbacks;if(c!==null)for(t.callbacks=null,t=0;t<c.length;t++)pN(c[t],a)}var mu=Qs(null),By=Qs(0);function h3(t,a){t=ec,jn(By,t),jn(mu,a),ec=t|a.baseLanes}function OC(){jn(By,ec),jn(mu,mu.current)}function UI(){ec=By.current,ko(mu),ko(By)}var Io=Qs(null),Do=null;function au(t){var a=t.alternate;jn(So,So.current&1),jn(Io,t),Do===null&&(a===null||mu.current!==null?Do=t:a.memoizedState!==null&&(Do=t))}function _C(t){jn(So,So.current),jn(Io,t),Do===null&&(Do=t)}function gN(t){t.tag===22?(jn(So,So.current),jn(Io,t),Do===null&&(Do=t)):iu()}function iu(){jn(So,So.current),jn(Io,Io.current)}function Ua(t){ko(Io),Do===t&&(Do=null),ko(So)}var So=Qs(0);function Ug(t,a){jn(Io,Io.current),jn(So,a)}function qI(t){ko(So),ko(Io),Do===t&&(Do=null)}function Fy(t){for(var a=t;a!==null;){if(a.tag===13){var c=a.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||vI(c)||pT(c)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!=="independent"){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Ql=0,Qt=null,An=null,Er=null,Vy=!1,sp=!1,Hd=!1,Uy=0,qg=0,lp=null,KQ=0;function sr(){throw Error(Ve(321))}function HI(t,a){if(a===null)return!1;for(var c=0;c<a.length&&c<t.length;c++)if(!Ka(t[c],a[c]))return!1;return!0}function jI(t,a,c,u,f,m){return Ql=m,Qt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,Ft.H=t===null||t.memoizedState===null?KN:WN,Hd=!1,m=c(u,f),Hd=!1,sp&&(m=vN(a,c,u,f)),xN(t),m}function xN(t){Ft.H=qy;var a=An!==null&&An.next!==null;if(Ql=0,Er=An=Qt=null,Vy=!1,qg=0,lp=null,a)throw Error(Ve(300));t===null||Ar||(t=t.dependencies,t!==null&&_y(t)&&(Ar=!0))}function vN(t,a,c,u){Qt=t;var f=0;do{if(sp&&(lp=null),qg=0,sp=!1,25<=f)throw Error(Ve(301));if(f+=1,Er=An=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}Ft.H=tZ,m=a(c,u)}while(sp);return m}function WQ(){var t=Ft.H,a=t.useState()[0];return a=typeof a.then==="function"?rx(a):a,t=t.useState()[0],(An!==null?An.memoizedState:null)!==t&&(Qt.flags|=1024),a}function GI(){var t=Uy!==0;return Uy=0,t}function $I(t,a,c){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~c}function KI(t){if(Vy){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Vy=!1}Ql=0,Er=An=Qt=null,sp=!1,qg=Uy=0,lp=null}function ta(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Er===null?Qt.memoizedState=Er=t:Er=Er.next=t,Er}function Sr(){if(An===null){var t=Qt.alternate;t=t!==null?t.memoizedState:null}else t=An.next;var a=Er===null?Qt.memoizedState:Er.next;if(a!==null)Er=a,An=t;else{if(t===null){if(Qt.alternate===null)throw Error(Ve(467));throw Error(Ve(310))}An=t,t={memoizedState:An.memoizedState,baseState:An.baseState,baseQueue:An.baseQueue,queue:An.queue,next:null},Er===null?Qt.memoizedState=Er=t:Er=Er.next=t}return Er}function f1(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rx(t){var a=qg;return qg+=1,lp===null&&(lp=[]),t=dN(lp,t,a),a=Qt,(Er===null?a.memoizedState:Er.next)===null&&(a=a.alternate,Ft.H=a===null||a.memoizedState===null?KN:WN),t}function m1(t){if(t!==null&&typeof t==="object"){if(typeof t.then==="function")return rx(t);if(t.$$typeof===EY)return;if(t.$$typeof===Fs)return wo(t)}throw Error(Ve(438,String(t)))}function WI(t){var a=null,c=Qt.updateQueue;if(c!==null&&(a=c.memoCache),a==null){var u=Qt.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(f){return f.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),c===null&&(c=f1(),Qt.updateQueue=c),c.memoCache=a,c=a.data[a.index],c===void 0)for(c=a.data[a.index]=Array(t),u=0;u<t;u++)c[u]=RY;return a.index++,c}function Zl(t,a){return typeof a==="function"?a(t):a}function hy(t){var a=Sr();return XI(a,An,t)}function XI(t,a,c){var u=t.queue;if(u===null)throw Error(Ve(311));u.lastRenderedReducer=c;var f=t.baseQueue,m=u.pending;if(m!==null){if(f!==null){var p=f.next;f.next=m.next,m.next=p}a.baseQueue=f=m,u.pending=null}if(m=t.baseState,f===null)t.memoizedState=m;else{a=f.next;var g=p=null,v=null,k=a,S=!1;do{var I=k.lane&-536870913;if(I!==k.lane?(cn&I)===I:(Ql&I)===I){var T=k.revertLane;if(T===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null}),I===Ud&&(S=!0);else if((Ql&T)===T){k=k.next,T===Ud&&(S=!0);continue}else I={lane:0,revertLane:k.revertLane,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},v===null?(g=v=I,p=m):v=v.next=I,Qt.lanes|=T,hu|=T;I=k.action,Hd&&c(m,I),m=k.hasEagerState?k.eagerState:c(m,I)}else T={lane:I,revertLane:k.revertLane,gesture:k.gesture,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},v===null?(g=v=T,p=m):v=v.next=T,Qt.lanes|=I,hu|=I;k=k.next}while(k!==null&&k!==a);if(v===null?p=m:v.next=g,!Ka(m,t.memoizedState)&&(Ar=!0,S&&(c=ap,c!==null)))throw c;t.memoizedState=m,t.baseState=p,t.baseQueue=v,u.lastRenderedState=m}return f===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function X2(t){var a=Sr(),c=a.queue;if(c===null)throw Error(Ve(311));c.lastRenderedReducer=t;var{dispatch:u,pending:f}=c,m=a.memoizedState;if(f!==null){c.pending=null;var p=f=f.next;do m=t(m,p.action),p=p.next;while(p!==f);Ka(m,a.memoizedState)||(Ar=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),c.lastRenderedState=m}return[m,u]}function bN(t,a,c){var u=Qt,f=Sr(),m=rn;if(m){if(c===void 0)throw Error(Ve(407));c=c()}else c=a();var p=!Ka((An||f).memoizedState,c);if(p&&(f.memoizedState=c,Ar=!0),f=f.queue,YI(kN.bind(null,u,f,t),[t]),t=f.getSnapshot!==a||p||Er!==null&&(Er.memoizedState.tag&1)!==0,hp(t?9:8,{destroy:void 0},wN.bind(null,u,f,c,a),null),t){if(u.flags|=2048,On===null)throw Error(Ve(349));m||(Ql&127)!==0||yN(u,a,c)}return c}function yN(t,a,c){t.flags|=16384,t={getSnapshot:a,value:c},a=Qt.updateQueue,a===null?(a=f1(),Qt.updateQueue=a,a.stores=[t]):(c=a.stores,c===null?a.stores=[t]:c.push(t))}function wN(t,a,c,u){a.value=c,a.getSnapshot=u,SN(a)&&CN(t)}function kN(t,a,c){return c(function(){SN(a)&&CN(t)})}function SN(t){var a=t.getSnapshot;t=t.value;try{var c=a();return!Ka(t,c)}catch(u){return!0}}function CN(t){var a=Xd(t,2);a!==null&&Ta(a,t,2)}function zC(t){var a=ta();if(typeof t==="function"){var c=t;if(t=c(),Hd){Qc(!0);try{c()}finally{Qc(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zl,lastRenderedState:t},a}function IN(t,a,c,u){return t.baseState=c,XI(t,An,typeof u==="function"?u:Zl)}function XQ(t,a,c,u,f){if(h1(t))throw Error(Ve(485));if(t=a.action,t!==null){var m={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){m.listeners.push(p)}};Ft.T!==null?c(!0):m.isTransition=!1,u(m),c=a.pending,c===null?(m.next=a.pending=m,TN(a,m)):(m.next=c.next,a.pending=c.next=m)}}function TN(t,a){var{action:c,payload:u}=a,f=t.state;if(a.isTransition){var m=Ft.T,p={};p.types=m!==null?m.types:null,Ft.T=p;try{var g=c(f,u),v=Ft.S;v!==null&&v(p,g),g3(t,a,g)}catch(k){BC(t,a,k)}finally{m!==null&&p.types!==null&&(m.types=p.types),Ft.T=m}}else try{m=c(f,u),g3(t,a,m)}catch(k){BC(t,a,k)}}function g3(t,a,c){c!==null&&typeof c==="object"&&typeof c.then==="function"?c.then(function(u){x3(t,a,u)},function(u){return BC(t,a,u)}):x3(t,a,c)}function x3(t,a,c){a.status="fulfilled",a.value=c,LN(a),t.state=c,a=t.pending,a!==null&&(c=a.next,c===a?t.pending=null:(c=c.next,a.next=c,TN(t,c)))}function BC(t,a,c){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=c,LN(a),a=a.next;while(a!==u)}t.action=null}function LN(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function RN(t,a){return a}function v3(t,a){if(rn){var c=On.formState;if(c!==null){e:{var u=Qt;if(rn){if(Hn){t:{var f=Hn;for(var m=ki;f.nodeType!==8;){if(!m){f=null;break t}if(f=Ci(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){Hn=Ci(f.nextSibling),u=f.data==="F!";break e}}fu(u)}u=!1}u&&(a=c[0])}}return c=ta(),c.memoizedState=c.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:RN,lastRenderedState:a},c.queue=u,c=jN.bind(null,Qt,u),u.dispatch=c,u=zC(!1),m=eT.bind(null,Qt,!1,u.queue),u=ta(),f={state:a,dispatch:null,action:t,pending:null},u.queue=f,c=XQ.bind(null,Qt,f,m,c),f.dispatch=c,u.memoizedState=t,[a,c,!1]}function b3(t){var a=Sr();return EN(a,An,t)}function EN(t,a,c){if(a=XI(t,a,RN)[0],t=hy(Zl)[0],typeof a==="object"&&a!==null&&typeof a.then==="function")try{var u=rx(a)}catch(p){if(p===Tp)throw d1;throw p}else u=a;a=Sr();var f=a.queue,m=f.dispatch;return c!==a.memoizedState&&(Qt.flags|=2048,hp(9,{destroy:void 0},YQ.bind(null,f,c),null)),[u,m,t]}function YQ(t,a){t.action=a}function y3(t){var a=Sr(),c=An;if(c!==null)return EN(a,c,t);Sr(),a=a.memoizedState,c=Sr();var u=c.queue.dispatch;return c.memoizedState=t,[a,u,!1]}function hp(t,a,c,u){return t={tag:t,create:c,deps:u,inst:a,next:null},a=Qt.updateQueue,a===null&&(a=f1(),Qt.updateQueue=a),c=a.lastEffect,c===null?a.lastEffect=t.next=t:(u=c.next,c.next=t,t.next=u,a.lastEffect=t),t}function PN(){return Sr().memoizedState}function gy(t,a,c,u){var f=ta();Qt.flags|=t,f.memoizedState=hp(1|a,{destroy:void 0},c,u===void 0?null:u)}function p1(t,a,c,u){var f=Sr();u=u===void 0?null:u;var m=f.memoizedState.inst;An!==null&&u!==null&&HI(u,An.memoizedState.deps)?f.memoizedState=hp(a,m,c,u):(Qt.flags|=t,f.memoizedState=hp(1|a,m,c,u))}function w3(t,a){gy(8390656,8,t,a)}function YI(t,a){p1(2048,8,t,a)}function QQ(t){Qt.flags|=4;var a=Qt.updateQueue;if(a===null)a=f1(),Qt.updateQueue=a,a.events=[t];else{var c=a.events;c===null?a.events=[t]:c.push(t)}}function AN(t){var a=Sr().memoizedState;return QQ({ref:a,nextImpl:t}),function(){if((bn&2)!==0)throw Error(Ve(440));return a.impl.apply(void 0,arguments)}}function MN(t,a){return p1(4,2,t,a)}function DN(t,a){return p1(4,4,t,a)}function NN(t,a){if(typeof a==="function"){t=t();var c=a(t);return function(){typeof c==="function"?c():a(null)}}if(a!==null&&a!==void 0)return t=t(),a.current=t,function(){a.current=null}}function ON(t,a,c){c=c!==null&&c!==void 0?c.concat([t]):null,p1(4,4,NN.bind(null,a,t),c)}function QI(){}function _N(t,a){var c=Sr();a=a===void 0?null:a;var u=c.memoizedState;if(a!==null&&HI(a,u[1]))return u[0];return c.memoizedState=[t,a],t}function zN(t,a){var c=Sr();a=a===void 0?null:a;var u=c.memoizedState;if(a!==null&&HI(a,u[1]))return u[0];if(u=t(),Hd){Qc(!0);try{t()}finally{Qc(!1)}}return c.memoizedState=[u,a],u}function ZI(t,a,c){if(c===void 0||(Ql&1073741824)!==0&&(cn&261930)===0)return t.memoizedState=a;return t.memoizedState=c,t=T6(),Qt.lanes|=t,hu|=t,c}function BN(t,a,c,u){if(Ka(c,a))return c;if(mu.current!==null)return t=ZI(t,c,u),Ka(t,a)||(Ar=!0),t;if((Ql&106)===0||(Ql&1073741824)!==0&&(cn&261930)===0)return Ar=!0,t.memoizedState=c;return t=T6(),Qt.lanes|=t,hu|=t,a}function FN(t,a,c,u,f){var m=yn.p;yn.p=m!==0&&8>m?m:8;var p=Ft.T,g={};g.types=p!==null?p.types:null,Ft.T=g,eT(t,!1,a,c);try{var v=f(),k=Ft.S;if(k!==null&&k(g,v),v!==null&&typeof v==="object"&&typeof v.then==="function"){var S=$Q(v,u);Rg(t,a,S,Si(t))}else Rg(t,a,u,Si(t))}catch(I){Rg(t,a,{then:function(){},status:"rejected",reason:I},Si())}finally{yn.p=m,p!==null&&g.types!==null&&(p.types=g.types),Ft.T=p}}function ZQ(){}function FC(t,a,c,u){if(t.tag!==5)throw Error(Ve(476));var f=VN(t).queue;FN(t,f,a,Ad,c===null?ZQ:function(){return UN(t),c(u)})}function VN(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:Ad,baseState:Ad,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zl,lastRenderedState:Ad},next:null};var c={};return a.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zl,lastRenderedState:c},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function UN(t){var a=VN(t);a.next===null&&(a=t.alternate.memoizedState),Rg(t,a.next.queue,{},Si())}function JI(){return wo(kp)}function qN(){return Sr().memoizedState}function HN(){return Sr().memoizedState}function JQ(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var c=Si();t=Od(c);var u=_d(a,t,c);u!==null&&(Ta(u,a,c),Ig(u,a,c)),a={cache:zI()},t.payload=a;return}a=a.return}}function eZ(t,a,c){var u=Si();c={lane:u,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},h1(t)?GN(a,c):(c=NI(t,a,c,u),c!==null&&(Ta(c,t,u),$N(c,a,u)))}function jN(t,a,c){var u=Si();Rg(t,a,c,u)}function Rg(t,a,c,u){var f={lane:u,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(h1(t))GN(a,f);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=a.lastRenderedReducer,m!==null))try{var p=a.lastRenderedState,g=m(p,c);if(f.hasEagerState=!0,f.eagerState=g,Ka(g,p))return c1(t,a,f,0),On===null&&l1(),!1}catch(v){}finally{}if(c=NI(t,a,f,u),c!==null)return Ta(c,t,u),$N(c,a,u),!0}return!1}function eT(t,a,c,u){if(u={lane:2,revertLane:dT(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},h1(t)){if(a)throw Error(Ve(479))}else a=NI(t,c,u,2),a!==null&&Ta(a,t,2)}function h1(t){var a=t.alternate;return t===Qt||a!==null&&a===Qt}function GN(t,a){sp=Vy=!0;var c=t.pending;c===null?a.next=a:(a.next=c.next,c.next=a),t.pending=a}function $N(t,a,c){if((c&4194048)!==0){var u=a.lanes;u&=t.pendingLanes,c|=u,a.lanes=c,ED(t,c)}}var qy={readContext:wo,use:m1,useCallback:sr,useContext:sr,useEffect:sr,useImperativeHandle:sr,useLayoutEffect:sr,useInsertionEffect:sr,useMemo:sr,useReducer:sr,useRef:sr,useState:sr,useDebugValue:sr,useDeferredValue:sr,useTransition:sr,useSyncExternalStore:sr,useId:sr,useHostTransitionStatus:sr,useFormState:sr,useActionState:sr,useOptimistic:sr,useMemoCache:sr,useCacheRefresh:sr,useEffectEvent:sr},KN={readContext:wo,use:m1,useCallback:function(t,a){return ta().memoizedState=[t,a===void 0?null:a],t},useContext:wo,useEffect:w3,useImperativeHandle:function(t,a,c){c=c!==null&&c!==void 0?c.concat([t]):null,gy(4194308,4,NN.bind(null,a,t),c)},useLayoutEffect:function(t,a){return gy(4194308,4,t,a)},useInsertionEffect:function(t,a){gy(4,2,t,a)},useMemo:function(t,a){var c=ta();a=a===void 0?null:a;var u=t();if(Hd){Qc(!0);try{t()}finally{Qc(!1)}}return c.memoizedState=[u,a],u},useReducer:function(t,a,c){var u=ta();if(c!==void 0){var f=c(a);if(Hd){Qc(!0);try{c(a)}finally{Qc(!1)}}}else f=a;return u.memoizedState=u.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},u.queue=t,t=t.dispatch=eZ.bind(null,Qt,t),[u.memoizedState,t]},useRef:function(t){var a=ta();return t={current:t},a.memoizedState=t},useState:function(t){t=zC(t);var a=t.queue,c=jN.bind(null,Qt,a);return a.dispatch=c,[t.memoizedState,c]},useDebugValue:QI,useDeferredValue:function(t,a){var c=ta();return ZI(c,t,a)},useTransition:function(){var t=zC(!1);return t=FN.bind(null,Qt,t.queue,!0,!1),ta().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,c){var u=Qt,f=ta();if(rn){if(c===void 0)throw Error(Ve(407));c=c()}else{if(c=a(),On===null)throw Error(Ve(349));(cn&127)!==0||yN(u,a,c)}f.memoizedState=c;var m={value:c,getSnapshot:a};return f.queue=m,w3(kN.bind(null,u,m,t),[t]),u.flags|=2048,hp(9,{destroy:void 0},wN.bind(null,u,m,c,a),null),c},useId:function(){var t=ta(),a=On.identifierPrefix;if(rn){var c=js,u=qs;c=(u&~(1<<32-$a(u)-1)).toString(32)+c,a="_"+a+"R_"+c,c=Uy++,0<c&&(a+="H"+c.toString(32)),a+="_"}else c=KQ++,a="_"+a+"r_"+c.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:JI,useFormState:v3,useActionState:v3,useOptimistic:function(t){var a=ta();a.memoizedState=a.baseState=t;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=c,a=eT.bind(null,Qt,!0,c),c.dispatch=a,[t,a]},useMemoCache:WI,useCacheRefresh:function(){return ta().memoizedState=JQ.bind(null,Qt)},useEffectEvent:function(t){var a=ta(),c={impl:t};return a.memoizedState=c,function(){if((bn&2)!==0)throw Error(Ve(440));return c.impl.apply(void 0,arguments)}}},WN={readContext:wo,use:m1,useCallback:_N,useContext:wo,useEffect:YI,useImperativeHandle:ON,useInsertionEffect:MN,useLayoutEffect:DN,useMemo:zN,useReducer:hy,useRef:PN,useState:function(){return hy(Zl)},useDebugValue:QI,useDeferredValue:function(t,a){var c=Sr();return BN(c,An.memoizedState,t,a)},useTransition:function(){var t=hy(Zl)[0],a=Sr().memoizedState;return[typeof t==="boolean"?t:rx(t),a]},useSyncExternalStore:bN,useId:qN,useHostTransitionStatus:JI,useFormState:b3,useActionState:b3,useOptimistic:function(t,a){var c=Sr();return IN(c,An,t,a)},useMemoCache:WI,useCacheRefresh:HN,useEffectEvent:AN},tZ={readContext:wo,use:m1,useCallback:_N,useContext:wo,useEffect:YI,useImperativeHandle:ON,useInsertionEffect:MN,useLayoutEffect:DN,useMemo:zN,useReducer:X2,useRef:PN,useState:function(){return X2(Zl)},useDebugValue:QI,useDeferredValue:function(t,a){var c=Sr();return An===null?ZI(c,t,a):BN(c,An.memoizedState,t,a)},useTransition:function(){var t=X2(Zl)[0],a=Sr().memoizedState;return[typeof t==="boolean"?t:rx(t),a]},useSyncExternalStore:bN,useId:qN,useHostTransitionStatus:JI,useFormState:y3,useActionState:y3,useOptimistic:function(t,a){var c=Sr();if(An!==null)return IN(c,An,t,a);return c.baseState=t,[t,c.queue.dispatch]},useMemoCache:WI,useCacheRefresh:HN,useEffectEvent:AN};function Y2(t,a,c,u){a=t.memoizedState,c=c(u,a),c=c===null||c===void 0?a:_n({},a,c),t.memoizedState=c,t.lanes===0&&(t.updateQueue.baseState=c)}var VC={enqueueSetState:function(t,a,c){t=t._reactInternals;var u=Si(),f=Od(u);f.payload=a,c!==void 0&&c!==null&&(f.callback=c),a=_d(t,f,u),a!==null&&(Ta(a,t,u),Ig(a,t,u))},enqueueReplaceState:function(t,a,c){t=t._reactInternals;var u=Si(),f=Od(u);f.tag=1,f.payload=a,c!==void 0&&c!==null&&(f.callback=c),a=_d(t,f,u),a!==null&&(Ta(a,t,u),Ig(a,t,u))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var c=Si(),u=Od(c);u.tag=2,a!==void 0&&a!==null&&(u.callback=a),a=_d(t,u,c),a!==null&&(Ta(a,t,c),Ig(a,t,c))}};function k3(t,a,c,u,f,m,p){return t=t.stateNode,typeof t.shouldComponentUpdate==="function"?t.shouldComponentUpdate(u,m,p):a.prototype&&a.prototype.isPureReactComponent?!zg(c,u)||!zg(f,m):!0}function S3(t,a,c,u){t=a.state,typeof a.componentWillReceiveProps==="function"&&a.componentWillReceiveProps(c,u),typeof a.UNSAFE_componentWillReceiveProps==="function"&&a.UNSAFE_componentWillReceiveProps(c,u),a.state!==t&&VC.enqueueReplaceState(a,a.state,null)}function jd(t,a){var c=a;if("ref"in a){c={};for(var u in a)u!=="ref"&&(c[u]=a[u])}if(t=t.defaultProps){c===a&&(c=_n({},c));for(var f in t)c[f]===void 0&&(c[f]=t[f])}return c}function nZ(t){My(t)}function rZ(t){console.error(t)}function oZ(t){My(t)}function Hy(t,a){try{var c=t.onUncaughtError;c(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function C3(t,a,c){try{var u=t.onCaughtError;u(c.value,{componentStack:c.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function UC(t,a,c){return c=Od(c),c.tag=3,c.payload={element:null},c.callback=function(){Hy(t,a)},c}function XN(t){return t=Od(t),t.tag=3,t}function YN(t,a,c,u){var f=c.type.getDerivedStateFromError;if(typeof f==="function"){var m=u.value;t.payload=function(){return f(m)},t.callback=function(){C3(a,c,u)}}var p=c.stateNode;p!==null&&typeof p.componentDidCatch==="function"&&(t.callback=function(){C3(a,c,u),typeof f!=="function"&&(su===null?su=new Set([this]):su.add(this));var g=u.stack;this.componentDidCatch(u.value,{componentStack:g!==null?g:""})})}function aZ(t,a,c,u,f){if(c.flags|=32768,u!==null&&typeof u==="object"&&typeof u.then==="function"){if(a=c.alternate,a!==null&&Fd(a,c,f,!0),c=Io.current,c!==null){switch(c.tag){case 31:case 13:case 19:return Do===null?Qy():c.alternate===null&&lr===0&&(lr=3),c.flags&=-257,c.flags|=65536,c.lanes=f,u===zy?c.flags|=16384:(a=c.updateQueue,a===null?c.updateQueue=new Set([u]):a.add(u),rC(t,u,f)),!1;case 22:return c.flags|=65536,u===zy?c.flags|=16384:(a=c.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},c.updateQueue=a):(c=a.retryQueue,c===null?a.retryQueue=new Set([u]):c.add(u)),rC(t,u,f)),!1}throw Error(Ve(435,c.tag))}return rC(t,u,f),Qy(),!1}if(rn)return a=Io.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=f,u!==EC&&(t=Error(Ve(422),{cause:u}),Fg(wi(t,c)))):(u!==EC&&(a=Error(Ve(423),{cause:u}),Fg(wi(a,c))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,u=wi(u,c),f=UC(t.stateNode,u,f),W2(t,f),lr!==4&&(lr=2)),!1;var m=Error(Ve(520),{cause:u});if(m=wi(m,c),Mg===null?Mg=[m]:Mg.push(m),lr!==4&&(lr=2),a===null)return!0;u=wi(u,c),c=a;do{switch(c.tag){case 3:return c.flags|=65536,t=f&-f,c.lanes|=t,t=UC(c.stateNode,u,t),W2(c,t),!1;case 1:if(a=c.type,m=c.stateNode,(c.flags&128)===0&&(typeof a.getDerivedStateFromError==="function"||m!==null&&typeof m.componentDidCatch==="function"&&(su===null||!su.has(m))))return c.flags|=65536,f&=-f,c.lanes|=f,f=XN(f),YN(f,t,c,u),W2(c,f),!1;break;case 22:if(c.memoizedState!==null)return c.flags|=65536,!1}c=c.return}while(c!==null);return!1}var tT=Error(Ve(461)),Ar=!1;function Xr(t,a,c,u){a.child=t===null?mN(a,null,c,u):qd(a,t.child,c,u)}function I3(t,a,c,u,f){c=c.render;var m=a.ref;if("ref"in u){var p={};for(var g in u)g!=="ref"&&(p[g]=u[g])}else p=u;if(Vd(a),u=jI(t,a,c,p,m,f),g=GI(),t!==null&&!Ar)return $I(t,a,f),Jl(t,a,f);return rn&&g&&u1(a),a.flags|=1,Xr(t,a,u,f),a.child}function T3(t,a,c,u,f){if(t===null){var m=c.type;if(typeof m==="function"&&!OI(m)&&m.defaultProps===void 0&&c.compare===null)return a.tag=15,a.type=m,QN(t,a,m,u,f);return t=fy(c.type,null,u,a,a.mode,f),t.ref=a.ref,t.return=a,a.child=t}if(m=t.child,!rT(t,f)){var p=m.memoizedProps;if(c=c.compare,c=c!==null?c:zg,c(p,u)&&t.ref===a.ref)return Jl(t,a,f)}return a.flags|=1,t=Kl(m,u),t.ref=a.ref,t.return=a,a.child=t}function QN(t,a,c,u,f){if(t!==null){var m=t.memoizedProps;if(zg(m,u)&&t.ref===a.ref)if(Ar=!1,a.pendingProps=u=m,rT(t,f))(t.flags&131072)!==0&&(Ar=!0);else return a.lanes=t.lanes,Jl(t,a,f)}return qC(t,a,c,u,f)}function ZN(t,a,c,u){var f=u.children,m=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(m=m!==null?m.baseLanes|c:c,t!==null){u=a.child=t.child;for(f=0;u!==null;)f=f|u.lanes|u.childLanes,u=u.sibling;u=f&~m}else u=0,a.child=null;return L3(t,a,m,c,u)}if((c&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&py(a,m!==null?m.cachePool:null),m!==null?h3(a,m):OC(),gN(a);else return u=a.lanes=536870912,L3(t,a,m!==null?m.baseLanes|c:c,c,u)}else m!==null?(py(a,m.cachePool),h3(a,m),iu(),a.memoizedState=null):(t!==null&&py(a,null),OC(),iu());return Xr(t,a,f,c),a.child}function Eg(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function L3(t,a,c,u,f){var m=BI();return m=m===null?null:{parent:Pr._currentValue,pool:m},a.memoizedState={baseLanes:c,cachePool:m},t!==null&&py(a,null),OC(),gN(a),t!==null&&Fd(t,a,u,!0),a.childLanes=f,null}function xy(t,a){return a=g1({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function R3(t,a,c){return qd(a,t.child,null,c),t=xy(a,a.pendingProps),t.flags|=2,Ua(a),a.memoizedState=null,t}function iZ(t,a,c){var u=a.pendingProps,f=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(rn){if(u.mode==="hidden")return t=xy(a,u),a.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},Eg(null,t);if(_C(a),(t=Hn)?(t=J6(t,ki),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:du!==null?{id:qs,overflow:js}:null,retryLane:536870912,hydrationErrors:null},c=iN(t),c.return=a,a.child=c,oo=a,Hn=null)):t=null,t===null)throw fu(a);return a.lanes=536870912,null}return xy(a,u)}var m=t.memoizedState;if(m!==null){var p=m.dehydrated;if(_C(a),f)if(a.flags&256)a.flags&=-257,a=R3(t,a,c);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(Ve(558));else if(Ar||Fd(t,a,c,!1),f=(c&t.childLanes)!==0,Ar||f){if(mu.current===null){if(u=On,u!==null&&(p=PD(u,c),p!==0&&p!==m.retryLane))throw m.retryLane=p,Xd(t,p),Ta(u,t,p),tT;Qy()}a=R3(t,a,c)}else t=m.treeContext,Hn=Ci(p.nextSibling),oo=a,rn=!0,ou=null,ki=!1,t!==null&&lN(a,t),a=xy(a,u),a.flags|=134221824;return a}return t=Kl(t.child,{mode:u.mode,children:u.children}),t.ref=a.ref,a.child=t,t.return=a,t}function Vm(t,a){var c=a.ref;if(c===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof c!=="function"&&typeof c!=="object")throw Error(Ve(284));if(t===null||t.ref!==c)a.flags|=4194816}}function qC(t,a,c,u,f){if(Vd(a),c=jI(t,a,c,u,void 0,f),u=GI(),t!==null&&!Ar)return $I(t,a,f),Jl(t,a,f);return rn&&u&&u1(a),a.flags|=1,Xr(t,a,c,f),a.child}function E3(t,a,c,u,f,m){if(Vd(a),a.updateQueue=null,c=vN(a,u,c,f),xN(t),u=GI(),t!==null&&!Ar)return $I(t,a,m),Jl(t,a,m);return rn&&u&&u1(a),a.flags|=1,Xr(t,a,c,m),a.child}function P3(t,a,c,u,f){if(Vd(a),a.stateNode===null){var m=Zm,p=c.contextType;typeof p==="object"&&p!==null&&(m=wo(p)),m=new c(u,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=VC,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=u,m.state=a.memoizedState,m.refs={},VI(a),p=c.contextType,m.context=typeof p==="object"&&p!==null?wo(p):Zm,m.state=a.memoizedState,p=c.getDerivedStateFromProps,typeof p==="function"&&(Y2(a,c,p,u),m.state=a.memoizedState),typeof c.getDerivedStateFromProps==="function"||typeof m.getSnapshotBeforeUpdate==="function"||typeof m.UNSAFE_componentWillMount!=="function"&&typeof m.componentWillMount!=="function"||(p=m.state,typeof m.componentWillMount==="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount==="function"&&m.UNSAFE_componentWillMount(),p!==m.state&&VC.enqueueReplaceState(m,m.state,null),Lg(a,u,m,f),Tg(),m.state=a.memoizedState),typeof m.componentDidMount==="function"&&(a.flags|=4194308),u=!0}else if(t===null){m=a.stateNode;var g=a.memoizedProps,v=jd(c,g);m.props=v;var k=m.context,S=c.contextType;p=Zm,typeof S==="object"&&S!==null&&(p=wo(S));var I=c.getDerivedStateFromProps;S=typeof I==="function"||typeof m.getSnapshotBeforeUpdate==="function",g=a.pendingProps!==g,S||typeof m.UNSAFE_componentWillReceiveProps!=="function"&&typeof m.componentWillReceiveProps!=="function"||(g||k!==p)&&S3(a,m,u,p),Xc=!1;var T=a.memoizedState;m.state=T,Lg(a,u,m,f),Tg(),k=a.memoizedState,g||T!==k||Xc?(typeof I==="function"&&(Y2(a,c,I,u),k=a.memoizedState),(v=Xc||k3(a,c,v,u,T,k,p))?(S||typeof m.UNSAFE_componentWillMount!=="function"&&typeof m.componentWillMount!=="function"||(typeof m.componentWillMount==="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount==="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount==="function"&&(a.flags|=4194308)):(typeof m.componentDidMount==="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=k),m.props=u,m.state=k,m.context=p,u=v):(typeof m.componentDidMount==="function"&&(a.flags|=4194308),u=!1)}else{m=a.stateNode,DC(t,a),p=a.memoizedProps,S=jd(c,p),m.props=S,I=a.pendingProps,T=m.context,k=c.contextType,v=Zm,typeof k==="object"&&k!==null&&(v=wo(k)),g=c.getDerivedStateFromProps,(k=typeof g==="function"||typeof m.getSnapshotBeforeUpdate==="function")||typeof m.UNSAFE_componentWillReceiveProps!=="function"&&typeof m.componentWillReceiveProps!=="function"||(p!==I||T!==v)&&S3(a,m,u,v),Xc=!1,T=a.memoizedState,m.state=T,Lg(a,u,m,f),Tg();var L=a.memoizedState;p!==I||T!==L||Xc||t!==null&&t.dependencies!==null&&_y(t.dependencies)?(typeof g==="function"&&(Y2(a,c,g,u),L=a.memoizedState),(S=Xc||k3(a,c,S,u,T,L,v)||t!==null&&t.dependencies!==null&&_y(t.dependencies))?(k||typeof m.UNSAFE_componentWillUpdate!=="function"&&typeof m.componentWillUpdate!=="function"||(typeof m.componentWillUpdate==="function"&&m.componentWillUpdate(u,L,v),typeof m.UNSAFE_componentWillUpdate==="function"&&m.UNSAFE_componentWillUpdate(u,L,v)),typeof m.componentDidUpdate==="function"&&(a.flags|=4),typeof m.getSnapshotBeforeUpdate==="function"&&(a.flags|=1024)):(typeof m.componentDidUpdate!=="function"||p===t.memoizedProps&&T===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!=="function"||p===t.memoizedProps&&T===t.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=L),m.props=u,m.state=L,m.context=v,u=S):(typeof m.componentDidUpdate!=="function"||p===t.memoizedProps&&T===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!=="function"||p===t.memoizedProps&&T===t.memoizedState||(a.flags|=1024),u=!1)}return m=u,Vm(t,a),u=(a.flags&128)!==0,m||u?(m=a.stateNode,c=u&&typeof c.getDerivedStateFromError!=="function"?null:m.render(),a.flags|=1,t!==null&&u?(a.child=qd(a,t.child,null,f),a.child=qd(a,null,c,f)):Xr(t,a,c,f),a.memoizedState=m.state,t=a.child):t=Jl(t,a,f),t}function A3(t,a,c,u){return Bd(),a.flags|=256,Xr(t,a,c,u),a.child}var HC={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jC(t){return{baseLanes:t,cachePool:uN()}}function GC(t,a,c){return t=t!==null?t.childLanes&~c:0,a&&(t|=Ha),t}function JN(t,a,c){var u=a.pendingProps,f=!1,m=(a.flags&128)!==0,p;if((p=m)||(p=t!==null&&t.memoizedState===null?!1:(So.current&2)!==0),p&&(f=!0,a.flags&=-129),p=(a.flags&32)!==0,a.flags&=-33,t===null){if(rn){if(f?au(a):iu(),(t=Hn)?(t=J6(t,ki),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:du!==null?{id:qs,overflow:js}:null,retryLane:536870912,hydrationErrors:null},c=iN(t),c.return=a,a.child=c,oo=a,Hn=null)):t=null,t===null)throw fu(a);return pT(t)?a.lanes=32:a.lanes=536870912,null}if(m=u.children,u=u.fallback,f)return iu(),f=a.mode,m=g1({mode:"hidden",children:m},f),u=Md(u,f,c,null),m.return=a,u.return=a,m.sibling=u,a.child=m,u=a.child,u.memoizedState=jC(c),u.childLanes=GC(t,p,c),a.memoizedState=HC,Eg(null,u);return au(a),nT(a,m)}var g=t.memoizedState;if(g!==null){var v=g.dehydrated;if(v!==null)return sZ(t,a,m,p,u,v,g,c)}if(f)return iu(),f=u.fallback,m=a.mode,g=t.child,v=g.sibling,u=Kl(g,{mode:"hidden",children:u.children}),u.subtreeFlags=g.subtreeFlags&1206910976,v!==null?f=Kl(v,f):(f=Md(f,m,c,null),f.flags|=2),f.return=a,u.return=a,u.sibling=f,a.child=u,Eg(null,u),u=a.child,f=t.child.memoizedState,f===null?f=jC(c):(m=f.cachePool,m!==null?(g=Pr._currentValue,m=m.parent!==g?{parent:g,pool:g}:m):m=uN(),f={baseLanes:f.baseLanes|c,cachePool:m}),u.memoizedState=f,u.childLanes=GC(t,p,c),a.memoizedState=HC,Eg(t.child,u);return au(a),c=t.child,t=c.sibling,c=Kl(c,{mode:"visible",children:u.children}),c.return=a,c.sibling=null,t!==null&&(p=a.deletions,p===null?(a.deletions=[t],a.flags|=16):p.push(t)),a.child=c,a.memoizedState=null,c}function nT(t,a){return a=g1({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function g1(t,a){return t=Ia(22,t,null,a),t.lanes=0,t}function Jb(t,a,c){return qd(a,t.child,null,c),t=nT(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function sZ(t,a,c,u,f,m,p,g){if(c){if(a.flags&256)return au(a),a.flags&=-257,Jb(t,a,g);if(a.memoizedState!==null)return iu(),a.child=t.child,a.flags|=128,null;return iu(),m=f.fallback,p=a.mode,f=g1({mode:"visible",children:f.children},p),m=Md(m,p,g,null),m.flags|=2,f.return=a,m.return=a,f.sibling=m,a.child=f,qd(a,t.child,null,g),f=a.child,f.memoizedState=jC(g),f.childLanes=GC(t,u,g),a.memoizedState=HC,Eg(null,f)}if(au(a),pT(m)){if(u=m.nextSibling&&m.nextSibling.dataset,u)var v=u.dgst;return u=v,u!==""&&(f=Error(Ve(419)),f.stack="",f.digest=u,Fg({value:f,source:null,stack:null})),Jb(t,a,g)}if(Ar||Fd(t,a,g,!1),u=(g&t.childLanes)!==0,Ar||u){if(mu.current!==null)return Jb(t,a,g);if(u=On,u!==null&&(f=PD(u,g),f!==0&&f!==p.retryLane))throw p.retryLane=f,Xd(t,f),Ta(u,t,f),tT;return vI(m)||Qy(),Jb(t,a,g)}if(vI(m))return a.flags|=192,a.child=t.child,null;return t=p.treeContext,Hn=Ci(m.nextSibling),oo=a,rn=!0,ou=null,ki=!1,t!==null&&lN(a,t),a=nT(a,f.children),a.flags|=134221824,a}function M3(t,a,c){t.lanes|=a;var u=t.alternate;u!==null&&(u.lanes|=a),my(t.return,a,c)}function D3(t){for(var a=null;t!==null;){var c=t.alternate;c!==null&&Fy(c)===null&&(a=t),t=t.sibling}return a}function ey(t,a,c,u,f,m){var p=t.memoizedState;p===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:c,tailMode:f,treeForkCount:m}:(p.isBackwards=a,p.rendering=null,p.renderingStartTime=0,p.last=u,p.tail=c,p.tailMode=f,p.treeForkCount=m)}function Q2(t){var a=t.child;for(t.child=null;a!==null;){var c=a.sibling;a.sibling=t.child,t.child=a,a=c}}function $C(t,a,c){var u=a.pendingProps,f=u.revealOrder,m=u.tail;u=u.children;var p=So.current;if(a.flags&128)return Ug(a,p),null;var g=(p&2)!==0;if(g?(p=p&1|2,a.flags|=128):p&=1,Ug(a,p),f==="backwards"&&t!==null?(Q2(t),Xr(t,a,u,c),Q2(t)):Xr(t,a,u,c),u=rn?Bg:0,!g&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&M3(t,c,a);else if(t.tag===19)M3(t,c,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"backwards":c=D3(a.child),c===null?(f=a.child,a.child=null):(f=c.sibling,c.sibling=null,Q2(a)),ey(a,!0,f,null,m,u);break;case"unstable_legacy-backwards":c=null,f=a.child;for(a.child=null;f!==null;){if(t=f.alternate,t!==null&&Fy(t)===null){a.child=f;break}t=f.sibling,f.sibling=c,c=f,f=t}ey(a,!0,c,null,m,u);break;case"together":ey(a,!1,null,null,void 0,u);break;case"independent":a.memoizedState=null;break;default:c=D3(a.child),c===null?(f=a.child,a.child=null):(f=c.sibling,c.sibling=null),ey(a,!1,f,c,m,u)}return a.child}function N3(t,a,c){var u=a.pendingProps;return Jc(a,a.type,u.value),Xr(t,a,u.children,c),a.child}function Jl(t,a,c){if(t!==null&&(a.dependencies=t.dependencies),hu|=a.lanes,(c&a.childLanes)===0)if(t!==null){if(Fd(t,a,c,!1),(c&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(Ve(153));if(a.child!==null){t=a.child,c=Kl(t,t.pendingProps),a.child=c;for(c.return=a;t.sibling!==null;)t=t.sibling,c=c.sibling=Kl(t,t.pendingProps),c.return=a;c.sibling=null}return a.child}function rT(t,a){if((t.lanes&a)!==0)return!0;return t=t.dependencies,t!==null&&_y(t)?!0:!1}function lZ(t,a,c){switch(a.tag){case 3:Ry(a,a.stateNode.containerInfo),Jc(a,Pr,t.memoizedState.cache),Bd();break;case 27:case 5:bC(a);break;case 4:Ry(a,a.stateNode.containerInfo);break;case 10:Jc(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,_C(a),null;break;case 13:var u=a.memoizedState;if(u!==null){if(u.dehydrated!==null)return au(a),a.flags|=128,null;u=Fd(t,a,c,!1);var f=a.child.childLanes;if(u||(c&f)!==0)return JN(t,a,c);return au(a),t=Jl(t,a,c),t!==null?t.sibling:null}au(a);break;case 19:if(a.flags&128)return $C(t,a,c);if(f=(t.flags&128)!==0,u=(c&a.childLanes)!==0,u||(Fd(t,a,c,!1),u=(c&a.childLanes)!==0),f){if(u)return $C(t,a,c);a.flags|=128}if(f=a.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Ug(a,So.current),u)break;else return null;case 22:return a.lanes=0,ZN(t,a,c,a.pendingProps);case 24:Jc(a,Pr,t.memoizedState.cache)}return Jl(t,a,c)}function e6(t,a,c){if(t!==null)if(t.memoizedProps!==a.pendingProps)Ar=!0;else{if(!rT(t,c)&&(a.flags&128)===0)return Ar=!1,lZ(t,a,c);Ar=(t.flags&131072)!==0?!0:!1}else Ar=!1,rn&&(a.flags&1048576)!==0&&sN(a,Bg,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(t=Ld(a.elementType),a.type=t,typeof t==="function")OI(t)?(u=jd(t,u),a.tag=1,a=P3(null,a,t,u,c)):(a.tag=0,a=qC(null,a,t,u,c));else{if(t!==void 0&&t!==null){var f=t.$$typeof;if(f===SI){a.tag=11,a=I3(null,a,t,u,c);break e}else if(f===CI){a.tag=14,a=T3(null,a,t,u,c);break e}else if(f===Fs){a.tag=10,a.type=t,a=N3(null,a,c);break e}}throw a=xC(t)||t,Error(Ve(306,a,""))}}return a;case 0:return qC(t,a,a.type,a.pendingProps,c);case 1:return u=a.type,f=jd(u,a.pendingProps),P3(t,a,u,f,c);case 3:e:{if(Ry(a,a.stateNode.containerInfo),t===null)throw Error(Ve(387));u=a.pendingProps;var m=a.memoizedState;f=m.element,DC(t,a),Lg(a,u,null,c);var p=a.memoizedState;if(u=p.cache,Jc(a,Pr,u),u!==m.cache&&AC(a,[Pr],c,!0),Tg(),u=p.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:p.cache},a.updateQueue.baseState=m,a.memoizedState=m,a.flags&256){a=A3(t,a,u,c);break e}else if(u!==f){f=wi(Error(Ve(424)),a),Fg(f),a=A3(t,a,u,c);break e}else{switch(t=a.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}Hn=Ci(t.firstChild),oo=a,rn=!0,ou=null,ki=!0,c=mN(a,null,u,c);for(a.child=c;c;)c.flags=c.flags&-3|134221824,c=c.sibling}else{if(Bd(),u===f){a=Jl(t,a,c);break e}Xr(t,a,u,c)}a=a.child}return a;case 26:return Vm(t,a),t===null?(c=aD(a.type,null,a.pendingProps,null))?a.memoizedState=c:rn||(a.stateNode=j6(a.type,a.pendingProps,ru.current,a)):a.memoizedState=aD(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return bC(a),t===null&&rn&&(u=a.stateNode=e8(a.type,a.pendingProps,ru.current),oo=a,ki=!0,f=Hn,xu(a.type)?(bI=f,Hn=Ci(u.firstChild)):Hn=f),Xr(t,a,a.pendingProps.children,c),Vm(t,a),t===null&&(a.flags|=4194304),a.child;case 5:if(t===null&&rn){if(f=u=Hn)u=eJ(u,a.type,a.pendingProps,ki),u!==null?(a.stateNode=u,oo=a,Hn=Ci(u.firstChild),ki=!1,f=!0):f=!1;f||fu(a)}return bC(a),f=a.type,m=a.pendingProps,p=t!==null?t.memoizedProps:null,u=m.children,hI(f,m)?u=null:p!==null&&hI(f,p)&&(a.flags|=32),a.memoizedState!==null&&(f=jI(t,a,WQ,null,null,c),kp._currentValue=f),Vm(t,a),Xr(t,a,u,c),a.child;case 6:if(t===null&&rn){if(t=c=Hn)c=tJ(c,a.pendingProps,ki),c!==null?(a.stateNode=c,oo=a,Hn=null,t=!0):t=!1;t||fu(a)}return null;case 13:return JN(t,a,c);case 4:return Ry(a,a.stateNode.containerInfo),u=a.pendingProps,t===null?a.child=qd(a,null,u,c):Xr(t,a,u,c),a.child;case 11:return I3(t,a,a.type,a.pendingProps,c);case 7:return u=a.pendingProps,Vm(t,a),Xr(t,a,u,c),a.child;case 8:return Xr(t,a,a.pendingProps.children,c),a.child;case 12:return Xr(t,a,a.pendingProps.children,c),a.child;case 10:return N3(t,a,c);case 9:return f=a.type._context,u=a.pendingProps.children,Vd(a),f=wo(f),u=u(f),a.flags|=1,Xr(t,a,u,c),a.child;case 14:return T3(t,a,a.type,a.pendingProps,c);case 15:return QN(t,a,a.type,a.pendingProps,c);case 19:return $C(t,a,c);case 31:return iZ(t,a,c);case 22:return ZN(t,a,c,a.pendingProps);case 24:return Vd(a),u=wo(Pr),t===null?(f=BI(),f===null&&(f=On,m=zI(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=c),f=m),a.memoizedState={parent:u,cache:f},VI(a),Jc(a,Pr,f)):((t.lanes&c)!==0&&(DC(t,a),Lg(a,null,null,c),Tg()),f=t.memoizedState,m=a.memoizedState,f.parent!==u?(f={parent:u,cache:u},a.memoizedState=f,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=f),Jc(a,Pr,u)):(u=m.cache,Jc(a,Pr,u),u!==f.cache&&AC(a,[Pr],c,!0))),Xr(t,a,a.pendingProps.children,c),a.child;case 30:return a.stateNode===null&&(a.stateNode={autoName:null,paired:null,clones:null,ref:null}),u=a.pendingProps,u.name!=null&&u.name!=="auto"?a.flags|=t===null?18882560:18874368:rn&&u1(a),t!==null&&t.memoizedProps.name!==u.name?a.flags|=4194816:Vm(t,a),Xr(t,a,u.children,c),a.child;case 29:throw a.pendingProps}throw Error(Ve(156,a.tag))}function jl(t){t.flags|=4}function Z2(t,a,c,u,f){var m;if(m=(t.mode&32)!==0)m=c===null?lD(a,u):lD(a,u)&&(u.src!==c.src||u.srcSet!==c.srcSet);if(m){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if(E6())t.flags|=8192;else throw Nd=zy,FI}else t.flags&=-16777217}function O3(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!o8(a))if(E6())t.flags|=8192;else throw Nd=zy,FI}function ty(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?LD():536870912,t.lanes|=a,gp|=a)}function cg(t,a){if(!rn)switch(t.tailMode){case"visible":break;case"collapsed":for(var c=t.tail,u=null;c!==null;)c.alternate!==null&&(u=c),c=c.sibling;u===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null;break;default:a=t.tail;for(c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?t.tail=null:c.sibling=null}}function qn(t){var a=t.alternate!==null&&t.alternate.child===t.child,c=0,u=0;if(a)for(var f=t.child;f!==null;)c|=f.lanes|f.childLanes,u|=f.subtreeFlags&1206910976,u|=f.flags&1206910976,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)c|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=u,t.childLanes=c,a}function cZ(t,a,c){var u=a.pendingProps;switch(_I(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qn(a),null;case 1:return qn(a),null;case 3:if(c=a.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Wl(Pr),fp(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),t===null||t.child===null)Bm(a)?jl(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,K2());return qn(a),null;case 26:var{type:f,memoizedState:m}=a;return t===null?(jl(a),m!==null?(qn(a),O3(a,m)):(qn(a),Z2(a,f,null,u,c))):m?m!==t.memoizedState?(jl(a),qn(a),O3(a,m)):(qn(a),a.flags&=-16777217):(t=t.memoizedProps,t!==u&&jl(a),qn(a),Z2(a,f,t,u,c)),null;case 27:if(Ey(a),c=ru.current,f=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==u&&jl(a);else{if(!u){if(a.stateNode===null)throw Error(Ve(166));return qn(a),a.subtreeFlags&=-33554433,null}t=$s.current,Bm(a)?l3(a,t):(t=e8(f,u,c),a.stateNode=t,jl(a))}return qn(a),a.subtreeFlags&=-33554433,null;case 5:if(Ey(a),f=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==u&&jl(a);else{if(!u){if(a.stateNode===null)throw Error(Ve(166));return qn(a),a.subtreeFlags&=-33554433,null}if(m=$s.current,Bm(a))l3(a,m);else{var p=Gg(ru.current);switch(m){case 1:m=p.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=p.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=p.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=p.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=p.createElement("div"),m.innerHTML="<script></script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is==="string"?p.createElement("select",{is:u.is}):p.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is==="string"?p.createElement(f,{is:u.is}):p.createElement(f)}}m[yo]=a,m[Ra]=u;e:for(p=a.child;p!==null;){if(p.tag===5||p.tag===6)m.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===a)break e;for(;p.sibling===null;){if(p.return===null||p.return===a)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}a.stateNode=m;e:switch(Co(m,f,u),f){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&jl(a)}}return qn(a),a.subtreeFlags&=-33554433,Z2(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,c),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==u&&jl(a);else{if(typeof u!=="string"&&a.stateNode===null)throw Error(Ve(166));if(t=ru.current,Bm(a)){if(t=a.stateNode,c=a.memoizedProps,u=null,f=oo,f!==null)switch(f.tag){case 27:case 5:u=f.memoizedProps}t[yo]=a,t=t.nodeValue===c||u!==null&&u.suppressHydrationWarning===!0||q6(t.nodeValue,c)?!0:!1,t||fu(a,!0)}else t=Gg(t).createTextNode(u),t[yo]=a,a.stateNode=t}return qn(a),null;case 31:if(c=a.memoizedState,t===null||t.memoizedState!==null){if(u=Bm(a),c!==null){if(t===null){if(!u)throw Error(Ve(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Ve(557));t[yo]=a}else Bd(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;qn(a),t=!1}else c=K2(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=c),t=!0;if(!t){if(a.flags&256)return Ua(a),a;return Ua(a),null}if((a.flags&128)!==0)throw Error(Ve(558))}return qn(a),null;case 13:if(u=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=Bm(a),u!==null&&u.dehydrated!==null){if(t===null){if(!f)throw Error(Ve(318));if(f=a.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(Ve(317));f[yo]=a}else Bd(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;qn(a),f=!1}else f=K2(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f){if(a.flags&256)return Ua(a),a;return Ua(a),null}}if(Ua(a),(a.flags&128)!==0)return a.lanes=c,a;return c=u!==null,t=t!==null&&t.memoizedState!==null,c&&(u=a.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==f&&(u.flags|=2048)),c!==t&&c&&(a.child.flags|=8192),ty(a,a.updateQueue),qn(a),null;case 4:return fp(),t===null&&V6(a.stateNode.containerInfo),a.flags|=67108864,qn(a),null;case 10:return Wl(a.type),qn(a),null;case 19:if(qI(a),u=a.memoizedState,u===null)return qn(a),null;if(f=(a.flags&128)!==0,m=u.rendering,m===null)if(f)cg(u,!1);else{if(lr!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(m=Fy(t),m!==null){a.flags|=128,cg(u,!1),t=m.updateQueue,a.updateQueue=t,ty(a,t),a.subtreeFlags=0,t=c;for(c=a.child;c!==null;)aN(c,t),c=c.sibling;return Ug(a,So.current&1|2),rn&&Gl(a,u.treeForkCount),a.child}t=t.sibling}u.tail!==null&&ja()>Xy&&(a.flags|=128,f=!0,cg(u,!1),a.lanes=4194304)}else{if(!f)if(t=Fy(m),t!==null){if(a.flags|=128,f=!0,t=t.updateQueue,a.updateQueue=t,ty(a,t),cg(u,!0),u.tail===null&&u.tailMode!=="collapsed"&&u.tailMode!=="visible"&&!m.alternate&&!rn)return qn(a),null}else 2*ja()-u.renderingStartTime>Xy&&c!==536870912&&(a.flags|=128,f=!0,cg(u,!1),a.lanes=4194304);u.isBackwards?(m.sibling=a.child,a.child=m):(t=u.last,t!==null?t.sibling=m:a.child=m,u.last=m)}if(u.tail!==null){t=u.tail;e:{for(c=t;c!==null;){if(c.alternate!==null){c=!1;break e}c=c.sibling}c=!0}return u.rendering=t,u.tail=t.sibling,u.renderingStartTime=ja(),t.sibling=null,m=So.current,m=f?m&1|2:m&1,u.tailMode==="visible"||u.tailMode==="collapsed"||!c||rn?Ug(a,m):(c=m,jn(Io,a),jn(So,c),Do===null&&(Do=a)),rn&&Gl(a,u.treeForkCount),t}return qn(a),null;case 22:case 23:return Ua(a),UI(),u=a.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(c&536870912)!==0&&(a.flags&128)===0&&(qn(a),a.subtreeFlags&6&&(a.flags|=8192)):qn(a),c=a.updateQueue,c!==null&&ty(a,c.retryQueue),c=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(c=t.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==c&&(a.flags|=2048),t!==null&&ko(Dd),null;case 24:return c=null,t!==null&&(c=t.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Wl(Pr),qn(a),null;case 25:return null;case 30:return a.flags|=33554432,qn(a),null}throw Error(Ve(156,a.tag))}function uZ(t,a){switch(_I(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return Wl(Pr),fp(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Ey(a),null;case 31:if(a.memoizedState!==null){if(Ua(a),a.alternate===null)throw Error(Ve(340));Bd()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(Ua(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(Ve(340));Bd()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return qI(a),t=a.flags,t&65536?(a.flags=t&-65537|128,t=a.memoizedState,t!==null&&(t.rendering=null,t.tail=null),a.flags|=4,a):null;case 4:return fp(),null;case 10:return Wl(a.type),null;case 22:case 23:return Ua(a),UI(),t!==null&&ko(Dd),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return Wl(Pr),null;case 25:return null;default:return null}}function t6(t,a){switch(_I(a),a.tag){case 3:Wl(Pr),fp();break;case 26:case 27:case 5:Ey(a);break;case 4:fp();break;case 31:a.memoizedState!==null&&Ua(a);break;case 13:Ua(a);break;case 19:qI(a);break;case 10:Wl(a.type);break;case 22:case 23:Ua(a),UI(),t!==null&&ko(Dd);break;case 24:Wl(Pr)}}function ox(t,a){try{var c=a.updateQueue,u=c!==null?c.lastEffect:null;if(u!==null){var f=u.next;c=f;do{if((c.tag&t)===t){u=void 0;var m=c.create,p=c.inst;u=m(),p.destroy=u}c=c.next}while(c!==f)}}catch(g){Pn(a,a.return,g)}}function pu(t,a,c){try{var u=a.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var m=f.next;u=m;do{if((u.tag&t)===t){var p=u.inst,g=p.destroy;if(g!==void 0){p.destroy=void 0,f=a;var v=c,k=g;try{k()}catch(S){Pn(f,v,S)}}}u=u.next}while(u!==m)}}catch(S){Pn(a,a.return,S)}}function n6(t){var a=t.updateQueue;if(a!==null){var c=t.stateNode;try{hN(a,c)}catch(u){Pn(t,t.return,u)}}}function r6(t,a,c){c.props=jd(t.type,t.memoizedProps),c.state=t.memoizedState;try{c.componentWillUnmount()}catch(u){Pn(t,a,u)}}function zs(t,a){try{var c=t.ref;if(c!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:var f=t.stateNode,m=Yl(t.memoizedProps,f);if(f.ref===null||f.ref.name!==m)f.ref=W6(m);u=f.ref;break;case 7:if(t.stateNode===null){var p=new Wa(t);La(t.child,!1,ZZ,p,void 0,void 0),t.stateNode=p}u=t.stateNode;break;default:u=t.stateNode}typeof c==="function"?t.refCleanup=c(u):c.current=u}}catch(g){Pn(t,a,g)}}function bo(t,a){var c=t.ref,u=t.refCleanup;if(c!==null)if(typeof u==="function")try{u()}catch(f){Pn(t,a,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof c==="function")try{c(null)}catch(f){Pn(t,a,f)}else c.current=null}function jy(t,a){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&a!==null)for(var c=0;c<a.length;c++)Z6(t.stateNode,a[c])}function _3(t){for(var a=t.return;a!==null;){if(aT(a)&&Z6(t.stateNode,a.stateNode),oT(a))break;a=a.return}}function Pg(t){for(var a=t.return;a!==null;){if(aT(a)&&JZ(t.stateNode,a.stateNode),oT(a))break;a=a.return}}function oT(t){return t.tag===5||t.tag===3||t.tag===27}function aT(t){return t&&t.tag===7&&t.stateNode!==null}function KC(t){var{type:a,memoizedProps:c,stateNode:u}=t;try{e:switch(a){case"button":case"input":case"select":case"textarea":c.autoFocus&&u.focus();break e;case"img":c.src?u.src=c.src:c.srcSet&&(u.srcset=c.srcSet)}}catch(f){Pn(t,t.return,f)}}function J2(t,a,c){try{var u=t.stateNode;NZ(u,t.type,c,a),u[Ra]=a}catch(f){Pn(t,t.return,f)}}function o6(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&xu(t.type)||t.tag===4}function eC(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||o6(t.return))return null;t=t.return}t.sibling.return=t.return;for(t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&xu(t.type))continue e;if(t.flags&2)continue e;if(t.child===null||t.tag===4)continue e;else t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function WC(t,a,c,u){var f=t.tag;if(f===5||f===6)f=t.stateNode,a?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(f,a):(a=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,a.appendChild(f),c=c._reactRootContainer,c!==null&&c!==void 0||a.onclick!==null||(a.onclick=Us)),jy(t,u),gn=!0;else if(f!==4&&(f===27&&(jy(t,u),u=null,xu(t.type)&&(c=t.stateNode,a=null)),t=t.child,t!==null))for(WC(t,a,c,u),t=t.sibling;t!==null;)WC(t,a,c,u),t=t.sibling}function Gy(t,a,c,u){var f=t.tag;if(f===5||f===6)f=t.stateNode,a?c.insertBefore(f,a):c.appendChild(f),jy(t,u),gn=!0;else if(f!==4&&(f===27&&(jy(t,u),u=null,xu(t.type)&&(c=t.stateNode)),t=t.child,t!==null))for(Gy(t,a,c,u),t=t.sibling;t!==null;)Gy(t,a,c,u),t=t.sibling}function a6(t){var{stateNode:a,memoizedProps:c}=t;try{for(var u=t.type,f=a.attributes;f.length;)a.removeAttributeNode(f[0]);Co(a,u,c),a[yo]=t,a[Ra]=c}catch(m){Pn(t,t.return,m)}}var $y=!1,qa=null;function z3(t){if(t.tag===30||(t.subtreeFlags&33554432)!==0)$y=!0}var Bs=null;function B3(){var t=Bs;return Bs=null,t}var Ca=0;function Lp(t,a,c,u,f){return Ca=0,i6(t.child,a,c,u,f)}function i6(t,a,c,u,f){for(var m=!1;t!==null;){if(t.tag===5){var p=t.stateNode;if(u!==null){var g=gI(p);u.push(g),g.view&&(m=!0)}else m||gI(p).view&&(m=!0);$y=!0,G6(p,Ca===0?a:a+"_"+Ca,c),Ca++}else if(t.tag!==22||t.memoizedState===null)t.tag===30&&f||i6(t.child,a,c,u,f)&&(m=!0);t=t.sibling}return m}function Xs(t,a){for(;t!==null;){if(t.tag===5)$6(t.stateNode,t.memoizedProps);else if(t.tag!==22||t.memoizedState===null)t.tag===30&&a||Xs(t.child,a);t=t.sibling}}function vy(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(vy(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired){var a=t.memoizedProps;if(a.name==null||a.name==="auto")throw Error(Ve(544));var c=a.name;a=nc(a.default,a.share),a!=="none"&&(Lp(t,c,a,null,!1)||Xs(t.child,!1))}}t=t.sibling}}function XC(t,a){if(t.tag===30){var c=t.stateNode,u=t.memoizedProps,f=Yl(u,c),m=nc(u.default,c.paired?u.share:u.enter);m!=="none"?Lp(t,f,m,null,!1)?(vy(t),c.paired||a||xp(t,u.onEnter)):Xs(t.child,!1):vy(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)XC(t,a),t=t.sibling;else vy(t)}function YC(t){if(qa!==null&&qa.size!==0){var a=qa;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var c=t.memoizedProps,u=c.name;if(u!=null&&u!=="auto"){var f=a.get(u);if(f!==void 0){var m=nc(c.default,c.share);if(m!=="none"&&(Lp(t,u,m,null,!1)?(m=t.stateNode,f.paired=m,m.paired=f,xp(t,c.onShare)):Xs(t.child,!1)),a.delete(u),a.size===0)break}}}YC(t)}t=t.sibling}}}function QC(t){if(t.tag===30){var a=t.memoizedProps,c=Yl(a,t.stateNode),u=qa!==null?qa.get(c):void 0,f=nc(a.default,u!==void 0?a.share:a.exit);f!=="none"&&(Lp(t,c,f,null,!1)?u!==void 0?(f=t.stateNode,u.paired=f,f.paired=u,qa.delete(c),xp(t,a.onShare)):xp(t,a.onExit):Xs(t.child,!1)),qa!==null&&YC(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)QC(t),t=t.sibling;else qa!==null&&YC(t)}function s6(t){for(t=t.child;t!==null;){if(t.tag===30){var a=t.memoizedProps,c=Yl(a,t.stateNode);a=nc(a.default,a.update),t.flags&=-5,a!=="none"&&Lp(t,c,a,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&s6(t);t=t.sibling}}function ZC(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var a=t.stateNode;a.paired!==null&&(a.paired=null,Xs(t.child,!1))}ZC(t)}t=t.sibling}}function by(t){if(t.tag===30)t.stateNode.paired=null,Xs(t.child,!1),ZC(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)by(t),t=t.sibling;else ZC(t)}function l6(t){for(t=t.child;t!==null;)t.tag===30?Xs(t.child,!1):(t.subtreeFlags&33554432)!==0&&l6(t),t=t.sibling}function iT(t,a,c,u,f,m,p){for(var g=!1;a!==null;){if(a.tag===5){var v=a.stateNode;if(m!==null&&Ca<m.length){var k=m[Ca],S=gI(v);if(k.view||S.view)g=!0;var I;if(I=(t.flags&4)===0)if(S.clip)I=!0;else{I=k.rect;var T=S.rect;I=I.y!==T.y||I.x!==T.x||I.height!==T.height||I.width!==T.width}I&&(t.flags|=4),S.abs?S=!k.abs:(k=k.rect,S=S.rect,S=k.height!==S.height||k.width!==S.width),S&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&G6(v,Ca===0?c:c+"_"+Ca,f),g&&(t.flags&4)!==0||(Bs===null&&(Bs=[]),Bs.push(v,Ca===0?u:u+"_"+Ca,a.memoizedProps)),Ca++}else if(a.tag!==22||a.memoizedState===null)a.tag===30&&p?t.flags|=a.flags&32:iT(t,a.child,c,u,f,m,p)&&(g=!0);a=a.sibling}return g}function c6(t,a){for(t=t.child;t!==null;){if(t.tag===30){var c=t.memoizedProps,u=t.stateNode,f=Yl(c,u),m=nc(c.default,c.update);if(a){u=u.clones;var p=u===null?null:u.map(VZ)}else p=t.memoizedState,t.memoizedState=null;u=t;var g=t.child;Ca=0,f=iT(u,g,f,f,m,p,!1),(t.flags&4)!==0&&f&&(a||xp(t,c.onUpdate))}else(t.subtreeFlags&33554432)!==0&&c6(t,a);t=t.sibling}}var to=!1,In=!1,Ns=!1,tC=!1,F3=typeof WeakSet==="function"?WeakSet:Set,no=null,Os=!1,vg=!1,Ky=!1,JC=!1;function dZ(t,a,c){if(t=t.containerInfo,mI=Sp,t=QD(t),MI(t)){if("selectionStart"in t)var u={start:t.selectionStart,end:t.selectionEnd};else e:{u=(u=t.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var m=f.anchorOffset,p=f.focusNode;f=f.focusOffset;try{u.nodeType,p.nodeType}catch(A){u=null;break e}var g=0,v=-1,k=-1,S=0,I=0,T=t,L=null;t:for(;;){for(var R;;){if(T!==u||m!==0&&T.nodeType!==3||(v=g+m),T!==p||f!==0&&T.nodeType!==3||(k=g+f),T.nodeType===3&&(g+=T.nodeValue.length),(R=T.firstChild)===null)break;L=T,T=R}for(;;){if(T===t)break t;if(L===u&&++S===m&&(v=g),L===p&&++I===f&&(k=g),(R=T.nextSibling)!==null)break;T=L,L=T.parentNode}T=R}u=v===-1||k===-1?null:{start:v,end:k}}else u=null}u=u||{start:0,end:0}}else u=null;pI={focusedElem:t,selectionRange:u},Sp=!1,c=(c&335544064)===c,no=a;for(a=c?9270:1024;no!==null;){if(t=no,c&&(u=t.deletions,u!==null))for(m=0;m<u.length;m++)c&&QC(u[m]);if(t.alternate===null&&(t.flags&2)!==0)c&&z3(t),ny(c);else{if(t.tag===22){if(u=t.alternate,t.memoizedState!==null){u!==null&&u.memoizedState===null&&c&&QC(u),ny(c);continue}else if(u!==null&&u.memoizedState!==null){c&&z3(t),ny(c);continue}}u=t.child,(t.subtreeFlags&a)!==0&&u!==null?(u.return=t,no=u):(c&&s6(t),ny(c))}}qa=null}function ny(t){for(;no!==null;){var a=no,c=t,{alternate:u,flags:f}=a;switch(a.tag){case 0:case 11:case 15:break;case 1:if((f&1024)!==0&&u!==null){c=void 0,f=u.memoizedProps,u=u.memoizedState;var m=a.stateNode;try{var p=jd(a.type,f);c=m.getSnapshotBeforeUpdate(p,u),m.__reactInternalSnapshotBeforeUpdate=c}catch(g){Pn(a,a.return,g)}}break;case 3:if((f&1024)!==0){if(u=a.stateNode.containerInfo,c=u.nodeType,c===9)xI(u);else if(c===1)switch(u.nodeName){case"HEAD":case"HTML":case"BODY":xI(u);break;default:u.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:c&&u!==null&&(c=Yl(u.memoizedProps,u.stateNode),f=a.memoizedProps,f=nc(f.default,f.update),f!=="none"&&Lp(u,c,f,u.memoizedState=[],!0));break;default:if((f&1024)!==0)throw Error(Ve(163))}if(u=a.sibling,u!==null){u.return=a.return,no=u;break}no=a.return}}function u6(t,a,c){var u=c.flags;switch(c.tag){case 0:case 11:case 15:_s(t,c),u&4&&ox(5,c);break;case 1:if(_s(t,c),u&4)if(t=c.stateNode,a===null)try{t.componentDidMount()}catch(p){Pn(c,c.return,p)}else{var f=jd(c.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(f,a,t.__reactInternalSnapshotBeforeUpdate)}catch(p){Pn(c,c.return,p)}}u&64&&n6(c),u&512&&zs(c,c.return);break;case 3:if(_s(t,c),u&64&&(t=c.updateQueue,t!==null)){if(a=null,c.child!==null)switch(c.child.tag){case 27:case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}try{hN(t,a)}catch(p){Pn(c,c.return,p)}}break;case 27:a===null&&u&4&&a6(c);case 26:case 5:_s(t,c),a===null&&u&4&&KC(c),u&512&&zs(c,c.return);break;case 12:_s(t,c);break;case 31:_s(t,c),u&4&&p6(t,c);break;case 13:_s(t,c),u&4&&h6(t,c),u&64&&(t=c.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(c=SZ.bind(null,c),nJ(t,c))));break;case 22:if(u=c.memoizedState!==null||to,!u){var m=a!==null&&a.memoizedState!==null||In;a=to,f=In,to=u,(In=m)&&!f?(u=2,(c.subtreeFlags&8772)!==0&&(u|=1),Ji(t,c,u)):_s(t,c),to=a,In=f}break;case 30:_s(t,c),u&512&&zs(c,c.return);break;case 7:u&512&&zs(c,c.return);default:_s(t,c)}}function eI(t,a){for(t=t.child;t!==null;)d6(t,a),t=t.sibling}function d6(t,a){switch(t.tag){case 5:case 26:try{var c=t.stateNode;if(a){var u=c.style;typeof u.setProperty==="function"?u.setProperty("display","none","important"):u.display="none"}else{var f=t.stateNode,m=t.memoizedProps.style,p=m!==void 0&&m!==null&&m.hasOwnProperty("display")?m.display:null;f.style.display=p==null||typeof p==="boolean"?"":(""+p).trim()}}catch(v){Pn(t,t.return,v)}tI(t,a);break;case 6:try{t.stateNode.nodeValue=a?"":t.memoizedProps,gn=!0}catch(v){Pn(t,t.return,v)}break;case 18:try{var g=t.stateNode;a?J3(g,!0):J3(t.stateNode,!1)}catch(v){Pn(t,t.return,v)}break;case 22:case 23:t.memoizedState===null&&eI(t,a);break;default:eI(t,a)}}function tI(t,a){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var c=t,u=a;switch(c.tag){case 4:d6(c,u);break e;case 22:c.memoizedState===null&&tI(c,u);break e;default:tI(c,u)}}t=t.sibling}}function f6(t){var a=t.alternate;a!==null&&(t.alternate=null,f6(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&o1(a)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Kn=null,ka=!1;function Zi(t,a,c){for(c=c.child;c!==null;)m6(t,a,c),c=c.sibling}function m6(t,a,c){if(Ga&&typeof Ga.onCommitFiberUnmount==="function")try{Ga.onCommitFiberUnmount(Qg,c)}catch(m){}switch(c.tag){case 26:In||bo(c,a),Zi(t,a,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&!In&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:In||bo(c,a),Pg(c);var u=Kn,f=ka;xu(c.type)&&(Kn=c.stateNode,ka=!1),Zi(t,a,c),t8(c.stateNode,c.type,c.memoizedProps),Kn=u,ka=f;break;case 5:In||bo(c,a),Pg(c);case 6:if(c.tag===6&&Pg(c),u=Kn,f=ka,Kn=null,Zi(t,a,c),Kn=u,ka=f,Kn!==null)if(ka)try{(Kn.nodeType===9?Kn.body:Kn.nodeName==="HTML"?Kn.ownerDocument.body:Kn).removeChild(c.stateNode),gn=!0}catch(m){Pn(c,a,m)}else try{Kn.removeChild(c.stateNode),gn=!0}catch(m){Pn(c,a,m)}break;case 18:Kn!==null&&(ka?(t=Kn,Z3(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,c.stateNode),Cp(t)):Z3(Kn,c.stateNode));break;case 4:u=Kn,f=ka,Kn=c.stateNode.containerInfo,ka=!0,Zi(t,a,c),Kn=u,ka=f;break;case 0:case 11:case 14:case 15:pu(2,c,a),In||pu(4,c,a),Zi(t,a,c);break;case 1:In||(bo(c,a),u=c.stateNode,typeof u.componentWillUnmount==="function"&&r6(c,a,u)),Zi(t,a,c);break;case 21:Zi(t,a,c);break;case 22:In=(u=In)||c.memoizedState!==null,Zi(t,a,c),In=u;break;case 30:bo(c,a),Zi(t,a,c);break;case 7:In||bo(c,a),Zi(t,a,c);break;default:Zi(t,a,c)}}function p6(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Cp(t)}catch(c){Pn(a,a.return,c)}}}function h6(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Cp(t)}catch(c){Pn(a,a.return,c)}}function fZ(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new F3),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new F3),a;default:throw Error(Ve(435,t.tag))}}function ry(t,a){var c=fZ(t);a.forEach(function(u){if(!c.has(u)){c.add(u);var f=CZ.bind(null,t,u);u.then(f,f)}})}function $o(t,a,c){var u=a.deletions;if(u!==null)for(var f=0;f<u.length;f++){var m=u[f],p=t,g=a,v=g;e:for(;v!==null;){switch(v.tag){case 27:if(xu(v.type)){Kn=v.stateNode,ka=!1;break e}break;case 5:Kn=v.stateNode,ka=!1;break e;case 3:case 4:Kn=v.stateNode.containerInfo,ka=!0;break e}v=v.return}if(Kn===null)throw Error(Ve(160));m6(p,g,m),Kn=null,ka=!1,p=m.alternate,p!==null&&(p.return=null),m.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)g6(a,t,c),a=a.sibling}var cs=null;function g6(t,a,c){var u=t.alternate,f=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(f&4&&(u=t.updateQueue,u=u!==null?u.events:null,u!==null))for(var m=0;m<u.length;m++){var p=u[m];p.ref.impl=p.nextImpl}$o(a,t,c),ea(t),f&4&&(pu(3,t,t.return),ox(3,t),pu(5,t,t.return));break;case 1:$o(a,t,c),ea(t),f&512&&(In||u===null||bo(u,u.return)),f&64&&to&&(t=t.updateQueue,t!==null&&(a=t.callbacks,a!==null&&(c=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=c===null?a:c.concat(a))));break;case 26:if(m=cs,$o(a,t,c),ea(t),f&512&&(In||u===null||bo(u,u.return)),f&4)if(f=u!==null?u.memoizedState:null,c=t.memoizedState,u===null)if(c===null)if(t.stateNode===null)if(to)t.stateNode=j6(t.type,t.memoizedProps,a.containerInfo,t);else{e:{a=t.type,c=t.memoizedProps,f=m.ownerDocument||m;t:switch(a){case"title":if(u=f.getElementsByTagName("title")[0],!u||u[ex]||u[yo]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))u=f.createElement(a),f.head.insertBefore(u,f.querySelector("head > title"));Co(u,a,c),u[yo]=t,ro(u),a=u;break e;case"link":if(m=sD("link","href",f).get(a+(c.href||""))){for(p=0;p<m.length;p++)if(u=m[p],u.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&u.getAttribute("rel")===(c.rel==null?null:c.rel)&&u.getAttribute("title")===(c.title==null?null:c.title)&&u.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){m.splice(p,1);break t}}u=f.createElement(a),Co(u,a,c),f.head.appendChild(u);break;case"meta":if(m=sD("meta","content",f).get(a+(c.content||""))){for(p=0;p<m.length;p++)if(u=m[p],u.getAttribute("content")===(c.content==null?null:""+c.content)&&u.getAttribute("name")===(c.name==null?null:c.name)&&u.getAttribute("property")===(c.property==null?null:c.property)&&u.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&u.getAttribute("charset")===(c.charSet==null?null:c.charSet)){m.splice(p,1);break t}}u=f.createElement(a),Co(u,a,c),f.head.appendChild(u);break;default:throw Error(Ve(468,a))}u[yo]=t,ro(u),a=u}t.stateNode=a}else to||yI(m,t.type,t.stateNode);else t.stateNode=iD(m,c,t.memoizedProps);else f!==c?(f===null?(a=u.stateNode,a===null||In||a.parentNode.removeChild(a)):f.count--,c===null?to||yI(m,t.type,t.stateNode):iD(m,c,t.memoizedProps)):c===null&&t.stateNode!==null&&J2(t,t.memoizedProps,u.memoizedProps);break;case 27:$o(a,t,c),ea(t),f&512&&(In||u===null||bo(u,u.return)),u!==null&&f&4&&J2(t,t.memoizedProps,u.memoizedProps);break;case 5:if(m=Ns,Ns=!1,$o(a,t,c),Ns=m,ea(t),f&512&&(In||u===null||bo(u,u.return)),t.flags&32){a=t.stateNode;try{pp(a,""),gn=!0}catch(S){Pn(t,t.return,S)}}f&4&&t.stateNode!=null&&(a=t.memoizedProps,J2(t,a,u!==null?u.memoizedProps:a)),f&1024&&(tC=!0);break;case 6:if($o(a,t,c),ea(t),f&4){if(t.stateNode===null)throw Error(Ve(162));a=t.memoizedProps,c=t.stateNode;try{c.nodeValue=a,gn=!0}catch(S){Pn(t,t.return,S)}}break;case 3:if(gn=!1,Sy=null,m=cs,cs=$g(a.containerInfo),$o(a,t,c),cs=m,ea(t),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Cp(a.containerInfo)}catch(S){Pn(t,t.return,S)}tC&&(tC=!1,x6(t)),gn=!1;break;case 4:f=Ns,Ns=to,u=GM(),m=cs,cs=$g(t.stateNode.containerInfo),$o(a,t,c),ea(t),cs=m,gn&&vg&&(Ky=!0),gn=u,Ns=f;break;case 12:$o(a,t,c),ea(t);break;case 31:$o(a,t,c),ea(t),f&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,ry(t,a)));break;case 13:$o(a,t,c),ea(t),t.child.flags&8192&&t.memoizedState!==null!==(u!==null&&u.memoizedState!==null)&&(x1=ja()),f&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,ry(t,a)));break;case 22:m=t.memoizedState!==null,p=u!==null&&u.memoizedState!==null;var g=to,v=In,k=Ns;to=g||m,Ns=k||m,In=v||p,$o(a,t,c),In=v,Ns=k,to=g,ea(t),f&8192&&(a=t.stateNode,a._visibility=m?a._visibility&-2:a._visibility|1,!m||u===null||p||to||In||(a=p||In,c=to,u=In,to=m||to,In=a,Kc(t,2),to=c,In=u),!m&&Ns||eI(t,m)),f&4&&(a=t.updateQueue,a!==null&&(c=a.retryQueue,c!==null&&(a.retryQueue=null,ry(t,c))));break;case 19:$o(a,t,c),ea(t),f&4&&(a=t.updateQueue,a!==null&&(t.updateQueue=null,ry(t,a)));break;case 30:f&512&&(In||u===null||bo(u,u.return)),f=GM(),m=vg,p=(c&335544064)===c,g=t.memoizedProps,vg=p&&nc(g.default,g.update)!=="none",$o(a,t,c),ea(t),p&&u!==null&&gn&&(t.flags|=4),vg=m,gn=f;break;case 21:break;case 7:f&512&&(In||u===null||bo(u,u.return)),u&&u.stateNode!==null&&(u.stateNode._fragmentFiber=t);default:$o(a,t,c),ea(t)}}function ea(t){var a=t.flags;if(a&2){try{for(var c,u=t.return;u!==null;){if(o6(u)){c=u;break}u=u.return}u=null;for(var f=t.return;f!==null;){if(aT(f)){var m=f.stateNode;u===null?u=[m]:u.push(m)}if(oT(f))break;f=f.return}var p=u;if(c==null)throw Error(Ve(160));switch(c.tag){case 27:var g=c.stateNode,v=eC(t);Gy(t,v,g,p);break;case 5:var k=c.stateNode;c.flags&32&&(pp(k,""),c.flags&=-33);var S=eC(t);Gy(t,S,k,p);break;case 3:case 4:var I=c.stateNode.containerInfo,T=eC(t);WC(t,T,I,p);break;default:throw Error(Ve(161))}}catch(L){Pn(t,t.return,L)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function x6(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;x6(a),a.tag===5&&a.flags&1024&&(a=a.stateNode,Sp=!0,a.reset(),Sp=!1),t=t.sibling}}function Fm(t,a){if(a.subtreeFlags&9270)for(a=a.child;a!==null;)v6(a,t),a=a.sibling;else c6(a,!1)}function v6(t,a){var c=t.alternate;if(c===null)XC(t,!1);else switch(t.tag){case 3:if(JC=Os=!1,B3(),Fm(a,t),!Os&&!Ky){if(t=Bs,t!==null)for(var u=0;u<t.length;u+=3){c=t[u];var f=t[u+1];$6(c,t[u+2]),c=c.ownerDocument.documentElement,c!==null&&c.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+f+")"})}t=a.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),JC=!0}Bs=null;break;case 5:Fm(a,t);break;case 4:u=Os,Os=!1,Fm(a,t),Os&&(Ky=!0),Os=u;break;case 22:t.memoizedState===null&&(c.memoizedState!==null?XC(t,!1):Fm(a,t));break;case 30:u=Os,f=B3(),Os=!1,Fm(a,t),Os&&(t.flags|=4);var m=t.memoizedProps,p=t.stateNode;a=Yl(m,p),p=Yl(c.memoizedProps,p);var g=nc(m.default,m.update);g==="none"?a=!1:(m=c.memoizedState,c.memoizedState=null,c=t.child,Ca=0,a=iT(t,c,a,p,g,m,!0),Ca!==(m===null?0:m.length)&&(t.flags|=32)),(t.flags&4)!==0&&a?(xp(t,t.memoizedProps.onUpdate),Bs=f):f!==null&&(f.push.apply(f,Bs),Bs=f),Os=(t.flags&32)!==0?!0:u;break;default:Fm(a,t)}}function _s(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)u6(t,a.alternate,a),a=a.sibling}function Kc(t,a){for(t=t.child;t!==null;){var c=t,u=a;switch(c.tag){case 0:case 11:case 14:case 15:pu(4,c,c.return),Kc(c,u);break;case 1:bo(c,c.return);var f=c.stateNode;typeof f.componentWillUnmount==="function"&&r6(c,c.return,f),Kc(c,u);break;case 27:(u&2)!==0&&t8(c.stateNode,c.type,c.memoizedProps);case 5:bo(c,c.return),c.tag!==5&&c.tag!==27||Pg(c),Kc(c,u);break;case 6:Pg(c);break;case 26:bo(c,c.return),f=c.stateNode,c.memoizedState!==null||f===null||In||f.parentNode.removeChild(f),Kc(c,u);break;case 22:c.memoizedState===null&&Kc(c,u);break;case 30:bo(c,c.return),Kc(c,u);break;case 7:bo(c,c.return);default:Kc(c,u)}t=t.sibling}}function Ji(t,a,c){c=(a.subtreeFlags&8772)!==0?c:c&-2;for(a=a.child;a!==null;){var u=a.alternate,f=t,m=a,p=m.flags,g=(c&1)!==0;switch(m.tag){case 0:case 11:case 15:Ji(f,m,c),ox(4,m);break;case 1:if(Ji(f,m,c),u=m,f=u.stateNode,typeof f.componentDidMount==="function")try{f.componentDidMount()}catch(S){Pn(u,u.return,S)}if(u=m,f=u.updateQueue,f!==null){var v=u.stateNode;try{var k=f.shared.hiddenCallbacks;if(k!==null)for(f.shared.hiddenCallbacks=null,f=0;f<k.length;f++)pN(k[f],v)}catch(S){Pn(u,u.return,S)}}g&&p&64&&n6(m),zs(m,m.return);break;case 27:(c&2)!==0&&a6(m);case 5:m.tag!==5&&m.tag!==27||_3(m),Ji(f,m,c),g&&u===null&&p&4&&KC(m),zs(m,m.return);break;case 6:_3(m);break;case 26:v=m.stateNode,m.memoizedState!==null||v===null||to||yI($g(v.ownerDocument),m.type,v),Ji(f,m,c),g&&u===null&&p&4&&KC(m),zs(m,m.return);break;case 12:Ji(f,m,c);break;case 31:Ji(f,m,c),g&&p&4&&p6(f,m);break;case 13:Ji(f,m,c),g&&p&4&&h6(f,m);break;case 22:m.memoizedState===null&&Ji(f,m,c),zs(m,m.return);break;case 30:Ji(f,m,c),zs(m,m.return);break;case 7:zs(m,m.return);default:Ji(f,m,c)}a=a.sibling}}function sT(t,a){var c=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(c=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==c&&(t!=null&&t.refCount++,c!=null&&nx(c))}function lT(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&nx(t))}function gi(t,a,c,u){var f=(c&335544064)===c;if(a.subtreeFlags&(f?10262:10256))for(a=a.child;a!==null;)b6(t,a,c,u),a=a.sibling;else f&&l6(a)}function b6(t,a,c,u){var f=(c&335544064)===c;f&&a.alternate===null&&a.return!==null&&a.return.alternate!==null&&by(a);var m=a.flags;switch(a.tag){case 0:case 11:case 15:gi(t,a,c,u),m&2048&&ox(9,a);break;case 1:gi(t,a,c,u);break;case 3:gi(t,a,c,u),f&&JC&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),m&2048&&(m=null,a.alternate!==null&&(m=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==m&&(a.refCount++,m!=null&&nx(m)));break;case 12:if(m&2048){gi(t,a,c,u),m=a.stateNode;try{var p=a.memoizedProps,g=p.id,v=p.onPostCommit;typeof v==="function"&&v(g,a.alternate===null?"mount":"update",m.passiveEffectDuration,-0)}catch(k){Pn(a,a.return,k)}}else gi(t,a,c,u);break;case 31:gi(t,a,c,u);break;case 13:gi(t,a,c,u);break;case 23:break;case 22:p=a.stateNode,g=a.alternate,a.memoizedState!==null?(f&&g!==null&&g.memoizedState===null&&by(g),p._visibility&2?gi(t,a,c,u):Ag(t,a)):(f&&g!==null&&g.memoizedState!==null&&by(a),p._visibility&2?gi(t,a,c,u):(p._visibility|=2,Um(t,a,c,u,(a.subtreeFlags&10256)!==0||!1))),m&2048&&sT(g,a);break;case 24:gi(t,a,c,u),m&2048&&lT(a.alternate,a);break;case 30:f&&(m=a.alternate,m!==null&&(Xs(m.child,!0),Xs(a.child,!0))),gi(t,a,c,u);break;default:gi(t,a,c,u)}}function Um(t,a,c,u,f){f=f&&((a.subtreeFlags&10256)!==0||!1);for(a=a.child;a!==null;){var m=t,p=a,g=c,v=u,k=p.flags;switch(p.tag){case 0:case 11:case 15:Um(m,p,g,v,f),ox(8,p);break;case 23:break;case 22:var S=p.stateNode;p.memoizedState!==null?S._visibility&2?Um(m,p,g,v,f):Ag(m,p):(S._visibility|=2,Um(m,p,g,v,f)),f&&k&2048&&sT(p.alternate,p);break;case 24:Um(m,p,g,v,f),f&&k&2048&&lT(p.alternate,p);break;default:Um(m,p,g,v,f)}a=a.sibling}}function Ag(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var c=t,u=a,f=u.flags;switch(u.tag){case 22:Ag(c,u),f&2048&&sT(u.alternate,u);break;case 24:Ag(c,u),f&2048&&lT(u.alternate,u);break;default:Ag(c,u)}a=a.sibling}}var Rd=8192;function Cd(t,a,c){if(t.subtreeFlags&Rd)for(t=t.child;t!==null;)y6(t,a,c),t=t.sibling}function y6(t,a,c){switch(t.tag){case 26:Cd(t,a,c),t.flags&Rd&&(t.memoizedState!==null?gJ(c,cs,t.memoizedState,t.memoizedProps):(t=t.stateNode,(a&335544128)===a&&cD(c,t)));break;case 5:Cd(t,a,c),t.flags&Rd&&(t=t.stateNode,(a&335544128)===a&&cD(c,t));break;case 3:case 4:var u=cs;cs=$g(t.stateNode.containerInfo),Cd(t,a,c),cs=u;break;case 22:t.memoizedState===null&&(u=t.alternate,u!==null&&u.memoizedState!==null?(u=Rd,Rd=16777216,Cd(t,a,c),Rd=u):Cd(t,a,c));break;case 30:if((t.flags&Rd)!==0&&(u=t.memoizedProps.name,u!=null&&u!=="auto")){var f=t.stateNode;f.paired=null,qa===null&&(qa=new Map),qa.set(u,f)}Cd(t,a,c);break;default:Cd(t,a,c)}}function w6(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function ug(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var u=a[c];no=u,S6(u,t)}w6(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)k6(t),t=t.sibling}function k6(t){switch(t.tag){case 0:case 11:case 15:ug(t),t.flags&2048&&pu(9,t,t.return);break;case 3:ug(t);break;case 12:ug(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,yy(t)):ug(t);break;default:ug(t)}}function yy(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var u=a[c];no=u,S6(u,t)}w6(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:pu(8,a,a.return),yy(a);break;case 22:c=a.stateNode,c._visibility&2&&(c._visibility&=-3,yy(a));break;default:yy(a)}t=t.sibling}}function S6(t,a){for(;no!==null;){var c=no;switch(c.tag){case 0:case 11:case 15:pu(8,c,a);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var u=c.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:nx(c.memoizedState.cache)}if(u=c.child,u!==null)u.return=c,no=u;else e:for(c=t;no!==null;){u=no;var f=u.sibling,m=u.return;if(f6(u),u===c){no=null;break e}if(f!==null){f.return=m,no=f;break e}no=m}}}var mZ={getCacheForType:function(t){var a=wo(Pr),c=a.data.get(t);return c===void 0&&(c=t(),a.data.set(t,c)),c},cacheSignal:function(){return wo(Pr).controller.signal}},pZ=typeof WeakMap==="function"?WeakMap:Map,bn=0,On=null,ln=null,cn=0,Rn=0,Fa=null,eu=!1,Rp=!1,cT=!1,ec=0,lr=0,hu=0,zd=0,Wy=0,Ha=0,gp=0,Mg=null,Sa=null,nI=!1,x1=0,C6=0,Xy=1/0,Yy=null,su=null,Yn=0,ds=null,Gd=null,Ks=0,rI=0,oI=null,I6=null,cp=null,up=null,dp=null,Dg=0,wy=null;function Si(){return(bn&2)!==0&&cn!==0?cn&-cn:Ft.T!==null?dT():MD()}function T6(){if(Ha===0)if((cn&536870912)===0||rn){var t=$b;$b<<=1,($b&3932160)===0&&($b=262144),Ha=t}else Ha=536870912;return t=Io.current,t!==null&&(t.flags|=32),Ha}function xp(t,a){if(a!=null){var c=t.stateNode,u=c.ref;u===null&&(u=c.ref=W6(Yl(t.memoizedProps,c))),up===null&&(up=[]),up.push(a.bind(null,u))}}function Ta(t,a,c){if(t===On&&(Rn===2||Rn===9)||t.cancelPendingCommit!==null)vp(t,0),tu(t,cn,Ha,!1);if(r1(t,c),(bn&2)===0||t!==On)t===On&&((bn&2)===0&&(zd|=c),lr===4&&tu(t,cn,Ha,!1)),rc(t)}function L6(t,a,c){if((bn&6)!==0)throw Error(Ve(327));var u=!c&&(a&127)===0&&(a&t.expiredLanes)===0||Zg(t,a),f=u?xZ(t,a):nC(t,a,!0),m=u;do{if(f===0){Rp&&!u&&tu(t,a,0,!1);break}else{if(c=t.current.alternate,m&&!hZ(c)){f=nC(t,a,!1),m=!1;continue}if(f===2){if(m=a,t.errorRecoveryDisabledLanes&m)var p=0;else p=t.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){a=p;e:{var g=t;f=Mg;var v=g.current.memoizedState.isDehydrated;if(v&&(vp(g,p).flags|=256),p=nC(g,p,!1),p!==2&&p!==6){if(cT&&!v){g.errorRecoveryDisabledLanes|=m,zd|=m,f=4;break e}m=Sa,Sa=f,m!==null&&(Sa===null?Sa=m:Sa.push.apply(Sa,m))}f=p}if(m=!1,f!==2)continue}}if(f===1){vp(t,0),tu(t,a,0,!0);break}e:{switch(u=t,m=f,m){case 0:case 1:throw Error(Ve(345));case 4:if((a&4194048)!==a&&(a&62914560)!==a)break;case 6:tu(u,a,Ha,!eu);break e;case 2:Sa=null;break;case 3:case 5:break;default:throw Error(Ve(329))}if((a&62914560)===a&&(f=x1+300-ja(),10<f)){if(tu(u,a,Ha,!eu),n1(u,0,!0)!==0)break e;Ks=a,u.timeoutHandle=fT(V3.bind(null,u,c,Sa,Yy,nI,a,Ha,zd,gp,eu,m,"Throttled",-0,0),f);break e}V3(u,c,Sa,Yy,nI,a,Ha,zd,gp,eu,m,null,-0,0)}}break}while(1);rc(t)}function V3(t,a,c,u,f,m,p,g,v,k,S,I,T,L){t.timeoutHandle=-1;var R=a.subtreeFlags,A=(m&335544064)===m;if(I=null,A||R&8192||(R&16785408)===16785408){if(I={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Us},qa=null,y6(a,m,I),A&&(R=I,A=t.containerInfo,A=(A.nodeType===9?A:A.ownerDocument).__reactViewTransition,A!=null&&(R.count++,R.waitingForViewTransition=!0,R=Kg.bind(R),A.finished.then(R,R))),R=(m&62914560)===m?x1-ja():(m&4194048)===m?C6-ja():0,R=xJ(I,R),R!==null){Ks=m,t.cancelPendingCommit=R(q3.bind(null,t,a,m,c,u,f,p,g,v,k,S,I,null,T,L)),tu(t,m,p,!k);return}}q3(t,a,m,c,u,f,p,g,v,k,S,I)}function hZ(t){for(var a=t;;){var c=a.tag;if((c===0||c===11||c===15)&&a.flags&16384&&(c=a.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var u=0;u<c.length;u++){var f=c[u],m=f.getSnapshot;f=f.value;try{if(!Ka(m(),f))return!1}catch(p){return!1}}if(c=a.child,a.subtreeFlags&16384&&c!==null)c.return=a,a=c;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function tu(t,a,c,u){a=TD(t,a),a&=~Wy,a&=~zd,t.suspendedLanes|=a,t.pingedLanes&=~a,u&&(t.warmLanes|=a),u=t.expirationTimes;for(var f=a;0<f;){var m=31-$a(f),p=1<<m;u[m]=-1,f&=~p}c!==0&&RD(t,c,a)}function v1(){return(bn&6)===0?(ax(0,!1),!1):!0}function uT(){if(ln!==null){if(Rn===0)var t=ln.return;else t=ln,$l=Yd=null,KI(t),ip=null,Vg=0,t=ln;for(;t!==null;)t6(t.alternate,t),t=t.return;ln=null}}function vp(t,a){var c=t.timeoutHandle;return c!==-1&&(t.timeoutHandle=-1,zZ(c)),c=t.cancelPendingCommit,c!==null&&(t.cancelPendingCommit=null,c()),Ks=0,uT(),On=t,ln=c=Kl(t.current,null),cn=a,Rn=0,Fa=null,eu=!1,Rp=Zg(t,a),cT=!1,gp=Ha=Wy=zd=hu=lr=0,Sa=Mg=null,nI=!1,ec=TD(t,a),l1(),c}function R6(t,a){Qt=null,Ft.H=qy,a===Tp||a===d1?(a=m3(),Rn=3):a===FI?(a=m3(),Rn=4):Rn=a===tT?8:a!==null&&typeof a==="object"&&typeof a.then==="function"?6:1,Fa=a,ln===null&&(lr=1,Hy(t,wi(a,t.current)))}function E6(){var t=Io.current;return t===null?!0:(cn&4194048)===cn?Do===null?!0:!1:(cn&62914560)===cn||(cn&536870912)!==0?t===Do:!1}function P6(){var t=Ft.H;return Ft.H=qy,t===null?qy:t}function A6(){var t=Ft.A;return Ft.A=mZ,t}function Qy(){lr=4,eu||(cn&4194048)!==cn&&Io.current!==null||(Rp=!0),(hu&134217727)===0&&(zd&134217727)===0||On===null||tu(On,cn,Ha,!1)}function nC(t,a,c){var u=bn;bn|=2;var f=P6(),m=A6();if(On!==t||cn!==a)Yy=null,vp(t,a);a=!1;var p=lr;e:do try{if(Rn!==0&&ln!==null){var g=ln,v=Fa;switch(Rn){case 8:uT(),p=6;break e;case 3:case 2:case 9:case 6:Io.current===null&&(a=!0);var k=Rn;if(Rn=0,Fa=null,tp(t,g,v,k),c&&Rp){p=0;break e}break;default:k=Rn,Rn=0,Fa=null,tp(t,g,v,k)}}gZ(),p=lr;break}catch(S){R6(t,S)}while(1);return a&&t.shellSuspendCounter++,$l=Yd=null,bn=u,Ft.H=f,Ft.A=m,ln===null&&(On=null,cn=0,l1()),p}function gZ(){for(;ln!==null;)M6(ln)}function xZ(t,a){var c=bn;bn|=2;var u=P6(),f=A6();On!==t||cn!==a?(Yy=null,Xy=ja()+500,vp(t,a)):Rp=Zg(t,a);e:do try{if(Rn!==0&&ln!==null){a=ln;var m=Fa;t:switch(Rn){case 1:Rn=0,Fa=null,tp(t,a,m,1);break;case 2:case 9:if(f3(m)){Rn=0,Fa=null,U3(a);break}a=function(){Rn!==2&&Rn!==9||On!==t||(Rn=7),rc(t)},m.then(a,a);break e;case 3:Rn=7;break e;case 4:Rn=5;break e;case 7:f3(m)?(Rn=0,Fa=null,U3(a)):(Rn=0,Fa=null,tp(t,a,m,7));break;case 5:var p=null;switch(ln.tag){case 26:p=ln.memoizedState;case 5:case 27:var g=ln;if(p?o8(p):g.stateNode.complete){Rn=0,Fa=null;var v=g.sibling;if(v!==null)ln=v;else{var k=g.return;k!==null?(ln=k,b1(k)):ln=null}break t}}Rn=0,Fa=null,tp(t,a,m,5);break;case 6:Rn=0,Fa=null,tp(t,a,m,6);break;case 8:uT(),lr=6;break e;default:throw Error(Ve(462))}}vZ();break}catch(S){R6(t,S)}while(1);if($l=Yd=null,Ft.H=u,Ft.A=f,bn=c,ln!==null)return 0;return On=null,cn=0,l1(),lr}function vZ(){for(;ln!==null&&!MY();)M6(ln)}function M6(t){var a=e6(t.alternate,t,ec);t.memoizedProps=t.pendingProps,a===null?b1(t):ln=a}function U3(t){var a=t,c=a.alternate;switch(a.tag){case 15:case 0:a=E3(c,a,a.pendingProps,a.type,void 0,cn);break;case 11:a=E3(c,a,a.pendingProps,a.type.render,a.ref,cn);break;case 5:KI(a);var u=a;u===oo&&(rn?(Oy(u),u.tag===5&&u.stateNode!=null&&(Hn=u.stateNode)):(Oy(u),rn=!0));default:t6(c,a),a=ln=aN(a,ec),a=e6(c,a,ec)}t.memoizedProps=t.pendingProps,a===null?b1(t):ln=a}function tp(t,a,c,u){$l=Yd=null,KI(a),ip=null,Vg=0;var f=a.return;try{if(aZ(t,f,a,c,cn)){lr=1,Hy(t,wi(c,t.current)),ln=null;return}}catch(m){if(f!==null)throw ln=f,m;lr=1,Hy(t,wi(c,t.current)),ln=null;return}if(a.flags&32768){if(rn||u===1)t=!0;else if(Rp||(cn&536870912)!==0)t=!1;else if(eu=t=!0,u===2||u===9||u===3||u===6)u=Io.current,u!==null&&u.tag===13&&(u.flags|=16384);D6(a,t)}else b1(a)}function b1(t){var a=t;do{if((a.flags&32768)!==0){D6(a,eu);return}t=a.return;var c=cZ(a.alternate,a,ec);if(c!==null){ln=c;return}if(a=a.sibling,a!==null){ln=a;return}ln=a=t}while(a!==null);lr===0&&(lr=5)}function D6(t,a){do{var c=uZ(t.alternate,t);if(c!==null){c.flags&=32767,ln=c;return}if(c=t.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!a&&(t=t.sibling,t!==null)){ln=t;return}ln=t=c}while(t!==null);lr=6,ln=null}function q3(t,a,c,u,f,m,p,g,v,k,S,I){t.cancelPendingCommit=null;do y1();while(Yn!==0);if((bn&6)!==0)throw Error(Ve(327));if(a!==null){if(a===t.current)throw Error(Ve(177));t===On&&(ln=On=null,cn=0),Gd=a,ds=t,Ks=c,oI=f,I6=u,bZ(t,a,c,p,g,v,I)}}function bZ(t,a,c,u,f,m,p){var g=a.lanes|a.childLanes;if(rI=g,g|=DI,qY(t,c,g,u,f,m),up=null,(c&335544064)===c?(dp=jQ(t),u=10262):(dp=null,u=10256),(a.subtreeFlags&u)!==0||(a.flags&u)!==0?(t.callbackNode=null,t.callbackPriority=0,IZ(Py,function(){return lI(),null})):(t.callbackNode=null,t.callbackPriority=0),$y=!1,u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=Ft.T,Ft.T=null,f=yn.p,yn.p=2,m=bn,bn|=4;try{dZ(t,a,c)}finally{bn=m,yn.p=f,Ft.T=u}}Yn=1,$y?cp=HZ(p,t.containerInfo,dp,aI,iI,wZ,sI,lI,yZ,null,null):(aI(),iI(),sI())}function yZ(t){if(Yn!==0){var a=ds.onRecoverableError;a(t,{componentStack:null})}}function wZ(){Yn===3&&(Yn=0,v6(Gd,ds),Yn=4)}function aI(){if(Yn===1){Yn=0;var t=ds,a=Gd,c=Ks,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=Ft.T,Ft.T=null;var f=yn.p;yn.p=2;var m=bn;bn|=4;try{vg=Ky=!1,g6(a,t,c),c=pI;var p=QD(t.containerInfo),g=c.focusedElem,v=c.selectionRange;if(p!==g&&g&&g.ownerDocument&&YD(g.ownerDocument.documentElement,g)){if(v!==null&&MI(g)){var{start:k,end:S}=v;if(S===void 0&&(S=k),"selectionStart"in g)g.selectionStart=k,g.selectionEnd=Math.min(S,g.value.length);else{var I=g.ownerDocument||document,T=I&&I.defaultView||window;if(T.getSelection){var L=T.getSelection(),R=g.textContent.length,A=Math.min(v.start,R),E=v.end===void 0?A:Math.min(v.end,R);!L.extend&&A>E&&(p=E,E=A,A=p);var P=o3(g,A),D=o3(g,E);if(P&&D&&(L.rangeCount!==1||L.anchorNode!==P.node||L.anchorOffset!==P.offset||L.focusNode!==D.node||L.focusOffset!==D.offset)){var N=I.createRange();N.setStart(P.node,P.offset),L.removeAllRanges(),A>E?(L.addRange(N),L.extend(D.node,D.offset)):(N.setEnd(D.node,D.offset),L.addRange(N))}}}}I=[];for(L=g;L=L.parentNode;)L.nodeType===1&&I.push({element:L,left:L.scrollLeft,top:L.scrollTop});typeof g.focus==="function"&&g.focus();for(g=0;g<I.length;g++){var O=I[g];O.element.scrollLeft=O.left,O.element.scrollTop=O.top}}Sp=!!mI,pI=mI=null}finally{bn=m,yn.p=f,Ft.T=u}}t.current=a,Yn=2}}function iI(){if(Yn===2){Yn=0;var t=ds,a=Gd,c=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||c){c=Ft.T,Ft.T=null;var u=yn.p;yn.p=2;var f=bn;bn|=4;try{u6(t,a.alternate,a)}finally{bn=f,yn.p=u,Ft.T=c}}Yn=3}}function sI(){if(Yn===4||Yn===3){Yn=0;var t=cp;cp=null,DY();var a=ds,c=Gd,u=Ks,f=I6,m=(u&335544064)===u?10262:10256;if((c.subtreeFlags&m)!==0||(c.flags&m)!==0?Yn=5:(Yn=0,Gd=ds=null,N6(a,a.pendingLanes)),m=a.pendingLanes,m===0&&(su=null),TI(u),c=c.stateNode,Ga&&typeof Ga.onCommitFiberRoot==="function")try{Ga.onCommitFiberRoot(Qg,c,void 0,(c.current.flags&128)===128)}catch(k){}if(f!==null){c=Ft.T,m=yn.p,yn.p=2,Ft.T=null;try{for(var p=a.onRecoverableError,g=0;g<f.length;g++){var v=f[g];p(v.value,{componentStack:v.stack})}}finally{Ft.T=c,yn.p=m}}if(f=up,p=dp,dp=null,f!==null&&(up=null,p===null&&(p=[]),t!==null))for(v=0;v<f.length;v++)c=(0,f[v])(p),c!==void 0&&t.finished.finally(c);(Ks&3)!==0&&y1(),rc(a),m=a.pendingLanes,(u&261930)!==0&&(m&42)!==0?a===wy?Dg++:(Dg=0,wy=a):(Dg=0,wy=null),ax(0,!1)}}function N6(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,nx(a)))}function y1(){return cp!==null&&(cp.skipTransition(),cp=null),aI(),iI(),sI(),lI()}function lI(){if(Yn!==5)return!1;var t=ds,a=rI;rI=0;var c=TI(Ks),u=Ft.T,f=yn.p;try{yn.p=32>c?32:c,Ft.T=null,c=oI,oI=null;var m=ds,p=Ks;if(Yn=0,Gd=ds=null,Ks=0,(bn&6)!==0)throw Error(Ve(331));var g=bn;if(bn|=4,k6(m.current),b6(m,m.current,p,c),bn=g,ax(0,!1),Ga&&typeof Ga.onPostCommitFiberRoot==="function")try{Ga.onPostCommitFiberRoot(Qg,m)}catch(v){}return!0}finally{yn.p=f,Ft.T=u,N6(t,a)}}function H3(t,a,c){a=wi(c,a),a=UC(t.stateNode,a,2),t=_d(t,a,2),t!==null&&(r1(t,2),rc(t))}function Pn(t,a,c){if(t.tag===3)H3(t,t,c);else for(;a!==null;){if(a.tag===3){H3(a,t,c);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError==="function"||typeof u.componentDidCatch==="function"&&(su===null||!su.has(u))){t=wi(c,t),c=XN(2),u=_d(a,c,2),u!==null&&(YN(c,u,a,t),r1(u,2),rc(u));break}}a=a.return}}function rC(t,a,c){var u=t.pingCache;if(u===null){u=t.pingCache=new pZ;var f=new Set;u.set(a,f)}else f=u.get(a),f===void 0&&(f=new Set,u.set(a,f));f.has(c)||(cT=!0,f.add(c),t=kZ.bind(null,t,a,c),a.then(t,t))}function kZ(t,a,c){var u=t.pingCache;u!==null&&u.delete(a),t.pingedLanes|=t.suspendedLanes&c,t.warmLanes&=~c,On===t&&(cn&c)===c&&(lr===4||lr===3&&(cn&62914560)===cn&&300>ja()-x1?(bn&2)===0?vp(t,0):Wy|=c:Wy|=c,gp===cn&&(gp=0)),rc(t)}function O6(t,a){a===0&&(a=LD()),t=Xd(t,a),t!==null&&(r1(t,a),rc(t))}function SZ(t){var a=t.memoizedState,c=0;a!==null&&(c=a.retryLane),O6(t,c)}function CZ(t,a){var c=0;switch(t.tag){case 31:case 13:var{stateNode:u,memoizedState:f}=t;f!==null&&(c=f.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(Ve(314))}u!==null&&u.delete(a),O6(t,c)}function IZ(t,a){return II(t,a)}var bp=null,qm=null,cI=!1,Zy=!1,oC=!1,nu=0;function rc(t){t!==qm&&t.next===null&&(qm===null?bp=qm=t:qm=qm.next=t),Zy=!0,cI||(cI=!0,LZ())}function ax(t,a){if(!oC&&Zy){oC=!0;do{var c=!1;for(var u=bp;u!==null;){if(!a)if(t!==0){var f=u.pendingLanes;if(f===0)var m=0;else{var p=u.suspendedLanes,g=u.pingedLanes;m=(1<<31-$a(42|t)+1)-1,m&=f&~(p&~g),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(c=!0,j3(u,m))}else m=cn,m=n1(u,u===On?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||Zg(u,m)||(c=!0,j3(u,m));u=u.next}}while(c);oC=!1}}function TZ(){_6()}function _6(){Zy=cI=!1;var t=0;nu!==0&&_Z()&&(t=nu);for(var a=ja(),c=null,u=bp;u!==null;){var f=u.next,m=z6(u,a);if(m===0)u.next=null,c===null?bp=f:c.next=f,f===null&&(qm=c);else if(c=u,t!==0||(m&3)!==0)Zy=!0;u=f}Yn!==0&&Yn!==5||ax(t,!1),nu!==0&&(nu=0)}function z6(t,a){for(var{suspendedLanes:c,pingedLanes:u,expirationTimes:f}=t,m=t.pendingLanes&-62914561;0<m;){var p=31-$a(m),g=1<<p,v=f[p];if(v===-1){if((g&c)===0||(g&u)!==0)f[p]=UY(g,a)}else v<=a&&(t.expiredLanes|=g);m&=~g}if(a=On,c=cn,c=n1(t,t===a?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,c===0||t===a&&(Rn===2||Rn===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&z2(u),t.callbackNode=null,t.callbackPriority=0;if((c&3)===0||Zg(t,c)){if(a=c&-c,a===t.callbackPriority)return a;switch(u!==null&&z2(u),TI(c)){case 2:case 8:c=CD;break;case 32:c=Py;break;case 268435456:c=ID;break;default:c=Py}return u=B6.bind(null,t),c=II(c,u),t.callbackPriority=a,t.callbackNode=c,a}return u!==null&&u!==null&&z2(u),t.callbackPriority=2,t.callbackNode=null,2}function B6(t,a){if(Yn!==0&&Yn!==5)return t.callbackNode=null,t.callbackPriority=0,null;var c=t.callbackNode;if(y1()&&t.callbackNode!==c)return null;var u=cn;if(u=n1(t,t===On?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0)return null;return L6(t,u,a),z6(t,ja()),t.callbackNode!=null&&t.callbackNode===c?B6.bind(null,t):null}function j3(t,a){if(y1())return null;L6(t,a,!0)}function LZ(){BZ(function(){(bn&6)!==0?II(SD,TZ):_6()})}function dT(){if(nu===0){var t=Ud;t===0&&(t=Gb,Gb<<=1,(Gb&261888)===0&&(Gb=256)),nu=t}return nu}function G3(t){return t==null||typeof t==="symbol"||typeof t==="boolean"?null:typeof t==="function"?t:ly(t)}function RZ(t,a,c,u,f){if(a==="submit"&&c&&c.stateNode===f){var m=G3((f[Ra]||null).action),p=u.submitter;p&&(a=(a=p[Ra]||null)?G3(a.formAction):p.getAttribute("formAction"),a!==null&&(m=a,p=null));var g=new a1("action","action",null,u,f);t.push({event:g,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(nu!==0){var v=new FormData(f,p);FC(c,{pending:!0,data:v,method:f.method,action:m},null,v)}}else typeof m==="function"&&(g.preventDefault(),v=new FormData(f,p),FC(c,{pending:!0,data:v,method:f.method,action:m},m,v))},currentTarget:f}]})}}for(bg=0;bg<RC.length;bg++)yg=RC[bg],uI=yg.toLowerCase(),dI=yg[0].toUpperCase()+yg.slice(1),fs(uI,"on"+dI);var yg,uI,dI,bg;fs(JD,"onAnimationEnd");fs(eN,"onAnimationIteration");fs(tN,"onAnimationStart");fs("dblclick","onDoubleClick");fs("focusin","onFocus");fs("focusout","onBlur");fs(_Q,"onTransitionRun");fs(zQ,"onTransitionStart");fs(BQ,"onTransitionCancel");fs(nN,"onTransitionEnd");mp("onMouseEnter",["mouseout","mouseover"]);mp("onMouseLeave",["mouseout","mouseover"]);mp("onPointerEnter",["pointerout","pointerover"]);mp("onPointerLeave",["pointerout","pointerover"]);Kd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Kd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Kd("onBeforeInput",["compositionend","keypress","textInput","paste"]);Kd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Kd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Kd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hg="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),EZ=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hg));function F6(t,a){a=(a&4)!==0;for(var c=0;c<t.length;c++){var u=t[c],f=u.event;u=u.listeners;e:{var m=void 0;if(a)for(var p=u.length-1;0<=p;p--){var g=u[p],v=g.instance,k=g.currentTarget;if(g=g.listener,v!==m&&f.isPropagationStopped())break e;m=g,f.currentTarget=k;try{m(f)}catch(S){My(S)}f.currentTarget=null,m=v}else for(p=0;p<u.length;p++){if(g=u[p],v=g.instance,k=g.currentTarget,g=g.listener,v!==m&&f.isPropagationStopped())break e;m=g,f.currentTarget=k;try{m(f)}catch(S){My(S)}f.currentTarget=null,m=v}}}}function sn(t,a){var c=a[UM];c===void 0&&(c=a[UM]=new Set);var u=t+"__bubble";c.has(u)||(U6(a,t,2,!1),c.add(u))}function aC(t,a,c){var u=0;a&&(u|=4),U6(c,t,u,a)}var oy="_reactListening"+Math.random().toString(36).slice(2);function V6(t){if(!t[oy]){t[oy]=!0,ND.forEach(function(c){c!=="selectionchange"&&(EZ.has(c)||aC(c,!1,t),aC(c,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[oy]||(a[oy]=!0,aC("selectionchange",!1,a))}}function U6(t,a,c,u){switch(c8(a)){case 2:var f=SJ;break;case 8:f=CJ;break;default:f=vT}c=f.bind(null,a,c,t),f=void 0,!CC||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(f=!0),u?f!==void 0?t.addEventListener(a,c,{capture:!0,passive:f}):t.addEventListener(a,c,!0):f!==void 0?t.addEventListener(a,c,{passive:f}):t.addEventListener(a,c,!1)}function iC(t,a,c,u,f){var m=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var p=u.tag;if(p===3||p===4){var g=u.stateNode.containerInfo;if(g===f)break;if(p===4)for(p=u.return;p!==null;){var v=p.tag;if((v===3||v===4)&&p.stateNode.containerInfo===f)return;p=p.return}for(;g!==null;){if(p=Ed(g),p===null)return;if(v=p.tag,v===5||v===6||v===26||v===27){u=m=p;continue e}g=g.parentNode}}u=u.return}qD(function(){var k=m,S=RI(c),I=[];e:{var T=rN.get(t);if(T!==void 0){var L=a1,R=t;switch(t){case"keypress":if(uy(c)===0)break e;case"keydown":case"keyup":L=fQ;break;case"focusin":R="focus",L=H2;break;case"focusout":R="blur",L=H2;break;case"beforeblur":case"afterblur":L=H2;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=XM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=eQ;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=xQ;break;case JD:case eN:case tN:L=rQ;break;case nN:L=bQ;break;case"scroll":case"scrollend":L=ZY;break;case"wheel":L=wQ;break;case"copy":case"cut":case"paste":L=aQ;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=QM;break;case"submit":L=hQ;break;case"toggle":case"beforetoggle":L=SQ}var A=(a&4)!==0,E=!A&&(t==="scroll"||t==="scrollend"),P=A?T!==null?T+"Capture":null:T;A=[];for(var D=k,N;D!==null;){var O=D;if(N=O.stateNode,O=O.tag,O!==5&&O!==26&&O!==27||N===null||P===null||(O=Og(D,P),O!=null&&A.push(jg(D,O,N))),E)break;D=D.return}0<A.length&&(T=new L(T,R,null,c,S),I.push({event:T,listeners:A}))}}if((a&7)===0){e:{if(L=t==="mouseover"||t==="pointerover",T=t==="mouseout"||t==="pointerout",L&&c!==SC&&(R=c.relatedTarget||c.fromElement)&&(Ed(R)||R[Jg]))break e;if(T||L){if(R=S.window===S?S:(L=S.ownerDocument)?L.defaultView||L.parentWindow:window,T){if(L=c.relatedTarget||c.toElement,T=k,L=L?Ed(L):null,L!==null&&(E=Yg(L),A=L.tag,L!==E||A!==5&&A!==27&&A!==6))L=null}else T=null,L=k;if(T!==L){if(A=XM,O="onMouseLeave",P="onMouseEnter",D="mouse",t==="pointerout"||t==="pointerover")A=QM,O="onPointerLeave",P="onPointerEnter",D="pointer";E=T==null?R:pg(T),N=L==null?R:pg(L),R=new A(O,D+"leave",T,c,S),R.target=E,R.relatedTarget=N,O=null,Ed(S)===k&&(A=new A(P,D+"enter",L,c,S),A.target=N,A.relatedTarget=E,O=A),E=O,A=T&&L?dC(T,L,PZ):null,T!==null&&$3(I,R,T,A,!1),L!==null&&E!==null&&$3(I,E,L,A,!0)}}}e:{if(T=k?pg(k):window,L=T.nodeName&&T.nodeName.toLowerCase(),L==="select"||L==="input"&&T.type==="file")var F=t3;else if(e3(T))if(WD)F=DQ;else{F=AQ;var z=PQ}else L=T.nodeName,!L||L.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?k&&LI(k.elementType)&&(F=t3):F=MQ;if(F&&(F=F(t,k))){KD(I,F,c,S);break e}z&&z(t,T,k)}switch(z=k?pg(k):window,t){case"focusin":if(e3(z)||z.contentEditable==="true")Xm=z,TC=k,Sg=null;break;case"focusout":Sg=TC=Xm=null;break;case"mousedown":LC=!0;break;case"contextmenu":case"mouseup":case"dragend":LC=!1,a3(I,c,S);break;case"selectionchange":if(OQ)break;case"keydown":case"keyup":a3(I,c,S)}var B;if(AI)e:{switch(t){case"compositionstart":var U="onCompositionStart";break e;case"compositionend":U="onCompositionEnd";break e;case"compositionupdate":U="onCompositionUpdate";break e}U=void 0}else Wm?GD(t,c)&&(U="onCompositionEnd"):t==="keydown"&&c.keyCode===229&&(U="onCompositionStart");if(U&&(jD&&c.locale!=="ko"&&(Wm||U!=="onCompositionStart"?U==="onCompositionEnd"&&Wm&&(B=HD()):(Zc=S,EI=("value"in Zc)?Zc.value:Zc.textContent,Wm=!0)),z=Jy(k,U),0<z.length&&(U=new YM(U,t,null,c,S),I.push({event:U,listeners:z}),B?U.data=B:(B=$D(c),B!==null&&(U.data=B)))),B=IQ?TQ(t,c):LQ(t,c))U=Jy(k,"onBeforeInput"),0<U.length&&(z=new YM("onBeforeInput","beforeinput",null,c,S),I.push({event:z,listeners:U}),z.data=B);RZ(I,t,k,c,S)}F6(I,a)})}function jg(t,a,c){return{instance:t,listener:a,currentTarget:c}}function Jy(t,a){for(var c=a+"Capture",u=[];t!==null;){var f=t,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=Og(t,c),f!=null&&u.unshift(jg(t,f,m)),f=Og(t,a),f!=null&&u.push(jg(t,f,m))),t.tag===3)return u;t=t.return}return[]}function PZ(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t?t:null}function $3(t,a,c,u,f){for(var m=a._reactName,p=[];c!==null&&c!==u;){var g=c,v=g.alternate,k=g.stateNode;if(g=g.tag,v!==null&&v===u)break;g!==5&&g!==26&&g!==27||k===null||(v=k,f?(k=Og(c,m),k!=null&&p.unshift(jg(c,k,v))):f||(k=Og(c,m),k!=null&&p.push(jg(c,k,v)))),c=c.return}p.length!==0&&t.push({event:a,listeners:p})}var AZ=/\r\n?/g,MZ=/\u0000|\uFFFD/g;function K3(t){return(typeof t==="string"?t:""+t).replace(AZ,`
11
+ `).replace(MZ,"")}function q6(t,a){return a=K3(a),K3(t)===a?!0:!1}function En(t,a,c,u,f,m){switch(c){case"children":if(typeof u==="string")a==="body"||a==="textarea"&&u===""||pp(t,u);else if(typeof u==="number"||typeof u==="bigint")a!=="body"&&pp(t,""+u);else return;break;case"className":Wb(t,"class",u);break;case"tabIndex":Wb(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Wb(t,c,u);break;case"style":UD(t,u,m);return;case"data":if(a!=="object"){Wb(t,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||c!=="href")){t.removeAttribute(c);break}if(u==null||typeof u==="function"||typeof u==="symbol"||typeof u==="boolean"){t.removeAttribute(c);break}u=ly(u),t.setAttribute(c,u);break;case"action":case"formAction":if(typeof u==="function"){t.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m==="function"&&(c==="formAction"?(a!=="input"&&En(t,a,"name",f.name,f,null),En(t,a,"formEncType",f.formEncType,f,null),En(t,a,"formMethod",f.formMethod,f,null),En(t,a,"formTarget",f.formTarget,f,null)):(En(t,a,"encType",f.encType,f,null),En(t,a,"method",f.method,f,null),En(t,a,"target",f.target,f,null)));if(u==null||typeof u==="symbol"||typeof u==="boolean"){t.removeAttribute(c);break}u=ly(u),t.setAttribute(c,u);break;case"onClick":u!=null&&(t.onclick=Us);return;case"onScroll":u!=null&&sn("scroll",t);return;case"onScrollEnd":u!=null&&sn("scrollend",t);return;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!=="object"||!("__html"in u))throw Error(Ve(61));if(c=u.__html,c!=null){if(f.children!=null)throw Error(Ve(60));(m!=null?m.__html:void 0)!==c&&(t.innerHTML=c)}}break;case"multiple":t.multiple=u&&typeof u!=="function"&&typeof u!=="symbol";break;case"muted":t.muted=u&&typeof u!=="function"&&typeof u!=="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u==="function"||typeof u==="boolean"||typeof u==="symbol"){t.removeAttribute("xlink:href");break}c=ly(u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!=="function"&&typeof u!=="symbol"?t.setAttribute(c,u):t.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!=="function"&&typeof u!=="symbol"?t.setAttribute(c,""):t.removeAttribute(c);break;case"capture":case"download":u===!0?t.setAttribute(c,""):u!==!1&&u!=null&&typeof u!=="function"&&typeof u!=="symbol"?t.setAttribute(c,u):t.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!=="function"&&typeof u!=="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(c,u):t.removeAttribute(c);break;case"rowSpan":case"start":u==null||typeof u==="function"||typeof u==="symbol"||isNaN(u)?t.removeAttribute(c):t.setAttribute(c,u);break;case"popover":sn("beforetoggle",t),sn("toggle",t),sy(t,"popover",u);break;case"xlinkActuate":Hl(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Hl(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Hl(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Hl(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Hl(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Hl(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Hl(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Hl(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Hl(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":sy(t,"is",u);break;case"innerText":case"textContent":return;default:if(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")c=YY.get(c)||c,sy(t,c,u);else return}gn=!0}function fI(t,a,c,u,f,m){switch(c){case"style":UD(t,u,m);return;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!=="object"||!("__html"in u))throw Error(Ve(61));if(c=u.__html,c!=null){if(f.children!=null)throw Error(Ve(60));(m!=null?m.__html:void 0)!==c&&(t.innerHTML=c)}}break;case"children":if(typeof u==="string")pp(t,u);else if(typeof u==="number"||typeof u==="bigint")pp(t,""+u);else return;break;case"onScroll":u!=null&&sn("scroll",t);return;case"onScrollEnd":u!=null&&sn("scrollend",t);return;case"onClick":u!=null&&(t.onclick=Us);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!OD.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(f=c.endsWith("Capture"),m=c.slice(2,f?c.length-7:void 0),a=t[Ra]||null,a=a!=null?a[c]:null,typeof a==="function"&&t.removeEventListener(m,a,f),typeof u==="function")){typeof a!=="function"&&a!==null&&(c in t?t[c]=null:t.hasAttribute(c)&&t.removeAttribute(c)),t.addEventListener(m,u,f);break e}gn=!0,c in t?t[c]=u:u===!0?t.setAttribute(c,""):sy(t,c,u)}return}gn=!0}function Co(t,a,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":sn("error",t),sn("load",t);var u=!1,f=!1,m;for(m in c)if(c.hasOwnProperty(m)){var p=c[m];if(p!=null)switch(m){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(Ve(137,a));default:En(t,a,m,p,c,null)}}f&&En(t,a,"srcSet",c.srcSet,c,null),u&&En(t,a,"src",c.src,c,null);return;case"input":sn("invalid",t);var g=m=p=f=null,v=null,k=null;for(u in c)if(c.hasOwnProperty(u)){var S=c[u];if(S!=null)switch(u){case"name":f=S;break;case"type":p=S;break;case"checked":v=S;break;case"defaultChecked":k=S;break;case"value":m=S;break;case"defaultValue":g=S;break;case"children":case"dangerouslySetInnerHTML":if(S!=null)throw Error(Ve(137,a));break;default:En(t,a,u,S,c,null)}}BD(t,m,g,v,k,p,f,!1);return;case"select":sn("invalid",t),u=p=m=null;for(f in c)if(c.hasOwnProperty(f)&&(g=c[f],g!=null))switch(f){case"value":m=g;break;case"defaultValue":p=g;break;case"multiple":u=g;default:En(t,a,f,g,c,null)}a=m,c=p,t.multiple=!!u,a!=null?rp(t,!!u,a,!1):c!=null&&rp(t,!!u,c,!0);return;case"textarea":sn("invalid",t),m=f=u=null;for(p in c)if(c.hasOwnProperty(p)&&(g=c[p],g!=null))switch(p){case"value":u=g;break;case"defaultValue":f=g;break;case"children":m=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(Ve(91));break;default:En(t,a,p,g,c,null)}VD(t,u,f,m);return;case"option":for(v in c)if(c.hasOwnProperty(v)&&(u=c[v],u!=null))switch(v){case"selected":t.selected=u&&typeof u!=="function"&&typeof u!=="symbol";break;default:En(t,a,v,u,c,null)}return;case"dialog":sn("beforetoggle",t),sn("toggle",t),sn("cancel",t),sn("close",t);break;case"iframe":case"object":sn("load",t);break;case"video":case"audio":for(u=0;u<Hg.length;u++)sn(Hg[u],t);break;case"image":sn("error",t),sn("load",t);break;case"details":sn("toggle",t);break;case"embed":case"source":case"link":sn("error",t),sn("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(k in c)if(c.hasOwnProperty(k)&&(u=c[k],u!=null))switch(k){case"children":case"dangerouslySetInnerHTML":throw Error(Ve(137,a));default:En(t,a,k,u,c,null)}return;default:if(LI(a)){for(S in c)c.hasOwnProperty(S)&&(u=c[S],u!==void 0&&fI(t,a,S,u,c,void 0));return}}for(g in c)c.hasOwnProperty(g)&&(u=c[g],u!=null&&En(t,a,g,u,c,null))}var DZ={};function NZ(t,a,c,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,p=null,g=null,v=null,k=null,S=null;for(L in c){var I=c[L];if(c.hasOwnProperty(L)&&I!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":v=I;default:u.hasOwnProperty(L)||En(t,a,L,null,u,I)}}for(var T in u){var L=u[T];if(I=c[T],u.hasOwnProperty(T)&&(L!=null||I!=null))switch(T){case"type":L!==I&&(gn=!0),m=L;break;case"name":L!==I&&(gn=!0),f=L;break;case"checked":L!==I&&(gn=!0),k=L;break;case"defaultChecked":L!==I&&(gn=!0),S=L;break;case"value":L!==I&&(gn=!0),p=L;break;case"defaultValue":L!==I&&(gn=!0),g=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(Ve(137,a));break;default:L!==I&&En(t,a,T,L,u,I)}}kC(t,p,g,v,k,S,m,f);return;case"select":L=p=g=T=null;for(m in c)if(v=c[m],c.hasOwnProperty(m)&&v!=null)switch(m){case"value":break;case"multiple":L=v;default:u.hasOwnProperty(m)||En(t,a,m,null,u,v)}for(f in u)if(m=u[f],v=c[f],u.hasOwnProperty(f)&&(m!=null||v!=null))switch(f){case"value":m!==v&&(gn=!0),T=m;break;case"defaultValue":m!==v&&(gn=!0),g=m;break;case"multiple":m!==v&&(gn=!0),p=m;default:m!==v&&En(t,a,f,m,u,v)}a=g,c=p,u=L,T!=null?rp(t,!!c,T,!1):!!u!==!!c&&(a!=null?rp(t,!!c,a,!0):rp(t,!!c,c?[]:"",!1));return;case"textarea":L=T=null;for(g in c)if(f=c[g],c.hasOwnProperty(g)&&f!=null&&!u.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:En(t,a,g,null,u,f)}for(p in u)if(f=u[p],m=c[p],u.hasOwnProperty(p)&&(f!=null||m!=null))switch(p){case"value":f!==m&&(gn=!0),T=f;break;case"defaultValue":f!==m&&(gn=!0),L=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(Ve(91));break;default:f!==m&&En(t,a,p,f,u,m)}FD(t,T,L);return;case"option":for(var R in c)if(T=c[R],c.hasOwnProperty(R)&&T!=null&&!u.hasOwnProperty(R))switch(R){case"selected":t.selected=!1;break;default:En(t,a,R,null,u,T)}for(v in u)if(T=u[v],L=c[v],u.hasOwnProperty(v)&&T!==L&&(T!=null||L!=null))switch(v){case"selected":T!==L&&(gn=!0),t.selected=T&&typeof T!=="function"&&typeof T!=="symbol";break;default:En(t,a,v,T,u,L)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var A in c)T=c[A],c.hasOwnProperty(A)&&T!=null&&!u.hasOwnProperty(A)&&En(t,a,A,null,u,T);for(k in u)if(T=u[k],L=c[k],u.hasOwnProperty(k)&&T!==L&&(T!=null||L!=null))switch(k){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(Ve(137,a));break;default:En(t,a,k,T,u,L)}return;default:if(LI(a)){for(var E in c)T=c[E],c.hasOwnProperty(E)&&T!==void 0&&!u.hasOwnProperty(E)&&fI(t,a,E,void 0,u,T);for(S in u)T=u[S],L=c[S],!u.hasOwnProperty(S)||T===L||T===void 0&&L===void 0||fI(t,a,S,T,u,L);return}}for(var P in c)T=c[P],c.hasOwnProperty(P)&&T!=null&&!u.hasOwnProperty(P)&&En(t,a,P,null,u,T);for(I in u)T=u[I],L=c[I],!u.hasOwnProperty(I)||T===L||T==null&&L==null||En(t,a,I,T,u,L)}function W3(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function OZ(){if(typeof performance.getEntriesByType==="function"){for(var t=0,a=0,c=performance.getEntriesByType("resource"),u=0;u<c.length;u++){var f=c[u],{transferSize:m,initiatorType:p,duration:g}=f;if(m&&g&&W3(p)){p=0,g=f.responseEnd;for(u+=1;u<c.length;u++){var v=c[u],k=v.startTime;if(k>g)break;var S=v.transferSize,I=v.initiatorType;S&&W3(I)&&(v=v.responseEnd,p+=S*(v<g?1:(g-k)/(v-k)))}if(--u,a+=8*(m+p)/(f.duration/1000),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t==="number")?t:5}var mI=null,pI=null;function Gg(t){return t.nodeType===9?t:t.ownerDocument}function X3(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function H6(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function j6(t,a,c,u){return c=Gg(c).createElement(t),c[yo]=u,c[Ra]=a,Co(c,t,a),ro(c),c}function hI(t,a){return t==="textarea"||t==="noscript"||typeof a.children==="string"||typeof a.children==="number"||typeof a.children==="bigint"||typeof a.dangerouslySetInnerHTML==="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var sC=null;function _Z(){var t=window.event;if(t&&t.type==="popstate"){if(t===sC)return!1;return sC=t,!0}return sC=null,!1}var fT=typeof setTimeout==="function"?setTimeout:void 0,zZ=typeof clearTimeout==="function"?clearTimeout:void 0,Y3=typeof Promise==="function"?Promise:void 0,Q3=typeof requestAnimationFrame==="function"?requestAnimationFrame:fT,BZ=typeof queueMicrotask==="function"?queueMicrotask:typeof Y3<"u"?function(t){return Y3.resolve(null).then(t).catch(FZ)}:fT;function FZ(t){setTimeout(function(){throw t})}function xu(t){return t==="head"}function Z3(t,a){var c=a,u=0;do{var f=c.nextSibling;if(t.removeChild(c),f&&f.nodeType===8)if(c=f.data,c==="/$"||c==="/&"){if(u===0){t.removeChild(f),Cp(a);return}u--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")u++;else if(c==="html")cC(t.ownerDocument.documentElement);else if(c==="head"){c=t.ownerDocument.head,cC(c);for(var m=c.firstChild;m;){var p=m.nextSibling,g=m.nodeName;m[ex]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&m.rel.toLowerCase()==="stylesheet"||c.removeChild(m),m=p}}else c==="body"&&cC(t.ownerDocument.body);c=f}while(c);Cp(a)}function J3(t,a){var c=t;t=0;do{var u=c.nextSibling;if(c.nodeType===1?a?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(a?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),u&&u.nodeType===8)if(c=u.data,c==="/$")if(t===0)break;else t--;else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||t++;c=u}while(c)}function G6(t,a,c){if(a=CSS.escape(a)!==a?"r-"+btoa(a).replace(/=/g,""):a,t.style.viewTransitionName=a,c!=null&&(t.style.viewTransitionClass=c),c=getComputedStyle(t),c.display==="inline"){if(a=t.getClientRects(),a.length===1)var u=1;else for(var f=u=0;f<a.length;f++){var m=a[f];0<m.width&&0<m.height&&u++}u===1&&(t=t.style,t.display=a.length===1?"inline-block":"block",t.marginTop="-"+c.paddingTop,t.marginBottom="-"+c.paddingBottom)}}function $6(t,a){t=t.style,a=a.style;var c=a!=null?a.hasOwnProperty("viewTransitionName")?a.viewTransitionName:a.hasOwnProperty("view-transition-name")?a["view-transition-name"]:null:null;t.viewTransitionName=c==null||typeof c==="boolean"?"":(""+c).trim(),c=a!=null?a.hasOwnProperty("viewTransitionClass")?a.viewTransitionClass:a.hasOwnProperty("view-transition-class")?a["view-transition-class"]:null:null,t.viewTransitionClass=c==null||typeof c==="boolean"?"":(""+c).trim(),t.display==="inline-block"&&(a==null?t.display=t.margin="":(c=a.display,t.display=c==null||typeof c==="boolean"?"":c,c=a.margin,c!=null?t.margin=c:(c=a.hasOwnProperty("marginTop")?a.marginTop:a["margin-top"],t.marginTop=c==null||typeof c==="boolean"?"":c,a=a.hasOwnProperty("marginBottom")?a.marginBottom:a["margin-bottom"],t.marginBottom=a==null||typeof a==="boolean"?"":a)))}function K6(t,a,c){return c=c.ownerDocument.defaultView,{rect:t,abs:a.position==="absolute"||a.position==="fixed",clip:a.clipPath!=="none"||a.overflow!=="visible"||a.filter!=="none"||a.mask!=="none"||a.mask!=="none"||a.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=c.innerHeight&&t.left<=c.innerWidth}}function gI(t){var a=t.getBoundingClientRect(),c=getComputedStyle(t);return K6(a,c,t)}function VZ(t){var a=t.getBoundingClientRect();a=new DOMRect(a.x+20000,a.y+20000,a.width,a.height);var c=getComputedStyle(t);return K6(a,c,t)}function UZ(t){return t.documentElement.clientHeight}function qZ(t){this.addEventListener("load",t),this.addEventListener("error",t)}function HZ(t,a,c,u,f,m,p,g,v){var k=a.nodeType===9?a:a.ownerDocument;try{var S=k.startViewTransition({update:function(){var T=k.defaultView,L=T.navigation&&T.navigation.transition,R=k.fonts.status;u();var A=[];if(R==="loaded"&&(UZ(k),k.fonts.status==="loading"&&A.push(k.fonts.ready)),R=A.length,t!==null)for(var E=t.suspenseyImages,P=0,D=0;D<E.length;D++){var N=E[D];if(!N.complete){var O=N.getBoundingClientRect();if(0<O.bottom&&0<O.right&&O.top<T.innerHeight&&O.left<T.innerWidth){if(P+=a8(N),P>Cy){A.length=R;break}N=new Promise(qZ.bind(N)),A.push(N)}}}if(0<A.length)return T=Promise.race([Promise.all(A),new Promise(function(F){return setTimeout(F,500)})]).then(f,f),(L?Promise.allSettled([L.finished,T]):T).then(m,m);if(f(),L)return L.finished.then(m,m);m()},types:c});k.__reactViewTransition=S;var I=[];return S.ready.then(function(){for(var T=k.documentElement.getAnimations({subtree:!0}),L=0;L<T.length;L++){var R=T[L],A=R.effect,E=A.pseudoElement;if(E!=null&&E.startsWith("::view-transition")){I.push(R),R=A.getKeyframes();for(var P=E=void 0,D=!0,N=0;N<R.length;N++){var O=R[N],F=O.width;if(E===void 0)E=F;else if(E!==F){D=!1;break}if(F=O.height,P===void 0)P=F;else if(P!==F){D=!1;break}delete O.width,delete O.height,O.transform==="none"&&delete O.transform}D&&E!==void 0&&P!==void 0&&(A.setKeyframes(R),D=getComputedStyle(A.target,A.pseudoElement),D.width!==E||D.height!==P)&&(D=R[0],D.width=E,D.height=P,D=R[R.length-1],D.width=E,D.height=P,A.setKeyframes(R))}}p()},function(T){k.__reactViewTransition===S&&(k.__reactViewTransition=null);try{if(typeof T==="object"&&T!==null)switch(T.name){case"InvalidStateError":if(T.message==="View transition was skipped because document visibility state is hidden."||T.message==="Skipping view transition because document visibility state has become hidden."||T.message==="Skipping view transition because viewport size changed."||T.message==="Transition was aborted because of invalid state")T=null}T!==null&&v(T)}finally{u(),f(),p()}}),S.finished.finally(function(){for(var T=0;T<I.length;T++)I[T].cancel();k.__reactViewTransition===S&&(k.__reactViewTransition=null),g()}),S}catch(T){return u(),f(),p(),null}}function Pd(t,a){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+a+")"}Pd.prototype.animate=function(t,a){return a=typeof a==="number"?{duration:a}:_n({},a),a.pseudoElement=this._selector,this._scope.animate(t,a)};Pd.prototype.getAnimations=function(){for(var t=this._scope,a=this._selector,c=t.getAnimations({subtree:!0}),u=[],f=0;f<c.length;f++){var m=c[f].effect;m!==null&&m.target===t&&m.pseudoElement===a&&u.push(c[f])}return u};Pd.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function W6(t){return{name:t,group:new Pd("group",t),imagePair:new Pd("image-pair",t),old:new Pd("old",t),new:new Pd("new",t)}}function Wa(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Wa.prototype.addEventListener=function(t,a,c){var u=null,f=null;if(c!=null&&typeof c!=="boolean"&&(u=c.signal||null,u!==null&&u.aborted))return;this._eventListeners===null&&(this._eventListeners=[]);var m=this._eventListeners;if(X6(m,t,a,c)===-1){var p=this,g=a;c!=null&&typeof c!=="boolean"&&c.once===!0&&(g=function(v){p.removeEventListener(t,a,c),typeof a==="function"?a.call(this,v):a.handleEvent(v)}),u!==null&&(f=p.removeEventListener.bind(p,t,a,c),u.addEventListener("abort",f,{once:!0}),f=u.removeEventListener.bind(u,"abort",f)),u=yp(c),m.push({type:t,listener:a,optionsOrUseCapture:c,attachedListener:g,cleanup:f}),La(this._fragmentFiber.child,!1,jZ,t,g,u)}this._eventListeners=m};function jZ(t,a,c,u){return Yr(t).addEventListener(a,c,u),!1}Wa.prototype.removeEventListener=function(t,a,c){var u=this._eventListeners;if(u!==null&&(a=X6(u,t,a,c),a!==-1)){var f=u[a];c=f.attachedListener;var m=f.cleanup;f=yp(f.optionsOrUseCapture),La(this._fragmentFiber.child,!1,GZ,t,c,f),u.splice(a,1),m!==null&&m()}};function GZ(t,a,c,u){return Yr(t).removeEventListener(a,c,u),!1}function yp(t){return t!=null&&typeof t!=="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function eD(t){return t==null?"c=0":typeof t==="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function X6(t,a,c,u){if(t.length===0)return-1;u=eD(u);for(var f=0;f<t.length;f++){var m=t[f];if(m.type===a&&m.listener===c&&eD(m.optionsOrUseCapture)===u)return f}return-1}Wa.prototype.dispatchEvent=function(t){var a=$d(this._fragmentFiber);if(a===null)return!0;a=Yr(a);var c=this._eventListeners;if(c!==null&&0<c.length||!t.bubbles){var u=a.nodeType===9?a.createComment(""):document.createTextNode("");if(c)for(var f=0;f<c.length;f++){var m=c[f];u.addEventListener(m.type,m.attachedListener,yp(m.optionsOrUseCapture))}if(a.appendChild(u),t=u.dispatchEvent(t),c)for(f=0;f<c.length;f++)m=c[f],u.removeEventListener(m.type,m.attachedListener,yp(m.optionsOrUseCapture));return a.removeChild(u),t}return a.dispatchEvent(t)};Wa.prototype.focus=function(t){La(this._fragmentFiber.child,!0,Y6,t,void 0,void 0)};function Y6(t,a){if(t.tag===6)return!1;return t=Yr(t),rJ(t,a)}Wa.prototype.focusLast=function(t){var a=[];La(this._fragmentFiber.child,!0,mT,a,void 0,void 0);for(var c=a.length-1;0<=c&&!Y6(a[c],t);c--);};function mT(t,a){return a.push(t),!1}Wa.prototype.blur=function(){var t=$d(this._fragmentFiber);t!==null&&(t=Yr(t),t=Gg(t).activeElement,t!==null&&La(this._fragmentFiber.child,!1,$Z,t,void 0,void 0))};function $Z(t,a){if(t.tag===6)return!1;return t=Yr(t),t===a||t.contains(a)?(a.blur(),!0):!1}Wa.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),La(this._fragmentFiber.child,!1,KZ,t,void 0,void 0)};function KZ(t,a){if(t.tag===6)return!1;return t=Yr(t),a.observe(t),!1}Wa.prototype.unobserveUsing=function(t){var a=this._observers;if(a!==null&&a.has(t)){a.delete(t),La(this._fragmentFiber.child,!1,WZ,t,void 0,void 0);for(var c=a=0;c<us.length;c++){var u=us[c];u.fragmentInstance===this&&u.observer===t?t.unobserve(u.instance):us[a++]=u}us.length=a}};function WZ(t,a){if(t.tag===6)return!1;return t=Yr(t),a.unobserve(t),!1}var us=[],lC=!1;function XZ(t,a,c){us.push({fragmentInstance:t,observer:a,instance:c}),lC||(lC=!0,oJ(function(){lC=!1;var u=us;us=[];for(var f=0;f<u.length;f++){var m=u[f];m.observer.unobserve(m.instance)}}))}Wa.prototype.getClientRects=function(){var t=[];return La(this._fragmentFiber.child,!1,YZ,t,void 0,void 0),t};function YZ(t,a){if(t.tag===6){t=t.stateNode;var c=t.ownerDocument.createRange();c.selectNodeContents(t),a.push.apply(a,c.getClientRects())}else t=Yr(t),a.push.apply(a,t.getClientRects());return!1}Wa.prototype.getRootNode=function(t){var a=$d(this._fragmentFiber);return a===null?this:Yr(a).getRootNode(t)};Wa.prototype.compareDocumentPosition=function(t){var a=$d(this._fragmentFiber);if(a===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var c=[];La(this._fragmentFiber.child,!1,mT,c,void 0,void 0);var u=Yr(a);if(c.length===0){if(c=u,OM(this._fragmentFiber)){e:{for(a=this._fragmentFiber.return;a!==null;){if(a.tag===4){a=a.stateNode.containerInfo;break e}if(a.tag===3||a.tag===5||a.tag===27)break;a=a.return}a=null}a!=null&&(c=a)}a=this._fragmentFiber;var f=u=c.compareDocumentPosition(t);return c===t?f=Node.DOCUMENT_POSITION_CONTAINS:u&Node.DOCUMENT_POSITION_CONTAINED_BY&&(c=bD(a)[1],c===null?f=Node.DOCUMENT_POSITION_PRECEDING:(t=Yr(c).compareDocumentPosition(t),f=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),f|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}a=Yr(c[0]),f=Yr(c[c.length-1]);var m=OM(this._fragmentFiber)?a.parentElement:u;if(m==null)return Node.DOCUMENT_POSITION_DISCONNECTED;u=m.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY,m=m.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY;var p=a.compareDocumentPosition(t),g=f.compareDocumentPosition(t),v=p&Node.DOCUMENT_POSITION_CONTAINED_BY||g&Node.DOCUMENT_POSITION_CONTAINED_BY;return g=u&&m&&p&Node.DOCUMENT_POSITION_FOLLOWING&&g&Node.DOCUMENT_POSITION_PRECEDING,a=u&&a===t||m&&f===t||v||g?Node.DOCUMENT_POSITION_CONTAINED_BY:!u&&a===t||!m&&f===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:p,a&Node.DOCUMENT_POSITION_DISCONNECTED||a&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||QZ(a,this._fragmentFiber,c[0],c[c.length-1],t)?a:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function QZ(t,a,c,u,f){var m=Ed(f);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(c=!!m)e:{for(;m!==null;){if(m.tag===7&&(m===a||m.alternate===a)){c=!0;break e}m=m.return}c=!1}return c}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(m===null)return m=f.ownerDocument,f===m||f===m.documentElement||f===m.body;e:{m=a;for(a=$d(a);m!==null;){if(!(m.tag!==5&&m.tag!==3&&m.tag!==27||m!==a&&m.alternate!==a)){m=!0;break e}m=m.return}m=!1}return m}return t&Node.DOCUMENT_POSITION_PRECEDING?((a=!!m)&&!(a=m===c)&&(a=dC(c,m,_M),a===null?a=!1:(La(a,!0,CY,m,c),m=jm,jm=null,a=m!==null)),a):t&Node.DOCUMENT_POSITION_FOLLOWING?((a=!!m)&&!(a=m===u)&&(a=dC(u,m,_M),a===null?a=!1:(La(a,!0,IY,m,u),m=jm,uC=jm=null,a=m!==null)),a):!1}function tD(t,a){var c=t.ownerDocument.createRange();c.selectNodeContents(t),t=c.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,a?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}Wa.prototype.scrollIntoView=function(t){if(typeof t==="object")throw Error(Ve(566));var a=[];La(this._fragmentFiber.child,!1,mT,a,void 0,void 0);var c=t!==!1;if(a.length===0){var u=bD(this._fragmentFiber);if(u=c?u[1]||u[0]||$d(this._fragmentFiber):u[0]||u[1],u===null)return;if(u.tag===6){t=Yr(u),tD(t,c);return}if(u=Yr(u),u.nodeType!==9){if(u.nodeType===11){c="host"in u?u.host:null,c!==null&&c.scrollIntoView(t);return}u.scrollIntoView(t)}}for(u=c?a.length-1:0;u!==(c?-1:a.length);){var f=a[u];f.tag===6?(f=Yr(f),tD(f,c)):Yr(f).scrollIntoView(t),u+=c?-1:1}};function ZZ(t,a){return t=Yr(t),Q6(t,a),!1}function Q6(t,a){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(a)}function Z6(t,a){var c=a._eventListeners;if(c!==null)for(var u=0;u<c.length;u++){var f=c[u];t.addEventListener(f.type,f.attachedListener,yp(f.optionsOrUseCapture))}t.nodeType!==3&&(c=a._observers,c!==null&&c.forEach(function(m){for(var p=0,g=0;g<us.length;g++){var v=us[g];if(v.fragmentInstance!==a||v.observer!==m||v.instance!==t)us[p++]=v}us.length=p,m.observe(t)}),Q6(t,a))}function JZ(t,a){var c=a._eventListeners;if(c!==null)for(var u=0;u<c.length;u++){var f=c[u];t.removeEventListener(f.type,f.attachedListener,yp(f.optionsOrUseCapture))}t.nodeType!==3&&(c=a._observers,c!==null&&c.forEach(function(m){typeof m.rootMargin==="string"?XZ(a,m,t):m.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(a))}function xI(t){var a=t.firstChild;a&&a.nodeType===10&&(a=a.nextSibling);for(;a;){var c=a;switch(a=a.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":xI(c),o1(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}t.removeChild(c)}}function eJ(t,a,c,u){for(;t.nodeType===1;){var f=c;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(!u)if(a==="input"&&t.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;else if(!t[ex])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;else if(m!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}if(t=Ci(t.nextSibling),t===null)break}return null}function tJ(t,a,c){if(a==="")return null;for(;t.nodeType!==3;){if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!c)return null;if(t=Ci(t.nextSibling),t===null)return null}return t}function J6(t,a){for(;t.nodeType!==8;){if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a)return null;if(t=Ci(t.nextSibling),t===null)return null}return t}function vI(t){return t.data==="$?"||t.data==="$~"}function pT(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function nJ(t,a){var c=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||c.readyState!=="loading")a();else{var u=function(){a(),c.removeEventListener("DOMContentLoaded",u)};c.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function Ci(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var bI=null;function nD(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var c=t.data;if(c==="/$"||c==="/&"){if(a===0)return Ci(t.nextSibling);a--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||a++}t=t.nextSibling}return null}function rD(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var c=t.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(a===0)return t;a--}else c!=="/$"&&c!=="/&"||a++}t=t.previousSibling}return null}function rJ(t,a){function c(){u=!0}if(t.ownerDocument.activeElement===t)return!0;var u=!1;try{t.ownerDocument.addEventListener("focus",c,!0),(t.focus||HTMLElement.prototype.focus).call(t,a)}finally{t.ownerDocument.removeEventListener("focus",c,!0)}return u}function oJ(t){Q3(function(){Q3(function(a){return t(a)})})}function e8(t,a,c){switch(a=Gg(c),t){case"html":if(t=a.documentElement,!t)throw Error(Ve(452));return t;case"head":if(t=a.head,!t)throw Error(Ve(453));return t;case"body":if(t=a.body,!t)throw Error(Ve(454));return t;default:throw Error(Ve(451))}}function t8(t,a,c){for(var u in c){var f=c[u];c.hasOwnProperty(u)&&f!=null&&En(t,a,u,null,DZ,f)}c.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Us&&(t.onclick=null),o1(t)}function cC(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);o1(t)}var Ti=new Map,oD=new Set;function $g(t){if(typeof t.getRootNode==="function"){var a=t.getRootNode();if(a.nodeType===9||a.nodeType===11)return a}return t.nodeType===9?t:t.ownerDocument}var oc=yn.d;yn.d={f:aJ,r:iJ,D:sJ,C:lJ,L:cJ,m:uJ,X:fJ,S:dJ,M:mJ};function aJ(){var t=oc.f(),a=v1();return t||a}function iJ(t){var a=Ip(t);a!==null&&a.tag===5&&a.type==="form"?UN(a):oc.r(t)}var Ep=typeof document>"u"?null:document;function n8(t,a,c){var u=Ep;if(u&&typeof a==="string"&&a){var f=yi(a);f='link[rel="'+t+'"][href="'+f+'"]',typeof c==="string"&&(f+='[crossorigin="'+c+'"]'),oD.has(f)||(oD.add(f),t={rel:t,crossOrigin:c,href:a},u.querySelector(f)===null&&(a=u.createElement("link"),Co(a,"link",t),ro(a),u.head.appendChild(a)))}}function sJ(t){oc.D(t),n8("dns-prefetch",t,null)}function lJ(t,a){oc.C(t,a),n8("preconnect",t,a)}function cJ(t,a,c){oc.L(t,a,c);var u=Ep;if(u&&t&&a){var f='link[rel="preload"][as="'+yi(a)+'"]';a==="image"?c&&c.imageSrcSet?(f+='[imagesrcset="'+yi(c.imageSrcSet)+'"]',typeof c.imageSizes==="string"&&(f+='[imagesizes="'+yi(c.imageSizes)+'"]')):f+='[href="'+yi(t)+'"]':f+='[href="'+yi(t)+'"]';var m=f;switch(a){case"style":m=wp(t);break;case"script":m=Pp(t)}if(!(Ti.has(m)||(t=_n({rel:"preload",href:a==="image"&&c&&c.imageSrcSet?void 0:t,as:a},c),Ti.set(m,t),u.querySelector(f)!==null||a==="style"&&u.querySelector(ix(m))||a==="script"&&u.querySelector(sx(m))))){var p=u.createElement("link");Co(p,"link",t),a==="style"&&(p[Ay]=!0,p.onload=p.onerror=function(){DD(p)}),ro(p),u.head.appendChild(p)}}}function uJ(t,a){oc.m(t,a);var c=Ep;if(c&&t){var u=a&&typeof a.as==="string"?a.as:"script",f='link[rel="modulepreload"][as="'+yi(u)+'"][href="'+yi(t)+'"]',m=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Pp(t)}if(!Ti.has(m)&&(t=_n({rel:"modulepreload",href:t},a),Ti.set(m,t),c.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(sx(m)))return}u=c.createElement("link"),Co(u,"link",t),ro(u),c.head.appendChild(u)}}}function dJ(t,a,c){oc.S(t,a,c);var u=Ep;if(u&&t){var f=np(u).hoistableStyles,m=wp(t);a=a||"default";var p=f.get(m);if(!p){var g={loading:0,preload:null};if(p=u.querySelector(ix(m)))g.loading=5;else{t=_n({rel:"stylesheet",href:t,"data-precedence":a},c),(c=Ti.get(m))&&hT(t,c);var v=p=u.createElement("link");ro(v),Co(v,"link",t),v._p=new Promise(function(k,S){v.onload=k,v.onerror=S}),v.addEventListener("load",function(){g.loading|=1}),v.addEventListener("error",function(){g.loading|=2}),g.loading|=4,ky(p,a,u)}p={type:"stylesheet",instance:p,count:1,state:g},f.set(m,p)}}}function fJ(t,a){oc.X(t,a);var c=Ep;if(c&&t){var u=np(c).hoistableScripts,f=Pp(t),m=u.get(f);m||(m=c.querySelector(sx(f)),m||(t=_n({src:t,async:!0},a),(a=Ti.get(f))&&gT(t,a),m=c.createElement("script"),ro(m),Co(m,"link",t),c.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(f,m))}}function mJ(t,a){oc.M(t,a);var c=Ep;if(c&&t){var u=np(c).hoistableScripts,f=Pp(t),m=u.get(f);m||(m=c.querySelector(sx(f)),m||(t=_n({src:t,async:!0,type:"module"},a),(a=Ti.get(f))&&gT(t,a),m=c.createElement("script"),ro(m),Co(m,"link",t),c.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(f,m))}}function aD(t,a,c,u){var f=(f=ru.current)?$g(f):null;if(!f)throw Error(Ve(446));switch(t){case"meta":case"title":return null;case"style":return typeof c.precedence==="string"&&typeof c.href==="string"?(c=wp(c.href),a=np(f).hoistableStyles,u=a.get(c),u||(u={type:"style",instance:null,count:0,state:null},a.set(c,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href==="string"&&typeof c.precedence==="string"){t=wp(c.href);var m=np(f).hoistableStyles,p=m.get(t);if(p||(f=f.ownerDocument||f,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,p),(m=f.querySelector(ix(t)))?m._p||(p.instance=m,p.state.loading=5):(m=Ti.get(t),m||(m={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Ti.set(t,m)),pJ(f,t,m,p.state))),a&&u===null)throw Error(Ve(528,""));return p}if(a&&u!==null)throw Error(Ve(529,""));return null;case"script":return a=c.async,c=c.src,typeof c==="string"&&a&&typeof a!=="function"&&typeof a!=="symbol"?(c=Pp(c),a=np(f).hoistableScripts,u=a.get(c),u||(u={type:"script",instance:null,count:0,state:null},a.set(c,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(Ve(444,t))}}function wp(t){return'href="'+yi(t)+'"'}function ix(t){return'link[rel="stylesheet"]['+t+"]"}function r8(t){return _n({},t,{"data-precedence":t.precedence,precedence:null})}function pJ(t,a,c,u){if(a=t.querySelector('link[rel="preload"][as="style"]['+a+"]")){if(a[Ay]!==!0){u.loading=1;return}}else a=t.createElement("link"),a[Ay]=!0,a.onload=a.onerror=DD.bind(null,a),Co(a,"link",c),ro(a),t.head.appendChild(a);u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2})}function Pp(t){return'[src="'+yi(t)+'"]'}function sx(t){return"script[async]"+t}function iD(t,a,c){if(a.count++,a.instance===null)switch(a.type){case"style":var u=t.querySelector('style[data-href~="'+yi(c.href)+'"]');if(u)return a.instance=u,ro(u),u;var f=_n({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),ro(u),Co(u,"style",f),ky(u,c.precedence,t),a.instance=u;case"stylesheet":f=wp(c.href);var m=t.querySelector(ix(f));if(m)return a.state.loading|=4,a.instance=m,ro(m),m;u=r8(c),(f=Ti.get(f))&&hT(u,f),m=(t.ownerDocument||t).createElement("link"),ro(m);var p=m;return p._p=new Promise(function(g,v){p.onload=g,p.onerror=v}),Co(m,"link",u),a.state.loading|=4,ky(m,c.precedence,t),a.instance=m;case"script":if(m=Pp(c.src),f=t.querySelector(sx(m)))return a.instance=f,ro(f),f;if(u=c,f=Ti.get(m))u=_n({},c),gT(u,f);return t=t.ownerDocument||t,f=t.createElement("script"),ro(f),Co(f,"link",u),t.head.appendChild(f),a.instance=f;case"void":return null;default:throw Error(Ve(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,ky(u,c.precedence,t));return a.instance}function ky(t,a,c){for(var u=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,m=f,p=0;p<u.length;p++){var g=u[p];if(g.dataset.precedence===a)m=g;else if(m!==f)break}m?m.parentNode.insertBefore(t,m.nextSibling):(a=c.nodeType===9?c.head:c,a.insertBefore(t,a.firstChild))}function hT(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function gT(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var Sy=null;function sD(t,a,c){if(Sy===null){var u=new Map,f=Sy=new Map;f.set(c,u)}else f=Sy,u=f.get(c),u||(u=new Map,f.set(c,u));if(u.has(t))return u;u.set(t,null),c=c.getElementsByTagName(t);for(f=0;f<c.length;f++){var m=c[f];if(!(m[ex]||m[yo]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var p=m.getAttribute(a)||"";p=t+p;var g=u.get(p);g?g.push(m):u.set(p,[m])}}return u}function yI(t,a,c){t=t.ownerDocument||t,t.head.insertBefore(c,a==="title"?t.querySelector("head > title"):null)}function hJ(t,a,c){if(c===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!=="string"||typeof a.href!=="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!=="string"||typeof a.href!=="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return t=a.disabled,typeof a.precedence==="string"&&t==null;default:return!0}case"script":if(a.async&&typeof a.async!=="function"&&typeof a.async!=="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src==="string")return!0}return!1}function lD(t,a){return t==="img"&&a.src!=null&&a.src!==""&&a.onLoad==null&&a.loading!=="lazy"}function o8(t){return t.type==="stylesheet"&&(t.state.loading&3)===0?!1:!0}function a8(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio==="number"?devicePixelRatio:1)*0.25}function cD(t,a){typeof a.decode==="function"&&(t.imgCount++,a.complete||(t.imgBytes+=a8(a),t.suspenseyImages.push(a)),t=vJ.bind(t),a.decode().then(t,t))}function gJ(t,a,c,u){if(c.type==="stylesheet"&&(typeof u.media!=="string"||matchMedia(u.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var f=wp(u.href),m=a.querySelector(ix(f));if(m){a=m._p,a!==null&&typeof a==="object"&&typeof a.then==="function"&&(t.count++,t=Kg.bind(t),a.then(t,t)),c.state.loading|=4,c.instance=m,ro(m);return}m=a.ownerDocument||a,u=r8(u),(f=Ti.get(f))&&hT(u,f),m=m.createElement("link"),ro(m);var p=m;p._p=new Promise(function(g,v){p.onload=g,p.onerror=v}),Co(m,"link",u),c.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(c,a),(a=c.state.preload)&&(c.state.loading&3)===0&&(t.count++,c=Kg.bind(t),a.addEventListener("load",c),a.addEventListener("error",c))}}var Cy=0;function xJ(t,a){return t.stylesheets&&t.count===0&&Iy(t,t.stylesheets),0<t.count||0<t.imgCount?function(c){var u=setTimeout(function(){if(t.stylesheets&&Iy(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},60000+a);0<t.imgBytes&&Cy===0&&(Cy=62500*OZ());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Iy(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>Cy?50:800)+a);return t.unsuspend=c,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(f)}}:null}function i8(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Iy(t,t.stylesheets);else if(t.unsuspend){var a=t.unsuspend;t.unsuspend=null,a()}}}function Kg(){this.count--,i8(this)}function vJ(){this.imgCount--,i8(this)}var e1=null;function Iy(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,e1=new Map,a.forEach(bJ,t),e1=null,Kg.call(t))}function bJ(t,a){if(!(a.state.loading&4)){var c=e1.get(t);if(c)var u=c.get(null);else{c=new Map,e1.set(t,c);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var p=f[m];if(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")c.set(p.dataset.precedence,p),u=p}u&&c.set(null,u)}f=a.instance,p=f.getAttribute("data-precedence"),m=c.get(p)||u,m===u&&c.set(null,f),c.set(p,f),this.count++,u=Kg.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),m?m.parentNode.insertBefore(f,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),a.state.loading|=4}}var kp={$$typeof:Fs,Provider:null,Consumer:null,_currentValue:Ad,_currentValue2:Ad,_threadCount:0};function yJ(t,a,c,u,f,m,p,g,v){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=B2(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=B2(0),this.hiddenUpdates=B2(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.transitionTypes=null,this.incompleteTransitions=new Map}function wJ(t,a,c,u,f,m,p,g,v,k,S,I){return t=new yJ(t,a,c,p,v,k,S,I,g),a=1,m===!0&&(a|=24),m=Ia(3,null,null,a),t.current=m,m.stateNode=t,a=zI(),a.refCount++,t.pooledCache=a,a.refCount++,m.memoizedState={element:u,isDehydrated:c,cache:a},VI(m),t}function kJ(t){if(!t)return Zm;return t=Zm,t}function s8(t,a,c,u,f,m){f=kJ(f),u.context===null?u.context=f:u.pendingContext=f,u=Od(a),u.payload={element:c},m=m===void 0?null:m,m!==null&&(u.callback=m),c=_d(t,u,a),c!==null&&(Ta(c,t,a),Ig(c,t,a))}function uD(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var c=t.retryLane;t.retryLane=c!==0&&c<a?c:a}}function xT(t,a){uD(t,a),(t=t.alternate)&&uD(t,a)}function l8(t){if(t.tag===13||t.tag===31){var a=Xd(t,67108864);a!==null&&Ta(a,t,67108864),xT(t,67108864)}}function dD(t){if(t.tag===13||t.tag===31){var a=Si();a=AD(a);var c=Xd(t,a);c!==null&&Ta(c,t,a),xT(t,a)}}var Sp=!0;function SJ(t,a,c,u){var f=Ft.T;Ft.T=null;var m=yn.p;try{yn.p=2,vT(t,a,c,u)}finally{yn.p=m,Ft.T=f}}function CJ(t,a,c,u){var f=Ft.T;Ft.T=null;var m=yn.p;try{yn.p=8,vT(t,a,c,u)}finally{yn.p=m,Ft.T=f}}function vT(t,a,c,u){if(Sp){var f=wI(u);if(f===null)iC(t,a,u,t1,c),fD(t,u);else if(TJ(f,t,a,c,u))u.stopPropagation();else if(fD(t,u),a&4&&-1<IJ.indexOf(t)){for(;f!==null;){var m=Ip(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var p=Id(m.pendingLanes);if(p!==0){var g=m;g.pendingLanes|=2;for(g.entangledLanes|=2;p;){var v=1<<31-$a(p);g.entanglements[1]|=v,p&=~v}rc(m),(bn&6)===0&&(Xy=ja()+500,ax(0,!1))}}break;case 31:case 13:g=Xd(m,2),g!==null&&Ta(g,m,2),v1(),xT(m,2)}if(m=wI(u),m===null&&iC(t,a,u,t1,c),m===f)break;f=m}f!==null&&u.stopPropagation()}else iC(t,a,u,null,c)}}function wI(t){return t=RI(t),bT(t)}var t1=null;function bT(t){if(t1=null,t=Ed(t),t!==null){var a=Yg(t);if(a===null)t=null;else{var c=a.tag;if(c===13){if(t=gD(a),t!==null)return t;t=null}else if(c===31){if(t=xD(a),t!==null)return t;t=null}else if(c===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return t1=t,null}function c8(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(NY()){case SD:return 2;case CD:return 8;case Py:case OY:return 32;case ID:return 268435456;default:return 32}default:return 32}}var kI=!1,lu=null,cu=null,uu=null,Wg=new Map,Xg=new Map,Yc=[],IJ="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function fD(t,a){switch(t){case"focusin":case"focusout":lu=null;break;case"dragenter":case"dragleave":cu=null;break;case"mouseover":case"mouseout":uu=null;break;case"pointerover":case"pointerout":Wg.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xg.delete(a.pointerId)}}function dg(t,a,c,u,f,m){if(t===null||t.nativeEvent!==m)return t={blockedOn:a,domEventName:c,eventSystemFlags:u,nativeEvent:m,targetContainers:[f]},a!==null&&(a=Ip(a),a!==null&&l8(a)),t;return t.eventSystemFlags|=u,a=t.targetContainers,f!==null&&a.indexOf(f)===-1&&a.push(f),t}function TJ(t,a,c,u,f){switch(a){case"focusin":return lu=dg(lu,t,a,c,u,f),!0;case"dragenter":return cu=dg(cu,t,a,c,u,f),!0;case"mouseover":return uu=dg(uu,t,a,c,u,f),!0;case"pointerover":var m=f.pointerId;return Wg.set(m,dg(Wg.get(m)||null,t,a,c,u,f)),!0;case"gotpointercapture":return m=f.pointerId,Xg.set(m,dg(Xg.get(m)||null,t,a,c,u,f)),!0}return!1}function u8(t){var a=Ed(t.target);if(a!==null){var c=Yg(a);if(c!==null){if(a=c.tag,a===13){if(a=gD(c),a!==null){t.blockedOn=a,VM(t.priority,function(){dD(c)});return}}else if(a===31){if(a=xD(c),a!==null){t.blockedOn=a,VM(t.priority,function(){dD(c)});return}}else if(a===3&&c.stateNode.current.memoizedState.isDehydrated){t.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ty(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var c=wI(t.nativeEvent);if(c===null){c=t.nativeEvent;var u=new c.constructor(c.type,c);SC=u,c.target.dispatchEvent(u),SC=null}else return a=Ip(c),a!==null&&l8(a),t.blockedOn=c,!1;a.shift()}return!0}function mD(t,a,c){Ty(t)&&c.delete(a)}function LJ(){kI=!1,lu!==null&&Ty(lu)&&(lu=null),cu!==null&&Ty(cu)&&(cu=null),uu!==null&&Ty(uu)&&(uu=null),Wg.forEach(mD),Xg.forEach(mD)}function ay(t,a){t.blockedOn===a&&(t.blockedOn=null,kI||(kI=!0,wd(yd,LJ)))}var iy=null;function pD(t){iy!==t&&(iy=t,wd(yd,function(){iy===t&&(iy=null);for(var a=0;a<t.length;a+=3){var c=t[a],u=t[a+1],f=t[a+2];if(typeof u!=="function")if(bT(u||c)===null)continue;else break;var m=Ip(c);m!==null&&(t.splice(a,3),a-=3,FC(m,{pending:!0,data:f,method:c.method,action:u},u,f))}}))}function Cp(t){function a(v){return ay(v,t)}lu!==null&&ay(lu,t),cu!==null&&ay(cu,t),uu!==null&&ay(uu,t),Wg.forEach(a),Xg.forEach(a);for(var c=0;c<Yc.length;c++){var u=Yc[c];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Yc.length&&(c=Yc[0],c.blockedOn===null);)u8(c),c.blockedOn===null&&Yc.shift();if(c=(t.ownerDocument||t).$$reactFormReplay,c!=null)for(u=0;u<c.length;u+=3){var f=c[u],m=c[u+1],p=f[Ra]||null;if(typeof m==="function")p||pD(c);else if(p){var g=null;if(m&&m.hasAttribute("formAction")){if(f=m,p=m[Ra]||null)g=p.formAction;else if(bT(f)!==null)continue}else g=p.action;typeof g==="function"?c[u+1]=g:(c.splice(u,3),u-=3),pD(c)}}}function RJ(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(p){return f=p})},focusReset:"manual",scroll:"manual"})}function a(){f!==null&&(f(),f=null),u||setTimeout(c,20)}function c(){if(!u&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation==="object"){var u=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(c,100),function(){u=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),f!==null&&(f(),f=null)}}}function yT(t){this._internalRoot=t}wT.prototype.render=yT.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(Ve(409));var c=a.current,u=Si();s8(c,u,t,a,null,null)};wT.prototype.unmount=yT.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;s8(t.current,2,null,t,null,null),v1(),a[Jg]=null}};function wT(t){this._internalRoot=t}wT.prototype.unstable_scheduleHydration=function(t){if(t){var a=MD();t={blockedOn:null,target:t,priority:a};for(var c=0;c<Yc.length&&a!==0&&a<Yc[c].priority;c++);Yc.splice(c,0,t),c===0&&u8(t)}};var hD=Rb;if(hD!=="19.3.1")throw Error(Ve(527,hD,"19.3.1"));yn.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0){if(typeof t.render==="function")throw Error(Ve(188));throw t=Object.keys(t).join(","),Error(Ve(268,t))}return t=SY(a),t=t!==null?vD(t):null,t=t===null?null:t.stateNode,t};var EJ={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:Ft,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){if(Hm=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Hm.isDisabled&&Hm.supportsFiber)try{Qg=Hm.inject(EJ),Ga=Hm}catch(t){}}var Hm;var lx=function(t,a){if(!kY(t))throw Error(Ve(299));var c=!1,u="",f=nZ,m=rZ,p=oZ;return a!==null&&a!==void 0&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(p=a.onRecoverableError)),a=wJ(t,1,!1,null,null,c,u,null,f,m,p,RJ),t[Jg]=a.current,V6(t),new yT(a)};d8();var MJ=Symbol.for("react.transitional.element"),DJ=Symbol.for("react.fragment");function f8(t,a,c){var u=null;if(c!==void 0&&(u=""+c),a.key!==void 0&&(u=""+a.key),"key"in a){c={};for(var f in a)f!=="key"&&(c[f]=a[f])}else c=a;return a=c.ref,{$$typeof:MJ,type:t,key:u,ref:a!==void 0?a:null,props:c}}var h=DJ,e=f8,n=f8;var Ap=jt({});function Mr(t){let a=i(null);if(a.current===null)a.current=t();return a.current}var m8=typeof window<"u";var Zs=m8?K:o;var ac=jt(null);function Qd(t,a){if(t.indexOf(a)===-1)t.push(a)}function Ea(t,a){let c=t.indexOf(a);if(c>-1)t.splice(c,1)}function w1([...t],a,c){let u=a<0?t.length+a:a;if(u>=0&&u<t.length){let f=c<0?t.length+c:c,[m]=t.splice(a,1);t.splice(f,0,m)}return t}var Qr=(t,a,c)=>{if(c>a)return a;if(c<t)return t;return c};var ms=()=>{},Wn=()=>{};var To={};var Zd=(t)=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);var Jd=(t)=>typeof t==="object"&&t!==null;var ef=(t)=>/^0[^.\s]+$/u.test(t);function cx(t){let a;return()=>{if(a===void 0)a=t();return a}}var Cr=(t)=>t;var ps=(...t)=>t.reduce((a,c)=>(u)=>c(a(u)));var Ei=(t,a,c)=>{let u=a-t;return u?(c-t)/u:1};class ic{constructor(){this.subscriptions=[]}add(t){return Qd(this.subscriptions,t),()=>this.remove(t)}remove(t){Ea(this.subscriptions,t)}notify(t,a,c){let u=this.subscriptions.length;if(!u)return;if(u===1)this.subscriptions[0](t,a,c);else for(let f=0;f<u;f++){let m=this.subscriptions[f];m&&m(t,a,c)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}var cr=(t)=>t*1000,ao=(t)=>t/1000;var ux=(t,a)=>a?t*(1000/a):0;var p8=(t,a,c)=>{let u=a-t;return((c-t)%u+u)%u+t};var h8=(t,a,c)=>(((1-3*c+3*a)*t+(3*c-6*a))*t+3*a)*t,NJ=0.0000001,OJ=12;function _J(t,a,c,u,f){let m,p,g=0;do if(p=a+(c-a)/2,m=h8(p,u,f)-t,m>0)c=p;else a=p;while(Math.abs(m)>NJ&&++g<OJ);return p}function vu(t,a,c,u){if(t===a&&c===u)return Cr;let f=(m)=>_J(m,0,1,t,c);return(m)=>m===0||m===1?m:h8(f(m),a,u)}var k1=(t)=>(a)=>a<=0.5?t(2*a)/2:(2-t(2*(1-a)))/2;var tf=(t)=>(a)=>1-t(1-a);var S1=vu(0.33,1.53,0.69,0.99),Mp=tf(S1),dx=k1(Mp);var fx=(t)=>t>=1?1:(t*=2)<1?0.5*Mp(t):0.5*(2-Math.pow(2,-10*(t-1)));var mx=(t)=>1-Math.sin(Math.acos(t)),px=tf(mx),hx=k1(mx);var ST=vu(0.42,0,1,1),CT=vu(0,0,0.58,1),Dp=vu(0.42,0,0.58,1);var gx=(t)=>Array.isArray(t)&&typeof t[0]!=="number";function xx(t,a){return gx(t)?t[p8(0,t.length,a)]:t}var vx=(t)=>Array.isArray(t)&&typeof t[0]==="number";var g8={linear:Cr,easeIn:ST,easeInOut:Dp,easeOut:CT,circIn:mx,circInOut:hx,circOut:px,backIn:Mp,backInOut:dx,backOut:S1,anticipate:fx},zJ=(t)=>typeof t==="string",C1=(t)=>{if(vx(t)){Wn(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[a,c,u,f]=t;return vu(a,c,u,f)}else if(zJ(t))return Wn(g8[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),g8[t];return t};var Gn={delta:0,timestamp:0,isProcessing:!1};var I1;function BJ(){I1=void 0}var Mn={now:()=>{if(I1===void 0)Mn.set(Gn.isProcessing||To.useManualTiming?Gn.timestamp:performance.now());return I1},set:(t)=>{I1=t,queueMicrotask(BJ)}};var Js=(t)=>Math.round(t*1e5)/1e5;var x8=(t)=>(a)=>typeof a==="string"&&a.startsWith(t),T1=x8("--"),FJ=x8("var(--"),Np=(t)=>{if(!FJ(t))return!1;return VJ.test(t.split("/*")[0].trim())},VJ=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function IT(t){if(typeof t!=="string")return!1;return t.split("/*")[0].includes("var(--")}var el={test:(t)=>typeof t==="number",parse:parseFloat,transform:(t)=>t},sc={...el,transform:(t)=>Qr(0,1,t)},bx={...el,default:1};var Op=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function v8(t){return t==null}var b8=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var _p=(t,a)=>(c)=>Boolean(typeof c==="string"&&b8.test(c)&&c.startsWith(t)||a&&!v8(c)&&Object.prototype.hasOwnProperty.call(c,a)),L1=(t,a,c)=>(u)=>{if(typeof u!=="string")return u;let[f,m,p,g]=u.match(Op);return{[t]:parseFloat(f),[a]:parseFloat(m),[c]:parseFloat(p),alpha:g!==void 0?parseFloat(g):1}};var UJ=(t)=>Qr(0,255,t),TT={...el,transform:(t)=>Math.round(UJ(t))},tl={test:_p("rgb","red"),parse:L1("red","green","blue"),transform:({red:t,green:a,blue:c,alpha:u=1})=>"rgba("+TT.transform(t)+", "+TT.transform(a)+", "+TT.transform(c)+", "+Js(sc.transform(u))+")"};function qJ(t){let a="",c="",u="",f="";if(t.length>5)a=t.substring(1,3),c=t.substring(3,5),u=t.substring(5,7),f=t.substring(7,9);else a=t.substring(1,2),c=t.substring(2,3),u=t.substring(3,4),f=t.substring(4,5),a+=a,c+=c,u+=u,f+=f;return{red:parseInt(a,16),green:parseInt(c,16),blue:parseInt(u,16),alpha:f?parseInt(f,16)/255:1}}var yx={test:_p("#"),parse:qJ,transform:tl.transform};var wx=(t)=>({test:(a)=>typeof a==="string"&&a.endsWith(t)&&a.split(" ").length===1,parse:parseFloat,transform:(a)=>`${a}${t}`}),Ai=wx("deg"),No=wx("%"),ht=wx("px"),LT=wx("vh"),RT=wx("vw"),R1=(()=>({...No,parse:(t)=>No.parse(t)/100,transform:(t)=>No.transform(t*100)}))();var bu={test:_p("hsl","hue"),parse:L1("hue","saturation","lightness"),transform:({hue:t,saturation:a,lightness:c,alpha:u=1})=>"hsla("+Math.round(t)+", "+No.transform(Js(a))+", "+No.transform(Js(c))+", "+Js(sc.transform(u))+")"};var ur={test:(t)=>tl.test(t)||yx.test(t)||bu.test(t),parse:(t)=>{if(tl.test(t))return tl.parse(t);else if(bu.test(t))return bu.parse(t);else return yx.parse(t)},transform:(t)=>typeof t==="string"?t:t.hasOwnProperty("red")?tl.transform(t):bu.transform(t),getAnimatableNone:(t)=>{let a=ur.parse(t);return a.alpha=0,ur.transform(a)}};var y8=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;var k8=new RegExp(Op.source),S8=new RegExp(y8.source,"i");function HJ(t){return isNaN(t)&&typeof t==="string"&&(k8.test(t)||S8.test(t))}var C8="number",I8="color",jJ="var",GJ="var(",w8="${}",$J=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function T8(t){let a=t.toString();return k8.test(a)||S8.test(a)}function zp(t){let a=t.toString(),c=[],u={color:[],number:[],var:[]},f=[],m=0,g=a.replace($J,(v)=>{if(ur.test(v))u.color.push(m),f.push(I8),c.push(ur.parse(v));else if(v.startsWith(GJ))u.var.push(m),f.push(jJ),c.push(v);else u.number.push(m),f.push(C8),c.push(parseFloat(v));return++m,w8}).split(w8);return{values:c,split:g,indexes:u,types:f}}function KJ(t){return zp(t).values}function L8({split:t,types:a}){let c=t.length;return(u)=>{let f="";for(let m=0;m<c;m++)if(f+=t[m],u[m]!==void 0){let p=a[m];if(p===C8)f+=Js(u[m]);else if(p===I8)f+=ur.transform(u[m]);else f+=u[m]}return f}}function WJ(t){return L8(zp(t))}var XJ=(t)=>typeof t==="number"?0:ur.test(t)?ur.getAnimatableNone(t):t,YJ=(t,a)=>{if(typeof t==="number")return a?.trim().endsWith("/")?t:0;return XJ(t)};function QJ(t){let a=zp(t);return L8(a)(a.values.map((u,f)=>YJ(u,a.split[f])))}var Ir={test:HJ,parse:KJ,createTransformer:WJ,getAnimatableNone:QJ};function ET(t,a,c){if(c<0)c+=1;if(c>1)c-=1;if(c<0.16666666666666666)return t+(a-t)*6*c;if(c<0.5)return a;if(c<0.6666666666666666)return t+(a-t)*(0.6666666666666666-c)*6;return t}function R8({hue:t,saturation:a,lightness:c,alpha:u}){t/=360,a/=100,c/=100;let f=0,m=0,p=0;if(!a)f=m=p=c;else{let g=c<0.5?c*(1+a):c+a-c*a,v=2*c-g;f=ET(v,g,t+0.3333333333333333),m=ET(v,g,t),p=ET(v,g,t-0.3333333333333333)}return{red:Math.round(f*255),green:Math.round(m*255),blue:Math.round(p*255),alpha:u}}function Bp(t,a){return(c)=>c>0?a:t}var Ut=(t,a,c)=>t+(a-t)*c;var PT=(t,a,c)=>{let u=t*t,f=c*(a*a-u)+u;return f<0?0:Math.sqrt(f)},ZJ=[yx,tl,bu],JJ=(t)=>ZJ.find((a)=>a.test(t));function E8(t){let a=JJ(t);if(!a)return ms(!1,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!1;let c=a.parse(t);if(a===bu)c=R8(c);return c}var AT=(t,a)=>{let c=E8(t),u=E8(a);if(!c||!u)return Bp(t,a);let f={...c};return(m)=>(f.red=PT(c.red,u.red,m),f.green=PT(c.green,u.green,m),f.blue=PT(c.blue,u.blue,m),f.alpha=Ut(c.alpha,u.alpha,m),tl.transform(f))};var E1=new Set(["none","hidden"]);function P8(t,a){if(E1.has(t))return(c)=>c<=0?t:a;else return(c)=>c>=1?a:t}function eee(t,a){return(c)=>Ut(t,a,c)}function P1(t){if(typeof t==="number")return eee;else if(typeof t==="string")return Np(t)?Bp:ur.test(t)?AT:ree;else if(Array.isArray(t))return A8;else if(typeof t==="object")return ur.test(t)?AT:tee;return Bp}function A8(t,a){let c=[...t],u=c.length,f=t.map((m,p)=>P1(m)(m,a[p]));return(m)=>{for(let p=0;p<u;p++)c[p]=f[p](m);return c}}function tee(t,a){let c={...t,...a},u={};for(let f in c)if(t[f]!==void 0&&a[f]!==void 0)u[f]=P1(t[f])(t[f],a[f]);return(f)=>{for(let m in u)c[m]=u[m](f);return c}}function nee(t,a){let c=[],u={color:0,var:0,number:0};for(let f=0;f<a.values.length;f++){let m=a.types[f],p=t.indexes[m][u[m]],g=t.values[p]??0;c[f]=g,u[m]++}return c}var ree=(t,a)=>{let c=Ir.createTransformer(a),u=zp(t),f=zp(a);if(u.indexes.var.length===f.indexes.var.length&&u.indexes.color.length===f.indexes.color.length&&u.indexes.number.length>=f.indexes.number.length){if(E1.has(t)&&!f.values.length||E1.has(a)&&!u.values.length)return P8(t,a);return ps(A8(nee(u,f),f.values),c)}else return ms(!0,`Complex values '${t}' and '${a}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Bp(t,a)};var M8=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function oee(t,a){let c=M8.exec(t);if(!c)return;let u=M8.exec(a);if(!u||c[2]!==u[2])return;let f=c[2],m=parseFloat(c[1]),p=parseFloat(u[1]);return(g)=>Js(Ut(m,p,g))+f}function Fp(t,a,c){if(typeof t==="number"&&typeof a==="number"&&typeof c==="number")return Ut(t,a,c);if(typeof t==="string"&&typeof a==="string"){let f=oee(t,a);if(f)return f}return P1(t)(t,a)}var kx=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function D8(t){let a=new Set,c=new Set,u=!1,f=!1,m=new Set,p={delta:0,timestamp:0,isProcessing:!1};function g(k){if(m.has(k))c.add(k),t();k(p)}let v={schedule:(k,S=!1,I=!1)=>{let L=I&&u?a:c;if(S)m.add(k);return L.add(k),k},cancel:(k)=>{c.delete(k),m.delete(k)},process:(k)=>{if(p=k,u){f=!0;return}u=!0;let S=a;if(a=c,c=S,a.forEach(g),a.clear(),u=!1,f)f=!1,v.process(k)}};return v}var aee=40;function A1(t,a,c={delta:0,timestamp:0,isProcessing:!1}){let u=!1,f=!0,m=()=>u=!0,p=kx.reduce((N,O)=>(N[O]=D8(m),N),{}),{setup:g,read:v,resolveKeyframes:k,preUpdate:S,update:I,preRender:T,render:L,postRender:R}=p,A=()=>{let N=To.useManualTiming,O=N?c.timestamp:performance.now();if(u=!1,!N)c.delta=f?16.666666666666668:Math.max(Math.min(O-c.timestamp,aee),1);if(c.timestamp=O,c.isProcessing=!0,g.process(c),v.process(c),k.process(c),S.process(c),I.process(c),T.process(c),L.process(c),R.process(c),c.isProcessing=!1,u&&a)f=!1,t(A)},E=()=>{if(u=!0,f=!0,!c.isProcessing)t(A)};return{schedule:kx.reduce((N,O)=>{let F=p[O];return N[O]=(z,B=!1,U=!1)=>{if(!u)E();return F.schedule(z,B,U)},N},{}),cancel:(N)=>{for(let O=0;O<kx.length;O++)p[kx[O]].cancel(N)},state:c,steps:p}}var{schedule:zt,cancel:Oo,steps:Sx}=A1(typeof requestAnimationFrame<"u"?requestAnimationFrame:Cr,!0,Gn);var N8=(t)=>{let a=({timestamp:c})=>t(c);return{start:(c=!0)=>zt.update(a,c),stop:()=>Oo(a),now:()=>Gn.isProcessing?Gn.timestamp:Mn.now()}};var M1=(t,a,c=10)=>{let u="",f=Math.max(Math.round(a/c),2);for(let m=0;m<f;m++)u+=Math.round(t(m/(f-1))*1e4)/1e4+", ";return`linear(${u.substring(0,u.length-2)})`};var D1=20000;function Vp(t,a=50,c=20000,u){let f=0,m=t.next(f);u?.push(m.value);while(!m.done&&f<c)f+=a,m=t.next(f),u?.push(m.value);return f>=c?1/0:f}function Cx(t,a=100,c){let u=c({...t,keyframes:[0,a]}),f=Math.min(Vp(u),D1);return{type:"keyframes",ease:(m)=>u.next(f*m).value/a,duration:ao(f)}}var io={stiffness:100,damping:10,mass:1,duration:800,bounce:0.3,visualDuration:0.3,restSpeed:{granular:0.01,default:2},restDelta:{granular:0.005,default:0.5},minDuration:0.01,maxDuration:10,minDamping:0.05},O8=(t)=>t<0?1/Math.max(1+t,io.minDamping):Math.max(1-t,io.minDamping);function _8(t,a){if(!(t>1))return 1;let c=Math.sqrt(t*t-1),u=t-c,f=t+c,m=2*c*Math.exp(-a)*(1+a);return z8((p)=>f*Math.exp(-u*p)-u*Math.exp(-f*p)-m,(p)=>Math.exp(-f*p)-Math.exp(-u*p),a)/a}function NT(t,a){return t*Math.sqrt(1-a*a)}var iee=12;function z8(t,a,c){let u=c;for(let f=1;f<iee;f++)u=u-t(u)/a(u);return u}var MT=0.001;function see({duration:t=io.duration,bounce:a=io.bounce}){let c,u;ms(t<=cr(io.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let f=O8(a);if(t=Qr(io.minDuration,io.maxDuration,ao(t)),f<1)c=(k)=>{let S=k*f,I=S*t,T=NT(k,f),L=Math.exp(-I);return MT-S/T*L},u=(k)=>{let I=k*f*t,T=f*f*k*k*t,L=Math.exp(-I),R=NT(k*k,f);return(-c(k)+MT>0?-1:1)*-T*L/R};else c=(k)=>{let S=Math.exp(-k*t),I=k*t+1;return-MT+S*I},u=(k)=>{let S=Math.exp(-k*t),I=-k*(t*t);return S*I};let m=5/t,p=z8(c,u,m),g=p*_8(f,p*t),v=g*g;return{stiffness:v,damping:f*2*Math.sqrt(v),duration:cr(t)}}var OT=(t,a)=>(a?t>=0:t>0)&&t<1/0;function DT(t,a){if(OT(t,a))return t;return}function lee(t){let a=DT(t.stiffness),c=DT(t.damping,!0),u=DT(t.mass),f={...t,stiffness:a??io.stiffness,damping:c??io.damping,mass:u??io.mass,isResolvedFromDuration:!1,isTimeDefined:(a??c??u)===void 0&&(t.duration!==void 0||t.bounce!==void 0)};if(f.isTimeDefined){if(t.visualDuration){let m=O8(t.bounce||0),p=2*Math.PI/(t.visualDuration*1.2)*_8(m,2*Math.PI/1.2);f.stiffness=p*p,f.damping=2*m*Math.sqrt(f.stiffness)}else Object.assign(f,see(f)),f.isResolvedFromDuration=!0;if(!OT(f.stiffness)||!OT(f.damping,!0))f.stiffness=io.stiffness,f.damping=io.damping}return f}function lc(t=io.visualDuration,a=io.bounce){let c=typeof t!=="object"?{visualDuration:t,keyframes:[0,1],bounce:a}:t,u=c.keyframes[0],f=c.keyframes[c.keyframes.length-1],m={done:!1,value:u},{stiffness:p,damping:g,mass:v,duration:k,isResolvedFromDuration:S,isTimeDefined:I}=lee({...c}),T=(B)=>I?0:-ao(B),L=g/(2*Math.sqrt(p*v)),R=ao(Math.sqrt(p/v)),A=L*R,E={target:f,delta:f-u,velocity:T(c.velocity||0)||0,restSpeed:0,restDelta:0},P=()=>{let B=Math.abs(E.delta)<5;E.restSpeed=c.restSpeed||(B?io.restSpeed.granular:io.restSpeed.default),E.restDelta=c.restDelta||(B?io.restDelta.granular:io.restDelta.default)};P();let D,N,O;if(L<1){let B=NT(R,L),U={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};O=()=>{U.A=(E.velocity+A*E.delta)/B,U.sinC=A*U.A+E.delta*B,U.cosC=A*E.delta-U.A*B};let Y=(G)=>{if(G!==U.t)U.t=G,U.env=Math.exp(-A*G),U.sin=Math.sin(B*G),U.cos=Math.cos(B*G)};D=(G)=>(Y(G),E.target-U.env*(U.A*U.sin+E.delta*U.cos)),N=(G)=>(Y(G),U.env*(U.sinC*U.sin+U.cosC*U.cos))}else if(L===1){D=(U)=>E.target-Math.exp(-R*U)*(E.delta+(E.velocity+R*E.delta)*U);let B={C:0};O=()=>{B.C=E.velocity+R*E.delta},N=(U)=>Math.exp(-R*U)*(R*B.C*U-E.velocity)}else{let B=R*Math.sqrt(L*L-1),U=A-B,Y=A+B,G=I?1/0:300/B,ce=(Q,ae)=>Math.exp(ae>G?-Q*G-A*(ae-G):-Q*ae),re={S:0,F:0};O=()=>{let Q=(E.velocity+A*E.delta)/B;re.S=(E.delta+Q)/2,re.F=(E.delta-Q)/2},D=(Q)=>E.target-re.S*ce(U,Q)-re.F*ce(Y,Q),N=(Q)=>U*re.S*ce(U,Q)+Y*re.F*ce(Y,Q)}O();let F=S?k||null:null,z={calculatedDuration:F,retarget:(B,U)=>{if(E.target=B[B.length-1],E.delta=E.target-B[0],E.velocity=T(U),!(c.restSpeed&&c.restDelta))P();z.calculatedDuration=F,m.done=!1,O()},velocity:(B)=>cr(N(B)),next:(B)=>{let U=D(B);if(!S){let Y=cr(N(B));m.done=Math.abs(Y)<=E.restSpeed&&Math.abs(E.target-U)<=E.restDelta}else m.done=B>=k;return m.value=m.done?E.target:U,m},toString:()=>{let B=Math.min(Vp(z),D1),U=M1((Y)=>z.next(B*Y).value,B,30);return B+"ms "+U},toTransition:()=>{}};return z}lc.applyToOptions=(t)=>{let a=Cx(t,100,lc);return t.ease=a.ease,t.duration=cr(a.duration),t.type="keyframes",t};function Ix({keyframes:t,velocity:a=0,power:c=0.8,timeConstant:u=325,bounceDamping:f=10,bounceStiffness:m=500,modifyTarget:p,min:g,max:v,restDelta:k=0.5,restSpeed:S}){let I=t[0],T={done:!1,value:I},L=(B)=>B<g||B>v,R=(B)=>{if(g===void 0)return v;if(v===void 0)return g;return Math.abs(g-B)<Math.abs(v-B)?g:v},A=c*a,E=I+A,P=p===void 0?E:p(E);if(P!==E)A=P-I;let D=(B)=>-A*Math.exp(-B/u),N=(B)=>{let U=D(B);T.done=Math.abs(U)<=k,T.value=T.done?P:P+U},O,F,z=(B)=>{if(!L(T.value))return;O=B,F=lc({keyframes:[T.value,R(T.value)],velocity:-D(B)/u*1000,damping:f,stiffness:m,restDelta:k,restSpeed:S})};return z(0),{calculatedDuration:null,next:(B)=>{let U=!1;if(!F&&O===void 0)U=!0,N(B),z(B);if(O!==void 0&&B>=O)return F.next(B-O);else return!U&&N(B),T}}}function cee(t,a,c){let u=[],f=c||To.mix||Fp,m=t.length-1;for(let p=0;p<m;p++){let g=f(t[p],t[p+1]);if(a){let v=Array.isArray(a)?a[p]||Cr:a;g=ps(v,g)}u.push(g)}return u}function N1(t,a,{clamp:c=!0,ease:u,mixer:f}={}){let m=t.length;if(Wn(m===a.length,"Both input and output ranges must be the same length","range-length"),m===1)return()=>a[0];if(m===2&&a[0]===a[1])return()=>a[1];let p=t[0]===t[1];if(t[0]>t[m-1])t=[...t].reverse(),a=[...a].reverse();let g=cee(a,u,f),v=g.length,k=(S)=>{if(p&&S<t[0])return a[0];let I=0;if(v>1){for(;I<t.length-2;I++)if(S<t[I+1])break}let T=Ei(t[I],t[I+1],S);return g[I](T)};return c?(S)=>k(Qr(t[0],t[m-1],S)):k}function Tx(t,a){let c=t[t.length-1];for(let u=1;u<=a;u++){let f=Ei(0,a,u);t.push(Ut(c,1,f))}}function Lx(t){let a=[0];return Tx(a,t.length-1),a}function B8(t,a){return t.map((c)=>c*a)}function uee(t,a){return t.map(()=>a||Dp).splice(0,t.length-1)}function nf({duration:t=300,keyframes:a,times:c,ease:u="easeInOut"}){let f=gx(u)?u.map(C1):C1(u)||Dp,m={done:!1,value:a[0]};if(a.length===2&&!Array.isArray(f)&&(!c||c.length!==2||c[0]===0&&c[1]===1)){let[v,k]=a,S=v===k?void 0:(To.mix||Fp)(v,k);return{calculatedDuration:t,next:(I)=>(m.value=S?S(f(t>0?Qr(0,1,I/t):1)):k,m.done=I>=t,m)}}let p=B8(c&&c.length===a.length?c:Lx(a),t),g=N1(p,a,{ease:Array.isArray(f)?f:uee(a,f)});return{calculatedDuration:t,next:(v)=>(m.value=g(v),m.done=v>=t,m)}}var dee=5;function fee(t,a,c){let u=Math.max(a-dee,0);return ux(c-t(u),a-u)}function F8(t,a,c=0){if(a<=0)return c;return t.velocity?t.velocity(a):fee((u)=>t.next(u).value,a,t.next(a).value)}var mee=(t)=>t!==null;function yu(t,{repeat:a,repeatType:c="loop"},u,f=1){let m=t.filter(mee),g=f<0||a&&c!=="loop"&&a%2===1?0:m.length-1;return!g||u===void 0?m[g]:u}var pee={decay:Ix,inertia:Ix,tween:nf,keyframes:nf,spring:lc};function O1(t){if(typeof t.type==="string")t.type=pee[t.type]}function V8(t,a){return{kind:t,animation:a,timestamp:Mn.now(),frameTimestamp:Gn.timestamp,frameIsProcessing:Gn.isProcessing}}function _1(t,a,c){let u=globalThis.__MOTION_INSPECT__;if(!u)return;try{u({...V8("animation-start",t),options:c?{...a,...c}:a})}catch{}}function U8(t,a){let c=globalThis.__MOTION_INSPECT__;if(!c)return;try{c({...V8("layout-animation-start",t),node:a})}catch{}}class rf{constructor(){this.isResolved=!1}get finished(){if(!this._finished)this._finished=this.isResolved?Promise.resolve():new Promise((t)=>{this._resolve=t});return this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,a){return this.finished.then(t,a)}}var hee=(t)=>t/100;class wu extends rf{constructor(t){super();if(this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:a}=this.options;if(a&&a.updatedAt!==Mn.now())this.tick(Mn.now());if(this.isStopped=!0,this.state==="idle")return;this.teardown(),this.options.onStop?.()},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1)this.pause();_1(this,this.options)}initAnimation(){let{options:t}=this;O1(t);let{type:a=nf,repeat:c=0,repeatDelay:u=0,repeatType:f,velocity:m=0}=t,{keyframes:p}=t,g=a||nf;if(g!==nf&&typeof p[0]!=="number")this.mixKeyframes=ps(hee,Fp(p[0],p[1])),p=[0,100];let v=g(p===t.keyframes?t:{...t,keyframes:p});if(f==="mirror")this.mirroredGenerator=g({...t,keyframes:[...p].reverse(),velocity:-m});if(v.calculatedDuration===null)v.calculatedDuration=Vp(v);let{calculatedDuration:k}=v;this.calculatedDuration=k,this.resolvedDuration=k+u,this.totalDuration=this.resolvedDuration*(c+1)-u,this.generator=v}updateTime(t){let a=Math.round(t-this.startTime)*this.playbackSpeed;if(this.holdTime!==null)this.currentTime=this.holdTime;else this.currentTime=a}tick(t,a=!1){let{generator:c,totalDuration:u,mixKeyframes:f,mirroredGenerator:m,resolvedDuration:p,calculatedDuration:g}=this;if(this.startTime===null)return c.next(0);let{delay:v=0,keyframes:k,repeat:S,repeatType:I,repeatDelay:T,type:L,onUpdate:R,finalKeyframe:A}=this.options;if(this.speed>0)this.startTime=Math.min(this.startTime,t);else if(this.speed<0)this.startTime=Math.min(t-u/this.speed,this.startTime);if(a)this.currentTime=t;else this.updateTime(t);let E=this.currentTime-v*(this.playbackSpeed>=0?1:-1),P=this.playbackSpeed>=0?E<0:E>u;if(this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null)this.currentTime=u;let D=this.currentTime,N=c;if(S){let B=Math.min(this.currentTime,u)/p,U=Math.floor(B),Y=B%1;if(!Y&&B>=1)Y=1;if(Y===1&&U--,U=Math.min(U,S+1),Boolean(U%2)){if(I==="reverse"){if(Y=1-Y,T)Y-=T/p}else if(I==="mirror")N=m}D=Qr(0,1,Y)*p}let O;if(P)this.delayState.value=k[0],O=this.delayState;else O=N.next(D);if(f&&!P)O.value=f(O.value);let{done:F}=O;if(!P&&g!==null)F=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0;let z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&F);if(z&&L!==Ix)O.value=yu(k,this.options,A,this.speed);if(R)R(O.value);if(z)this.finish();return O}then(t,a){return this.finished.then(t,a)}get duration(){return ao(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+ao(t)}get time(){return ao(this.currentTime)}set time(t){if(t=cr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0)this.holdTime=t;else if(this.driver)this.startTime=this.driver.now()-t/this.playbackSpeed;if(this.driver)this.driver.start(!1);else this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t)}getGeneratorVelocity(){return F8(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){let a=this.playbackSpeed!==t;if(a&&this.driver)this.updateTime(Mn.now());if(this.playbackSpeed=t,a&&this.driver)this.time=ao(this.currentTime)}play(){if(this.isStopped)return;let{driver:t=N8,startTime:a}=this.options;if(!this.driver)this.driver=t((u)=>this.tick(u));this.options.onPlay?.();let c=this.driver.now();if(this.state==="finished")this.updateFinished(),this.startTime=c;else if(this.holdTime!==null)this.startTime=c-this.holdTime;else if(!this.startTime)this.startTime=a??c;if(this.state==="finished"&&this.speed<0)this.startTime+=this.calculatedDuration;this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Mn.now()),this.holdTime=this.currentTime}complete(){if(this.state!=="running")this.play();this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){if(!this.driver)return;this.driver.stop(),this.driver=void 0}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){if(this.options.allowFlatten)this.options.type="keyframes",this.options.ease="linear",this.initAnimation();return this.driver?.stop(),t.observe(this)}}var gee=new Set(["brightness","contrast","saturate","opacity"]);function xee(t){let[a,c]=t.slice(0,-1).split("(");if(a==="drop-shadow")return t;let[u]=c.match(Op)||[];if(!u)return t;let f=c.replace(u,""),m=gee.has(a)?1:0;if(u!==c)m*=100;return a+"("+m+f+")"}var vee=/\b([a-z-]*)\(.*?\)/gu,Rx={...Ir,getAnimatableNone:(t)=>{let a=t.match(vee);return a?a.map(xee).join(" "):t}};var Ex={...Ir,getAnimatableNone:(t)=>{let a=Ir.parse(t);return Ir.createTransformer(t)(a.map((u)=>typeof u==="number"?0:typeof u==="object"?{...u,alpha:1}:u))}};var _T={...el,transform:Math.round};var Px={rotate:Ai,pathRotation:Ai,rotateX:Ai,rotateY:Ai,rotateZ:Ai,scale:bx,scaleX:bx,scaleY:bx,scaleZ:bx,skew:Ai,skewX:Ai,skewY:Ai,distance:ht,translateX:ht,translateY:ht,translateZ:ht,x:ht,y:ht,z:ht,perspective:ht,transformPerspective:ht,opacity:sc,originX:R1,originY:R1,originZ:ht};var _o={borderWidth:ht,borderTopWidth:ht,borderRightWidth:ht,borderBottomWidth:ht,borderLeftWidth:ht,borderRadius:ht,borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomRightRadius:ht,borderBottomLeftRadius:ht,width:ht,maxWidth:ht,height:ht,maxHeight:ht,top:ht,right:ht,bottom:ht,left:ht,inset:ht,insetBlock:ht,insetBlockStart:ht,insetBlockEnd:ht,insetInline:ht,insetInlineStart:ht,insetInlineEnd:ht,padding:ht,paddingTop:ht,paddingRight:ht,paddingBottom:ht,paddingLeft:ht,paddingBlock:ht,paddingBlockStart:ht,paddingBlockEnd:ht,paddingInline:ht,paddingInlineStart:ht,paddingInlineEnd:ht,margin:ht,marginTop:ht,marginRight:ht,marginBottom:ht,marginLeft:ht,marginBlock:ht,marginBlockStart:ht,marginBlockEnd:ht,marginInline:ht,marginInlineStart:ht,marginInlineEnd:ht,fontSize:ht,backgroundPositionX:ht,backgroundPositionY:ht,...Px,zIndex:_T,fillOpacity:sc,strokeOpacity:sc,numOctaves:_T};var bee={..._o,color:ur,backgroundColor:ur,outlineColor:ur,fill:ur,stroke:ur,borderColor:ur,borderTopColor:ur,borderRightColor:ur,borderBottomColor:ur,borderLeftColor:ur,filter:Rx,WebkitFilter:Rx,mask:Ex,WebkitMask:Ex},z1=(t)=>bee[t];var yee=new Set([Rx,Ex]);function Up(t,a){let c=z1(t);if(!yee.has(c))c=Ir;return c.getAnimatableNone?c.getAnimatableNone(a):void 0}function q8(t){for(let a=1;a<t.length;a++)t[a]??(t[a]=t[a-1])}var of=(t)=>t*180/Math.PI,zT=(t)=>{let a=of(Math.atan2(t[1],t[0]));return BT(a)},wee={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:(t)=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:zT,rotateZ:zT,skewX:(t)=>of(Math.atan(t[1])),skewY:(t)=>of(Math.atan(t[2])),skew:(t)=>(Math.abs(t[1])+Math.abs(t[2]))/2},BT=(t)=>{if(t=t%360,t<0)t+=360;return t},H8=zT,j8=(t)=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),G8=(t)=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),kee={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:j8,scaleY:G8,scale:(t)=>(j8(t)+G8(t))/2,rotateX:(t)=>BT(of(Math.atan2(t[6],t[5]))),rotateY:(t)=>BT(of(Math.atan2(-t[2],t[0]))),rotateZ:H8,rotate:H8,skewX:(t)=>of(Math.atan(t[4])),skewY:(t)=>of(Math.atan(t[1])),skew:(t)=>(Math.abs(t[1])+Math.abs(t[4]))/2};function af(t){return t.includes("scale")?1:0}function B1(t,a){if(!t||t==="none")return af(a);let c=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),u,f;if(c)u=kee,f=c;else{let g=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);u=wee,f=g}if(!f)return af(a);let m=u[a],p=f[1].split(",").map(See);return typeof m==="function"?m(p):p[m]}var F1=(t,a)=>{let{transform:c="none"}=getComputedStyle(t);return B1(c,a)};function See(t){return parseFloat(t.trim())}var Xa=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Dr=(()=>new Set([...Xa,"pathRotation"]))();var FT=(t)=>t===el||t===ht,Cee=new Set(["x","y","z"]),Iee=Xa.filter((t)=>!Cee.has(t));function K8(t){let a=[];return Iee.forEach((c)=>{let u=t.getValue(c);if(u!==void 0){let f=u.get(),m=c.startsWith("scale")?1:0;if(f===m)return;a.push([c,f]),u.set(m)}}),a}var W8=new Set(["bottom","right"]);function $8(t,a,c,u,f,m){let p=parseFloat(t);if(!isNaN(p))return p;let{min:g,max:v}=a()[c],k=v-g;return m==="border-box"?k:k-parseFloat(u)-parseFloat(f)}var ku={width:({width:t,paddingLeft:a="0",paddingRight:c="0",boxSizing:u},f)=>$8(t,f,"x",a,c,u),height:({height:t,paddingTop:a="0",paddingBottom:c="0",boxSizing:u},f)=>$8(t,f,"y",a,c,u),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},a)=>{let{y:c}=a();return parseFloat(t)+(c.max-c.min)},right:({left:t},a)=>{let{x:c}=a();return parseFloat(t)+(c.max-c.min)},x:({transform:t})=>B1(t,"x"),y:({transform:t})=>B1(t,"y")};ku.translateX=ku.x;ku.translateY=ku.y;var sf=new Set,VT=!1,UT=!1,qT=!1;function X8(){if(UT){let t=[],a=new Set,c=new Set;sf.forEach((f)=>{if(!f.needsMeasurement)return;if(t.push(f),a.add(f.element),W8.has(f.name))c.add(f.element)});let u=new Map;c.forEach((f)=>{let m=K8(f);if(!m.length)return;u.set(f,m),f.render()}),t.forEach((f)=>f.measureInitialState()),a.forEach((f)=>{f.render();let m=u.get(f);if(m)m.forEach(([p,g])=>{f.getValue(p)?.set(g)})}),t.forEach((f)=>f.measureEndState()),t.forEach((f)=>{if(f.suspendedScrollY!==void 0)window.scrollTo(0,f.suspendedScrollY)})}UT=!1,VT=!1,sf.forEach((t)=>t.complete(qT)),sf.clear()}function Y8(){sf.forEach((t)=>{if(t.readKeyframes(),t.needsMeasurement)UT=!0})}function Q8(){qT=!0,Y8(),X8(),qT=!1}function Tee(t,a,c){if(typeof t==="string"){if(Zd(t)||ef(t))return parseFloat(t);else if(!Ir.test(t)&&Ir.test(c))return Up(a,c)}return t??void 0}class lf{constructor(t,a,c,u,f,m=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=a,this.name=c,this.motionValue=u,this.element=f,this.isAsync=m}scheduleResolve(){if(this.state="scheduled",this.isAsync){if(sf.add(this),!VT)VT=!0,zt.read(Y8),zt.resolveKeyframes(X8)}else this.readKeyframes(),this.complete()}readKeyframes(){let{unresolvedKeyframes:t,name:a,element:c,motionValue:u}=this;if(t[0]===null){let f=u?.get(),m=t[t.length-1];if(f!==void 0)t[0]=f;else if(c&&a){let p=Tee(c.readValue(a,m),a,m);if(p!==void 0)t[0]=p}if(t[0]===void 0)t[0]=m;if(u&&f===void 0)u.set(t[0])}q8(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),sf.delete(this)}cancel(){if(this.state==="scheduled")sf.delete(this),this.state="pending"}resume(){if(this.state==="pending")this.scheduleResolve()}}var Su=(t)=>t.startsWith("--");function V1(t,a,c){Su(a)?t.style.setProperty(a,c):t.style[a]=c}var Z8={};function U1(t,a){let c=cx(t);return()=>Z8[a]??c()}var J8=U1(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var q1=U1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing");var cf=([t,a,c,u])=>`cubic-bezier(${t}, ${a}, ${c}, ${u})`;var HT={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cf([0,0.65,0.55,1]),circOut:cf([0.55,0,1,0.45]),backIn:cf([0.31,0.01,0.66,-0.59]),backOut:cf([0.33,1.53,0.69,0.99])};function jT(t,a){if(!t)return;else if(typeof t==="function")return q1()?M1(t,a):"ease-out";else if(vx(t))return cf(t);else if(Array.isArray(t))return t.map((c)=>jT(c,a)||HT.easeOut);else return HT[t]}function eO(t,a,c,{delay:u=0,duration:f=300,repeat:m=0,repeatType:p="loop",ease:g="easeOut",times:v}={},k=void 0){let S={[a]:c};if(v)S.offset=v;let I=jT(g,f);if(Array.isArray(I))S.easing=I;let T={delay:u,duration:f,easing:!Array.isArray(I)?I:"linear",fill:"both",iterations:m+1,direction:p==="reverse"?"alternate":"normal"};if(k)T.pseudoElement=k;return t.animate(S,T)}function uf(t){return typeof t==="function"&&"applyToOptions"in t}function tO({type:t,...a}){if(uf(t)&&q1())return t.applyToOptions(a);else a.duration??(a.duration=300),a.ease??(a.ease="easeOut");return a}class Ax extends rf{constructor(t){super();if(this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:a,name:c,keyframes:u,pseudoElement:f,allowFlatten:m=!1,finalKeyframe:p,onComplete:g}=t;this.isPseudoElement=Boolean(f),this.allowFlatten=m,this.options=t,Wn(typeof t.type!=="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let v=tO(t);if(this.animation=eO(a,c,u,v,f),v.autoplay===!1)this.animation.pause();this.animation.onfinish=()=>{if(this.finishedTime=this.time,!f){let k=yu(u,this.options,p,this.speed);if(this.updateMotionValue)this.updateMotionValue(k);V1(a,c,k),this.animation.cancel()}g?.(),this.notifyFinished()},_1(this,t,v)}play(){if(this.isStopped)return;if(this.manualStartTime=null,this.animation.play(),this.state==="finished")this.updateFinished()}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;if(t==="idle"||t==="finished")return;if(this.updateMotionValue)this.updateMotionValue();else this.commitStyles();if(!this.isPseudoElement)this.cancel()}commitStyles(){let t=this.options?.element;if(!this.isPseudoElement&&t?.isConnected)this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return ao(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+ao(t)}get time(){return ao(Number(this.animation.currentTime)||0)}set time(t){let a=this.finishedTime!==null;if(this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=cr(t),a)this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){if(t<0)this.finishedTime=null;this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:a,observe:c,...u}){if(this.allowFlatten)this.animation.effect?.updateTiming({easing:"linear"});if(this.animation.onfinish=null,t&&J8())return this.animation.timeline=t,Object.assign(this.animation,u),a?.(this.animation),Cr;else return c(this)}}var nO={anticipate:fx,backInOut:dx,circInOut:hx};function Lee(t){return t in nO}function rO(t){if(typeof t.ease==="string"&&Lee(t.ease))t.ease=nO[t.ease]}var GT=10;class $T extends Ax{constructor(t){rO(t),O1(t);super(t);if(t.startTime!==void 0&&t.autoplay!==!1)this.startTime=t.startTime;this.options=t}updateMotionValue(t){let{motionValue:a,onUpdate:c,onComplete:u,element:f,...m}=this.options;if(!a)return;if(t!==void 0){a.set(t);return}let p=new wu({...m,autoplay:!1}),g=Math.max(GT,Mn.now()-this.startTime),v=Qr(0,GT,g-GT),k=p.sample(g).value,{name:S}=this.options;if(f&&S)V1(f,S,k);a.setWithVelocity(p.sample(Math.max(0,g-v)).value,k,v),p.stop()}}var KT=(t,a)=>{if(a==="zIndex")return!1;if(typeof t==="number"||Array.isArray(t))return!0;if(typeof t==="string"&&(Ir.test(t)||t==="0")&&!t.startsWith("url("))return!0;return!1};function Ree(t){let a=t[0];if(t.length===1)return!0;for(let c=0;c<t.length;c++)if(t[c]!==a)return!0}function oO(t,a,c,u){let f=t[0];if(f===null)return!1;if(a==="display"||a==="visibility")return!0;let m=t[t.length-1],p=KT(f,a),g=KT(m,a);if(!p||!g)return p!==g&&ms(!1,`You are trying to animate ${a} from "${f}" to "${m}". "${p?m:f}" is not an animatable value.`,"value-not-animatable"),!1;return Ree(t)||(c==="spring"||uf(c))&&u}function Mx(t){t.duration=0,t.type="keyframes"}var Dx=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);var Eee=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function aO(t){for(let a=0;a<t.length;a++)if(typeof t[a]==="string"&&Eee.test(t[a]))return!0;return!1}var iO=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Pee=cx(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function sO(t){let{motionValue:a,name:c,repeatDelay:u,repeatType:f,damping:m,type:p,keyframes:g}=t;if(!c||!(Dx.has(c)||iO.has(c)))return!1;let v=a?.owner?.current;if(!(v instanceof HTMLElement)&&!(v instanceof SVGElement))return!1;let{onUpdate:k,transformTemplate:S}=a.owner.getProps();return Pee()&&(Dx.has(c)||iO.has(c)&&aO(g))&&(c!=="transform"||!S)&&!k&&!u&&f!=="mirror"&&m!==0&&p!=="inertia"}var Aee=40;class WT extends rf{constructor(t){super();this.stop=()=>{if(this._animation)this._animation.stop(),this.stopTimeline?.();this.keyframeResolver?.cancel()},this.createdAt=Mn.now();let{keyframes:a,name:c,motionValue:u,element:f}=t,m=t;m.autoplay??(m.autoplay=!0),m.delay??(m.delay=0),m.type??(m.type="keyframes"),m.repeat??(m.repeat=0),m.repeatDelay??(m.repeatDelay=0),m.repeatType??(m.repeatType="loop");let p=f?.KeyframeResolver||lf;this.keyframeResolver=new p(a,(g,v,k)=>this.onKeyframesResolved(g,v,m,!k),c,u,f),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,a,c,u){this.keyframeResolver=void 0;let{name:f,type:m,velocity:p,delay:g,isHandoff:v,onUpdate:k}=c;this.resolvedAt=Mn.now();let S=!0;if(!oO(t,f,m,p)){if(S=!1,To.instantAnimations||!g)k?.(yu(t,c,a));t[0]=t[t.length-1],Mx(c),c.repeat=0}let I=u?!this.resolvedAt?this.createdAt:this.resolvedAt-this.createdAt>Aee?this.resolvedAt:this.createdAt:void 0,{onComplete:T}=c;c.startTime??(c.startTime=I),c.finalKeyframe=a,c.keyframes=t,c.onComplete=()=>{T?.(),this.notifyFinished()};let L=S&&!v&&sO(c),R;if(L){c.element=c.motionValue?.owner?.current;try{R=new $T(c)}catch{R=new wu(c)}}else R=new wu(c);if(this.pendingTimeline)this.stopTimeline=R.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0;this._animation=R}get finished(){return this._animation?this._animation.finished:super.finished}then(t,a){return this.finished.finally(t).then(()=>{})}get animation(){if(!this._animation)this.keyframeResolver?.resume(),Q8();return this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){if(this._animation)this.stopTimeline=this.animation.attachTimeline(t);else this.pendingTimeline=t;return()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){if(this._animation)this.animation.cancel();this.keyframeResolver?.cancel()}}class XT{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t)=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,a){for(let c=0;c<this.animations.length;c++)this.animations[c][t]=a}attachTimeline(t){let a=this.animations.map((c)=>c.attachTimeline(t));return()=>{a.forEach((c,u)=>{c&&c(),this.animations[u].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return lO(this.animations,"duration")}get iterationDuration(){return lO(this.animations,"iterationDuration")}runAll(t){this.animations.forEach((a)=>a[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function lO(t,a){let c=0;for(let u=0;u<t.length;u++){let f=t[u][a];if(f!==null&&f>c)c=f}return c}class H1 extends XT{then(t,a){return this.finished.finally(t).then(()=>{})}}function j1(t,a,c,u=0,f=1){let m=Array.from(t).sort((k,S)=>k.sortNodePosition(S)).indexOf(a),p=t.size,g=(p-1)*u;return typeof c==="function"?c(m,p):f===1?m*u:g-m*u}var cO=30,Dee=(t)=>!isNaN(parseFloat(t)),df={current:void 0};class cc{constructor(t,a={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(c)=>{let u=Mn.now();if(this.updatedAt!==u)this.setPrevFrameValue();if(this.prev=this.current,this.setCurrent(c),this.current!==this.prev){if(this.notifyChange(),this.dependents)for(let f of this.dependents)f.dirty()}},this.hasAnimated=!1,this.setCurrent(t),this.owner=a.owner}setCurrent(t){if(this.current=t,this.updatedAt=Mn.now(),this.canTrackVelocity===null&&t!==void 0)this.canTrackVelocity=Dee(this.current)}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,a){var c;if(t==="change")return this.onChangeSubscribe(a);return((c=this.events)[t]||(c[t]=new ic)).add(a)}onChangeSubscribe(t){let{events:a}=this;if(!a.change&&!this.changeSubscriber)this.changeSubscriber=t;else{if(!a.change)a.change=new ic,a.change.add(this.changeSubscriber),this.changeSubscriber=void 0;a.change.add(t)}return()=>{if(this.changeSubscriber===t)this.changeSubscriber=void 0;else a.change?.remove(t);this.stopIfUnobserved()}}stopIfUnobserved(){zt.read(()=>{if(!this.changeSubscriber&&!this.events.change?.getSize())this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let t in this.events)this.events[t].clear()}attach(t,a){this.passiveEffect=t,this.stopPassiveEffect=a}set(t){if(!this.passiveEffect)this.updateAndNotify(t);else this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,a,c){this.set(a),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-c}jump(t,a=!0){if(this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,a&&this.stop(),this.stopPassiveEffect)this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:t,changeSubscriber:a}=this;if(a)a(t);else this.events.change?.notify(t)}addDependent(t){if(!this.dependents)this.dependents=new Set;this.dependents.add(t)}removeDependent(t){if(this.dependents)this.dependents.delete(t)}get(){if(df.current)df.current.push(this);return this.current}getPrevious(){return this.prev}getVelocity(){let t=Mn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>cO)return 0;let a=Math.min(this.updatedAt-this.prevUpdatedAt,cO);return ux(parseFloat(this.current)-parseFloat(this.prevFrameValue),a)}start(t){return this.stop(),new Promise((a)=>{this.hasAnimated=!0;let c=!1,u;if(u=t(()=>{if(c=!0,this.events.animationComplete?.notify(),this.animation===u)this.clearAnimation();a()}),!c)this.animation=u;this.events.animationStart?.notify()})}stop(){if(this.animation){if(this.animation.stop(),this.events.animationCancel)this.events.animationCancel.notify()}this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){if(this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect)this.stopPassiveEffect()}}function so(t,a){return new cc(t,a)}function ff(t,a){if(t?.inherit&&a){let{inherit:c,...u}=t;return{...a,...u}}return t}function qp(t,a){let c=t?.[a]??t?.default??t;if(c!==t)return ff(c,t);return c}var Nee={type:"spring",stiffness:500,damping:25,restSpeed:10},Oee=(t)=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),_ee={type:"keyframes",duration:0.8},zee={type:"keyframes",ease:[0.25,0.1,0.35,1],duration:0.3},uO=(t,{keyframes:a})=>{if(a.length>2)return _ee;else if(Dr.has(t))return t.startsWith("scale")?Oee(a[1]):Nee;return zee};var Bee=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function dO(t){for(let a in t)if(!Bee.has(a))return!0;return!1}var uc=(t,a,c,u={},f,m)=>(p)=>{let g=qp(u,t)||{},v=g.delay||u.delay||0,{elapsed:k=0}=u;k=k-cr(v);let S={keyframes:Array.isArray(c)?c:[null,c],ease:"easeOut",velocity:a.getVelocity(),...g,delay:-k,onUpdate:(T)=>{a.set(T),g.onUpdate&&g.onUpdate(T)},onComplete:()=>{p(),g.onComplete&&g.onComplete()},name:t,motionValue:a,element:m?void 0:f};if(!dO(g))Object.assign(S,uO(t,S));if(S.duration&&(S.duration=cr(S.duration)),S.repeatDelay&&(S.repeatDelay=cr(S.repeatDelay)),S.from!==void 0)S.keyframes[0]=S.from;let I=!1;if(S.type===!1||S.duration===0&&!S.repeatDelay){if(Mx(S),S.delay===0)I=!0}if(To.instantAnimations||To.skipAnimations||f?.shouldSkipAnimations||g.skipAnimations)I=!0,Mx(S),S.delay=0;if(S.allowFlatten=!g.type&&!g.ease,I&&!m&&a.get()!==void 0){let T=yu(S.keyframes,g);if(T!==void 0){zt.update(()=>{S.onUpdate(T),S.onComplete()});return}}return g.isSync?new wu(S):new WT(S)};var Fee=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vee(t){let a=Fee.exec(t);if(!a)return[,];let[,c,u,f]=a;return[`--${c??u}`,f]}var Uee=4;function YT(t,a,c=1){Wn(c<=Uee,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[u,f]=Vee(t);if(!u)return;let m=window.getComputedStyle(a).getPropertyValue(u);if(m){let p=m.trim();return Zd(p)?parseFloat(p):p}return Np(f)?YT(f,a,c+1):f}function qee(t){let a=[{},{}];return t?.values.forEach((c,u)=>{a[0][u]=c.get(),a[1][u]=c.getVelocity()}),a}function Nx(t,a,c,u){let f=(m)=>typeof m==="function"?m(c!==void 0?c:t.custom,...qee(u)):m;if(a=f(a),typeof a==="string")a=t.variants&&t.variants[a];return f(a)}function Ya(t,a,c){return Nx(t.getProps(),a,c,t)}var G1=(t,a)=>a==="exit"?t.presenceContext?.custom:void 0;var Hp=new Set(["width","height","top","left","right","bottom",...Xa]);var fO=(t)=>Array.isArray(t);function Hee(t,a,c){if(t.hasValue(a))t.getValue(a).set(c);else t.addValue(a,so(c))}function jee(t){return fO(t)?t[t.length-1]||0:t}function mO(t,a){let c=Ya(t,a),{transitionEnd:u={},transition:f={},...m}=c||{};m={...m,...u};for(let p in m){let g=jee(m[p]);Hee(t,p,g)}}var un=(t)=>Boolean(t&&t.getVelocity);function pO(t){return Boolean(un(t)&&t.add)}function jp(t,a){let c=t.getValue("willChange");if(pO(c))return c.add(a);else if(!c&&To.WillChange){let u=new To.WillChange("auto");t.addValue("willChange",u),u.add(a)}}function hs(t){return t.replace(/([A-Z])/g,(a)=>`-${a.toLowerCase()}`)}var hO="framerAppearId",Ox="data-"+hs(hO);function $1(t){return t.props[Ox]}var Gee=typeof window<"u";function $ee({protectedKeys:t,needsAnimating:a},c){let u=c in t&&!a[c];return a[c]=!1,u}function K1(t,a,{delay:c=0,transitionOverride:u,type:f}={}){let{transition:m,transitionEnd:p,...g}=a,v=t.getDefaultTransition();m=m?ff(m,v):v;let k=m?.reduceMotion,S=m?.skipAnimations;if(u)m=u;let I=[],T=f&&t.animationState?.getState()[f],L=m?.path;if(L)L.animateVisualElement(t,g,m,c,I);for(let R in g){let A=t.getValue(R,t.latestValues[R]??null),E=g[R];if(E===void 0||T&&$ee(T,R))continue;let P={delay:c,...qp(m||{},R)};if(S)P.skipAnimations=!0;let D=A.get();if(D!==void 0&&!A.isAnimating()&&!Array.isArray(E)&&E===D&&!P.velocity){zt.update(()=>A.set(E));continue}let N=!1;if(Gee&&window.MotionHandoffAnimation){let z=$1(t);if(z){let B=window.MotionHandoffAnimation(z,R,zt);if(B!==null)P.startTime=B,N=!0}}jp(t,R);let O=k??t.shouldReduceMotion;A.start(uc(R,A,E,O&&Hp.has(R)?{type:!1}:P,t,N));let F=A.animation;if(F)I.push(F)}if(p){let R=()=>zt.update(()=>{p&&mO(t,p)});if(I.length)Promise.all(I).then(R);else R()}return I}function W1(t,a,c={}){let u=Ya(t,a,G1(t,c.type)),f=c.transitionOverride||(u?.transition??(t.getDefaultTransition()||{})),m=()=>Promise.all(u?K1(t,u,c):[]),p=(v=0)=>{let{variantChildren:k}=t,{delayChildren:S=0,staggerChildren:I,staggerDirection:T}=f,L=[];return k?.forEach((R)=>{R.notify("AnimationStart",a),L.push(W1(R,a,{...c,delay:v+(typeof S==="function"?0:S)+j1(k,R,S,I,T)}).then(()=>R.notify("AnimationComplete",a)))}),Promise.all(L)},{when:g}=f;return g?g==="beforeChildren"?m().then(()=>p()):p().then(m):Promise.all([m(),p(c.delay)])}function gO(t,a,c={}){return t.notify("AnimationStart",a),(Array.isArray(a)?Promise.all(a.map((f)=>W1(t,f,c))):typeof a==="string"?W1(t,a,c):Promise.all(K1(t,Ya(t,a,c.custom),c))).then(()=>{t.notify("AnimationComplete",a)})}var xO={test:(t)=>t==="auto",parse:(t)=>t};var vO=(t)=>(a)=>a.test(t);var Kee=[el,ht,No,Ai,RT,LT,xO],QT=(t)=>Kee.find(vO(t));function bO(t){if(typeof t==="number")return t===0;else if(t!==null)return t==="none"||t==="0"||ef(t);else return!0}var Wee=new Set(["auto","none","0"]);function yO(t,a,c){let u=0,f=void 0;while(u<t.length&&!f){let m=t[u];if(typeof m==="string"&&!Wee.has(m)&&T8(m))f=t[u];u++}if(f&&c)for(let m of a){if(t[m]===f)continue;t[m]=Up(c,f)}}class _x extends lf{constructor(t,a,c,u,f){super(t,a,c,u,f,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:a,name:c}=this;if(!a||!a.current)return;super.readKeyframes();for(let k=0;k<t.length;k++){let S=t[k];if(typeof S==="string"){if(S=S.trim(),Np(S)){let I=YT(S,a.current);if(I!==void 0)t[k]=I;if(k===t.length-1)this.finalKeyframe=S}}}if(this.resolveNoneKeyframes(),!Hp.has(c)||t.length!==2)return;let[u,f]=t;if(typeof u==="number"&&typeof f==="number")return;let m=QT(u),p=QT(f),g=IT(u),v=IT(f);if(g!==v&&ku[c]){this.needsMeasurement=!0;return}if(m===p)return;if(FT(m)&&FT(p))for(let k=0;k<t.length;k++){let S=t[k];if(typeof S==="string")t[k]=parseFloat(S)}else if(ku[c])this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:a}=this,c=[];for(let u=0;u<t.length;u++)if(t[u]===null||bO(t[u]))c.push(u);if(c.length)yO(t,c,a)}measure(){let{element:t,name:a}=this;return ku[a](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){let{element:t,unresolvedKeyframes:a,name:c}=this;if(!t||!t.current)return;if(c==="height")this.suspendedScrollY=window.pageYOffset;this.measuredOrigin=this.measure(),a[0]=this.measuredOrigin;let u=a[a.length-1];if(u!==void 0)this.motionValue?.jump(u,!1)}measureEndState(){let{element:t,unresolvedKeyframes:a}=this;if(!t||!t.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let c=a.length-1,u=a[c];if(a[c]=this.measure(),u!==null&&this.finalKeyframe===void 0)this.finalKeyframe=u;if(this.removedTransforms?.length)this.removedTransforms.forEach(([f,m])=>{t.getValue(f).set(m)});this.resolveNoneKeyframes()}}var zx=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];var ZT=[];function JT(t){Wn(typeof t.test==="function"&&typeof t.read==="function","Effects passed to animate.addEffect() need test() and read().","effect-missing-test"),X1(t),ZT.unshift(t)}function X1(t){Ea(ZT,t)}function e5(t){return ZT.find((a)=>a.test(t))}function Y1(t,a,c={},u){let f=[],{velocity:m}=c,p=c.reduceMotion??u?.shouldReduceMotion;for(let v in a){if(v==="transition"||v==="transitionEnd")continue;let k=a[v];if(k===void 0)continue;let S=t(v),I=S.get();if(I!==void 0&&!S.isAnimating()&&!Array.isArray(k)&&k===I&&!m){zt.update(()=>S.set(k));continue}S.start(uc(v,S,k,p&&Hp.has(v)?{type:!1}:c,u)),S.animation&&f.push(S.animation)}let{transitionEnd:g}=a;if(g){let v=()=>zt.update(()=>{for(let k in g)t(k).set(g[k])});f.length?Promise.all(f).then(v):v()}return f}function Bx(t,a,c,u,f){return Y1((m)=>{let p=t.get(a,m);if(!p){let g;if(!f){let v=c[m];g=Xee(v)??t.read(a,m,v),Wn(g!==void 0,`"${m}" can't be read from the animated subject. Provide [from, to] keyframes.`,"effect-unreadable-value")}p=so(g,{owner:f}),t(a,{[m]:p})}return p},c,u,f)}function Xee(t){let a=Array.isArray(t)?t[0]:void 0;return a===null?void 0:a}function nl(t){return Jd(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function _i(t){return Jd(t)&&"ownerSVGElement"in t}var Pa=(t,a)=>a&&typeof t==="number"?a.transform(t):t;function mf(t,a,c){if(t==null)return[];if(t instanceof EventTarget)return[t];else if(typeof t==="string"){let u=document;if(a)u=a.current;let f=c?.[t]??u.querySelectorAll(t);return f?Array.from(f):[]}return Array.from(t).filter((u)=>u!=null)}class t5{constructor(t=zt.render){this.step=t,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{let{pending:a,numPending:c}=this;this.numPending=0;for(let u=0;u<c;u++)a[u]()}}set(t,a,c,u){if(this.values.get(t)?.onRemove(),u){for(let g of this.values.values())if(g.value===u)c=g.render}let f=()=>c&&this.schedule(c);a.get()!==void 0&&f();let m=a.on("change",f),p=()=>{m(),c&&!u&&this.cancel(c),this.values.get(t)?.onRemove===p&&this.values.delete(t)};return this.values.set(t,{value:a,render:u?void 0:c,onRemove:p}),p}get(t){return this.values.get(t)?.value}release(){let t=new Map;return this.values.forEach((a,c)=>{t.set(c,a.value),a.onRemove()}),this.transformKeys=this.transformValues=void 0,t}schedule(t){let{pending:a,numPending:c}=this;for(let u=0;u<c;u++)if(a[u]===t)return;c||this.step(this.flush),a[this.numPending++]=t}cancel(t){let{pending:a}=this;for(let c=0;c<this.numPending;c++)if(a[c]===t){a[c]=a[--this.numPending];return}}}function Gp(t,{step:a,...c}={}){let u=new WeakMap;return Object.assign((m,p)=>{let g=u.get(m)??new t5(a);u.set(m,g);let v=[];for(let k in p){let S=p[k],I=t(m,g,k,S);v.push(I)}return()=>{for(let k of v)k()}},c,{get:(m,p)=>u.get(m)?.get(p),flush:(m)=>u.get(m)?.flush(),state:(m)=>u.get(m)})}var Yee={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},wO={};function kO(t){let a="",{transformKeys:c=[],transformValues:u={}}=t;for(let m=0;m<c.length;m++){let p=c[m],g=u[p].get();if(g===void 0)continue;if((typeof g==="number"?g:parseFloat(g))!==(p.startsWith("scale")?1:0))a+=(a&&" ")+(wO[p]||(wO[p]=(Yee[p]||p)+"("))+Pa(g,Px[p])+")"}let f=t.get("pathRotation")?.get();if(f)a+=(a&&" ")+"rotate("+Pa(f,Px.pathRotation)+")";return a||"none"}var r5=new Set(["originX","originY","originZ"]),n5=(t,a)=>Pa(t.get(a)?.get(),_o[a]),Q1=(t,a,c,u)=>{let f=void 0,m=void 0;if(Dr.has(c)){if(c!=="pathRotation"){let p=a.transformKeys??(a.transformKeys=[]);if((a.transformValues??(a.transformValues={}))[c]=u,!p.includes(c))p.push(c),p.sort((g,v)=>Xa.indexOf(g)-Xa.indexOf(v))}if(!a.get("transform")){if(!nl(t)&&!a.get("transformBox"))Q1(t,a,"transformBox",new cc("fill-box"));a.set("transform",new cc("none"),()=>{t.style.transform=kO(a)})}m=a.get("transform")}else if(r5.has(c)){if(!a.get("transformOrigin"))a.set("transformOrigin",new cc(""),()=>{let p=n5(a,"originX")??"50%",g=n5(a,"originY")??"50%",v=n5(a,"originZ")??0;t.style.transformOrigin=`${p} ${g} ${v}`});m=a.get("transformOrigin")}else if(Su(c))f=()=>{t.style.setProperty(c,u.get())};else f=()=>{t.style[c]=Pa(u.get(),_o[c])};return a.set(c,u,f,m)},Qee=(t)=>nl(t)||_i(t),o5=(t,a)=>{if(Dr.has(a))return F1(t,a);let c=getComputedStyle(t),u=Su(a)?c.getPropertyValue(a):c[a];return typeof u==="string"&&u.trim()||0},SO=Gp(Q1,{test:Qee,read:o5});var Zee={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jee=Xa.length;function CO(t,a,c){let u="",f=!0;for(let p=0;p<Jee;p++){let g=Xa[p],v=t[g];if(v===void 0)continue;let k=!0;if(typeof v==="number")k=v===(g.startsWith("scale")?1:0);else{let S=parseFloat(v);k=g.startsWith("scale")?S===1:S===0}if(!k||c){let S=Pa(v,_o[g]);if(!k){f=!1;let I=Zee[g]||g;u+=`${I}(${S}) `}if(c)a[g]=S}}let m=t.pathRotation;if(m)f=!1,u+=`rotate(${Pa(m,_o.pathRotation)}) `;if(u=u.trim(),c)u=c(a,f?"":u);else if(f)u="none";return u}function pf(t,a,c){let{style:u,vars:f,transformOrigin:m}=t,p=!1,g=!1;for(let v in a){let k=a[v];if(Dr.has(v)){p=!0;continue}else if(T1(v)){f[v]=k;continue}else{let S=Pa(k,_o[v]);if(v.startsWith("origin"))g=!0,m[v]=S;else u[v]=S}}if(!a.transform){if(p||c)u.transform=CO(a,t.transform,c);else if(u.transform)u.transform="none"}if(g){let{originX:v="50%",originY:k="50%",originZ:S=0}=m;u.transformOrigin=`${v} ${k} ${S}`}}var ete={offset:"stroke-dashoffset",array:"stroke-dasharray"},tte={offset:"strokeDashoffset",array:"strokeDasharray"};function IO(t,a,c=1,u=0,f=!0){t.pathLength=1;let m=f?ete:tte;t[m.offset]=`${-u}`,t[m.array]=`${a} ${c}`}var Fx=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Vx(t,{attrX:a,attrY:c,attrScale:u,pathLength:f,pathSpacing:m=1,pathOffset:p=0,...g},v,k,S){if(pf(t,g,k),v){if(t.style.viewBox)t.attrs.viewBox=t.style.viewBox;return}t.attrs=t.style,t.style={};let{attrs:I,style:T}=t;for(let L of Fx)if(I[L]!==void 0)T[L]=I[L],delete I[L];if(T.transform||I.transformOrigin)T.transformOrigin=I.transformOrigin??"50% 50%",delete I.transformOrigin;if(T.transform)T.transformBox=S?.transformBox??"fill-box",delete I.transformBox;if(a!==void 0)I.x=a;if(c!==void 0)I.y=c;if(u!==void 0)I.scale=u;if(f!==void 0)IO(I,f,m,p,!1)}function nte(t,a){if(!(a in t))return!1;let c=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),a)||Object.getOwnPropertyDescriptor(t,a);return c&&typeof c.set==="function"}var a5=(t,a,c,u,f=c)=>{let m=nte(t,f);if(!m&&(f.startsWith("data")||f.startsWith("aria")))f=hs(f);let p=_o[c]||_o[f],g=m?()=>{t[f]=Pa(u.get(),_o[c])}:()=>{let v=Pa(u.get(),p);if(v===null||v===void 0)t.removeAttribute(f);else t.setAttribute(f,String(v))};return a.set(c,u,g)};function rte(t,a,c,u){if(zt.render(()=>t.setAttribute("pathLength","1")),c==="pathOffset")return a.set(c,u,()=>{let f=u.get();t.setAttribute("stroke-dashoffset",`${-f}`)});else{if(!a.get("stroke-dasharray"))a.set("stroke-dasharray",new cc("1 1"),()=>{let f=a.get("pathLength")?.get()??1,m=a.get("pathSpacing")?.get();t.setAttribute("stroke-dasharray",`${f} ${m??1-Number(f)}`)});return a.set(c,u,void 0,a.get("stroke-dasharray"))}}var ote=(t,a,c,u)=>{if(c.startsWith("path"))return rte(t,a,c,u);else if(c.startsWith("attr"))return a5(t,a,c,u,LO(c));return(Dr.has(c)||r5.has(c)||Su(c)||c in t.style?Q1:a5)(t,a,c,u)},ate=(t,a)=>{if(Dr.has(a))return _o[a]?.default||0;if(Su(a)||Fx.includes(a))return o5(t,a)||t.getAttribute(hs(a))||0;return a=LO(a),t.getAttribute(hs(a))??t.getAttribute(a)??void 0},TO=Gp(ote,{test:_i,read:ate});function LO(t){return t.replace(/^attr([A-Z])/,(a,c)=>c.toLowerCase())}function Ux({top:t,left:a,right:c,bottom:u}){return{x:{min:a,max:c},y:{min:t,max:u}}}function i5({x:t,y:a}){return{top:a.min,right:t.max,bottom:a.max,left:t.min}}function s5(t,a){if(!a)return t;let c=a({x:t.left,y:t.top}),u=a({x:t.right,y:t.bottom});return{top:c.y,left:c.x,bottom:u.y,right:u.x}}function l5(t){return t===void 0||t===1}function Z1({scale:t,scaleX:a,scaleY:c}){return!l5(t)||!l5(a)||!l5(c)}function dc(t){return Z1(t)||c5(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function c5(t){return RO(t.x)||RO(t.y)}function RO(t){return t&&t!=="0%"}function qx(t,a,c){let u=t-c,f=a*u;return c+f}function EO(t,a,c,u,f){if(f!==void 0)t=qx(t,f,u);return qx(t,c,u)+a}function u5(t,a=0,c=1,u,f){t.min=EO(t.min,a,c,u,f),t.max=EO(t.max,a,c,u,f)}function d5(t,{x:a,y:c}){u5(t.x,a.translate,a.scale,a.originPoint),u5(t.y,c.translate,c.scale,c.originPoint)}var PO=0.999999999999,AO=1.0000000000001;function NO(t,a,c,u=!1){let f=c.length;if(!f)return;a.x=a.y=1;let m,p;for(let g=0;g<f;g++){m=c[g],p=m.projectionDelta;let{visualElement:v}=m.options;if(v&&v.props.style&&v.props.style.display==="contents")continue;if(u&&m.options.layoutScroll&&m.scroll&&m!==m.root)zi(t.x,-m.scroll.offset.x),zi(t.y,-m.scroll.offset.y);if(p)a.x*=p.x.scale,a.y*=p.y.scale,d5(t,p);if(u&&dc(m.latestValues))Hx(t,m.latestValues,m.layout?.layoutBox)}if(a.x<AO&&a.x>PO)a.x=1;if(a.y<AO&&a.y>PO)a.y=1}function zi(t,a){t.min+=a,t.max+=a}function MO(t,a,c,u,f=0.5){let m=Ut(t.min,t.max,f);u5(t,a,c,m,u)}function DO(t,a){if(typeof t==="string")return parseFloat(t)/100*(a.max-a.min);return t}function Hx(t,a,c){let u=c??t;MO(t.x,DO(a.x,u.x),a.scaleX,a.scale,a.originX),MO(t.y,DO(a.y,u.y),a.scaleY,a.scale,a.originY)}function $p(t,a){return Ux(s5(t.getBoundingClientRect(),a))}function f5(t,a,c){let u=$p(t,c),{scroll:f}=a;if(f)zi(u.x,f.offset.x),zi(u.y,f.offset.y);return u}var ite={},ste=(t)=>_i(t)?TO:SO;class OO{constructor(t,a){this.effect=t,this.current=a,this.KeyframeResolver=_x}getValue(t){return this.effect.get(this.current,t)}readValue(t,a){return this.effect.read(this.current,t,a)}render(){this.effect.flush(this.current)}measureViewportBox(){return $p(this.current)}getProps(){return ite}}function m5(t,a,c,u){if(u)return Y1((m)=>u.getValue(m,null),a,c,u);let f=ste(t);return Bx(f,t,a,c,new OO(f,t))}var p5=Gp((t,a,c,u)=>a.set(c,u,()=>{t[c]=u.get()}),{test:(t)=>Jd(t),read:(t,a)=>{let c=t[a];return typeof c==="string"||typeof c==="number"?c:void 0}});var{schedule:hf,cancel:lte}=A1(queueMicrotask,!1);var Fi={x:!1,y:!1};function J1(){return Fi.x||Fi.y}function h5(t){if(t==="x"||t==="y")if(Fi[t])return null;else return Fi[t]=!0,()=>{Fi[t]=!1};else if(Fi.x||Fi.y)return null;else return Fi.x=Fi.y=!0,()=>{Fi.x=Fi.y=!1}}function ew(t,a){let c=mf(t),u=new AbortController,f={passive:!0,...a,signal:u.signal};return[c,f,()=>u.abort()]}function cte(t){return!(t.pointerType==="touch"||J1())}function g5(t,a,c={}){let[u,f,m]=ew(t,c);return u.forEach((p)=>{let g=!1,v=!1,k,S=()=>{p.removeEventListener("pointerleave",R)},I=(E)=>{if(k)k(E),k=void 0;S()},T=(E)=>{if(g=!1,window.removeEventListener("pointerup",T),window.removeEventListener("pointercancel",T),v)v=!1,I(E)},L=()=>{g=!0,window.addEventListener("pointerup",T,f),window.addEventListener("pointercancel",T,f)},R=(E)=>{if(E.pointerType==="touch")return;if(g){v=!0;return}I(E)},A=(E)=>{if(!cte(E))return;v=!1;let P=a(p,E);if(typeof P!=="function")return;k=P,p.addEventListener("pointerleave",R,f)};p.addEventListener("pointerenter",A,f),p.addEventListener("pointerdown",L,f)}),m}var x5=(t,a)=>{if(!a)return!1;else if(t===a)return!0;else return x5(t,a.parentElement)};var gf=(t)=>{if(t.pointerType==="mouse")return typeof t.button!=="number"||t.button<=0;else return t.isPrimary!==!1};var ute=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function v5(t){return ute.has(t.tagName)||t.isContentEditable===!0}var dte=new Set(["INPUT","SELECT","TEXTAREA"]);function b5(t){return dte.has(t.tagName)||t.isContentEditable===!0}var Kp=new WeakSet;function _O(t){return(a)=>{if(a.key!=="Enter")return;t(a)}}function y5(t,a){t.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}var zO=(t,a)=>{let c=t.currentTarget;if(!c)return;let u=_O(()=>{if(Kp.has(c))return;y5(c,"down");let f=_O(()=>{y5(c,"up")}),m=()=>y5(c,"cancel");c.addEventListener("keyup",f,a),c.addEventListener("blur",m,a)});c.addEventListener("keydown",u,a),c.addEventListener("blur",()=>c.removeEventListener("keydown",u),a)};function BO(t){return gf(t)&&!J1()}var FO=new WeakSet;function w5(t,a,c={}){let[u,f,m]=ew(t,c),p=(g)=>{let v=g.currentTarget;if(!BO(g))return;if(FO.has(g))return;if(Kp.add(v),c.stopPropagation)FO.add(g);let k=a(v,g),S={...f,capture:!0},I=(R,A)=>{if(window.removeEventListener("pointerup",T,S),window.removeEventListener("pointercancel",L,S),Kp.has(v))Kp.delete(v);if(!BO(R))return;if(typeof k==="function")k(R,{success:A})},T=(R)=>{I(R,v===window||v===document||c.useGlobalTarget||x5(v,R.target))},L=(R)=>{I(R,!1)};window.addEventListener("pointerup",T,S),window.addEventListener("pointercancel",L,S)};return u.forEach((g)=>{if((c.useGlobalTarget?window:g).addEventListener("pointerdown",p,f),nl(g)){if(g.addEventListener("focus",(k)=>zO(k,f)),!v5(g)&&!g.hasAttribute("tabindex"))g.tabIndex=0}}),m}var tw=new WeakMap,nw,VO=(t,a,c)=>(u,f)=>{if(f&&f[0])return f[0][t+"Size"];else if(_i(u)&&"getBBox"in u)return u.getBBox()[a];else return u[c]},fte=VO("inline","width","offsetWidth"),mte=VO("block","height","offsetHeight");function pte({target:t,borderBoxSize:a}){tw.get(t)?.forEach((c)=>{c(t,{get width(){return fte(t,a)},get height(){return mte(t,a)}})})}function hte(t){t.forEach(pte)}function gte(){if(typeof ResizeObserver>"u")return;nw=new ResizeObserver(hte)}function UO(t,a){if(!nw)gte();let c=mf(t);return c.forEach((u)=>{let f=tw.get(u);if(!f)f=new Set,tw.set(u,f);f.add(a),nw?.observe(u)}),()=>{c.forEach((u)=>{let f=tw.get(u);if(f?.delete(a),!f?.size)nw?.unobserve(u)})}}var rw=new Set,Wp;function xte(){Wp=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};rw.forEach((a)=>a(t))},window.addEventListener("resize",Wp)}function qO(t){if(rw.add(t),!Wp)xte();return()=>{if(rw.delete(t),!rw.size&&typeof Wp==="function")window.removeEventListener("resize",Wp),Wp=void 0}}function ow(t,a){return typeof t==="function"?qO(t):UO(t,a)}var xf={value:null,addProjectionMetrics:null};function HO(t){return _i(t)&&t.tagName==="svg"}function k5(...t){let a=!Array.isArray(t[0]),c=a?0:-1,u=t[0+c],f=t[1+c],m=t[2+c],p=t[3+c],g=N1(f,m,p);return a?g(u):g}var S5=(t)=>typeof t==="number"?t:parseFloat(t);var C5=()=>({translate:0,scale:1,origin:0,originPoint:0}),Cu=()=>({x:C5(),y:C5()}),I5=()=>({min:0,max:0}),Xn=()=>({x:I5(),y:I5()});var jx=new WeakMap;function fc(t){return t!==null&&typeof t==="object"&&typeof t.start==="function"}function mc(t){return typeof t==="string"||Array.isArray(t)}var aw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],T5=["initial",...aw];function Iu(t){if(fc(t.animate))return!0;for(let a=0;a<T5.length;a++)if(mc(t[T5[a]]))return!0;return!1}function Gx(t){return Boolean(Iu(t)||t.variants)}function jO(t,a,c){for(let u in a){let f=a[u],m=c[u];if(un(f))t.addValue(u,f);else if(un(m))t.addValue(u,so(f,{owner:t}));else if(m!==f)if(t.hasValue(u)){let p=t.getValue(u);if(p.liveStyle===!0)p.jump(f);else if(!p.hasAnimated)p.set(f)}else{let p=t.getStaticValue(u);t.addValue(u,so(p!==void 0?p:f,{owner:t}))}}for(let u in c)if(a[u]===void 0)t.removeValue(u);return a}var $x={current:null},iw={current:!1};var vte=typeof window<"u";function GO(){if(iw.current=!0,!vte)return;if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),a=()=>$x.current=t.matches;t.addEventListener("change",a),a()}else $x.current=!1}var $O=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],sw={};function Kx(t){sw=t}function L5(){return sw}class lw{scrapeMotionValuesFromProps(t,a,c){return{}}constructor({parent:t,props:a,presenceContext:c,reducedMotionConfig:u,skipAnimations:f,blockInitialAnimation:m,visualState:p},g={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=lf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{if(!this.current)return;this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection)},this.renderScheduledAt=0,this.scheduleRender=()=>{let T=Mn.now();if(this.renderScheduledAt<T)this.renderScheduledAt=T,zt.render(this.render,!1,!0)};let{latestValues:v,renderState:k}=p;if(this.latestValues=v,this.baseTarget={...v},this.initialValues=a.initial?{...v}:{},this.renderState=k,this.parent=t,this.props=a,this.presenceContext=c,this.depth=t?t.depth+1:0,this.reducedMotionConfig=u,this.skipAnimationsConfig=f,this.options=g,this.blockInitialAnimation=Boolean(m),this.isControllingVariants=Iu(a),this.isVariantNode=Gx(a),this.isVariantNode)this.variantChildren=new Set;this.manuallyAnimateOnMount=Boolean(t&&t.current);let{willChange:S,...I}=this.scrapeMotionValuesFromProps(a,{},this);for(let T in I){let L=I[T];if(v[T]!==void 0&&un(L))L.set(v[T])}}mount(t){if(this.hasBeenMounted)for(let a in this.initialValues)this.values.get(a)?.jump(this.initialValues[a]),this.latestValues[a]=this.initialValues[a];if(this.current=t,jx.set(t,this),this.projection&&!this.projection.instance)this.projection.mount(t);if(this.isVariantNode&&!this.isControllingVariants){let a=this;do a=a.props.inherit!==!1&&a.parent;while(a&&!a.isVariantNode);if(a){let{variantChildren:c}=a;c.add(this),this.removeFromVariantTree=()=>c.delete(this)}}if(this.values.forEach((a,c)=>this.bindToMotionValue(c,a)),this.reducedMotionConfig==="never")this.shouldReduceMotion=!1;else if(this.reducedMotionConfig==="always")this.shouldReduceMotion=!0;else{if(!iw.current)GO();this.shouldReduceMotion=$x.current}this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Oo(this.notifyUpdate),Oo(this.render),this.valueSubscriptions.forEach((t)=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let a=this.features[t];if(a)a.unmount(),a.isMounted=!1}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,a){if(this.valueSubscriptions.has(t))this.valueSubscriptions.get(t)();if(a.accelerate&&Dx.has(t)&&this.current instanceof HTMLElement){let{factory:m,keyframes:p,times:g,ease:v,duration:k}=a.accelerate,S=new Ax({element:this.current,name:t,keyframes:p,times:g,ease:v,duration:cr(k)}),I=m(S);this.valueSubscriptions.set(t,()=>{I(),S.cancel()});return}let c=Dr.has(t);if(c&&this.onBindTransform)this.onBindTransform();let u=a.on("change",(m)=>{if(this.latestValues[t]=m,this.props.onUpdate&&zt.preRender(this.notifyUpdate),c&&this.projection)this.projection.isTransformDirty=!0;this.scheduleRender()}),f;if(typeof window<"u"&&window.MotionCheckAppearSync)f=window.MotionCheckAppearSync(this,t,a);this.valueSubscriptions.set(t,()=>{if(u(),f)f()})}sortNodePosition(t){if(!this.current||!t.current||!this.sortInstanceNodePosition||this.type!==t.type)return 0;return this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in sw){let a=sw[t];if(!a)continue;let{isEnabled:c,Feature:u}=a;if(!this.features[t]&&u&&c(this.props))this.features[t]=new u(this);if(this.features[t]){let f=this.features[t];if(f.isMounted)f.update();else f.mount(),f.isMounted=!0}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Xn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,a){this.latestValues[t]=a}update(t,a){if(t.transformTemplate||this.props.transformTemplate)this.scheduleRender();this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=a;for(let c=0;c<$O.length;c++){let u=$O[c];if(this.propEventSubscriptions[u])this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u];let f="on"+u,m=t[f];if(m)this.propEventSubscriptions[u]=this.on(u,m)}if(this.prevMotionValues=jO(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue)this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(t,a){let c=this.values.get(t);if(a!==c){if(c)this.removeValue(t);this.bindToMotionValue(t,a),this.values.set(t,a);let u=a.get();if(u!==void 0)this.latestValues[t]=u}}removeValue(t){this.values.delete(t);let a=this.valueSubscriptions.get(t);if(a)a(),this.valueSubscriptions.delete(t);delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,a){if(this.props.values&&this.props.values[t])return this.props.values[t];let c=this.values.get(t);if(c===void 0&&a!==void 0)c=so(a??this.getDefaultValue?.(t),{owner:this}),this.addValue(t,c);return c}readValue(t,a){let c=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);if(c!==void 0&&c!==null){if(typeof c==="string"&&(Zd(c)||ef(c)))c=parseFloat(c);else if(typeof c!=="number"&&!Ir.test(c)&&Ir.test(a))c=Up(t,a);this.setBaseTarget(t,un(c)?c.get():c)}return un(c)?c.get():c}setBaseTarget(t,a){this.baseTarget[t]=a}on(t,a){if(!this.events[t])this.events[t]=new ic;return this.events[t].add(a)}notify(t,...a){if(this.events[t])this.events[t].notify(...a)}scheduleRenderMicrotask(){hf.render(this.render)}}class Wx extends lw{constructor(){super(...arguments);this.KeyframeResolver=_x}sortInstanceNodePosition(t,a){return t.compareDocumentPosition(a)&2?1:-1}getBaseTargetFromProps(t,a){let c=t.style;return c?c[a]:void 0}removeValueFromRenderState(t,{vars:a,style:c}){delete a[t],delete c[t]}handleChildMotionValue(){if(this.childSubscription)this.childSubscription(),delete this.childSubscription;let{children:t}=this.props;if(un(t))this.childSubscription=t.on("change",(a)=>{if(this.current)this.current.textContent=`${a}`})}}class lo{constructor(t){this.isMounted=!1,this.node=t}update(){}}function cw(t,{style:a,vars:c},u,f){let m=t.style,p;for(p in a)m[p]=a[p];f?.applyProjectionStyles(m,u);for(p in c)m.setProperty(p,c[p])}var vf={};function Xx(t,{layout:a,layoutId:c}){return Dr.has(t)||t.startsWith("origin")||(a||c!==void 0)&&(!!vf[t]||t==="opacity")}function bf(t,a,c){let u=t.style,f=a?.style,m={};if(!u)return m;for(let p in u)if(un(u[p])||f&&un(f[p])||Xx(p,t)||c?.getValue(p)?.liveStyle!==void 0)m[p]=u[p];return m}function bte(t){return window.getComputedStyle(t)}class uw extends Wx{constructor(){super(...arguments);this.type="html",this.renderInstance=cw}mount(t){Wn(Boolean(t.style),"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(t)}readValueFromInstance(t,a){if(Dr.has(a))return this.projection?.isProjecting?af(a):F1(t,a);else{let c=bte(t),u=(T1(a)?c.getPropertyValue(a):c[a])||0;return typeof u==="string"?u.trim():u}}measureInstanceViewportBox(t,{transformPagePoint:a}){return $p(t,a)}build(t,a,c){pf(t,a,c.transformTemplate)}scrapeMotionValuesFromProps(t,a,c){return bf(t,a,c)}}var dw=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var Yx=(t)=>typeof t==="string"&&t.toLowerCase()==="svg";function KO(t,a,c,u){cw(t,a,void 0,u);for(let f in a.attrs)t.setAttribute(!dw.has(f)?hs(f):f,a.attrs[f])}function Qx(t,a,c){let u=bf(t,a,c);for(let f in t)if(un(t[f])||un(a[f])){let m=Xa.indexOf(f)!==-1?"attr"+f.charAt(0).toUpperCase()+f.substring(1):f;u[m]=t[f]}return u}class fw extends Wx{constructor(){super(...arguments);this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Xn}getBaseTargetFromProps(t,a){return Dr.has(a)?super.getBaseTargetFromProps(t,a)??af(a):t[a]}getDefaultValue(t){return Dr.has(t)?this.latestValues[t]??af(t):void 0}readValueFromInstance(t,a){if(Dr.has(a)){let c=z1(a);return c?c.default||0:0}if(Fx.includes(a)){let u=getComputedStyle(t)[a];if(typeof u==="string"&&u)return u.trim()}return a=!dw.has(a)?hs(a):a,t.getAttribute(a)}scrapeMotionValuesFromProps(t,a,c){return Qx(t,a,c)}build(t,a,c){Vx(t,a,this.isSVGTag,c.transformTemplate,c.style)}renderInstance(t,a,c,u){KO(t,a,c,u)}mount(t){this.isSVGTag=Yx(t.tagName),super.mount(t)}}function R5(t,a){if(!Array.isArray(a))return!1;let c=a.length;if(c!==t.length)return!1;for(let u=0;u<c;u++)if(a[u]!==t[u])return!1;return!0}var yte=[...aw].reverse();function E5(t){let a=(g)=>Promise.all(g.map(({animation:v,options:k})=>gO(t,v,k))),c=WO(),u=!0,f=!1;function m(g){let{props:v,parent:k,manuallyAnimateOnMount:S}=t,I=u||f,T=[],L=new Set,R={},A=1/0,E=t;do E=E.props.inherit!==!1&&E.parent;while(E&&!E.isControllingVariants);if(yte.forEach((D,N)=>{let O=c[D],F=v[D],z=E&&E.props[D],B=F!==void 0?F:mc(z)||z===!1?z:void 0,U=mc(B),Y=D===g?O.isActive:null;if(Y===!1)A=N;let G=U&&F===void 0&&!(I&&S);if(O.protectedKeys={...R},!O.isActive&&Y===null||!B&&!O.prevProp||fc(B)||typeof B==="boolean")return;if(D==="exit"&&O.isActive&&Y!==!0){R={...R,...O.prevResolvedValues};return}let ce=XO(O.prevProp,B),re=ce||U&&(Y&&!G||N>A),Q=!1,ae=Array.isArray(B)?B:[B],xe={};if(Y!==!1)for(let me of ae){let{transition:Ce,transitionEnd:Be,...X}=Ya(t,me,G1(t,D))||{};xe={...xe,...X,...Be}}let{prevResolvedValues:Te}=O;for(let me in{...Te,...xe}){if(me in R)continue;let Ce=xe[me],Be=Te[me],X=Array.isArray(Ce)&&Array.isArray(Be)?!R5(Ce,Be)||ce:Ce!==Be;if(X&&(Ce===void 0||Ce===null))L.add(me);else if(X||Ce!==void 0&&L.has(me)){if(re=!0,L.delete(me))Q=!0;O.needsAnimating[me]=!0;let He=t.getValue(me);if(He)He.liveStyle=!1}else O.protectedKeys[me]=!0}if(O.prevProp=B,O.prevResolvedValues=xe,O.isActive)R={...R,...xe};if(re&&(!(G&&ce)||Q))for(let me of ae){let Ce={type:D};if(typeof me==="string"&&I&&S&&k?.enteringChildren){let Be=Ya(k,me)?.transition?.delayChildren;Ce.delay=j1(k.enteringChildren,t,Be)}T.push({animation:me,options:Ce})}}),L.size){let{initial:D}=v,N={},O=typeof D!=="boolean"&&Ya(t,Array.isArray(D)?D[0]:D,t.presenceContext?.custom);if(O&&O.transition)N.transition=O.transition;L.forEach((F)=>{let z=t.getValue(F);if(z)z.liveStyle=!0;let B=O&&!Array.isArray(D)?O[F]:void 0,U=t.getBaseTargetFromProps(v,F);N[F]=(B!==void 0?B:U!==void 0&&!un(U)?U:t.initialValues[F]===void 0?t.baseTarget[F]:void 0)??null}),T.push({animation:N})}let P=I&&t.blockInitialAnimation||u&&!S&&(v.initial===!1||v.initial===v.animate);return u=f=!1,!P&&T.length?a(T):Promise.resolve()}function p(g,v){if(c[g].isActive===v)return Promise.resolve();t.variantChildren?.forEach((S)=>S.animationState?.setActive(g,v)),c[g].isActive=v;let k=m(g);for(let S in c)c[S].protectedKeys={};return k}return{animateChanges:m,setActive:p,setAnimateFunction:(g)=>{a=g(t)},getState:()=>c,reset:()=>{c=WO(),f=!0}}}function XO(t,a){if(typeof a==="string")return a!==t;else if(Array.isArray(a))return!R5(a,t);return!1}function WO(){let t={};for(let a of aw)t[a]={isActive:a==="animate",protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return t}function mw(t,a){t.min=a.min,t.max=a.max}function Vi(t,a){mw(t.x,a.x),mw(t.y,a.y)}function P5(t,a){t.translate=a.translate,t.scale=a.scale,t.originPoint=a.originPoint,t.origin=a.origin}var YO=0.0001,wte=1-YO,kte=1+YO,QO=0.01,Ste=0-QO,Cte=0+QO;function Nr(t){return t.max-t.min}function N5(t,a,c){return Math.abs(t-a)<=c}function A5(t,a,c,u=0.5){if(t.origin=u,t.originPoint=Ut(a.min,a.max,t.origin),t.scale=Nr(c)/Nr(a),t.translate=Ut(c.min,c.max,t.origin)-t.originPoint,t.scale>=wte&&t.scale<=kte||isNaN(t.scale))t.scale=1;if(t.translate>=Ste&&t.translate<=Cte||isNaN(t.translate))t.translate=0}function yf(t,a,c,u){A5(t.x,a.x,c.x,u?u.originX:void 0),A5(t.y,a.y,c.y,u?u.originY:void 0)}function M5(t,a,c,u=0){let f=u?Ut(c.min,c.max,u):c.min;t.min=f+a.min,t.max=t.min+Nr(a)}function O5(t,a,c,u){M5(t.x,a.x,c.x,u?.x),M5(t.y,a.y,c.y,u?.y)}function D5(t,a,c,u=0){let f=u?Ut(c.min,c.max,u):c.min;t.min=a.min-f,t.max=t.min+Nr(a)}function Xp(t,a,c,u){D5(t.x,a.x,c.x,u?.x),D5(t.y,a.y,c.y,u?.y)}function ZO(t,a,c,u,f){if(t-=a,t=qx(t,1/c,u),f!==void 0)t=qx(t,1/f,u);return t}function Ite(t,a=0,c=1,u=0.5,f,m=t,p=t){if(No.test(a))a=parseFloat(a),a=Ut(p.min,p.max,a/100)-p.min;if(typeof a!=="number")return;let g=Ut(m.min,m.max,u);if(t===m)g-=a;t.min=ZO(t.min,a,c,g,f),t.max=ZO(t.max,a,c,g,f)}function JO(t,a,[c,u,f],m,p){Ite(t,a[c],a[u],a[f],a.scale,m,p)}var Tte=["x","scaleX","originX"],Lte=["y","scaleY","originY"];function _5(t,a,c,u){JO(t.x,a,Tte,c?c.x:void 0,u?u.x:void 0),JO(t.y,a,Lte,c?c.y:void 0,u?u.y:void 0)}function e_(t){return t.translate===0&&t.scale===1}function z5(t){return e_(t.x)&&e_(t.y)}function t_(t,a){return t.min===a.min&&t.max===a.max}function r_(t,a){return t_(t.x,a.x)&&t_(t.y,a.y)}function n_(t,a){return Math.round(t.min)===Math.round(a.min)&&Math.round(t.max)===Math.round(a.max)}function B5(t,a){return n_(t.x,a.x)&&n_(t.y,a.y)}function F5(t){return Nr(t.x)/Nr(t.y)}function V5(t,a){return t.translate===a.translate&&t.scale===a.scale&&t.originPoint===a.originPoint}function Za(t){return[t("x"),t("y")]}function o_(t,a){if(a.max===a.min)return 0;return t/(a.max-a.min)*100}var Yp={correct:(t,a)=>{if(!a.target)return t;if(typeof t==="string")if(ht.test(t))t=parseFloat(t);else return t;let c=o_(t,a.target.x),u=o_(t,a.target.y);return`${c}% ${u}%`}};var a_={correct:(t,{treeScale:a,projectionDelta:c})=>{let u=t,f=Ir.parse(t);if(f.length>5)return u;let m=Ir.createTransformer(t),p=typeof f[0]!=="number"?1:0,g=c.x.scale*a.x,v=c.y.scale*a.y;f[0+p]/=g,f[1+p]/=v;let k=Ut(g,v,0.5);if(typeof f[2+p]==="number")f[2+p]/=k;if(typeof f[3+p]==="number")f[3+p]/=k;return m(f)}};function i_(t,a,c){let u="",f=t.x.translate/a.x,m=t.y.translate/a.y,p=c?.z||0;if(f||m||p)u=`translate3d(${f}px, ${m}px, ${p}px) `;if(a.x!==1||a.y!==1)u+=`scale(${1/a.x}, ${1/a.y}) `;if(c){let{transformPerspective:k,rotate:S,pathRotation:I,rotateX:T,rotateY:L,skewX:R,skewY:A}=c;if(k)u=`perspective(${k}px) ${u}`;if(S)u+=`rotate(${S}deg) `;if(I)u+=`rotate(${I}deg) `;if(T)u+=`rotateX(${T}deg) `;if(L)u+=`rotateY(${L}deg) `;if(R)u+=`skewX(${R}deg) `;if(A)u+=`skewY(${A}deg) `}let g=t.x.scale*a.x,v=t.y.scale*a.y;if(g!==1||v!==1)u+=`scale(${g}, ${v})`;return u||"none"}var Rte=zx.length,s_=(t)=>typeof t==="number"||ht.test(t);function c_(t,a,c,u,f,m){if(f)t.opacity=Ut(0,c.opacity??1,Ete(u)),t.opacityExit=Ut(a.opacity??1,0,Pte(u));else if(m)t.opacity=Ut(a.opacity??1,c.opacity??1,u);for(let p=0;p<Rte;p++){let g=zx[p],v=l_(a,g),k=l_(c,g);if(v===void 0&&k===void 0)continue;if(v||(v=0),k||(k=0),v===0||k===0||s_(v)===s_(k)){if(t[g]=Math.max(Ut(S5(v),S5(k),u),0),No.test(k)||No.test(v))t[g]+="%"}else t[g]=k}if(a.rotate||c.rotate)t.rotate=Ut(a.rotate||0,c.rotate||0,u)}function l_(t,a){return t[a]!==void 0?t[a]:t.borderRadius}var Ete=u_(0,0.5,px),Pte=u_(0.5,0.95,Cr);function u_(t,a,c){return(u)=>{if(u<t)return 0;if(u>a)return 1;return c(Ei(t,a,u))}}function Zx(t,a,c){let u=un(t)?t:so(t);return u.start(uc("",u,a,c)),u.animation}function rl(t,a,c,u={passive:!0}){return t.addEventListener(a,c,u),()=>t.removeEventListener(a,c,u)}var d_=(t,a)=>t.depth-a.depth;class U5{constructor(){this.children=[],this.isDirty=!1}add(t){Qd(this.children,t),this.isDirty=!0}remove(t){Ea(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(d_),this.isDirty=!1,this.children.forEach(t)}}function f_(t,a){let c=Mn.now(),u=({timestamp:f})=>{let m=f-c;if(m>=a)Oo(u),t(m-a)};return zt.setup(u,!0),()=>Oo(u)}function wf(t){return un(t)?t.get():t}class q5{constructor(){this.members=[]}add(t){Qd(this.members,t);for(let a=this.members.length-1;a>=0;a--){let c=this.members[a];if(c===t||c===this.lead||c===this.prevLead)continue;let u=c.instance;if((!u||u.isConnected===!1)&&!c.snapshot)Ea(this.members,c),c.unmount()}t.scheduleRender()}remove(t){if(Ea(this.members,t),t===this.prevLead)this.prevLead=void 0;if(t===this.lead){let a=this.members[this.members.length-1];if(a)this.promote(a)}}relegate(t){for(let a=this.members.indexOf(t)-1;a>=0;a--){let c=this.members[a];if(c.isPresent!==!1&&c.instance?.isConnected!==!1)return this.promote(c),!0}return!1}promote(t,a){let c=this.lead;if(t===c)return;if(this.prevLead=c,this.lead=t,t.show(),c){c.updateSnapshot(),t.scheduleRender();let{layoutDependency:u}=c.options,{layoutDependency:f}=t.options;if(u===void 0||u!==f){if(t.resumeFrom=c,a)c.preserveOpacity=!0;if(c.snapshot)t.snapshot=c.snapshot,t.snapshot.latestValues=c.animationValues||c.latestValues;if(t.root?.isUpdating)t.isLayoutDirty=!0}if(t.options.crossfade===!1)c.hide()}}exitAnimationComplete(){this.members.forEach((t)=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach((t)=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){if(this.lead?.snapshot)this.lead.snapshot=void 0}}var m_={borderRadius:{...Yp,applyTo:[...zx]},borderTopLeftRadius:Yp,borderTopRightRadius:Yp,borderBottomLeftRadius:Yp,borderBottomRightRadius:Yp,boxShadow:a_};var kf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(vf,{...m_,...vf});var Sf={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},H5=["","X","Y","Z"],Ate=1000,Mte=0;function j5(t,a,c,u){let{latestValues:f}=a;if(f[t]){if(c[t]=f[t],a.setStaticValue(t,0),u)u[t]=0}}function k_(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:a}=t.options;if(!a)return;let c=$1(a);if(window.MotionHasOptimisedAnimation(c,"transform")){let{layout:f,layoutId:m}=t.options;window.MotionCancelOptimisedAnimation(c,"transform",zt,!(f||m))}let{parent:u}=t;if(u&&!u.hasCheckedOptimisedAppear)k_(u)}function pw({attachResizeListener:t,defaultParent:a,measureScroll:c,checkIsScrollRoot:u,resetTransform:f}){return class{constructor(p={},g=a?.()){this.id=Mte++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{if(this.isUpdating)this.isUpdating=!1,this.clearAllSnapshots()},this.updateProjection=()=>{if(this.projectionUpdateScheduled=!1,xf.value)Sf.nodes=Sf.calculatedTargetDeltas=Sf.calculatedProjections=0;if(this.nodes.forEach(Ote),this.nodes.forEach(qte),this.nodes.forEach(Hte),this.nodes.forEach(_te),xf.addProjectionMetrics)xf.addProjectionMetrics(Sf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=p,this.root=g?g.root||g:this,this.path=g?[...g.path,g]:[],this.parent=g,this.depth=g?g.depth+1:0;for(let v=0;v<this.path.length;v++)this.path[v].shouldResetTransform=!0;if(this.root===this)this.nodes=new U5}addEventListener(p,g){if(!this.eventHandlers.has(p))this.eventHandlers.set(p,new ic);return this.eventHandlers.get(p).add(g)}notifyListeners(p,...g){let v=this.eventHandlers.get(p);v&&v.notify(...g)}hasListeners(p){return this.eventHandlers.has(p)}mount(p){if(this.instance)return;this.isSVG=_i(p)&&!HO(p),this.instance=p;let{layoutId:g,layout:v,visualElement:k}=this.options;if(k&&!k.current)k.mount(p);if(this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(v||g))this.isLayoutDirty=!0;if(t){let S,I=0,T=()=>this.root.updateBlockedByResize=!1;zt.read(()=>{I=window.innerWidth}),t(p,()=>{let L=window.innerWidth;if(L===I)return;if(I=L,this.root.updateBlockedByResize=!0,S&&S(),S=f_(T,250),kf.hasAnimatedSinceResize)kf.hasAnimatedSinceResize=!1,this.nodes.forEach(g_)})}if(g)this.root.registerSharedNode(g,this);if(this.options.animate!==!1&&k&&(g||v))this.addEventListener("didUpdate",({delta:S,hasLayoutChanged:I,hasRelativeLayoutChanged:T,layout:L})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let R=this.options.transition||k.getDefaultTransition()||Wte,{onLayoutAnimationStart:A,onLayoutAnimationComplete:E}=k.getProps(),P=!this.targetLayout||!B5(this.targetLayout,L),D=!I&&T;if(this.options.layoutRoot||this.resumeFrom||D||I&&(P||!this.currentAnimation)){if(this.resumeFrom)this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0;let N={...qp(R,"layout"),onPlay:A,onComplete:E};if(k.shouldReduceMotion||this.options.layoutRoot)N.delay=0,N.type=!1;this.startAnimation(N),this.setAnimationOrigin(S,D,N.path)}else{if(!I)g_(this);if(this.isLead()&&this.options.onExitComplete)this.options.onExitComplete()}this.targetLayout=L})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let p=this.getStack();p&&p.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Oo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){if(this.isUpdateBlocked())return;this.isUpdating=!0,this.nodes&&this.nodes.forEach(jte),this.animationId++}getTransformTemplate(){let{visualElement:p}=this.options;return p&&p.getProps().transformTemplate}willUpdate(p=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear)k_(this);if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let S=0;S<this.path.length;S++){let I=this.path[S];if(I.shouldResetTransform=!0,typeof I.latestValues.x==="string"||typeof I.latestValues.y==="string")I.isLayoutDirty=!0;if(I.updateScroll("snapshot"),I.options.layoutRoot)I.willUpdate(!1)}let{layoutId:g,layout:v}=this.options;if(g===void 0&&!v)return;let k=this.getTransformTemplate();this.prevTransformTemplateValue=k?k(this.latestValues,""):void 0,this.updateSnapshot(),p&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let v=this.updateBlockedByResize;if(this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),v)this.nodes.forEach(Bte);this.nodes.forEach(p_);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(h_);return}if(this.animationCommitId=this.animationId,!this.isUpdating)this.nodes.forEach(h_);else this.isUpdating=!1,this.nodes.forEach(Fte),this.nodes.forEach(Vte),this.nodes.forEach(Ute),this.nodes.forEach(Dte),this.nodes.forEach(Nte);this.clearAllSnapshots();let g=Mn.now();Gn.delta=Qr(0,16.666666666666668,g-Gn.timestamp),Gn.timestamp=g,Gn.isProcessing=!0,Sx.update.process(Gn),Sx.preRender.process(Gn),Sx.render.process(Gn),Gn.isProcessing=!1}didUpdate(){if(!this.updateScheduled)this.updateScheduled=!0,hf.read(this.scheduleUpdate)}clearAllSnapshots(){this.nodes.forEach(zte),this.sharedNodes.forEach(Gte)}scheduleUpdateProjection(){if(!this.projectionUpdateScheduled)this.projectionUpdateScheduled=!0,zt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){zt.postRender(()=>{if(this.isLayoutDirty)this.root.didUpdate();else this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;if(this.snapshot=this.measure(),this.snapshot&&!Nr(this.snapshot.measuredBox.x)&&!Nr(this.snapshot.measuredBox.y))this.snapshot=void 0}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty)return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let v=0;v<this.path.length;v++)this.path[v].updateScroll();let p=this.layout;if(this.layout=this.measure(!1),!this.layoutCorrected)this.layoutCorrected=Xn();this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:g}=this.options;g&&g.notify("LayoutMeasure",this.layout.layoutBox,p?p.layoutBox:void 0)}updateScroll(p="measure"){let g=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===p)g=!1;if(g&&this.instance){let v=u(this.instance);this.scroll={animationId:this.root.animationId,phase:p,isRoot:v,offset:c(this.instance),wasRoot:this.scroll?this.scroll.isRoot:v}}}resetTransform(){if(!f)return;let p=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,g=this.projectionDelta&&!z5(this.projectionDelta),v=this.getTransformTemplate(),k=v?v(this.latestValues,""):void 0,S=k!==this.prevTransformTemplateValue;if(p&&this.instance&&(g||dc(this.latestValues)||S))f(this.instance,k),this.shouldResetTransform=!1,this.scheduleRender()}measure(p=!0){let g=this.measurePageBox(),v=this.removeElementScroll(g);if(p)v=this.removeTransform(v);return Xte(v),{animationId:this.root.animationId,measuredBox:g,layoutBox:v,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:p}=this.options;if(!p)return Xn();let g=p.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Yte))){let{scroll:k}=this.root;if(k)zi(g.x,k.offset.x),zi(g.y,k.offset.y)}return g}removeElementScroll(p){let g=Xn();if(Vi(g,p),this.scroll?.wasRoot)return g;for(let v=0;v<this.path.length;v++){let k=this.path[v],{scroll:S,options:I}=k;if(k!==this.root&&S&&I.layoutScroll){if(S.wasRoot)Vi(g,p);zi(g.x,S.offset.x),zi(g.y,S.offset.y)}}return g}applyTransform(p,g=!1,v){let k=v||Xn();Vi(k,p);for(let S=0;S<this.path.length;S++){let I=this.path[S];if(!g&&I.options.layoutScroll&&I.scroll&&I!==I.root)zi(k.x,-I.scroll.offset.x),zi(k.y,-I.scroll.offset.y);if(!dc(I.latestValues))continue;Hx(k,I.latestValues,I.layout?.layoutBox)}if(dc(this.latestValues))Hx(k,this.latestValues,this.layout?.layoutBox);return k}removeTransform(p){let g=Xn();Vi(g,p);for(let v=0;v<this.path.length;v++){let k=this.path[v];if(!dc(k.latestValues))continue;let S;if(k.instance)Z1(k.latestValues)&&k.updateSnapshot(),S=Xn(),Vi(S,k.measurePageBox());_5(g,k.latestValues,k.snapshot?.layoutBox,S)}if(dc(this.latestValues))_5(g,this.latestValues);return g}setTargetDelta(p){this.targetDelta=p,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(p){this.options={...this.options,...p,crossfade:p.crossfade!==void 0?p.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){if(!this.relativeParent)return;if(this.relativeParent.resolvedRelativeTargetAt!==Gn.timestamp)this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(p=!1){let g=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=g.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=g.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=g.isSharedProjectionDirty);let v=Boolean(this.resumingFrom)||this!==g;if(!(p||v&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:S,layoutId:I}=this.options;if(!this.layout||!(S||I))return;this.resolvedRelativeTargetAt=Gn.timestamp;let T=this.getClosestProjectingParent();if(!this.targetDelta&&!this.relativeTarget)if(this.options.layoutAnchor!==!1&&T&&T.layout)this.createRelativeTarget(T,this.layout.layoutBox,T.layout.layoutBox);else this.removeRelativeTarget();if(!this.relativeTarget&&!this.targetDelta)return;if(!this.target)this.target=Xn(),this.targetWithTransforms=Xn();if(this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target)this.forceRelativeParentToResolveTarget(),O5(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0);else if(this.targetDelta){if(Boolean(this.resumingFrom))this.applyTransform(this.layout.layoutBox,!1,this.target);else Vi(this.target,this.layout.layoutBox);d5(this.target,this.targetDelta)}else Vi(this.target,this.layout.layoutBox);if(this.attemptToResolveRelativeTarget)if(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&T&&Boolean(T.resumingFrom)===Boolean(this.resumingFrom)&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1)this.createRelativeTarget(T,this.target,T.target);else this.relativeParent=this.relativeTarget=void 0;if(xf.value)Sf.calculatedTargetDeltas++}getClosestProjectingParent(){if(!this.parent||Z1(this.parent.latestValues)||c5(this.parent.latestValues))return;if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(p,g,v){this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Xn(),this.relativeTargetOrigin=Xn(),Xp(this.relativeTargetOrigin,g,v,this.options.layoutAnchor||void 0),Vi(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let p=this.getLead(),g=Boolean(this.resumingFrom)||this!==p,v=!0;if(this.isProjectionDirty||this.parent?.isProjectionDirty)v=!1;if(g&&(this.isSharedProjectionDirty||this.isTransformDirty))v=!1;if(this.resolvedRelativeTargetAt===Gn.timestamp)v=!1;if(v)return;let{layout:k,layoutId:S}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),!this.isTreeAnimating)this.targetDelta=this.relativeTarget=void 0;if(!this.layout||!(k||S))return;Vi(this.layoutCorrected,this.layout.layoutBox);let I=this.treeScale.x,T=this.treeScale.y;if(NO(this.layoutCorrected,this.treeScale,this.path,g),p.layout&&!p.target&&(this.treeScale.x!==1||this.treeScale.y!==1))p.target=p.layout.layoutBox,p.targetWithTransforms=Xn();let{target:L}=p;if(!L){if(this.prevProjectionDelta)this.createProjectionDeltas(),this.scheduleRender();return}if(!this.projectionDelta||!this.prevProjectionDelta)this.createProjectionDeltas();else P5(this.prevProjectionDelta.x,this.projectionDelta.x),P5(this.prevProjectionDelta.y,this.projectionDelta.y);if(yf(this.projectionDelta,this.layoutCorrected,L,this.latestValues),this.treeScale.x!==I||this.treeScale.y!==T||!V5(this.projectionDelta.x,this.prevProjectionDelta.x)||!V5(this.projectionDelta.y,this.prevProjectionDelta.y))this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",L);if(xf.value)Sf.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(p=!0){if(this.options.visualElement?.scheduleRender(),p){let g=this.getStack();g&&g.scheduleRender()}if(this.resumingFrom&&!this.resumingFrom.instance)this.resumingFrom=void 0}createProjectionDeltas(){this.prevProjectionDelta=Cu(),this.projectionDelta=Cu(),this.projectionDeltaWithTransform=Cu()}setAnimationOrigin(p,g=!1,v){let k=this.snapshot,S=k?k.latestValues:{},I={...this.latestValues},T=Cu();if(!this.relativeParent||!this.relativeParent.options.layoutRoot)this.relativeTarget=this.relativeTargetOrigin=void 0;this.attemptToResolveRelativeTarget=!g;let L=Xn(),R=k?k.source:void 0,A=this.layout?this.layout.source:void 0,E=R!==A,P=this.getStack(),D=!P||P.members.length<=1,N=Boolean(E&&!D&&this.options.crossfade===!0&&!this.path.some(Kte));this.animationProgress=0;let O,F=v?.interpolateProjection(p);this.mixTargetDelta=(z)=>{let B=z/1000,U=F?.(B);if(U)T.x.translate=U.x,T.x.scale=Ut(p.x.scale,1,B),T.x.origin=p.x.origin,T.x.originPoint=p.x.originPoint,T.y.translate=U.y,T.y.scale=Ut(p.y.scale,1,B),T.y.origin=p.y.origin,T.y.originPoint=p.y.originPoint;else x_(T.x,p.x,B),x_(T.y,p.y,B);if(this.setTargetDelta(T),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){if(Xp(L,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),$te(this.relativeTarget,this.relativeTargetOrigin,L,B),O&&r_(this.relativeTarget,O))this.isProjectionDirty=!1;if(!O)O=Xn();Vi(O,this.relativeTarget)}if(E)this.animationValues=I,c_(I,S,this.latestValues,B,N,D);if(U&&U.rotate!==void 0){if(!this.animationValues)this.animationValues=I;this.animationValues.pathRotation=U.rotate}this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},this.mixTargetDelta(this.options.layoutRoot?1000:0)}startAnimation(p){if(this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation)Oo(this.pendingAnimation),this.pendingAnimation=void 0;this.pendingAnimation=zt.update(()=>{if(kf.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=so(0)),this.motionValue.jump(0,!1),this.currentAnimation=Zx(this.motionValue,[0,1000],{...p,velocity:0,isSync:!0,onUpdate:(g)=>{this.mixTargetDelta(g),p.onUpdate&&p.onUpdate(g)},onComplete:()=>{p.onComplete&&p.onComplete(),this.completeAnimation()}}),U8(this.currentAnimation,this),this.resumingFrom)this.resumingFrom.currentAnimation=this.currentAnimation;this.pendingAnimation=void 0})}completeAnimation(){if(this.resumingFrom)this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0;let p=this.getStack();p&&p.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){if(this.currentAnimation)this.mixTargetDelta&&this.mixTargetDelta(Ate),this.currentAnimation.stop();this.completeAnimation()}applyTransformsToTarget(){let p=this.getLead(),{targetWithTransforms:g,layout:v,latestValues:k}=p,{target:S}=p;if(!g||!S||!v)return;if(this!==p&&this.layout&&v&&S_(this.options.animationType,this.layout.layoutBox,v.layoutBox)){S=this.target||Xn();let I=Nr(this.layout.layoutBox.x);S.x.min=p.target.x.min,S.x.max=S.x.min+I;let T=Nr(this.layout.layoutBox.y);S.y.min=p.target.y.min,S.y.max=S.y.min+T}Vi(g,S),Hx(g,k),yf(this.projectionDeltaWithTransform,this.layoutCorrected,g,k)}registerSharedNode(p,g){if(!this.sharedNodes.has(p))this.sharedNodes.set(p,new q5);this.sharedNodes.get(p).add(g);let k=g.options.initialPromotionConfig;g.promote({transition:k?k.transition:void 0,preserveFollowOpacity:k&&k.shouldPreserveFollowOpacity?k.shouldPreserveFollowOpacity(g):void 0})}isLead(){let p=this.getStack();return p?p.lead===this:!0}getLead(){let{layoutId:p}=this.options;return p?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:p}=this.options;return p?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:p}=this.options;if(p)return this.root.sharedNodes.get(p)}promote({needsReset:p,transition:g,preserveFollowOpacity:v}={}){let k=this.getStack();if(k)k.promote(this,v);if(p)this.projectionDelta=void 0,this.needsReset=!0;if(g)this.setOptions({transition:g})}relegate(){let p=this.getStack();if(p)return p.relegate(this);else return!1}resetSkewAndRotation(){let{visualElement:p}=this.options;if(!p)return;let g=!1,{latestValues:v}=p;if(v.z||v.rotate||v.rotateX||v.rotateY||v.rotateZ||v.skewX||v.skewY)g=!0;if(!g)return;let k={};if(v.z)j5("z",p,k,this.animationValues);for(let S=0;S<H5.length;S++)j5(`rotate${H5[S]}`,p,k,this.animationValues),j5(`skew${H5[S]}`,p,k,this.animationValues);p.render();for(let S in k)if(p.setStaticValue(S,k[S]),this.animationValues)this.animationValues[S]=k[S];p.scheduleRender()}applyProjectionStyles(p,g){if(!this.instance||this.isSVG)return;if(!this.isVisible){p.visibility="hidden";return}let v=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,p.visibility="",p.opacity="",p.pointerEvents=wf(g?.pointerEvents)||"",p.transform=v?v(this.latestValues,""):"none";return}let k=this.getLead();if(!this.projectionDelta||!this.layout||!k.target){if(this.options.layoutId)p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=wf(g?.pointerEvents)||"";if(this.hasProjected&&!dc(this.latestValues))p.transform=v?v({},""):"none",this.hasProjected=!1;return}p.visibility="";let S=k.animationValues||k.latestValues;this.applyTransformsToTarget();let I=i_(this.projectionDeltaWithTransform,this.treeScale,S);if(v)I=v(S,I);p.transform=I;let{x:T,y:L}=this.projectionDelta;if(p.transformOrigin=`${T.origin*100}% ${L.origin*100}% 0`,k.animationValues)p.opacity=k===this?S.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:S.opacityExit;else p.opacity=k===this?S.opacity!==void 0?S.opacity:"":S.opacityExit!==void 0?S.opacityExit:0;for(let R in vf){if(S[R]===void 0)continue;let{correct:A,applyTo:E,isCSSVariable:P}=vf[R],D=I==="none"?S[R]:A(S[R],k);if(E){let N=E.length;for(let O=0;O<N;O++)p[E[O]]=D}else if(P)this.options.visualElement.renderState.vars[R]=D;else p[R]=D}if(this.options.layoutId)p.pointerEvents=k===this?wf(g?.pointerEvents)||"":"none"}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((p)=>p.currentAnimation?.stop()),this.root.nodes.forEach(p_),this.root.sharedNodes.clear()}}}function Dte(t){t.updateLayout()}function Nte(t){let a=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&a&&t.hasListeners("didUpdate")){let{layoutBox:c,measuredBox:u}=t.layout,{animationType:f}=t.options,m=a.source!==t.layout.source;if(f==="size")Za((S)=>{let I=m?a.measuredBox[S]:a.layoutBox[S],T=Nr(I);I.min=c[S].min,I.max=I.min+T});else if(f==="x"||f==="y"){let S=f==="x"?"y":"x";mw(m?a.measuredBox[S]:a.layoutBox[S],c[S])}else if(S_(f,a.layoutBox,c))Za((S)=>{let I=m?a.measuredBox[S]:a.layoutBox[S],T=Nr(c[S]);if(I.max=I.min+T,t.relativeTarget&&!t.currentAnimation)t.isProjectionDirty=!0,t.relativeTarget[S].max=t.relativeTarget[S].min+T});let p=Cu();yf(p,c,a.layoutBox);let g=Cu();if(m)yf(g,t.applyTransform(u,!0),a.measuredBox);else yf(g,c,a.layoutBox);let v=!z5(p),k=!1;if(!t.resumeFrom){let S=t.getClosestProjectingParent();if(S&&!S.resumeFrom){let{snapshot:I,layout:T}=S;if(I&&T){let L=t.options.layoutAnchor||void 0,R=Xn();Xp(R,a.layoutBox,I.layoutBox,L);let A=Xn();if(Xp(A,c,T.layoutBox,L),!B5(R,A))k=!0;if(S.options.layoutRoot)t.relativeTarget=A,t.relativeTargetOrigin=R,t.relativeParent=S}}}t.notifyListeners("didUpdate",{layout:c,snapshot:a,delta:g,layoutDelta:p,hasLayoutChanged:v,hasRelativeLayoutChanged:k})}else if(t.isLead()){let{onExitComplete:c}=t.options;c&&c()}t.options.transition=void 0}function Ote(t){if(xf.value)Sf.nodes++;if(!t.parent)return;if(!t.isProjecting())t.isProjectionDirty=t.parent.isProjectionDirty;t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty)}function _te(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function zte(t){t.clearSnapshot()}function p_(t){t.clearMeasurements()}function Bte(t){t.isLayoutDirty=!0,t.updateLayout()}function h_(t){t.isLayoutDirty=!1}function Fte(t){if(t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty)t.snapshot=t.layout,t.isLayoutDirty=!0}function Vte(t){if(t.relativeTarget&&t.relativeParent?.isLayoutDirty)if(t.currentAnimation)t.isLayoutDirty=!0;else t.targetDelta=void 0,t.removeRelativeTarget()}function Ute(t){let{visualElement:a}=t.options;if(a&&a.getProps().onBeforeLayoutMeasure)a.notify("BeforeLayoutMeasure");t.resetTransform()}function g_(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function qte(t){t.resolveTargetDelta()}function Hte(t){t.calcProjection()}function jte(t){t.resetSkewAndRotation()}function Gte(t){t.removeLeadSnapshot()}function x_(t,a,c){t.translate=Ut(a.translate,0,c),t.scale=Ut(a.scale,1,c),t.origin=a.origin,t.originPoint=a.originPoint}function v_(t,a,c,u){t.min=Ut(a.min,c.min,u),t.max=Ut(a.max,c.max,u)}function $te(t,a,c,u){v_(t.x,a.x,c.x,u),v_(t.y,a.y,c.y,u)}function Kte(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var Wte={duration:0.45,ease:[0.4,0,0.1,1]},b_=(t)=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),y_=b_("applewebkit/")&&!b_("chrome/")?Math.round:Cr;function w_(t){t.min=y_(t.min),t.max=y_(t.max)}function Xte(t){w_(t.x),w_(t.y)}function S_(t,a,c){return t==="position"||t==="preserve-aspect"&&!N5(F5(a),F5(c),0.2)}function Yte(t){return t!==t.root&&t.scroll?.wasRoot}var C_=pw({attachResizeListener:(t,a)=>rl(t,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0});var hw={current:void 0},Jx=pw({measureScroll:(t)=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!hw.current){let t=new C_({});t.mount(window),t.setOptions({layoutScroll:!0}),hw.current=t}return hw.current},resetTransform:(t,a)=>{t.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:(t)=>Boolean(window.getComputedStyle(t).position==="fixed")});var gs=jt({transformPagePoint:(t)=>t,isStatic:!1,reducedMotion:"never"});function I_(t,a){if(typeof t==="function")return t(a);else if(t!==null&&t!==void 0)t.current=a}function Qte(...t){return(a)=>{let c=!1,u=t.map((f)=>{let m=I_(f,a);if(!c&&typeof m==="function")c=!0;return m});if(c)return()=>{for(let f=0;f<u.length;f++){let m=u[f];if(typeof m==="function")m();else I_(t[f],null)}}}}function T_(...t){return y(Qte(...t),t)}class L_ extends Vc{getSnapshotBeforeUpdate(t){let a=this.props.childRef.current;if(nl(a)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let c=a.offsetParent,u=nl(c)?c.offsetWidth||0:0,f=nl(c)?c.offsetHeight||0:0,m=getComputedStyle(a),p=this.props.sizeRef.current;p.height=parseFloat(m.height),p.width=parseFloat(m.width),p.top=a.offsetTop,p.left=a.offsetLeft,p.right=u-p.width-p.left,p.bottom=f-p.height-p.top,p.direction=m.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function R_({children:t,isPresent:a,anchorX:c,anchorY:u,root:f,pop:m}){let p=ee(),g=i(null),v=i({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:k}=M(gs),S=m!==!1?t.props?.ref??t?.ref:void 0,I=T_(g,S);return Uc(()=>{let{width:T,height:L,top:R,left:A,right:E,bottom:P,direction:D}=v.current;if(a||m===!1||!g.current||!T||!L)return;let N=D==="rtl",O=c==="left"?N?`right: ${E}`:`left: ${A}`:N?`left: ${A}`:`right: ${E}`,F=u==="bottom"?`bottom: ${P}`:`top: ${R}`;g.current.dataset.motionPopId=p;let z=document.createElement("style");if(k)z.nonce=k;let B=f??document.head;if(B.appendChild(z),z.sheet)z.sheet.insertRule(`
12
+ [data-motion-pop-id="${p}"] {
13
+ position: absolute !important;
14
+ width: ${T}px !important;
15
+ height: ${L}px !important;
16
+ ${O}px !important;
17
+ ${F}px !important;
18
+ }
19
+ `);return()=>{if(g.current?.removeAttribute("data-motion-pop-id"),B.contains(z))B.removeChild(z)}},[a]),e(L_,{isPresent:a,childRef:g,sizeRef:v,pop:m,children:m===!1?t:wa(t,{ref:I})})}var E_=({children:t,initial:a,isPresent:c,onExitComplete:u,custom:f,presenceAffectsLayout:m,mode:p,anchorX:g,anchorY:v,root:k})=>{let S=Mr(Zte),I=ee(),T=i(c),L=i(u);Zs(()=>{T.current=c,L.current=u});let R=!0,A=w(()=>(R=!1,{id:I,initial:a,isPresent:c,custom:f,onExitComplete:(E)=>{S.set(E,!0);for(let P of S.values())if(!P)return;u&&u()},register:(E)=>(S.set(E,!1),()=>{S.delete(E),!T.current&&!S.size&&L.current?.()})}),[c,S,u]);if(m&&R)A={...A};return w(()=>{S.forEach((E,P)=>S.set(P,!1))},[c]),o(()=>{!c&&!S.size&&u&&u()},[c]),t=e(R_,{pop:p==="popLayout",isPresent:c,anchorX:g,anchorY:v,root:k,children:t}),e(ac.Provider,{value:A,children:t})};function Zte(){return new Map}function e0(t=!0){let a=M(ac);if(a===null)return[!0,null];let{isPresent:c,onExitComplete:u,register:f}=a,m=ee();o(()=>{if(t)return f(m)},[t]);let p=y(()=>t&&u&&u(m),[m,u,t]);return!c&&u?[!1,p]:[!0]}function t0(){return Jte(M(ac))}function Jte(t){return t===null?!0:t.isPresent}var Qp=(t)=>t.key||"";function G5(t){let a=[];return Uo.forEach(t,(c)=>{if(eo(c))a.push(c)}),a}var de=({children:t,custom:a,initial:c=!0,onExitComplete:u,presenceAffectsLayout:f=!0,mode:m="sync",propagate:p=!1,anchorX:g="left",anchorY:v="top",root:k})=>{let[S,I]=e0(p),T=w(()=>G5(t),[t]),L=p&&!S?[]:T.map(Qp),R=i(!0),A=Mr(()=>new Map),E=i(new Set),[P,D]=r(T),[N,O]=r(T);Zs(()=>{if(p&&!S&&!N.length)I?.()},[S,p,N.length,I]),Zs(()=>{R.current=!1;for(let B=0;B<N.length;B++){let U=Qp(N[B]);if(!L.includes(U)){if(A.get(U)!==!0)A.set(U,!1)}else A.delete(U),E.current.delete(U)}},[N,L.length,L.join("-")]);let F=[];if(T!==P){let B=[...T],U=0;for(let Y of N){let G=L.indexOf(Qp(Y));if(G===-1)B.splice(U++,0,Y),F.push(Y);else U=G+F.length+1}if(F.every((Y)=>A.get(Qp(Y))))B=T;else if(m==="wait")B=F;return O(G5(B)),D(T),null}let{forceRender:z}=M(Ap);return e(h,{children:N.map((B)=>{let U=Qp(B),Y=p&&!S?!1:T===N||L.includes(U),G=()=>{if(E.current.has(U))return;if(A.has(U))E.current.add(U),A.set(U,!0);else return;let ce=!0;if(A.forEach((re)=>{if(!re)ce=!1}),ce)z?.(),D([]),p&&I?.(),u&&u()};return e(E_,{isPresent:Y,initial:!R.current||c?void 0:!1,custom:a,presenceAffectsLayout:f,mode:m,root:k,onExitComplete:Y?void 0:G,anchorX:g,anchorY:v,children:B},U)})})};var gw=jt({strict:!1});var P_={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},A_=!1;function ene(){if(A_)return;let t={};for(let a in P_)t[a]={isEnabled:(c)=>P_[a].some((u)=>!!c[u])};Kx(t),A_=!0}function xw(){return ene(),L5()}function M_(t){let a=xw();for(let c in t)a[c]={...a[c],...t[c]};Kx(a)}function $5({children:t,...a}){let c=M(gs);a={...c,...a},a.transition=ff(a.transition,c.transition),a.isStatic=Mr(()=>a.isStatic);let u=w(()=>a,[JSON.stringify(a.transition),a.transformPagePoint,a.reducedMotion,a.skipAnimations,a.isValidProp]);return e(gs.Provider,{value:u,children:t})}var Tu=jt({});function D_(t,a){if(Iu(t)){let{initial:c,animate:u}=t;return{initial:c===!1||mc(c)?c:void 0,animate:mc(u)?u:void 0}}return t.inherit!==!1?a:{}}function O_(t){let{initial:a,animate:c}=D_(t,M(Tu));return w(()=>({initial:a,animate:c}),[N_(a),N_(c)])}function N_(t){return Array.isArray(t)?t.join(" "):t}var Zp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function K5(t,a,c){for(let u in a)if(!un(a[u])&&!Xx(u,c))t[u]=a[u]}function tne({transformTemplate:t},a){return w(()=>{let c=Zp();return pf(c,a,t),Object.assign({},c.vars,c.style)},[a])}function nne(t,a){let c=t.style||{},u={};return K5(u,c,t),Object.assign(u,tne(t,a)),u}function __(t,a){let c={},u=nne(t,a);if(t.drag&&t.dragListener!==!1)c.draggable=!1,u.userSelect=u.WebkitUserSelect=u.WebkitTouchCallout="none",u.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`;if(t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap))c.tabIndex=0;return c.style=u,c}var vw=()=>({...Zp(),attrs:{}});function z_(t,a,c,u){let f=w(()=>{let m=vw();return Vx(m,a,Yx(u),t.transformTemplate,t.style),{...m.attrs,style:{...m.style}}},[a]);if(t.style){let m={};K5(m,t.style,t),f.style={...m,...f.style}}return f}var rne=new Set(["animate","exit","variants","initial","style","values","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function n0(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||rne.has(t)}function one(t,a){return t.startsWith("on")?!n0(t):a?.(t)??!n0(t)}function B_(t,a,c,u){let f={};for(let m in t){if(m==="values"&&typeof t.values==="object")continue;if(un(t[m]))continue;if(one(m,u)||c===!0&&n0(m)||!a&&!n0(m)||t.draggable&&m.startsWith("onDrag"))f[m]=t[m]}return f}var F_=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Jp(t){if(typeof t!=="string"||t.includes("-"))return!1;else if(F_.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}function V_(t,a,c,{latestValues:u},f,m=!1,p,g){let k=(p??Jp(t)?z_:__)(a,u,f,t),S=B_(a,typeof t==="string",m,g),I=t!==Xe?{...S,...k,ref:c}:{},{children:T}=a,L=w(()=>un(T)?T.get():T,[T]);return ct(t,{...I,children:L})}function ane({scrapeMotionValuesFromProps:t,createRenderState:a},c,u,f){return{latestValues:ine(c,u,f,t),renderState:a()}}function ine(t,a,c,u){let f={},m=u(t,{});for(let T in m)f[T]=wf(m[T]);let{initial:p,animate:g}=t,v=Iu(t),k=Gx(t);if(a&&k&&!v&&t.inherit!==!1){if(p===void 0)p=a.initial;if(g===void 0)g=a.animate}let S=c?c.initial===!1:!1;S=S||p===!1;let I=S?g:p;if(I&&typeof I!=="boolean"&&!fc(I)){let T=Array.isArray(I)?I:[I];for(let L=0;L<T.length;L++){let R=Nx(t,T[L]);if(R){let{transitionEnd:A,transition:E,...P}=R;for(let D in P){let N=P[D];if(Array.isArray(N)){let O=S?N.length-1:0;N=N[O]}if(N!==null)f[D]=N}for(let D in A)f[D]=A[D]}}}return f}var bw=(t)=>(a,c)=>{let u=M(Tu),f=M(ac),m=()=>ane(t,a,u,f);return c?m():Mr(m)};var U_=bw({scrapeMotionValuesFromProps:bf,createRenderState:Zp});var q_=bw({scrapeMotionValuesFromProps:Qx,createRenderState:vw});var H_=Symbol.for("motionComponentSymbol");function j_(t,a,c){let u=i(c);Uc(()=>{u.current=c});let f=i(null);return y((m)=>{if(m)t.onMount?.(m);if(a)m?a.mount(m):a.unmount();let p=u.current;if(typeof p==="function")if(m){let g=p(m);if(typeof g==="function")f.current=g}else if(f.current)f.current(),f.current=null;else p(m);else if(p)p.current=m},[a])}var yw=jt({});function Lu(t){return t&&typeof t==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function G_(t,a,c,u,f,m){let{visualElement:p}=M(Tu),g=M(gw),v=M(ac),k=M(gs),{reducedMotion:S,skipAnimations:I}=k,T=i(null),L=i(!1);if(u=u||g.renderer,!T.current&&u){if(T.current=u(t,{visualState:a,parent:p,props:c,presenceContext:v,blockInitialAnimation:v?v.initial===!1:!1,reducedMotionConfig:S,skipAnimations:I,isSVG:m}),L.current&&T.current)T.current.manuallyAnimateOnMount=!0}let R=T.current,A=M(yw);if(R&&!R.projection&&f&&(R.type==="html"||R.type==="svg"))sne(T.current,c,f,A);let E=i(!1);Uc(()=>{if(R&&E.current)R.update(c,v)});let P=c[Ox],D=i(Boolean(P)&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(P)&&window.MotionHasOptimisedAnimation?.(P));return Zs(()=>{if(!L.current||!R)return;R.animationState?.animateChanges(),R.enteringChildren=void 0},[]),Zs(()=>{if(L.current=!0,!R)return;if(E.current=!0,window.MotionIsMounted=!0,R.updateFeatures(),R.scheduleRenderMicrotask(),D.current&&R.animationState)R.animationState.animateChanges()}),o(()=>{if(!R)return;if(!D.current&&R.animationState)R.animationState.animateChanges();if(D.current)queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(P)}),D.current=!1;R.enteringChildren=void 0}),R}function sne(t,a,c,u){let{layoutId:f,layout:m,drag:p,dragConstraints:g,layoutScroll:v,layoutRoot:k,layoutAnchor:S,layoutCrossfade:I}=a;t.projection=new c(t.latestValues,a["data-framer-portal-id"]?void 0:$_(t.parent)),t.projection.setOptions({layoutId:f,layout:m,alwaysMeasureLayout:Boolean(p)||g&&Lu(g),visualElement:t,animationType:typeof m==="string"?m:"both",initialPromotionConfig:u,crossfade:I,layoutScroll:v,layoutRoot:k,layoutAnchor:S})}function $_(t){if(!t)return;return t.options.allowProjection!==!1?t.projection:$_(t.parent)}function ww(t,{forwardMotionProps:a=!1,type:c}={},u,f){u&&M_(u);let m=c?c==="svg":Jp(t),p=m?q_:U_;function g(k,S){let I,T={...M(gs),...k,layoutId:lne(k)},{isStatic:L,isValidProp:R}=T,A=O_(k),E=p(k,L);if(!L&&typeof window<"u"){cne(T,u);let P=une(T);I=P.MeasureLayout,A.visualElement=G_(t,E,T,f,P.ProjectionNode,m)}return n(Tu.Provider,{value:A,children:[I&&A.visualElement?e(I,{visualElement:A.visualElement,...T}):null,V_(t,k,j_(E,A.visualElement,S),E,L,a,m,R)]})}g.displayName=`motion.${typeof t==="string"?t:`create(${t.displayName??t.name??""})`}`;let v=_e(g);return v[H_]=t,v}function lne({layoutId:t}){let a=M(Ap).id;return a&&t!==void 0?a+"-"+t:t}function cne(t,a){let c=M(gw).strict}function une(t){let a=xw(),{drag:c,layout:u}=a;if(!c&&!u)return{};let f={...c,...u};return{MeasureLayout:c?.isEnabled(t)||u?.isEnabled(t)?f.MeasureLayout:void 0,ProjectionNode:f.ProjectionNode}}function K_(t,a){if(typeof Proxy>"u")return ww;let c=new Map,u=(m,p)=>ww(m,p,t,a);return new Proxy((m,p)=>u(m,p),{get:(m,p)=>{if(p==="create")return u;if(!c.has(p))c.set(p,ww(p,void 0,t,a));return c.get(p)}})}var W_=(t,a)=>a.isSVG??Jp(t)?new fw(a):new uw(a,{allowProjection:t!==Xe});class W5 extends lo{constructor(t){super(t);t.animationState||(t.animationState=E5(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();if(fc(t))this.unmountControls=t.subscribe(this.node)}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:a}=this.node.prevProps||{};if(t!==a)this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}var dne=0;class X5 extends lo{constructor(){super(...arguments);this.id=dne++}update(){let{presenceContext:t,prevPresenceContext:a,animationState:c}=this.node;if(!t||!c)return;let{isPresent:u,onExitComplete:f}=t,m=a?.isPresent;if(u===m)return;if(u&&m===!1){if(this.exit===!0){let{initial:g}=this.node.getProps();if(g&&!Array.isArray(g)){let{transition:v,transitionEnd:k,...S}=Ya(this.node,g)||{};for(let I in S)this.node.getValue(I)?.jump(S[I])}this.node.blockInitialAnimation=!1,c.reset(),c.animateChanges()}else c.setActive("exit",!1);this.exit=void 0;return}let p=this.exit=c.setActive("exit",!u);if(f&&!u)p.then(()=>{if(this.exit!==p)return;this.exit=!0,f(this.id)})}mount(){let{register:t,onExitComplete:a}=this.node.presenceContext||{};if(a)a(this.id);if(t)this.unmount=t(this.id)}unmount(){}}var X_={animation:{Feature:W5},exit:{Feature:X5}};function Cf(t){return{point:{x:t.pageX,y:t.pageY}}}var Y_=(t)=>(a)=>gf(a)&&t(a,Cf(a));function Ru(t,a,c,u){return rl(t,a,Y_(c),u)}var kw=({current:t})=>t?t.ownerDocument.defaultView:null;var Q_=(t,a)=>Math.abs(t-a);function Z_(t,a){let c=Q_(t.x,a.x),u=Q_(t.y,a.y);return Math.sqrt(c**2+u**2)}var J_=new Set(["auto","scroll"]);class r0{constructor(t,a,{transformPagePoint:c,contextWindow:u=window,dragSnapToOrigin:f=!1,distanceThreshold:m=3,element:p}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=(L)=>{this.handleScroll(L.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;if(this.hasPendingMove=!1,this.lastRawMoveEventInfo)this.lastMoveEventInfo=Sw(this.lastRawMoveEventInfo,this.transformPagePoint);let L=Y5(this.lastMoveEventInfo,this.history),R=this.startEvent!==null,A=Z_(L.offset,{x:0,y:0})>=this.distanceThreshold;if(!R&&!A)return;let{point:E}=L;this.history.push({...E,timestamp:Mn.now()});let{onStart:P,onMove:D}=this.handlers;if(!R)P&&P(this.lastMoveEvent,L),this.startEvent=this.lastMoveEvent;D&&D(this.lastMoveEvent,L)},this.handlePointerMove=(L,R)=>{this.lastMoveEvent=L,this.lastRawMoveEventInfo=R,this.lastMoveEventInfo=Sw(R,this.transformPagePoint),this.hasPendingMove=!0,zt.update(this.updatePoint,!0)},this.handlePointerUp=(L,R)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:A,onSessionEnd:E,resumeAnimation:P}=this.handlers;if(this.dragSnapToOrigin||!this.startEvent)P&&P();if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let D=Y5(L.type==="pointercancel"?this.lastMoveEventInfo:Sw(R,this.transformPagePoint),this.history);if(this.startEvent&&A)A(L,D);E&&E(L,D)},!gf(t))return;this.dragSnapToOrigin=f,this.handlers=a,this.transformPagePoint=c,this.distanceThreshold=m,this.contextWindow=u||window;let g=Cf(t),v=Sw(g,this.transformPagePoint),{point:k}=v,{timestamp:S}=Gn;this.history=[{...k,timestamp:S}];let{onSessionStart:I}=a;I&&I(t,Y5(v,this.history));let T={passive:!0,capture:!0};if(this.removeListeners=ps(Ru(this.contextWindow,"pointermove",this.handlePointerMove,T),Ru(this.contextWindow,"pointerup",this.handlePointerUp,T),Ru(this.contextWindow,"pointercancel",this.handlePointerUp,T)),p)this.startScrollTracking(p)}startScrollTracking(t){let a=t.parentElement;while(a){let c=getComputedStyle(a);if(J_.has(c.overflowX)||J_.has(c.overflowY))this.scrollPositions.set(a,{x:a.scrollLeft,y:a.scrollTop});a=a.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){let a=this.scrollPositions.get(t);if(!a)return;let c=t===window,u=c?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},f={x:u.x-a.x,y:u.y-a.y};if(f.x===0&&f.y===0)return;if(c){if(this.lastMoveEventInfo)this.lastMoveEventInfo.point.x+=f.x,this.lastMoveEventInfo.point.y+=f.y}else if(this.history.length>0)this.history[0].x-=f.x,this.history[0].y-=f.y;this.scrollPositions.set(t,u),zt.update(this.updatePoint,!0)}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Oo(this.updatePoint)}}function Sw(t,a){return a?{point:a(t.point)}:t}function ez(t,a){return{x:t.x-a.x,y:t.y-a.y}}function Y5({point:t},a){return{point:t,delta:ez(t,tz(a)),offset:ez(t,fne(a)),velocity:mne(a,0.1)}}function fne(t){return t[0]}function tz(t){return t[t.length-1]}function mne(t,a){if(t.length<2)return{x:0,y:0};let c=t.length-1,u=null,f=tz(t);while(c>=0){if(u=t[c],f.timestamp-u.timestamp>cr(a))break;c--}if(!u)return{x:0,y:0};if(u===t[0]&&t.length>2&&f.timestamp-u.timestamp>cr(a)*2)u=t[1];let m=ao(f.timestamp-u.timestamp);if(m===0)return{x:0,y:0};let p={x:(f.x-u.x)/m,y:(f.y-u.y)/m};if(p.x===1/0)p.x=0;if(p.y===1/0)p.y=0;return p}function iz(t,{min:a,max:c},u){if(a!==void 0&&t<a)t=u?Ut(a,t,u.min):Math.max(t,a);else if(c!==void 0&&t>c)t=u?Ut(c,t,u.max):Math.min(t,c);return t}function nz(t,a,c){return{min:a!==void 0?t.min+a:void 0,max:c!==void 0?t.max+c-(t.max-t.min):void 0}}function sz(t,{top:a,left:c,bottom:u,right:f}){return{x:nz(t.x,c,f),y:nz(t.y,a,u)}}function rz(t,a){let c=a.min-t.min,u=a.max-t.max;if(a.max-a.min<t.max-t.min)[c,u]=[u,c];return{min:c,max:u}}function lz(t,a){return{x:rz(t.x,a.x),y:rz(t.y,a.y)}}function cz(t,a){let c=0.5,u=Nr(t),f=Nr(a);if(f>u)c=Ei(a.min,a.max-u,t.min);else if(u>f)c=Ei(t.min,t.max-f,a.min);return Qr(0,1,c)}function uz(t,a){let c={};if(a.min!==void 0)c.min=a.min-t.min;if(a.max!==void 0)c.max=a.max-t.min;return c}var Cw=0.35;function dz(t=Cw){if(t===!1)t=0;else if(t===!0)t=Cw;return{x:oz(t,"left","right"),y:oz(t,"top","bottom")}}function oz(t,a,c){return{min:az(t,a),max:az(t,c)}}function az(t,a){return typeof t==="number"?t:t[a]||0}var pne=new WeakMap;class Q5{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Xn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:a=!1,distanceThreshold:c}={}){let{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;let f=(S)=>{if(a)this.snapToCursor(S);this.stopAnimation()},m=(S,I)=>{let{drag:T,dragPropagation:L,onDragStart:R}=this.getProps();if(T&&!L){if(this.openDragLock)this.openDragLock();if(this.openDragLock=h5(T),!this.openDragLock)return}if(this.latestPointerEvent=S,this.latestPanInfo=I,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection)this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0;if(Za((E)=>{let P=this.getAxisMotionValue(E).get()||0;if(No.test(P)){let{projection:D}=this.visualElement;if(D&&D.layout){let N=D.layout.layoutBox[E];if(N)P=Nr(N)*(parseFloat(P)/100)}}this.originPoint[E]=P}),R)zt.update(()=>R(S,I),!1,!0);jp(this.visualElement,"transform");let{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},p=(S,I)=>{this.latestPointerEvent=S,this.latestPanInfo=I;let{dragPropagation:T,dragDirectionLock:L,onDirectionLock:R,onDrag:A}=this.getProps();if(!T&&!this.openDragLock)return;let{offset:E}=I;if(L&&this.currentDirection===null){if(this.currentDirection=gne(E),this.currentDirection!==null)R&&R(this.currentDirection);return}if(this.updateAxis("x",I.point,E),this.updateAxis("y",I.point,E),this.visualElement.render(),A)zt.update(()=>A(S,I),!1,!0)},g=(S,I)=>{this.latestPointerEvent=S,this.latestPanInfo=I,this.stop(S,I),this.latestPointerEvent=null,this.latestPanInfo=null},v=()=>{let{dragSnapToOrigin:S}=this.getProps();if(S||this.constraints)this.startAnimation({x:0,y:0})},{dragSnapToOrigin:k}=this.getProps();this.panSession=new r0(t,{onSessionStart:f,onStart:m,onMove:p,onSessionEnd:g,resumeAnimation:v},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:k,distanceThreshold:c,contextWindow:kw(this.visualElement),element:this.visualElement.current})}stop(t,a){let c=t||this.latestPointerEvent,u=a||this.latestPanInfo,f=this.isDragging;if(this.cancel(),!f||!u||!c)return;let{velocity:m}=u;this.startAnimation(m);let{onDragEnd:p}=this.getProps();if(p)zt.postRender(()=>p(c,u))}cancel(){this.isDragging=!1;let{projection:t,animationState:a}=this.visualElement;if(t)t.isAnimationBlocked=!1;this.endPanSession();let{dragPropagation:c}=this.getProps();if(!c&&this.openDragLock)this.openDragLock(),this.openDragLock=null;a&&a.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,a,c){let{drag:u}=this.getProps();if(!c||!Iw(t,u,this.currentDirection))return;let f=this.getAxisMotionValue(t),m=this.originPoint[t]+c[t];if(this.constraints&&this.constraints[t])m=iz(m,this.constraints[t],this.elastic[t]);f.set(m)}resolveConstraints(){let{dragConstraints:t,dragElastic:a}=this.getProps(),c=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,u=this.constraints;if(t&&Lu(t)){if(!this.constraints)this.constraints=this.resolveRefConstraints()}else if(t&&c)this.constraints=sz(c.layoutBox,t);else this.constraints=!1;if(this.elastic=dz(a),u!==this.constraints&&!Lu(t)&&c&&this.constraints&&!this.hasMutatedConstraints)Za((f)=>{if(this.constraints!==!1&&this.getAxisMotionValue(f))this.constraints[f]=uz(c.layoutBox[f],this.constraints[f])})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:a}=this.getProps();if(!t||!Lu(t))return!1;let c=t.current;Wn(c!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:u}=this.visualElement;if(!u||!u.layout)return!1;if(u.root)u.root.scroll=void 0,u.root.updateScroll();let f=f5(c,u.root,this.visualElement.getTransformPagePoint()),m=lz(u.layout.layoutBox,f);if(a){let p=a(i5(m));if(this.hasMutatedConstraints=!!p,p)m=Ux(p)}return m}startAnimation(t){let{drag:a,dragMomentum:c,dragElastic:u,dragTransition:f,dragSnapToOrigin:m,onDragTransitionEnd:p}=this.getProps(),g=this.constraints||{},v=Za((k)=>{if(!Iw(k,a,this.currentDirection))return;let S=g&&g[k]||{};if(m===!0||m===k)S={min:0,max:0};let I=u?200:1e6,T=u?40:1e7,L={type:"inertia",velocity:c?t[k]:0,bounceStiffness:I,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...f,...S};return this.startAxisValueAnimation(k,L)});return Promise.all(v).then(p)}startAxisValueAnimation(t,a){let c=this.getAxisMotionValue(t);return jp(this.visualElement,t),c.start(uc(t,c,0,a,this.visualElement,!1))}stopAnimation(){Za((t)=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let a=`_drag${t.toUpperCase()}`,u=this.visualElement.getProps()[a];return u?u:this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:a}){let{drag:c}=this.getProps(),u={x:t,y:a},f=this.visualElement.getTransformPagePoint()?.(u)||u,m=this.visualElement.measureViewportBox();Za((p)=>{if(!Iw(p,c,this.currentDirection))return;let g=this.getAxisMotionValue(p),{min:v,max:k}=m[p];g.set((g.get()||0)+f[p]-Ut(v,k,0.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:a}=this.getProps(),{projection:c}=this.visualElement;if(!Lu(a)||!c||!this.constraints)return;this.stopAnimation();let u=this.constraints,f={x:0,y:0};Za((p)=>{let g=this.getAxisMotionValue(p).get();f[p]=cz({min:g,max:g},u[p])});let{transformTemplate:m}=this.visualElement.getProps();this.visualElement.current.style.transform=m?m({},""):"none",c.root&&c.root.updateScroll(),c.updateLayout(),this.constraints=!1,this.resolveConstraints(),Za((p)=>{let g=this.getAxisMotionValue(p);if(!Iw(p,t,null)||!g.get())return;let{min:v,max:k}=this.constraints[p];g.set(Ut(v,k,f[p]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;pne.set(this.visualElement,this);let t=this.visualElement.current,a=Ru(t,"pointerdown",(v)=>{let{drag:k,dragListener:S=!0}=this.getProps(),I=v.target,T=I!==t&&b5(I);if(k&&S&&!T)this.start(v)}),c,u=()=>{let{dragConstraints:v}=this.getProps();if(Lu(v)&&v.current){if(this.constraints=this.resolveRefConstraints(),!c)c=hne(t,v.current,()=>this.scalePositionWithinConstraints())}},{projection:f}=this.visualElement,m=f.addEventListener("measure",u);if(f&&!f.layout)f.root&&f.root.updateScroll(),f.updateLayout();zt.read(u);let p=rl(window,"resize",()=>this.scalePositionWithinConstraints()),g=f.addEventListener("didUpdate",({delta:v,hasLayoutChanged:k})=>{if(this.isDragging&&k)Za((S)=>{let I=this.getAxisMotionValue(S);if(!I)return;this.originPoint[S]+=v[S].translate,I.set(I.get()+v[S].translate)}),this.visualElement.render()});return()=>{p(),a(),m(),g&&g(),c&&c()}}getProps(){let t=this.visualElement.getProps(),{drag:a=!1,dragDirectionLock:c=!1,dragPropagation:u=!1,dragConstraints:f=!1,dragElastic:m=Cw,dragMomentum:p=!0}=t;return{...t,drag:a,dragDirectionLock:c,dragPropagation:u,dragConstraints:f,dragElastic:m,dragMomentum:p}}}function fz(t){let a=!0;return()=>{if(a){a=!1;return}t()}}function hne(t,a,c){let u=ow(t,fz(c)),f=ow(a,fz(c));return()=>{u(),f()}}function Iw(t,a,c){return(a===!0||a===t)&&(c===null||c===t)}function gne(t,a=10){let c=null;if(Math.abs(t.y)>a)c="y";else if(Math.abs(t.x)>a)c="x";return c}class Z5 extends lo{constructor(t){super(t);this.removeGroupControls=Cr,this.removeListeners=Cr,this.controls=new Q5(t)}mount(){let{dragControls:t}=this.node.getProps();if(t)this.removeGroupControls=t.subscribe(this.controls);this.removeListeners=this.controls.addListeners()||Cr}update(){let{dragControls:t}=this.node.getProps(),{dragControls:a}=this.node.prevProps||{};if(t!==a){if(this.removeGroupControls(),t)this.removeGroupControls=t.subscribe(this.controls)}}unmount(){if(this.removeGroupControls(),this.removeListeners(),!this.controls.isDragging)this.controls.endPanSession()}}var J5=(t)=>(a,c)=>{if(t)zt.update(()=>t(a,c),!1,!0)};class eL extends lo{constructor(){super(...arguments);this.removePointerDownListener=Cr}onPointerDown(t){this.session=new r0(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:kw(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:a,onPan:c,onPanEnd:u}=this.node.getProps();return{onSessionStart:J5(t),onStart:J5(a),onMove:J5(c),onEnd:(f,m)=>{if(delete this.session,u)zt.postRender(()=>u(f,m))}}}mount(){this.removePointerDownListener=Ru(this.node.current,"pointerdown",(t)=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}var tL=!1;class mz extends Vc{componentDidMount(){let{visualElement:t,layoutGroup:a,switchLayoutGroup:c,layoutId:u}=this.props,{projection:f}=t;if(f){if(a.group)a.group.add(f);if(c&&c.register&&u)c.register(f);if(tL)f.root.didUpdate();f.addEventListener("animationComplete",()=>{this.safeToRemove()}),f.setOptions({...f.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})}kf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:a,visualElement:c,drag:u,isPresent:f}=this.props,{projection:m}=c;if(!m)return null;if(m.isPresent=f,t.layoutDependency!==a)m.setOptions({...m.options,layoutDependency:a});if(tL=!0,u||t.layoutDependency!==a||a===void 0||t.isPresent!==f)m.willUpdate();else this.safeToRemove();if(t.isPresent!==f){if(f)m.promote();else if(!m.relegate())zt.postRender(()=>{let p=m.getStack();if(!p||!p.members.length)this.safeToRemove()})}return null}componentDidUpdate(){let{visualElement:t,layoutAnchor:a}=this.props,{projection:c}=t;if(c)c.options.layoutAnchor=a,c.root.didUpdate(),hf.postRender(()=>{if(!c.currentAnimation&&c.isLead())this.safeToRemove()})}componentWillUnmount(){let{visualElement:t,layoutGroup:a,switchLayoutGroup:c}=this.props,{projection:u}=t;if(tL=!0,u){if(u.scheduleCheckAfterUnmount(),a&&a.group)a.group.remove(u);if(c&&c.deregister)c.deregister(u)}}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Tw(t){let[a,c]=e0(),u=M(Ap);return e(mz,{...t,layoutGroup:u,switchLayoutGroup:M(yw),isPresent:a,safeToRemove:c})}var pz={pan:{Feature:eL},drag:{Feature:Z5,ProjectionNode:Jx,MeasureLayout:Tw}};function hz(t,a,c){let{props:u}=t;if(t.animationState&&u.whileHover)t.animationState.setActive("whileHover",c==="Start");let f="onHover"+c,m=u[f];if(m)zt.postRender(()=>m(a,Cf(a)))}class nL extends lo{mount(){let{current:t}=this.node;if(!t)return;this.unmount=g5(t,(a,c)=>(hz(this.node,c,"Start"),(u)=>hz(this.node,u,"End")))}unmount(){}}class rL extends lo{constructor(){super(...arguments);this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(a){t=!0}if(!t||!this.node.animationState)return;this.node.animationState.setActive("whileFocus",!0),this.isActive=!0}onBlur(){if(!this.isActive||!this.node.animationState)return;this.node.animationState.setActive("whileFocus",!1),this.isActive=!1}mount(){this.unmount=ps(rl(this.node.current,"focus",()=>this.onFocus()),rl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function gz(t,a,c){let{props:u}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;if(t.animationState&&u.whileTap)t.animationState.setActive("whileTap",c==="Start");let f="onTap"+(c==="End"?"":c),m=u[f];if(m)zt.postRender(()=>m(a,Cf(a)))}class oL extends lo{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:a,propagate:c}=this.node.props;this.unmount=w5(t,(u,f)=>(gz(this.node,f,"Start"),(m,{success:p})=>gz(this.node,m,p?"End":"Cancel")),{useGlobalTarget:a,stopPropagation:c?.tap===!1})}unmount(){}}var iL=new WeakMap,aL=new WeakMap,xne=(t)=>{let a=iL.get(t.target);a&&a(t)},vne=(t)=>{t.forEach(xne)};function bne({root:t,...a}){let c=t||document;if(!aL.has(c))aL.set(c,{});let u=aL.get(c),f=JSON.stringify(a);if(!u[f])u[f]=new IntersectionObserver(vne,{root:t,...a});return u[f]}function xz(t,a,c){let u=bne(a);return iL.set(t,c),u.observe(t),()=>{iL.delete(t),u.unobserve(t)}}var yne={some:0,all:1};class sL extends lo{constructor(){super(...arguments);this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:t={}}=this.node.getProps(),{root:a,margin:c,amount:u="some",once:f}=t,m={root:a?a.current:void 0,rootMargin:c,threshold:typeof u==="number"?u:yne[u]},p=(g)=>{let{isIntersecting:v}=g;if(this.isInView===v)return;if(this.isInView=v,f&&!v&&this.hasEnteredView)return;else if(v)this.hasEnteredView=!0;if(this.node.animationState)this.node.animationState.setActive("whileInView",v);let{onViewportEnter:k,onViewportLeave:S}=this.node.getProps(),I=v?k:S;I&&I(g)};this.stopObserver=xz(this.node.current,m,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:a}=this.node;if(["amount","margin","root"].some(wne(t,a)))this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function wne({viewport:t={}},{viewport:a={}}={}){return(c)=>t[c]!==a[c]}var vz={inView:{Feature:sL},tap:{Feature:oL},focus:{Feature:rL},hover:{Feature:nL}};var bz={layout:{ProjectionNode:Jx,MeasureLayout:Tw}};var yz={...X_,...vz,...pz,...bz};var If=K_(yz,W_);function Eu(t){let a=Mr(()=>so(t)),{isStatic:c}=M(gs);if(c){let[,u]=r(t);o(()=>a.on("change",u),[])}return a}function Lw(t,a){let c=Eu(a()),u=()=>c.set(a());return u(),Zs(()=>{let f=()=>zt.preRender(u,!1,!0),m=t.map((p)=>p.on("change",f));return()=>{m.forEach((p)=>p()),Oo(u)}}),c}function wz(t){df.current=[],t();let a=Lw(df.current,t);return df.current=void 0,a}function lL(t,a,c,u){if(typeof t==="function")return wz(t);if(c!==void 0&&!Array.isArray(c)&&typeof a!=="function")return kne(t,a,c,u);let p=typeof a==="function"?a:k5(a,c,u),g=Array.isArray(t)?kz(t,p):kz([t],([k])=>p(k)),v=!Array.isArray(t)?t.accelerate:void 0;if(v&&!v.isTransformed&&typeof a!=="function"&&Array.isArray(c)&&u?.clamp!==!1){let k=u?.ease;g.accelerate={...v,times:[0,...a,1],keyframes:[c[0],...c,c[c.length-1]],isTransformed:!0,...k?{ease:Array.isArray(k)?[k[0],...k]:k}:{}}}return g}function kz(t,a){let c=Mr(()=>[]);return Lw(t,()=>{c.length=0;let u=t.length;for(let f=0;f<u;f++)c[f]=t[f].get();return a(c)})}function kne(t,a,c,u){let f=Mr(()=>Object.keys(c)),m=Mr(()=>({}));for(let p of f)m[p]=lL(t,a,c[p],u);return m}function o0(t){return typeof t==="object"&&!Array.isArray(t)}function Rw(t,a,c,u){if(t==null)return[];if(typeof t==="string"&&o0(a))return mf(t,c,u);else if(t instanceof NodeList)return Array.from(t);else if(Array.isArray(t))return t.filter((f)=>f!=null);else return[t]}function Sz(t,a,c){return t*(a+1)+c*a}function cL(t,a,c,u){if(typeof a==="number")return a;else if(a.startsWith("-")||a.startsWith("+"))return Math.max(0,t+parseFloat(a));else if(a==="<")return c;else if(a.startsWith("<"))return Math.max(0,c+parseFloat(a.slice(1)));else return u.get(a)??t}function Sne(t,a,c){for(let u=0;u<t.length;u++){let f=t[u];if(f.at>a&&f.at<c)Ea(t,f),u--}}function Cz(t,a,c,u,f,m){Sne(t,f,m);for(let p=0;p<a.length;p++)t.push({value:a[p],at:Ut(f,m,u[p]),easing:xx(c,p)})}function Iz(t,a,c=0){let u=a+1+a*c;for(let f=0;f<t.length;f++)t[f]=t[f]/u}function Tz(t,a){if(t.at===a.at){if(t.value===null)return 1;if(a.value===null)return-1;return 0}else return t.at-a.at}var Cne="easeInOut",uL=20;function Ez(t,{defaultTransition:a={},...c}={},u,f){let m=a.duration||0.3,p=new Map,g=new Map,v={},k=new Map,S=0,I=0,T=0;for(let L=0;L<t.length;L++){let R=t[L];if(typeof R==="string"){k.set(R,I);continue}else if(!Array.isArray(R)){k.set(R.name,cL(I,R.at,S,k));continue}let[A,E,P={}]=R;if(P.at!==void 0)I=cL(I,P.at,S,k);let D=0,N=(O,F,z,B=0,U=0)=>{let Y=Ine(O),{delay:G=0,times:ce=Lx(Y),type:re=a.type||"keyframes",repeat:Q,repeatType:ae,repeatDelay:xe=0,...Te}=F,{ease:me=a.ease||"easeOut",duration:Ce}=F,Be=typeof G==="function"?G(B,U):G,X=Y.length,He=uf(re)?re:f?.[re||"keyframes"];if(X<=2&&He){let Ie=100;if(X===2&&Rne(Y)){let Re=Y[1]-Y[0];Ie=Math.abs(Re)}let qe={...a,...Te};if(Ce!==void 0)qe.duration=cr(Ce);let Qe=Cx(qe,Ie,He);me=Qe.ease,Ce=Qe.duration}Ce??(Ce=m);let Le=I+Be;if(ce.length===1&&ce[0]===0)ce[1]=1;let J=ce.length-Y.length;if(J>0&&Tx(ce,J),Y.length===1&&Y.unshift(null),Q)ms(Q<uL,`Sequence segments can't repeat ${Q} times — ignoring repeat option. Use a value below ${uL} or apply repeat at the sequence level instead.`);if(Q&&Q<uL){let Ie=Ce>0?xe/Ce:0;Ce=Sz(Ce,Q,xe);let qe=[...Y],Qe=[...ce];me=Array.isArray(me)?[...me]:[me];let Re=[...me],Ne=ae==="reverse"||ae==="mirror",ut=qe,kt=Re;if(Ne){if(ut=[...qe].reverse(),ae==="reverse")kt=[...Re].reverse().map((It)=>typeof It==="function"?tf(It):It)}for(let It=0;It<Q;It++){let Ee=Ne&&It%2===0,nt=Ee?ut:qe,Kt=Ee?kt:Re,an=(It+1)*(1+Ie);if(Ie>0)Y.push(Y[Y.length-1]),ce.push(an),me.push("linear");Y.push(...nt);for(let mn=0;mn<nt.length;mn++)ce.push(Qe[mn]+an),me.push(mn===0?"linear":xx(Kt,mn-1))}Iz(ce,Q,Ie)}let Me=Le+Ce;Cz(z,Y,me,ce,Le,Me),D=Math.max(Be+Ce,D),T=Math.max(Me,T)};if(un(A)){let O=Lz(A,g);N(E,P,Rz("default",O))}else{let O=Rw(A,E,u,v),F=O.length;for(let z=0;z<F;z++){E=E,P=P;let B=O[z],U=Lz(B,g);for(let Y in E)N(E[Y],Tne(P,Y),Rz(Y,U),z,F)}}S=I,I+=D}return g.forEach((L,R)=>{for(let A in L){let E=L[A];E.sort(Tz);let P=[],D=[],N=[];for(let B=0;B<E.length;B++){let{at:U,value:Y,easing:G}=E[B];P.push(Y),D.push(Ei(0,T,U)),N.push(G||"easeOut")}if(D[0]!==0)D.unshift(0),P.unshift(P[0]),N.unshift(Cne);if(D[D.length-1]!==1)D.push(1),P.push(null);if(!p.has(R))p.set(R,{keyframes:{},transition:{}});let O=p.get(R);O.keyframes[A]=P;let{type:F,...z}=a;O.transition[A]={...z,duration:T,ease:N,times:D,...c}}}),p}function Lz(t,a){return!a.has(t)&&a.set(t,{}),a.get(t)}function Rz(t,a){if(!a[t])a[t]=[];return a[t]}function Ine(t){return Array.isArray(t)?t:[t]}function Tne(t,a){return t&&t[a]?{...t,...t[a]}:{...t}}var Lne=(t)=>typeof t==="number",Rne=(t)=>t.every(Lne);function Ene(t,a){return un(t)||typeof t==="number"||typeof t==="string"&&!o0(a)}function Ew(t,a,c,u){let f=[];if(Ene(t,a))f.push(Zx(t,o0(a)?a.default||a:a,c?c.default||c:c));else{if(t==null)return f;let m=Rw(t,a,u),p=m.length;Wn(Boolean(p),"No valid elements provided.","no-valid-elements");for(let g=0;g<p;g++){let v=m[g],k={...c};if("delay"in k&&typeof k.delay==="function")k.delay=k.delay(g,p);if(v instanceof Element)f.push(...m5(v,a,k,jx.get(v)));else f.push(...Bx(e5(v)??p5,v,a,k))}}return f}function Pz(t,a,c){let u=[],f=t.map((p)=>{if(Array.isArray(p)&&typeof p[0]==="function"){let g=p[0],v=so(0);if(v.on("change",g),p.length===1)return[v,[0,1]];else if(p.length===2)return[v,[0,1],p[1]];else return[v,p[1],p[2]]}return p});return Ez(f,a,c,{spring:lc}).forEach(({keyframes:p,transition:g},v)=>{u.push(...Ew(v,p,g))}),u}function Pne(t){return Array.isArray(t)&&t.some(Array.isArray)}function Az(t={}){let{scope:a,reduceMotion:c,skipAnimations:u}=t;function f(m,p,g){let v=[],k,S={};if(c!==void 0)S.reduceMotion=c;if(u!==void 0)S.skipAnimations=u;if(Pne(m)){let{onComplete:T,...L}=p||{};if(typeof T==="function")k=T;v=Pz(m,{...S,...L},a)}else{let{onComplete:T,...L}=g||{};if(typeof T==="function")k=T;v=Ew(m,p,{...S,...L},a)}let I=new H1(v);if(k)I.finished.then(k);if(a)a.animations.push(I),I.finished.then(()=>{Ea(a.animations,I)});return I}return f}var dL=Object.assign(Az(),{addEffect:JT,removeEffect:X1});class fL{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,a){this.componentControls.forEach((c)=>{c.start(t.nativeEvent||t,a)})}cancel(){this.componentControls.forEach((t)=>{t.cancel()})}stop(){this.componentControls.forEach((t)=>{t.stop()})}}var Ane=()=>new fL;function mL(){return Mr(Ane)}var Pw=jt(null);function Nz(t,a,c,u,f,m="ltr"){let p=t.findIndex((L)=>L.value===a);if(p===-1)return t;if(f==="xy"){let{layout:L}=t[p],R={x:Ut(L.x.min,L.x.max,0.5)+c.x,y:Ut(L.y.min,L.y.max,0.5)+c.y},A=Mne(t),E=A.find((F)=>F.items.includes(t[p])),P=A.reduce((F,z)=>Mz(R.y,z)<Mz(R.y,F)?z:F);if(P!==E)return Dne(t,p,R.x,P,m);let D=Dz(R,L),N=-1,O=D;return t.forEach((F,z)=>{if(z===p)return;let B=Dz(R,F.layout);if(B<O)N=z,O=B}),N===-1?t:w1(t,p,p+Math.sign(N-p))}if(!u[f])return t;let g=u[f]>0?1:-1,v=t[p+g];if(!v)return t;let S=t[p].layout[f],I=v.layout[f],T=Ut(I.min,I.max,0.5);if(g===1&&S.max+c[f]>T||g===-1&&S.min+c[f]<T)return w1(t,p,p+g);return t}function Mne(t){let a=[];return t.forEach((c)=>{let{min:u,max:f}=c.layout.y,m=a[a.length-1];if(!m||u>=m.max||f<=m.min)a.push({items:[c],min:u,max:f});else m.items.push(c),m.min=Math.min(m.min,u),m.max=Math.max(m.max,f)}),a}function Mz(t,a){return t<a.min?a.min-t:t>a.max?t-a.max:0}function Dne(t,a,c,u,f){let m=t.filter((k,S)=>S!==a),p=u.items.find((k)=>{let S=Ut(k.layout.x.min,k.layout.x.max,0.5);return f==="ltr"?c<S:c>S}),g=p?m.indexOf(p):m.indexOf(u.items[u.items.length-1])+1,v=[...m];return v.splice(g,0,t[a]),v.every((k,S)=>k===t[S])?t:v}function Dz(t,a){let c=Math.max(a.x.min-t.x,0,t.x-a.x.max),u=Math.max(a.y.min-t.y,0,t.y-a.y.max);return c*c+u*u}var Oz=(t,a)=>t.max<=a.min||a.max<=t.min;function _z(t){let a=!1,c=!1;for(let u=0;u<t.length;u++)for(let f=u+1;f<t.length;f++)if(a||(a=Oz(t[u].x,t[f].x)),c||(c=Oz(t[u].y,t[f].y)),a&&c)return"xy";return a?"x":"y"}function Nne({children:t,as:a="ul",axis:c,onReorder:u,values:f,...m},p){let g=Mr(()=>If[a]),v=i(new Map),[k,S]=r("y"),I=i(!1),T=i(null),L=c||k;Wn(Boolean(f),"Reorder.Group must be provided a values prop","reorder-values");let R=new Set(f);v.current.forEach((D,N)=>{if(!R.has(N))v.current.delete(N)});let A={axis:L,groupRef:T,registerItem:(D,N)=>{if(v.current.set(D,N),!c){let O=_z(f.flatMap((F)=>{let z=v.current.get(F);return z?[z]:[]}));if(O!==k)S(O)}},updateOrder:(D,N,O)=>{if(I.current)return;let F=f.flatMap((U)=>{let Y=v.current.get(U);return Y?[{value:U,layout:Y}]:[]}),z=T.current?.ownerDocument.defaultView?.getComputedStyle(T.current).direction==="rtl"?"rtl":"ltr",B=Nz(F,D,N,O,L,z);if(F!==B){I.current=!0;let U=[...f],Y=F.map(({value:G})=>f.indexOf(G));B.forEach(({value:G},ce)=>{U[Y[ce]]=G}),u(U)}}};o(()=>{I.current=!1},[f]);let E=(D)=>{if(T.current=D,typeof p==="function")p(D);else if(p)p.current=D},P={overflowAnchor:"none",...m.style};return e(g,{...m,style:P,ref:E,ignoreStrict:!0,children:e(Pw.Provider,{value:A,children:t})})}var zz=_e(Nne);var One=new Set(["auto","scroll"]),i0=new WeakMap,s0=new WeakMap,a0=null;function Bz(){if(a0){let t=pL(a0,"y");if(t)s0.delete(t),i0.delete(t);let a=pL(a0,"x");if(a&&a!==t)s0.delete(a),i0.delete(a);a0=null}}function _ne(t,a){let c=getComputedStyle(t),u=a==="x"?c.overflowX:c.overflowY,f=t===document.body||t===document.documentElement;return One.has(u)||f}function pL(t,a){let c=t?.parentElement;while(c){if(_ne(c,a))return c;c=c.parentElement}return null}function zne(t,a,c){let u=a.getBoundingClientRect(),f=c==="x"?Math.max(0,u.left):Math.max(0,u.top),m=c==="x"?Math.min(window.innerWidth,u.right):Math.min(window.innerHeight,u.bottom),p=t-f,g=m-t;if(p<50){let v=1-p/50;return{amount:-25*v*v,edge:"start"}}else if(g<50){let v=1-g/50;return{amount:25*v*v,edge:"end"}}return{amount:0,edge:null}}function Fz(t,a,c,u){if(!t)return;a0=t;let f=pL(t,c);if(!f)return;let m=a-(c==="x"?window.scrollX:window.scrollY),{amount:p,edge:g}=zne(m,f,c);if(g===null){s0.delete(f),i0.delete(f);return}let v=s0.get(f),k=f===document.body||f===document.documentElement;if(v!==g){if(!(g==="start"&&u<0||g==="end"&&u>0))return;s0.set(f,g);let I=c==="x"?f.scrollWidth-(k?window.innerWidth:f.clientWidth):f.scrollHeight-(k?window.innerHeight:f.clientHeight);i0.set(f,I)}if(p>0){let S=i0.get(f);if((c==="x"?k?window.scrollX:f.scrollLeft:k?window.scrollY:f.scrollTop)>=S)return}if(c==="x")if(k)window.scrollBy({left:p});else f.scrollLeft+=p;else if(k)window.scrollBy({top:p});else f.scrollTop+=p}function Vz(t,a=0){return un(t)?t:Eu(a)}function Bne({children:t,style:a={},value:c,as:u="li",onDrag:f,onDragEnd:m,layout:p=!0,...g},v){let k=Mr(()=>If[u]),S=M(Pw),I={x:Vz(a.x),y:Vz(a.y)},T=lL([I.x,I.y],([D,N])=>D||N?1:"unset");Wn(Boolean(S),"Reorder.Item must be a child of Reorder.Group","reorder-item-child");let{axis:L,registerItem:R,updateOrder:A,groupRef:E}=S;return e(k,{drag:L==="xy"?!0:L,...g,dragSnapToOrigin:!0,style:{...a,x:I.x,y:I.y,zIndex:T},layout:p,onDrag:(D,N)=>{let{velocity:O,point:F}=N,z={x:I.x.get(),y:I.y.get()};A(c,z,O);let B=L==="xy"?Math.abs(O.x)>Math.abs(O.y)?"x":"y":L;Fz(E.current,F[B],B,O[B]),f&&f(D,N)},onDragEnd:(D,N)=>{Bz(),m&&m(D,N)},onLayoutMeasure:(D)=>{R(c,D)},ref:v,ignoreStrict:!0,children:t})}var Uz=_e(Bne);var H=If;function qz(t){var a,c,u="";if(typeof t=="string"||typeof t=="number")u+=t;else if(typeof t=="object")if(Array.isArray(t)){var f=t.length;for(a=0;a<f;a++)t[a]&&(c=qz(t[a]))&&(u&&(u+=" "),u+=c)}else for(c in t)t[c]&&(u&&(u+=" "),u+=c);return u}function Aw(){for(var t,a,c=0,u="",f=arguments.length;c<f;c++)(t=arguments[c])&&(a=qz(t))&&(u&&(u+=" "),u+=a);return u}var Vne=(t,a)=>{let c=Array(t.length+a.length);for(let u=0;u<t.length;u++)c[u]=t[u];for(let u=0;u<a.length;u++)c[t.length+u]=a[u];return c},Une=(t,a)=>({classGroupId:t,validator:a}),Wz=(t=new Map,a=null,c)=>({nextPart:t,validators:a,classGroupId:c});var Hz=[];var qne=(t)=>{let a=jne(t),{conflictingClassGroups:c,conflictingClassGroupModifiers:u}=t;return{getClassGroupId:(p)=>{if(p.startsWith("[")&&p.endsWith("]"))return Hne(p);let g=p.split("-"),v=g[0]===""&&g.length>1?1:0;return Xz(g,v,a)},getConflictingClassGroupIds:(p,g)=>{if(g){let v=u[p],k=c[p];if(v){if(k)return Vne(k,v);return v}return k||Hz}return c[p]||Hz}}},Xz=(t,a,c)=>{if(t.length-a===0)return c.classGroupId;let f=t[a],m=c.nextPart.get(f);if(m){let k=Xz(t,a+1,m);if(k)return k}let p=c.validators;if(p===null)return;let g=a===0?t.join("-"):t.slice(a).join("-"),v=p.length;for(let k=0;k<v;k++){let S=p[k];if(S.validator(g))return S.classGroupId}return},Hne=(t)=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let a=t.slice(1,-1),c=a.indexOf(":"),u=a.slice(0,c);return u?"arbitrary.."+u:void 0})(),jne=(t)=>{let{theme:a,classGroups:c}=t;return Gne(c,a)},Gne=(t,a)=>{let c=Wz();for(let u in t){let f=t[u];xL(f,c,u,a)}return c},xL=(t,a,c,u)=>{let f=t.length;for(let m=0;m<f;m++){let p=t[m];$ne(p,a,c,u)}},$ne=(t,a,c,u)=>{if(typeof t==="string"){Kne(t,a,c);return}if(typeof t==="function"){Wne(t,a,c,u);return}Xne(t,a,c,u)},Kne=(t,a,c)=>{let u=t===""?a:Yz(a,t);u.classGroupId=c},Wne=(t,a,c,u)=>{if(Yne(t)){xL(t(u),a,c,u);return}if(a.validators===null)a.validators=[];a.validators.push(Une(c,t))},Xne=(t,a,c,u)=>{let f=Object.entries(t),m=f.length;for(let p=0;p<m;p++){let[g,v]=f[p];xL(v,Yz(a,g),c,u)}},Yz=(t,a)=>{let c=t,u=a.split("-"),f=u.length;for(let m=0;m<f;m++){let p=u[m],g=c.nextPart.get(p);if(!g)g=Wz(),c.nextPart.set(p,g);c=g}return c},Yne=(t)=>("isThemeGetter"in t)&&t.isThemeGetter===!0,Qne=(t)=>{if(t<1)return{get:()=>{return},set:()=>{}};let a=0,c=Object.create(null),u=Object.create(null),f=(m,p)=>{if(c[m]=p,a++,a>t)a=0,u=c,c=Object.create(null)};return{get(m){let p=c[m];if(p!==void 0)return p;if((p=u[m])!==void 0)return f(m,p),p},set(m,p){if(m in c)c[m]=p;else f(m,p)}}};var Zne=[],jz=(t,a,c,u,f)=>({modifiers:t,hasImportantModifier:a,baseClassName:c,maybePostfixModifierPosition:u,isExternal:f}),Jne=(t)=>{let{prefix:a,experimentalParseClassName:c}=t,u=(f)=>{let m=[],p=0,g=0,v=0,k,S=f.length;for(let A=0;A<S;A++){let E=f[A];if(p===0&&g===0){if(E===":"){m.push(f.slice(v,A)),v=A+1;continue}if(E==="/"){k=A;continue}}if(E==="[")p++;else if(E==="]")p--;else if(E==="(")g++;else if(E===")")g--}let I=m.length===0?f:f.slice(v),T=I,L=!1;if(I.endsWith("!"))T=I.slice(0,-1),L=!0;else if(I.startsWith("!"))T=I.slice(1),L=!0;let R=k&&k>v?k-v:void 0;return jz(m,L,T,R)};if(a){let f=a+":",m=u;u=(p)=>p.startsWith(f)?m(p.slice(f.length)):jz(Zne,!1,p,void 0,!0)}if(c){let f=u;u=(m)=>c({className:m,parseClassName:f})}return u},ere=(t)=>{let a=new Map;return t.orderSensitiveModifiers.forEach((c,u)=>{a.set(c,1e6+u)}),(c)=>{let u=[],f=[];for(let m=0;m<c.length;m++){let p=c[m],g=p[0]==="[",v=a.has(p);if(g||v){if(f.length>0)f.sort(),u.push(...f),f=[];u.push(p)}else f.push(p)}if(f.length>0)f.sort(),u.push(...f);return u}},tre=(t)=>({cache:Qne(t.cacheSize),parseClassName:Jne(t),sortModifiers:ere(t),postfixLookupClassGroupIds:nre(t),...qne(t)}),nre=(t)=>{let a=Object.create(null),c=t.postfixLookupClassGroups;if(c)for(let u=0;u<c.length;u++)a[c[u]]=!0;return a},rre=/\s+/,ore=(t,a)=>{let{parseClassName:c,getClassGroupId:u,getConflictingClassGroupIds:f,sortModifiers:m,postfixLookupClassGroupIds:p}=a,g=[],v=t.trim().split(rre),k="";for(let S=v.length-1;S>=0;S-=1){let I=v[S],{isExternal:T,modifiers:L,hasImportantModifier:R,baseClassName:A,maybePostfixModifierPosition:E}=c(I);if(T){k=I+(k.length>0?" "+k:k);continue}let P=!!E,D;if(P){let B=A.substring(0,E);D=u(B);let U=D&&p[D]?u(A):void 0;if(U&&U!==D)D=U,P=!1}else D=u(A);if(!D){if(!P){k=I+(k.length>0?" "+k:k);continue}if(D=u(A),!D){k=I+(k.length>0?" "+k:k);continue}P=!1}let N=L.length===0?"":L.length===1?L[0]:m(L).join(":"),O=R?N+"!":N,F=O+D;if(g.indexOf(F)>-1)continue;g.push(F);let z=f(D,P);for(let B=0;B<z.length;++B){let U=z[B];g.push(O+U)}k=I+(k.length>0?" "+k:k)}return k},are=(...t)=>{let a=0,c,u,f="";while(a<t.length)if(c=t[a++]){if(u=Qz(c))f&&(f+=" "),f+=u}return f},Qz=(t)=>{if(typeof t==="string")return t;let a,c="";for(let u=0;u<t.length;u++)if(t[u]){if(a=Qz(t[u]))c&&(c+=" "),c+=a}return c},ire=(t,...a)=>{let c,u,f,m,p=(v)=>{let k=a.reduce((S,I)=>I(S),t());return c=tre(k),u=c.cache.get,f=c.cache.set,m=g,g(v)},g=(v)=>{let k=u(v);if(k)return k;let S=ore(v,c);return f(v,S),S};return m=p,(...v)=>m(are(...v))},sre=[],Zr=(t)=>{let a=(c)=>c[t]||sre;return a.isThemeGetter=!0,a.themeKey=t,a},Zz=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jz=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lre=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,cre=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ure=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dre=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,fre=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mre=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pu=(t)=>lre.test(t),on=(t)=>!!t&&!Number.isNaN(Number(t)),ol=(t)=>!!t&&Number.isInteger(Number(t)),gL=(t)=>t.endsWith("%")&&on(t.slice(0,-1)),pc=(t)=>cre.test(t),e7=()=>!0,pre=(t)=>ure.test(t)&&!dre.test(t),vL=()=>!1,hre=(t)=>fre.test(t),gre=(t)=>mre.test(t),xre=(t)=>!vt(t)&&!yt(t),vre=(t)=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),bre=(t)=>Au(t,r7,vL),vt=(t)=>Zz.test(t),Tf=(t)=>Au(t,o7,pre),Gz=(t)=>Au(t,Lre,on),yre=(t)=>Au(t,i7,e7),wre=(t)=>Au(t,a7,vL),$z=(t)=>Au(t,t7,vL),kre=(t)=>Au(t,n7,gre),Mw=(t)=>Au(t,s7,hre),yt=(t)=>Jz.test(t),l0=(t)=>Lf(t,o7),Sre=(t)=>Lf(t,a7),Kz=(t)=>Lf(t,t7),Cre=(t)=>Lf(t,r7),Ire=(t)=>Lf(t,n7),Dw=(t)=>Lf(t,s7,!0),Tre=(t)=>Lf(t,i7,!0),Au=(t,a,c)=>{let u=Zz.exec(t);if(u){if(u[1])return a(u[1]);return c(u[2])}return!1},Lf=(t,a,c=!1)=>{let u=Jz.exec(t);if(u){if(u[1])return a(u[1]);return c}return!1},t7=(t)=>t==="position"||t==="percentage",n7=(t)=>t==="image"||t==="url",r7=(t)=>t==="length"||t==="size"||t==="bg-size",o7=(t)=>t==="length",Lre=(t)=>t==="number",a7=(t)=>t==="family-name",i7=(t)=>t==="number"||t==="weight",s7=(t)=>t==="shadow";var Rre=()=>{let t=Zr("color"),a=Zr("font"),c=Zr("text"),u=Zr("font-weight"),f=Zr("tracking"),m=Zr("leading"),p=Zr("breakpoint"),g=Zr("container"),v=Zr("spacing"),k=Zr("radius"),S=Zr("shadow"),I=Zr("inset-shadow"),T=Zr("text-shadow"),L=Zr("drop-shadow"),R=Zr("blur"),A=Zr("perspective"),E=Zr("aspect"),P=Zr("ease"),D=Zr("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...O(),yt,vt],z=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],U=()=>[yt,vt,v],Y=()=>[Pu,"full","auto",...U()],G=()=>[ol,"none","subgrid",yt,vt],ce=()=>["auto",{span:["full",ol,yt,vt]},ol,yt,vt],re=()=>[ol,"auto",yt,vt],Q=()=>["auto","min","max","fr",yt,vt],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],xe=()=>["start","end","center","stretch","center-safe","end-safe"],Te=()=>["auto",...U()],me=()=>[Pu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],Ce=()=>[g,Pu,"screen","full","dvw","lvw","svw","min","max","fit",...U()],Be=()=>[Pu,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],X=()=>[t,yt,vt],He=()=>[...O(),Kz,$z,{position:[yt,vt]}],Le=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",Cre,bre,{size:[yt,vt]}],Me=()=>[gL,l0,Tf],Ie=()=>["","none","full",k,yt,vt],qe=()=>["",on,l0,Tf],Qe=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[on,gL,Kz,$z],ut=()=>["","none",R,yt,vt],kt=()=>["none",on,yt,vt],It=()=>["none",on,yt,vt],Ee=()=>[on,yt,vt],nt=()=>[Pu,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pc],breakpoint:[pc],color:[e7],container:[pc],"drop-shadow":[pc],ease:["in","out","in-out"],font:[xre],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pc],shadow:[pc],spacing:["px",on],text:[pc],"text-shadow":[pc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pu,vt,yt,E]}],container:["container"],"container-type":[{"@container":["","normal","size",yt,vt]}],"container-named":[vre],columns:[{columns:[on,"auto",vt,yt,g]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[ol,"auto",yt,vt]}],basis:[{basis:[Pu,"full","auto",g,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[on,Pu,"auto","initial","none",vt]}],grow:[{grow:["",on,yt,vt]}],shrink:[{shrink:["",on,yt,vt]}],order:[{order:[ol,"first","last","none",yt,vt]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:ce()}],"col-start":[{"col-start":re()}],"col-end":[{"col-end":re()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:ce()}],"row-start":[{"row-start":re()}],"row-end":[{"row-end":re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...xe(),"normal"]}],"justify-self":[{"justify-self":["auto",...xe()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...xe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...xe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...xe(),"baseline"]}],"place-self":[{"place-self":["auto",...xe()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:Te()}],mx:[{mx:Te()}],my:[{my:Te()}],ms:[{ms:Te()}],me:[{me:Te()}],mbs:[{mbs:Te()}],mbe:[{mbe:Te()}],mt:[{mt:Te()}],mr:[{mr:Te()}],mb:[{mb:Te()}],ml:[{ml:Te()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:me()}],"inline-size":[{inline:["auto",...Ce()]}],"min-inline-size":[{"min-inline":["auto",...Ce()]}],"max-inline-size":[{"max-inline":["none",...Ce()]}],"block-size":[{block:["auto",...Be()]}],"min-block-size":[{"min-block":["auto",...Be()]}],"max-block-size":[{"max-block":["none",...Be()]}],w:[{w:[g,"screen",...me()]}],"min-w":[{"min-w":[g,"screen","none",...me()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[p]},...me()]}],h:[{h:["screen","lh",...me()]}],"min-h":[{"min-h":["screen","lh","none",...me()]}],"max-h":[{"max-h":["screen","lh","none",...me()]}],"font-size":[{text:["base",c,l0,Tf]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[u,Tre,yre]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gL,vt]}],"font-family":[{font:[Sre,wre,a]}],"font-features":[{"font-features":[vt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[f,yt,vt]}],"line-clamp":[{"line-clamp":[on,"none",yt,Gz]}],leading:[{leading:["none",m,...U()]}],"list-image":[{"list-image":["none",yt,vt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",yt,vt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:X()}],"text-color":[{text:X()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Qe(),"wavy"]}],"text-decoration-thickness":[{decoration:[on,"from-font","auto",yt,Tf]}],"text-decoration-color":[{decoration:X()}],"underline-offset":[{"underline-offset":[on,"auto",yt,vt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"tab-size":[{tab:[ol,yt,vt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",yt,vt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",yt,vt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:He()}],"bg-repeat":[{bg:Le()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ol,yt,vt],radial:["",yt,vt],conic:["",ol,yt,vt]},Ire,kre]}],"bg-color":[{bg:X()}],"gradient-from-pos":[{from:Me()}],"gradient-via-pos":[{via:Me()}],"gradient-to-pos":[{to:Me()}],"gradient-from":[{from:X()}],"gradient-via":[{via:X()}],"gradient-to":[{to:X()}],rounded:[{rounded:Ie()}],"rounded-s":[{"rounded-s":Ie()}],"rounded-e":[{"rounded-e":Ie()}],"rounded-t":[{"rounded-t":Ie()}],"rounded-r":[{"rounded-r":Ie()}],"rounded-b":[{"rounded-b":Ie()}],"rounded-l":[{"rounded-l":Ie()}],"rounded-ss":[{"rounded-ss":Ie()}],"rounded-se":[{"rounded-se":Ie()}],"rounded-ee":[{"rounded-ee":Ie()}],"rounded-es":[{"rounded-es":Ie()}],"rounded-tl":[{"rounded-tl":Ie()}],"rounded-tr":[{"rounded-tr":Ie()}],"rounded-br":[{"rounded-br":Ie()}],"rounded-bl":[{"rounded-bl":Ie()}],"border-w":[{border:qe()}],"border-w-x":[{"border-x":qe()}],"border-w-y":[{"border-y":qe()}],"border-w-s":[{"border-s":qe()}],"border-w-e":[{"border-e":qe()}],"border-w-bs":[{"border-bs":qe()}],"border-w-be":[{"border-be":qe()}],"border-w-t":[{"border-t":qe()}],"border-w-r":[{"border-r":qe()}],"border-w-b":[{"border-b":qe()}],"border-w-l":[{"border-l":qe()}],"divide-x":[{"divide-x":qe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":qe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Qe(),"hidden","none"]}],"divide-style":[{divide:[...Qe(),"hidden","none"]}],"border-color":[{border:X()}],"border-color-x":[{"border-x":X()}],"border-color-y":[{"border-y":X()}],"border-color-s":[{"border-s":X()}],"border-color-e":[{"border-e":X()}],"border-color-bs":[{"border-bs":X()}],"border-color-be":[{"border-be":X()}],"border-color-t":[{"border-t":X()}],"border-color-r":[{"border-r":X()}],"border-color-b":[{"border-b":X()}],"border-color-l":[{"border-l":X()}],"divide-color":[{divide:X()}],"outline-style":[{outline:[...Qe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[on,yt,vt]}],"outline-w":[{outline:["",on,l0,Tf]}],"outline-color":[{outline:X()}],shadow:[{shadow:["","inner","none",S,Dw,Mw]}],"shadow-color":[{shadow:X()}],"inset-shadow":[{"inset-shadow":["none",I,Dw,Mw]}],"inset-shadow-color":[{"inset-shadow":X()}],"ring-w":[{ring:qe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:X()}],"ring-offset-w":[{"ring-offset":[on,Tf]}],"ring-offset-color":[{"ring-offset":X()}],"inset-ring-w":[{"inset-ring":qe()}],"inset-ring-color":[{"inset-ring":X()}],"text-shadow":[{"text-shadow":["none",T,Dw,Mw]}],"text-shadow-color":[{"text-shadow":X()}],opacity:[{opacity:[on,yt,vt]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[on]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":X()}],"mask-image-linear-to-color":[{"mask-linear-to":X()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":X()}],"mask-image-t-to-color":[{"mask-t-to":X()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":X()}],"mask-image-r-to-color":[{"mask-r-to":X()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":X()}],"mask-image-b-to-color":[{"mask-b-to":X()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":X()}],"mask-image-l-to-color":[{"mask-l-to":X()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":X()}],"mask-image-x-to-color":[{"mask-x-to":X()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":X()}],"mask-image-y-to-color":[{"mask-y-to":X()}],"mask-image-radial":[{"mask-radial":[yt,vt]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":X()}],"mask-image-radial-to-color":[{"mask-radial-to":X()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[on]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":X()}],"mask-image-conic-to-color":[{"mask-conic-to":X()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:He()}],"mask-repeat":[{mask:Le()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",yt,vt]}],filter:[{filter:["","none",yt,vt]}],blur:[{blur:ut()}],brightness:[{brightness:[on,yt,vt]}],contrast:[{contrast:[on,yt,vt]}],"drop-shadow":[{"drop-shadow":["","none",L,Dw,Mw]}],"drop-shadow-color":[{"drop-shadow":X()}],grayscale:[{grayscale:["",on,yt,vt]}],"hue-rotate":[{"hue-rotate":[on,yt,vt]}],invert:[{invert:["",on,yt,vt]}],saturate:[{saturate:[on,yt,vt]}],sepia:[{sepia:["",on,yt,vt]}],"backdrop-filter":[{"backdrop-filter":["","none",yt,vt]}],"backdrop-blur":[{"backdrop-blur":ut()}],"backdrop-brightness":[{"backdrop-brightness":[on,yt,vt]}],"backdrop-contrast":[{"backdrop-contrast":[on,yt,vt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",on,yt,vt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[on,yt,vt]}],"backdrop-invert":[{"backdrop-invert":["",on,yt,vt]}],"backdrop-opacity":[{"backdrop-opacity":[on,yt,vt]}],"backdrop-saturate":[{"backdrop-saturate":[on,yt,vt]}],"backdrop-sepia":[{"backdrop-sepia":["",on,yt,vt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",yt,vt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[on,"initial",yt,vt]}],ease:[{ease:["linear","initial",P,yt,vt]}],delay:[{delay:[on,yt,vt]}],animate:[{animate:["none",D,yt,vt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[A,yt,vt]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:kt()}],"rotate-x":[{"rotate-x":kt()}],"rotate-y":[{"rotate-y":kt()}],"rotate-z":[{"rotate-z":kt()}],scale:[{scale:It()}],"scale-x":[{"scale-x":It()}],"scale-y":[{"scale-y":It()}],"scale-z":[{"scale-z":It()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[yt,vt,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:nt()}],"translate-x":[{"translate-x":nt()}],"translate-y":[{"translate-y":nt()}],"translate-z":[{"translate-z":nt()}],"translate-none":["translate-none"],zoom:[{zoom:[ol,yt,vt]}],accent:[{accent:X()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:X()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",yt,vt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":X()}],"scrollbar-track-color":[{"scrollbar-track":X()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",yt,vt]}],fill:[{fill:["none",...X()]}],"stroke-w":[{stroke:[on,l0,Tf,Gz]}],stroke:[{stroke:["none",...X()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var l7=ire(Rre);function d(...t){return l7(Aw(t))}var Ere={type:"spring",stiffness:260,damping:22},c7=[{fill:"var(--color-facet)",dx:-0.7,dy:-0.7,d:"M608 369 641 220Q644 201 661 192L802 124Q819 115 836 124L949 181Q956 184 952 192L897 302Q895 307 890 312L806 387Q802 391 797 394L677 463Q672 467 668 462L618 400Q605 386 608 369Z"},{fill:"var(--color-facet-lit)",dx:0.9,dy:-0.45,d:"M967 198Q969 192 975 195L1015 217Q1028 224 1029 239L1031 300Q1031 306 1025 306H922Q914 306 918 298Z"},{fill:"var(--color-facet-shade)",dx:0.75,dy:0.65,d:"M908 321H1028Q1034 321 1034 327L1035 394Q1036 405 1029 414L927 530Q922 536 917 530L822 404Q818 398 824 393L901 324Q904 321 908 321Z"},{fill:"var(--color-facet-shade)",dx:-0.2,dy:1,d:"M800 410Q805 406 809 411L899 529Q903 536 896 537H748Q729 537 718 524L686 486Q681 479 689 475Z"}].map((t,a)=>({...t,breathe:{x:[0,t.dx*8],y:[0,t.dy*8]},breatheTransition:{duration:3.2,repeat:Number.POSITIVE_INFINITY,repeatType:"mirror",ease:"easeInOut",delay:a*0.7}}));function Aa(t){let a=ee(),[c,u]=r(!1),[f,m]=r(null),[p,g]=r(null);if(t.variant==="watermark")return n("svg",{viewBox:"0 0 512 512",className:t.className,"aria-hidden":"true",onPointerEnter:()=>u(!0),onPointerLeave:()=>{u(!1),m(null),g(null)},children:[n("defs",{children:[n("linearGradient",{id:`${a}-stroke`,gradientUnits:"userSpaceOnUse",x1:"640",y1:"115",x2:"960",y2:"520",children:[e("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.18"}),e("stop",{offset:"55%",stopColor:"currentColor",stopOpacity:"0.08"}),e("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0.02"})]}),n("linearGradient",{id:`${a}-fill`,gradientUnits:"userSpaceOnUse",x1:"640",y1:"115",x2:"960",y2:"520",children:[e("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.055"}),e("stop",{offset:"55%",stopColor:"currentColor",stopOpacity:"0.02"}),e("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0.005"})]}),n("linearGradient",{id:`${a}-fade`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[e("stop",{offset:"0%",stopColor:"white",stopOpacity:"1"}),e("stop",{offset:"62%",stopColor:"white",stopOpacity:"0.85"}),e("stop",{offset:"88%",stopColor:"white",stopOpacity:"0.2"}),e("stop",{offset:"100%",stopColor:"white",stopOpacity:"0"})]}),e("mask",{id:`${a}-mask`,children:e("rect",{width:"512",height:"512",fill:`url(#${a}-fade)`})})]}),e("g",{mask:`url(#${a}-mask)`,children:e("g",{transform:"translate(-566 -72)",children:c7.map((v,k)=>{let S=p===k,I=f===k,T=S?6:I?22:c?12:t.spread??0,L=S?0.96:I?1.025:1,R=S||I?1:c?0.92:0.8;return n("g",{children:[e(H.g,{animate:v.breathe,transition:v.breatheTransition,style:{pointerEvents:"none"},children:e(H.path,{d:v.d,fill:`url(#${a}-fill)`,stroke:`url(#${a}-stroke)`,strokeWidth:"1.25",vectorEffect:"non-scaling-stroke",style:{transformBox:"fill-box",transformOrigin:"center"},animate:{x:v.dx*T,y:v.dy*T,scale:L,opacity:R},transition:Ere})}),e("path",{d:v.d,fill:"transparent",stroke:"transparent",strokeWidth:"26",strokeLinejoin:"round",className:"cursor-pointer",onPointerEnter:()=>{u(!0),m(k)},onPointerLeave:()=>{m((A)=>A===k?null:A),g((A)=>A===k?null:A)},onPointerDown:()=>g(k),onPointerUp:()=>g((A)=>A===k?null:A),onPointerCancel:()=>g(null)})]},v.d)})})})]});return n("svg",{viewBox:"0 0 512 512",className:d(t.motion&&`logo-${t.motion}`,t.className),"aria-hidden":"true",children:[t.glow&&e("defs",{children:n("linearGradient",{id:`${a}-facet-glow`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[e("stop",{offset:"0%",stopColor:"var(--color-accent)",stopOpacity:"0.85"}),e("stop",{offset:"100%",stopColor:"var(--color-facet-lit)",stopOpacity:"0.35"})]})}),e("g",{transform:"translate(-566 -72)",children:c7.map((v,k)=>e("path",{className:"facet",d:v.d,fill:v.fill,stroke:t.glow?`url(#${a}-facet-glow)`:void 0,strokeWidth:t.glow?"1.5":void 0,vectorEffect:t.glow?"non-scaling-stroke":void 0,style:{"--i":k,"--dx":v.dx,"--dy":v.dy,transform:t.spread!==void 0&&t.motion!=="busy"?`translate(${v.dx*t.spread}px, ${v.dy*t.spread}px)`:void 0}},v.d))})]})}function hc(t){let a=t.size==="sm"?"size-10":t.size==="lg"?"size-20":"size-14";return n("div",{className:d("flex flex-col items-center justify-center gap-3.5 select-none",t.className),children:[n("div",{className:d("relative flex items-center justify-center",a),children:[e(H.div,{className:"pointer-events-none absolute -inset-3 rounded-full bg-accent/15 blur-xl",animate:{scale:[0.85,1.25,0.85],opacity:[0.2,0.45,0.2]},transition:{duration:2.4,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),e(Aa,{motion:"busy",className:"relative size-full drop-shadow-[0_4px_16px_oklch(0_0_0/0.18)]"})]}),t.text&&e("div",{className:"shimmer-text text-xs tracking-wider text-dim",children:t.text})]})}class bL{context;active=!0;revision=0;controller;state={pending:!1,error:null};listeners=new Set;update(t){if(t?.text!==this.context?.text||t?.draftKey!==this.context?.draftKey||t?.busy!==this.context?.busy||t?.disabled!==this.context?.disabled)this.revision++;this.context=t}activate(){this.active=!0}dispose(){this.active=!1,this.controller?.abort(),this.controller=void 0,this.state={...this.state,pending:!1}}subscribe=(t)=>(this.listeners.add(t),()=>this.listeners.delete(t));getSnapshot=()=>this.state;publish(t,a){this.state={pending:t,error:a};for(let c of this.listeners)c()}clearError=()=>this.publish(this.state.pending,null);run=async(t)=>{if(!this.active||this.controller)return;let a=this.context;if(!a||a.busy||a.disabled){this.publish(!1,"当前不可用,未执行");return}let c=this.revision,u=new AbortController;this.controller=u,this.publish(!0,null);try{let f=await t(a.text,u.signal);if(!this.active||u.signal.aborted)return;if(c!==this.revision){this.publish(!0,this.context?.busy||this.context?.disabled?"当前不可用,未执行":"草稿已更改,未覆盖当前内容");return}a.setText((m)=>{if(!this.active||u.signal.aborted||c!==this.revision||m!==a.text)return queueMicrotask(()=>{if(this.active&&!u.signal.aborted)this.publish(this.state.pending,this.context?.busy||this.context?.disabled?"当前不可用,未执行":"草稿已更改,未覆盖当前内容")}),m;return f})}catch(f){if(this.active&&!u.signal.aborted)this.publish(!0,f instanceof Error?f.message:String(f))}finally{if(this.controller===u){if(this.controller=void 0,this.active)this.publish(!1,this.state.error)}}}}var Je=jt(null);function x(){let t=M(Je);if(!t)throw Error("Plugin Web UI provider is missing");return t}function Pre(t){let a=i(null);if(!a.current)a.current=new bL;let c=a.current;return c.update(t.context),o(()=>(c.activate(),()=>c.dispose()),[c]),{...Kr(c.subscribe,c.getSnapshot,c.getSnapshot),run:c.run,clearError:c.clearError}}function Are({pending:t,disabled:a,...c}){let{Button:u}=x();return ct(u,{...c,type:"button",size:"sm",variant:"ghost",disabled:a||t,loading:t,"aria-busy":t||void 0})}var gc="shell-guard";class Mu extends Error{constructor(t){super(t);this.name="BadRequestError"}}var u7="chatgpt:subscription";var yl=["openai-completions","openai-responses","anthropic-messages"],vl={"openai-completions":"OpenAI Chat Completions","openai-responses":"OpenAI Responses","anthropic-messages":"Anthropic Messages"};function Qa(t){if(typeof t==="number")return Number.isFinite(t)&&t>0?Math.round(t):void 0;if(typeof t!=="string")return;let a=t.trim().toLowerCase();if(!a)return;let c=a.match(/^(\d+(?:\.\d+)?)\s*(k|m)?(?:i?b|tokens?)?$/);if(!c)return;let u=Number.parseFloat(c[1]??"");if(!Number.isFinite(u)||u<=0)return;let f=c[2];if(f==="k")return Math.round(u*1000);if(f==="m")return Math.round(u*1e6);return Math.round(u)}function Wt(t){if(t>=1e6&&t%1e5===0)return`${t/1e6}m`;if(t>=1000&&t%1000===0)return`${t/1000}k`;return String(t)}function Vs(t){return t.map((a)=>{let c=a.name===a.id?a.id:`${a.id}=${a.name}`,u=[];if(a.contextWindow!==void 0)u.push(Wt(a.contextWindow));if(a.maxTokens!==void 0)if(a.contextWindow!==void 0)u.push(Wt(a.maxTokens));else u.push(`max=${Wt(a.maxTokens)}`);return u.length>0?`${c} [${u.join(", ")}]`:c}).join(`
20
+ `)}var d7=["ready","backfilling","rebuilding","degraded","disabled"],f7=["bad_regex","too_broad","unavailable"];var m7=4,p7="https://basalt.work";var Du="http://127.0.0.1:7420";var Ja="basalt.session.group.reopen";function xc(t){let a=t.metadata?.["session.group"];if(!a||typeof a!=="object")return;let{id:c,title:u,parentSeq:f}=a;if(typeof c!=="string"||typeof u!=="string"||typeof f!=="number")return;return{id:c,title:u,parentSeq:f}}function bl(t){return/eyJ[A-Za-z0-9+/=_-]{16,}/.exec(t)?.[0]}function xl(t){try{let a=t.replace(/-/g,"+").replace(/_/g,"/"),c=JSON.parse(atob(a));if(c&&typeof c==="object"&&"t"in c&&typeof c.t==="string")return c.t}catch{}return}var h7=(t)=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mre=(t)=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,c,u)=>u?u.toUpperCase():c.toLowerCase()),wL=(t)=>{let a=Mre(t);return a.charAt(0).toUpperCase()+a.slice(1)},Nw=(...t)=>t.filter((a,c,u)=>Boolean(a)&&a.trim()!==""&&u.indexOf(a)===c).join(" ").trim(),g7=(t)=>{for(let a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};var x7={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var v7=_e(({color:t="currentColor",size:a=24,strokeWidth:c=2,absoluteStrokeWidth:u,className:f="",children:m,iconNode:p,...g},v)=>ct("svg",{ref:v,...x7,width:a,height:a,stroke:t,strokeWidth:u?Number(c)*24/Number(a):c,className:Nw("lucide",f),...!m&&!g7(g)&&{"aria-hidden":"true"},...g},[...p.map(([k,S])=>ct(k,S)),...Array.isArray(m)?m:[m]]));var s=(t,a)=>{let c=_e(({className:u,...f},m)=>ct(v7,{ref:m,iconNode:a,className:Nw(`lucide-${h7(wL(t))}`,`lucide-${t}`,u),...f}));return c.displayName=wL(t),c};var Dre=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],vc=s("chart-column",Dre);var Nre=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],be=s("circle-alert",Nre);var Ore=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],Ui=s("circle-pause",Ore);var _re=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],si=s("circle-question-mark",_re);var zre=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Qn=s("code-xml",zre);var Bre=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Gt=s("ellipsis",Bre);var Fre=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],Nu=s("file-pen",Fre);var Vre=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],bc=s("house",Vre);var Ure=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Jn=s("layers",Ure);var qre=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ie=s("loader-circle",qre);var Hre=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],kn=s("message-circle-question-mark",Hre);var jre=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Ou=s("panel-left-close",jre);var Gre=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],_u=s("panel-left-open",Gre);var $re=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],$n=s("sparkles",$re);var Kre=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Or=s("square-pen",Kre);var Wre=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],dn=s("square-terminal",Wre);var Xre=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],er=s("triangle-alert",Xre);var Yre=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],al=s("wand-sparkles",Yre);var Qre=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],c0=s("activity",Qre);var Zre=[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]],Rf=s("alarm-clock",Zre);var Jre=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M14 8h.01",key:"1primd"}]],u0=s("app-window-mac",Jre);var eoe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],d0=s("archive-restore",eoe);var toe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Dt=s("archive",toe);var noe=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],f0=s("arrow-down-left",noe);var roe=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],m0=s("arrow-down-to-line",roe);var ooe=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],p0=s("arrow-down",ooe);var aoe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],tr=s("arrow-left",aoe);var ioe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],h0=s("arrow-right",ioe);var soe=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],g0=s("arrow-up-down",soe);var loe=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],bt=s("arrow-up-right",loe);var coe=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],zu=s("arrow-up",coe);var uoe=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ht=s("ban",uoe);var doe=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],x0=s("blocks",doe);var foe=[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],v0=s("book-marked",foe);var moe=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],b0=s("bot",moe);var poe=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Ef=s("brain",poe);var hoe=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],y0=s("cable",hoe);var goe=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],nr=s("calendar-clock",goe);var xoe=[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]],w0=s("case-sensitive",xoe);var voe=[["path",{d:"m13.11 7.664 1.78 2.672",key:"go2gg9"}],["path",{d:"m14.162 12.788-3.324 1.424",key:"11x848"}],["path",{d:"m20 4-6.06 1.515",key:"1wxxh7"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["circle",{cx:"12",cy:"6",r:"2",key:"1jj5th"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}],["circle",{cx:"9",cy:"15",r:"2",key:"lf2ghp"}]],k0=s("chart-network",voe);var boe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Z=s("check",boe);var yoe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ge=s("chevron-down",yoe);var woe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Nt=s("chevron-right",woe);var koe=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],S0=s("chevrons-up-down",koe);var Soe=[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]],C0=s("clipboard-paste",Soe);var Coe=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ca=s("clock",Coe);var Ioe=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Cn=s("copy",Ioe);var Toe=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],I0=s("corner-down-left",Toe);var Loe=[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],ua=s("corner-down-right",Loe);var Roe=[["path",{d:"M20 20v-7a4 4 0 0 0-4-4H4",key:"1nkjon"}],["path",{d:"M9 14 4 9l5-5",key:"102s5s"}]],T0=s("corner-up-left",Roe);var Eoe=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],dr=s("cpu",Eoe);var Poe=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],pr=s("database",Poe);var Aoe=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],da=s("download",Aoe);var Moe=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]],Pf=s("eraser",Moe);var Doe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],mr=s("external-link",Doe);var Noe=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],L0=s("eye-off",Noe);var Ooe=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],R0=s("eye",Ooe);var _oe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],E0=s("file-down",_oe);var zoe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],P0=s("file-plus",zoe);var Boe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],xt=s("file-text",Boe);var Foe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]],A0=s("file-up",Foe);var Voe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],xs=s("file",Voe);var Uoe=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3-3-3 3",key:"e37ymu"}],["path",{d:"m15 5-3 3-3-3",key:"19d6lf"}]],M0=s("fold-vertical",Uoe);var qoe=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],yc=s("folder-open",qoe);var Hoe=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Af=s("folder-plus",Hoe);var joe=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],D0=s("folder-search",joe);var Goe=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]],N0=s("folder-x",Goe);var $oe=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],dt=s("folder",$oe);var Koe=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],at=s("git-fork",Koe);var Woe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Ue=s("globe",Woe);var Xoe=[["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M6 20V4",key:"1w1bmo"}],["path",{d:"M18 20V4",key:"o2hl4u"}]],O0=s("heading",Xoe);var Yoe=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Mf=s("history",Yoe);var Qoe=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],_0=s("image-plus",Qoe);var Zoe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Df=s("image",Zoe);var Joe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Bu=s("info",Joe);var eae=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],pa=s("keyboard",eae);var tae=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],z0=s("link",tae);var nae=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],B0=s("list-checks",nae);var rae=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],F0=s("list-filter",rae);var oae=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],V0=s("menu",oae);var aae=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Br=s("message-circle",aae);var iae=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"m10 8-3 3 3 3",key:"fp6dz7"}],["path",{d:"M17 14v-1a2 2 0 0 0-2-2H7",key:"1tkjnz"}]],Fu=s("message-square-reply",iae);var sae=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],il=s("messages-square",sae);var lae=[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m14.305 7.53.923-.382",key:"1mlnsw"}],["path",{d:"m15.228 4.852-.923-.383",key:"82mpwg"}],["path",{d:"m16.852 3.228-.383-.924",key:"ln4sir"}],["path",{d:"m16.852 8.772-.383.923",key:"1dejw0"}],["path",{d:"m19.148 3.228.383-.924",key:"192kgf"}],["path",{d:"m19.53 9.696-.382-.924",key:"fiavlr"}],["path",{d:"m20.772 4.852.924-.383",key:"1j8mgp"}],["path",{d:"m20.772 7.148.924.383",key:"zix9be"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]],Nf=s("monitor-cog",lae);var cae=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],fr=s("monitor",cae);var uae=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],ma=s("moon",uae);var dae=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],fa=s("palette",dae);var fae=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],wc=s("panel-right",fae);var mae=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],eh=s("paperclip",mae);var pae=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],et=s("pencil",pae);var hae=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],hr=s("play",hae);var gae=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]],U0=s("plug",gae);var xae=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],we=s("plus",xae);var vae=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],Mt=s("puzzle",vae);var bae=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ye=s("refresh-cw",bae);var yae=[["path",{d:"M17 3v10",key:"15fgeh"}],["path",{d:"m12.67 5.5 8.66 5",key:"1gpheq"}],["path",{d:"m12.67 10.5 8.66-5",key:"1dkfa6"}],["path",{d:"M9 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2z",key:"swwfx4"}]],q0=s("regex",yae);var wae=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Of=s("rotate-ccw",wae);var kae=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],th=s("search-x",kae);var Sae=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Pe=s("search",Sae);var Cae=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Bn=s("server",Cae);var Iae=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],pt=s("settings",Iae);var Tae=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],_f=s("settings-2",Tae);var Lae=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Fr=s("shield-alert",Lae);var Rae=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Fn=s("shield-check",Rae);var Eae=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],zf=s("square",Eae);var Pae=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],ha=s("sun",Pae);var Aae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Ma=s("target",Aae);var Mae=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Pt=s("terminal",Mae);var Dae=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M10 12H3",key:"1ulcyk"}],["path",{d:"M10 19H3",key:"108z41"}],["circle",{cx:"17",cy:"15",r:"3",key:"1upz2a"}],["path",{d:"m21 19-1.9-1.9",key:"dwi7p8"}]],H0=s("text-search",Dae);var Nae=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],pe=s("trash-2",Nae);var Oae=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],Bf=s("undo-2",Oae);var _ae=[["circle",{cx:"7",cy:"12",r:"3",key:"12clwm"}],["path",{d:"M10 9v6",key:"17i7lo"}],["circle",{cx:"17",cy:"12",r:"3",key:"gl7c2s"}],["path",{d:"M14 7v8",key:"dl84cr"}],["path",{d:"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1",key:"lt2kga"}]],j0=s("whole-word",_ae);var zae=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],G0=s("workflow",zae);var Bae=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Ff=s("wrench",Bae);var Fae=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],oe=s("x",Fae);var Vae=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],$0=s("zoom-in",Vae);var Uae=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],K0=s("zoom-out",Uae);var z7={typescript:()=>(C("pry6wdbe"),import("./chunk-pry6wdbe.js")),tsx:()=>(C("rbmp2e4b"),import("./chunk-rbmp2e4b.js")),javascript:()=>(C("wfa1c8dn"),import("./chunk-wfa1c8dn.js")),jsx:()=>(C("z7tdzen9"),import("./chunk-z7tdzen9.js")),json:()=>(C("ypmm1gts"),import("./chunk-ypmm1gts.js")),jsonc:()=>(C("8g239029"),import("./chunk-8g239029.js")),bash:()=>(C("wg2exnxe"),import("./chunk-wg2exnxe.js")),python:()=>(C("r5eakmw6"),import("./chunk-r5eakmw6.js")),go:()=>(C("z09emmrb"),import("./chunk-z09emmrb.js")),rust:()=>(C("dmqtdeb4"),import("./chunk-dmqtdeb4.js")),css:()=>(C("8nxjthxc"),import("./chunk-8nxjthxc.js")),html:()=>(C("qych3sbs"),import("./chunk-qych3sbs.js")),xml:()=>(C("0khcpaa8"),import("./chunk-0khcpaa8.js")),diff:()=>(C("r1dnh0s8"),import("./chunk-r1dnh0s8.js")),yaml:()=>(C("9kbrjmtz"),import("./chunk-9kbrjmtz.js")),toml:()=>(C("nzey7cpv"),import("./chunk-nzey7cpv.js")),sql:()=>(C("qxvqkkmw"),import("./chunk-qxvqkkmw.js")),markdown:()=>(C("4wd9r73y"),import("./chunk-4wd9r73y.js")),dockerfile:()=>(C("t6agpn2z"),import("./chunk-t6agpn2z.js")),c:()=>(C("t0ywnp5e"),import("./chunk-t0ywnp5e.js")),cpp:()=>(C("6q3p851n"),import("./chunk-6q3p851n.js")),java:()=>(C("ryw7xnab"),import("./chunk-ryw7xnab.js")),kotlin:()=>(C("hp167dbv"),import("./chunk-hp167dbv.js")),swift:()=>(C("ad6x47yy"),import("./chunk-ad6x47yy.js")),ruby:()=>(C("xg4v60m7"),import("./chunk-xg4v60m7.js")),php:()=>(C("8g55ytgz"),import("./chunk-8g55ytgz.js"))},qae={ts:"typescript",mts:"typescript",cts:"typescript",js:"javascript",mjs:"javascript",cjs:"javascript",sh:"bash",shell:"bash",zsh:"bash",console:"bash",py:"python",rs:"rust",yml:"yaml",md:"markdown",htm:"html",docker:"dockerfile",h:"c",hpp:"cpp",cc:"cpp",kt:"kotlin",rb:"ruby",patch:"diff"};function B7(t){if(!t)return;let a=t.toLowerCase().trim(),c=a.split("/").pop()??a;if(c==="dockerfile")return"dockerfile";if(c.includes("."))a=c.split(".").pop()??a;return a=qae[a]??a,a in z7?a:void 0}var O7,kL,F7=new Set,_7=new Map,Hae=32000,jae=256,Vf=new Map;function Gae(){return O7??=(async()=>{let[{createHighlighterCore:t},{createJavaScriptRegexEngine:a},c,u]=await Promise.all([(C("v7zq4vc9"),import("./chunk-v7zq4vc9.js")),(C("d18r4m14"),import("./chunk-d18r4m14.js")),(C("xet1jjy9"),import("./chunk-xet1jjy9.js")),(C("9v1f6yc8"),import("./chunk-9v1f6yc8.js"))]);return t({themes:[c.default,u.default],langs:[],engine:a()})})(),O7}function Ow(t){let a=_7.get(t);if(!a){let c=z7[t];if(!c)return Promise.resolve();a=(async()=>{let u=await Gae();await u.loadLanguage((await c()).default),kL=u,F7.add(t)})(),_7.set(t,a)}return a}function _w(t,a){if(!kL||!F7.has(a)||t.length>Hae)return;let c=`${a}\x00${t}`,u=Vf.get(c);if(u!==void 0)return Vf.delete(c),Vf.set(c,u),u;let f=kL.codeToHtml(t,{lang:a,themes:{light:"vitesse-light",dark:"vitesse-dark"},defaultColor:!1});if(Vf.size>=jae){let m=Vf.keys().next().value;if(m!==void 0)Vf.delete(m)}return Vf.set(c,f),f}class zw extends Error{stale;name="ViewLoadError";constructor(t,a){super(t?"Basalt 已更新,当前页面是旧版本":"代码加载时网络中断",a);this.stale=t}}var V7=new WeakMap;function kc(t,a){let c=V7.get(t);if(c)return c;let u=Ib(async()=>{try{return await a()}catch(f){throw new zw(await $ae(),{cause:f})}});return V7.set(t,u),u}async function $ae(){if(typeof document>"u")return!1;let t=document.querySelector('script[type="module"][src]')?.src;if(!t)return!1;let a=await fetch(new URL("/",location.href),{cache:"no-store"}).then((u)=>u.ok?u.text():"").catch(()=>""),c=new URL(t).pathname.split("/").pop();return Boolean(a&&c&&!a.includes(c))}function Tr(t){let a=t,c=new Set;return{get:()=>a,set(u){a=typeof u==="function"?u(a):u;for(let f of c)f(a)},subscribe(u){return c.add(u),()=>c.delete(u)}}}function se(t){return Kr(t.subscribe,t.get,t.get)}function Et(t,a,c=Object.is){let u=i(void 0),f=()=>{let m=t.get(),p=u.current;if(p&&p.value===m)return p.selected;let g=a(m);if(p&&c(p.selected,g))return u.current={value:m,selected:p.selected},p.selected;return u.current={value:m,selected:g},g};return Kr(t.subscribe,f,f)}function Bw(t,a){if(Object.is(t,a))return!0;let c=Object.keys(t);if(c.length!==Object.keys(a).length)return!1;return c.every((u)=>Object.is(t[u],a[u]))}var Fw={sans:'"Inter Variable", ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif',serif:'"Source Serif 4 Variable", "Iowan Old Style", Georgia, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", serif',mono:'"JetBrains Mono Variable", ui-monospace, "SF Mono", Menlo, Consolas, monospace'},Vw={scheme:"light",colors:{bg:"oklch(0.984 0.002 95)",sidebar:"oklch(0.966 0.003 95)",panel:"oklch(1 0 0)",raised:"oklch(0.94 0.004 95)",bubble:"oklch(0.948 0.004 95)",line:"oklch(0.905 0.005 95)",lineStrong:"oklch(0.84 0.006 95)",ink:"oklch(0.22 0.006 250)",dim:"oklch(0.47 0.008 250)",faint:"oklch(0.63 0.008 250)",accent:"oklch(0.53 0.085 172)",accentStrong:"oklch(0.47 0.085 172)",accentInk:"oklch(0.99 0.01 172)",accentSoft:"oklch(0.53 0.085 172 / 0.11)",danger:"oklch(0.55 0.17 27)",dangerFill:"oklch(0.52 0.17 27)",dangerFillHover:"oklch(0.47 0.17 27)",success:"oklch(0.56 0.11 155)",warning:"oklch(0.7 0.14 70)",overlay:"oklch(0.2 0.01 250 / 0.32)",facet:"oklch(0.32 0.012 240)",facetLit:"oklch(0.46 0.012 240)",facetShade:"oklch(0.27 0.01 240)",hex:{bg:"#f9f9f8",panel:"#ffffff",ink:"#1b1f24",dim:"#5b6068",faint:"#878c94",line:"#e3e2dd",lineStrong:"#cfcdc7"},chartPalette:["#2a78d6","#eb6834","#1baf7a","#eda100","#e87ba4","#008300","#4a3aa7","#e34948"],chartSequential:["#cde2fb","#86b6ef","#3987e5","#1c5cab","#0d366b"]},fonts:Fw,shadows:{float:"0 1px 2px oklch(0.2 0.01 250 / 0.05), 0 8px 28px -6px oklch(0.2 0.01 250 / 0.14)",composer:"0 1px 2px oklch(0.2 0.01 250 / 0.04), 0 6px 24px -8px oklch(0.2 0.01 250 / 0.1)"}},Uw={scheme:"dark",colors:{bg:"oklch(0.215 0.005 250)",sidebar:"oklch(0.19 0.005 250)",panel:"oklch(0.248 0.006 250)",raised:"oklch(0.285 0.006 250)",bubble:"oklch(0.27 0.006 250)",line:"oklch(0.3 0.006 250)",lineStrong:"oklch(0.37 0.007 250)",ink:"oklch(0.94 0.003 250)",dim:"oklch(0.77 0.005 250)",faint:"oklch(0.6 0.006 250)",accent:"oklch(0.76 0.085 172)",accentStrong:"oklch(0.82 0.08 172)",accentInk:"oklch(0.22 0.03 172)",accentSoft:"oklch(0.76 0.085 172 / 0.13)",danger:"oklch(0.72 0.14 27)",dangerFill:"oklch(0.5 0.165 25)",dangerFillHover:"oklch(0.55 0.175 25)",success:"oklch(0.76 0.12 155)",warning:"oklch(0.8 0.13 75)",overlay:"oklch(0.1 0.005 250 / 0.55)",facet:"oklch(0.76 0.01 240)",facetLit:"oklch(0.91 0.006 240)",facetShade:"oklch(0.64 0.012 240)",hex:{bg:"#1d1f21",panel:"#26282c",ink:"#eceef1",dim:"#b8bcc2",faint:"#83878e",line:"#35383d",lineStrong:"#45484e"},chartPalette:["#3987e5","#d95926","#199e70","#c98500","#d55181","#008300","#9085e9","#e66767"],chartSequential:["#184f95","#2a78d6","#5598e7","#9ec5f4","#cde2fb"]},fonts:Fw,shadows:{float:"0 1px 2px oklch(0 0 0 / 0.3), 0 10px 32px -6px oklch(0 0 0 / 0.5)",composer:"0 1px 2px oklch(0 0 0 / 0.25), 0 8px 28px -8px oklch(0 0 0 / 0.45)"}},Zn={"surface.panel":"overflow-hidden rounded-xl border border-line bg-panel text-ink","surface.card":"rounded-2xl border border-line bg-panel text-ink","surface.subtle":"rounded-xl border border-line/60 bg-raised/25","surface.interactive":"overflow-hidden rounded-xl border border-line bg-panel/70 transition-colors hover:border-line-strong hover:bg-panel","surface.dock":"relative flex flex-col overflow-hidden rounded-[20px] border border-line bg-panel shadow-[inset_0_1px_0_oklch(1_0_0/0.045),var(--shadow-composer)] outline-none","surface.empty":"py-8 text-center text-xs text-faint","surface.emptyDashed":"flex flex-col items-center gap-3 rounded-2xl border border-dashed border-line-strong/70 px-6 py-16 text-center","surface.floating":"z-50 min-w-40 overflow-hidden rounded-xl border border-line bg-panel p-1 text-ink shadow-float outline-none data-[state=closed]:animate-float-out data-[state=open]:animate-float-in","surface.floatingItem":"relative flex min-h-8 w-full cursor-default items-center gap-2.5 rounded-lg px-2 py-1.5 text-left text-[13.5px] outline-none select-none transition-colors duration-100 data-highlighted:bg-raised data-[selected=true]:bg-raised [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-faint","surface.floatingLabel":"px-2 pt-1.5 pb-1 text-xs font-medium text-faint","surface.floatingSeparator":"-mx-1 my-1 h-px bg-line","surface.toolbarFloating":"flex items-center gap-0.5 rounded-lg border border-line/70 bg-panel/85 p-0.5 shadow-xs backdrop-blur-sm","surface.tooltip":"z-50 flex origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-ink px-2 py-1 text-xs font-medium text-bg shadow-float select-none data-[state=closed]:animate-float-out data-[state=delayed-open]:animate-float-in data-[state=instant-open]:animate-fade","surface.dialog":"fixed z-50 flex max-h-[min(92dvh,48rem)] w-full flex-col border border-line bg-panel shadow-float outline-none max-sm:sheet-surface max-sm:data-[state=closed]:animate-sheet-out max-sm:data-[state=open]:animate-sheet-in sm:top-1/2 sm:left-1/2 sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-2xl sm:data-[state=closed]:animate-dialog-out sm:data-[state=open]:animate-dialog-in","surface.overlay":"fixed inset-0 z-40 bg-overlay backdrop-blur-[2px] data-[state=closed]:animate-overlay-out data-[state=open]:animate-overlay-in","toast.item":"pointer-events-auto flex w-full items-start gap-2.5 rounded-xl border border-line bg-panel px-3.5 py-2.5 text-[13.5px] leading-5 text-ink shadow-float outline-none data-[state=closed]:animate-float-out data-[state=open]:animate-rise data-[swipe=end]:animate-float-out data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]","toast.danger":"border-danger/35","button.base":"relative inline-flex shrink-0 items-center justify-center gap-1.5 font-medium whitespace-nowrap transition-[background-color,border-color,color,box-shadow,scale,opacity] duration-150 ease-out-quint select-none active:scale-[0.96] data-[state=open]:scale-100 data-[state=open]:active:scale-100 disabled:pointer-events-none disabled:opacity-45 [&_svg]:shrink-0","button.primary":"bg-accent text-accent-ink shadow-[inset_0_1px_0_oklch(1_0_0/0.12)] hover:bg-accent-strong","button.secondary":"border border-line bg-panel text-ink shadow-xs hover:border-line-strong hover:bg-raised/60","button.ghost":"text-dim hover:bg-raised hover:text-ink data-[state=open]:bg-raised data-[state=open]:text-ink","button.danger":"bg-danger-fill text-white shadow-[inset_0_1px_0_oklch(1_0_0/0.12)] hover:bg-danger-fill-hover","button.dangerGhost":"text-danger hover:bg-danger/10","button.inverse":"bg-ink text-bg hover:bg-ink/85","control.input":"w-full rounded-[10px] border border-line bg-bg px-3 text-sm text-ink outline-none transition-[border-color,box-shadow] duration-150 placeholder:text-faint hover:border-line-strong focus:border-accent/60 focus:shadow-[0_0_0_3px_var(--color-accent-soft)] disabled:opacity-50 aria-invalid:border-danger/60","control.chipTrigger":"inline-flex h-8 max-w-full min-w-0 items-center gap-1.5 rounded-full border border-line bg-panel px-3 text-xs text-dim shadow-xs transition-[background-color,border-color,color,scale] duration-150 ease-out-quint select-none hover:border-line-strong hover:bg-raised/60 hover:text-ink active:scale-[0.97] data-[state=open]:border-line-strong data-[state=open]:bg-raised data-[state=open]:text-ink disabled:pointer-events-none disabled:opacity-45","control.fieldTrigger":"inline-flex h-9 w-full min-w-0 items-center gap-2 rounded-[10px] border border-line bg-bg px-3 text-sm text-ink transition-[border-color,box-shadow] duration-150 select-none hover:border-line-strong data-[state=open]:border-accent/60 data-[state=open]:shadow-[0_0_0_3px_var(--color-accent-soft)] disabled:pointer-events-none disabled:opacity-50","control.segmented":"relative inline-flex rounded-xl bg-raised p-1","control.segmentedPill":"pointer-events-none absolute top-0 left-0 rounded-lg bg-panel opacity-0 shadow-xs will-change-transform","control.switch":"group/switch relative inline-flex h-5.5 w-9.5 shrink-0 items-center rounded-full p-0.5 transition-colors duration-200 disabled:opacity-45 data-[state=checked]:bg-accent data-[state=unchecked]:bg-line-strong","control.switchThumb":"block h-4.5 w-4.5 rounded-full bg-white shadow-[0_1px_3px_oklch(0_0_0/0.2)] transition-[translate,width] duration-300 ease-spring group-active/switch:w-5.5 data-[state=checked]:translate-x-4 group-active/switch:data-[state=checked]:translate-x-3","control.kbd":"inline-flex h-4.5 min-w-4.5 items-center justify-center rounded border border-line bg-raised px-1 font-sans text-[10.5px] leading-none font-medium text-faint","control.badge":"inline-flex items-center rounded-md bg-raised px-1.5 py-0.5 text-[10.5px] leading-none font-medium text-faint","control.badgeAccent":"inline-flex shrink-0 items-center rounded-md bg-accent-soft px-1.5 py-0.5 text-[11px] leading-none font-medium text-accent","control.iconCircle":"group relative flex size-7 items-center justify-center rounded-full border border-line bg-raised/40 text-dim transition-all duration-200 hover:border-accent hover:bg-accent/10 hover:text-accent disabled:opacity-35","command.inputWrap":"flex shrink-0 items-center gap-2 border-b border-line px-3","command.input":"h-11 min-w-0 flex-1 bg-transparent text-[14px] outline-none placeholder:text-faint","command.group":"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pt-1.5 [&_[cmdk-group-heading]]:pb-1 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-faint","command.row":"relative flex w-full cursor-default gap-3 rounded-lg px-2.5 py-2 text-left outline-none select-none transition-colors duration-100 data-[selected=true]:bg-raised","code.base":"overflow-x-auto font-mono text-[12.5px] leading-[1.65] [&_pre]:bg-transparent! [&_pre]:outline-none","code.block":"group/code my-4 font-sans not-italic first:mt-0 last:mb-0","page.container":"mx-auto max-w-3xl animate-fade px-4 pt-6 pb-16 sm:px-6 sm:pt-10","page.title":"min-w-0 flex-1 font-serif text-[1.75rem] leading-tight tracking-[-0.015em]","page.description":"mb-8 text-sm text-dim","workspace.header":"box-content flex h-12 shrink-0 items-center gap-2 border-b border-line/60 px-3 pt-[env(safe-area-inset-top)]","settings.groupTitle":"text-[13px] font-medium text-dim","settings.groupDesc":"mt-0.5 text-xs text-faint","settings.groupBox":"divide-y divide-line overflow-hidden rounded-2xl border border-line bg-panel","settings.row":"flex flex-wrap items-center justify-between gap-4 p-4","settings.rowTitle":"text-sm font-medium text-ink","settings.rowDesc":"mt-0.5 text-xs leading-5 break-words text-dim","status.base":"inline-flex shrink-0 items-center gap-1.5 rounded-full px-2 py-1 text-[11px] leading-none font-medium","status.success":"bg-success/10 text-success","status.warning":"bg-warning/10 text-warning","status.danger":"bg-danger/10 text-danger","status.neutral":"bg-raised text-dim","callout.base":"flex animate-rise items-start gap-2.5 rounded-xl border px-3.5 py-2.5 text-[13.5px] leading-5","callout.info":"border-line bg-raised/40 text-dim","callout.danger":"border-danger/25 bg-danger/6 text-danger","chat.banner":"flex shrink-0 flex-wrap items-center justify-between gap-2 border-b border-line bg-raised/45 px-4 py-2 text-xs text-dim","chat.dockBanner":"flex shrink-0 flex-wrap items-center justify-between gap-2 rounded-[20px] border border-line bg-raised/55 px-4 py-3 text-xs text-dim","chat.userBubble":"rounded-[20px] rounded-br-md bg-bubble px-4 py-2.5 text-[14.5px] leading-[1.6] text-ink break-words whitespace-pre-wrap","chat.attachmentCard":"flex h-8 items-center gap-1.5 rounded-xl border border-line bg-panel px-2.5 text-xs text-dim","chat.prose":"font-serif text-[14.5px] leading-[1.78] tracking-[0.005em] break-words text-ink/84 [font-optical-sizing:auto]","chat.metaBadge":"inline-flex cursor-default select-none items-center gap-1 rounded-md border border-line/60 bg-raised/60 px-1.5 py-0.5 text-[11px] text-faint transition-colors hover:border-line hover:bg-raised hover:text-dim","chat.stepRow":"group/collapsible -mx-2 flex w-[calc(100%+1rem)] items-center gap-2 rounded-lg px-2 py-1.5 text-left text-[13.5px] transition-colors hover:bg-raised/60","chat.timelineRow":"group/collapsible -mx-2 flex w-[calc(100%+1rem)] items-center gap-2 rounded-lg px-2 py-1 text-left text-[12.5px] text-faint transition-colors enabled:hover:bg-raised/60 enabled:hover:text-dim","chat.thinkingBody":"mt-1.5 mb-2.5 font-serif text-[13.5px] leading-[1.65] text-dim italic [&_code]:font-mono [&_code]:text-[12px] [&_code]:not-italic [&_pre]:not-italic","chat.toolOutput":"max-h-80 overflow-auto px-4 py-3 font-mono text-[12.5px] leading-[1.65] whitespace-pre-wrap break-words","chat.diffAdd":"bg-success/10 text-success","chat.diffRemove":"bg-danger/9 text-danger","chat.foldPill":"group/fold flex cursor-pointer select-none items-center gap-2 rounded-full border border-line/70 bg-panel/90 px-3.5 py-1 text-xs text-faint transition-all hover:border-line hover:bg-raised/80 hover:text-dim active:scale-[0.98]","chat.scrollBottomBtn":"flex h-8 items-center gap-1.5 rounded-full border border-line bg-panel/95 px-3 text-xs font-medium text-dim shadow-float backdrop-blur-sm transition-[color,background-color,border-color,transform] hover:border-line-strong hover:bg-raised/80 hover:text-ink active:scale-95","search.highlight":"rounded-sm bg-accent-soft px-0.5 font-medium text-ink","search.filterChip":"inline-flex h-6 items-center gap-1 rounded-md border border-line bg-panel px-2 text-xs text-dim transition-colors hover:border-line-strong hover:bg-raised/60 hover:text-ink data-[state=open]:border-line-strong data-[state=open]:bg-raised","search.filterChipActive":"inline-flex h-6 items-center gap-1 rounded-md border border-accent/35 bg-accent-soft pl-2 pr-1 text-xs font-medium text-accent transition-colors hover:border-accent/55","composer.box":"group/composer relative min-w-0 rounded-[20px] border border-line bg-panel shadow-[inset_0_1px_0_oklch(1_0_0/0.045),var(--shadow-composer)] transition-[border-color,box-shadow] duration-300 focus-within:border-line-strong focus-within:shadow-[inset_0_1px_0_oklch(1_0_0/0.07),0_14px_38px_-10px_color-mix(in_oklch,var(--color-accent)_14%,transparent),var(--shadow-composer)]","composer.input":"relative block min-h-13 w-full resize-none bg-transparent px-4 pt-3.5 pb-1.5 text-[15px] leading-6 outline-none placeholder:text-faint","composer.attachment":"group/att flex h-9 items-center gap-2 rounded-xl border border-line bg-raised/60 pr-1.5 pl-2.5 text-xs","sidebar.shell":"flex h-full flex-col bg-sidebar pt-[env(safe-area-inset-top)]","sidebar.drawer":"fixed inset-y-0 left-0 z-0 flex w-[min(86vw,24rem)] flex-col bg-sidebar outline-none transition-[translate,opacity] duration-380 ease-out-quint md:hidden","sidebar.rightShell":"flex h-full w-full flex-col border-l border-line bg-bg","sidebar.rightDrawer":"fixed inset-y-0 right-0 z-50 flex w-[min(24rem,90vw)] flex-col border-l border-line bg-sidebar shadow-float outline-none","sidebar.navItem":"group flex h-9 w-full items-center gap-2.5 rounded-lg px-2 text-left text-sm select-none transition-colors duration-150 ease-out-quint max-md:h-10 max-md:rounded-xl max-md:text-[15px]","sidebar.sectionTitle":"flex-1 text-xs font-medium text-faint","sidebar.hoverPill":"pointer-events-none absolute top-0 left-0 rounded-lg bg-raised/65 opacity-0 will-change-transform max-md:rounded-xl","sidebar.activePill":"pointer-events-none absolute top-0 left-0 rounded-lg bg-raised opacity-0 max-md:rounded-xl shadow-[inset_0_1px_0_oklch(1_0_0/0.06)] will-change-transform","markdown.p":"my-4 in-data-[streaming]:animate-stream-block first:mt-0 last:mb-0 [&:has(+ol)]:mb-1.5 [&:has(+ul)]:mb-1.5","markdown.strong":"font-semibold text-ink","markdown.a":"font-medium text-accent underline decoration-accent/40 underline-offset-[3px] transition-colors hover:text-accent-strong hover:decoration-accent","markdown.fileChip":"mx-[0.18em] inline-flex max-w-full cursor-pointer items-baseline gap-1 rounded-md bg-raised/85 px-[0.42em] py-[0.08em] align-baseline font-mono text-[0.84em] leading-[1.4] text-ink/92 no-underline transition-colors hover:bg-accent-soft hover:text-accent active:scale-[0.99]","markdown.h1":"mt-6 mb-2.5 in-data-[streaming]:animate-stream-block text-[1.28em] leading-snug font-semibold text-ink first:mt-0","markdown.h2":"mt-6 mb-2.5 in-data-[streaming]:animate-stream-block text-[1.16em] leading-snug font-semibold text-ink first:mt-0","markdown.h3":"mt-5.5 mb-2 in-data-[streaming]:animate-stream-block text-[1.06em] font-semibold text-ink first:mt-0","markdown.h4":"mt-4.5 mb-1.5 in-data-[streaming]:animate-stream-block font-semibold text-ink first:mt-0","markdown.ul":"mt-1.5 mb-5 list-disc pl-[1.5em] marker:text-faint first:mt-0 last:mb-0","markdown.ol":"mt-1.5 mb-5 list-decimal pl-[1.6em] marker:text-[0.9em] marker:text-faint first:mt-0 last:mb-0","markdown.li":"my-2 in-data-[streaming]:animate-stream-block pl-1 [&>blockquote]:my-2.5 [&>div]:my-2.5 [&>div:first-child]:mt-2 [&>ol]:mt-1.5 [&>ol]:mb-3 [&>ol:first-child]:mt-1.5 [&>ol:last-child]:mb-3 [&>p]:my-2 [&>p:first-child]:mt-0 [&>p:last-child]:mb-0 [&>ul]:mt-1.5 [&>ul]:mb-3 [&>ul:first-child]:mt-1.5 [&>ul:last-child]:mb-3","markdown.blockquote":"my-3.5 in-data-[streaming]:animate-stream-block border-l-[3px] border-line-strong pl-3.5 text-dim italic","markdown.hr":"my-5 in-data-[streaming]:animate-stream-block border-line","markdown.inlineCode":"mx-[0.18em] rounded-md bg-raised/85 px-[0.38em] py-[0.12em] font-mono text-[0.84em] text-ink/95 break-words","markdown.details":"my-3.5 in-data-[streaming]:animate-stream-block overflow-hidden rounded-xl border border-line bg-raised/25 not-italic first:mt-0 last:mb-0","markdown.detailsTrigger":"group/collapsible flex w-full cursor-pointer items-center gap-2 px-3.5 py-2.5 text-left font-sans text-[13.5px] leading-snug font-medium text-ink transition-colors hover:bg-raised/55 data-[state=open]:bg-raised/35","markdown.detailsContent":"border-t border-line px-3.5 py-3 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0","markdown.imageButton":"my-3 block cursor-zoom-in overflow-hidden rounded-xl border border-line bg-panel text-left transition-[transform,filter] hover:brightness-95 active:scale-[0.99] focus-visible:ring-2 focus-visible:ring-accent outline-none","markdown.tableWrap":"my-4 in-data-[streaming]:animate-stream-block overflow-x-auto rounded-xl border border-line font-sans not-italic first:mt-0 last:mb-0","markdown.table":"w-full border-collapse text-[13.5px]","markdown.thead":"bg-raised/50","markdown.th":"min-w-24 border-b border-line px-3 py-2 text-left font-semibold","markdown.td":"min-w-24 border-t border-line px-3 py-2 align-top [&_code]:wrap-anywhere"};function nh(t){if(t?.type!=="extension"||t.namespace!=="agents"||t.kind!=="council_room"||t.schemaVersion!==1)return!1;return SL(t.payload)}function SL(t){if(!t||typeof t!=="object")return!1;let a=t;return typeof a.callID==="string"&&typeof a.roomID==="string"&&typeof a.topic==="string"&&typeof a.brief==="string"&&typeof a.round==="number"&&typeof a.maxRounds==="number"&&typeof a.state==="string"&&["running","consensus","diverged","aborted","error"].includes(a.state)&&Array.isArray(a.members)&&Array.isArray(a.messages)&&typeof a.createdAt==="number"&&typeof a.updatedAt==="number"}function rh(t){if(t?.type!=="extension"||t.namespace!=="agents"||t.kind!=="delegation"||t.schemaVersion!==1)return!1;let a=t.payload;return!!a&&typeof a==="object"&&"callID"in a&&typeof a.callID==="string"&&"childSessionID"in a&&typeof a.childSessionID==="string"&&"description"in a&&typeof a.description==="string"&&"context"in a&&["requirements","blank","fork"].includes(String(a.context))&&"state"in a&&CL(a.state)}function CL(t){return typeof t==="string"&&["running","waiting","context_exhausted","done","error","aborted","interrupted","failed","cancelled"].includes(t)}function U7(t){let a=new Map,c=new Map;for(let u of t){if(rh(u))a.set(u.payload.childSessionID,{...u.payload});if(nh(u))c.set(u.payload.roomID,{...u.payload});if(u.type==="extension"&&u.namespace==="agents"&&u.kind==="council_room_state"&&u.schemaVersion===1&&SL(u.payload)){if(c.has(u.payload.roomID))c.set(u.payload.roomID,{...u.payload});continue}if(u.type!=="extension"||u.namespace!=="agents"||u.kind!=="delegation_state"||u.schemaVersion!==1)continue;let f=u.payload;if(!f||typeof f!=="object"||!("childSessionID"in f)||typeof f.childSessionID!=="string")continue;let m=a.get(f.childSessionID);if(!m||!("state"in f)||!CL(f.state))continue;if(!("summary"in f)||typeof f.summary!=="string")continue;if(!("throughSeq"in f)||typeof f.throughSeq!=="number"||!Number.isSafeInteger(f.throughSeq)||f.throughSeq<0)continue;let p="runStartSeq"in f?f.runStartSeq:void 0;if(p!==void 0&&(typeof p!=="number"||!Number.isSafeInteger(p)||p<1))continue;a.set(m.childSessionID,{...m,state:f.state,pendingQuestions:"pendingQuestions"in f&&Array.isArray(f.pendingQuestions)?f.pendingQuestions.filter((g)=>!!g&&typeof g==="object"&&typeof g.text==="string"&&typeof g.askedAt==="number"&&Number.isFinite(g.askedAt)):void 0,handoff:"handoff"in f&&Kae(f.handoff)?f.handoff:void 0,contextFallback:"contextFallback"in f&&typeof f.contextFallback==="string"?f.contextFallback:void 0,summary:f.summary,throughSeq:f.throughSeq,runStartSeq:p})}return t.map((u)=>{if(rh(u)){let f=a.get(u.payload.childSessionID);return f?{...u,payload:f}:u}if(nh(u)){let f=c.get(u.payload.roomID);return f?{...u,payload:f}:u}return u})}function Kae(t){if(!t||typeof t!=="object"||!("conclusion"in t)||typeof t.conclusion!=="string")return!1;return["evidence","verification","uncertainties","changes","questions"].every((a)=>{let c=Reflect.get(t,a);return Array.isArray(c)&&c.every((u)=>typeof u==="string")})}function qw(t){let a=typeof t==="string"?t.trim():"";if(!a)return"";return a.split(/\r?\n/).map((u)=>u.trim()).filter(Boolean).at(-1)??""}function q7(t){let{Button:a,ModelIcon:c,style:u,useTheme:f}=x();f();let[m,p]=r(!1),g=t.context;if(!g)return null;let v=g,k=Boolean(v.busy??t.session?.status==="busy"),S=async()=>{if(m)return;p(!0);try{await t.connection.request(`/api/sessions/${encodeURIComponent(v.parentID)}/tasks/${encodeURIComponent(v.childID)}/kill`,{method:"POST"})}catch{await t.connection.request(`/api/sessions/${encodeURIComponent(v.childID)}/abort`,{method:"POST"}).catch(()=>{})}finally{p(!1)}},I=v.model?(v.model.includes("/")?v.model.slice(v.model.indexOf("/")+1):v.model).split(/[-_\s]+/).map((L)=>L.charAt(0).toUpperCase()+L.slice(1).toLowerCase()).join(" "):"",T=v.modelName||I||v.model;return n("div",{className:u("chat.dockBanner"),children:[n("div",{className:"mr-auto flex min-w-0 items-center gap-2",children:[e(at,{className:"size-4 shrink-0"}),e("span",{className:"shrink-0",children:"子会话只读"}),v.model&&n("span",{className:"inline-flex min-w-0 items-center gap-1.5 rounded-full border border-line bg-raised/50 px-2 py-0.5 text-xs text-dim",title:v.model,children:[e(c,{modelID:v.model,className:"size-3.5 shrink-0",size:14}),e("span",{className:"truncate",children:T})]})]}),k&&e(a,{size:"sm",variant:"danger-ghost",disabled:m,onClick:S,children:m?"正在停止…":"停止运行"}),e(a,{size:"sm",variant:"ghost",onClick:()=>v.onOpen(v.parentID),children:"返回父会话"}),v.expanded?e(a,{size:"sm",variant:"ghost",onClick:v.onToggleExpand,children:"收起"}):e(a,{size:"sm",onClick:v.onToggleExpand,children:"发送补充要求"})]})}function Wae(t){return typeof t==="string"?t:""}function H7(t){let{input:a,result:c,partialOutput:u,header:f,copyAction:m}=t,{Markdown:p,cn:g,style:v,useTheme:k}=x();k();let S=Wae(a.prompt),I=c?.output??u;return n("div",{className:v("surface.subtle","mt-1.5 mb-2.5 border-line/70 bg-raised/40"),children:[n("div",{className:"flex h-9 items-center justify-between border-b border-line/60 px-3.5 py-1.5 text-xs text-dim",children:[f,m]}),S&&e("div",{className:"max-h-72 overflow-y-auto px-4 py-3 text-[13px] leading-[1.6] text-dim",children:e(p,{text:S})}),I&&e("div",{className:g(S&&"border-t border-line/60"),children:e("pre",{className:v("chat.toolOutput","text-[12px]",c?.isError?"text-danger":"text-dim"),children:I})})]})}var Ho={running:"运行中",waiting:"等待回答",context_exhausted:"上下文耗尽",done:"完成",error:"失败",failed:"失败",aborted:"已取消",cancelled:"已取消",interrupted:"已中断"},Yo={running:"warning",waiting:"warning",context_exhausted:"warning",done:"success",error:"danger",failed:"danger",aborted:"neutral",cancelled:"neutral",interrupted:"warning"},ga=(t)=>t>=1000?`${(t/1000).toFixed(t>=1e4?0:1)}k`:String(t),Zo=(t)=>t>=60000?`${Math.floor(t/60000)} 分 ${Math.round(t%60000/1000)} 秒`:`${Math.round(t/1000)} 秒`;var Xae=1500;function X0(t){return typeof t==="string"?t:""}function j7(t){let{input:a,result:c,header:u,copyAction:f,sessionID:m,connection:p,onOpen:g}=t,{Markdown:v,style:k}=x(),S=X0(a.action),T=(Array.isArray(a.task_ids)?[...new Set(a.task_ids.map(X0).filter(Boolean))]:[X0(a.task_id)]).filter(Boolean),L=T.length>1,R=L?Qae(c?.output):new Map([[T[0]??"",c?.output]]);return n("div",{className:k("surface.subtle","mt-1.5 mb-2.5 border-line/70 bg-raised/40 text-xs"),children:[n("div",{className:"flex h-9 items-center justify-between border-b border-line/60 px-3.5 py-1.5 text-dim",children:[u,f]}),S==="wait"&&!c&&n("p",{className:"flex items-center gap-1.5 border-b border-line/60 px-4 py-2.5 text-warning",children:[e(ie,{className:"size-3.5 animate-spin"}),L?`正在等待 ${T.length} 个子任务全部完成…`:"正在等待子任务完成…"]}),S==="send"&&X0(a.message)&&n("div",{className:"border-b border-line/60 px-4 py-2.5",children:[e("p",{className:"mb-1 text-faint",children:"发给子任务的消息"}),e("div",{className:"text-[13px] leading-[1.6] text-ink/90",children:e(v,{text:X0(a.message)})})]}),T.map((A)=>e(Yae,{taskID:A,outcome:S==="wait"?Zae(R.get(A)):void 0,pending:!c,compactSummary:L,sessionID:m,connection:p,onOpen:g},A)),c?.output&&n("details",{className:"group/raw",children:[e("summary",{className:"cursor-pointer px-4 py-2 text-faint select-none hover:text-dim",children:"原始结果"}),e("pre",{className:k("chat.toolOutput","text-[11.5px]",c.isError?"text-danger":"text-dim"),children:c.output})]})]})}function Yae(t){let{Button:a,Markdown:c,ModelIcon:u,StatusChip:f,cn:m,style:p,useTheme:g}=x();g();let[v,k]=r(!1),S=Jae(t.sessionID,t.taskID,t.connection,t.pending),I=S?.delegation,T=I?.state,L=T==="running"||T==="waiting",R=(I?.summary?.trim()||I?.handoff?.conclusion.trim())??"",A=t.compactSummary?{chars:160,lines:4}:{chars:360,lines:8},E=R.length>A.chars||R.split(`
21
+ `).length>A.lines,P=I?.model||S?.session.model,D=[S&&L&&S.lastTool&&`最近 ${S.lastTool}`,S&&Zo(S.elapsedMs),S&&`输入 ${ga(S.usage.input)}`,S&&`输出 ${ga(S.usage.output)}`,S&&S.usage.cost>0&&`$${S.usage.cost.toFixed(4)}`].filter((N)=>Boolean(N));return n("div",{className:"border-b border-line/60",children:[n("div",{className:"flex min-w-0 flex-wrap items-center gap-2 px-4 py-2.5",children:[P?e(u,{modelID:P,className:"size-3.5 shrink-0",size:14}):e(at,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"min-w-0 truncate font-medium text-ink",title:I?.description??t.taskID,children:I?.description??S?.session.title??t.taskID}),T&&e(f,{tone:Yo[T]??"neutral",pulse:T==="running",children:Ho[T]??T}),D.length>0&&e("span",{className:"min-w-0 truncate text-faint tabular-nums",title:D.join(" "),children:D.join(" · ")}),t.onOpen&&n(a,{size:"sm",variant:"ghost",className:"ml-auto h-6 gap-1 rounded-md px-2 text-xs text-faint hover:text-ink",onClick:()=>t.onOpen?.(t.taskID),children:["进入子会话",e(bt,{className:"size-3.5"})]})]}),t.outcome&&e("p",{className:m("px-4 pb-2.5",t.outcome.tone),children:t.outcome.text}),R&&n("div",{className:"px-4 pb-3",children:[e("p",{className:"mb-1 text-faint",children:"子任务输出"}),e("div",{className:m("overflow-hidden text-[13px] leading-[1.65] break-words text-ink/90 [&_p]:my-1.5 [&>*:first-child]:mt-0",E&&!v&&(t.compactSummary?"max-h-24":"max-h-40")),children:e(c,{text:R})}),E&&n("button",{type:"button",className:p("chat.timelineRow","cursor-pointer select-none"),onClick:()=>k(!v),children:[e("span",{children:v?"收起":"展开全部"}),e(ge,{className:m("size-3.5 transition-transform",v&&"rotate-180")})]})]})]})}function Qae(t){return new Map((t??"").split(/^task_id=/m).filter(Boolean).map((a)=>{let c=a.indexOf(`
22
+ `);return[a.slice(0,c).trim(),a.slice(c+1)]}))}function Zae(t){let a=t?.split(`
23
+ `)[0]?.trim();if(!a)return;if(a==="finished")return{text:"子任务已完成",tone:"text-success"};if(a==="aborted")return{text:"子任务已中止",tone:"text-faint"};if(a.startsWith("timed out"))return{text:"等待超时,子任务仍在后台运行",tone:"text-warning"};if(a.startsWith("stopped waiting"))return{text:"你发来了新消息,已停止等待,子任务仍在后台运行",tone:"text-warning"};return}function Jae(t,a,c,u){let[f,m]=r(),p=f?.delegation?.state==="running"||f?.delegation?.state==="waiting";return o(()=>{if(!t||!a||!c)return;let g=!1,v=()=>c.request(`/api/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(a)}`).then((S)=>{if(!g)m(S)}).catch(()=>{});v();let k=u||p?setInterval(v,Xae):void 0;return()=>{g=!0,clearInterval(k)}},[t,a,c,u,p]),f}var eie={list:"列出全部",status:"查看状态",wait:"等待完成",kill:"取消",send:"发送补充要求",read:"读取记录"},tie={done:{label:"已完成",icon:Z,tone:"success"},message:{label:"收到补充要求",icon:Fu,tone:"faint"},question:{label:"提问",icon:Fu,tone:"warning"},waiting:{label:"等待回答",icon:Fu,tone:"warning"},aborted:{label:"已取消",icon:Ht,tone:"faint"},cancelled:{label:"已取消",icon:Ht,tone:"faint"},interrupted:{label:"已中断",icon:Ui,tone:"warning"},context_exhausted:{label:"上下文耗尽",icon:be,tone:"warning"}},nie=(t,a,c)=>{let u=tie[t.state]??{label:"失败",icon:be,tone:"danger"},f=a.split(`
24
+ `),g=((f[0]?.startsWith("[系统通知"))?f.slice(1):f).join(`
25
+ `).replace(/^[^\n]*?: \w+\.\s*/,"").trim();return{label:`子任务${u.label}`,title:c?.taskTitle,icon:u.icon,tone:u.tone,output:g||void 0}},G7={id:"agents",apiVersion:1,metadata:{description:"派生子代理并行协作、交接任务",icon:b0},projectEntries(t){let a=U7(t),c=new Set(a.filter(rh).map((m)=>m.payload.childSessionID)),u=new Set;for(let m of a.filter(nh)){u.add(m.payload.roomID);for(let p of m.payload.members)u.add(p.childSessionID)}let f=new Map;for(let m of a)if(m.type==="extension"&&m.namespace==="agents"&&m.kind==="message"&&m.schemaVersion===1&&m.payload&&typeof m.payload==="object"&&"text"in m.payload&&typeof m.payload.text==="string")f.set(m.seq,m.payload.text);return a.flatMap((m)=>{if(m.type==="user"&&m.notices?.length&&m.notices.every((p)=>p.sourceKind==="agents"&&(c.has(p.sourceID)||u.has(p.sourceID))))return[];if(m.type==="user"&&m.notices?.length&&m.notices.some((p)=>p.sourceKind==="agents"&&p.state==="message")){let p=m.text.match(/seq=(\d+)/),g=p?Number(p[1]):void 0,v=g!==void 0?f.get(g):void 0;return[{...m,notices:void 0,text:v??m.text.replace(/^父会话补充要求:/,"").replace(/\n回查完整消息:.*$/,"").trim()}]}if(m.type!=="extension"||m.namespace!=="agents"||m.schemaVersion!==1)return[m];if(m.kind==="delegation_state"&&m.payload&&typeof m.payload==="object"&&"childSessionID"in m.payload&&typeof m.payload.childSessionID==="string"&&c.has(m.payload.childSessionID))return[];if(m.kind==="council_room_state")return[];if(m.kind==="message"||m.kind==="handoff"||m.kind==="execution"||m.kind==="parent_stopped")return[];return[m]})},handledToolCalls:(t)=>[...t.filter(rh).map((a)=>a.payload.callID),...t.filter(nh).map((a)=>a.payload.callID)],views:{delegation:{kind:"card",load:()=>(C("v2bvbgfc"),import("./chunk-v2bvbgfc.js")).then((t)=>({default:t.TaskCard}))},council_room:{kind:"card",load:()=>(C("7ztwkhg5"),import("./chunk-7ztwkhg5.js")).then((t)=>({default:t.CouncilCard}))},settings:{kind:"tab",load:()=>(C("e187gt5x"),import("./chunk-e187gt5x.js")).then((t)=>({default:t.CouncilSettingsSection}))}},slots:{"chat:child":q7},tools:{task:{icon:at,active:"正在委派子任务",done:"委派子任务",summary:(t)=>typeof t.description==="string"&&t.description?t.description:qw(t.prompt),count:{verb:"委派",unit:"个子任务"},renderDetail:H7},task_job:{icon:at,active:"正在管理子任务",done:"管理子任务",summary:(t)=>t.action==="wait"&&Array.isArray(t.task_ids)&&t.task_ids.length>1?`等待 ${t.task_ids.length} 个子任务完成`:eie[String(t.action)]??String(t.action??""),count:{verb:"管理子任务",unit:"次"},renderDetail:j7},council:{icon:il,active:"正在召集理事会群聊辩论",done:"召集理事会群聊辩论",summary:(t)=>typeof t.topic==="string"?t.topic:"",count:{verb:"召集理事会",unit:"次"}},council_job:{icon:il,active:"正在操作理事会聊天室",done:"操作理事会聊天室",summary:(t)=>String(t.action??""),count:{verb:"操作理事会",unit:"次"}},ask:{icon:Fu,active:"正在向父会话提问",done:"向父会话提问",summary:(t)=>typeof t.text==="string"?t.text:"",hiddenInSteps:!0}},notices:{agents:nie}};var Li=[{label:"每天 9:00",cron:"0 9 * * *"},{label:"每个工作日 9:00",cron:"0 9 * * 1-5"},{label:"每周一 9:00",cron:"0 9 * * 1"},{label:"每小时",cron:"0 * * * *"},{label:"每天 18:00",cron:"0 18 * * *"},{label:"每月 1 号 9:00",cron:"0 9 1 * *"}],rie=["日","一","二","三","四","五","六","日"],oie=(t)=>t.padStart(2,"0");function _l(t){let a=Li.find((I)=>I.cron===t.trim());if(a)return a.label;let c=t.trim().split(/\s+/);if(c.length!==5)return t;let[u="",f="",m="",p="",g=""]=c,v=(I)=>/^\d+$/.test(I);if(p!=="*")return t;if(v(u)&&f==="*"&&m==="*"&&g==="*")return`每小时第 ${u} 分`;let k=u.match(/^\*\/(\d+)$/);if(k&&f==="*"&&m==="*"&&g==="*")return`每 ${k[1]} 分钟`;if(!v(u)||!v(f))return t;let S=`${f}:${oie(u)}`;if(m==="*"&&g==="*")return`每天 ${S}`;if(m==="*"&&g==="1-5")return`每个工作日 ${S}`;if(m==="*"&&/^[0-7](,[0-7])*$/.test(g))return`每周${g.split(",").map((I)=>rie[Number(I)]).join("、")} ${S}`;if(v(m)&&g==="*")return`每月 ${m} 号 ${S}`;return t}function Ii(t){let a=Date.now()-t,c=Math.floor(Math.abs(a)/1000);if(c<60)return"刚刚";let u=Math.floor(c/60);if(u<60)return`${u} 分钟${a>0?"前":"后"}`;let f=Math.floor(u/60);if(f<24)return`${f} 小时${a>0?"前":"后"}`;return`${Math.floor(f/24)} 天${a>0?"前":"后"}`}function $7(t){return Boolean(t?.metadata?.["automations.id"])}function aie(t){let a=t.context?.session;if(!$7(a))return null;return n("div",{className:"flex animate-fade items-center gap-2 self-center rounded-full border border-line px-3 py-1 text-xs text-dim",children:[e(nr,{className:"size-3.5 text-faint"}),"自动化任务于 ",a?.created?Ii(a.created):""," 创建"]})}function iie(t){let a=t.context?.session;if(!$7(a))return null;return e(nr,{className:"size-3.5 shrink-0 text-faint","aria-label":"自动化创建"})}var K7={id:"automations",apiVersion:1,metadata:{description:"按 Cron 周期定时启动会话自动执行任务",icon:G0},pageNav:{title:"自动化",icon:nr,path:"/automations"},slots:{"chat:banner":aie,"session:badge":iie},views:{page:{kind:"page",load:()=>(C("0j65yg1p"),import("./chunk-0j65yg1p.js")).then((t)=>({default:t.AutomationsPage}))}}};var W7={id:"basalt-creator",apiVersion:1,metadata:{description:"编写、调试与管理 Basalt 插件",icon:x0},tools:{basalt_plugin:{icon:Mt,active:"正在执行插件操作",done:"插件操作",summary(t){let a=typeof t.action==="string"?t.action:"",c=typeof t.id==="string"&&t.id?t.id:typeof t.topic==="string"&&t.topic?t.topic:typeof t.path==="string"&&t.path?t.path:"";return[a,c].filter(Boolean).join(" ")}}}};function Hw(t){if(t.name!=="bash"&&t.name!=="bash_job"&&t.name!=="monitor")return;let a=t.meta;if(!a||typeof a!=="object"||!("bashJob"in a))return;let c=a.bashJob;if(!c||typeof c!=="object"||!("id"in c)||typeof c.id!=="string"||!("state"in c)||!("code"in c)||c.code!==null&&(typeof c.code!=="number"||!Number.isInteger(c.code)))return;if(c.state!=="running"&&c.state!=="exited"&&c.state!=="killed"&&c.state!=="timeout")return;return{id:c.id,state:c.state,code:c.code}}var sie=1000,X7=64000;function Y7(t){return typeof t==="string"?t:""}function Q7(t){let{input:a,result:c,partialOutput:u}=t,{Code:f,CopyButton:m,style:p,useTheme:g}=x();g();let v=Y7(a.command),k=Y7(a.workdir),S=cie(lie(c?.meta),t.sessionID,t.connection),I=S?S.output:c?.output??u,T=I?.trim(),L=Boolean(c?.isError),R=i(null),A=i(!0),E=()=>{let P=R.current;if(!P)return;A.current=P.scrollHeight-P.scrollTop-P.clientHeight<32};return o(()=>{let P=R.current;if(!P||!I)return;if(A.current)P.scrollTop=P.scrollHeight},[I]),n("div",{className:p("surface.panel","group/bash relative mt-1.5 mb-2.5 text-xs"),children:[n("div",{className:"flex items-start gap-2.5 px-4 pt-3.5 pb-2 font-mono text-[12.5px] leading-[1.65]",children:[e("span",{className:"shrink-0 font-semibold text-accent select-none",children:"$"}),n("div",{className:"min-w-0 flex-1 pr-7",children:[k&&e("div",{className:"mb-1 truncate text-[11px] text-faint select-none",children:k}),e(f,{code:v,lang:"bash",className:"overflow-x-visible! [&_code]:break-words [&_code]:whitespace-pre-wrap [&_pre]:m-0 [&_pre]:p-0 [&_pre]:break-words [&_pre]:whitespace-pre-wrap"})]}),e("div",{className:"absolute top-2.5 right-2.5 opacity-60 transition-opacity group-hover/bash:opacity-100",children:e(m,{text:v,size:"icon-sm",label:"复制命令"})})]}),S?.truncated&&e("div",{className:"px-4 pb-1 text-[11px] text-faint select-none",children:"仅显示最近输出"}),T?e("pre",{ref:R,onScroll:E,className:p("chat.toolOutput","text-[11.5px]",L?"text-danger":"text-dim"),children:I}):S?.state==="running"?e("div",{className:"border-t border-line/60 px-4 py-2.5 text-xs text-faint",children:"后台运行中,等待输出…"}):!c?e("div",{className:"border-t border-line/60 px-4 py-2.5 text-xs text-faint",children:v?"等待结果…":"正在生成命令…"}):e("div",{className:"px-4 pb-2.5 text-[11.5px] text-faint/70 select-none",children:"(无输出)"})]})}function lie(t){if(!t||typeof t!=="object"||!("bashJob"in t))return;let a=t.bashJob;return a&&typeof a==="object"&&"id"in a&&typeof a.id==="string"?a.id:void 0}function cie(t,a,c){let[u,f]=r();return o(()=>{if(!t||!a||!c)return;let m=!1,p,g=0,v="",k=!1,S=`/api/sessions/${encodeURIComponent(a)}/jobs/${encodeURIComponent(t)}/output`,I=async()=>{let T=await c.request(`${S}?after=${g}`).catch(()=>{return});if(m||!T)return;if(g=T.next,v=`${v}${T.output}`,k||=T.truncated||v.length>X7,v=v.slice(-X7),f({output:v,state:T.state,truncated:k}),T.state==="running")p=setTimeout(I,sie)};return I(),()=>{m=!0,clearTimeout(p)}},[t,a,c]),u}function uie(t){return t!==null&&typeof t==="object"&&!Array.isArray(t)}function Z7(t){let a=new Set,c=new Map,u=new Map;for(let m of t){if(m.type!=="extension"||m.schemaVersion!==1)continue;let p=m.payload;if(!uie(p))continue;let g=p;if(m.namespace!=="monitor")continue;if(typeof g.id!=="string"||!g.id||typeof g.sessionID!=="string")continue;let v=`${m.namespace}:${g.id}`,k=u.get(v);if(k&&k.sessionID!==g.sessionID)continue;if(m.kind==="output"){if(!k||typeof g.text!=="string"||typeof g.batch!=="number"||!Number.isSafeInteger(g.batch))continue;if(a.add(m.seq),g.batch<=(k.batch??0))continue;k.batch=g.batch,k.output=g.text.slice(-2000),k.truncated=g.truncated===!0||g.text.length>2000;continue}if(m.kind!=="state"||typeof g.state!=="string")continue;if(!["running","exited","timeout","killed","interrupted"].includes(g.state))continue;if(!k){if(typeof g.command!=="string")continue;k={id:g.id,sessionID:g.sessionID,state:g.state},u.set(v,k),c.set(m.seq,k)}if(a.add(m.seq),k.state=g.state,typeof g.command==="string")k.command=g.command;if(g.code===null||typeof g.code==="number"&&Number.isInteger(g.code))k.code=g.code}let f=new Map;for(let[m,p]of c){let g="已停止";if(p.state==="running")g="运行中";else if(p.state==="exited")g=`退出码 ${p.code??"未知"}`;else if(p.state==="timeout")g="超时";else if(p.state==="interrupted")g="已停止 · 服务重启";f.set(m,{sourceKind:"monitor",id:p.id,sessionID:p.sessionID,title:"后台监视",icon:Pt,status:{label:g,tone:p.state==="running"?"warning":"neutral",pulse:p.state==="running"},text:p.command??"",monospace:!0,output:p.output,truncated:p.truncated})}return{cards:f,consumed:a}}var J7=(t)=>{let a=Hw(t);if(!a)return;let c="后台任务";if(a.state==="running")c="后台运行中";else if(a.state==="killed")c="已停止";else if(a.state==="timeout")c="已超时";else if(a.state==="exited")c=a.code===0?"后台 · 已完成":`后台 · 退出码 ${a.code??"未知"}`;let u="danger";if(a.state==="running")u="warning";else if(a.state==="exited"&&a.code===0)u="success";return{label:c,tone:u,pulse:a.state==="running",title:`后台任务 ${a.id}`}},die=(t,a)=>{let c=a.split(`
26
+ `),u=c[0]?.startsWith("[系统通知")?c.slice(1):c,f=u[0]?.match(/^\[background job \S+ (?:exited code (\S+)|(\w+)): (.*)\]$/),m=f?.[3]??"",p=u.slice(f?1:0).join(`
27
+ `).trim(),g=t.state!=="exited"||(t.exitCode??0)!==0,v="后台任务已完成";if(t.state==="killed")v="后台任务已停止";else if(t.state==="timeout")v="后台任务超时";else if(g)v=`后台任务失败(${t.exitCode??"未知"})`;return{label:v,title:m,icon:g?be:Z,tone:g?"danger":"success",output:p||void 0}},e9={id:"bash",apiVersion:1,metadata:{description:"后台运行命令与输出监视,长任务不阻塞对话",icon:Pt},projectBackground:Z7,projectEntries(t){let a=new Map;for(let c of t){if(c.type==="tool_result"){let u=Hw(c);if(u)a.set(u.id,u)}if(c.type!=="user")continue;for(let u of c.notices??[]){if(u.sourceKind!=="bash"||u.state!=="exited"&&u.state!=="timeout"&&u.state!=="killed")continue;a.set(u.sourceID,{id:u.sourceID,state:u.state,code:u.exitCode??null})}}return t.map((c)=>{if(c.type!=="tool_result")return c;let u=Hw(c),f=u&&a.get(u.id);if(!f)return c;let m=c.meta&&typeof c.meta==="object"?c.meta:{};return{...c,meta:{...m,bashJob:f}}})},views:{card:{kind:"card",load:()=>(C("yk965yth"),import("./chunk-yk965yth.js")).then((t)=>({default:t.BashJobCard}))}},tools:{bash:{status:J7,icon:dn,active:"正在运行",done:"运行",summary:(t)=>typeof t.description==="string"&&t.description?t.description:qw(t.command),count:{verb:"运行",unit:"条命令"},renderDetail:Q7},bash_job:{status:J7,icon:dn,active:"正在管理后台任务",done:"后台任务",summary:(t)=>`${typeof t.action==="string"?t.action:""} ${typeof t.id==="string"?t.id:""}`.trim()}},notices:{bash:die}};var t9={id:"browser",apiVersion:1,metadata:{description:"无头 Chromium 浏览器,支持网页浏览、无障碍快照、真实交互与调试",icon:u0},projectEntries(t){return t.filter((a)=>!(a.type==="extension"&&a.namespace==="browser"&&a.kind==="state"))},tools:{browser_page:{icon:Ue,active:"正在访问网页",done:"访问网页",summary:(t)=>{if(typeof t.url==="string"&&t.url)return t.url;if(typeof t.action==="string"&&t.action)return t.action;return""},count:{verb:"打开",unit:"个网页"}},browser_snapshot:{icon:Ue,active:"正在读取网页快照",done:"网页快照",summary:(t)=>typeof t.ref==="string"?`[${t.ref}]`:"",count:{verb:"读取",unit:"次快照"}},browser_act:{icon:Ue,active:"正在操作网页",done:"操作网页",summary:(t)=>{let a=typeof t.action==="string"?t.action:"",c=typeof t.ref==="string"?` [${t.ref}]`:"",u=typeof t.text==="string"&&t.text?` "${t.text}"`:"";return`${a}${c}${u}`.trim()},count:{verb:"操作",unit:"次页面"}},browser_screenshot:{icon:Ue,active:"正在截取网页",done:"网页截图",summary:(t)=>t.full_page?"整页":"",count:{verb:"截取",unit:"张网页"}},browser_eval:{icon:Ue,active:"正在执行网页脚本",done:"网页脚本",summary:(t)=>typeof t.script==="string"?t.script.trim().slice(0,60):"",count:{verb:"执行",unit:"次脚本"}},browser_debug:{icon:Ue,active:"正在调试网页",done:"网页调试",summary:(t)=>typeof t.action==="string"?t.action:"",count:{verb:"调试",unit:"次"}},browser_emulate:{icon:Ue,active:"正在模拟网页环境",done:"模拟环境",summary:(t)=>{let a=[];if(t.width&&t.height)a.push(`${t.width}×${t.height}`);if(t.colorScheme)a.push(String(t.colorScheme));if(t.network)a.push(String(t.network));return a.join(" · ")}},browser_storage:{icon:Ue,active:"正在管理网页存储",done:"网页存储",summary:(t)=>`${typeof t.action==="string"?t.action:""} ${typeof t.area==="string"?t.area:""}`.trim()}},views:{settings:{kind:"tab",load:()=>(C("zd2j189j"),import("./chunk-zd2j189j.js"))}}};var jw="computer-use";var fie=["once","session","deny"];function n9(t){return t!==null&&typeof t==="object"&&!Array.isArray(t)}function IL(t,a){let c=new Map;for(let u of t){if(u.type==="run"&&u.state==="end"){for(let p of c.values())if(p.state==="pending")p.state="cancelled";continue}if(u.type!=="extension"||u.namespace!==jw||!n9(u.payload))continue;let f=u.payload;if(f.sessionID!==a||typeof f.id!=="string")continue;if(u.kind==="requested"){if(typeof f.app!=="string"||typeof f.action!=="string"||typeof f.detail!=="string"||typeof f.askedAt!=="number")continue;let p=n9(f.codex)&&typeof f.codex.displayName==="string"?f.codex:void 0,g=p?.riskLevel==="low"||p?.riskLevel==="high"?p.riskLevel:void 0;c.set(f.id,{id:f.id,sessionID:a,app:f.app,action:f.action,detail:f.detail,...p?{codex:{displayName:String(p.displayName),...g?{riskLevel:g}:{}}}:{},askedAt:f.askedAt,state:"pending"});continue}let m=c.get(f.id);if(m?.state!=="pending")continue;if(u.kind==="cancelled")m.state="cancelled";else if(u.kind==="answered"&&fie.includes(f.decision))m.state=f.decision}return[...c.values()]}var mie={low:"低",high:"高"};function r9(t){let{style:a,Button:c}=x(),{approval:u}=t,[f,m]=r(),[p,g]=r(null),v=i(null);o(()=>{v.current?.focus()},[]);let k=async(R)=>{if(f)return;m(R),g(null);try{await t.connection.request(`/api/plugins/computer-use/sessions/${encodeURIComponent(t.sessionID)}/approvals/${encodeURIComponent(u.id)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:R})})}catch(A){g(A instanceof Error?A.message:String(A)),m(void 0)}},S=(R)=>{if(f||R.nativeEvent.isComposing||R.key!=="Escape")return;R.preventDefault(),k("deny")},I=u.codex,T=I&&I.displayName!==u.app?`${I.displayName}(${u.app})`:u.app,L=I?.riskLevel?`,风险等级:${mie[I.riskLevel]}`:"";return e("div",{ref:v,role:"dialog","aria-label":"控制电脑待授权",tabIndex:-1,onKeyDown:S,className:a("surface.dock","animate-rise"),children:n("div",{className:"flex flex-col gap-2.5 px-4 pt-3.5 pb-3",children:[n("div",{className:"flex items-center gap-2",children:[e(Nf,{className:"size-4 shrink-0 text-amber-500"}),e("span",{className:"text-[14.5px] font-medium text-ink",children:"控制电脑待授权"})]}),n("div",{className:"flex flex-col gap-0.5 text-[13px] text-dim",children:[n("span",{className:"break-all",children:["应用:",e("span",{className:"text-ink",children:T})]}),n("span",{children:["动作:",e("code",{className:a("markdown.inlineCode"),children:u.action})]}),I&&n("span",{children:["Codex 要求应用审批",L]})]}),e("pre",{className:"max-h-32 overflow-auto rounded-lg border border-line/60 bg-raised/40 px-3 py-2 font-mono text-xs leading-5 break-all whitespace-pre-wrap text-ink",children:e("code",{children:u.detail})}),p&&e("div",{role:"alert",className:"text-xs text-red-500",children:p}),n("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("span",{className:"hidden items-center gap-1 text-[11.5px] text-faint select-none sm:inline-flex",children:[e("kbd",{className:a("control.kbd","font-mono text-[10px] text-dim"),children:"Esc"}),e("span",{children:"拒绝"})]}),n("div",{className:"ml-auto flex flex-wrap items-center justify-end gap-2",children:[e(c,{variant:"secondary",size:"sm",loading:f==="deny",disabled:Boolean(f),onClick:()=>k("deny"),children:"拒绝"}),e(c,{variant:"secondary",size:"sm",loading:f==="once",disabled:Boolean(f),onClick:()=>k("once"),children:"允许本次"}),e(c,{variant:"danger",size:"sm",loading:f==="session",disabled:Boolean(f),onClick:()=>k("session"),children:"本会话始终允许"})]})]})]})})}function pie(t,a){let c=new Map(IL(t,a.sessionID).map((f)=>[f.id,f])),u=[];for(let f of t){if(f.type!=="extension"||f.namespace!==jw){u.push(f);continue}let m=f.payload,p=typeof m?.id==="string"?c.get(m.id):void 0;if(f.kind==="requested"&&p)u.push({...f,kind:"card",payload:p})}return u}function hie(t){if(!t.sessionID)return e(h,{children:t.children});let a=IL(t.context?.entries??[],t.sessionID).find((c)=>c.state==="pending");if(!a)return e(h,{children:t.children});return e(r9,{connection:t.connection,sessionID:t.sessionID,approval:a},a.id)}var o9={id:"computer-use",apiVersion:1,metadata:{description:"通过 Codex 运行时控制本机 Windows 桌面应用",icon:Nf},views:{card:{kind:"card",load:()=>(C("hpjzy5ww"),import("./chunk-hpjzy5ww.js")).then((t)=>({default:t.ApprovalCard}))}},slots:{"chat:dock":hie},tools:{computer_use:{icon:fr,active:"正在控制电脑",done:"控制电脑",summary(t){let a=typeof t.action==="string"?t.action:"",c=t.window;if(typeof c?.app==="string")return`${a} ${c.app}`;if(typeof t.app==="string")return`${a} ${t.app}`;return a},count:{verb:"控制",unit:"次电脑"}}},projectEntries:pie};var a9=new WeakMap,i9=new WeakMap,gie=new Intl.DateTimeFormat("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit"});function Xo(t){let a=Math.min(t.length,4096);for(let c=0;c<a;c++){let u=t.charCodeAt(c);if(u!==32&&u!==9&&u!==10&&u!==13)return!0}return t.trim().length>0}function Uf(t,a=72){if(!t)return"";let u=(t.length>512?t.slice(0,512):t).trimStart();if(!u)return"";let f=u.search(/\r?\n/),m=(f===-1?u:u.slice(0,f)).trimEnd();if(!m)return"";return m.length>a?`${m.slice(0,a)}…`:m}function wl(t){return gie.format(t)}function Ws(t){if(t<1024)return`${t} B`;if(t<1048576)return`${(t/1024).toFixed(1)} KB`;return`${(t/1048576).toFixed(2)} MB`}function ti(t,a=1200,c=800){if(t.length<=a)return t;return`${t.slice(0,c)}…
28
+ [已省略 ${(t.length-c).toLocaleString()} 字符]`}function ya(t){return ti(t,4000,3000)}var xie={done:"运行完成",error:"运行出错",aborted:"已停止",interrupted:"运行中断",waiting_user:"等待用户输入"};function kl(t){let a=i9.get(t);if(a!==void 0)return a;let c=vie(t);return i9.set(t,c),c}function vie(t){switch(t.type){case"user":{if(t.notices?.length)return{badge:"通知",tone:"warning",title:Uf(t.text)||t.notices.map((u)=>`${u.sourceKind}/${u.sourceID}`).join(", "),meta:`${t.notices.length} 条通知`};let a=t.attachments?.length??0,c=a>0?t.attachments?.map((u)=>u.name).join(", ")??"附件消息":"(空消息)";return{badge:"用户",tone:"accent",title:Uf(t.text)||c,meta:a>0?`${a} 个附件`:void 0}}case"assistant":{let a=t.model.split("/").pop()??t.model;if(t.error)return{badge:"助手",tone:"danger",title:Uf(t.error)||"模型响应异常",meta:a};let c=t.parts.find((p)=>p.type==="text"&&Xo(p.text)),u=t.parts.filter((p)=>p.type==="tool_call"),f=t.parts.find((p)=>p.type==="thinking"&&Xo(p.text)),m="(空回复)";if(c)m=Uf(c.text);else if(u.length>0)m=`调用 ${u.map((p)=>p.name).join(", ")}`;else if(f)m=`思考:${Uf(f.text)}`;return{badge:"助手",tone:"success",title:m,meta:u.length>0&&c?`${u.length} 次调用 · ${a}`:a}}case"tool_result":{let a=t.images?.length??0,c=Uf(t.output);return{badge:"工具结果",tone:t.isError?"danger":"neutral",title:c?`${t.name} · ${c}`:t.name,meta:t.isError?"失败":a>0?`${a} 张图`:void 0}}case"run":{if(t.state==="start")return{badge:"运行",tone:"neutral",title:"开始新一轮运行"};let a=xie[t.reason]??t.reason;return{badge:"运行",tone:t.reason==="error"?"danger":"neutral",title:t.error?`${a}:${Uf(t.error)}`:a}}case"compaction":return{badge:"折叠",tone:"warning",title:`${t.partial?"进行中步骤折叠":"历史轮次封存"} · 截至 #${t.through}`};case"notice_pending":return{badge:"待投通知",tone:"warning",title:`${t.notice.sourceKind}/${t.notice.sourceID}`,meta:t.notice.state};case"extension":return{badge:"扩展",tone:"neutral",title:t.display?.title??`${t.namespace}/${t.kind}`}}}function Gs(t,a){if(typeof a!=="string")return a;if(t==="data"&&a.length>160)return`${a.slice(0,96)}… [已省略 ${(a.length-96).toLocaleString()} 字符]`;if(a.length>1200)return`${a.slice(0,800)}… [已省略 ${(a.length-800).toLocaleString()} 字符]`;return a}function Cl(t){let a=a9.get(t);if(a!==void 0)return a;let c=JSON.stringify(t,Gs,2);return a9.set(t,c),c}function Di(t,a=0,c,u,f){let m=t.reduce((v,k)=>v+k.tokens,0),p=!f&&u!==void 0&&u>0,g=p?u:c??m;return{items:t,totalTokens:g,estimatedTokens:m,calibratedTokens:c,lastInputTokens:u,isActual:p,percent:a>0?g/a*100:null,shares:t.map((v)=>m>0?v.tokens/m*100:0)}}function Ni(t){if(t!==null&&t>=100)return"overflow";if(t!==null&&t>=97)return"near_limit";if(t!==null&&t>=80)return"sealing";return"normal"}var Ur=new Map,TL=new Set;function Ko(t){return TL.add(t),()=>{TL.delete(t)}}function Qo(t,a){Ur.set(t,a);for(let c of TL)c(t,a)}function bie(...t){return t.filter(Boolean).join(" ")}function s9(t){let{connection:a,sessionID:c,sessionUpdated:u,entriesLength:f,busy:m}=t,[p,g]=r(()=>c?Ur.get(c):void 0),[v,k]=r(!1);o(()=>{if(!c){g(void 0);return}let T=Ur.get(c);if(T)g(T);return Ko((L,R)=>{if(L===c)g(R)})},[c]),o(()=>{if(!a||!c)return;let T=new AbortController;return k(!0),a.request(`/api/sessions/${encodeURIComponent(c)}/context`,{signal:AbortSignal.any([T.signal,AbortSignal.timeout(1e4)])}).then((L)=>{if(!T.signal.aborted)Qo(c,L),g(L),k(!1)},()=>{if(!T.signal.aborted)k(!1)}),()=>T.abort()},[a,c,u,f,m]);let S=w(()=>Di(p?.items??[],p?.usableWindow??p?.contextWindow??0,p?.calibratedTokens,p?.lastInputTokens,p?.hasPendingOutput),[p]),I=w(()=>Ni(S.percent),[S.percent]);return{snapshot:p,metrics:S,usageState:I,loading:v}}var RL=17,LL=2*Math.PI*RL;function EL(t){let{context:a,connection:c,sessionID:u}=t,f=t.sessionUpdated??a?.sessionUpdated,m=t.entriesLength??a?.entriesLength,p=t.canSend??a?.canSend,g=t.busy??a?.busy,v=t.enabled??!0,k=t.onInspectContext??a?.onInspectContext,{Tooltip:S,children:I}=t,T=M(Je),L=T?.cn??bie,R=S??T?.Tooltip,{snapshot:A,metrics:E,usageState:P}=s9({connection:c,sessionID:v?u:void 0,sessionUpdated:f,entriesLength:m,busy:g});if(!v||!u||!c)return e(h,{children:I});let D=E.percent,N=D!==null?Math.min(100,Math.max(0,D)):0,O=LL-N/100*LL,F=D!==null?`${D.toFixed(1)}%`:"0.0%",B={normal:{text:"正常",className:"bg-accent/20 text-accent"},sealing:{text:"接近封存",className:"bg-warning/20 text-warning"},near_limit:{text:"接近上限",className:"bg-danger/20 text-danger"},overflow:{text:"预计超限",className:"bg-danger/20 text-danger"}}[P],U=E.totalTokens,Y=A?.usableWindow??A?.contextWindow??0,G=n("div",{className:"flex flex-col gap-1.5 py-0.5 text-xs select-none",children:[n("div",{className:"flex items-center justify-between gap-3",children:[n("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"font-semibold text-bg",children:"上下文用量"}),e("span",{className:L("rounded px-1.5 py-0.5 text-[10px] font-medium leading-none",B.className),children:B.text})]}),e("span",{className:"font-mono text-xs font-semibold tabular-nums text-bg",children:F})]}),n("div",{className:"flex items-center justify-between gap-2 text-[11px] text-bg/75 tabular-nums",children:[e("span",{children:"Token"}),n("span",{className:"font-mono",children:[U.toLocaleString()," / ",Y>0?Y.toLocaleString():"—"]})]}),k&&e("div",{className:"border-t border-bg/15 pt-1 text-[10.5px] text-bg/60",children:!p&&!g?"点击或按 Mod+. 检视侧栏":"快捷键 Mod+. 检视侧栏"})]}),ce=n("div",{className:"group/meter relative flex size-8 shrink-0 items-center justify-center",onPointerDown:(re)=>{if(!p&&!g&&k&&re.button===0)k()},children:[I,n("svg",{"aria-hidden":"true",className:"pointer-events-none absolute -inset-[3px] size-[38px] -rotate-90 select-none",viewBox:"0 0 38 38",children:[e("circle",{cx:"19",cy:"19",r:RL,fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-line/60 dark:text-line/40 transition-colors"}),N>0.1&&e("circle",{cx:"19",cy:"19",r:RL,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:LL,style:{strokeDashoffset:O},className:L("transition-[stroke-dashoffset,color] duration-500 ease-out-quint group-hover/meter:stroke-[2.5px]",P==="overflow"||P==="near_limit"?"text-danger":P==="sealing"?"text-warning":"text-accent")})]})]});if(!R)return ce;return e(R,{label:G,side:"top",children:ce})}var l9={id:"context",apiVersion:1,metadata:{description:"上下文检视侧栏:用量监控、构成分析与原始消息",icon:Jn},views:{sidebar:{kind:"sidebar",load:()=>(C("tfcc9bcz"),import("./chunk-tfcc9bcz.js")).then((t)=>({default:t.ContextSidebar}))}},slots:{"composer:action":EL}};var c9={id:"development",apiVersion:1,metadata:{description:"源码启动的实例为源码树内的会话注入开发指引提示词",icon:Qn}};var u9=2592000,yie=new Set(["active","paused","blocked","usage_limited","budget_limited","complete"]);function oh(t){if(!t||typeof t!=="object")return!1;let a=t;return typeof a.sessionID==="string"&&typeof a.goalID==="string"&&typeof a.objective==="string"&&typeof a.status==="string"&&yie.has(a.status)&&(a.timeBudgetSeconds===null||a.timeBudgetSeconds===void 0||typeof a.timeBudgetSeconds==="number")&&(a.tokenBudget===null||a.tokenBudget===void 0||typeof a.tokenBudget==="number")&&typeof a.tokensUsed==="number"&&typeof a.timeUsedSeconds==="number"}function d9(t,a){let c;for(let u of t){if(u.type!=="extension"||u.namespace!=="goal"||u.kind!=="state")continue;if(!oh(u.payload)||u.payload.sessionID!==a)continue;if(u.payload.action==="cleared")c=void 0;else c=u.payload}return c}var Gw={active:{label:"进行中",tone:"warning",pulse:!0},paused:{label:"已暂停",tone:"neutral"},blocked:{label:"受阻",tone:"danger"},usage_limited:{label:"用量受限",tone:"warning"},budget_limited:{label:"时间用尽",tone:"danger"},complete:{label:"已完成",tone:"success"}};async function PL(t,a,c){return(await t.request(`/api/sessions/${encodeURIComponent(a)}/goal`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({status:c})})).goal}async function AL(t,a){await t.request(`/api/sessions/${encodeURIComponent(a)}/goal`,{method:"DELETE"})}function $w(t){if(t>=1e6)return`${(t/1e6).toFixed(t>=1e7?0:1)}M`;if(t>=1000)return`${(t/1000).toFixed(t>=1e4?0:1)}k`;return String(t)}function li(t){if(t<=0)return"0 秒";if(t<60)return`${t} 秒`;let a=Math.floor(t/60),c=t%60;if(a<60)return c>0?`${a} 分 ${c} 秒`:`${a} 分钟`;let u=Math.floor(a/60),f=a%60;return f>0?`${u} 小时 ${f} 分`:`${u} 小时`}var f9=[{label:"不限时",seconds:null},{label:"30 分钟",seconds:1800},{label:"1 小时",seconds:3600},{label:"2 小时",seconds:7200},{label:"6 小时",seconds:21600},{label:"12 小时",seconds:43200},{label:"24 小时",seconds:86400},{label:"自定义",seconds:-1}];function m9(t){let{Button:a,Dialog:c,Field:u,FormError:f,Input:m,StatusChip:p,Textarea:g,cn:v,confirm:k,style:S,useTheme:I}=x();I();let{open:T,onOpenChange:L,connection:R,sessionID:A}=t,[E,P]=r(t.initialGoal??null),[D,N]=r(""),[O,F]=r(21600),[z,B]=r("6"),[U,Y]=r(!1),[G,ce]=r(!1),[re,Q]=r(!1),[ae,xe]=r();o(()=>{if(!T||!A)return;let Me=!1;return ce(!0),xe(void 0),R.request(`/api/sessions/${encodeURIComponent(A)}/goal`).then((Ie)=>{if(Me)return;let qe=Ie.goal;if(P(qe),qe){N(qe.objective);let Qe=qe.timeBudgetSeconds;if(Qe===null)F(null),Y(!1);else if(F(Qe),f9.find((Ne)=>Ne.seconds===Qe))Y(!1);else Y(!0),B(String(Number((Qe/3600).toFixed(2))))}else N(t.initialDraft?.trim()??""),F(21600),Y(!1),B("6")}).catch((Ie)=>{if(!Me)xe(Ie instanceof Error?Ie.message:"加载目标状态失败")}).finally(()=>{if(!Me)ce(!1)}),()=>{Me=!0}},[T,A,R,t.initialDraft]);let Te=(Me)=>{if(Me===-1){Y(!0);let Ie=Number(z);F(Number.isFinite(Ie)&&Ie>0?Math.round(Ie*3600):null)}else Y(!1),F(Me)},me=(Me)=>{B(Me);let Ie=Number(Me);if(Number.isFinite(Ie)&&Ie>0)F(Math.round(Ie*3600));else F(null)},Ce=async()=>{if(re||G)return;let Me=D.trim();if(!Me){xe("请输入具体的目标内容");return}if(O!==null&&(O<1||O>u9)){xe("时间预算不能超过 30 天");return}Q(!0),xe(void 0);try{if(!E){let qe=await R.request(`/api/sessions/${encodeURIComponent(A)}/goal`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({objective:Me,timeBudgetSeconds:O,replace:!0})});if(t.initialDraft?.trim()&&Me===t.initialDraft.trim())t.onConsumeDraft?.();P(qe.goal),t.onUpdated?.(qe.goal),L(!1);return}let Ie=await R.request(`/api/sessions/${encodeURIComponent(A)}/goal`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({objective:Me,timeBudgetSeconds:O})});P(Ie.goal),t.onUpdated?.(Ie.goal),L(!1)}catch(Ie){xe(Ie instanceof Error?Ie.message:"保存目标失败")}finally{Q(!1)}},Be=async(Me)=>{if(re||G||!E)return;Q(!0),xe(void 0);try{let Ie=await PL(R,A,Me);if(P(Ie),t.onUpdated?.(Ie),Me==="active")L(!1)}catch(Ie){xe(Ie instanceof Error?Ie.message:"更新目标状态失败")}finally{Q(!1)}},X=async()=>{if(re||G||!E)return;if(!await k({title:"清除当前目标?",description:"清除后该会话将不再围绕此持久目标自动续跑。",action:"清除目标",danger:!0}))return;Q(!0),xe(void 0);try{await AL(R,A),P(null),N(""),F(21600),t.onUpdated?.(null),L(!1)}catch(Ie){xe(Ie instanceof Error?Ie.message:"清除目标失败")}finally{Q(!1)}},He=E?Gw[E.status]:void 0,Le=E?.timeBudgetSeconds!==null&&(E?.timeBudgetSeconds??0)>0,J=Le?Math.min(1,(E?.timeUsedSeconds??0)/(E?.timeBudgetSeconds??1)):0;return e(c,{open:T,onOpenChange:L,size:"md",title:n("div",{className:"flex items-center gap-2",children:[e(Ma,{className:"size-5 shrink-0 text-accent"}),e("span",{className:"font-semibold text-ink",children:E?"持久目标管理":"新建持久目标"}),He&&e(p,{tone:He.tone,pulse:He.pulse,children:He.label})]}),description:"设定长周期目标,每轮结束后自动校验完成度并持续续跑,支持时间上限自动熔断。",footer:n("div",{className:"flex w-full items-center justify-between gap-2",children:[e("div",{className:"flex items-center gap-1.5",children:E&&n(h,{children:[n(a,{type:"button",size:"sm",variant:"danger-ghost",disabled:re||G,onClick:()=>void X(),title:"清除当前目标",children:[e(pe,{className:"mr-1 size-3.5"}),"清除"]}),E.status==="active"?n(a,{type:"button",size:"sm",variant:"secondary",disabled:re||G,onClick:()=>void Be("paused"),title:"暂停自动续跑",children:[e(Ui,{className:"mr-1 size-3.5"}),"暂停"]}):n(a,{type:"button",size:"sm",variant:"secondary",disabled:re||G,onClick:()=>void Be("active"),title:"恢复并继续执行目标",children:[e(hr,{className:"mr-1 size-3.5"}),"恢复"]}),E.status!=="complete"&&n(a,{type:"button",size:"sm",variant:"ghost",disabled:re||G,onClick:()=>void Be("complete"),title:"手动标记目标已达成",children:[e(Z,{className:"mr-1 size-3.5"}),"完成"]})]})}),n("div",{className:"flex items-center gap-2",children:[!E&&e(a,{type:"button",size:"sm",variant:"ghost",disabled:re||G,onClick:()=>L(!1),children:"取消"}),e(a,{type:"button",size:"sm",variant:"primary",disabled:re||G||!D.trim(),onClick:()=>void Ce(),children:re?"处理中…":E?"保存修改":"启动目标"})]})]}),children:n("div",{className:"space-y-4 pt-1",children:[E&&n("div",{className:S("surface.subtle","space-y-2 border-line bg-raised/35 p-3 text-xs"),children:[n("div",{className:"grid grid-cols-3 gap-2",children:[n("div",{children:[e("div",{className:"text-faint",children:"累计耗时"}),e("div",{className:"mt-0.5 font-mono text-sm font-medium text-ink tabular-nums",children:li(E.timeUsedSeconds)})]}),n("div",{children:[e("div",{className:"text-faint",children:"时间预算"}),e("div",{className:"mt-0.5 font-mono text-sm font-medium text-ink tabular-nums",children:E.timeBudgetSeconds!==null?li(E.timeBudgetSeconds):"不限时"})]}),n("div",{children:[e("div",{className:"text-faint",children:"消耗 Token"}),e("div",{className:"mt-0.5 font-mono text-sm font-medium text-ink tabular-nums",children:$w(E.tokensUsed)})]})]}),Le&&n("div",{className:"space-y-1 pt-1 border-t border-line/50",children:[n("div",{className:"flex items-center justify-between text-[11px] text-faint",children:[e("span",{children:"执行时间进度"}),n("span",{children:["剩余 ",li(E.remainingSeconds??0)]})]}),e("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:e("div",{className:v("h-full rounded-full transition-all duration-300",J>=1?"bg-danger":J>=0.8?"bg-warning":"bg-accent"),style:{width:`${Math.min(100,Math.round(J*100))}%`}})})]})]}),e(u,{label:"目标任务与验收标准",hint:"清晰描述需要达成的具体结果与验证命令。",children:(Me)=>e(g,{id:Me,rows:4,value:D,disabled:re||G,onChange:(Ie)=>N(Ie.target.value),placeholder:"例如:重构目标模块并跑通所有测试,在验证通过前持续推进…"})}),n("div",{className:"space-y-2",children:[n("div",{className:"flex items-center justify-between text-[13px]",children:[e("span",{className:"font-medium text-ink",children:"时间预算"}),e("span",{className:"text-xs text-faint",children:O===null?"不限时间,持续推进直至完成":`连续运行达到 ${li(O)} 时自动停止`})]}),e("div",{className:"flex flex-wrap gap-1.5",children:f9.map((Me)=>{let Ie=Me.seconds===-1&&U||!U&&O===Me.seconds;return e("button",{type:"button",onClick:()=>Te(Me.seconds),className:v("rounded-lg px-2.5 py-1 text-xs transition-all duration-150 border cursor-pointer",Ie?"border-accent/80 bg-accent/15 text-accent font-medium shadow-sm":"border-line bg-raised/40 text-dim hover:border-line-strong hover:text-ink hover:bg-raised/70"),children:Me.label},Me.label)})}),U&&n("div",{className:"flex items-center gap-2 pt-1 animate-fade",children:[e(m,{type:"number",min:0.1,max:720,step:0.5,value:z,disabled:re||G,onChange:(Me)=>me(Me.target.value),placeholder:"如 6",className:"w-24 text-xs font-mono"}),e("span",{className:"text-xs text-dim",children:"小时"})]}),n("div",{className:"flex items-center gap-1.5 text-[11.5px] text-faint",children:[e(ca,{className:"size-3 shrink-0 text-faint"}),e("span",{children:O===null?"无时间限制,代理将在每轮正常结束后自动续跑。":`达到 ${li(O)} 上限后,代理将停止新动作并输出当前收尾进展。`})]})]}),ae&&e(f,{children:ae})]})})}var ML=new Map;function p9(t){ML.get(t)?.()}function h9(t){let{Button:a,Collapsible:c,CollapsibleContent:u,CollapsibleTrigger:f,Chevron:m,StatusChip:p,cn:g,confirm:v,style:k,useTheme:S}=x();S();let{connection:I,sessionID:T,context:L,children:R}=t,[A,E]=r(!1),[P,D]=r(!1),[N,O]=r(),[F,z]=r(!1);if(o(()=>{if(!T)return;return ML.set(T,()=>D(!0)),()=>{ML.delete(T)}},[T]),!T)return e(h,{children:R});let B=L?.entries??[],U=B.at(-1)?.seq??0,Y=d9(B,T),G=N&&N.seq>=U?N.goal??void 0:Y,ce=G?Gw[G.status]??{label:G.status,tone:"neutral"}:void 0,re=Boolean(G?.timeBudgetSeconds&&G.timeBudgetSeconds>0),Q=G&&re?Math.min(1,G.timeUsedSeconds/(G.timeBudgetSeconds??1)):0,ae=async(Te,me)=>{if(Te.stopPropagation(),F)return;z(!0);try{O({seq:U,goal:await PL(I,T,me)})}finally{z(!1)}},xe=async(Te)=>{if(Te.stopPropagation(),F)return;if(!await v({title:"清除当前持久目标?",description:"清除后会话将退出持久目标模式。",action:"清除",danger:!0}))return;z(!0);try{await AL(I,T),O({seq:U,goal:null})}finally{z(!1)}};return n(h,{children:[G&&ce&&n(c,{open:A,onOpenChange:E,className:k("surface.dock","mb-2 rounded-2xl bg-panel/85 text-[13.5px] backdrop-blur-md"),children:[n("div",{className:"flex w-full items-center gap-2 px-3.5 py-2",children:[n(f,{className:"group/collapsible flex min-w-0 flex-1 cursor-pointer items-center gap-2 text-left",children:[e(Ma,{className:g("size-4 shrink-0",G.status==="active"?"text-accent":G.status==="complete"?"text-success":"text-faint")}),e(p,{tone:ce.tone,pulse:ce.pulse,children:ce.label}),e("span",{className:"min-w-0 flex-1 truncate font-medium text-ink",title:G.objective,children:G.objective}),n("span",{className:"flex shrink-0 items-center gap-2 text-xs text-faint tabular-nums",children:[re&&e("span",{className:"relative h-1 w-12 overflow-hidden rounded-full bg-raised max-sm:hidden",children:e("span",{className:g("absolute inset-y-0 left-0 rounded-full transition-[width] duration-300",Q>=1?"bg-danger":"bg-accent"),style:{width:`${Q*100}%`}})}),n("span",{children:[li(G.timeUsedSeconds),re&&` / ${li(G.timeBudgetSeconds??0)}`]})]}),e(m,{className:"-rotate-90 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),n("div",{className:"flex shrink-0 items-center gap-1 border-l border-line/60 pl-2",children:[G.status==="active"?n(a,{type:"button",size:"sm",variant:"ghost",disabled:F,onClick:(Te)=>void ae(Te,"paused"),className:"h-6 rounded-md px-2 text-xs text-dim hover:text-ink",title:"暂停自动续跑",children:[e(Ui,{className:"mr-1 size-3"}),"暂停"]}):G.status!=="complete"?n(a,{type:"button",size:"sm",variant:"ghost",disabled:F,onClick:(Te)=>void ae(Te,"active"),className:"h-6 rounded-md px-2 text-xs text-accent hover:text-ink",title:"恢复并继续执行目标",children:[e(hr,{className:"mr-1 size-3"}),"继续"]}):null,e(a,{type:"button",size:"sm",variant:"ghost",disabled:F,onClick:(Te)=>{Te.stopPropagation(),D(!0)},className:"h-6 rounded-md px-1.5 text-xs text-faint hover:text-ink",title:"编辑或查看目标详情",children:e(et,{className:"size-3"})}),e(a,{type:"button",size:"sm",variant:"ghost",disabled:F,onClick:(Te)=>void xe(Te),className:"h-6 rounded-md px-1.5 text-xs text-faint hover:text-danger",title:"清除目标",children:e(pe,{className:"size-3"})})]})]}),e(u,{children:n("div",{className:"space-y-2 border-t border-line px-3.5 py-2.5 text-xs",children:[e("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-ink/90",children:G.objective}),n("div",{className:"flex flex-wrap items-center gap-4 text-[11.5px] text-faint tabular-nums",children:[n("span",{children:["累计耗时:",li(G.timeUsedSeconds)]}),G.timeBudgetSeconds!==null&&n("span",{children:["时间预算:",li(G.timeBudgetSeconds)]}),G.remainingSeconds!==null&&n("span",{children:["剩余时间:",li(G.remainingSeconds)]}),n("span",{children:["消耗 Token:",$w(G.tokensUsed)]})]})]})})]}),e(m9,{open:P,onOpenChange:D,connection:I,sessionID:T,initialGoal:G,onUpdated:(Te)=>O({seq:U,goal:Te})}),R]})}function g9(t){let{Panel:a,StatusChip:c,cn:u,useTheme:f}=x();if(f(),!oh(t.payload))return null;let m=t.payload;if(m.action==="cleared")return null;let p=Gw[m.status]??{label:m.status,tone:"neutral"},g=[m.timeUsedSeconds>0&&`耗时 ${li(m.timeUsedSeconds)}${m.timeBudgetSeconds!==null?` / ${li(m.timeBudgetSeconds)}`:""}`,m.tokensUsed>0&&`Token ${$w(m.tokensUsed)}`].filter(Boolean);return e(a,{className:"my-1.5 animate-fade",header:n(h,{children:[e(Ma,{className:u("size-3.5 shrink-0",m.status==="active"?"text-accent":m.status==="complete"?"text-success":"text-faint")}),n("span",{className:"truncate font-medium text-ink",title:m.objective,children:["持久目标:",m.objective]}),g.length>0&&n("span",{className:"shrink-0 text-xs text-faint tabular-nums",children:["· ",g.join(" · ")]})]}),actions:e(c,{tone:p.tone,pulse:p.pulse,children:p.label})})}var wie=(t,a)=>{let c=a.split(`
29
+ `),f=((c[0]?.startsWith("["))?c.slice(1):c).join(`
30
+ `).trim();if(t.state==="budget_limited")return{label:"目标已达 Token 预算上限",icon:be,tone:"warning",output:f||void 0};if(t.state==="objective_updated")return{label:"持久目标内容已更新",icon:Ma,tone:"accent",output:f||void 0};return{label:t.state==="start"?"已启动持久目标":"持久目标自动续跑",icon:ye,tone:"accent",output:f||void 0}};function kie(t){let a=new Map,c=new Map;for(let f of t){if(f.type!=="extension"||f.namespace!=="goal"||f.kind!=="state")continue;if(!oh(f.payload))continue;let{goalID:m}=f.payload;if(!c.has(m))c.set(m,f.seq);a.set(m,f.payload)}let u=[];for(let f of t){if(f.type==="extension"&&f.namespace==="goal"&&f.kind==="state"){if(!oh(f.payload))continue;let{goalID:m}=f.payload,p=c.get(m),g=a.get(m);if(f.seq===p&&g&&g.action!=="cleared")u.push({...f,payload:g});continue}u.push(f)}return u}var Sie={complete:"已完成",paused:"暂停",blocked:"受阻"},x9={id:"goal",apiVersion:1,metadata:{description:"会话级持久目标(Goal)追踪、Token 预算控制与多轮自动续跑",icon:Ma},views:{state:{kind:"card",load:async()=>({default:g9})}},slots:{"chat:dock":h9},commands:{goal:({session:t})=>{p9(t.id)}},tools:{goal_get:{icon:Ma,active:"正在查询目标状态",done:"查询目标状态",count:{verb:"查询目标",unit:"次"}},goal_create:{icon:Ma,active:"正在设定持久目标",done:"设定持久目标",summary:(t)=>typeof t.objective==="string"?t.objective.trim():"",count:{verb:"设定目标",unit:"个"}},goal_update:{icon:Ma,active:"正在更新目标状态",done:"更新目标状态",summary:(t)=>{let a=typeof t.status==="string"?t.status:"";return Sie[a]??a},count:{verb:"更新目标",unit:"次"}}},notices:{goal:wie},projectEntries:kie};function v9(t){let{cn:a}=x();return t.images.map((c,u)=>e("div",{className:"overflow-hidden rounded-lg border border-line bg-bg/50",children:e("img",{src:`data:${c.mimeType};base64,${c.data}`,alt:t.alt(u),className:a("max-h-80 max-w-full rounded-lg object-contain",t.className)})},`${c.mimeType}:${c.data.length}:${u}`))}function b9({input:t,result:a,header:c,copyAction:u}){let{cn:f,style:m,useTheme:p}=x();p();let g=typeof t.prompt==="string"?t.prompt.trim():"",v=typeof t.size==="string"?t.size:void 0,k=typeof t.quality==="string"?t.quality:void 0,S=t.images;if(typeof S==="string"&&S.trim().startsWith("["))try{S=JSON.parse(S)}catch{}let I=(Array.isArray(S)?S:[S]).filter((z)=>typeof z==="string"&&z.length>0).map((z,B)=>({source:z,role:B===0?"目标":"参考"})),T=typeof t.mask==="string"?t.mask:void 0,L=a?.images??[],R=a?.meta,A=typeof R?.inputCount==="number"?Math.min(R.inputCount,L.length):0,E=L.slice(0,L.length-A),P=L.slice(L.length-A),D=a?.output||a?.error||"",N=(z)=>z.startsWith("att_")?`会话附图 ${z}`:z,F=/Image saved to:\s*([^\r\n]+)/.exec(D)?.[1]?.trim();return n("div",{className:m("surface.panel","mt-1.5 mb-2.5 text-xs"),children:[n("div",{className:"flex items-center justify-between border-b border-line/60 bg-raised/30 px-3.5 py-2",children:[e("div",{className:"min-w-0 flex-1 truncate font-mono text-dim",children:c}),u]}),n("div",{className:"space-y-3 p-3.5",children:[g&&n("div",{children:[e("div",{className:"mb-1 text-[11px] font-medium text-faint",children:"生图提示词"}),e("div",{className:"text-[13px] leading-relaxed text-ink select-text",children:g})]}),I.length>0&&n("div",{children:[e("div",{className:"mb-1 text-[11px] font-medium text-faint",children:"编辑输入"}),n("div",{className:"flex flex-wrap gap-2 text-[11px]",children:[I.map(({source:z,role:B})=>n("span",{className:m("control.badge","max-w-full truncate px-2 font-mono text-[11px] text-dim"),title:z,children:[B,": ",N(z)]},`${B}:${z}`)),T&&n("span",{className:m("control.badge","max-w-full truncate px-2 font-mono text-[11px] text-dim"),title:T,children:["蒙版: ",N(T)]})]})]}),(v||k)&&n("div",{className:"flex flex-wrap gap-2 text-[11px]",children:[v&&n("span",{className:m("control.badge","px-2 font-mono text-[11px] text-dim"),children:["尺寸: ",v]}),k&&n("span",{className:m("control.badge","px-2 font-mono text-[11px] text-dim"),children:["画质: ",k]})]}),P.length>0&&n("div",{children:[e("div",{className:"mb-1 text-[11px] font-medium text-faint",children:"原图"}),e("div",{className:"flex flex-wrap gap-3",children:e(v9,{images:P,alt:(z)=>`编辑输入 ${z+1}`})})]}),E.length>0&&n("div",{children:[P.length>0&&e("div",{className:"mb-1 text-[11px] font-medium text-faint",children:"成品"}),e("div",{className:"flex flex-wrap gap-3 pt-1",children:e(v9,{images:E,alt:()=>g||"生成的图像",className:"transition-transform hover:scale-[1.01]"})})]}),F&&n("div",{className:"flex items-center gap-1.5 font-mono text-[11.5px] text-faint",children:[e("span",{className:"shrink-0 text-success",children:"已保存至:"}),e("span",{className:"truncate select-all",title:F,children:F})]}),a?.isError&&e("div",{className:f("border-t border-line/60 pt-2 font-mono text-[11px] whitespace-pre-wrap text-danger"),children:a.error||D}),a&&!a.isError&&E.length===0&&D&&e("div",{className:"border-t border-line/60 pt-2 font-mono text-[11px] whitespace-pre-wrap text-dim",children:D})]})]})}var y9={icon:Df,active:"正在生成图片",done:"生成图片",summary(t){if(typeof t.prompt==="string")return t.prompt.trim();return""},count:{verb:"生成",unit:"张图片"},renderDetail:b9},w9={id:"imagegen",apiVersion:1,metadata:{description:"原生图片生成与图像编辑能力",icon:_0},tools:{image_generation:y9,image_gen:y9}};var k9={load:()=>(C("k6wxwgp1"),import("./chunk-k6wxwgp1.js")).then((t)=>({default:t.EChartsBlock}))},S9={id:"markdown-graph",apiVersion:1,metadata:{description:"把回复里的 mermaid 代码块渲染成流程图、echarts 代码块渲染成数据图表",icon:k0},codeBlocks:{mermaid:{load:()=>(C("7n6b2xra"),import("./chunk-7n6b2xra.js")).then((t)=>({default:t.MermaidBlock}))},echarts:k9,chart:k9}};var C9={id:"mcp",apiVersion:1,metadata:{description:"连接 MCP 服务器,使用外部工具",icon:y0},views:{settings:{kind:"tab",load:()=>(C("rcre1stj"),import("./chunk-rcre1stj.js")).then((t)=>({default:t.McpSection}))}}};var Y0={selected:[],otherOn:!1,other:""};function qi(t){return t.selected.length>0||t.otherOn&&t.other.trim().length>0}function Kw(t,a){let[c,u]=r(()=>Array.from({length:t},()=>Y0)),[f,m]=r(0),[p,g]=r("init"),[v,k]=r(0),S=i(null),I=i(new Map),T=i(null),L=i(!1),R=f===t-1,A=c[f]??Y0,E=(F)=>{if(F===f)return;g(F>f?"next":"prev"),m(F),k(0),S.current?.focus()};return K(()=>{if(t<=1)return;let F=I.current.get(f),z=T.current;if(!F||!z)return;z.style.transition=L.current?"transform 200ms cubic-bezier(0.22, 1, 0.36, 1), width 200ms cubic-bezier(0.22, 1, 0.36, 1)":"none",z.style.transform=`translate3d(${Math.round(F.offsetLeft)}px, ${Math.round(F.offsetTop)}px, 0)`,z.style.width=`${F.offsetWidth}px`,z.style.height=`${F.offsetHeight}px`,z.style.opacity="1",L.current=!0,F.scrollIntoView?.({block:"nearest",inline:"nearest",behavior:"smooth"})},[f,t]),o(()=>{S.current?.focus()},[]),{count:t,drafts:c,draft:A,step:f,stepDir:p,cursor:v,setCursor:k,last:R,root:S,stepItems:I,stepPill:T,go:E,updateDraft:(F)=>u((z)=>z.map((B,U)=>U===f?F(B):B)),nextStep:()=>{if(!R)return E(f+1);if(c.every(qi))a(c)},prevStep:()=>{if(f>0)E(f-1)},selectSingle:(F)=>{let z=c.map((B,U)=>U===f?{...A,selected:[F],otherOn:!1}:B);if(u(z),!R)return E(f+1);if(z.every(qi))a(z)}}}function Ww(t,a,c){if(c.busy||t.nativeEvent.isComposing)return;if(c.nativeControls){if(t.target instanceof HTMLInputElement&&(t.target.type==="checkbox"||t.target.type==="radio"))return;if(t.target instanceof HTMLButtonElement)return}if(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement){if(t.key==="Escape")t.preventDefault(),a.root.current?.focus();else if(t.key==="Enter"&&!t.shiftKey){if(t.preventDefault(),qi(a.draft))a.nextStep()}return}if(t.key>="1"&&t.key<="9"){let u=Number(t.key)-1;if(u<c.optionCount)t.preventDefault(),a.setCursor(u),c.pickOption(u);else if(u===c.otherIndex)t.preventDefault(),a.setCursor(u),c.toggleOther();return}if(t.key==="ArrowDown"||t.key==="Tab"&&!t.shiftKey){t.preventDefault(),a.setCursor((u)=>c.rows>0?(u+1)%c.rows:0);return}if(t.key==="ArrowUp"||t.key==="Tab"&&t.shiftKey){t.preventDefault(),a.setCursor((u)=>c.rows>0?(u-1+c.rows)%c.rows:0);return}if(t.key==="ArrowLeft"&&a.step>0){t.preventDefault(),a.prevStep();return}if(t.key==="ArrowRight"&&a.step<a.count-1&&qi(a.draft)){t.preventDefault(),a.nextStep();return}if(t.key==="Enter"||t.key===" "){if(t.preventDefault(),a.cursor===c.otherIndex)c.toggleOther();else if(a.cursor<c.optionCount)c.activateOption(a.cursor,t.key)}}function Xw(t){let{Button:a,cn:c}=x(),u=t.dock;if(u.count<=1)return n("div",{className:"flex items-center justify-between gap-2 px-4 pt-3.5 pb-0.5",children:[e("div",{className:"flex min-w-0 items-center gap-1.5 text-xs text-faint",children:t.single}),e(a,{variant:"ghost",size:"sm",disabled:t.busy,onClick:t.onCancel,className:"h-6 -mr-1.5 rounded-md px-2 text-xs text-faint hover:text-ink",children:t.cancelLabel})]});return n("div",{className:"flex items-center justify-between gap-2 border-b border-line/60 bg-raised/25 px-3 py-2",children:[n("div",{className:"relative flex min-w-0 flex-1 items-center gap-1 overflow-x-auto",children:[e("span",{ref:u.stepPill,"aria-hidden":!0,className:"pointer-events-none absolute top-0 left-0 rounded-lg bg-panel opacity-0 shadow-xs ring-1 ring-inset ring-line/80 will-change-transform"}),t.steps.map((f,m)=>{let p=m===u.step,g=qi(u.drafts[m]??Y0);return n("button",{ref:(v)=>{if(v)u.stepItems.current.set(m,v);else u.stepItems.current.delete(m)},type:"button",onPointerDown:(v)=>{if(v.button===0)u.go(m)},onClick:()=>u.go(m),className:c("relative z-1 flex shrink-0 cursor-pointer items-center gap-1.5 rounded-lg px-2.5 py-1 text-xs font-medium transition-colors duration-150 select-none",p?"text-ink":g?"text-dim hover:bg-raised/60 hover:text-ink":"text-faint hover:bg-raised/40 hover:text-dim"),children:[e("span",{className:c("flex size-4 items-center justify-center rounded-full font-mono text-[10.5px] leading-none tabular-nums transition-colors duration-200",p?"bg-accent text-accent-ink":g?"bg-accent/15 text-accent":"bg-raised text-faint"),children:g&&!p?e(Z,{className:"size-2.5 animate-pop",strokeWidth:3}):m+1}),e("span",{className:"max-w-28 truncate",children:f.title})]},f.key)})]}),n("div",{className:"flex shrink-0 items-center gap-1.5",children:[n("span",{className:"font-mono text-[11px] text-faint tabular-nums max-sm:hidden",children:[u.step+1,"/",u.count]}),e(a,{variant:"ghost",size:"sm",disabled:t.busy,onClick:t.onCancel,className:"h-6 rounded-md px-2 text-xs text-faint hover:text-ink",children:t.cancelLabel})]})]})}function Yw(t){let{cn:a}=x(),c=t.dock.count>1;return n("div",{className:a(t.dock.stepDir==="next"&&"animate-step-next",t.dock.stepDir==="prev"&&"animate-step-prev"),children:[e("div",{className:a("px-4",c?"pt-3.5 pb-2.5":"pt-1.5 pb-2.5"),children:e("h3",{className:"text-[15px] leading-[1.55] font-medium text-ink",children:t.heading})}),t.children]},t.dock.step)}function Qw(t){let{Button:a,style:c}=x(),u=t.dock;return n("div",{className:"flex items-center justify-between gap-3 px-4 pt-2 pb-3",children:[n("div",{className:"hidden items-center gap-3 text-[11.5px] text-faint select-none sm:flex",children:[n("span",{className:"inline-flex items-center gap-1",children:[n("kbd",{className:c("control.kbd","font-mono text-[10px] text-dim"),children:["1-",t.rows]}),e("span",{children:"选择"})]}),n("span",{className:"inline-flex items-center gap-1",children:[e("kbd",{className:c("control.kbd","font-mono text-[10px] text-dim"),children:"↵"}),e("span",{children:u.last?t.confirmLabel:"下一步"})]})]}),n("div",{className:"ml-auto flex items-center gap-1.5",children:[t.children,u.count>1&&u.step>0&&e(a,{variant:"ghost",size:"sm",disabled:t.busy,onClick:u.prevStep,className:"h-7.5 rounded-lg px-2.5 text-xs",children:"上一步"}),n(a,{variant:"primary",size:"sm",disabled:!t.canSubmit,onClick:u.nextStep,className:"h-7.5 gap-1 rounded-lg px-3 text-xs",children:[e("span",{children:u.last?t.submitting?t.submittingLabel:t.confirmLabel:"下一步"}),t.icon]})]})]})}var Cie=/\s*(?:\(recommended\)|(推荐))\s*$/i;function Hs(t){let a=Cie.exec(t);if(!a||a.index===0)return{title:t,recommended:!1};return{title:t.slice(0,a.index),recommended:!0}}function ah(t){let{cn:a,style:c,useTheme:u}=x();u();let f=Boolean(t.children),{title:m,recommended:p}=Hs(t.label),g=e("span",{"aria-hidden":!0,className:a("flex size-5 shrink-0 items-center justify-center rounded-[6px] border font-mono text-[11px] leading-none font-medium tabular-nums transition-colors duration-150 peer-focus-visible:ring-2 peer-focus-visible:ring-accent",!f&&t.description&&"mt-0.5",t.checked?"border-accent bg-accent text-accent-ink":t.active?"border-line-strong bg-panel text-ink":"border-line bg-raised/55 text-faint group-hover/row:border-line-strong group-hover/row:text-dim"),children:t.checked?e(Z,{className:"size-3 animate-pop",strokeWidth:2.8}):t.index});return n("div",{className:a("group/row relative flex w-full select-none gap-2.5 rounded-xl px-2.5 py-2 text-left transition-colors duration-120",f?"items-center":"items-start",t.disabled?"cursor-not-allowed opacity-50":"cursor-pointer",t.checked?"bg-accent-soft ring-1 ring-inset ring-accent/30":t.active?"bg-raised/75":"hover:bg-raised/50"),children:[n("label",{onMouseEnter:t.onHover,className:a("flex cursor-[inherit] gap-2.5",f?"shrink-0 items-center":"min-w-0 flex-1 items-start"),children:[e("input",{type:t.multi?"checkbox":"radio",name:t.name,value:t.label,checked:t.checked,disabled:t.disabled,className:"peer sr-only",onChange:t.onClick,onFocus:t.onHover,onKeyDown:(v)=>{if(v.key!=="Enter")return;if(v.preventDefault(),v.stopPropagation(),t.onEnter)t.onEnter();else t.onClick()}}),g,f?e("span",{className:"sr-only",children:t.label}):n("span",{className:"min-w-0 flex-1",children:[n("span",{className:"flex flex-wrap items-center gap-1.5 text-[13.5px] leading-5",children:[e("span",{className:a("break-words text-ink",t.checked&&"font-medium"),children:m}),p&&e("span",{className:c("control.badgeAccent"),children:"推荐"})]}),t.description&&e("span",{className:"mt-0.5 block text-[12.5px] leading-[1.45] break-words text-faint",children:t.description})]})]}),f&&e("div",{className:"min-w-0 flex-1",children:t.children})]})}function I9(t){let{Button:a,style:c}=x(),u=t.clarification.questions,[f,m]=r(),p=i(null),g=async(B)=>{if(f)return;m("answer");try{let U=u.map((Y,G)=>{let ce=B[G]??Y0,re=ce.selected.map((Q)=>String(Y.options.indexOf(Q))).filter((Q)=>Q!=="-1");return{questionID:Y.id,selectedOptionIDs:re,text:ce.otherOn&&ce.other.trim()?ce.other.trim():void 0}});await t.onSubmit({expectedRound:t.clarification.round,action:"answer",answers:U})}finally{m(void 0)}},v=async()=>{if(f)return;m("skip");try{await t.onSubmit({expectedRound:t.clarification.round,action:"skip"})}finally{m(void 0)}},k=Kw(u.length,g),{step:S,cursor:I,setCursor:T,draft:L,updateDraft:R,selectSingle:A}=k,E=u[S],P=E?E.options.length+1:0,D=E?E.options.length:-1,N=qi(L)&&!f,O=()=>{if(!E)return;let B=!L.otherOn;if(R((U)=>({...U,otherOn:B})),B)requestAnimationFrame(()=>p.current?.focus())},F=(B)=>{if(!E)return;R((U)=>({...U,other:B,otherOn:B.trim().length>0}))},z=(B)=>Ww(B,k,{busy:Boolean(f),rows:P,optionCount:E?.options.length??0,otherIndex:D,nativeControls:!1,pickOption:(U)=>{let Y=E?.options[U];if(Y)A(Y)},activateOption:(U)=>{let Y=E?.options[U];if(Y)A(Y)},toggleOther:O});if(!E)return null;return n("div",{ref:k.root,role:"dialog","aria-label":"提示词澄清提问",tabIndex:-1,onKeyDown:z,className:c("surface.dock","animate-rise"),children:[e(Xw,{dock:k,steps:u.map((B)=>({key:B.id,title:B.question.slice(0,10)})),single:n(h,{children:[e(si,{className:"size-3.5 shrink-0 text-accent"}),e("span",{className:"truncate font-medium text-dim",children:"提示词澄清确认"})]}),cancelLabel:"取消",busy:Boolean(f),onCancel:t.onCancel}),e(Yw,{dock:k,heading:E.question,children:n("div",{className:"space-y-1 px-2.5 pb-2",children:[E.options.map((B,U)=>e(ah,{index:U+1,name:E.id,multi:!1,active:I===U,checked:L.selected.includes(B),label:B,disabled:Boolean(f),onClick:()=>A(B),onHover:()=>T(U)},B)),e(ah,{index:D+1,name:E.id,multi:!1,active:I===D,checked:L.otherOn&&L.other.trim().length>0,label:"其他",disabled:Boolean(f),onClick:O,onHover:()=>T(D),children:e("input",{ref:p,type:"text","aria-label":"补充自定义要求",placeholder:"其他想法,直接输入补充…",value:L.other,onFocus:()=>{if(T(D),L.other.trim().length>0&&!L.otherOn)R((B)=>({...B,otherOn:!0}))},onChange:(B)=>F(B.target.value),className:"h-5 w-full bg-transparent text-[13.5px] leading-5 text-ink placeholder:text-faint outline-none"})})]})}),e(Qw,{dock:k,rows:P,busy:Boolean(f),submitting:f==="answer",canSubmit:N,confirmLabel:"确认优化",submittingLabel:"优化中…",children:e(a,{variant:"ghost",size:"sm",disabled:Boolean(f),onClick:v,className:"h-7.5 rounded-lg px-2.5 text-xs text-dim hover:text-ink",children:"跳过澄清"})})]})}function T9(t){let a=x(),{Dialog:c,DialogFooter:u,Button:f,ModelSelector:m}=a,p=t.selectedModel?`${t.selectedModel.providerID}/${t.selectedModel.modelID}`:"";return e(c,{open:t.open,onOpenChange:t.onOpenChange,title:"选择提示词优化模型",description:"优化插件必须显式指定模型才能发起改写,请在下方选择一个可用模型。",size:"sm",footer:e(u,{children:e(f,{variant:"ghost",onClick:()=>t.onOpenChange(!1),children:"取消"})}),children:e("div",{className:"py-2",children:e(m,{variant:"field",models:t.models,value:p,onChange:(g)=>{let v=g.indexOf("/"),k=v<0?"":g.slice(0,v),S=v<0?g:g.slice(v+1);t.onSelectModel({providerID:k,modelID:S}),t.onOpenChange(!1)}})})})}var Q0="/api/plugins/prompt-optimizer";function L9(t){let a=x();a.useTheme();let{connection:c,sessionID:u,context:f}=t,[m,p]=r(null),[g,v]=r({models:[]}),[k,S]=r("idle"),[I,T]=r(!1),[L,R]=r(null),[A,E]=r(null),P=i(null),D=i(null),N=y(async()=>{try{let[xe,Te]=await Promise.all([c.request(`${Q0}/settings`),c.request("/api/models")]);p(xe),v(Te)}catch{}},[c]);o(()=>{N()},[N]);let O=m?.primaryModel??null,F=async(xe)=>{if(!m)return;let Te=await c.request(`${Q0}/settings`,{method:"PUT",body:JSON.stringify({schemaVersion:1,revision:m.revision,primaryModel:xe,maxClarificationRounds:m.maxClarificationRounds})});p(Te)},z=()=>{if(!A||!f)return;f.setText(A.text),E(null),S("idle")},B=async()=>{D.current?.abort();let xe=P.current;if(xe)P.current=null,await c.request(`${Q0}/runs/${encodeURIComponent(xe)}`,{method:"DELETE"}).catch(()=>{});S("idle")},U=async(xe)=>{if(!xe.body||!f)return;let Te=xe.body.getReader(),me=new TextDecoder,Ce="",Be="";S("streaming");try{while(!0){let{done:X,value:He}=await Te.read();if(X)break;Ce+=me.decode(He,{stream:!0});let Le=Ce.split(`
31
+ `);Ce=Le.pop()??"";for(let J of Le){if(!J.startsWith("data: "))continue;let Me=J.slice(6).trim();if(!Me)continue;try{let Ie=JSON.parse(Me);if(Ie.type==="started")P.current=Ie.runID;else if(Ie.type==="text_delta")Be+=Ie.delta,f.setText(Be);else if(Ie.type==="questions"){R({runID:Ie.runID,round:Ie.round,questions:Ie.questions}),S("clarifying");return}else if(Ie.type==="completed"){f.setText(Ie.text),S("done"),P.current=null;return}else if(Ie.type==="cancelled"||Ie.type==="error"){P.current=null,S("idle");return}}catch{}}}S("done")}finally{Te.releaseLock()}},Y=async(xe)=>{if(!f?.text.trim())return;S("waiting"),E({text:f.text,key:f.draftKey});let Te=new AbortController;D.current=Te;let me={model:xe,sessionID:u||void 0,draft:{text:f.text,attachments:f.attachments?.map((Ce,Be)=>({id:String(Be),name:Ce.name,kind:Ce.kind==="image"?"image":"file"}))}};try{if(!c.requestStream)throw Error("Connection does not support stream request");let Ce=await c.requestStream(`${Q0}/runs`,{method:"POST",body:JSON.stringify(me),signal:Te.signal});await U(Ce)}catch{S("idle"),P.current=null}},G=async()=>{if(!f?.text.trim())return;if(!O){T(!0);return}await Y(O)},ce=async(xe)=>{await F(xe),await Y(xe)},re=async(xe)=>{if(!L||!f)return;let Te=L.runID;S("waiting");let me=new AbortController;D.current=me;try{if(!c.requestStream)return;let Ce=await c.requestStream(`${Q0}/runs/${encodeURIComponent(Te)}/answers`,{method:"POST",body:JSON.stringify(xe),signal:me.signal});R(null),await U(Ce)}catch{S("idle")}},Q=k==="waiting"||k==="streaming",ae=k==="done"&&A&&A.text!==f?.text;return n(h,{children:[t.children,n("div",{className:"flex items-center gap-1",children:[Q?n("button",{type:"button",onClick:B,className:"group relative flex size-7 items-center justify-center rounded-full border border-danger/40 bg-danger/10 text-danger transition-colors hover:bg-danger/20",title:"停止优化",children:[e("span",{className:"absolute inset-0 animate-ping rounded-full bg-danger/20 duration-1000"}),k==="waiting"?e(ie,{className:"relative size-3.5 animate-spin"}):e(zf,{className:"relative size-3 fill-current"})]}):e("button",{type:"button",disabled:f?.busy||!f?.text.trim(),onClick:G,className:a.style("control.iconCircle","hover:shadow-[0_0_12px_-2px_color-mix(in_oklch,var(--color-accent)_40%,transparent)]"),title:O?`优化提示词(当前模型: ${O.modelID})`:"优化提示词(点击选择模型)",children:e(al,{className:"size-3.5 shrink-0 transition-transform duration-200 group-hover:scale-110 group-active:scale-95"})}),ae&&e("button",{type:"button",onClick:z,className:a.style("control.iconCircle","hover:border-line-strong hover:bg-raised hover:text-ink"),title:"撤销本次优化,恢复原草稿",children:e(Bf,{className:"size-3.5 shrink-0"})})]}),e(T9,{open:I,onOpenChange:T,models:g,selectedModel:O,onSelectModel:ce}),k==="clarifying"&&L&&e("div",{className:"absolute inset-x-0 bottom-full z-30 mb-2",children:e(I9,{clarification:L,onSubmit:re,onCancel:B})})]})}var Iie={id:"prompt-optimizer",apiVersion:1,metadata:{description:"使用显式选择的模型澄清并优化草稿,不修改会话历史。",icon:al},views:{settings:{kind:"tab",load:()=>(C("yavbdwyt"),import("./chunk-yavbdwyt.js")).then((t)=>({default:t.PromptOptimizerSettingsSection}))}},slots:{"composer:toolbar":L9}},R9=Iie;function Zw(t){return t!==null&&typeof t==="object"&&!Array.isArray(t)}function Tie(t){if(!Array.isArray(t)||t.length<1||t.length>4)throw new Mu("questions must contain 1–4 questions");for(let a of t){if(!Zw(a)||typeof a.question!=="string"||!a.question.trim()||a.question.length>4000||typeof a.header!=="string"||!a.header.trim()||[...a.header].length>12||typeof a.multiSelect!=="boolean")throw new Mu("Invalid question or header (1–12 characters)");if(!Array.isArray(a.options)||a.options.length<2||a.options.length>4)throw new Mu("Each question requires 2–4 options");let c=new Set;for(let u of a.options){if(!Zw(u)||typeof u.label!=="string"||!u.label.trim()||u.label.length>200||typeof u.description!=="string"||!u.description.trim()||u.description.length>1000||c.has(u.label))throw new Mu("Options require unique labels and descriptions");c.add(u.label)}}}function Lie(t,a){if(!Array.isArray(a)||a.length!==t.questions.length)throw new Mu("Provide one answer per question");for(let[c,u]of a.entries()){let f=t.questions[c];if(!f||!Zw(u)||!Array.isArray(u.selected)||u.selected.some((m)=>typeof m!=="string"||!f.options.some((p)=>p.label===m))||new Set(u.selected).size!==u.selected.length||!f.multiSelect&&u.selected.length>1||u.other!==void 0&&(typeof u.other!=="string"||u.other.length>4000||!t.allowOther)||!u.selected.length&&!(typeof u.other==="string"&&u.other.trim()))throw new Mu("Invalid answer: select allowed options or provide permitted free text")}}function DL(t,a){let c=new Map;for(let u of t){if(u.type==="user"||u.type==="run"&&u.state==="end"&&u.reason!=="waiting_user"){for(let m of c.values())if(m.state==="pending")m.state="cancelled";continue}if(u.type!=="extension"||u.namespace!=="question"||!Zw(u.payload))continue;let f=u.payload;if(f.sessionID!==a||typeof f.id!=="string")continue;if(u.kind==="asked"){if(u.schemaVersion!==1||!Array.isArray(f.questions)||typeof f.askedAt!=="number"||typeof f.allowOther!=="boolean")continue;Tie(f.questions),c.set(f.id,{id:f.id,sessionID:a,questions:f.questions,allowOther:f.allowOther,askedAt:f.askedAt,state:"pending"})}else{let m=c.get(f.id);if(m?.state!=="pending")continue;if(u.kind==="answered"&&Array.isArray(f.answers))Lie(m,f.answers),m.state="answered",m.answers=f.answers;else if(u.kind==="dismissed"||u.kind==="cancelled")m.state=u.kind}}return[...c.values()]}function Sl(t){let{style:a}=x(),c=t.question,[u,f]=r(),m=i(null);async function p(U){if(u)return;f("answer");try{let Y=U.map((G,ce)=>({selected:(c.questions[ce]?.options??[]).flatMap((re)=>G.selected.includes(re.label)?[re.label]:[]),...G.otherOn&&G.other.trim()?{other:G.other.trim()}:{}}));if(t.onAnswer)await t.onAnswer(Y);else await t.connection.request(`/api/sessions/${encodeURIComponent(t.sessionID)}/questions/${encodeURIComponent(c.id)}/answer`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({answers:Y})})}catch{f(void 0)}}async function g(){if(u)return;f("dismiss");try{if(t.onDismiss)await t.onDismiss();else await t.connection.request(`/api/sessions/${encodeURIComponent(t.sessionID)}/questions/${encodeURIComponent(c.id)}/dismiss`,{method:"POST"})}catch{f(void 0)}}let v=Kw(c.questions.length,p),{step:k,cursor:S,setCursor:I,draft:T,updateDraft:L,nextStep:R,selectSingle:A}=v,E=c.questions[k],P=E?E.options.length+(c.allowOther?1:0):0,D=E&&c.allowOther?E.options.length:-1,N=qi(T)&&!u,O=(U)=>{if(!E)return;L((Y)=>{if(!E.multiSelect)return{...Y,selected:[U],otherOn:!1};let G=Y.selected.includes(U);return{...Y,selected:G?Y.selected.filter((ce)=>ce!==U):[...Y.selected,U]}})},F=()=>{if(!E)return;let U=!T.otherOn;if(L((Y)=>({...Y,otherOn:U,selected:!E.multiSelect&&U?[]:Y.selected})),U)requestAnimationFrame(()=>m.current?.focus())},z=(U)=>{if(!E)return;let Y=U.trim().length>0;L((G)=>({...G,other:U,otherOn:Y,selected:!E.multiSelect&&Y?[]:G.selected}))},B=(U)=>Ww(U,v,{busy:Boolean(u),rows:P,optionCount:E?.options.length??0,otherIndex:D,nativeControls:!0,pickOption:(Y)=>{let G=E?.options[Y];if(!G)return;if(E?.multiSelect)O(G.label);else A(G.label)},activateOption:(Y,G)=>{let ce=E?.options[Y];if(!E||!ce)return;if(G==="Enter"&&!E.multiSelect)A(ce.label);else if(G==="Enter"&&E.multiSelect&&qi(T))R();else O(ce.label)},toggleOther:F});if(!E)return null;return n("div",{ref:v.root,role:"dialog","aria-label":E.header,tabIndex:-1,onKeyDown:B,className:a("surface.dock","animate-rise"),children:[e(Xw,{dock:v,steps:c.questions.map((U)=>({key:U.header,title:U.header})),single:n(h,{children:[e(kn,{className:"size-3.5 shrink-0 text-accent"}),e("span",{className:"truncate font-medium text-dim",children:E.header}),E.multiSelect&&e("span",{className:a("control.badge","shrink-0 text-[11px]"),children:"可多选"})]}),cancelLabel:"忽略",busy:Boolean(u),onCancel:g}),e(Yw,{dock:v,heading:n(h,{children:[E.question,v.count>1&&E.multiSelect&&e("span",{className:a("control.badge","ml-2 -translate-y-px align-middle text-[11px] font-normal"),children:"可多选"})]}),children:n("div",{className:"flex flex-col gap-1 px-2",children:[E.options.map((U,Y)=>e(ah,{name:`${c.id}-${k}`,index:Y+1,multi:Boolean(E.multiSelect),active:S===Y,checked:T.selected.includes(U.label),label:U.label,description:U.description,disabled:Boolean(u),onClick:()=>O(U.label),onHover:()=>I(Y),onEnter:()=>{if(!E.multiSelect)A(U.label);else if(qi(T))R();else O(U.label)}},U.label)),c.allowOther&&e(ah,{name:`${c.id}-${k}`,index:E.options.length+1,multi:Boolean(E.multiSelect),active:S===D,checked:T.otherOn,label:T.other||"自定义回答",disabled:Boolean(u),onClick:F,onHover:()=>I(D),onEnter:()=>{if(qi(T))R();else F()},children:e("input",{ref:m,type:"text","aria-label":"自定义答案",disabled:Boolean(u),placeholder:"其他想法,直接输入补充…",value:T.other,onFocus:()=>{if(I(D),T.other.trim().length>0&&!T.otherOn)L((U)=>({...U,otherOn:!0,selected:!E.multiSelect?[]:U.selected}))},onChange:(U)=>z(U.target.value),className:"h-5 w-full bg-transparent text-[13.5px] leading-5 text-ink placeholder:text-faint outline-none disabled:cursor-not-allowed"})})]})}),e(Qw,{dock:v,rows:P,busy:Boolean(u),submitting:u==="answer",canSubmit:N,confirmLabel:"确认",submittingLabel:"提交中…",icon:u==="answer"?e(ie,{className:"size-3.5 animate-spin"}):v.last?e(I0,{className:"size-3 opacity-80"}):e(h0,{className:"size-3.5 opacity-80"})})]})}var Rie=(t,a)=>{let c=t.state==="answered",u=a.split(`
32
+ `),f=u[0]?.startsWith("[系统通知")?u.slice(1):u;return{label:c?"已回答提问":"提问未回答",icon:c?Z:Ht,tone:c?"success":"faint",output:f.join(`
33
+ `).trim()||void 0}};function Eie(t,a){let c=DL(t,a.sessionID),u=new Map(c.map((m)=>[m.id,m])),f=[];for(let m of t){if(m.type==="extension"&&m.namespace==="question"){let p=m.payload,g=p?.id?u.get(p.id):void 0;if(m.kind==="asked"&&g)f.push({...m,payload:g});continue}f.push(m)}return f}function Pie(t){if(!t.sessionID)return e(h,{children:t.children});let a=t.context?.entries??[],u=DL(a,t.sessionID).find((f)=>f.state==="pending");if(!u)return e(h,{children:t.children});return e(Sl,{connection:t.connection,sessionID:t.sessionID,question:u})}var E9={id:"question",apiVersion:1,metadata:{description:"需要决定时向用户提问",icon:kn},views:{card:{kind:"card",load:()=>(C("8ec53vjd"),import("./chunk-8ec53vjd.js")).then((t)=>({default:t.QuestionCard}))},dock:{kind:"card",load:()=>(C("33mmrjdp"),import("./chunk-33mmrjdp.js")).then((t)=>({default:({connection:a,sessionID:c,payload:u})=>e(t.QuestionDock,{connection:a,sessionID:c,question:u})}))}},slots:{"chat:dock":Pie},tools:{question:{icon:si,active:"正在准备提问",done:"提问",hiddenInSteps:!0}},projectEntries:Eie,suppressNotices:["question"],notices:{question:Rie}};var P9={id:"session-ops",apiVersion:1,metadata:{description:"复制、分叉、编辑与重放会话",icon:at}};var A9={id:"skills",apiVersion:1,metadata:{description:"按需加载技能说明与附带文件",icon:v0},views:{settings:{kind:"tab",load:()=>(C("xea3snym"),import("./chunk-xea3snym.js")).then((t)=>({default:t.SkillsSection}))}},tools:{skill:{icon:$n,active:"正在加载技能",done:"加载技能",summary:(t)=>typeof t.name==="string"?t.name:"",count:{verb:"加载技能",unit:"个"}},skills:{icon:$n,active:"正在加载技能",done:"加载技能",summary:(t)=>typeof t.name==="string"?t.name:"",count:{verb:"加载技能",unit:"个"}}}};var M9={id:"stats",apiVersion:1,metadata:{description:"全局、各项目与每日的耗时、Token 用量、模型吞吐与工具调用统计分析",icon:vc},pageNav:{title:"统计",icon:vc,path:"/stats"},views:{page:{kind:"page",load:()=>(C("2wwj27b9"),import("./chunk-2wwj27b9.js")).then((t)=>({default:t.StatsPage}))}}};var D9={id:"terminal",apiVersion:1,metadata:{description:"在项目目录打开服务器上的交互式终端,远程执行命令",icon:dn},views:{sidebar:{kind:"sidebar",load:()=>(C("pcfjcy3a"),import("./chunk-pcfjcy3a.js")).then((t)=>({default:t.TerminalSidebar}))}}};var Aie={id:"title-generator",apiVersion:1,metadata:{description:"首次生成会话标题,复用会话开始独立需求时自动更新;始终使用 None 思考。",icon:O0},views:{settings:{kind:"tab",load:()=>(C("xyk1wpr4"),import("./chunk-xyk1wpr4.js")).then((t)=>({default:t.TitleGeneratorSettingsSection}))}}},N9=Aie;var O9={id:"wake",apiVersion:1,metadata:{description:"定时唤醒会话,稍后继续工作",icon:Rf},tools:{wake:{icon:Rf,active:"正在设定提醒",done:"定时提醒",hiddenInSteps:!0,summary:(t)=>{if(typeof t.prompt==="string"&&t.prompt.trim())return t.prompt.trim();if(t.action==="list")return"查看待触发提醒";if(t.action==="cancel")return"取消提醒";return""}}},projectBackground(t){let a=new Map,c=new Set,u=new Map,f=new Map;for(let m of t){if(m.type!=="extension"||m.namespace!=="wake"||m.kind!=="state"||m.schemaVersion!==1)continue;let p=m.payload;if(p&&typeof p==="object"&&"id"in p&&typeof p.id==="string"&&"state"in p&&typeof p.state==="string"&&["triggered","missed","cancelled","discarded"].includes(p.state))f.set(p.id,m.seq)}for(let m of t){if(m.type!=="extension"||m.namespace!=="wake"||m.kind!=="state"||m.schemaVersion!==1)continue;let p=m.payload;if(!p||typeof p!=="object"||!("id"in p)||typeof p.id!=="string"||!p.id||!("sessionID"in p)||typeof p.sessionID!=="string"||!("state"in p)||typeof p.state!=="string"||!["pending","triggered","missed","cancelled","discarded"].includes(p.state))continue;let g=u.get(p.id);if(g&&g.sessionID!==p.sessionID)continue;if(!g){if(!("prompt"in p)||typeof p.prompt!=="string"||!("dueAt"in p)||typeof p.dueAt!=="number"||!Number.isSafeInteger(p.dueAt)||p.dueAt<0||p.dueAt>8640000000000000)continue;g={sourceKind:"wake",id:p.id,sessionID:p.sessionID,title:"定时提醒",icon:Rf,text:p.prompt,dueAt:p.dueAt,status:{label:"",tone:"neutral"}},u.set(p.id,g);let k=f.get(p.id)??m.seq;a.set(k,g)}let v="已取消";if(p.state==="pending")v="待触发";else if(p.state==="missed"||p.state==="triggered"&&"missed"in p&&p.missed===!0)v="错过";else if(p.state==="triggered")v="已触发";if(g.status={label:v,tone:p.state==="pending"?"warning":"neutral",pulse:p.state==="pending"},g.refreshMs=p.state==="pending"?30000:void 0,"prompt"in p&&typeof p.prompt==="string")g.text=p.prompt;if("dueAt"in p&&typeof p.dueAt==="number"&&Number.isSafeInteger(p.dueAt)&&p.dueAt>=0&&p.dueAt<=8640000000000000)g.dueAt=p.dueAt;c.add(m.seq)}return{cards:a,consumed:c}}};var NL=["exa","tavily","parallel","firecrawl","tinyfish","searxng","brave"];function Jw(t){return typeof t==="object"&&t!==null}function ek(t){if(!Jw(t)||typeof t.url!=="string"||typeof t.cached!=="boolean")return!1;for(let a of["title","mime","redirect","error","charset","warning","description","canonical","lang"])if(t[a]!==void 0&&typeof t[a]!=="string")return!1;for(let a of["status","bytes","offset","nextOffset","totalChars"])if(t[a]!==void 0&&typeof t[a]!=="number")return!1;return["plainHttp","changed"].every((a)=>t[a]===void 0||typeof t[a]==="boolean")}function tk(t){if(!Jw(t)||typeof t.query!=="string"||typeof t.cached!=="boolean")return!1;if(t.provider!==void 0&&!NL.some((a)=>a===t.provider))return!1;if(t.error!==void 0&&typeof t.error!=="string")return!1;if(!Array.isArray(t.results)||!Array.isArray(t.failed))return!1;return t.results.every((a)=>Jw(a)&&["title","url","host","snippet"].every((c)=>typeof a[c]==="string")&&(a.published===void 0||typeof a.published==="string"))&&t.failed.every((a)=>Jw(a)&&NL.some((c)=>c===a.provider)&&typeof a.error==="string")}function Z0(t){try{let a=new URL(t);if(a.protocol==="http:"||a.protocol==="https:")return a.href}catch{}return}function _9({result:t,header:a,copyAction:c}){let{Markdown:u,style:f,useTheme:m}=x();m();let p=ek(t?.meta)?t.meta:void 0,g=t?.output??t?.error??"正在抓取…",v=/<web_content\b[^>]*>\n?([\s\S]*?)\n?<\/web_content>/.exec(g)?.[1]??g;return n("div",{className:"min-w-0 space-y-3 p-3",children:[n("div",{className:"flex items-center justify-between gap-2",children:[a,c]}),p&&n("div",{className:"space-y-1 break-words text-xs text-dim",children:[p.title&&e("h3",{className:"text-sm font-medium text-ink",children:p.title}),e("a",{href:Z0(p.url),target:"_blank",rel:"noreferrer noopener",className:f("markdown.a","break-all"),children:p.url}),n("p",{children:[p.status??"—"," · ",p.mime??"—"," · ",p.bytes??0," 字节",p.cached?" · 缓存":""]}),p.totalChars!==void 0&&n("p",{children:["位置 ",p.offset??0," / ",p.totalChars,p.nextOffset!==void 0?` · 下一页 offset=${p.nextOffset}`:""]}),p.redirect&&n("p",{children:["重定向 →"," ",e("a",{href:Z0(p.redirect),target:"_blank",rel:"noreferrer noopener",className:"underline",children:p.redirect})]}),p.warning&&e("p",{children:p.warning})]}),e("div",{className:"max-h-80 overflow-auto break-words",children:e(u,{text:v})})]})}function z9({result:t,header:a,copyAction:c}){let{style:u,useTheme:f}=x();f();let m=tk(t?.meta)?t.meta:void 0;return n("div",{className:"min-w-0 space-y-3 p-3",children:[n("div",{className:"flex items-center justify-between gap-2",children:[a,c]}),!m&&e("p",{className:"text-xs text-dim",children:t?.error??"正在搜索…"}),m?.results.length===0&&e("p",{className:"text-xs text-dim",children:m.error?"搜索不可用,请查看失败渠道。":"没有匹配的结果。"}),m?.results.map((p)=>n("div",{className:"flex min-w-0 gap-3",children:[e("span",{"aria-hidden":"true",className:u("control.badge","size-8 shrink-0 justify-center rounded text-xs text-dim"),children:p.host.slice(0,1).toUpperCase()}),n("div",{className:"min-w-0 flex-1",children:[e("a",{className:u("markdown.a","break-words text-sm text-ink"),href:Z0(p.url),target:"_blank",rel:"noreferrer noopener",children:p.title||p.url}),n("p",{className:"break-all text-xs text-faint",children:[p.host,p.published?` · ${p.published}`:""]}),e("p",{className:"line-clamp-2 break-words text-xs text-dim",children:p.snippet})]})]},p.url)),!!m?.failed.length&&n("details",{className:"text-xs text-dim",children:[n("summary",{className:"cursor-pointer",children:["失败渠道(",m.failed.length,")"]}),e("ul",{className:"mt-2 space-y-1",children:m.failed.map((p)=>n("li",{className:"break-words",children:[p.provider,": ",p.error]},p.provider))})]})]})}var B9={id:"webfetch",apiVersion:1,metadata:{description:"网页抓取与联网搜索",icon:Ue},views:{settings:{kind:"tab",load:()=>(C("sydy10mb"),import("./chunk-sydy10mb.js"))}},tools:{webfetch:{icon:z0,active:"正在抓取网页",done:"抓取网页",summary(t){if(typeof t.url!=="string")return"";try{let a=new URL(t.url);return`${a.host}${a.pathname}`.slice(0,60)}catch{return t.url.slice(0,60)}},count:{verb:"抓取",unit:"个网页"},status(t){if(!ek(t.meta))return;let a=t.meta;if(a.error)return{label:a.error,tone:"danger"};if(a.redirect){let c=a.redirect;try{c=new URL(a.redirect).host}catch{}return{label:`重定向 → ${c}`,tone:"warning"}}if(a.cached)return{label:"缓存",tone:"neutral"};return{label:`${a.status??"—"} · ${Math.ceil((a.bytes??0)/1024)} KB`,tone:"success"}},renderDetail:_9},websearch:{icon:Pe,active:"正在搜索",done:"搜索",summary:(t)=>typeof t.query==="string"?t.query:"",count:{verb:"搜索",unit:"次"},status(t){if(!tk(t.meta))return;if(t.meta.error)return{label:"全部渠道失败",tone:"danger"};return{label:`${t.meta.provider??"搜索"} · ${t.meta.results.length} 条${t.meta.cached?" · 缓存":""}`,tone:"success"}},renderDetail:z9}}};var F9=[l9,C9,A9,w9,o9,W7,G7,x9,E9,R9,e9,K7,M9,D9,S9,O9,P9,t9,B9,N9,c9];class V9{builtins;modules;listeners=new Set;active=new Map;errors=new Map;enabled;codeBlocks=new Map;registeredThemes=[];registeredThemePatches=[];constructor(t=F9){this.builtins=t;this.modules=t,this.rebuildCodeBlocks(),this.rebuildThemes()}get=()=>this.modules;subscribe=(t)=>(this.listeners.add(t),()=>this.listeners.delete(t));codeBlock=(t)=>this.codeBlocks.get(t);themes=()=>this.registeredThemes;themePatches=()=>this.registeredThemePatches;rebuildCodeBlocks(){this.codeBlocks=new Map;for(let t of this.modules){if(this.enabled&&!this.enabled.has(t.id))continue;for(let[a,c]of Object.entries(t.codeBlocks??{})){let u=a.toLowerCase();if(!this.codeBlocks.has(u))this.codeBlocks.set(u,{pluginID:t.id,definition:c})}}}rebuildThemes(){let t=new Set(["basalt"]),a=[],c=[];for(let u of this.modules){if(this.enabled&&!this.enabled.has(u.id))continue;if(u.themePatch)c.push({pluginID:u.id,patch:u.themePatch});for(let f of u.themes??[]){let m=f.id.trim();if(!m||t.has(m))continue;t.add(m),a.push({pluginID:u.id,definition:{...f,id:m}})}}this.registeredThemes=a,this.registeredThemePatches=c}publish(){this.modules=[...this.builtins,...[...this.active.values()].flatMap((t)=>t.module??[])],this.rebuildCodeBlocks(),this.rebuildThemes();for(let t of this.listeners)t()}clear(){for(let t of this.active.values())t.controller.abort(),t.style?.remove();this.active.clear(),this.errors.clear(),this.enabled=void 0,this.publish()}reportError(t,a){let c=a instanceof Error?a.message:String(a);if(this.errors.has(t))return;this.errors.set(t,c),queueMicrotask(()=>this.publish())}invoke(t,a,c){try{return a()}catch(u){return this.reportError(t,u),c}}isolate(t){return{...t,projectEntries:t.projectEntries?(a,c)=>this.invoke(t.id,()=>t.projectEntries?.(a,c)??[...a],[...a]):void 0,projectBackground:t.projectBackground?(a)=>this.invoke(t.id,()=>t.projectBackground?.(a)??{cards:new Map,consumed:new Set},{cards:new Map,consumed:new Set}):void 0,handledToolCalls:t.handledToolCalls?(a)=>this.invoke(t.id,()=>t.handledToolCalls?.(a)??[],[]):void 0,notices:Object.fromEntries(Object.entries(t.notices??{}).map(([a,c])=>[a,(...u)=>this.invoke(t.id,()=>c(...u),void 0)])),tools:Object.fromEntries(Object.entries(t.tools??{}).map(([a,c])=>[a,{...c,summary:c.summary?(u)=>this.invoke(t.id,()=>c.summary?.(u)??"",""):void 0,status:c.status?(...u)=>this.invoke(t.id,()=>c.status?.(...u),void 0):void 0}]))}}async sync(t,a){this.enabled=new Set(t.filter((f)=>f.status==="enabled").map((f)=>f.id));let c=new Map(t.filter((f)=>f.status==="enabled"&&f.webBundle&&!this.builtins.some((m)=>m.id===f.id)).map((f)=>[f.id,f]));for(let[f,m]of this.active){let p=c.get(f);if(p&&m.key===`${p.version}:${p.webRevision??""}`)continue;m.controller.abort(),m.style?.remove(),this.active.delete(f),this.errors.delete(f)}let u=[];for(let[f,m]of c){if(this.active.has(f))continue;let p={key:`${m.version}:${m.webRevision??""}`,controller:new AbortController};this.active.set(f,p),u.push((async()=>{try{let g=await a(m,p.controller.signal);if(this.active.get(f)!==p)return;if(g.module.id!==f||g.module.apiVersion!==1)throw Error("Invalid PluginWebModule id or apiVersion");for(let[v,k]of Object.entries(g.module.views??{}))if(!k||!["sidebar","tab","page","card"].includes(k.kind)||typeof k.load!=="function")throw Error(`Invalid view definition: ${v}`);for(let[v,k]of Object.entries(g.module.codeBlocks??{}))if(typeof k?.load!=="function")throw Error(`Invalid code block definition: ${v}`);if(g.module.themes!==void 0){if(!Array.isArray(g.module.themes))throw Error("Invalid themes definition: must be an array");for(let v of g.module.themes)if(!v||typeof v.id!=="string"||!v.id.trim()||typeof v.label!=="string"||!v.label.trim())throw Error(`Invalid theme definition: ${String(v?.id??"")}`)}if(g.module.themePatch!==void 0&&(typeof g.module.themePatch!=="object"||g.module.themePatch===null))throw Error("Invalid themePatch definition");if(p.module=this.isolate(g.module),g.css&&typeof document<"u")p.style=document.createElement("style"),p.style.dataset.plugin=f,p.style.textContent=g.css,document.head.append(p.style)}catch(g){if(this.active.get(f)!==p)return;this.errors.set(f,g instanceof Error?g.message:String(g))}this.publish()})())}this.publish(),await Promise.all(u)}}var ve=new V9,{get:Ae,subscribe:pn}=ve;function Se(){return Kr(ve.subscribe,ve.get,ve.get)}function U9(t){let a=()=>t?ve.codeBlock(t.toLowerCase()):void 0;return Kr(ve.subscribe,a,a)}var sl="basalt",OL="basalt.theme",_L="basalt.theme.id",q9=[["--color-bg","bg"],["--color-sidebar","sidebar"],["--color-panel","panel"],["--color-raised","raised"],["--color-bubble","bubble"],["--color-line","line"],["--color-line-strong","lineStrong"],["--color-ink","ink"],["--color-dim","dim"],["--color-faint","faint"],["--color-accent","accent"],["--color-accent-strong","accentStrong"],["--color-accent-ink","accentInk"],["--color-accent-soft","accentSoft"],["--color-danger","danger"],["--color-danger-fill","dangerFill"],["--color-danger-fill-hover","dangerFillHover"],["--color-success","success"],["--color-warning","warning"],["--color-overlay","overlay"],["--color-facet","facet"],["--color-facet-lit","facetLit"],["--color-facet-shade","facetShade"]];function Mie(){try{let t=localStorage.getItem(OL);return t==="light"||t==="dark"?t:"system"}catch{return"system"}}function Die(){try{let t=localStorage.getItem(_L)?.trim();return t?t:sl}catch{return sl}}var J0=Tr(Mie()),ev=Tr(Die()),tv=typeof matchMedia>"u"?void 0:matchMedia("(prefers-color-scheme: dark)");function H9(t,a,c,u,f){let m=t,p=a;if(f){for(let[g,v]of Object.entries(f))if(typeof v==="string"){if(p===a)p={...a};p[g]=v}}if(!u)return{tokens:m,recipes:p};if(u.tokens){let g=u.tokens.colors,v=g?.hex;m={scheme:t.scheme,colors:{...t.colors,...g??{},hex:{...t.colors.hex,...v??{}},chartPalette:g?.chartPalette??t.colors.chartPalette,chartSequential:g?.chartSequential??t.colors.chartSequential},fonts:{...t.fonts,...u.tokens.fonts??{}},shadows:{...t.shadows,...u.tokens.shadows??{}}}}if(u.recipes){for(let[g,v]of Object.entries(u.recipes))if(typeof v==="string"){if(p===a)p={...a};p[g]=v}}if(u.css?.trim())c.push(u.css);return{tokens:m,recipes:p}}function nk(t,a,c,u=ve.themes(),f=ve.themePatches()){let m=t==="system"?c?"dark":"light":t,p=a!==sl?u.find((T)=>T.definition.id===a):void 0,g=p?p.definition.id:sl,v=m==="dark"?Uw:Vw,k=Zn,S=[],I=!1;for(let T of f){let L=m==="dark"?T.patch.dark:T.patch.light;if(L?.tokens)I=!0;let R=H9(v,k,S,L,T.patch.recipes);v=R.tokens,k=R.recipes}if(p){let T=p.definition,L=m==="dark"?T.dark:T.light;if(L?.tokens)I=!0;let R=H9(v,k,S,L,T.recipes);v=R.tokens,k=R.recipes}return{themeID:g,preference:t,resolved:m,tokens:v,recipes:k,customCSS:S.join(`
34
+ `),hasCustomTokens:I}}var j9,Sc;function Nie(t){if(typeof document>"u")return;let a=document.documentElement;if(t.preference==="system")delete a.dataset.theme;else a.dataset.theme=t.preference;if(t.themeID===sl)delete a.dataset.themeId;else a.dataset.themeId=t.themeID;if(t.hasCustomTokens){for(let[f,m]of q9)a.style.setProperty(f,t.tokens.colors[m]);a.style.setProperty("--font-sans",t.tokens.fonts.sans),a.style.setProperty("--font-serif",t.tokens.fonts.serif),a.style.setProperty("--font-mono",t.tokens.fonts.mono),a.style.setProperty("--shadow-float",t.tokens.shadows.float),a.style.setProperty("--shadow-composer",t.tokens.shadows.composer)}else{for(let[f]of q9)a.style.removeProperty(f);a.style.removeProperty("--font-sans"),a.style.removeProperty("--font-serif"),a.style.removeProperty("--font-mono"),a.style.removeProperty("--shadow-float"),a.style.removeProperty("--shadow-composer")}if(t.customCSS){if(!Sc)Sc=document.createElement("style"),Sc.dataset.basaltTheme="custom",document.head.append(Sc);if(Sc.textContent!==t.customCSS)Sc.textContent=t.customCSS}else if(Sc)Sc.remove(),Sc=void 0;let c=nk("light",t.themeID,!1),u=nk("dark",t.themeID,!0);for(let f of document.querySelectorAll('meta[name="theme-color"]'))f.content=t.preference==="system"?f.media.includes("dark")?u.tokens.colors.hex.bg:c.tokens.colors.hex.bg:t.tokens.colors.hex.bg}function ih(){let t=nk(J0.get(),ev.get(),tv?.matches??!1,ve.themes(),ve.themePatches());return j9=t,Nie(t),t}if(typeof document<"u")ih();ve.subscribe(()=>{ih()});tv?.addEventListener("change",()=>{ih()});function zL(){return j9??ih()}function G9(t){if(typeof document>"u"){t();return}let a=document.documentElement;if(a.classList.add("[&_*]:transition-none!"),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||!document.startViewTransition){t(),requestAnimationFrame(()=>requestAnimationFrame(()=>a.classList.remove("[&_*]:transition-none!")));return}document.startViewTransition(t).finished.finally(()=>a.classList.remove("[&_*]:transition-none!"))}function jr(t){try{if(t==="system")localStorage.removeItem(OL);else localStorage.setItem(OL,t)}catch{}G9(()=>{J0.set(t),ih()})}function Jo(t){let a=t.trim()||sl;try{if(a===sl)localStorage.removeItem(_L);else localStorage.setItem(_L,a)}catch{}G9(()=>{ev.set(a),ih()})}function Oie(t){let a=J0.subscribe(t),c=ev.subscribe(t),u=ve.subscribe(t);return tv?.addEventListener("change",t),()=>{a(),c(),u(),tv?.removeEventListener("change",t)}}function _(){se(J0),se(ev);let t=Kr(Oie,()=>tv?.matches??!1,()=>!1),a=Kr(ve.subscribe,ve.themes,ve.themes),c=Kr(ve.subscribe,ve.themePatches,ve.themePatches);return nk(J0.get(),ev.get(),t,a,c)}function es(){let t=Kr(ve.subscribe,ve.themes,ve.themes);return[{id:sl,label:"Basalt 默认",description:"中性纸面灰配苔绿强调色,深色为石墨灰"},...t.map((a)=>({id:a.definition.id,label:a.definition.label,description:a.definition.description,pluginID:a.pluginID}))]}function l(t,...a){let u=zL().recipes[t]??Zn[t]??"";return d(u,...a)}var $9=(t)=>typeof t==="boolean"?`${t}`:t===0?"0":t,K9=Aw,W9=(t,a)=>(c)=>{var u;if((a===null||a===void 0?void 0:a.variants)==null)return K9(t,c===null||c===void 0?void 0:c.class,c===null||c===void 0?void 0:c.className);let{variants:f,defaultVariants:m}=a,p=Object.keys(f).map((k)=>{let S=c===null||c===void 0?void 0:c[k],I=m===null||m===void 0?void 0:m[k];if(S===null)return null;let T=$9(S)||$9(I);return f[k][T]}),g=c&&Object.entries(c).reduce((k,S)=>{let[I,T]=S;if(T===void 0)return k;return k[I]=T,k},{}),v=a===null||a===void 0?void 0:(u=a.compoundVariants)===null||u===void 0?void 0:u.reduce((k,S)=>{let{class:I,className:T,...L}=S;return Object.entries(L).every((R)=>{let[A,E]=R;return Array.isArray(E)?E.includes({...m,...g}[A]):{...m,...g}[A]===E})?[...k,I,T]:k},[]);return K9(t,p,v,c===null||c===void 0?void 0:c.class,c===null||c===void 0?void 0:c.className)};var _ie=Object.defineProperty,Hi=(t,a)=>_ie(t,"name",{value:a,configurable:!0});function zie(t,a){let c=jt(a);c.displayName=t+"Context";let u=Hi((m)=>{let{children:p,...g}=m,v=w(()=>g,Object.values(g));return e(c.Provider,{value:v,children:p})},"Provider");u.displayName=t+"Provider";function f(m,p={}){let{optional:g=!1}=p,v=M(c);if(v)return v;if(a!==void 0)return a;if(g)return;throw Error(`\`${m}\` must be used within \`${t}\``)}return Hi(f,"useContext"),[u,f]}Hi(zie,"createContext");function Vn(t,a=[]){let c=[];function u(m,p){let g=jt(p);g.displayName=m+"Context";let v=c.length;c=[...c,p];let k=Hi((I)=>{let{scope:T,children:L,...R}=I,A=T?.[t]?.[v]||g,E=w(()=>R,Object.values(R));return e(A.Provider,{value:E,children:L})},"Provider");k.displayName=m+"Provider";function S(I,T,L={}){let{optional:R=!1}=L,A=T?.[t]?.[v]||g,E=M(A);if(E)return E;if(p!==void 0)return p;if(R)return;throw Error(`\`${I}\` must be used within \`${m}\``)}return Hi(S,"useContext"),[k,S]}Hi(u,"createContext");let f=Hi(()=>{let m=c.map((p)=>jt(p));return Hi(function(g){let v=g?.[t]||m;return w(()=>({[`__scope${t}`]:{...g,[t]:v}}),[g,v])},"useScope")},"createScope");return f.scopeName=t,[u,X9(f,...a)]}Hi(Vn,"createContextScope");function X9(...t){let a=t[0];if(t.length===1)return a;let c=Hi(()=>{let u=t.map((f)=>({useScope:f(),scopeName:f.scopeName}));return Hi(function(m){let p=u.reduce((g,{useScope:v,scopeName:k})=>{let I=v(m)[`__scope${k}`];return{...g,...I}},{});return w(()=>({[`__scope${a.scopeName}`]:p}),[p])},"useComposedScopes")},"createScope");return c.scopeName=a.scopeName,c}Hi(X9,"composeContextScopes");var Bie=Object.defineProperty,FL=(t,a)=>Bie(t,"name",{value:a,configurable:!0});function BL(t,a){if(typeof t==="function")return t(a);else if(t!==null&&t!==void 0)t.current=a}FL(BL,"setRef");function Vu(...t){return(a)=>{let c=!1,u=t.map((f)=>{let m=BL(f,a);if(!c&&typeof m=="function")c=!0;return m});if(c)return()=>{for(let f=0;f<u.length;f++){let m=u[f];if(typeof m=="function")m();else BL(t[f],null)}}}}FL(Vu,"composeRefs");function At(...t){return y(Vu(...t),t)}FL(At,"useComposedRefs");var Fie=Object.defineProperty,sh=(t,a)=>Fie(t,"name",{value:a,configurable:!0}),Y9=!!(typeof window<"u"&&window.document&&window.document.createElement);function gt(t,a,{checkForDefaultPrevented:c=!0}={}){return sh(function(f){if(t?.(f),c===!1||!f||!f.defaultPrevented)return a?.(f)},"handleEvent")}sh(gt,"composeEventHandlers");function Vie(t){if(!Y9)throw Error("Cannot access window outside of the DOM");return t?.ownerDocument?.defaultView??window}sh(Vie,"getOwnerWindow");function VL(t){if(!Y9)throw Error("Cannot access document outside of the DOM");return t?.ownerDocument??document}sh(VL,"getOwnerDocument");function Q9(t,a=!1){let{activeElement:c}=VL(t);if(!c?.nodeName)return null;if(Z9(c)&&c.contentDocument)return Q9(c.contentDocument.body,a);if(a){let u=c.getAttribute("aria-activedescendant");if(u){let f=VL(c).getElementById(u);if(f)return f}}return c}sh(Q9,"getActiveElement");function Z9(t){return t.tagName==="IFRAME"}sh(Z9,"isFrame");var xn=globalThis?.document?K:()=>{};var Uie=Object.defineProperty,qie=(t,a)=>Uie(t,"name",{value:a,configurable:!0}),Hie=Ct[" useId ".trim().toString()]||(()=>{return}),jie=0;function Dn(t){let[a,c]=r(Hie());return xn(()=>{if(!t)c((u)=>u??String(jie++))},[t]),t||(a?`radix-${a}`:"")}qie(Dn,"useId");var rk=!1;var Gie=Object.defineProperty,$ie=(t,a)=>Gie(t,"name",{value:a,configurable:!0}),J9=Ct[" useEffectEvent ".trim().toString()],eB=Ct[" useInsertionEffect ".trim().toString()];function UL(t){if(typeof J9==="function")return J9(t);let a=i(()=>{throw Error("Cannot call an event handler while rendering.")});if(typeof eB==="function")eB(()=>{a.current=t});else xn(()=>{a.current=t});return w(()=>(...c)=>a.current?.(...c),[])}$ie(UL,"useEffectEvent");var Kie=Object.defineProperty,nv=(t,a)=>Kie(t,"name",{value:a,configurable:!0}),Wie=Ct[" useInsertionEffect ".trim().toString()]||xn;function co({prop:t,defaultProp:a,onChange:c=nv(()=>{},"onChange"),caller:u}){let[f,m,p]=nB({defaultProp:a,onChange:c}),g=t!==void 0,v=g?t:f;if(rk){let S=i(t!==void 0);o(()=>{let I=S.current;if(I!==g)console.warn(`${u} is changing from ${I?"controlled":"uncontrolled"} to ${g?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`);S.current=g},[g,u])}let k=y((S)=>{if(g){let I=rB(S)?S(t):S;if(I!==t)p.current?.(I)}else m(S)},[g,t,m,p]);return[v,k]}nv(co,"useControllableState");function nB({defaultProp:t,onChange:a}){let[c,u]=r(t),f=i(c),m=i(a);return Wie(()=>{m.current=a},[a]),o(()=>{if(f.current!==c)m.current?.(c),f.current=c},[c,f]),[c,u,m]}nv(nB,"useUncontrolledState");function rB(t){return typeof t==="function"}nv(rB,"isFunction");var tB=Symbol("RADIX:SYNC_STATE");function Xie(t,a,c,u){let{prop:f,defaultProp:m,onChange:p,caller:g}=a,v=f!==void 0,k=UL(p);if(rk){let E=i(f!==void 0);o(()=>{let P=E.current;if(P!==v)console.warn(`${g} is changing from ${P?"controlled":"uncontrolled"} to ${v?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`);E.current=v},[v,g])}let S=[{...c,state:m}];if(u)S.push(u);let[I,T]=qc((E,P)=>{if(P.type===tB)return{...E,state:P.state};let D=t(E,P);if(v&&!Object.is(D.state,E.state))k(D.state);return D},...S),L=I.state,R=i(L);o(()=>{if(R.current!==L){if(R.current=L,!v)k(L)}},[L,R,v]);let A=w(()=>{if(f!==void 0)return{...I,state:f};return I},[I,f]);return o(()=>{if(v&&!Object.is(f,I.state))T({type:tB,state:f})},[f,I.state,v]),[A,T]}nv(Xie,"useControllableStateReducer");var Yie=Object.defineProperty,vs=(t,a)=>Yie(t,"name",{value:a,configurable:!0});function uo(t){let a=_e((c,u)=>{let{children:f,...m}=c,p=null,g=!1,v=[];if(qL(f)&&typeof ok==="function")f=ok(f._payload);if(Uo.forEach(f,(T)=>{if(sB(T)){g=!0;let L=T,R="child"in L.props?L.props.child:L.props.children;if(qL(R)&&typeof ok==="function")R=ok(R._payload);p=Zie(L,R),v.push(p?.props?.children)}else v.push(T)}),p)p=wa(p,void 0,v);else if(!g&&Uo.count(f)===1&&eo(f))p=f;let k=p?iB(p):void 0,S=At(u,k);if(!p){if(f||f===0)throw Error(g?tse(t):ese(t));return f}let I=aB(m,p.props??{});if(p.type!==Xe)I.ref=u?S:k;return wa(p,I)});return a.displayName=`${t}.Slot`,a}vs(uo,"createSlot");var Qie=uo("Slot"),oB=Symbol.for("radix.slottable");function HL(t){let a=vs((c)=>("child"in c)?c.children(c.child):c.children,"Slottable");return a.displayName=`${t}.Slottable`,a.__radixId=oB,a}vs(HL,"createSlottable");var Zie=vs((t,a)=>{if("child"in t.props){let c=t.props.child;if(!eo(c))return null;return wa(c,void 0,t.props.children(c.props.children))}return eo(a)?a:null},"getSlottableElementFromSlottable");function aB(t,a){let c={...a};for(let u in a){let f=t[u],m=a[u];if(/^on[A-Z]/.test(u)){if(f&&m)c[u]=(...g)=>{let v=m(...g);return f(...g),v};else if(f)c[u]=f}else if(u==="style")c[u]={...f,...m};else if(u==="className")c[u]=[f,m].filter(Boolean).join(" ")}return{...t,...c}}vs(aB,"mergeProps");function iB(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,c=a&&"isReactWarning"in a&&a.isReactWarning;if(c)return t.ref;if(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,c=a&&"isReactWarning"in a&&a.isReactWarning,c)return t.props.ref;return t.props.ref||t.ref}vs(iB,"getElementRef");function sB(t){return eo(t)&&typeof t.type==="function"&&"__radixId"in t.type&&t.type.__radixId===oB}vs(sB,"isSlottable");var Jie=Symbol.for("react.lazy");function qL(t){return t!=null&&typeof t==="object"&&"$$typeof"in t&&t.$$typeof===Jie&&"_payload"in t&&lB(t._payload)}vs(qL,"isLazyComponent");function lB(t){return typeof t==="object"&&t!==null&&"then"in t}vs(lB,"isPromiseLike");var ese=vs((t)=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),tse=vs((t)=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ok=Ct[" use ".trim().toString()];var nse=Object.defineProperty,rse=(t,a)=>nse(t,"name",{value:a,configurable:!0}),ose=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],St=ose.reduce((t,a)=>{let c=uo(`Primitive.${a}`),u=_e((f,m)=>{let{asChild:p,...g}=f,v=p?c:a;if(typeof window<"u")window[Symbol.for("radix-ui")]=!0;return e(v,{...g,ref:m})});return u.displayName=`Primitive.${a}`,{...t,[a]:u}},{});function rv(t,a){if(t)kd(()=>t.dispatchEvent(a))}rse(rv,"dispatchDiscreteCustomEvent");var ase=Object.defineProperty,ise=(t,a)=>ase(t,"name",{value:a,configurable:!0});function fo(t){let a=i(t);return o(()=>{a.current=t}),w(()=>(...c)=>a.current?.(...c),[])}ise(fo,"useCallbackRef");var sse=Object.defineProperty,mo=(t,a)=>sse(t,"name",{value:a,configurable:!0}),jL="dismissableLayer.update",lse="dismissableLayer.pointerDownOutside",cse="dismissableLayer.focusOutside",uB,dB=jt({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),ll=_e(mo(function(a,c){let{disableOutsidePointerEvents:u=!1,deferPointerDownOutside:f=!1,onEscapeKeyDown:m,onPointerDownOutside:p,onFocusOutside:g,onInteractOutside:v,onDismiss:k,...S}=a,I=M(dB),[T,L]=r(null),R=T?.ownerDocument??globalThis?.document,[,A]=r({}),E=At(c,L),P=Array.from(I.layers),[D]=[...I.layersWithOutsidePointerEventsDisabled].slice(-1),N=D?P.indexOf(D):-1,O=T?P.indexOf(T):-1,F=I.layersWithOutsidePointerEventsDisabled.size>0,z=O>=N,B=i(!1),U=fB((re)=>{if(p?.(re),v?.(re),!re.defaultPrevented)k?.()},{ownerDocument:R,deferPointerDownOutside:f,isDeferredPointerDownOutsideRef:B,dismissableSurfaces:I.dismissableSurfaces,shouldHandlePointerDownOutside:y((re)=>{if(!(re instanceof Node))return!1;let Q=[...I.branches].some((ae)=>ae.contains(re));return z&&!Q},[I.branches,z])}),Y=mB((re)=>{if(f&&B.current)return;let Q=re.target;if([...I.branches].some((xe)=>xe.contains(Q)))return;if(g?.(re),v?.(re),!re.defaultPrevented)k?.()},R),G=T?O===P.length-1:!1,ce=fo((re)=>{if(re.key!=="Escape")return;if(m?.(re),!re.defaultPrevented&&k)re.preventDefault(),k()});return o(()=>{if(!G)return;return R.addEventListener("keydown",ce,{capture:!0}),()=>R.removeEventListener("keydown",ce,{capture:!0})},[R,G,ce]),o(()=>{if(!T)return;if(u){if(I.layersWithOutsidePointerEventsDisabled.size===0)uB=R.body.style.pointerEvents,R.body.style.pointerEvents="none";I.layersWithOutsidePointerEventsDisabled.add(T)}return I.layers.add(T),GL(),()=>{if(u){if(I.layersWithOutsidePointerEventsDisabled.delete(T),I.layersWithOutsidePointerEventsDisabled.size===0)R.body.style.pointerEvents=uB}}},[T,R,u,I]),o(()=>()=>{if(!T)return;I.layers.delete(T),I.layersWithOutsidePointerEventsDisabled.delete(T),GL()},[T,I]),o(()=>{let re=mo(()=>A({}),"handleUpdate");return document.addEventListener(jL,re),()=>document.removeEventListener(jL,re)},[]),e(St.div,{...S,ref:E,style:{pointerEvents:F?z?"auto":"none":void 0,...a.style},onFocusCapture:gt(a.onFocusCapture,Y.onFocusCapture),onBlurCapture:gt(a.onBlurCapture,Y.onBlurCapture),onPointerDownCapture:gt(a.onPointerDownCapture,U.onPointerDownCapture)})},"DismissableLayer"));function $L(){let t=M(dB),[a,c]=r(null);return o(()=>{if(!a)return;return t.dismissableSurfaces.add(a),()=>{t.dismissableSurfaces.delete(a)}},[a,t.dismissableSurfaces]),c}mo($L,"useDismissableLayerSurface");var use=mo(()=>!0,"IS_TRUE");function fB(t,a){let{ownerDocument:c=globalThis?.document,deferPointerDownOutside:u=!1,isDeferredPointerDownOutsideRef:f,dismissableSurfaces:m,shouldHandlePointerDownOutside:p=use}=a,g=fo(t),v=i(!1),k=i(!1),S=i(new Map),I=i(()=>{});return o(()=>{function T(){k.current=!1,f.current=!1,S.current.clear()}mo(T,"resetOutsideInteraction");function L(){return Array.from(S.current.values()).some(Boolean)}mo(L,"isOutsideInteractionIntercepted");function R(N){if(!k.current)return;let O=N.target;if(!(O instanceof Node&&[...m].some((z)=>z.contains(O))))S.current.set(N.type,!0);if(N.type==="click")window.setTimeout(()=>{if(k.current)I.current()},0)}mo(R,"handleInteractionCapture");function A(N){if(k.current)S.current.set(N.type,!1)}mo(A,"handleInteractionBubble");let E=mo((N)=>{if(N.target&&!v.current){let F=function(){c.removeEventListener("click",I.current);let B=L();if(T(),!B)KL(lse,g,z,{discrete:!0})};var O=F;if(mo(F,"handleAndDispatchPointerDownOutsideEvent"),!p(N.target)){c.removeEventListener("click",I.current),T(),v.current=!1;return}let z={originalEvent:N};if(k.current=!0,f.current=u&&N.button===0,S.current.clear(),!u||N.button!==0)F();else c.removeEventListener("click",I.current),I.current=F,c.addEventListener("click",I.current,{once:!0})}else c.removeEventListener("click",I.current),T();v.current=!1},"handlePointerDown"),P=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let N of P)c.addEventListener(N,R,!0),c.addEventListener(N,A);let D=window.setTimeout(()=>{c.addEventListener("pointerdown",E)},0);return()=>{window.clearTimeout(D),c.removeEventListener("pointerdown",E),c.removeEventListener("click",I.current);for(let N of P)c.removeEventListener(N,R,!0),c.removeEventListener(N,A)}},[c,g,u,f,m,p]),{onPointerDownCapture:mo(()=>v.current=!0,"onPointerDownCapture")}}mo(fB,"usePointerDownOutside");function mB(t,a=globalThis?.document){let c=fo(t),u=i(!1);return o(()=>{let f=mo((m)=>{if(m.target&&!u.current)KL(cse,c,{originalEvent:m},{discrete:!1})},"handleFocus");return a.addEventListener("focusin",f),()=>a.removeEventListener("focusin",f)},[a,c]),{onFocusCapture:mo(()=>u.current=!0,"onFocusCapture"),onBlurCapture:mo(()=>u.current=!1,"onBlurCapture")}}mo(mB,"useFocusOutside");function GL(){let t=new CustomEvent(jL);document.dispatchEvent(t)}mo(GL,"dispatchUpdate");function KL(t,a,c,{discrete:u}){let f=c.originalEvent.target,m=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:c});if(a)f.addEventListener(t,a,{once:!0});if(u)rv(f,m);else f.dispatchEvent(m)}mo(KL,"handleAndDispatchCustomEvent");var dse=Object.defineProperty,ra=(t,a)=>dse(t,"name",{value:a,configurable:!0}),WL="focusScope.autoFocusOnMount",XL="focusScope.autoFocusOnUnmount",pB={bubbles:!1,cancelable:!0},Uu=_e(ra(function(a,c){let{loop:u=!1,trapped:f=!1,onMountAutoFocus:m,onUnmountAutoFocus:p,...g}=a,[v,k]=r(null),S=fo(m),I=fo(p),T=i(null),L=At(c,k),R=i({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o(()=>{if(f){let N=function(B){if(R.paused||!v)return;let U=B.target;if(v.contains(U))T.current=U;else Cc(T.current,{select:!0})},O=function(B){if(R.paused||!v)return;let U=B.relatedTarget;if(U===null)return;if(!v.contains(U))Cc(T.current,{select:!0})},F=function(B){if(document.activeElement!==document.body)return;for(let Y of B)if(Y.removedNodes.length>0)Cc(v)};var E=N,P=O,D=F;ra(N,"handleFocusIn"),ra(O,"handleFocusOut"),ra(F,"handleMutations"),document.addEventListener("focusin",N),document.addEventListener("focusout",O);let z=new MutationObserver(F);if(v)z.observe(v,{childList:!0,subtree:!0});return()=>{document.removeEventListener("focusin",N),document.removeEventListener("focusout",O),z.disconnect()}}},[f,v,R.paused]),o(()=>{if(v){hB.add(R);let E=document.activeElement;if(!v.contains(E)){let D=new CustomEvent(WL,pB);if(v.addEventListener(WL,S),v.dispatchEvent(D),!D.defaultPrevented){if(gB(wB(ZL(v)),{select:!0}),document.activeElement===E)Cc(v)}}return()=>{v.removeEventListener(WL,S),setTimeout(()=>{let D=new CustomEvent(XL,pB);if(v.addEventListener(XL,I),v.dispatchEvent(D),!D.defaultPrevented)Cc(E??document.body,{select:!0});v.removeEventListener(XL,I),hB.remove(R)},0)}}},[v,S,I,R]);let A=y((E)=>{if(!u&&!f)return;if(R.paused)return;let P=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,D=document.activeElement;if(P&&D){let N=E.currentTarget,[O,F]=xB(N);if(!(O&&F)){if(D===N)E.preventDefault()}else if(!E.shiftKey&&D===F){if(E.preventDefault(),u)Cc(O,{select:!0})}else if(E.shiftKey&&D===O){if(E.preventDefault(),u)Cc(F,{select:!0})}}},[u,f,R.paused]);return e(St.div,{tabIndex:-1,...g,ref:L,onKeyDown:A})},"FocusScope"));function gB(t,{select:a=!1}={}){let c=document.activeElement;for(let u of t)if(Cc(u,{select:a}),document.activeElement!==c)return}ra(gB,"focusFirst");function xB(t){let a=ZL(t),c=YL(a,t),u=YL(a.reverse(),t);return[c,u]}ra(xB,"getTabbableEdges");function ZL(t){let a=[],c=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:ra((u)=>{let f=u.tagName==="INPUT"&&u.type==="hidden";if(u.disabled||u.hidden||f)return NodeFilter.FILTER_SKIP;return u.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});while(c.nextNode())a.push(c.currentNode);return a}ra(ZL,"getTabbableCandidates");function YL(t,a){let c=typeof a.checkVisibility==="function"&&a.checkVisibility({checkVisibilityCSS:!0});for(let u of t)if(!(c?!u.checkVisibility({checkVisibilityCSS:!0}):vB(u,{upTo:a})))return u}ra(YL,"findVisible");function vB(t,{upTo:a}){if(getComputedStyle(t).visibility==="hidden")return!0;while(t){if(a!==void 0&&t===a)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}ra(vB,"isHidden");function bB(t){return t instanceof HTMLInputElement&&"select"in t}ra(bB,"isSelectableInput");function Cc(t,{select:a=!1}={}){if(t&&t.focus){let c=document.activeElement;if(t.focus({preventScroll:!0}),t!==c&&bB(t)&&a)t.select()}}ra(Cc,"focus");var hB=yB();function yB(){let t=[];return{add(a){let c=t[0];if(a!==c)c?.pause();t=QL(t,a),t.unshift(a)},remove(a){t=QL(t,a),t[0]?.resume()}}}ra(yB,"createFocusScopesStack");function QL(t,a){let c=[...t],u=c.indexOf(a);if(u!==-1)c.splice(u,1);return c}ra(QL,"arrayRemove");function wB(t){return t.filter((a)=>a.tagName!=="A")}ra(wB,"removeLinks");var fse=Object.defineProperty,mse=(t,a)=>fse(t,"name",{value:a,configurable:!0}),cl=_e(mse(function(a,c){let{container:u,...f}=a,[m,p]=r(!1);xn(()=>p(!0),[]);let g=u||m&&globalThis?.document?.body;return g?Vt(e(St.div,{...f,ref:c}),g):null},"Portal"));var pse=Object.defineProperty,Ic=(t,a)=>pse(t,"name",{value:a,configurable:!0});function kB(t,a){return qc((c,u)=>a[c][u]??c,t)}Ic(kB,"useStateMachine");var Lo=Ic((t)=>{let{present:a,children:c}=t,u=SB(a),f=typeof c==="function"?c({present:u.isPresent}):Uo.only(c),m=CB(u.ref,IB(f));return typeof c==="function"||u.isPresent?wa(f,{ref:m}):null},"Presence");function SB(t){let[a,c]=r(),u=i(null),f=i(t),m=i("none"),p=i(void 0),g=t?"mounted":"unmounted",[v,k]=kB(g,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return o(()=>{if(v==="mounted")m.current=p.current??lh(u.current),p.current=void 0;else m.current="none"},[v]),xn(()=>{let S=u.current,I=f.current;if(I!==t){let L=m.current,R=lh(S);if(t)p.current=R,k("MOUNT");else if(R==="none"||S?.display==="none")k("UNMOUNT");else if(I&&L!==R)k("ANIMATION_OUT");else k("UNMOUNT");f.current=t}},[t,k]),xn(()=>{if(a){let S,I=a.ownerDocument.defaultView??window,T=Ic((R)=>{let E=lh(u.current).includes(CSS.escape(R.animationName));if(R.target===a&&E){if(k("ANIMATION_END"),!f.current){let P=a.style.animationFillMode;a.style.animationFillMode="forwards",S=I.setTimeout(()=>{if(a.style.animationFillMode==="forwards")a.style.animationFillMode=P})}}},"handleAnimationEnd"),L=Ic((R)=>{if(R.target===a)m.current=lh(u.current)},"handleAnimationStart");return a.addEventListener("animationstart",L),a.addEventListener("animationcancel",T),a.addEventListener("animationend",T),()=>{I.clearTimeout(S),a.removeEventListener("animationstart",L),a.removeEventListener("animationcancel",T),a.removeEventListener("animationend",T)}}else k("ANIMATION_END")},[a,k]),{isPresent:["mounted","unmountSuspended"].includes(v),ref:y((S)=>{if(S){let I=getComputedStyle(S);u.current=I,p.current=lh(I)}else u.current=null;c(S)},[])}}Ic(SB,"usePresence");function JL(t,a){if(typeof t==="function")return t(a);else if(t!==null&&t!==void 0)t.current=a}Ic(JL,"setRef");function CB(...t){let a=i(t);return a.current=t,y((c)=>{let u=a.current,f=!1,m=u.map((p)=>{let g=JL(p,c);if(!f&&typeof g==="function")f=!0;return g});if(f)return()=>{for(let p=0;p<m.length;p++){let g=m[p];if(typeof g==="function")g();else JL(u[p],null)}}},[])}Ic(CB,"useStableComposedRefs");function lh(t){return t?.animationName||"none"}Ic(lh,"getAnimationName");function IB(t){let a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,c=a&&"isReactWarning"in a&&a.isReactWarning;if(c)return t.ref;if(a=Object.getOwnPropertyDescriptor(t,"ref")?.get,c=a&&"isReactWarning"in a&&a.isReactWarning,c)return t.props.ref;return t.props.ref||t.ref}Ic(IB,"getElementRef");var hse=Object.defineProperty,tR=(t,a)=>hse(t,"name",{value:a,configurable:!0}),ak=0,ch=null;function gse(t){return ul(),t.children}tR(gse,"FocusGuards");function ul(){o(()=>{if(!ch)ch={start:eR(),end:eR()};let{start:t,end:a}=ch;if(document.body.firstElementChild!==t)document.body.insertAdjacentElement("afterbegin",t);if(document.body.lastElementChild!==a)document.body.insertAdjacentElement("beforeend",a);return ak++,()=>{if(ak===1)ch?.start.remove(),ch?.end.remove(),ch=null;ak=Math.max(0,ak-1)}},[])}tR(ul,"useFocusGuards");function eR(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}tR(eR,"createFocusGuard");var Da=function(){return Da=Object.assign||function(a){for(var c,u=1,f=arguments.length;u<f;u++){c=arguments[u];for(var m in c)if(Object.prototype.hasOwnProperty.call(c,m))a[m]=c[m]}return a},Da.apply(this,arguments)};function ik(t,a){var c={};for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)&&a.indexOf(u)<0)c[u]=t[u];if(t!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var f=0,u=Object.getOwnPropertySymbols(t);f<u.length;f++)if(a.indexOf(u[f])<0&&Object.prototype.propertyIsEnumerable.call(t,u[f]))c[u[f]]=t[u[f]]}return c}function TB(t,a,c){if(c||arguments.length===2){for(var u=0,f=a.length,m;u<f;u++)if(m||!(u in a)){if(!m)m=Array.prototype.slice.call(a,0,u);m[u]=a[u]}}return t.concat(m||Array.prototype.slice.call(a))}var qf="right-scroll-bar-position",Hf="width-before-scroll-bar",nR="with-scroll-bars-hidden",rR="--removed-body-scroll-bar-size";function sk(t,a){if(typeof t==="function")t(a);else if(t)t.current=a;return t}function LB(t,a){var c=r(function(){return{value:t,callback:a,facade:{get current(){return c.value},set current(u){var f=c.value;if(f!==u)c.value=u,c.callback(u,f)}}}})[0];return c.callback=a,c.facade}var xse=typeof window<"u"?K:o,RB=new WeakMap;function oR(t,a){var c=LB(a||null,function(u){return t.forEach(function(f){return sk(f,u)})});return xse(function(){var u=RB.get(c);if(u){var f=new Set(u),m=new Set(t),p=c.current;f.forEach(function(g){if(!m.has(g))sk(g,null)}),m.forEach(function(g){if(!f.has(g))sk(g,p)})}RB.set(c,t)},[t]),c}function vse(t){return t}function bse(t,a){if(a===void 0)a=vse;var c=[],u=!1,f={read:function(){if(u)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");if(c.length)return c[c.length-1];return t},useMedium:function(m){var p=a(m,u);return c.push(p),function(){c=c.filter(function(g){return g!==p})}},assignSyncMedium:function(m){u=!0;while(c.length){var p=c;c=[],p.forEach(m)}c={push:function(g){return m(g)},filter:function(){return c}}},assignMedium:function(m){u=!0;var p=[];if(c.length){var g=c;c=[],g.forEach(m),p=c}var v=function(){var S=p;p=[],S.forEach(m)},k=function(){return Promise.resolve().then(v)};k(),c={push:function(S){p.push(S),k()},filter:function(S){return p=p.filter(S),c}}}};return f}function aR(t){if(t===void 0)t={};var a=bse(null);return a.options=Da({async:!0,ssr:!1},t),a}var EB=function(t){var a=t.sideCar,c=ik(t,["sideCar"]);if(!a)throw Error("Sidecar: please provide `sideCar` property to import the right car");var u=a.read();if(!u)throw Error("Sidecar medium not found");return ct(u,Da({},c))};EB.isSideCarExport=!0;function iR(t,a){return t.useMedium(a),EB}var lk=aR();var sR=function(){return},ov=_e(function(t,a){var c=i(null),u=r({onScrollCapture:sR,onWheelCapture:sR,onTouchMoveCapture:sR}),f=u[0],m=u[1],{forwardProps:p,children:g,className:v,removeScrollBar:k,enabled:S,shards:I,sideCar:T,noRelative:L,noIsolation:R,inert:A,allowPinchZoom:E,as:P}=t,D=P===void 0?"div":P,N=t.gapMode,O=ik(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),F=T,z=oR([c,a]),B=Da(Da({},O),f);return ct(Xe,null,S&&ct(F,{sideCar:lk,removeScrollBar:k,shards:I,noRelative:L,noIsolation:R,inert:A,setCallbacks:m,allowPinchZoom:!!E,lockRef:c,gapMode:N}),p?wa(Uo.only(g),Da(Da({},B),{ref:z})):ct(D,Da({},B,{className:v,ref:z}),g))});ov.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ov.classNames={fullWidth:Hf,zeroRight:qf};var PB;var AB=function(){if(PB)return PB;if(typeof __webpack_nonce__<"u")return __webpack_nonce__;return};function yse(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var a=AB();if(a)t.setAttribute("nonce",a);return t}function wse(t,a){if(t.styleSheet)t.styleSheet.cssText=a;else t.appendChild(document.createTextNode(a))}function kse(t){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(t)}var lR=function(){var t=0,a=null;return{add:function(c){if(t==0){if(a=yse())wse(a,c),kse(a)}t++},remove:function(){if(t--,!t&&a)a.parentNode&&a.parentNode.removeChild(a),a=null}}};var cR=function(){var t=lR();return function(a,c){o(function(){return t.add(a),function(){t.remove()}},[a&&c])}};var av=function(){var t=cR(),a=function(c){var{styles:u,dynamic:f}=c;return t(u,f),null};return a};var Sse={left:0,top:0,right:0,gap:0},uR=function(t){return parseInt(t||"",10)||0},Cse=function(t){var a=window.getComputedStyle(document.body),c=a[t==="padding"?"paddingLeft":"marginLeft"],u=a[t==="padding"?"paddingTop":"marginTop"],f=a[t==="padding"?"paddingRight":"marginRight"];return[uR(c),uR(u),uR(f)]},dR=function(t){if(t===void 0)t="margin";if(typeof window>"u")return Sse;var a=Cse(t),c=document.documentElement.clientWidth,u=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,u-c+a[2]-a[0])}};var Ise=av(),uh="data-scroll-locked",Tse=function(t,a,c,u){var{left:f,top:m,right:p,gap:g}=t;if(c===void 0)c="margin";return`
35
+ .`.concat(nR,` {
36
+ overflow: hidden `).concat(u,`;
37
+ padding-right: `).concat(g,"px ").concat(u,`;
38
+ }
39
+ body[`).concat(uh,`] {
40
+ overflow: hidden `).concat(u,`;
41
+ overscroll-behavior: contain;
42
+ `).concat([a&&"position: relative ".concat(u,";"),c==="margin"&&`
43
+ padding-left: `.concat(f,`px;
44
+ padding-top: `).concat(m,`px;
45
+ padding-right: `).concat(p,`px;
46
+ margin-left:0;
47
+ margin-top:0;
48
+ margin-right: `).concat(g,"px ").concat(u,`;
49
+ `),c==="padding"&&"padding-right: ".concat(g,"px ").concat(u,";")].filter(Boolean).join(""),`
50
+ }
51
+
52
+ .`).concat(qf,` {
53
+ right: `).concat(g,"px ").concat(u,`;
54
+ }
55
+
56
+ .`).concat(Hf,` {
57
+ margin-right: `).concat(g,"px ").concat(u,`;
58
+ }
59
+
60
+ .`).concat(qf," .").concat(qf,` {
61
+ right: 0 `).concat(u,`;
62
+ }
63
+
64
+ .`).concat(Hf," .").concat(Hf,` {
65
+ margin-right: 0 `).concat(u,`;
66
+ }
67
+
68
+ body[`).concat(uh,`] {
69
+ `).concat(rR,": ").concat(g,`px;
70
+ }
71
+ `)},MB=function(){var t=parseInt(document.body.getAttribute(uh)||"0",10);return isFinite(t)?t:0},Lse=function(){o(function(){return document.body.setAttribute(uh,(MB()+1).toString()),function(){var t=MB()-1;if(t<=0)document.body.removeAttribute(uh);else document.body.setAttribute(uh,t.toString())}},[])},fR=function(t){var{noRelative:a,noImportant:c,gapMode:u}=t,f=u===void 0?"margin":u;Lse();var m=w(function(){return dR(f)},[f]);return ct(Ise,{styles:Tse(m,!a,f,!c?"!important":"")})};var mR=!1;if(typeof window<"u")try{dh=Object.defineProperty({},"passive",{get:function(){return mR=!0,!0}}),window.addEventListener("test",dh,dh),window.removeEventListener("test",dh,dh)}catch(t){mR=!1}var dh,jf=mR?{passive:!1}:!1;var Rse=function(t){return t.tagName==="TEXTAREA"},DB=function(t,a){if(!(t instanceof Element))return!1;var c=window.getComputedStyle(t);return c[a]!=="hidden"&&!(c.overflowY===c.overflowX&&!Rse(t)&&c[a]==="visible")},Ese=function(t){return DB(t,"overflowY")},Pse=function(t){return DB(t,"overflowX")},pR=function(t,a){var c=a.ownerDocument,u=a;do{if(typeof ShadowRoot<"u"&&u instanceof ShadowRoot)u=u.host;var f=NB(t,u);if(f){var m=OB(t,u),p=m[1],g=m[2];if(p>g)return!0}u=u.parentNode}while(u&&u!==c.body);return!1},Ase=function(t){var{scrollTop:a,scrollHeight:c,clientHeight:u}=t;return[a,c,u]},Mse=function(t){var{scrollLeft:a,scrollWidth:c,clientWidth:u}=t;return[a,c,u]},NB=function(t,a){return t==="v"?Ese(a):Pse(a)},OB=function(t,a){return t==="v"?Ase(a):Mse(a)},Dse=function(t,a){return t==="h"&&a==="rtl"?-1:1},_B=function(t,a,c,u,f){var m=Dse(t,window.getComputedStyle(a).direction),p=m*u,g=c.target,v=a.contains(g),k=!1,S=p>0,I=0,T=0;do{if(!g)break;var L=OB(t,g),R=L[0],A=L[1],E=L[2],P=A-E-m*R;if(R||P){if(NB(t,g))I+=P,T+=R}var D=g.parentNode;g=D&&D.nodeType===Node.DOCUMENT_FRAGMENT_NODE?D.host:D}while(!v&&g!==document.body||v&&(a.contains(g)||a===g));if(S&&(f&&Math.abs(I)<1||!f&&p>I))k=!0;else if(!S&&(f&&Math.abs(T)<1||!f&&-p>T))k=!0;return k};var ck=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},zB=function(t){return[t.deltaX,t.deltaY]},BB=function(t){return t&&"current"in t?t.current:t},Nse=function(t,a){return t[0]===a[0]&&t[1]===a[1]},Ose=function(t){return`
72
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
73
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
74
+ `)},_se=0,fh=[];function FB(t){var a=i([]),c=i([0,0]),u=i(),f=r(_se++)[0],m=r(av)[0],p=i(t);o(function(){p.current=t},[t]),o(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(f));var A=TB([t.lockRef.current],(t.shards||[]).map(BB),!0).filter(Boolean);return A.forEach(function(E){return E.classList.add("allow-interactivity-".concat(f))}),function(){document.body.classList.remove("block-interactivity-".concat(f)),A.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(f))})}}return},[t.inert,t.lockRef.current,t.shards]);var g=y(function(A,E){if("touches"in A&&A.touches.length===2||A.type==="wheel"&&A.ctrlKey)return!p.current.allowPinchZoom;var P=ck(A),D=c.current,N="deltaX"in A?A.deltaX:D[0]-P[0],O="deltaY"in A?A.deltaY:D[1]-P[1],F,z=A.target,B=Math.abs(N)>Math.abs(O)?"h":"v";if("touches"in A&&B==="h"&&z.type==="range")return!1;var U=window.getSelection(),Y=U&&U.anchorNode,G=Y?Y===z||Y.contains(z):!1;if(G)return!1;var ce=pR(B,z);if(!ce)return!0;if(ce)F=B;else F=B==="v"?"h":"v",ce=pR(B,z);if(!ce)return!1;if(!u.current&&"changedTouches"in A&&(N||O))u.current=F;if(!F)return!0;var re=u.current||F;return _B(re,E,A,re==="h"?N:O,!0)},[]),v=y(function(A){var E=A;if(!fh.length||fh[fh.length-1]!==m)return;var P="deltaY"in E?zB(E):ck(E),D=a.current.filter(function(F){return F.name===E.type&&(F.target===E.target||E.target===F.shadowParent)&&Nse(F.delta,P)})[0];if(D&&D.should){if(E.cancelable)E.preventDefault();return}if(!D){var N=(p.current.shards||[]).map(BB).filter(Boolean).filter(function(F){return F.contains(E.target)}),O=N.length>0?g(E,N[0]):!p.current.noIsolation;if(O){if(E.cancelable)E.preventDefault()}}},[]),k=y(function(A,E,P,D){var N={name:A,delta:E,target:P,should:D,shadowParent:zse(P)};a.current.push(N),setTimeout(function(){a.current=a.current.filter(function(O){return O!==N})},1)},[]),S=y(function(A){c.current=ck(A),u.current=void 0},[]),I=y(function(A){k(A.type,zB(A),A.target,g(A,t.lockRef.current))},[]),T=y(function(A){k(A.type,ck(A),A.target,g(A,t.lockRef.current))},[]);o(function(){return fh.push(m),t.setCallbacks({onScrollCapture:I,onWheelCapture:I,onTouchMoveCapture:T}),document.addEventListener("wheel",v,jf),document.addEventListener("touchmove",v,jf),document.addEventListener("touchstart",S,jf),function(){fh=fh.filter(function(A){return A!==m}),document.removeEventListener("wheel",v,jf),document.removeEventListener("touchmove",v,jf),document.removeEventListener("touchstart",S,jf)}},[]);var{removeScrollBar:L,inert:R}=t;return ct(Xe,null,R?ct(m,{styles:Ose(f)}):null,L?ct(fR,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function zse(t){var a=null;while(t!==null){if(t instanceof ShadowRoot)a=t.host,t=t.host;t=t.parentNode}return a}var VB=iR(lk,FB);var UB=_e(function(t,a){return ct(ov,Da({},t,{ref:a,sideCar:VB}))});UB.classNames=ov.classNames;var Tc=UB;var Bse=function(t){if(typeof document>"u")return null;var a=Array.isArray(t)?t[0]:t;return a.ownerDocument.body},mh=new WeakMap,uk=new WeakMap,dk={},hR=0,qB=function(t){return t&&(t.host||qB(t.parentNode))},Fse=function(t,a){return a.map(function(c){if(t.contains(c))return c;var u=qB(c);if(u&&t.contains(u))return u;return console.error("aria-hidden",c,"in not contained inside",t,". Doing nothing"),null}).filter(function(c){return Boolean(c)})},Vse=function(t,a,c,u){var f=Fse(a,Array.isArray(t)?t:[t]);if(!dk[c])dk[c]=new WeakMap;var m=dk[c],p=[],g=new Set,v=new Set(f),k=function(I){if(!I||g.has(I))return;g.add(I),k(I.parentNode)};f.forEach(k);var S=function(I){if(!I||v.has(I))return;Array.prototype.forEach.call(I.children,function(T){if(g.has(T))S(T);else try{var L=T.getAttribute(u),R=L!==null&&L!=="false",A=(mh.get(T)||0)+1,E=(m.get(T)||0)+1;if(mh.set(T,A),m.set(T,E),p.push(T),A===1&&R)uk.set(T,!0);if(E===1)T.setAttribute(c,"true");if(!R)T.setAttribute(u,"true")}catch(P){console.error("aria-hidden: cannot operate on ",T,P)}})};return S(a),g.clear(),hR++,function(){if(p.forEach(function(I){var T=mh.get(I)-1,L=m.get(I)-1;if(mh.set(I,T),m.set(I,L),!T){if(!uk.has(I))I.removeAttribute(u);uk.delete(I)}if(!L)I.removeAttribute(c)}),hR--,!hR)mh=new WeakMap,mh=new WeakMap,uk=new WeakMap,dk={}}},qu=function(t,a,c){if(c===void 0)c="data-aria-hidden";var u=Array.from(Array.isArray(t)?t:[t]),f=a||Bse(t);if(!f)return function(){return null};return u.push.apply(u,Array.from(f.querySelectorAll("[aria-live], script"))),Vse(u,f,c,"aria-hidden")};var Use=Object.defineProperty,ci=(t,a)=>Use(t,"name",{value:a,configurable:!0}),xR="Dialog",[HB,vR]=Vn(xR),[qse,bs]=HB(xR),Hu=ci((t)=>{let{__scopeDialog:a,children:c,open:u,defaultOpen:f,onOpenChange:m,modal:p=!0}=t,g=i(null),v=i(null),[k,S]=co({prop:u,defaultProp:f??!1,onChange:m,caller:xR}),[I,T]=r(0),[L,R]=r(0);return e(qse,{scope:a,triggerRef:g,contentRef:v,contentId:Dn(),titleId:Dn(),descriptionId:Dn(),titlePresent:I>0,descriptionPresent:L>0,setTitleCount:T,setDescriptionCount:R,open:k,onOpenChange:S,onOpenToggle:y(()=>S((A)=>!A),[S]),modal:p,children:c})},"Dialog"),Hse="DialogTrigger",jB=_e(ci(function(a,c){let{__scopeDialog:u,...f}=a,m=bs(Hse,u),p=At(c,m.triggerRef);return e(St.button,{type:"button","aria-haspopup":"dialog","aria-expanded":m.open,"aria-controls":m.open?m.contentId:void 0,"data-state":fk(m.open),...f,ref:p,onClick:gt(a.onClick,m.onOpenToggle)})},"DialogTrigger")),GB="DialogPortal",[jse,$B]=HB(GB,{forceMount:void 0}),ju=ci((t)=>{let{__scopeDialog:a,forceMount:c,children:u,container:f}=t,m=bs(GB,a);return e(jse,{scope:a,forceMount:c,children:Uo.map(u,(p)=>e(Lo,{present:c||m.open,children:e(cl,{asChild:!0,container:f,children:p})}))})},"DialogPortal"),gR="DialogOverlay",Gu=_e(ci(function(a,c){let u=$B(gR,a.__scopeDialog),{forceMount:f=u.forceMount,...m}=a,p=bs(gR,a.__scopeDialog);return p.modal?e(Lo,{present:f||p.open,children:e($se,{...m,ref:c})}):null},"DialogOverlay")),Gse=uo("DialogOverlay.RemoveScroll"),$se=_e(ci(function(a,c){let{__scopeDialog:u,...f}=a,m=bs(gR,u),p=$L(),g=At(c,p);return e(Tc,{as:Gse,allowPinchZoom:!0,shards:[m.contentRef],children:e(St.div,{"data-state":fk(m.open),...f,ref:g,style:{pointerEvents:"auto",...f.style}})})},"DialogOverlayImpl")),iv="DialogContent",$u=_e(ci(function(a,c){let u=$B(iv,a.__scopeDialog),{forceMount:f=u.forceMount,...m}=a,p=bs(iv,a.__scopeDialog);return e(Lo,{present:f||p.open,children:p.modal?e(Kse,{...m,ref:c}):e(Wse,{...m,ref:c})})},"DialogContent")),Kse=_e(ci(function(a,c){let u=bs(iv,a.__scopeDialog),f=i(null),m=At(c,u.contentRef,f);return o(()=>{let p=f.current;if(p)return qu(p)},[]),e(KB,{...a,ref:m,trapFocus:u.open,disableOutsidePointerEvents:u.open,onCloseAutoFocus:gt(a.onCloseAutoFocus,(p)=>{p.preventDefault(),u.triggerRef.current?.focus()}),onPointerDownOutside:gt(a.onPointerDownOutside,(p)=>{let g=p.detail.originalEvent,v=g.button===0&&g.ctrlKey===!0;if(g.button===2||v)p.preventDefault()}),onFocusOutside:gt(a.onFocusOutside,(p)=>p.preventDefault())})},"DialogContentModal")),Wse=_e(ci(function(a,c){let u=bs(iv,a.__scopeDialog),f=i(!1),m=i(!1);return e(KB,{...a,ref:c,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:(p)=>{if(a.onCloseAutoFocus?.(p),!p.defaultPrevented){if(!f.current)u.triggerRef.current?.focus();p.preventDefault()}f.current=!1,m.current=!1},onInteractOutside:(p)=>{if(a.onInteractOutside?.(p),!p.defaultPrevented){if(f.current=!0,p.detail.originalEvent.type==="pointerdown")m.current=!0}let g=p.target;if(u.triggerRef.current?.contains(g))p.preventDefault();if(p.detail.originalEvent.type==="focusin"&&m.current)p.preventDefault()}})},"DialogContentNonModal")),KB=_e(ci(function(a,c){let{__scopeDialog:u,trapFocus:f,onOpenAutoFocus:m,onCloseAutoFocus:p,...g}=a,v=bs(iv,u);return ul(),e(h,{children:e(Uu,{asChild:!0,loop:!0,trapped:f,onMountAutoFocus:m,onUnmountAutoFocus:p,children:e(ll,{role:"dialog",id:v.contentId,"aria-describedby":v.descriptionPresent?v.descriptionId:void 0,"aria-labelledby":v.titlePresent?v.titleId:void 0,"data-state":fk(v.open),...g,ref:c,deferPointerDownOutside:!0,onDismiss:()=>v.onOpenChange(!1)})})})},"DialogContentImpl")),Xse="DialogTitle",ph=_e(ci(function(a,c){let{__scopeDialog:u,...f}=a,m=bs(Xse,u),{setTitleCount:p}=m;return xn(()=>(p((g)=>g+1),()=>p((g)=>g-1)),[p]),e(St.h2,{id:m.titleId,...f,ref:c})},"DialogTitle")),Yse="DialogDescription",bR=_e(ci(function(a,c){let{__scopeDialog:u,...f}=a,m=bs(Yse,u),{setDescriptionCount:p}=m;return xn(()=>(p((g)=>g+1),()=>p((g)=>g-1)),[p]),e(St.p,{id:m.descriptionId,...f,ref:c})},"DialogDescription")),Qse="DialogClose",hh=_e(ci(function(a,c){let{__scopeDialog:u,...f}=a,m=bs(Qse,u);return e(St.button,{type:"button",...f,ref:c,onClick:gt(a.onClick,()=>m.onOpenChange(!1))})},"DialogClose"));function fk(t){return t?"open":"closed"}ci(fk,"getState");var Zse=Object.defineProperty,Lc=(t,a)=>Zse(t,"name",{value:a,configurable:!0}),Jse="AlertDialog",[ele,AUn]=Vn(Jse,[vR]),Rc=vR(),tle=Lc((t)=>{let{__scopeAlertDialog:a,...c}=t,u=Rc(a);return e(Hu,{...u,...c,modal:!0})},"AlertDialog"),MUn=_e(Lc(function(a,c){let{__scopeAlertDialog:u,...f}=a,m=Rc(u);return e(jB,{...m,...f,ref:c})},"AlertDialogTrigger")),nle=Lc((t)=>{let{__scopeAlertDialog:a,...c}=t,u=Rc(a);return e(ju,{...u,...c})},"AlertDialogPortal"),rle=_e(Lc(function(a,c){let{__scopeAlertDialog:u,...f}=a,m=Rc(u);return e(Gu,{...m,...f,ref:c})},"AlertDialogOverlay")),ole="AlertDialogContent",[ale,ile]=ele(ole),sle=_e(Lc(function(a,c){let{__scopeAlertDialog:u,children:f,...m}=a,p=Rc(u),g=i(null),v=At(c,g),k=i(null);return e(ale,{scope:u,cancelRef:k,children:e($u,{role:"alertdialog",...p,...m,ref:v,onOpenAutoFocus:gt(m.onOpenAutoFocus,(S)=>{S.preventDefault(),k.current?.focus({preventScroll:!0})}),onPointerDownOutside:(S)=>S.preventDefault(),onInteractOutside:(S)=>S.preventDefault(),children:f})})},"AlertDialogContent")),lle=_e(Lc(function(a,c){let{__scopeAlertDialog:u,...f}=a,m=Rc(u);return e(ph,{...m,...f,ref:c})},"AlertDialogTitle")),cle=_e(Lc(function(a,c){let{__scopeAlertDialog:u,...f}=a,m=Rc(u);return e(bR,{...m,...f,ref:c})},"AlertDialogDescription")),ule=_e(Lc(function(a,c){let{__scopeAlertDialog:u,...f}=a,m=Rc(u);return e(hh,{...m,...f,ref:c})},"AlertDialogAction")),dle="AlertDialogCancel",fle=_e(Lc(function(a,c){let{__scopeAlertDialog:u,...f}=a,{cancelRef:m}=ile(dle,u),p=Rc(u),g=At(c,m);return e(hh,{...p,...f,ref:g})},"AlertDialogCancel")),WB=tle;var XB=nle,YB=rle,QB=sle,ZB=ule,JB=fle,eF=lle,mk=cle;var mle=Object.defineProperty,sv=(t,a)=>mle(t,"name",{value:a,configurable:!0}),yR="Collapsible",[ple,qUn]=Vn(yR),[hle,wR]=ple(yR),gle=_e(sv(function(a,c){let{__scopeCollapsible:u,open:f,defaultOpen:m,disabled:p,onOpenChange:g,...v}=a,[k,S]=co({prop:f,defaultProp:m??!1,onChange:g,caller:yR});return e(hle,{scope:u,disabled:p,contentId:Dn(),open:k,onOpenToggle:y(()=>S((I)=>!I),[S]),children:e(St.div,{"data-state":pk(k),"data-disabled":p?"":void 0,...v,ref:c})})},"Collapsible")),xle="CollapsibleTrigger",vle=_e(sv(function(a,c){let{__scopeCollapsible:u,...f}=a,m=wR(xle,u);return e(St.button,{type:"button","aria-controls":m.open?m.contentId:void 0,"aria-expanded":m.open||!1,"data-state":pk(m.open),"data-disabled":m.disabled?"":void 0,disabled:m.disabled,...f,ref:c,onClick:gt(a.onClick,m.onOpenToggle)})},"CollapsibleTrigger")),nF="CollapsibleContent",ble=_e(sv(function(a,c){let{forceMount:u,...f}=a,m=wR(nF,a.__scopeCollapsible);return e(Lo,{present:u||m.open,children:({present:p})=>e(yle,{...f,ref:c,present:p})})},"CollapsibleContent")),yle=_e(sv(function(a,c){let{__scopeCollapsible:u,present:f,children:m,...p}=a,g=wR(nF,u),[v,k]=r(f),S=i(null),I=At(c,S),T=i(0),L=T.current,R=i(0),A=R.current,E=g.open||v,P=i(E),D=i(void 0);return o(()=>{let N=requestAnimationFrame(()=>P.current=!1);return()=>cancelAnimationFrame(N)},[]),xn(()=>{let N=S.current;if(N){D.current=D.current||{transitionDuration:N.style.transitionDuration,animationName:N.style.animationName},N.style.transitionDuration="0s",N.style.animationName="none";let O=N.getBoundingClientRect();if(T.current=O.height,R.current=O.width,!P.current)N.style.transitionDuration=D.current.transitionDuration,N.style.animationName=D.current.animationName;k(f)}},[g.open,f]),e(St.div,{"data-state":pk(g.open),"data-disabled":g.disabled?"":void 0,id:g.contentId,hidden:!E,...p,ref:I,style:{["--radix-collapsible-content-height"]:L?`${L}px`:void 0,["--radix-collapsible-content-width"]:A?`${A}px`:void 0,...a.style},children:E&&m})},"CollapsibleContentImpl"));function pk(t){return t?"open":"closed"}sv(pk,"getState");var wle=gle,kle=vle,Sle=ble;var Cle=Object.defineProperty,po=(t,a)=>Cle(t,"name",{value:a,configurable:!0});function $f(t){let a=t+"CollectionProvider",[c,u]=Vn(a),[f,m]=c(a,{collectionRef:{current:null},itemMap:new Map}),p=po((A)=>{let{scope:E,children:P}=A,D=i(null),N=i(new Map).current;return e(f,{scope:E,itemMap:N,collectionRef:D,children:P})},"CollectionProvider");p.displayName=a;let g=t+"CollectionSlot",v=uo(g),k=_e((A,E)=>{let{scope:P,children:D}=A,N=m(g,P),O=At(E,N.collectionRef);return e(v,{ref:O,children:D})});k.displayName=g;let S=t+"CollectionItemSlot",I="data-radix-collection-item",T=uo(S),L=_e((A,E)=>{let{scope:P,children:D,...N}=A,O=i(null),F=At(E,O),z=m(S,P);return o(()=>(z.itemMap.set(O,{ref:O,...N}),()=>void z.itemMap.delete(O))),e(T,{...{[I]:""},ref:F,children:D})});L.displayName=S;function R(A){let E=m(t+"CollectionConsumer",A);return y(()=>{let D=E.collectionRef.current;if(!D)return[];let N=Array.from(D.querySelectorAll(`[${I}]`));return Array.from(E.itemMap.values()).sort((z,B)=>N.indexOf(z.ref.current)-N.indexOf(B.ref.current))},[E.collectionRef,E.itemMap])}return po(R,"useCollection"),[{Provider:p,Slot:k,ItemSlot:L},R,u]}po($f,"createCollection");var oF=new WeakMap,kR=class t extends Map{static{po(this,"OrderedDict")}#e;constructor(a){super(a);this.#e=[...super.keys()],oF.set(this,!0)}set(a,c){if(oF.get(this))if(this.has(a))this.#e[this.#e.indexOf(a)]=a;else this.#e.push(a);return super.set(a,c),this}insert(a,c,u){let f=this.has(c),m=this.#e.length,p=CR(a),g=p>=0?p:m+p,v=g<0||g>=m?-1:g;if(v===this.size||f&&v===this.size-1||v===-1)return this.set(c,u),this;let k=this.size+(f?0:1);if(p<0)g++;let S=[...this.#e],I,T=!1;for(let L=g;L<k;L++)if(g===L){let R=S[L];if(S[L]===c)R=S[L+1];if(f)this.delete(c);I=this.get(R),this.set(c,u)}else{if(!T&&S[L-1]===c)T=!0;let R=S[T?L:L-1],A=I;I=this.get(R),this.delete(R),this.set(R,A)}return this}with(a,c,u){let f=new t(this);return f.insert(a,c,u),f}before(a){let c=this.#e.indexOf(a)-1;if(c<0)return;return this.entryAt(c)}setBefore(a,c,u){let f=this.#e.indexOf(a);if(f===-1)return this;return this.insert(f,c,u)}after(a){let c=this.#e.indexOf(a);if(c=c===-1||c===this.size-1?-1:c+1,c===-1)return;return this.entryAt(c)}setAfter(a,c,u){let f=this.#e.indexOf(a);if(f===-1)return this;return this.insert(f+1,c,u)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(a){let c=super.delete(a);if(c)this.#e.splice(this.#e.indexOf(a),1);return c}deleteAt(a){let c=this.keyAt(a);if(c!==void 0)return this.delete(c);return!1}at(a){let c=hk(this.#e,a);if(c!==void 0)return this.get(c)}entryAt(a){let c=hk(this.#e,a);if(c!==void 0)return[c,this.get(c)]}indexOf(a){return this.#e.indexOf(a)}keyAt(a){return hk(this.#e,a)}from(a,c){let u=this.indexOf(a);if(u===-1)return;let f=u+c;if(f<0)f=0;if(f>=this.size)f=this.size-1;return this.at(f)}keyFrom(a,c){let u=this.indexOf(a);if(u===-1)return;let f=u+c;if(f<0)f=0;if(f>=this.size)f=this.size-1;return this.keyAt(f)}find(a,c){let u=0;for(let f of this){if(Reflect.apply(a,c,[f,u,this]))return f;u++}return}findIndex(a,c){let u=0;for(let f of this){if(Reflect.apply(a,c,[f,u,this]))return u;u++}return-1}filter(a,c){let u=[],f=0;for(let m of this){if(Reflect.apply(a,c,[m,f,this]))u.push(m);f++}return new t(u)}map(a,c){let u=[],f=0;for(let m of this)u.push([m[0],Reflect.apply(a,c,[m,f,this])]),f++;return new t(u)}reduce(...a){let[c,u]=a,f=0,m=u??this.at(0);for(let p of this){if(f===0&&a.length===1)m=p;else m=Reflect.apply(c,this,[m,p,f,this]);f++}return m}reduceRight(...a){let[c,u]=a,f=u??this.at(-1);for(let m=this.size-1;m>=0;m--){let p=this.at(m);if(m===this.size-1&&a.length===1)f=p;else f=Reflect.apply(c,this,[f,p,m,this])}return f}toSorted(a){let c=[...this.entries()].sort(a);return new t(c)}toReversed(){let a=new t;for(let c=this.size-1;c>=0;c--){let u=this.keyAt(c),f=this.get(u);a.set(u,f)}return a}toSpliced(...a){let c=[...this.entries()];return c.splice(...a),new t(c)}slice(a,c){let u=new t,f=this.size-1;if(a===void 0)return u;if(a<0)a=a+this.size;if(c!==void 0&&c>0)f=c-1;for(let m=a;m<=f;m++){let p=this.keyAt(m),g=this.get(p);u.set(p,g)}return u}every(a,c){let u=0;for(let f of this){if(!Reflect.apply(a,c,[f,u,this]))return!1;u++}return!0}some(a,c){let u=0;for(let f of this){if(Reflect.apply(a,c,[f,u,this]))return!0;u++}return!1}};function hk(t,a){if("at"in Array.prototype)return Array.prototype.at.call(t,a);let c=aF(t,a);return c===-1?void 0:t[c]}po(hk,"at");function aF(t,a){let c=t.length,u=CR(a),f=u>=0?u:c+u;return f<0||f>=c?-1:f}po(aF,"toSafeIndex");function CR(t){return t!==t||t===0?0:Math.trunc(t)}po(CR,"toSafeInteger");function Ile(t){let a=t+"CollectionProvider",[c,u]=Vn(a),[f,m]=c(a,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new kR,setItemMap:po(()=>{return},"setItemMap")}),p=po(({state:N,...O})=>N?e(v,{...O,state:N}):e(g,{...O}),"CollectionProvider");p.displayName=a;let g=po((N)=>{let O=E();return e(v,{...N,state:O})},"CollectionInit");g.displayName=a+"Init";let v=po((N)=>{let{scope:O,children:F,state:z}=N,B=i(null),[U,Y]=r(null),G=At(B,Y),[ce,re]=z;return o(()=>{if(!U)return;let Q=lF(()=>{});return Q.observe(U,{childList:!0,subtree:!0}),()=>{Q.disconnect()}},[U]),e(f,{scope:O,itemMap:ce,setItemMap:re,collectionRef:G,collectionRefObject:B,collectionElement:U,children:F})},"CollectionProviderImpl");v.displayName=a+"Impl";let k=t+"CollectionSlot",S=uo(k),I=_e((N,O)=>{let{scope:F,children:z}=N,B=m(k,F),U=At(O,B.collectionRef);return e(S,{ref:U,children:z})});I.displayName=k;let T=t+"CollectionItemSlot",L="data-radix-collection-item",R=uo(T),A=_e((N,O)=>{let{scope:F,children:z,...B}=N,U=i(null),[Y,G]=r(null),ce=At(O,U,G),re=m(T,F),{setItemMap:Q}=re,ae=i(B);if(!iF(ae.current,B))ae.current=B;let xe=ae.current;return o(()=>{let Te=xe;return Q((me)=>{if(!Y)return me;if(!me.has(Y))return me.set(Y,{...Te,element:Y}),me.toSorted(SR);return me.set(Y,{...Te,element:Y}).toSorted(SR)}),()=>{Q((me)=>{if(!Y||!me.has(Y))return me;return me.delete(Y),new kR(me)})}},[Y,xe,Q]),e(R,{...{[L]:""},ref:ce,children:z})});A.displayName=T;function E(){return r(new kR)}po(E,"useInitCollection");function P(N){let{itemMap:O}=m(t+"CollectionConsumer",N);return O}return po(P,"useCollection"),[{Provider:p,Slot:I,ItemSlot:A},{createCollectionScope:u,useCollection:P,useInitCollection:E}]}po(Ile,"createCollection");function iF(t,a){if(t===a)return!0;if(typeof t!=="object"||typeof a!=="object")return!1;if(t==null||a==null)return!1;let c=Object.keys(t),u=Object.keys(a);if(c.length!==u.length)return!1;for(let f of c){if(!Object.prototype.hasOwnProperty.call(a,f))return!1;if(t[f]!==a[f])return!1}return!0}po(iF,"shallowEqual");function sF(t,a){return!!(a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}po(sF,"isElementPreceding");function SR(t,a){return!t[1].element||!a[1].element?0:sF(t[1].element,a[1].element)?-1:1}po(SR,"sortByDocumentPosition");function lF(t){return new MutationObserver((c)=>{for(let u of c)if(u.type==="childList"){t();return}})}po(lF,"getChildListObserver");var Tle=Object.defineProperty,Lle=(t,a)=>Tle(t,"name",{value:a,configurable:!0}),Rle=jt(void 0);function Kf(t){let a=M(Rle);return t||a||"ltr"}Lle(Kf,"useDirection");var dF=["top","right","bottom","left"];var{min:dl,max:ys,round:cv,floor:uv}=Math,fl=(t)=>({x:t,y:t}),Ele={left:"right",right:"left",bottom:"top",top:"bottom"};function IR(t,a,c){return ys(t,dl(a,c))}function ml(t,a){return typeof t==="function"?t(a):t}function Ec(t){return t.split("-")[0]}function Wf(t){return t.split("-")[1]}function xk(t){return t==="x"?"y":"x"}function vk(t){return t==="y"?"height":"width"}function ws(t){let a=t[0];return a==="t"||a==="b"?"y":"x"}function bk(t){return xk(ws(t))}function fF(t,a,c){if(c===void 0)c=!1;let u=Wf(t),f=bk(t),m=vk(f),p=f==="x"?u===(c?"end":"start")?"right":"left":u==="start"?"bottom":"top";if(a.reference[m]>a.floating[m])p=lv(p);return[p,lv(p)]}function mF(t){let a=lv(t);return[gk(t),a,gk(a)]}function gk(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var cF=["left","right"],uF=["right","left"],Ple=["top","bottom"],Ale=["bottom","top"];function Mle(t,a,c){switch(t){case"top":case"bottom":if(c)return a?uF:cF;return a?cF:uF;case"left":case"right":return a?Ple:Ale;default:return[]}}function pF(t,a,c,u){let f=Wf(t),m=Mle(Ec(t),c==="start",u);if(f){if(m=m.map((p)=>p+"-"+f),a)m=m.concat(m.map(gk))}return m}function lv(t){let a=Ec(t);return Ele[a]+t.slice(a.length)}function Dle(t){var a,c,u,f;return{top:(a=t.top)!=null?a:0,right:(c=t.right)!=null?c:0,bottom:(u=t.bottom)!=null?u:0,left:(f=t.left)!=null?f:0}}function TR(t){return typeof t!=="number"?Dle(t):{top:t,right:t,bottom:t,left:t}}function Xf(t){let{x:a,y:c,width:u,height:f}=t;return{width:u,height:f,top:c,left:a,right:a+u,bottom:c+f,x:a,y:c}}function hF(t,a,c){let{reference:u,floating:f}=t,m=ws(a),p=bk(a),g=vk(p),v=Ec(a),k=m==="y",S=u.x+u.width/2-f.width/2,I=u.y+u.height/2-f.height/2,T=u[g]/2-f[g]/2,L;switch(v){case"top":L={x:S,y:u.y-f.height};break;case"bottom":L={x:S,y:u.y+u.height};break;case"right":L={x:u.x+u.width,y:I};break;case"left":L={x:u.x-f.width,y:I};break;default:L={x:u.x,y:u.y}}let R=Wf(a);if(R)L[p]+=T*(R==="end"?1:-1)*(c&&k?-1:1);return L}async function vF(t,a){var c;if(a===void 0)a={};let{x:u,y:f,platform:m,rects:p,elements:g,strategy:v}=t,{boundary:k="clippingAncestors",rootBoundary:S="viewport",elementContext:I="floating",altBoundary:T=!1,padding:L=0}=ml(a,t),R=TR(L),E=g[T?I==="floating"?"reference":"floating":I],P=Xf(await m.getClippingRect({element:((c=await(m.isElement==null?void 0:m.isElement(E)))!=null?c:!0)?E:E.contextElement||await(m.getDocumentElement==null?void 0:m.getDocumentElement(g.floating)),boundary:k,rootBoundary:S,strategy:v})),D=I==="floating"?{x:u,y:f,width:p.floating.width,height:p.floating.height}:p.reference,N=await(m.getOffsetParent==null?void 0:m.getOffsetParent(g.floating)),O=await(m.isElement==null?void 0:m.isElement(N))&&await(m.getScale==null?void 0:m.getScale(N))||{x:1,y:1},F=Xf(m.convertOffsetParentRelativeRectToViewportRelativeRect?await m.convertOffsetParentRelativeRectToViewportRelativeRect({elements:g,rect:D,offsetParent:N,strategy:v}):D);return{top:(P.top-F.top+R.top)/O.y,bottom:(F.bottom-P.bottom+R.bottom)/O.y,left:(P.left-F.left+R.left)/O.x,right:(F.right-P.right+R.right)/O.x}}var Nle=50,bF=async(t,a,c)=>{let{placement:u="bottom",strategy:f="absolute",middleware:m=[],platform:p}=c,g=p.detectOverflow?p:{...p,detectOverflow:vF},v=await(p.isRTL==null?void 0:p.isRTL(a)),k=await p.getElementRects({reference:t,floating:a,strategy:f}),{x:S,y:I}=hF(k,u,v),T=u,L=0,R={};for(let A=0;A<m.length;A++){let E=m[A];if(!E)continue;let{name:P,fn:D}=E,{x:N,y:O,data:F,reset:z}=await D({x:S,y:I,initialPlacement:u,placement:T,strategy:f,middlewareData:R,rects:k,platform:g,elements:{reference:t,floating:a}});if(S=N!=null?N:S,I=O!=null?O:I,R[P]={...R[P],...F},z&&L<Nle){if(L++,typeof z==="object"){if(z.placement)T=z.placement;if(z.rects)k=z.rects===!0?await p.getElementRects({reference:t,floating:a,strategy:f}):z.rects;({x:S,y:I}=hF(k,T,v))}A=-1}}return{x:S,y:I,placement:T,strategy:f,middlewareData:R}},yF=(t)=>({name:"arrow",options:t,async fn(a){let{x:c,y:u,placement:f,rects:m,platform:p,elements:g,middlewareData:v}=a,{element:k,padding:S=0}=ml(t,a)||{};if(k==null)return{};let I=TR(S),T={x:c,y:u},L=bk(f),R=vk(L),A=await p.getDimensions(k),E=L==="y",P=E?"top":"left",D=E?"bottom":"right",N=E?"clientHeight":"clientWidth",O=m.reference[R]+m.reference[L]-T[L]-m.floating[R],F=T[L]-m.reference[L],z=await(p.getOffsetParent==null?void 0:p.getOffsetParent(k)),B=z?z[N]:0;if(!B||!await(p.isElement==null?void 0:p.isElement(z)))B=g.floating[N]||m.floating[R];let U=O/2-F/2,Y=B/2-A[R]/2-1,G=dl(I[P],Y),ce=dl(I[D],Y),re=B-A[R]-ce,Q=B/2-A[R]/2+U,ae=IR(G,Q,re),xe=!v.arrow&&Wf(f)!=null&&Q!==ae&&m.reference[R]/2-(Q<G?G:ce)-A[R]/2<0,Te=xe?Q<G?Q-G:Q-re:0;return{[L]:T[L]+Te,data:{[L]:ae,centerOffset:Q-ae-Te,...xe&&{alignmentOffset:Te}},reset:xe}}});var wF=function(t){if(t===void 0)t={};return{name:"flip",options:t,async fn(a){var c,u;let{placement:f,middlewareData:m,rects:p,initialPlacement:g,platform:v,elements:k}=a,{mainAxis:S=!0,crossAxis:I=!0,fallbackPlacements:T,fallbackStrategy:L="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:A=!0,...E}=ml(t,a);if((c=m.arrow)!=null&&c.alignmentOffset)return{};let P=Ec(f),D=ws(g),N=Ec(g)===g,O=await(v.isRTL==null?void 0:v.isRTL(k.floating)),F=T||(N||!A?[lv(g)]:mF(g)),z=R!=="none";if(!T&&z)F.push(...pF(g,A,R,O));let B=[g,...F],U=await v.detectOverflow(a,E),Y=[],G=((u=m.flip)==null?void 0:u.overflows)||[];if(S)Y.push(U[P]);if(I){let ae=fF(f,p,O);Y.push(U[ae[0]],U[ae[1]])}if(G=[...G,{placement:f,overflows:Y}],!Y.every((ae)=>ae<=0)){var ce,re;let ae=(((ce=m.flip)==null?void 0:ce.index)||0)+1,xe=B[ae];if(xe){if(!(I==="alignment"?D!==ws(xe):!1)||G.every((Ce)=>ws(Ce.placement)===D?Ce.overflows[0]>0:!0))return{data:{index:ae,overflows:G},reset:{placement:xe}}}let Te=(re=G.filter((me)=>me.overflows[0]<=0).sort((me,Ce)=>me.overflows[1]-Ce.overflows[1])[0])==null?void 0:re.placement;if(!Te)switch(L){case"bestFit":{var Q;let me=(Q=G.filter((Ce)=>{if(z){let Be=ws(Ce.placement);return Be===D||Be==="y"}return!0}).map((Ce)=>[Ce.placement,Ce.overflows.filter((Be)=>Be>0).reduce((Be,X)=>Be+X,0)]).sort((Ce,Be)=>Ce[1]-Be[1])[0])==null?void 0:Q[0];if(me)Te=me;break}case"initialPlacement":Te=g;break}if(f!==Te)return{reset:{placement:Te}}}return{}}}};function gF(t,a){return{top:t.top-a.height,right:t.right-a.width,bottom:t.bottom-a.height,left:t.left-a.width}}function xF(t){return dF.some((a)=>t[a]>=0)}var kF=function(t){if(t===void 0)t={};return{name:"hide",options:t,async fn(a){let{rects:c,platform:u}=a,{strategy:f="referenceHidden",...m}=ml(t,a);switch(f){case"referenceHidden":{let p=await u.detectOverflow(a,{...m,elementContext:"reference"}),g=gF(p,c.reference);return{data:{referenceHiddenOffsets:g,referenceHidden:xF(g)}}}case"escaped":{let p=await u.detectOverflow(a,{...m,altBoundary:!0}),g=gF(p,c.floating);return{data:{escapedOffsets:g,escaped:xF(g)}}}default:return{}}}}};var SF=new Set(["left","top"]);async function Ole(t,a){let{placement:c,platform:u,elements:f}=t,m=await(u.isRTL==null?void 0:u.isRTL(f.floating)),p=Ec(c),g=Wf(c),v=ws(c)==="y",k=SF.has(p)?-1:1,S=m&&v?-1:1,I=ml(a,t),{mainAxis:T,crossAxis:L,alignmentAxis:R}=typeof I==="number"?{mainAxis:I,crossAxis:0,alignmentAxis:null}:{mainAxis:I.mainAxis||0,crossAxis:I.crossAxis||0,alignmentAxis:I.alignmentAxis};if(g&&typeof R==="number")L=g==="end"?R*-1:R;return v?{x:L*S,y:T*k}:{x:T*k,y:L*S}}var CF=function(t){if(t===void 0)t=0;return{name:"offset",options:t,async fn(a){var c,u;let{x:f,y:m,placement:p,middlewareData:g}=a,v=await Ole(a,t);if(p===((c=g.offset)==null?void 0:c.placement)&&(u=g.arrow)!=null&&u.alignmentOffset)return{};return{x:f+v.x,y:m+v.y,data:{...v,placement:p}}}}},IF=function(t){if(t===void 0)t={};return{name:"shift",options:t,async fn(a){let{x:c,y:u,placement:f,platform:m}=a,{mainAxis:p=!0,crossAxis:g=!1,limiter:v={fn:(D)=>{let{x:N,y:O}=D;return{x:N,y:O}}},...k}=ml(t,a),S={x:c,y:u},I=await m.detectOverflow(a,k),T=ws(f),L=xk(T),R=S[L],A=S[T],E=(D,N)=>IR(N+I[D==="y"?"top":"left"],N,N-I[D==="y"?"bottom":"right"]);if(p)R=E(L,R);if(g)A=E(T,A);let P=v.fn({...a,[L]:R,[T]:A});return{...P,data:{x:P.x-c,y:P.y-u,enabled:{[L]:p,[T]:g}}}}}},TF=function(t){if(t===void 0)t={};return{options:t,fn(a){var c,u;let{x:f,y:m,placement:p,rects:g,middlewareData:v}=a,{offset:k=0,mainAxis:S=!0,crossAxis:I=!0}=ml(t,a),T={x:f,y:m},L=ws(p),R=xk(L),A=T[R],E=T[L],P=ml(k,a),D=typeof P==="number"?{mainAxis:P,crossAxis:0}:{mainAxis:(c=P.mainAxis)!=null?c:0,crossAxis:(u=P.crossAxis)!=null?u:0};if(S){let F=R==="y"?"height":"width",z=g.reference[R]-g.floating[F]+D.mainAxis,B=g.reference[R]+g.reference[F]-D.mainAxis;if(A<z)A=z;else if(A>B)A=B}if(I){var N,O;let F=R==="y"?"width":"height",z=SF.has(Ec(p)),B=g.reference[L]-g.floating[F]+(z?((N=v.offset)==null?void 0:N[L])||0:0)+(z?0:D.crossAxis),U=g.reference[L]+g.reference[F]+(z?0:((O=v.offset)==null?void 0:O[L])||0)-(z?D.crossAxis:0);if(E<B)E=B;else if(E>U)E=U}return{[R]:A,[L]:E}}}},LF=function(t){if(t===void 0)t={};return{name:"size",options:t,async fn(a){let{placement:c,rects:u,platform:f,elements:m}=a,{apply:p=()=>{},...g}=ml(t,a),v=await f.detectOverflow(a,g),k=Ec(c),S=Wf(c),I=ws(c)==="y",{width:T,height:L}=u.floating,R,A;if(k==="top"||k==="bottom")R=k,A=S===(await(f.isRTL==null?void 0:f.isRTL(m.floating))?"start":"end")?"left":"right";else A=k,R=S==="end"?"top":"bottom";let E=L-v.top-v.bottom,P=T-v.left-v.right,D=dl(L-v[R],E),N=dl(T-v[A],P),O=a.middlewareData.shift,F=!O,z=D,B=N;if(O!=null&&O.enabled.x)B=P;if(O!=null&&O.enabled.y)z=E;if(F&&!S)if(I)B=T-2*ys(v.left,v.right);else z=L-2*ys(v.top,v.bottom);await p({...a,availableWidth:B,availableHeight:z});let U=await f.getDimensions(m.floating);if(T!==U.width||L!==U.height)return{reset:{rects:!0}};return{}}}};function yk(){return typeof window<"u"}function Zf(t){if(EF(t))return(t.nodeName||"").toLowerCase();return"#document"}function oa(t){var a;return(t==null||(a=t.ownerDocument)==null?void 0:a.defaultView)||window}function pl(t){var a;return(a=(EF(t)?t.ownerDocument:t.document)||window.document)==null?void 0:a.documentElement}function EF(t){if(!yk())return!1;return t instanceof Node||t instanceof oa(t).Node}function ks(t){if(!yk())return!1;return t instanceof Element||t instanceof oa(t).Element}function Pc(t){if(!yk())return!1;return t instanceof HTMLElement||t instanceof oa(t).HTMLElement}function RF(t){if(!yk()||typeof ShadowRoot>"u")return!1;return t instanceof ShadowRoot||t instanceof oa(t).ShadowRoot}function dv(t){let{overflow:a,overflowX:c,overflowY:u,display:f}=Ss(t);return/auto|scroll|overlay|hidden|clip/.test(a+u+c)&&f!=="inline"&&f!=="contents"}function PF(t){return/^(table|td|th)$/.test(Zf(t))}function fv(t){try{if(t.matches(":popover-open"))return!0}catch(a){}try{return t.matches(":modal")}catch(a){return!1}}var _le=/transform|translate|scale|rotate|perspective|filter/,zle=/paint|layout|strict|content/,Yf=(t)=>!!t&&t!=="none",LR;function wk(t){let a=ks(t)?Ss(t):t;return Yf(a.transform)||Yf(a.translate)||Yf(a.scale)||Yf(a.rotate)||Yf(a.perspective)||!kk()&&(Yf(a.backdropFilter)||Yf(a.filter))||_le.test(a.willChange||"")||zle.test(a.contain||"")}function AF(t){let a=Ku(t);while(Pc(a)&&!gh(a)){if(wk(a))return a;else if(fv(a))return null;a=Ku(a)}return null}function kk(){if(LR==null)LR=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return LR}function gh(t){return/^(html|body|#document)$/.test(Zf(t))}function Ss(t){return oa(t).getComputedStyle(t)}function mv(t){if(ks(t))return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop};return{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ku(t){if(Zf(t)==="html")return t;let a=t.assignedSlot||t.parentNode||RF(t)&&t.host||pl(t);return RF(a)?a.host:a}function MF(t){let a=Ku(t);if(gh(a))return(t.ownerDocument||t).body;if(Pc(a)&&dv(a))return a;return MF(a)}function Qf(t,a,c){var u;if(a===void 0)a=[];if(c===void 0)c=!0;let f=MF(t),m=f===((u=t.ownerDocument)==null?void 0:u.body),p=oa(f);if(m){let g=Sk(p);return a.concat(p,p.visualViewport||[],dv(f)?f:[],g&&c?Qf(g):[])}else return a.concat(f,Qf(f,[],c))}function Sk(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function OF(t){let a=Ss(t),c=parseFloat(a.width)||0,u=parseFloat(a.height)||0,f=Pc(t),m=f?t.offsetWidth:c,p=f?t.offsetHeight:u,g=cv(c)!==m||cv(u)!==p;if(g)c=m,u=p;return{width:c,height:u,$:g}}function ER(t){return!ks(t)?t.contextElement:t}function xh(t){let a=ER(t);if(!Pc(a))return fl(1);let c=a.getBoundingClientRect(),{width:u,height:f,$:m}=OF(a),p=(m?cv(c.width):c.width)/u,g=(m?cv(c.height):c.height)/f;if(!p||!Number.isFinite(p))p=1;if(!g||!Number.isFinite(g))g=1;return{x:p,y:g}}var Ble=fl(0);function _F(t){let a=oa(t);if(!kk()||!a.visualViewport)return Ble;return{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function Fle(t,a,c){if(a===void 0)a=!1;return!!c&&a&&c===oa(t)}function Jf(t,a,c,u){if(a===void 0)a=!1;if(c===void 0)c=!1;let f=t.getBoundingClientRect(),m=ER(t),p=fl(1);if(a)if(u){if(ks(u))p=xh(u)}else p=xh(t);let g=Fle(m,c,u)?_F(m):fl(0),v=(f.left+g.x)/p.x,k=(f.top+g.y)/p.y,S=f.width/p.x,I=f.height/p.y;if(m&&u){let T=oa(m),L=ks(u)?oa(u):u,R=T,A=Sk(R);while(A&&L!==R){let E=xh(A),P=A.getBoundingClientRect(),D=Ss(A),N=P.left+(A.clientLeft+parseFloat(D.paddingLeft))*E.x,O=P.top+(A.clientTop+parseFloat(D.paddingTop))*E.y;v*=E.x,k*=E.y,S*=E.x,I*=E.y,v+=N,k+=O,R=oa(A),A=Sk(R)}}return Xf({width:S,height:I,x:v,y:k})}function Ck(t,a){let c=mv(t).scrollLeft;if(!a)return Jf(pl(t)).left+c;return a.left+c}function zF(t,a){let c=t.getBoundingClientRect(),u=c.left+a.scrollLeft-Ck(t,c),f=c.top+a.scrollTop;return{x:u,y:f}}function Vle(t){let{elements:a,rect:c,offsetParent:u,strategy:f}=t,m=f==="fixed",p=pl(u),g=a?fv(a.floating):!1;if(u===p||g&&m)return c;let v={scrollLeft:0,scrollTop:0},k=fl(1),S=fl(0),I=Pc(u);if(I||!m){if(Zf(u)!=="body"||dv(p))v=mv(u);if(I){let L=Jf(u);k=xh(u),S.x=L.x+u.clientLeft,S.y=L.y+u.clientTop}}let T=p&&!I&&!m?zF(p,v):fl(0);return{width:c.width*k.x,height:c.height*k.y,x:c.x*k.x-v.scrollLeft*k.x+S.x+T.x,y:c.y*k.y-v.scrollTop*k.y+S.y+T.y}}function Ule(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function qle(t){let a=mv(t),c=t.ownerDocument.body,u=ys(t.scrollWidth,t.clientWidth,c.scrollWidth,c.clientWidth),f=ys(t.scrollHeight,t.clientHeight,c.scrollHeight,c.clientHeight),m=-a.scrollLeft+Ck(t),p=-a.scrollTop;if(Ss(c).direction==="rtl")m+=ys(t.clientWidth,c.clientWidth)-u;return{width:u,height:f,x:m,y:p}}var Hle=25;function jle(t,a,c){if(c===void 0)c="viewport";let u=c==="layoutViewport",f=oa(t),m=pl(t),p=f.visualViewport,{clientWidth:g,clientHeight:v}=m,k=0,S=0;if(p){let T=!kk()||a==="fixed";if(u){if(!T)k=-p.offsetLeft,S=-p.offsetTop}else if(g=p.width,v=p.height,T)k=p.offsetLeft,S=p.offsetTop}if(Ck(m)<=0){let T=m.ownerDocument,L=T.body,R=getComputedStyle(L),A=T.compatMode==="CSS1Compat"?parseFloat(R.marginLeft)+parseFloat(R.marginRight)||0:0,E=Math.abs(m.clientWidth-L.clientWidth-A),P=getComputedStyle(m).scrollbarGutter==="stable both-edges"?E/2:E;if(P<=Hle)g-=P}return{width:g,height:v,x:k,y:S}}function Gle(t,a){let c=Jf(t,!0,a==="fixed"),u=c.top+t.clientTop,f=c.left+t.clientLeft,m=xh(t),p=t.clientWidth*m.x,g=t.clientHeight*m.y,v=f*m.x,k=u*m.y;return{width:p,height:g,x:v,y:k}}function DF(t,a,c){let u;if(a==="viewport"||a==="layoutViewport")u=jle(t,c,a);else if(a==="document")u=qle(pl(t));else if(ks(a))u=Gle(a,c);else{let f=_F(t);u={x:a.x-f.x,y:a.y-f.y,width:a.width,height:a.height}}return Xf(u)}function $le(t,a){let c=a.get(t);if(c)return c;let u=Qf(t,[],!1).filter((g)=>ks(g)&&Zf(g)!=="body"),f=null,m=Ss(t).position==="fixed",p=m?Ku(t):t;while(ks(p)&&!gh(p)){let g=Ss(p),v=wk(p),k=f?f.position:m?"fixed":"";if(!v&&(k==="fixed"||k==="absolute"&&g.position==="static"))u=u.filter((I)=>I!==p);else f=g;p=Ku(p)}return a.set(t,u),u}function Kle(t){let{element:a,boundary:c,rootBoundary:u,strategy:f}=t,p=[...c==="clippingAncestors"?fv(a)?[]:$le(a,this._c):[].concat(c),u],g=DF(a,p[0],f),{top:v,right:k,bottom:S,left:I}=g;for(let T=1;T<p.length;T++){let L=DF(a,p[T],f);v=ys(L.top,v),k=dl(L.right,k),S=dl(L.bottom,S),I=ys(L.left,I)}return{width:k-I,height:S-v,x:I,y:v}}function Wle(t){let{width:a,height:c}=OF(t);return{width:a,height:c}}function Xle(t,a,c){let u=Pc(a),f=pl(a),m=c==="fixed",p=Jf(t,!0,m,a),g={scrollLeft:0,scrollTop:0},v=fl(0);if(u||!m){if(Zf(a)!=="body"||dv(f))g=mv(a);if(u){let T=Jf(a,!0,m,a);v.x=T.x+a.clientLeft,v.y=T.y+a.clientTop}}if(!u&&f)v.x=Ck(f);let k=f&&!u&&!m?zF(f,g):fl(0),S=p.left+g.scrollLeft-v.x-k.x,I=p.top+g.scrollTop-v.y-k.y;return{x:S,y:I,width:p.width,height:p.height}}function RR(t){return Ss(t).position==="static"}function NF(t,a){if(!Pc(t)||Ss(t).position==="fixed")return null;if(a)return a(t);let c=t.offsetParent;if(pl(t)===c)c=c.ownerDocument.body;return c}function BF(t,a){let c=oa(t);if(fv(t))return c;if(!Pc(t)){let f=Ku(t);while(f&&!gh(f)){if(ks(f)&&!RR(f))return f;f=Ku(f)}return c}let u=NF(t,a);while(u&&PF(u)&&RR(u))u=NF(u,a);if(u&&gh(u)&&RR(u)&&!wk(u))return c;return u||AF(t)||c}var Yle=async function(t){let a=this.getOffsetParent||BF,c=this.getDimensions,u=await c(t.floating);return{reference:Xle(t.reference,await a(t.floating),t.strategy),floating:{x:0,y:0,width:u.width,height:u.height}}};function Qle(t){return Ss(t).direction==="rtl"}var FF={convertOffsetParentRelativeRectToViewportRelativeRect:Vle,getDocumentElement:pl,getClippingRect:Kle,getOffsetParent:BF,getElementRects:Yle,getClientRects:Ule,getDimensions:Wle,getScale:xh,isElement:ks,isRTL:Qle};function VF(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height}function Zle(t,a,c){let u=null,f,m=pl(t);function p(){var S;clearTimeout(f),(S=u)==null||S.disconnect(),u=null}function g(S,I){if(S===void 0)S=!1;if(I===void 0)I=1;p();let T=t.getBoundingClientRect(),{left:L,top:R,width:A,height:E}=T;if(!S)a();if(!A||!E)return;let P=uv(R),D=uv(m.clientWidth-(L+A)),N=uv(m.clientHeight-(R+E)),O=uv(L),z={rootMargin:-P+"px "+-D+"px "+-N+"px "+-O+"px",threshold:ys(0,dl(1,I))||1},B=!0;function U(Y){let G=Y[0].intersectionRatio;if(!VF(T,t.getBoundingClientRect()))return g();if(G!==I){if(!B)return g();if(!G)f=setTimeout(()=>{g(!1,0.0000001)},1000);else g(!1,G)}B=!1}try{u=new IntersectionObserver(U,{...z,root:m.ownerDocument})}catch(Y){u=new IntersectionObserver(U,z)}u.observe(t)}let v=oa(t),k=()=>g(c);return v.addEventListener("resize",k),g(!0),()=>{v.removeEventListener("resize",k),p()}}function PR(t,a,c,u){if(u===void 0)u={};let{ancestorScroll:f=!0,ancestorResize:m=!0,elementResize:p=typeof ResizeObserver==="function",layoutShift:g=typeof IntersectionObserver==="function",animationFrame:v=!1}=u,k=ER(t),S=f||m?[...k?Qf(k):[],...a?Qf(a):[]]:[];S.forEach((P)=>{f&&P.addEventListener("scroll",c),m&&P.addEventListener("resize",c)});let I=k&&g?Zle(k,c,m):null,T=-1,L=null;if(p){if(L=new ResizeObserver((P)=>{let[D]=P;if(D&&D.target===k&&L&&a)L.unobserve(a),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var N;(N=L)==null||N.observe(a)});c()}),k&&!v)L.observe(k);if(a)L.observe(a)}let R,A=v?Jf(t):null;if(v)E();function E(){let P=Jf(t);if(A&&!VF(A,P))c();A=P,R=requestAnimationFrame(E)}return c(),()=>{var P;if(S.forEach((D)=>{f&&D.removeEventListener("scroll",c),m&&D.removeEventListener("resize",c)}),I==null||I(),(P=L)==null||P.disconnect(),L=null,v)cancelAnimationFrame(R)}}var UF=CF;var qF=IF,HF=wF,jF=LF,GF=kF,AR=yF;var $F=TF,MR=(t,a,c)=>{let u=new Map,f=c!=null?c:{},m={...FF,...f.platform,_c:u};return bF(t,a,{...f,platform:m})};var Jle=typeof document<"u",ece=function(){},Ik=Jle?K:ece;function Tk(t,a){if(t===a)return!0;if(typeof t!==typeof a)return!1;if(typeof t==="function"&&t.toString()===a.toString())return!0;let c,u,f;if(t&&a&&typeof t==="object"){if(Array.isArray(t)){if(c=t.length,c!==a.length)return!1;for(u=c;u--!==0;)if(!Tk(t[u],a[u]))return!1;return!0}if(f=Object.keys(t),c=f.length,c!==Object.keys(a).length)return!1;for(u=c;u--!==0;)if(!{}.hasOwnProperty.call(a,f[u]))return!1;for(u=c;u--!==0;){let m=f[u];if(m==="_owner"&&t.$$typeof)continue;if(!Tk(t[m],a[m]))return!1}return!0}return t!==t&&a!==a}function WF(t){if(typeof window>"u")return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function KF(t,a){let c=WF(t);return Math.round(a*c)/c}function DR(t){let a=i(t);return Ik(()=>{a.current=t}),a}function XF(t){if(t===void 0)t={};let{placement:a="bottom",strategy:c="absolute",middleware:u=[],platform:f,elements:{reference:m,floating:p}={},transform:g=!0,whileElementsMounted:v,open:k}=t,[S,I]=r({x:0,y:0,strategy:c,placement:a,middlewareData:{},isPositioned:!1}),[T,L]=r(u);if(!Tk(T,u))L(u);let[R,A]=r(null),[E,P]=r(null),D=y((Ce)=>{if(Ce!==z.current)z.current=Ce,A(Ce)},[]),N=y((Ce)=>{if(Ce!==B.current)B.current=Ce,P(Ce)},[]),O=m||R,F=p||E,z=i(null),B=i(null),U=i(S),Y=v!=null,G=DR(v),ce=DR(f),re=DR(k),Q=y(()=>{if(!z.current||!B.current)return;let Ce={placement:a,strategy:c,middleware:T};if(ce.current)Ce.platform=ce.current;MR(z.current,B.current,Ce).then((Be)=>{let X={...Be,isPositioned:re.current!==!1};if(ae.current&&!Tk(U.current,X))U.current=X,kd(()=>{I(X)})})},[T,a,c,ce,re]);Ik(()=>{if(k===!1&&U.current.isPositioned)U.current.isPositioned=!1,I((Ce)=>({...Ce,isPositioned:!1}))},[k]);let ae=i(!1);Ik(()=>(ae.current=!0,()=>{ae.current=!1}),[]),Ik(()=>{if(O)z.current=O;if(F)B.current=F;if(O&&F){if(G.current)return G.current(O,F,Q);Q()}},[O,F,Q,G,Y]);let xe=w(()=>({reference:z,floating:B,setReference:D,setFloating:N}),[D,N]),Te=w(()=>({reference:O,floating:F}),[O,F]),me=w(()=>{let Ce={position:c,left:0,top:0};if(!Te.floating)return Ce;let Be=KF(Te.floating,S.x),X=KF(Te.floating,S.y);if(g)return{...Ce,transform:"translate("+Be+"px, "+X+"px)",...WF(Te.floating)>=1.5&&{willChange:"transform"}};return{position:c,left:Be,top:X}},[c,g,Te.floating,S.x,S.y]);return w(()=>({...S,update:Q,refs:xe,elements:Te,floatingStyles:me}),[S,Q,xe,Te,me])}var tce=(t)=>{function a(c){return{}.hasOwnProperty.call(c,"current")}return{name:"arrow",options:t,fn(c){let{element:u,padding:f}=typeof t==="function"?t(c):t;if(u&&a(u)){if(u.current!=null)return AR({element:u.current,padding:f}).fn(c);return{}}if(u)return AR({element:u,padding:f}).fn(c);return{}}}},YF=(t,a)=>{let c=UF(t);return{name:c.name,fn:c.fn,options:[t,a]}},QF=(t,a)=>{let c=qF(t);return{name:c.name,fn:c.fn,options:[t,a]}},ZF=(t,a)=>({fn:$F(t).fn,options:[t,a]}),JF=(t,a)=>{let c=HF(t);return{name:c.name,fn:c.fn,options:[t,a]}},eV=(t,a)=>{let c=jF(t);return{name:c.name,fn:c.fn,options:[t,a]}};var tV=(t,a)=>{let c=GF(t);return{name:c.name,fn:c.fn,options:[t,a]}};var nV=(t,a)=>{let c=tce(t);return{name:c.name,fn:c.fn,options:[t,a]}};var nce=Object.defineProperty,rce=(t,a)=>nce(t,"name",{value:a,configurable:!0}),oce=_e(rce(function(a,c){let{children:u,width:f=10,height:m=5,...p}=a;return e(St.svg,{...p,ref:c,width:f,height:m,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:a.asChild?u:e("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),rV=oce;var ice=Object.defineProperty,sce=(t,a)=>ice(t,"name",{value:a,configurable:!0});function pv(t){let[a,c]=r(void 0);return xn(()=>{if(t){c({width:t.offsetWidth,height:t.offsetHeight});let u=new ResizeObserver((f)=>{if(!Array.isArray(f))return;if(!f.length)return;let m=f[0],p,g;if("borderBoxSize"in m){let v=m.borderBoxSize,k=Array.isArray(v)?v[0]:v;p=k.inlineSize,g=k.blockSize}else p=t.offsetWidth,g=t.offsetHeight;c({width:p,height:g})});return u.observe(t,{box:"border-box"}),()=>u.unobserve(t)}else c(void 0)},[t]),a}sce(pv,"useSize");var lce=Object.defineProperty,Ac=(t,a)=>lce(t,"name",{value:a,configurable:!0});var oV="Popper",[aV,ji]=Vn(oV),[cce,iV]=aV(oV),uce=Ac((t)=>{let{__scopePopper:a,children:c}=t,[u,f]=r(null),[m,p]=r(void 0);return e(cce,{scope:a,anchor:u,onAnchorChange:f,placementState:m,setPlacementState:p,children:c})},"Popper"),dce="PopperAnchor",fce=_e(Ac(function(a,c){let{__scopePopper:u,virtualRef:f,...m}=a,p=iV(dce,u),g=i(null),v=p.onAnchorChange,k=y((A)=>{if(g.current=A,A)v(A)},[v]),S=At(c,k),I=i(null);o(()=>{if(!f)return;let A=I.current;if(I.current=f.current,A!==I.current)v(I.current)});let T=p.placementState&&Lk(p.placementState),L=T?.[0],R=T?.[1];return f?null:e(St.div,{"data-radix-popper-side":L,"data-radix-popper-align":R,...m,ref:S})},"PopperAnchor")),sV="PopperContent",[mce,pce]=aV(sV),hce=_e(Ac(function(a,c){let{__scopePopper:u,side:f="bottom",sideOffset:m=0,align:p="center",alignOffset:g=0,arrowPadding:v=0,avoidCollisions:k=!0,collisionBoundary:S=[],collisionPadding:I=0,sticky:T="partial",hideWhenDetached:L=!1,updatePositionStrategy:R="optimized",onPlaced:A,...E}=a,P=iV(sV,u),[D,N]=r(null),O=At(c,N),[F,z]=r(null),B=pv(F),U=B?.width??0,Y=B?.height??0,G=f+(p!=="center"?"-"+p:""),ce=typeof I==="number"?I:{top:0,right:0,bottom:0,left:0,...I},re=Array.isArray(S)?S:[S],Q=re.length>0,ae={padding:ce,boundary:re.filter(lV),altBoundary:Q},{refs:xe,floatingStyles:Te,placement:me,isPositioned:Ce,middlewareData:Be}=XF({strategy:"fixed",placement:G,whileElementsMounted:Ac((...Ne)=>PR(...Ne,{animationFrame:R==="always"}),"whileElementsMounted"),elements:{reference:P.anchor},middleware:[YF({mainAxis:m+Y,alignmentAxis:g}),k&&QF({mainAxis:!0,crossAxis:!1,limiter:T==="partial"?ZF():void 0,...ae}),k&&JF({...ae}),eV({...ae,apply:Ac(({elements:Ne,rects:ut,availableWidth:kt,availableHeight:It})=>{let{width:Ee,height:nt}=ut.reference,Kt=Ne.floating.style;Kt.setProperty("--radix-popper-available-width",`${kt}px`),Kt.setProperty("--radix-popper-available-height",`${It}px`),Kt.setProperty("--radix-popper-anchor-width",`${Ee}px`),Kt.setProperty("--radix-popper-anchor-height",`${nt}px`)},"apply")}),F&&nV({element:F,padding:v}),bce({arrowWidth:U,arrowHeight:Y}),L&&tV({strategy:"referenceHidden",...ae,boundary:Q?ae.boundary:void 0})]}),X=P.setPlacementState;xn(()=>(X(me),()=>{X(void 0)}),[me,X]);let[He,Le]=Lk(me),J=fo(A);xn(()=>{if(Ce)J?.()},[Ce,J]);let Me=Be.arrow?.x,Ie=Be.arrow?.y,qe=Be.arrow?.centerOffset!==0,[Qe,Re]=r();return xn(()=>{if(D)Re(window.getComputedStyle(D).zIndex)},[D]),e("div",{ref:xe.setFloating,"data-radix-popper-content-wrapper":"",style:{...Te,transform:Ce?Te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Qe,"--radix-popper-transform-origin":[Be.transformOrigin?.x,Be.transformOrigin?.y].join(" "),...Be.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:e(mce,{scope:u,placedSide:He,placedAlign:Le,onArrowChange:z,arrowX:Me,arrowY:Ie,shouldHideArrow:qe,children:e(St.div,{"data-side":He,"data-align":Le,...E,ref:O,style:{...E.style,animation:!Ce?"none":E.style?.animation}})})})},"PopperContent")),gce="PopperArrow",xce={top:"bottom",right:"left",bottom:"top",left:"right"},vce=_e(Ac(function(a,c){let{__scopePopper:u,...f}=a,m=pce(gce,u),p=xce[m.placedSide];return e("span",{ref:m.onArrowChange,style:{position:"absolute",left:m.arrowX,top:m.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[m.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[m.placedSide],visibility:m.shouldHideArrow?"hidden":void 0},children:e(rV,{...f,ref:c,style:{...f.style,display:"block"}})})},"PopperArrow"));function lV(t){return t!==null}Ac(lV,"isNotNull");var bce=Ac((t)=>({name:"transformOrigin",options:t,fn(a){let{placement:c,rects:u,middlewareData:f}=a,p=f.arrow?.centerOffset!==0,g=p?0:t.arrowWidth,v=p?0:t.arrowHeight,[k,S]=Lk(c),I={start:"0%",center:"50%",end:"100%"}[S],T=(f.arrow?.x??0)+g/2,L=(f.arrow?.y??0)+v/2,R="",A="";if(k==="bottom")R=p?I:`${T}px`,A=`${-v}px`;else if(k==="top")R=p?I:`${T}px`,A=`${u.floating.height+v}px`;else if(k==="right")R=`${-v}px`,A=p?I:`${L}px`;else if(k==="left")R=`${u.floating.width+v}px`,A=p?I:`${L}px`;return{data:{x:R,y:A}}}}),"transformOrigin");function Lk(t){let[a,c="center"]=t.split("-");return[a,c]}Ac(Lk,"getSideAndAlignFromPlacement");var Wu=uce,Mc=fce,Xu=hce,hv=vce;var yce=Object.defineProperty,OR=(t,a)=>yce(t,"name",{value:a,configurable:!0}),NR=!1;function cV(){let[t,a]=r(NR);return o(()=>{if(!NR)NR=!0,a(!0)},[]),t}OR(cV,"useIsHydrated");var uV=Ct[" useSyncExternalStore ".trim().toString()];function dV(){return()=>{}}OR(dV,"subscribe");function fV(){return uV(dV,()=>!0,()=>!1)}OR(fV,"useIsHydratedModern");var mV=typeof uV==="function"?fV:cV;var wce=Object.defineProperty,em=(t,a)=>wce(t,"name",{value:a,configurable:!0}),_R="rovingFocusGroup.onEntryFocus",kce={bubbles:!1,cancelable:!0},Ek="RovingFocusGroup",[zR,pV,Sce]=$f(Ek),[Cce,BR]=Vn(Ek,[Sce]),[Ice,Tce]=Cce(Ek),Lce=_e(em(function(a,c){return e(zR.Provider,{scope:a.__scopeRovingFocusGroup,children:e(zR.Slot,{scope:a.__scopeRovingFocusGroup,children:e(Rce,{...a,ref:c})})})},"RovingFocusGroup")),Rce=_e(em(function(a,c){let{__scopeRovingFocusGroup:u,orientation:f,loop:m=!1,dir:p,currentTabStopId:g,defaultCurrentTabStopId:v,onCurrentTabStopIdChange:k,onEntryFocus:S,preventScrollOnEntryFocus:I=!1,...T}=a,L=i(null),R=At(c,L),A=Kf(p),[E,P]=co({prop:g,defaultProp:v??null,onChange:k,caller:Ek}),[D,N]=r(!1),O=fo(S),F=pV(u),z=i(!1),[B,U]=r(0);return o(()=>{let Y=L.current;if(Y)return Y.addEventListener(_R,O),()=>Y.removeEventListener(_R,O)},[O]),e(Ice,{scope:u,orientation:f,dir:A,loop:m,currentTabStopId:E,onItemFocus:y((Y)=>P(Y),[P]),onItemShiftTab:y(()=>N(!0),[]),onFocusableItemAdd:y(()=>U((Y)=>Y+1),[]),onFocusableItemRemove:y(()=>U((Y)=>Y-1),[]),children:e(St.div,{tabIndex:D||B===0?-1:0,"data-orientation":f,...T,ref:R,style:{outline:"none",...a.style},onMouseDown:gt(a.onMouseDown,()=>{z.current=!0}),onFocus:gt(a.onFocus,(Y)=>{let G=!z.current;if(Y.target===Y.currentTarget&&G&&!D){let ce=new CustomEvent(_R,kce);if(Y.currentTarget.dispatchEvent(ce),!ce.defaultPrevented){let re=F().filter((me)=>me.focusable),Q=re.find((me)=>me.active),ae=re.find((me)=>me.id===E),Te=[Q,ae,...re].filter(Boolean).map((me)=>me.ref.current);FR(Te,I)}}z.current=!1}),onBlur:gt(a.onBlur,()=>N(!1))})})},"RovingFocusGroupImpl")),Ece="RovingFocusGroupItem",Pce=_e(em(function(a,c){let{__scopeRovingFocusGroup:u,focusable:f=!0,active:m=!1,tabStopId:p,children:g,...v}=a,k=Dn(),S=p||k,I=Tce(Ece,u),T=I.currentTabStopId===S,L=pV(u),{onFocusableItemAdd:R,onFocusableItemRemove:A,currentTabStopId:E}=I,P=mV();return xn(()=>{if(!P||!f)return;return R(),()=>A()},[P,f,R,A]),o(()=>{if(P||!f)return;return R(),()=>A()},[P,f,R,A]),e(zR.ItemSlot,{scope:u,id:S,focusable:f,active:m,children:e(St.span,{tabIndex:T?0:-1,"data-orientation":I.orientation,...v,ref:c,onMouseDown:gt(a.onMouseDown,(D)=>{if(!f)D.preventDefault();else I.onItemFocus(S)}),onFocus:gt(a.onFocus,()=>I.onItemFocus(S)),onKeyDown:gt(a.onKeyDown,(D)=>{if(D.key==="Tab"&&D.shiftKey){I.onItemShiftTab();return}if(D.target!==D.currentTarget)return;let N=gV(D,I.orientation,I.dir);if(N!==void 0){if(D.metaKey||D.ctrlKey||D.altKey||D.shiftKey)return;D.preventDefault();let F=L().filter((z)=>z.focusable).map((z)=>z.ref.current);if(N==="last")F.reverse();else if(N==="prev"||N==="next"){if(N==="prev")F.reverse();let z=F.indexOf(D.currentTarget);F=I.loop?xV(F,z+1):F.slice(z+1)}setTimeout(()=>FR(F))}}),children:typeof g==="function"?g({isCurrentTabStop:T,hasTabStop:E!=null}):g})})},"RovingFocusGroupItem")),Ace={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hV(t,a){if(a!=="rtl")return t;return t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}em(hV,"getDirectionAwareKey");function gV(t,a,c){let u=hV(t.key,c);if(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(u))return;if(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(u))return;return Ace[u]}em(gV,"getFocusIntent");function FR(t,a=!1){let c=document.activeElement;for(let u of t){if(u===c)return;if(u.focus({preventScroll:a}),document.activeElement!==c)return}}em(FR,"focusFirst");function xV(t,a){return t.map((c,u)=>t[(a+u)%t.length])}em(xV,"wrapArray");var vV=Lce,bV=Pce;var Dce=Object.defineProperty,Nn=(t,a)=>Dce(t,"name",{value:a,configurable:!0}),VR=["Enter"," "],Nce=["ArrowDown","PageUp","Home"],wV=["ArrowUp","PageDown","End"],Oce=[...Nce,...wV],cHn={ltr:[...VR,"ArrowRight"],rtl:[...VR,"ArrowLeft"]};var Ak="Menu",[UR,_ce,zce]=$f(Ak),[tm,HR]=Vn(Ak,[zce,ji,BR]),jR=ji(),kV=BR(),[Bce,gv]=tm(Ak),[Fce,GR]=tm(Ak),Vce=Nn((t)=>{let{__scopeMenu:a,open:c=!1,children:u,dir:f,onOpenChange:m,modal:p=!0}=t,g=jR(a),[v,k]=r(null),S=i(!1),I=fo(m),T=Kf(f);return o(()=>{let L=Nn(()=>{S.current=!0,document.addEventListener("pointerdown",R,{capture:!0,once:!0}),document.addEventListener("pointermove",R,{capture:!0,once:!0})},"handleKeyDown"),R=Nn(()=>S.current=!1,"handlePointer");return document.addEventListener("keydown",L,{capture:!0}),()=>{document.removeEventListener("keydown",L,{capture:!0}),document.removeEventListener("pointerdown",R,{capture:!0}),document.removeEventListener("pointermove",R,{capture:!0})}},[]),o(()=>{if(!c)return;let L=Nn(()=>I(!1),"handleBlur");return window.addEventListener("blur",L),()=>window.removeEventListener("blur",L)},[c,I]),e(Wu,{...g,children:e(Bce,{scope:a,open:c,onOpenChange:I,content:v,onContentChange:k,children:e(Fce,{scope:a,onClose:y(()=>I(!1),[I]),isUsingKeyboardRef:S,dir:T,modal:p,children:u})})})},"Menu"),Uce=_e(Nn(function(a,c){let{__scopeMenu:u,...f}=a,m=jR(u);return e(Mc,{...m,...f,ref:c})},"MenuAnchor")),SV="MenuPortal",[qce,Hce]=tm(SV,{forceMount:void 0}),jce=Nn((t)=>{let{__scopeMenu:a,forceMount:c,children:u,container:f}=t,m=gv(SV,a);return e(qce,{scope:a,forceMount:c,children:e(Lo,{present:c||m.open,children:e(cl,{asChild:!0,container:f,children:u})})})},"MenuPortal"),Yu="MenuContent",[Gce,CV]=tm(Yu),$ce=_e(Nn(function(a,c){let u=Hce(Yu,a.__scopeMenu),{forceMount:f=u.forceMount,...m}=a,p=gv(Yu,a.__scopeMenu),g=GR(Yu,a.__scopeMenu);return e(UR.Provider,{scope:a.__scopeMenu,children:e(Lo,{present:f||p.open,children:e(UR.Slot,{scope:a.__scopeMenu,children:g.modal?e(Kce,{...m,ref:c}):e(Wce,{...m,ref:c})})})})},"MenuContent")),Kce=_e(Nn(function(a,c){let u=gv(Yu,a.__scopeMenu),f=i(null),m=At(c,f);return o(()=>{let p=f.current;if(p)return qu(p)},[]),e(IV,{...a,ref:m,trapFocus:u.open,disableOutsidePointerEvents:u.open,disableOutsideScroll:!0,onFocusOutside:gt(a.onFocusOutside,(p)=>p.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>u.onOpenChange(!1)})},"MenuRootContentModal")),Wce=_e(Nn(function(a,c){let u=gv(Yu,a.__scopeMenu);return e(IV,{...a,ref:c,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>u.onOpenChange(!1)})},"MenuRootContentNonModal")),Xce=uo("MenuContent.ScrollLock"),IV=_e(Nn(function(a,c){let{__scopeMenu:u,loop:f=!1,trapFocus:m,onOpenAutoFocus:p,onCloseAutoFocus:g,disableOutsidePointerEvents:v,onEntryFocus:k,onEscapeKeyDown:S,onPointerDownOutside:I,onFocusOutside:T,onInteractOutside:L,onDismiss:R,disableOutsideScroll:A,...E}=a,P=gv(Yu,u),D=GR(Yu,u),N=jR(u),O=kV(u),F=_ce(u),[z,B]=r(null),U=i(null),Y=At(c,U,P.onContentChange),G=i(0),ce=i(""),re=i(0),Q=i(null),ae=i("right"),xe=i(0),Te=A?Tc:Xe,me=A?{as:Xce,allowPinchZoom:!0}:void 0,Ce=Nn((X)=>{let He=ce.current+X,Le=F().filter((Re)=>!Re.disabled),J=document.activeElement,Me=Le.find((Re)=>Re.ref.current===J)?.textValue,Ie=Le.map((Re)=>Re.textValue),qe=PV(Ie,He,Me),Qe=Le.find((Re)=>Re.textValue===qe)?.ref.current;if(Nn(function Re(Ne){if(ce.current=Ne,window.clearTimeout(G.current),Ne!=="")G.current=window.setTimeout(()=>Re(""),1000)},"updateSearch")(He),Qe)setTimeout(()=>Qe.focus())},"handleTypeaheadSearch");o(()=>()=>window.clearTimeout(G.current),[]),ul();let Be=y((X)=>ae.current===Q.current?.side&&MV(X,Q.current?.area),[]);return e(Gce,{scope:u,searchRef:ce,onItemEnter:y((X)=>{if(Be(X))X.preventDefault()},[Be]),onItemLeave:y((X)=>{if(Be(X))return;U.current?.focus(),B(null)},[Be]),onTriggerLeave:y((X)=>{if(Be(X))X.preventDefault()},[Be]),pointerGraceTimerRef:re,onPointerGraceIntentChange:y((X)=>{Q.current=X},[]),children:e(Te,{...me,children:e(Uu,{asChild:!0,trapped:m,onMountAutoFocus:gt(p,(X)=>{X.preventDefault(),U.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:g,children:e(ll,{asChild:!0,disableOutsidePointerEvents:v,onEscapeKeyDown:S,onPointerDownOutside:I,onFocusOutside:T,onInteractOutside:L,onDismiss:R,children:e(vV,{asChild:!0,...O,dir:D.dir,orientation:"vertical",loop:f,currentTabStopId:z,onCurrentTabStopIdChange:B,onEntryFocus:gt(k,(X)=>{if(!D.isUsingKeyboardRef.current)X.preventDefault()}),preventScrollOnEntryFocus:!0,children:e(Xu,{role:"menu","aria-orientation":"vertical","data-state":TV(P.open),"data-radix-menu-content":"",dir:D.dir,...N,...E,ref:Y,style:{outline:"none",...E.style},onKeyDown:gt(E.onKeyDown,(X)=>{let Le=X.target.closest("[data-radix-menu-content]")===X.currentTarget,J=X.ctrlKey||X.altKey||X.metaKey,Me=X.key.length===1;if(Le){if(X.key==="Tab")X.preventDefault();if(!J&&Me)Ce(X.key)}let Ie=U.current;if(X.target!==Ie)return;if(!Oce.includes(X.key))return;X.preventDefault();let Qe=F().filter((Re)=>!Re.disabled).map((Re)=>Re.ref.current);if(wV.includes(X.key))Qe.reverse();RV(Qe)}),onBlur:gt(a.onBlur,(X)=>{if(!X.currentTarget.contains(X.target))window.clearTimeout(G.current),ce.current=""}),onPointerMove:gt(a.onPointerMove,Pk((X)=>{let He=X.target,Le=xe.current!==X.clientX;if(X.currentTarget.contains(He)&&Le){let J=X.clientX>xe.current?"right":"left";ae.current=J,xe.current=X.clientX}}))})})})})})})},"MenuContentImpl")),Yce=_e(Nn(function(a,c){let{__scopeMenu:u,...f}=a;return e(St.div,{role:"group",...f,ref:c})},"MenuGroup")),Qce=_e(Nn(function(a,c){let{__scopeMenu:u,...f}=a;return e(St.div,{...f,ref:c})},"MenuLabel")),qR="MenuItem",yV="menu.itemSelect",Zce=_e(Nn(function(a,c){let{disabled:u=!1,onSelect:f,...m}=a,p=i(null),g=GR(qR,a.__scopeMenu),v=CV(qR,a.__scopeMenu),k=At(c,p),S=i(!1),I=Nn(()=>{let T=p.current;if(!u&&T){let L=new CustomEvent(yV,{bubbles:!0,cancelable:!0});if(T.addEventListener(yV,(R)=>f?.(R),{once:!0}),rv(T,L),L.defaultPrevented)S.current=!1;else g.onClose()}},"handleSelect");return e(Jce,{...m,ref:k,disabled:u,onClick:gt(a.onClick,I),onPointerDown:(T)=>{a.onPointerDown?.(T),S.current=!0},onPointerUp:gt(a.onPointerUp,(T)=>{if(!S.current)T.currentTarget?.click()}),onKeyDown:gt(a.onKeyDown,(T)=>{if(u||T.target!==T.currentTarget)return;if(v.searchRef.current!==""&&T.key===" ")return;if(VR.includes(T.key))T.currentTarget.click(),T.preventDefault()})})},"MenuItem")),Jce=_e(Nn(function(a,c){let{__scopeMenu:u,disabled:f=!1,textValue:m,...p}=a,g=CV(qR,u),v=kV(u),k=i(null),S=At(c,k),[I,T]=r(!1),[L,R]=r("");return o(()=>{let A=k.current;if(A)R((A.textContent??"").trim())},[p.children]),e(UR.ItemSlot,{scope:u,disabled:f,textValue:m??L,children:e(bV,{asChild:!0,...v,focusable:!f,children:e(St.div,{role:"menuitem","data-highlighted":I?"":void 0,"aria-disabled":f||void 0,"data-disabled":f?"":void 0,...p,ref:S,onPointerMove:gt(a.onPointerMove,Pk((A)=>{if(f)g.onItemLeave(A);else if(g.onItemEnter(A),!A.defaultPrevented)A.currentTarget.focus({preventScroll:!0})})),onPointerLeave:gt(a.onPointerLeave,Pk((A)=>g.onItemLeave(A))),onFocus:gt(a.onFocus,()=>T(!0)),onBlur:gt(a.onBlur,()=>T(!1))})})})},"MenuItemImpl"));var eue="MenuRadioGroup",[uHn,dHn]=tm(eue,{value:void 0,onValueChange:Nn(()=>{},"onValueChange")});var tue="MenuItemIndicator",[fHn,mHn]=tm(tue,{checked:!1});var nue=_e(Nn(function(a,c){let{__scopeMenu:u,...f}=a;return e(St.div,{role:"separator","aria-orientation":"horizontal",...f,ref:c})},"MenuSeparator"));var rue="MenuSub",[pHn,hHn]=tm(rue);function TV(t){return t?"open":"closed"}Nn(TV,"getOpenState");function LV(t){return t==="indeterminate"}Nn(LV,"isIndeterminate");function oue(t){return LV(t)?"indeterminate":t?"checked":"unchecked"}Nn(oue,"getCheckedState");function RV(t){let a=document.activeElement;for(let c of t){if(c===a)return;if(c.focus(),document.activeElement!==a)return}}Nn(RV,"focusFirst");function EV(t,a){return t.map((c,u)=>t[(a+u)%t.length])}Nn(EV,"wrapArray");function PV(t,a,c){let f=a.length>1&&Array.from(a).every((k)=>k===a[0])?a[0]:a,m=c?t.indexOf(c):-1,p=EV(t,Math.max(m,0));if(f.length===1)p=p.filter((k)=>k!==c);let v=p.find((k)=>k.toLowerCase().startsWith(f.toLowerCase()));return v!==c?v:void 0}Nn(PV,"getNextMatch");function AV(t,a){let{x:c,y:u}=t,f=!1;for(let m=0,p=a.length-1;m<a.length;p=m++){let g=a[m],v=a[p],{x:k,y:S}=g,{x:I,y:T}=v;if(S>u!==T>u&&c<(I-k)*(u-S)/(T-S)+k)f=!f}return f}Nn(AV,"isPointInPolygon");function MV(t,a){if(!a)return!1;let c={x:t.clientX,y:t.clientY};return AV(c,a)}Nn(MV,"isPointerInGraceArea");function Pk(t){return(a)=>a.pointerType==="mouse"?t(a):void 0}Nn(Pk,"whenMouse");var DV=Vce,NV=Uce,OV=jce,_V=$ce,zV=Yce,BV=Qce,FV=Zce;var VV=nue;var iue=Object.defineProperty,Qu=(t,a)=>iue(t,"name",{value:a,configurable:!0}),$R="DropdownMenu",[sue,MHn]=Vn($R,[HR]),Zu=HR(),[lue,UV]=sue($R),cue=Qu((t)=>{let{__scopeDropdownMenu:a,children:c,dir:u,open:f,defaultOpen:m,onOpenChange:p,modal:g=!0}=t,v=Zu(a),k=i(null),[S,I]=co({prop:f,defaultProp:m??!1,onChange:p,caller:$R});return e(lue,{scope:a,triggerId:Dn(),triggerRef:k,contentId:Dn(),open:S,onOpenChange:I,onOpenToggle:y(()=>I((T)=>!T),[I]),modal:g,children:e(DV,{...v,open:S,onOpenChange:I,dir:u,modal:g,children:c})})},"DropdownMenu"),uue="DropdownMenuTrigger",due=_e(Qu(function(a,c){let{__scopeDropdownMenu:u,disabled:f=!1,...m}=a,p=UV(uue,u),g=Zu(u),v=At(c,p.triggerRef);return e(NV,{asChild:!0,...g,children:e(St.button,{type:"button",id:p.triggerId,"aria-haspopup":"menu","aria-expanded":p.open,"aria-controls":p.open?p.contentId:void 0,"data-state":p.open?"open":"closed","data-disabled":f?"":void 0,disabled:f,...m,ref:v,onPointerDown:gt(a.onPointerDown,(k)=>{if(!f&&k.button===0&&k.ctrlKey===!1){if(p.onOpenToggle(),!p.open)k.preventDefault()}}),onKeyDown:gt(a.onKeyDown,(k)=>{if(f)return;if(["Enter"," "].includes(k.key))p.onOpenToggle();if(k.key==="ArrowDown")p.onOpenChange(!0);if(["Enter"," ","ArrowDown"].includes(k.key))k.preventDefault()})})})},"DropdownMenuTrigger")),fue=Qu((t)=>{let{__scopeDropdownMenu:a,...c}=t,u=Zu(a);return e(OV,{...u,...c})},"DropdownMenuPortal"),mue="DropdownMenuContent",pue=_e(Qu(function(a,c){let{__scopeDropdownMenu:u,...f}=a,m=UV(mue,u),p=Zu(u),g=i(!1);return e(_V,{id:m.contentId,"aria-labelledby":m.triggerId,...p,...f,ref:c,onCloseAutoFocus:gt(a.onCloseAutoFocus,(v)=>{if(!g.current)m.triggerRef.current?.focus();g.current=!1,v.preventDefault()}),onInteractOutside:gt(a.onInteractOutside,(v)=>{let k=v.detail.originalEvent,S=k.button===0&&k.ctrlKey===!0,I=k.button===2||S;if(!m.modal||I)g.current=!0}),style:{...a.style,...{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}})},"DropdownMenuContent")),hue=_e(Qu(function(a,c){let{__scopeDropdownMenu:u,...f}=a,m=Zu(u);return e(zV,{...m,...f,ref:c})},"DropdownMenuGroup")),gue=_e(Qu(function(a,c){let{__scopeDropdownMenu:u,...f}=a,m=Zu(u);return e(BV,{...m,...f,ref:c})},"DropdownMenuLabel")),xue=_e(Qu(function(a,c){let{__scopeDropdownMenu:u,...f}=a,m=Zu(u);return e(FV,{...m,...f,ref:c})},"DropdownMenuItem"));var vue=_e(Qu(function(a,c){let{__scopeDropdownMenu:u,...f}=a,m=Zu(u);return e(VV,{...m,...f,ref:c})},"DropdownMenuSeparator"));var bue=cue,yue=due,wue=fue,kue=pue,Sue=hue,Cue=gue,qV=xue;var Iue=vue;var Tue=Object.defineProperty,Lue=(t,a)=>Tue(t,"name",{value:a,configurable:!0}),Rue=_e(Lue(function(a,c){return e(St.label,{...a,ref:c,onMouseDown:(u)=>{if(u.target.closest("button, input, select, textarea"))return;if(a.onMouseDown?.(u),!u.defaultPrevented&&u.detail>1)u.preventDefault()}})},"Label")),Eue=Rue;var Pue=Object.defineProperty,hl=(t,a)=>Pue(t,"name",{value:a,configurable:!0}),KR="Popover",[GV,QHn]=Vn(KR,[ji]),vv=ji(),[Aue,nm]=GV(KR),Mue=hl((t)=>{let{__scopePopover:a,children:c,open:u,defaultOpen:f,onOpenChange:m,modal:p=!1}=t,g=vv(a),v=i(null),[k,S]=r(!1),[I,T]=co({prop:u,defaultProp:f??!1,onChange:m,caller:KR});return e(Wu,{...g,children:e(Aue,{scope:a,contentId:Dn(),triggerRef:v,open:I,onOpenChange:T,onOpenToggle:y(()=>T((L)=>!L),[T]),hasCustomAnchor:k,onCustomAnchorAdd:y(()=>S(!0),[]),onCustomAnchorRemove:y(()=>S(!1),[]),modal:p,children:c})})},"Popover"),Due="PopoverAnchor",Nue=_e(hl(function(a,c){let{__scopePopover:u,...f}=a,m=nm(Due,u),p=vv(u),{onCustomAnchorAdd:g,onCustomAnchorRemove:v}=m;return o(()=>(g(),()=>v()),[g,v]),e(Mc,{...p,...f,ref:c})},"PopoverAnchor")),Oue="PopoverTrigger",_ue=_e(hl(function(a,c){let{__scopePopover:u,...f}=a,m=nm(Oue,u),p=vv(u),g=At(c,m.triggerRef),v=e(St.button,{type:"button","aria-haspopup":"dialog","aria-expanded":m.open,"aria-controls":m.open?m.contentId:void 0,"data-state":WR(m.open),...f,ref:g,onClick:gt(a.onClick,m.onOpenToggle)});return m.hasCustomAnchor?v:e(Mc,{asChild:!0,...p,children:v})},"PopoverTrigger")),$V="PopoverPortal",[zue,Bue]=GV($V,{forceMount:void 0}),Fue=hl((t)=>{let{__scopePopover:a,forceMount:c,children:u,container:f}=t,m=nm($V,a);return e(zue,{scope:a,forceMount:c,children:e(Lo,{present:c||m.open,children:e(cl,{asChild:!0,container:f,children:u})})})},"PopoverPortal"),xv="PopoverContent",Vue=_e(hl(function(a,c){let u=Bue(xv,a.__scopePopover),{forceMount:f=u.forceMount,...m}=a,p=nm(xv,a.__scopePopover);return e(Lo,{present:f||p.open,children:p.modal?e(que,{...m,ref:c}):e(Hue,{...m,ref:c})})},"PopoverContent")),Uue=uo("PopoverContent.RemoveScroll"),que=_e(hl(function(a,c){let u=nm(xv,a.__scopePopover),f=i(null),m=At(c,f),p=i(!1);return o(()=>{let g=f.current;if(g)return qu(g)},[]),e(Tc,{as:Uue,allowPinchZoom:!0,children:e(KV,{...a,ref:m,trapFocus:u.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gt(a.onCloseAutoFocus,(g)=>{if(g.preventDefault(),!p.current)u.triggerRef.current?.focus()}),onPointerDownOutside:gt(a.onPointerDownOutside,(g)=>{let v=g.detail.originalEvent,k=v.button===0&&v.ctrlKey===!0,S=v.button===2||k;p.current=S},{checkForDefaultPrevented:!1}),onFocusOutside:gt(a.onFocusOutside,(g)=>g.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),Hue=_e(hl(function(a,c){let u=nm(xv,a.__scopePopover),f=i(!1),m=i(!1);return e(KV,{...a,ref:c,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:(p)=>{if(a.onCloseAutoFocus?.(p),!p.defaultPrevented){if(!f.current)u.triggerRef.current?.focus();p.preventDefault()}f.current=!1,m.current=!1},onInteractOutside:(p)=>{if(a.onInteractOutside?.(p),!p.defaultPrevented){if(f.current=!0,p.detail.originalEvent.type==="pointerdown")m.current=!0}let g=p.target;if(u.triggerRef.current?.contains(g))p.preventDefault();if(p.detail.originalEvent.type==="focusin"&&m.current)p.preventDefault()}})},"PopoverContentNonModal")),KV=_e(hl(function(a,c){let{__scopePopover:u,trapFocus:f,onOpenAutoFocus:m,onCloseAutoFocus:p,disableOutsidePointerEvents:g,onEscapeKeyDown:v,onPointerDownOutside:k,onFocusOutside:S,onInteractOutside:I,...T}=a,L=nm(xv,u),R=vv(u);return ul(),e(Uu,{asChild:!0,loop:!0,trapped:f,onMountAutoFocus:m,onUnmountAutoFocus:p,children:e(ll,{asChild:!0,disableOutsidePointerEvents:g,onInteractOutside:I,onEscapeKeyDown:v,onPointerDownOutside:k,onFocusOutside:S,onDismiss:()=>L.onOpenChange(!1),deferPointerDownOutside:!0,children:e(Xu,{"data-state":WR(L.open),role:"dialog",id:L.contentId,...R,...T,ref:c,style:{...T.style,...{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}})})})},"PopoverContentImpl"));var jue=_e(hl(function(a,c){let{__scopePopover:u,...f}=a,m=vv(u);return e(hv,{...m,...f,ref:c})},"PopoverArrow"));function WR(t){return t?"open":"closed"}hl(WR,"getState");var WV=Mue,Gue=Nue,$ue=_ue,XV=Fue,YV=Vue;var Kue=jue;var Wue=Object.defineProperty,Xue=(t,a)=>Wue(t,"name",{value:a,configurable:!0});function Mk(t,[a,c]){return Math.min(c,Math.max(a,t))}Xue(Mk,"clamp");var Yue=Object.defineProperty,Que=(t,a)=>Yue(t,"name",{value:a,configurable:!0});function YR(t){let a=i({value:t,previous:t});return w(()=>{if(a.current.value!==t)a.current.previous=a.current.value,a.current.value=t;return a.current.previous},[t])}Que(YR,"usePrevious");var Zue=Object.defineProperty,Jue=(t,a)=>Zue(t,"name",{value:a,configurable:!0}),QR=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ede=_e(Jue(function(a,c){return e(St.span,{...a,ref:c,style:{...QR,...a.style}})},"VisuallyHidden")),QV=ede;var nde=Object.defineProperty,Sn=(t,a)=>nde(t,"name",{value:a,configurable:!0}),rde=[" ","Enter","ArrowUp","ArrowDown"],ode=[" ","Enter"],vh="Select",[Nk,JR,ade]=$f(vh),[om,Ijn]=Vn(vh,[ade,ji]),eE=ji(),[ide,Ju]=om(vh),[sde,lde]=om(vh);function eU(t){let{__scopeSelect:a,children:c,open:u,defaultOpen:f,onOpenChange:m,value:p,defaultValue:g,onValueChange:v,dir:k,name:S,autoComplete:I,disabled:T,required:L,form:R,internal_do_not_use_render:A}=t,E=eE(a),[P,D]=r(null),[N,O]=r(null),[F,z]=r(!1),B=Kf(k),[U,Y]=co({prop:u,defaultProp:f??!1,onChange:m,caller:vh}),[G,ce]=co({prop:p,defaultProp:g,onChange:v,caller:vh}),re=i(null),Q=i(G);o(()=>{let Le=R?P?.ownerDocument.getElementById(R):P?.form;if(Le instanceof HTMLFormElement){let J=Sn(()=>ce(Q.current),"reset");return Le.addEventListener("reset",J),()=>Le.removeEventListener("reset",J)}},[R,P,ce]);let ae=P?!!R||!!P.closest("form"):!0,[xe,Te]=r(new Set),me=Dn(),Ce=Array.from(xe).map((Le)=>Le.props.value).join(";"),Be=y((Le)=>{Te((J)=>new Set(J).add(Le))},[]),X=y((Le)=>{Te((J)=>{let Me=new Set(J);return Me.delete(Le),Me})},[]),He={required:L,trigger:P,onTriggerChange:D,valueNode:N,onValueNodeChange:O,valueNodeHasChildren:F,onValueNodeHasChildrenChange:z,contentId:me,value:G,onValueChange:ce,open:U,onOpenChange:Y,dir:B,triggerPointerDownPosRef:re,disabled:T,name:S,autoComplete:I,form:R,nativeOptions:xe,nativeSelectKey:Ce,isFormControl:ae};return e(Wu,{...E,children:e(ide,{scope:a,...He,children:e(Nk.Provider,{scope:a,children:e(sde,{scope:a,onNativeOptionAdd:Be,onNativeOptionRemove:X,children:rU(A)?A(He):c})})})})}Sn(eU,"SelectProvider");var cde=Sn((t)=>{let{__scopeSelect:a,children:c,...u}=t;return e(eU,{__scopeSelect:a,...u,internal_do_not_use_render:({isFormControl:f})=>n(h,{children:[c,f?e(Vde,{__scopeSelect:a}):null]})})},"Select"),ude="SelectTrigger",dde=_e(Sn(function(a,c){let{__scopeSelect:u,disabled:f=!1,...m}=a,p=eE(u),g=Ju(ude,u),v=g.disabled||f,k=At(c,g.onTriggerChange),S=JR(u),I=i("touch"),[T,L,R]=tE((E)=>{let P=S().filter((O)=>!O.disabled),D=P.find((O)=>O.value===g.value),N=nE(P,E,D);if(N!==void 0)g.onValueChange(N.value)}),A=Sn((E)=>{if(!v)g.onOpenChange(!0),R();if(E)g.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)}},"handleOpen");return e(Mc,{asChild:!0,...p,children:e(St.button,{type:"button",role:"combobox","aria-controls":g.open?g.contentId:void 0,"aria-expanded":g.open,"aria-required":g.required,"aria-autocomplete":"none",dir:g.dir,"data-state":g.open?"open":"closed",disabled:v,"data-disabled":v?"":void 0,"data-placeholder":bv(g.value)?"":void 0,...m,ref:k,onClick:gt(m.onClick,(E)=>{if(E.currentTarget.focus(),I.current!=="mouse")A(E)}),onPointerDown:gt(m.onPointerDown,(E)=>{I.current=E.pointerType;let P=E.target;if(P.hasPointerCapture(E.pointerId))P.releasePointerCapture(E.pointerId);if(E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse")A(E),E.preventDefault()}),onKeyDown:gt(m.onKeyDown,(E)=>{let P=T.current!=="";if(!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1)L(E.key);if(P&&E.key===" ")return;if(rde.includes(E.key))A(),E.preventDefault()})})})},"SelectTrigger")),fde="SelectValue",mde=_e(Sn(function(a,c){let{__scopeSelect:u,className:f,style:m,children:p,placeholder:g="",...v}=a,k=Ju(fde,u),{onValueNodeHasChildrenChange:S}=k,I=p!==void 0,T=At(c,k.onValueNodeChange);xn(()=>{S(I)},[S,I]);let L=bv(k.value);return e(St.span,{...v,asChild:L?!1:v.asChild,ref:T,style:{pointerEvents:"none"},children:e(Xe,{children:L?g:p},L?"placeholder":"value")})},"SelectValue")),pde=_e(Sn(function(a,c){let{__scopeSelect:u,children:f,...m}=a;return e(St.span,{"aria-hidden":!0,...m,ref:c,children:f||"▼"})},"SelectIcon")),hde="SelectPortal",[gde,xde]=om(hde,{forceMount:void 0}),vde=Sn((t)=>{let{__scopeSelect:a,forceMount:c,...u}=t;return e(gde,{scope:t.__scopeSelect,forceMount:c,children:e(cl,{asChild:!0,...u})})},"SelectPortal"),rm="SelectContent",bde=_e(Sn(function(a,c){let u=xde(rm,a.__scopeSelect),{forceMount:f=u.forceMount,...m}=a,p=Ju(rm,a.__scopeSelect),[g,v]=r();return xn(()=>{v(new DocumentFragment)},[]),e(Lo,{present:f||p.open,children:({present:k})=>k?e(kde,{...m,ref:c}):e(yde,{...m,fragment:g})})},"SelectContent")),yde=_e(Sn(function(a,c){let{__scopeSelect:u,children:f,fragment:m}=a;if(!m)return null;return Vt(e(tU,{scope:u,children:e(Nk.Slot,{scope:u,children:e("div",{ref:c,children:f})})}),m)},"SelectContentFragment")),Cs=10,[tU,Ok]=om(rm),wde=uo("SelectContent.RemoveScroll"),kde=_e(Sn(function(a,c){let{__scopeSelect:u}=a,{position:f="item-aligned",onCloseAutoFocus:m,onEscapeKeyDown:p,onPointerDownOutside:g,side:v,sideOffset:k,align:S,alignOffset:I,arrowPadding:T,collisionBoundary:L,collisionPadding:R,sticky:A,hideWhenDetached:E,avoidCollisions:P,...D}=a,N=Ju(rm,u),[O,F]=r(null),[z,B]=r(null),U=At(c,F),[Y,G]=r(null),[ce,re]=r(null),Q=JR(u),[ae,xe]=r(!1),Te=i(!1);o(()=>{if(O)return qu(O)},[O]),ul();let me=y((Re)=>{let[Ne,...ut]=Q().map((Ee)=>Ee.ref.current),[kt]=ut.slice(-1),It=document.activeElement;for(let Ee of Re){if(Ee===It)return;if(Ee?.scrollIntoView({block:"nearest"}),Ee===Ne&&z)z.scrollTop=0;if(Ee===kt&&z)z.scrollTop=z.scrollHeight;if(Ee?.focus(),document.activeElement!==It)return}},[Q,z]),Ce=y(()=>me([Y,O]),[me,Y,O]);o(()=>{if(ae)Ce()},[ae,Ce]);let{onOpenChange:Be,triggerPointerDownPosRef:X}=N;o(()=>{if(O){let Re={x:0,y:0},Ne=Sn((kt)=>{Re={x:Math.abs(Math.round(kt.pageX)-(X.current?.x??0)),y:Math.abs(Math.round(kt.pageY)-(X.current?.y??0))}},"handlePointerMove"),ut=Sn((kt)=>{if(Re.x<=10&&Re.y<=10)kt.preventDefault();else if(!kt.composedPath().includes(O))Be(!1);document.removeEventListener("pointermove",Ne),X.current=null},"handlePointerUp");if(X.current!==null)document.addEventListener("pointermove",Ne),document.addEventListener("pointerup",ut,{capture:!0,once:!0});return()=>{document.removeEventListener("pointermove",Ne),document.removeEventListener("pointerup",ut,{capture:!0})}}},[O,Be,X]),o(()=>{let Re=Sn(()=>Be(!1),"close");return window.addEventListener("blur",Re),window.addEventListener("resize",Re),()=>{window.removeEventListener("blur",Re),window.removeEventListener("resize",Re)}},[Be]);let[He,Le]=tE((Re)=>{let Ne=Q().filter((It)=>!It.disabled),ut=Ne.find((It)=>It.ref.current===document.activeElement),kt=nE(Ne,Re,ut);if(kt)setTimeout(()=>kt.ref.current?.focus())}),J=y((Re,Ne,ut)=>{let kt=!Te.current&&!ut;if(N.value!==void 0&&N.value===Ne||kt){if(G(Re),kt)Te.current=!0}},[N.value]),Me=y(()=>O?.focus(),[O]),Ie=y((Re,Ne,ut)=>{let kt=!Te.current&&!ut;if(N.value!==void 0&&N.value===Ne||kt)re(Re)},[N.value]),qe=f==="popper"?ZV:Sde,Qe=qe===ZV?{side:v,sideOffset:k,align:S,alignOffset:I,arrowPadding:T,collisionBoundary:L,collisionPadding:R,sticky:A,hideWhenDetached:E,avoidCollisions:P}:{};return e(tU,{scope:u,content:O,viewport:z,onViewportChange:B,itemRefCallback:J,selectedItem:Y,onItemLeave:Me,itemTextRefCallback:Ie,focusSelectedItem:Ce,selectedItemText:ce,position:f,isPositioned:ae,searchRef:He,children:e(Tc,{as:wde,allowPinchZoom:!0,children:e(Uu,{asChild:!0,trapped:N.open,onMountAutoFocus:(Re)=>{Re.preventDefault()},onUnmountAutoFocus:gt(m,(Re)=>{N.trigger?.focus({preventScroll:!0}),Re.preventDefault()}),children:e(ll,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:p,onPointerDownOutside:g,onFocusOutside:(Re)=>Re.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:e(qe,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:(Re)=>Re.preventDefault(),...D,...Qe,onPlaced:()=>xe(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...D.style},onKeyDown:gt(D.onKeyDown,(Re)=>{let Ne=Re.ctrlKey||Re.altKey||Re.metaKey;if(Re.key==="Tab")Re.preventDefault();if(!Ne&&Re.key.length===1)Le(Re.key);if(["ArrowUp","ArrowDown","Home","End"].includes(Re.key)){let kt=Q().filter((It)=>!It.disabled).map((It)=>It.ref.current);if(["ArrowUp","End"].includes(Re.key))kt=kt.slice().reverse();if(["ArrowUp","ArrowDown"].includes(Re.key)){let It=Re.target,Ee=kt.indexOf(It);kt=kt.slice(Ee+1)}setTimeout(()=>me(kt)),Re.preventDefault()}})})})})})})},"SelectContentImpl")),Sde=_e(Sn(function(a,c){let{__scopeSelect:u,onPlaced:f,...m}=a,p=Ju(rm,u),g=Ok(rm,u),[v,k]=r(null),[S,I]=r(null),T=At(c,I),L=JR(u),R=i(!1),A=i(!0),{viewport:E,selectedItem:P,selectedItemText:D,focusSelectedItem:N}=g,O=y(()=>{if(p.trigger&&p.valueNode&&v&&S&&E&&P&&D){let U=p.trigger.getBoundingClientRect(),Y=S.getBoundingClientRect(),G=p.valueNode.getBoundingClientRect(),ce=D.getBoundingClientRect();if(p.dir!=="rtl"){let It=ce.left-Y.left,Ee=G.left-It,nt=U.left-Ee,Kt=U.width+nt,an=Math.max(Kt,Y.width),mn=window.innerWidth-Cs,br=Mk(Ee,[Cs,Math.max(Cs,mn-an)]);v.style.minWidth=Kt+"px",v.style.left=br+"px"}else{let It=Y.right-ce.right,Ee=window.innerWidth-G.right-It,nt=window.innerWidth-U.right-Ee,Kt=U.width+nt,an=Math.max(Kt,Y.width),mn=window.innerWidth-Cs,br=Mk(Ee,[Cs,Math.max(Cs,mn-an)]);v.style.minWidth=Kt+"px",v.style.right=br+"px"}let re=L(),Q=window.innerHeight-Cs*2,ae=E.scrollHeight,xe=window.getComputedStyle(S),Te=parseInt(xe.borderTopWidth,10),me=parseInt(xe.paddingTop,10),Ce=parseInt(xe.borderBottomWidth,10),Be=parseInt(xe.paddingBottom,10),X=Te+me+ae+Be+Ce,He=Math.min(P.offsetHeight*5,X),Le=window.getComputedStyle(E),J=parseInt(Le.paddingTop,10),Me=parseInt(Le.paddingBottom,10),Ie=U.top+U.height/2-Cs,qe=Q-Ie,Qe=P.offsetHeight/2,Re=P.offsetTop+Qe,Ne=Te+me+Re,ut=X-Ne;if(Ne<=Ie){let It=re.length>0&&P===re[re.length-1].ref.current;v.style.bottom="0px";let Ee=S.clientHeight-E.offsetTop-E.offsetHeight,nt=Math.max(qe,Qe+(It?Me:0)+Ee+Ce),Kt=Ne+nt;v.style.height=Kt+"px"}else{let It=re.length>0&&P===re[0].ref.current;v.style.top="0px";let nt=Math.max(Ie,Te+E.offsetTop+(It?J:0)+Qe)+ut;v.style.height=nt+"px",E.scrollTop=Ne-Ie+E.offsetTop}v.style.margin=`${Cs}px 0`,v.style.minHeight=He+"px",v.style.maxHeight=Q+"px",f?.(),requestAnimationFrame(()=>R.current=!0)}},[L,p.trigger,p.valueNode,v,S,E,P,D,p.dir,f]);xn(()=>O(),[O]);let[F,z]=r();xn(()=>{if(S)z(window.getComputedStyle(S).zIndex)},[S]);let B=y((U)=>{if(U&&A.current===!0)O(),N?.(),A.current=!1},[O,N]);return e(Cde,{scope:u,contentWrapper:v,shouldExpandOnScrollRef:R,onScrollButtonChange:B,children:e("div",{ref:k,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:e(St.div,{...m,ref:T,style:{boxSizing:"border-box",maxHeight:"100%",...m.style}})})})},"SelectItemAlignedPosition")),ZV=_e(Sn(function(a,c){let{__scopeSelect:u,align:f="start",collisionPadding:m=Cs,...p}=a,g=eE(u);return e(Xu,{...g,...p,ref:c,align:f,collisionPadding:m,style:{boxSizing:"border-box",...p.style,...{"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}})},"SelectPopperPosition")),[Cde,Ide]=om(rm,{}),JV="SelectViewport",Tde=_e(Sn(function(a,c){let{__scopeSelect:u,nonce:f,...m}=a,p=Ok(JV,u),g=Ide(JV,u),v=At(c,p.onViewportChange),k=i(0);return n(h,{children:[e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:f}),e(Nk.Slot,{scope:u,children:e(St.div,{"data-radix-select-viewport":"",role:"presentation",...m,ref:v,style:{position:"relative",flex:1,overflow:"hidden auto",...m.style},onScroll:gt(m.onScroll,(S)=>{let I=S.currentTarget,{contentWrapper:T,shouldExpandOnScrollRef:L}=g;if(L?.current&&T){let R=Math.abs(k.current-I.scrollTop);if(R>0){let A=window.innerHeight-Cs*2,E=parseFloat(T.style.minHeight),P=parseFloat(T.style.height),D=Math.max(E,P);if(D<A){let N=D+R,O=Math.min(A,N),F=N-O;if(T.style.height=O+"px",T.style.bottom==="0px")I.scrollTop=F>0?F:0,T.style.justifyContent="flex-end"}}}k.current=I.scrollTop})})})]})},"SelectViewport")),Lde="SelectGroup",[Rde,Ede]=om(Lde),Pde=_e(Sn(function(a,c){let{__scopeSelect:u,...f}=a,m=Dn();return e(Rde,{scope:u,id:m,children:e(St.div,{role:"group","aria-labelledby":m,...f,ref:c})})},"SelectGroup")),Ade="SelectLabel",Mde=_e(Sn(function(a,c){let{__scopeSelect:u,...f}=a,m=Ede(Ade,u);return e(St.div,{id:m.id,...f,ref:c})},"SelectLabel")),ZR="SelectItem",[Dde,nU]=om(ZR),Nde=_e(Sn(function(a,c){let{__scopeSelect:u,value:f,disabled:m=!1,textValue:p,...g}=a,v=Ju(ZR,u),k=Ok(ZR,u),S=v.value===f,[I,T]=r(p??""),[L,R]=r(!1),A=fo((O)=>k.itemRefCallback?.(O,f,m)),E=At(c,A),P=Dn(),D=i("touch"),N=Sn(()=>{if(!m)v.onValueChange(f),v.onOpenChange(!1)},"handleSelect");return e(Dde,{scope:u,value:f,disabled:m,textId:P,isSelected:S,onItemTextChange:y((O)=>{T((F)=>F||(O?.textContent??"").trim())},[]),children:e(Nk.ItemSlot,{scope:u,value:f,disabled:m,textValue:I,children:e(St.div,{role:"option","aria-labelledby":P,"data-highlighted":L?"":void 0,"aria-selected":S&&L,"data-state":S?"checked":"unchecked","aria-disabled":m||void 0,"data-disabled":m?"":void 0,tabIndex:m?void 0:-1,...g,ref:E,onFocus:gt(g.onFocus,()=>R(!0)),onBlur:gt(g.onBlur,()=>R(!1)),onClick:gt(g.onClick,()=>{if(D.current!=="mouse")N()}),onPointerUp:gt(g.onPointerUp,()=>{if(D.current==="mouse")N()}),onPointerDown:gt(g.onPointerDown,(O)=>{D.current=O.pointerType}),onPointerMove:gt(g.onPointerMove,(O)=>{if(D.current=O.pointerType,m)k.onItemLeave?.();else if(D.current==="mouse")O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:gt(g.onPointerLeave,(O)=>{if(O.currentTarget===document.activeElement)k.onItemLeave?.()}),onKeyDown:gt(g.onKeyDown,(O)=>{if(m||O.target!==O.currentTarget)return;if(k.searchRef?.current!==""&&O.key===" ")return;if(ode.includes(O.key))N();if(O.key===" ")O.preventDefault()})})})})},"SelectItem")),Dk="SelectItemText",Ode=_e(Sn(function(a,c){let{__scopeSelect:u,className:f,style:m,...p}=a,g=Ju(Dk,u),v=Ok(Dk,u),k=nU(Dk,u),S=lde(Dk,u),[I,T]=r(null),L=fo((N)=>v.itemTextRefCallback?.(N,k.value,k.disabled)),R=At(c,T,k.onItemTextChange,L),A=I?.textContent,E=w(()=>e("option",{value:k.value,disabled:k.disabled,children:A},k.value),[k.disabled,k.value,A]),{onNativeOptionAdd:P,onNativeOptionRemove:D}=S;return xn(()=>(P(E),()=>D(E)),[P,D,E]),n(h,{children:[e(St.span,{id:k.textId,...p,ref:R}),k.isSelected&&g.valueNode&&!g.valueNodeHasChildren&&!bv(g.value)?Vt(p.children,g.valueNode):null]})},"SelectItemText")),_de="SelectItemIndicator",zde=_e(Sn(function(a,c){let{__scopeSelect:u,...f}=a;return nU(_de,u).isSelected?e(St.span,{"aria-hidden":!0,...f,ref:c}):null},"SelectItemIndicator"));var Bde=_e(Sn(function(a,c){let{__scopeSelect:u,...f}=a;return e(St.div,{"aria-hidden":!0,...f,ref:c})},"SelectSeparator"));var Fde="SelectBubbleInput",Vde=_e(Sn(function({__scopeSelect:a,...c},u){let f=Ju(Fde,a),{value:m,onValueChange:p,required:g,disabled:v,name:k,autoComplete:S,form:I}=f,{nativeOptions:T,nativeSelectKey:L}=f,R=i(null),A=At(u,R),E=m??"",P=YR(E),D=Array.from(T).some((N)=>(N.props.value??"")==="");return o(()=>{let N=R.current;if(!N)return;let O=window.HTMLSelectElement.prototype,z=Object.getOwnPropertyDescriptor(O,"value").set;if(P!==E&&z){let B=new Event("change",{bubbles:!0});z.call(N,E),N.dispatchEvent(B)}},[P,E]),n(St.select,{"aria-hidden":!0,required:g,tabIndex:-1,name:k,autoComplete:S,disabled:v,form:I,onChange:(N)=>p(N.target.value),...c,style:{...QR,...c.style},ref:A,defaultValue:E,children:[bv(m)&&!D?e("option",{value:""}):null,Array.from(T)]},L)},"SelectBubbleInput"));function rU(t){return typeof t==="function"}Sn(rU,"isFunction");function bv(t){return t===""||t===void 0}Sn(bv,"shouldShowPlaceholder");function tE(t){let a=fo(t),c=i(""),u=i(0),f=y((p)=>{let g=c.current+p;a(g),Sn(function v(k){if(c.current=k,window.clearTimeout(u.current),k!=="")u.current=window.setTimeout(()=>v(""),1000)},"updateSearch")(g)},[a]),m=y(()=>{c.current="",window.clearTimeout(u.current)},[]);return o(()=>()=>window.clearTimeout(u.current),[]),[c,f,m]}Sn(tE,"useTypeaheadSearch");function nE(t,a,c){let f=a.length>1&&Array.from(a).every((k)=>k===a[0])?a[0]:a,m=c?t.indexOf(c):-1,p=oU(t,Math.max(m,0));if(f.length===1)p=p.filter((k)=>k!==c);let v=p.find((k)=>k.textValue.toLowerCase().startsWith(f.toLowerCase()));return v!==c?v:void 0}Sn(nE,"findNextItem");function oU(t,a){return t.map((c,u)=>t[(a+u)%t.length])}Sn(oU,"wrapArray");var Ude=Object.defineProperty,ed=(t,a)=>Ude(t,"name",{value:a,configurable:!0}),rE="Switch",[qde,Djn]=Vn(rE),[Hde,oE]=qde(rE);function iU(t){let{__scopeSwitch:a,checked:c,children:u,defaultChecked:f,disabled:m,form:p,name:g,onCheckedChange:v,required:k,value:S="on",internal_do_not_use_render:I}=t,[T,L]=co({prop:c,defaultProp:f??!1,onChange:v,caller:rE}),[R,A]=r(null),[E,P]=r(null),D=i(!1),[N,O]=qc((B)=>B+1,0),F=R?!!p||!!R.closest("form"):!0,z={checked:T,setChecked:L,disabled:m,control:R,setControl:A,name:g,form:p,value:S,hasConsumerStoppedPropagationRef:D,userInteractionCount:N,onUserInteraction:O,required:k,defaultChecked:f,isFormControl:F,bubbleInput:E,setBubbleInput:P};return e(Hde,{scope:a,...z,children:sU(I)?I(z):u})}ed(iU,"SwitchProvider");var jde="SwitchTrigger",Gde=_e(ed(function({__scopeSwitch:a,onClick:c,...u},f){let{control:m,form:p,value:g,disabled:v,checked:k,required:S,setControl:I,setChecked:T,hasConsumerStoppedPropagationRef:L,onUserInteraction:R,isFormControl:A,bubbleInput:E}=oE(jde,a),P=At(f,I),D=i(k);return o(()=>{let N=p?m?.ownerDocument.getElementById(p):m?.form;if(N instanceof HTMLFormElement){let O=ed(()=>T(D.current),"reset");return N.addEventListener("reset",O),()=>N.removeEventListener("reset",O)}},[m,p,T]),e(St.button,{type:"button",role:"switch","aria-checked":k,"aria-required":S,"data-state":aE(k),"data-disabled":v?"":void 0,disabled:v,value:g,...u,ref:P,onClick:gt(c,(N)=>{if(R(),T((O)=>!O),E&&A){if(L.current=N.isPropagationStopped(),!L.current)N.stopPropagation()}})})},"SwitchTrigger")),$de=_e(ed(function(a,c){let{__scopeSwitch:u,name:f,checked:m,defaultChecked:p,required:g,disabled:v,value:k,onCheckedChange:S,form:I,...T}=a;return e(iU,{__scopeSwitch:u,checked:m,defaultChecked:p,disabled:v,required:g,onCheckedChange:S,name:f,form:I,value:k,internal_do_not_use_render:({isFormControl:L})=>n(h,{children:[e(Gde,{...T,ref:c,__scopeSwitch:u}),L&&e(Yde,{__scopeSwitch:u})]})})},"Switch")),Kde="SwitchThumb",Wde=_e(ed(function(a,c){let{__scopeSwitch:u,...f}=a,m=oE(Kde,u);return e(St.span,{"data-state":aE(m.checked),"data-disabled":m.disabled?"":void 0,...f,ref:c})},"SwitchThumb")),Xde="SwitchBubbleInput",Yde=_e(ed(function({__scopeSwitch:a,onClick:c,...u},f){let{control:m,hasConsumerStoppedPropagationRef:p,userInteractionCount:g,checked:v,defaultChecked:k,required:S,disabled:I,name:T,value:L,form:R,bubbleInput:A,setBubbleInput:E}=oE(Xde,a),P=At(f,E),D=pv(m),N=i(!1),O=i(v),F=i(g);o(()=>{let B=A;if(!B)return;let U=window.HTMLInputElement.prototype,G=Object.getOwnPropertyDescriptor(U,"checked").set,ce=g!==F.current;F.current=g;let re=O.current!==v;O.current=v;let Q=!(ce&&p.current);if(re&&G){N.current=!ce;let ae=new Event("click",{bubbles:Q});G.call(B,v),B.dispatchEvent(ae),N.current=!1}},[A,v,p,g]);let z=i(v);return e(St.input,{type:"checkbox","aria-hidden":!0,defaultChecked:k??z.current,required:S,disabled:I,name:T,value:L,form:R,...u,tabIndex:-1,ref:P,onClick:gt(c,(B)=>{if(N.current)B.stopPropagation()}),style:{...u.style,...D,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function sU(t){return typeof t==="function"}ed(sU,"isFunction");function aE(t){return t?"checked":"unchecked"}ed(aE,"getState");var Qde=Object.defineProperty,ho=(t,a)=>Qde(t,"name",{value:a,configurable:!0}),[lE,Kjn]=Vn("Tooltip",[ji]),cE=ji(),Zde="TooltipProvider",Jde=700,iE="tooltip.open",[efe,uE]=lE(Zde),tfe=ho((t)=>{let{__scopeTooltip:a,delayDuration:c=Jde,skipDelayDuration:u=300,disableHoverableContent:f=!1,children:m}=t,p=i(!0),g=i(!1),v=i(0);return o(()=>{let k=v.current;return()=>window.clearTimeout(k)},[]),e(efe,{scope:a,isOpenDelayedRef:p,delayDuration:c,onOpen:y(()=>{if(u<=0)return;window.clearTimeout(v.current),p.current=!1},[u]),onClose:y(()=>{if(u<=0)return;window.clearTimeout(v.current),v.current=window.setTimeout(()=>p.current=!0,u)},[u]),isPointerInTransitRef:g,onPointerInTransitChange:y((k)=>{g.current=k},[]),disableHoverableContent:f,children:m})},"TooltipProvider"),sE="Tooltip",[nfe,wv]=lE(sE),rfe=ho((t)=>{let{__scopeTooltip:a,children:c,open:u,defaultOpen:f,onOpenChange:m,disableHoverableContent:p,delayDuration:g}=t,v=uE(sE,t.__scopeTooltip),k=cE(a),[S,I]=r(null),[T,L]=r(void 0),R=Dn(),A=i(0),E=p??v.disableHoverableContent,P=g??v.delayDuration,D=i(!1),[N,O]=co({prop:u,defaultProp:f??!1,onChange:ho((G)=>{if(G)v.onOpen(),document.dispatchEvent(new CustomEvent(iE));else v.onClose();m?.(G)},"onChange"),caller:sE}),F=w(()=>N?D.current?"delayed-open":"instant-open":"closed",[N]),z=y(()=>{window.clearTimeout(A.current),A.current=0,D.current=!1,O(!0)},[O]),B=y(()=>{window.clearTimeout(A.current),A.current=0,O(!1)},[O]),U=y(()=>{window.clearTimeout(A.current),A.current=window.setTimeout(()=>{D.current=!0,O(!0),A.current=0},P)},[P,O]);return o(()=>()=>{if(A.current)window.clearTimeout(A.current),A.current=0},[]),e(Wu,{...k,children:e(nfe,{scope:a,contentId:T??R,setContentId:L,open:N,stateAttribute:F,trigger:S,onTriggerChange:I,onTriggerEnter:y(()=>{if(v.isOpenDelayedRef.current)U();else z()},[v.isOpenDelayedRef,U,z]),onTriggerLeave:y(()=>{if(E)B();else window.clearTimeout(A.current),A.current=0},[B,E]),onOpen:z,onClose:B,disableHoverableContent:E,children:c})})},"Tooltip"),cU="TooltipTrigger",ofe=_e(ho(function(a,c){let{__scopeTooltip:u,...f}=a,m=wv(cU,u),p=uE(cU,u),g=cE(u),v=i(null),k=At(c,v,m.onTriggerChange),S=i(!1),I=i(!1),T=y(()=>S.current=!1,[]);return o(()=>()=>document.removeEventListener("pointerup",T),[T]),e(Mc,{asChild:!0,...g,children:e(St.button,{"aria-describedby":m.open?m.contentId:void 0,"data-state":m.stateAttribute,...f,ref:k,onPointerMove:gt(a.onPointerMove,(L)=>{if(L.pointerType==="touch")return;if(!I.current&&!p.isPointerInTransitRef.current)m.onTriggerEnter(),I.current=!0}),onPointerLeave:gt(a.onPointerLeave,()=>{m.onTriggerLeave(),I.current=!1}),onPointerDown:gt(a.onPointerDown,()=>{if(m.open)m.onClose();S.current=!0,document.addEventListener("pointerup",T,{once:!0})}),onFocus:gt(a.onFocus,()=>{if(!S.current)m.onOpen()}),onBlur:gt(a.onBlur,m.onClose),onClick:gt(a.onClick,m.onClose)})})},"TooltipTrigger")),uU="TooltipPortal",[afe,ife]=lE(uU,{forceMount:void 0}),sfe=ho((t)=>{let{__scopeTooltip:a,forceMount:c,children:u,container:f}=t,m=wv(uU,a);return e(afe,{scope:a,forceMount:c,children:e(Lo,{present:c||m.open,children:e(cl,{asChild:!0,container:f,children:u})})})},"TooltipPortal"),yv="TooltipContent",lfe=_e(ho(function(a,c){let u=ife(yv,a.__scopeTooltip),{forceMount:f=u.forceMount,side:m="top",...p}=a,g=wv(yv,a.__scopeTooltip);return e(Lo,{present:f||g.open,children:g.disableHoverableContent?e(dU,{side:m,...p,ref:c}):e(cfe,{side:m,...p,ref:c})})},"TooltipContent")),cfe=_e(ho(function(a,c){let u=wv(yv,a.__scopeTooltip),f=uE(yv,a.__scopeTooltip),m=i(null),p=At(c,m),[g,v]=r(null),{trigger:k,onClose:S}=u,I=m.current,{onPointerInTransitChange:T}=f,L=y(()=>{v(null),T(!1)},[T]),R=y((A,E)=>{let P=A.currentTarget,D={x:A.clientX,y:A.clientY},N=fU(D,P.getBoundingClientRect()),O=mU(D,N),F=pU(E.getBoundingClientRect()),z=gU([...O,...F]);v(z),T(!0)},[T]);return o(()=>()=>L(),[L]),o(()=>{if(k&&I){let A=ho((P)=>R(P,I),"handleTriggerLeave"),E=ho((P)=>R(P,k),"handleContentLeave");return k.addEventListener("pointerleave",A),I.addEventListener("pointerleave",E),()=>{k.removeEventListener("pointerleave",A),I.removeEventListener("pointerleave",E)}}},[k,I,R,L]),o(()=>{if(g){let A=ho((E)=>{let P=E.target,D={x:E.clientX,y:E.clientY},N=k?.contains(P)||I?.contains(P),O=!hU(D,g);if(N)L();else if(O)L(),S()},"handleTrackPointerGrace");return document.addEventListener("pointermove",A),()=>document.removeEventListener("pointermove",A)}},[k,I,g,S,L]),e(dU,{...a,ref:p})},"TooltipContentHoverable")),ufe=HL("TooltipContent"),dU=_e(ho(function(a,c){let{__scopeTooltip:u,children:f,"aria-label":m,id:p,onEscapeKeyDown:g,onPointerDownOutside:v,...k}=a,S=wv(yv,u),I=cE(u),{onClose:T}=S;o(()=>(document.addEventListener(iE,T),()=>document.removeEventListener(iE,T)),[T]),o(()=>{if(S.trigger){let R=ho((A)=>{if(A.target instanceof Node&&A.target.contains(S.trigger))T()},"handleScroll");return window.addEventListener("scroll",R,{capture:!0}),()=>window.removeEventListener("scroll",R,{capture:!0})}},[S.trigger,T]);let{setContentId:L}=S;return xn(()=>(L(p),()=>{L(void 0)}),[p,L]),e(ll,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:(R)=>R.preventDefault(),onDismiss:T,children:n(Xu,{"data-state":S.stateAttribute,role:m?void 0:"tooltip",id:m?void 0:S.contentId,...I,...k,ref:c,style:{...k.style,...{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}},children:[e(ufe,{children:f}),m?e(QV,{id:S.contentId,role:"tooltip",children:m}):null]})})},"TooltipContentImpl"));function fU(t,a){let c=Math.abs(a.top-t.y),u=Math.abs(a.bottom-t.y),f=Math.abs(a.right-t.x),m=Math.abs(a.left-t.x);switch(Math.min(c,u,f,m)){case m:return"left";case f:return"right";case c:return"top";case u:return"bottom";default:throw Error("unreachable")}}ho(fU,"getExitSideFromRect");function mU(t,a,c=5){let u=[];switch(a){case"top":u.push({x:t.x-c,y:t.y+c},{x:t.x+c,y:t.y+c});break;case"bottom":u.push({x:t.x-c,y:t.y-c},{x:t.x+c,y:t.y-c});break;case"left":u.push({x:t.x+c,y:t.y-c},{x:t.x+c,y:t.y+c});break;case"right":u.push({x:t.x-c,y:t.y-c},{x:t.x-c,y:t.y+c});break}return u}ho(mU,"getPaddedExitPoints");function pU(t){let{top:a,right:c,bottom:u,left:f}=t;return[{x:f,y:a},{x:c,y:a},{x:c,y:u},{x:f,y:u}]}ho(pU,"getPointsFromRect");function hU(t,a){let{x:c,y:u}=t,f=!1;for(let m=0,p=a.length-1;m<a.length;p=m++){let g=a[m],v=a[p],{x:k,y:S}=g,{x:I,y:T}=v;if(S>u!==T>u&&c<(I-k)*(u-S)/(T-S)+k)f=!f}return f}ho(hU,"isPointInPolygon");function gU(t){let a=t.slice();return a.sort((c,u)=>{if(c.x<u.x)return-1;else if(c.x>u.x)return 1;else if(c.y<u.y)return-1;else if(c.y>u.y)return 1;else return 0}),xU(a)}ho(gU,"getHull");function xU(t){if(t.length<=1)return t.slice();let a=[];for(let u=0;u<t.length;u++){let f=t[u];while(a.length>=2){let m=a[a.length-1],p=a[a.length-2];if((m.x-p.x)*(f.y-p.y)>=(m.y-p.y)*(f.x-p.x))a.pop();else break}a.push(f)}a.pop();let c=[];for(let u=t.length-1;u>=0;u--){let f=t[u];while(c.length>=2){let m=c[c.length-1],p=c[c.length-2];if((m.x-p.x)*(f.y-p.y)>=(m.y-p.y)*(f.x-p.x))c.pop();else break}c.push(f)}if(c.pop(),a.length===1&&c.length===1&&a[0].x===c[0].x&&a[0].y===c[0].y)return a;else return a.concat(c)}ho(xU,"getHullPresorted");var dfe=tfe,ffe=rfe,mfe=ofe,pfe=sfe,hfe=lfe;var _k=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function bU(t){return t.split("+").map((a)=>{let c=a.toLowerCase();if(c==="mod")return _k?"⌘":"Ctrl";if(c==="shift")return _k?"⇧":"Shift";if(c==="alt")return _k?"⌥":"Alt";if(c==="enter")return"↵";return a.length===1?a.toUpperCase():a}).join(_k?"":" ")}function je(t){return _(),e("kbd",{className:l("control.kbd",t.className),children:bU(t.children)})}function kv(t){return e(dfe,{delayDuration:400,skipDelayDuration:300,children:t.children})}function ui(t){_();let[a,c]=r(!1);return n(ffe,{open:a,onOpenChange:c,children:[e(mfe,{asChild:!0,onPointerDown:()=>c(!1),children:t.children}),e(pfe,{children:n(hfe,{side:t.side??"bottom",sideOffset:6,collisionPadding:8,className:l("surface.tooltip"),children:[t.label,t.shortcut&&e(je,{className:"border-bg/20 bg-bg/10 text-bg/80",children:t.shortcut})]})})]})}var gfe={primary:"button.primary",secondary:"button.secondary",ghost:"button.ghost",danger:"button.danger","danger-ghost":"button.dangerGhost",inverse:"button.inverse"},yU=W9(Zn["button.base"],{variants:{variant:{primary:Zn["button.primary"],secondary:Zn["button.secondary"],ghost:Zn["button.ghost"],danger:Zn["button.danger"],"danger-ghost":Zn["button.dangerGhost"],inverse:Zn["button.inverse"]},size:{sm:"h-8 rounded-lg px-2.5 text-[13px]",md:"h-9 rounded-[10px] px-3.5 text-sm",lg:"h-10 rounded-xl px-4 text-[15px]",icon:"size-8 rounded-lg","icon-sm":"size-7 rounded-md","icon-xs":"size-6 rounded-md"}},defaultVariants:{variant:"secondary",size:"md"}});function b({className:t,variant:a,size:c,asChild:u,loading:f,children:m,...p}){let g=u?Qie:"button",v=gfe[a??"secondary"];return e(g,{type:u?void 0:"button",...p,disabled:p.disabled||f,className:d(yU({variant:a,size:c}),l("button.base",l(v)),t),children:f&&!u?n(h,{children:[e("span",{className:"invisible contents",children:m}),e(ie,{className:"absolute size-4 animate-spin"})]}):m})}function j({label:t,shortcut:a,tooltipSide:c,size:u="icon",variant:f="ghost",...m}){return e(ui,{label:t,shortcut:a,side:c,children:e(b,{"aria-label":t,size:u,variant:f,...m})})}function _t(t){return _(),e($de,{checked:t.checked,onCheckedChange:t.onCheckedChange,disabled:t.disabled,"aria-label":t.label,className:l("control.switch",t.className),children:e(Wde,{className:l("control.switchThumb")})})}function Mi(t){let a=n(h,{children:[t.icon&&e("span",{"aria-hidden":!0,className:d("grid size-5 shrink-0 place-items-center text-faint group-hover:text-dim [&_svg]:size-4",t.inactive&&"opacity-50"),children:t.icon}),e("span",{className:d("shrink-0 truncate font-mono text-[13px] text-ink",t.inactive&&"text-faint"),children:t.name}),t.meta&&e("span",{className:"shrink-0 font-mono text-[11px] text-faint/70",children:t.meta}),t.description&&e("span",{className:"min-w-0 flex-1 truncate pl-1 text-[12.5px] text-faint",title:typeof t.description==="string"?t.description:void 0,children:t.description})]}),c="flex min-w-0 flex-1 items-center gap-3 py-2.5 text-left";return n("div",{className:d("group flex min-h-13 min-w-0 items-center gap-3 px-4 transition-colors duration-500 hover:bg-raised/40",t.highlight&&"bg-success/6"),children:[t.onSelect?e("button",{type:"button","aria-label":t.selectLabel,title:t.title,onClick:t.onSelect,className:d("flex min-w-0 flex-1 items-center gap-3 py-2.5 text-left","cursor-pointer focus-visible:outline-2 focus-visible:outline-accent"),children:a}):e("div",{className:"flex min-w-0 flex-1 items-center gap-3 py-2.5 text-left",title:t.title,children:a}),t.aside&&e("span",{className:"flex shrink-0 items-center gap-2 max-sm:hidden",children:t.aside}),t.actions,t.toggle&&e(_t,{label:t.toggle.label,checked:t.toggle.checked,disabled:t.toggle.disabled,onCheckedChange:t.toggle.onCheckedChange})]})}var wU={duration:0.1,ease:[0.16,1,0.3,1]},Is={type:"spring",stiffness:600,damping:30},va={initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:0.24,ease:[0.22,1,0.36,1]}};function Ot(t){let[a,c]=r(!1),u=i(void 0);return o(()=>()=>clearTimeout(u.current),[]),e(j,{label:a?"已复制":t.label??"复制",size:t.size??"icon",className:d("text-faint",t.className),onClick:()=>{let f=typeof t.text==="function"?t.text():t.text;navigator.clipboard?.writeText(f).then(()=>{c(!0),clearTimeout(u.current),u.current=setTimeout(()=>c(!1),1500)})},children:e(de,{mode:"popLayout",initial:!1,children:e(H.span,{initial:{opacity:0,scale:0.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0.5},transition:Is,className:"flex",children:a?e(Z,{className:"size-4 text-success"}):e(Cn,{className:"size-[15px]"})},a?"done":"copy")})})}function Ro(t){let{header:a,actions:c,children:u,className:f,...m}=t,p=Boolean(a||c),g=u!==void 0&&u!==null&&u!==!1;return n("div",{...m,className:l("surface.panel",f),children:[p&&n("div",{className:d("flex min-h-9 items-center justify-between gap-2 py-1 pr-1.5 pl-3.5 text-xs text-faint",g&&"border-b border-line"),children:[e("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:a}),c&&e("div",{className:"flex shrink-0 items-center gap-1.5",children:c})]}),u]})}var Ts=q(function(a){_();let c=B7(a.lang),[,u]=r(0),[f,m]=r();o(()=>{if(!c)return;let v=!0;return Ow(c).then(()=>{if(v)u((k)=>k+1)},(k)=>{if(v)m({lang:c,message:k instanceof Error?k.message:"代码高亮加载失败"})}),()=>{v=!1}},[c]);let p=c?_w(a.code,c):void 0,g=l("code.base",a.className);if(p)return e("div",{className:g,dangerouslySetInnerHTML:{__html:p}});return e("div",{className:g,"data-render-pending":Boolean(c&&f?.lang!==c),title:f?.lang===c?f?.message:void 0,children:e("pre",{children:a.code})})}),dE=q(function(a){return _(),e(Ro,{className:l("code.block",a.className),header:e("span",{className:"font-mono",children:a.lang||"text"}),actions:e(Ot,{text:a.code,size:"icon-sm",label:"复制代码"}),children:e(Ts,{code:a.code,lang:a.lang,className:"px-4 py-3"})})});var Oe=wle,$e=kle;function De(t){return e(Sle,{"data-slot":"collapsible-content",className:d("overflow-hidden data-[state=closed]:pointer-events-none data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",t.className),children:t.children})}function tt(t){return e(Nt,{"aria-hidden":!0,className:d("size-4 shrink-0 transition-transform duration-300 ease-out-quint group-data-[state=open]/collapsible:rotate-90",t.className)})}var fE={duration:0.32,ease:[0.22,1,0.36,1]};function am(t){return e("div",{"aria-hidden":!0,"data-sheet-handle":!0,className:d("flex h-5 shrink-0 cursor-grab touch-none items-center justify-center select-none active:cursor-grabbing",t.className),children:e("div",{className:"h-1 w-10 rounded-full bg-line-strong"})})}function bh(t){let{media:a,expandable:c}=t,u=t.open??!0,f=Eu(typeof window>"u"?0:window.innerHeight*0.55),m=Eu(c&&typeof window<"u"?window.innerHeight:0),p=i(t.onClose);p.current=t.onClose;let[g,v]=r(null);return o(()=>{if(!u||!g)return;let k=matchMedia(a),S=()=>window.innerHeight*0.55,I=()=>window.innerHeight*0.9,T=g.offsetHeight,L=()=>c?S():T,R=0,A=(Q)=>{R=Q;let ae=L();if(c)f.set(Math.max(Q,ae));m.set(Math.max(0,ae-Q))},E=!1,P,D=(Q)=>{E=c&&Q>=I(),P?.stop(),P=dL(R,Q,{...fE,onUpdate:A})};if(c)A(0),D(S());else A(T);let N=()=>{if(c)D(E?I():S())};window.addEventListener("resize",N);let O,F=(Q,ae,xe)=>{if(O=void 0,!k.matches)return;if(P?.stop(),!c)T=g.offsetHeight,R=T-m.get();let Te=null;for(let me=Q;me&&me!==g;me=me.parentElement){let Ce=getComputedStyle(me).overflowY;if(me instanceof HTMLElement&&(Ce==="auto"||Ce==="scroll")&&me.scrollHeight>me.clientHeight){Te=me;break}}O={startY:ae,startVisible:R,fromHandle:Boolean(Q.closest("[data-sheet-handle]")),scroller:Te,mode:"pending",samples:[{y:ae,t:xe}]}},z=(Q,ae)=>{if(!O||O.mode==="scroll")return!1;let xe=Q-O.startY;if(O.mode==="pending"){if(Math.abs(xe)<4)return!1;let Ce=!O.scroller||O.scroller.scrollTop<=0,Be=c&&!E,X=O.fromHandle||xe>0&&Ce||xe<0&&Be;if(O.mode=X?"drag":"scroll",!X)return!1}let Te=O.startVisible-xe,me=c?I():T;if(A(Te>me?me+(Te-me)*0.2:Math.max(0,Te)),O.samples.push({y:Q,t:ae}),O.samples.length>5)O.samples.shift();return!0},B=()=>{let Q=O;if(O=void 0,Q?.mode!=="drag")return;let ae=Q.samples[0],xe=Q.samples[Q.samples.length-1],Te=0;if(ae&&xe&&xe.t>ae.t)Te=(xe.y-ae.y)/(xe.t-ae.t)*1000;let me=R-Te*0.2,Ce=c?[I(),S(),0]:[T,0],Be=Ce[0]??0;for(let X of Ce)if(Math.abs(X-me)<Math.abs(Be-me))Be=X;if(Be===0){p.current();return}D(Be)},U=(Q)=>{let ae=Q.touches[0];if(Q.touches.length!==1||!ae||!(Q.target instanceof Element)){O=void 0;return}F(Q.target,ae.clientY,Q.timeStamp)},Y=(Q)=>{let ae=Q.touches[0];if(ae&&z(ae.clientY,Q.timeStamp))Q.preventDefault()},G=(Q)=>{if(z(Q.clientY,Q.timeStamp))Q.preventDefault()},ce=()=>{window.removeEventListener("pointermove",G),window.removeEventListener("pointerup",ce),window.removeEventListener("pointercancel",ce),B()},re=(Q)=>{if(Q.pointerType==="touch"||Q.button!==0||!(Q.target instanceof Element))return;if(!Q.target.closest("[data-sheet-handle]")||Q.target.closest("button"))return;if(F(Q.target,Q.clientY,Q.timeStamp),!O)return;Q.preventDefault(),window.addEventListener("pointermove",G),window.addEventListener("pointerup",ce),window.addEventListener("pointercancel",ce)};return g.addEventListener("touchstart",U,{passive:!0}),g.addEventListener("touchmove",Y,{passive:!1}),g.addEventListener("touchend",B),g.addEventListener("touchcancel",B),g.addEventListener("pointerdown",re),()=>{P?.stop(),window.removeEventListener("resize",N),g.removeEventListener("touchstart",U),g.removeEventListener("touchmove",Y),g.removeEventListener("touchend",B),g.removeEventListener("touchcancel",B),g.removeEventListener("pointerdown",re),window.removeEventListener("pointermove",G),window.removeEventListener("pointerup",ce),window.removeEventListener("pointercancel",ce)}},[g,u,a,c,f,m]),{ref:v,style:c?{height:f,y:m}:{y:m}}}var td=Zn["surface.overlay"],yh=Zn["surface.dialog"],zk="(max-width: 639px)";function Yt(t){let a={sm:"sm:max-w-sm",md:"sm:max-w-md",lg:"sm:max-w-xl",xl:"sm:max-w-4xl"}[t.size??"md"],c=i(null),u=bh({media:zk,expandable:!1,open:t.open,onClose:()=>t.onOpenChange(!1)}),f=u.ref,m=y((p)=>{c.current=p,f(p)},[f]);return e(Hu,{open:t.open,onOpenChange:t.onOpenChange,children:n(ju,{children:[e(Gu,{className:l("surface.overlay")}),e($u,{asChild:!0,onOpenAutoFocus:(p)=>Bk(p,c.current),...t.description?{}:{"aria-describedby":void 0},children:n(H.div,{ref:m,style:{...u.style,backgroundColor:"var(--color-panel)"},className:l("surface.dialog",a,t.className),children:[e(am,{className:"sm:hidden"}),n("div",{"data-sheet-handle":!0,className:"flex items-start gap-3 px-5 pt-2 pb-1 sm:pt-5",children:[n("div",{className:"min-w-0 flex-1",children:[e(ph,{className:"font-serif text-[19px] leading-7 font-semibold tracking-[-0.01em]",children:t.title}),t.description&&e(bR,{asChild:!0,className:"mt-0.5 text-sm text-dim",children:e("div",{children:t.description})})]}),e(hh,{asChild:!0,children:e(j,{label:"关闭",size:"icon-sm",className:"-mt-0.5 -mr-1.5 max-sm:hidden",children:e(oe,{className:"size-4"})})})]}),e("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 pt-3 pb-5",children:t.children}),t.footer&&e(im,{children:t.footer})]})})]})})}function Bk(t,a){t.preventDefault(),a?.focus()}function im(t){return e("div",{className:d("flex shrink-0 items-center gap-2 border-t border-line px-5 py-3.5 max-sm:[&>button]:flex-1",t.className),children:t.children})}var Sv=Zn["control.input"];function te({className:t,...a}){return e("input",{...a,className:l("control.input","h-9.5",t)})}function yr({className:t,...a}){return e("textarea",{...a,className:l("control.input","resize-y py-2 leading-6",t)})}function Zt({className:t,...a}){return e("form",{...a,className:d("flex flex-col gap-4",t)})}function ue(t){let a=ee();return n("div",{className:t.className,children:[n("div",{className:"mb-1.5 flex items-center gap-2",children:[e(Eue,{htmlFor:a,className:"flex-1 text-[13px] font-medium text-dim",children:t.label}),t.aside]}),t.children(a),t.error?e("p",{className:"mt-1.5 animate-rise text-xs text-danger",children:t.error}):t.hint&&e("p",{className:"mt-1.5 text-xs leading-5 text-faint",children:t.hint})]})}function wt(t){if(!t.children)return null;return e("p",{role:"alert",className:"animate-rise rounded-lg bg-danger/8 px-3 py-2 text-[13px] text-danger",children:t.children})}var Cv=Tr({open:!1});function mE(t){let a=Cv.get();if(a.open&&a.request)kU(a.request,void 0);Cv.set({request:t,open:!0})}function kU(t,a){if(t.kind==="confirm")t.resolve(a===!0);else if(t.kind==="choice")t.resolve(typeof a==="string"?a:void 0);else t.resolve(typeof a==="string"?a:void 0)}function Ke(t){return new Promise((a)=>mE({kind:"confirm",title:t.title,description:t.description,action:t.action??"确定",danger:t.danger??!1,resolve:a}))}function pE(t){return new Promise((a)=>mE({kind:"choice",title:t.title,description:t.description,choices:t.choices,resolve:a}))}function hE(t){return new Promise((a)=>mE({kind:"prompt",title:t.title,description:t.description,initial:t.initial??"",placeholder:t.placeholder,multiline:t.multiline,action:t.action??"保存",resolve:a}))}function gE(){let{request:t,open:a}=se(Cv),c=(f)=>{let m=Cv.get();if(!m.open||!m.request)return;kU(m.request,f),Cv.set((p)=>({...p,open:!1}))},u=bh({media:zk,expandable:!1,open:a&&(t?.kind==="confirm"||t?.kind==="choice"),onClose:()=>c(void 0)});if(!t)return null;if(t.kind==="choice")return e(WB,{open:a,onOpenChange:(f)=>!f&&c(void 0),children:n(XB,{children:[e(YB,{className:td}),e(QB,{asChild:!0,children:n(H.div,{ref:u.ref,style:u.style,className:d(yh,"sm:max-w-md"),children:[e(am,{className:"sm:hidden"}),n("div",{"data-sheet-handle":!0,className:"px-5 pt-2 pb-4 sm:pt-5",children:[e(eF,{className:"font-serif text-[18px] leading-7 font-semibold tracking-[-0.01em]",children:t.title}),t.description?e(mk,{className:"mt-2 text-[13.5px] leading-relaxed text-dim",children:t.description}):e(mk,{className:"sr-only",children:t.title})]}),n(im,{className:"justify-end gap-2 px-5 pb-5",children:[e(JB,{asChild:!0,children:e(b,{variant:"ghost",onClick:()=>c(void 0),children:"取消"})}),t.choices.map((f)=>e(ZB,{asChild:!0,children:e(b,{variant:f.variant??(f.danger?"danger":"secondary"),onClick:()=>c(f.value),children:f.label})},f.value))]})]})})]})});return t.kind==="confirm"?e(WB,{open:a,onOpenChange:(f)=>!f&&c(!1),children:n(XB,{children:[e(YB,{className:td}),e(QB,{asChild:!0,children:n(H.div,{ref:u.ref,style:u.style,className:d(yh,"sm:max-w-sm"),children:[e(am,{className:"sm:hidden"}),n("div",{"data-sheet-handle":!0,className:"px-5 pt-2 pb-5 sm:pt-5",children:[e(eF,{className:"font-serif text-[19px] leading-7 font-semibold tracking-[-0.01em]",children:t.title}),t.description?e(mk,{className:"mt-1.5 text-sm leading-6 text-dim",children:t.description}):e(mk,{className:"sr-only",children:t.title})]}),n(im,{className:"justify-end",children:[e(JB,{asChild:!0,children:e(b,{children:"取消"})}),e(ZB,{asChild:!0,children:e(b,{variant:t.danger?"danger":"primary",onClick:()=>c(!0),children:t.action})})]})]})})]})}):e(xfe,{request:t,open:a,onClose:c},t.title+t.initial)}function xfe(t){let[a,c]=r(t.request.initial),u=(f)=>{if(f.preventDefault(),a.trim())t.onClose(t.request.multiline?a:a.trim())};return e(Yt,{open:t.open,onOpenChange:(f)=>!f&&t.onClose(void 0),title:t.request.title,description:t.request.description,size:"sm",footer:n("div",{className:"flex w-full justify-end gap-2",children:[e(b,{onClick:()=>t.onClose(void 0),children:"取消"}),e(b,{type:"submit",form:"prompt-dialog",variant:"primary",disabled:!a.trim(),children:t.request.action})]}),children:e(Zt,{id:"prompt-dialog",onSubmit:u,children:t.request.multiline?e(yr,{autoFocus:!0,"aria-label":t.request.title,value:a,rows:6,placeholder:t.request.placeholder,onChange:(f)=>c(f.target.value)}):e(te,{autoFocus:!0,value:a,placeholder:t.request.placeholder,onChange:(f)=>c(f.target.value),onFocus:(f)=>f.currentTarget.select()})})})}function ts(t){return n("div",{className:"flex items-center gap-3",children:[e("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-[10px] bg-raised text-dim [&_svg]:size-4.5",children:t.icon}),n("div",{className:"min-w-0",children:[e("div",{className:"truncate text-[17px] text-ink leading-6",children:t.name}),t.meta&&e("div",{className:"flex flex-wrap gap-x-2 font-normal font-sans text-[12px] text-faint leading-4.5 tracking-normal",children:t.meta.map((a)=>a&&e("span",{children:a},a))})]})]})}function ns(t){return e("div",{className:"divide-y divide-line/60 border-line/60 border-t",children:t.children})}function qr(t){return n("div",{className:"grid grid-cols-[4rem_minmax(0,1fr)] items-baseline gap-3 py-2.5 text-xs leading-5",children:[e("span",{className:"text-[12px] text-faint",children:t.label}),e("div",{className:"flex min-w-0 flex-wrap gap-1.5",children:t.children})]})}function rs(t){return n(Oe,{className:"min-w-0",children:[n($e,{className:"group/collapsible grid w-full cursor-pointer grid-cols-[4rem_minmax(0,1fr)] items-center gap-3 py-2.5 text-left text-[12px] text-faint transition-colors hover:text-dim",children:[e("span",{children:t.label}),n("span",{className:"flex items-center justify-between gap-2 text-dim",children:[e("span",{className:"tabular-nums",children:t.summary}),e(tt,{className:"size-3.5 text-faint"})]})]}),e(De,{children:e("div",{className:"space-y-3 pb-3 pl-[4.75rem] text-xs leading-5",children:t.children})})]})}var ni="rounded-md bg-raised/70 px-1.5 text-[12px] text-dim leading-5.5 [overflow-wrap:anywhere]";function ri(t){return e("span",{title:t.title,className:d(ni,t.mono&&"font-mono text-[11.5px]"),children:t.children})}var Iv=28;function Fk(t,a,c){let u=Math.max(0,a-t);if(u<=1||t<=0||a<=0)return{scrollable:!1,size:0,offset:0};let f=Math.min(t,Math.max(32,t*t/a)),m=Math.max(0,t-f),p=Math.min(m,Math.max(0,c/u*m));return{scrollable:!0,size:f,offset:p}}function ai({as:t="div",className:a,viewportClassName:c,viewportRef:u,children:f,...m}){let p=i(null),g=i(null);return Lb(u,()=>p.current,[]),K(()=>{let v=p.current,k=g.current;if(!v||!k)return;let S=!1,I=(z)=>{let B=z?"true":"false";if(v.dataset.scrollbarActive!==B)v.dataset.scrollbarActive=B},T=()=>{let z=Fk(v.clientHeight,v.scrollHeight,v.scrollTop);if(!z.scrollable){k.dataset.scrollable="false";return}k.dataset.scrollable="true",k.style.setProperty("--minimal-scrollbar-thumb-size",`${z.size}px`),k.style.setProperty("--minimal-scrollbar-thumb-offset",`${z.offset}px`)},L=(z)=>{if(z.pointerType!=="mouse")return!1;let B=v.getBoundingClientRect();return z.clientY>=B.top&&z.clientY<=B.bottom&&z.clientX>=B.right-Iv&&z.clientX<=B.right+Iv},R=(z)=>{I(L(z))},A=(z)=>{I(S||L(z))},E=()=>{if(!S)I(!1)},P=(z)=>{if(z.pointerType!=="mouse")return;if(v.offsetWidth-v.clientWidth>0&&z.offsetX>=v.clientWidth)S=!0,I(!0)},D=(z)=>{S=!1,I(L(z))},N=()=>{T()};T();let O=new ResizeObserver(()=>{T()});O.observe(v);for(let z of v.children)O.observe(z);let F=new MutationObserver(()=>{T()});return F.observe(v,{childList:!0,subtree:!0}),v.addEventListener("scroll",N,{passive:!0}),v.addEventListener("pointerenter",R,{passive:!0}),v.addEventListener("pointermove",A,{passive:!0}),v.addEventListener("pointerleave",E,{passive:!0}),v.addEventListener("pointerdown",P,{passive:!0}),window.addEventListener("pointerup",D,{passive:!0}),window.addEventListener("pointercancel",D,{passive:!0}),()=>{O.disconnect(),F.disconnect(),v.removeEventListener("scroll",N),v.removeEventListener("pointerenter",R),v.removeEventListener("pointermove",A),v.removeEventListener("pointerleave",E),v.removeEventListener("pointerdown",P),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D)}},[]),n(t,{className:d("relative min-h-0 flex-1",a),...m,children:[e("div",{ref:p,className:d("minimal-scroll-area h-full w-full overflow-y-auto overscroll-y-contain",c),children:f}),e("div",{ref:g,"aria-hidden":"true",className:"minimal-scrollbar-overlay"})]})}function as(t){return _(),e(ai,{as:"section","aria-label":t["aria-label"],className:"flex-1",viewportClassName:"[scrollbar-gutter:stable]",children:n("div",{className:l("page.container",t.className),children:[n("div",{className:d("flex flex-wrap items-center gap-3",t.description?"mb-1.5":"mb-8"),children:[e("h1",{className:l("page.title"),children:t.title}),t.actions&&e("div",{className:"flex flex-wrap items-center gap-2",children:t.actions})]}),t.description&&e("p",{className:l("page.description"),children:t.description}),t.children]})})}var xE=Zn["surface.floating"],vfe=Zn["surface.floatingItem"],bfe=Zn["surface.floatingLabel"],yfe=Zn["surface.floatingSeparator"],wh="data-disabled:pointer-events-none data-disabled:opacity-45";function Xt(t){return _(),n(cde,{value:t.value,disabled:t.disabled,onValueChange:t.onValueChange,children:[n(dde,{id:t.id,"aria-label":t.ariaLabel,className:l("control.input","flex h-9.5 items-center gap-2 text-left data-placeholder:text-faint [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-faint",t.className),children:[e("span",{className:"flex min-w-0 flex-1 items-center gap-2 truncate",children:e(mde,{placeholder:t.placeholder})}),e(pde,{children:e(ge,{})})]}),e(vde,{children:e(bde,{position:"popper",sideOffset:6,collisionPadding:8,className:l("surface.floating","max-h-(--radix-select-content-available-height) min-w-(--radix-select-trigger-width) origin-(--radix-select-content-transform-origin)"),children:e(Tde,{children:t.groups.map((a,c)=>n(Pde,{children:[c>0&&e(Bde,{className:l("surface.floatingSeparator")}),a.label&&e(Mde,{className:l("surface.floatingLabel"),children:a.label}),a.options.map((u)=>n(Nde,{value:u.value,className:l("surface.floatingItem",wh,"pr-8"),children:[u.icon,n("span",{className:"min-w-0 flex-1",children:[e(Ode,{children:u.label}),u.description&&e("span",{className:"block truncate text-xs text-faint",children:u.description})]}),e(zde,{className:"absolute right-2",children:e(Z,{className:"text-accent!"})})]},u.value))]},a.label??c))})})})]})}function it(t){return n("span",{title:t.title,className:l("status.base",l(`status.${t.tone}`)),children:[t.pulse&&e("span",{className:"size-1.5 animate-pulse rounded-full bg-current"}),t.children]})}function Tv(t,a){t.style.transform=`translate3d(${Math.round(a.offsetLeft)}px, ${Math.round(a.offsetTop)}px, 0)`,t.style.width=`${a.offsetWidth}px`,t.style.height=`${a.offsetHeight}px`}function vE(t,a,c,u,f){let m=c?a.get(c):void 0;if(!t||!m||!c){if(t)t.style.transition="opacity 150ms ease-out",t.style.opacity="0";return!1}return t.style.transition=f&&u?"transform 175ms cubic-bezier(0.22, 1, 0.36, 1), opacity 130ms cubic-bezier(0.22, 1, 0.36, 1)":"opacity 130ms cubic-bezier(0.22, 1, 0.36, 1)",Tv(t,m),t.style.opacity="1",!0}function wfe(t){let a=i(new Map),c=i(null),u=i(null),f=i(!1),m=i(!1),p=i(void 0),g=i(void 0);K(()=>{let S=a.current.get(t.value),I=u.current;if(!S||!I)return;if(I.style.transition=f.current?"transform 220ms cubic-bezier(0.22, 1, 0.36, 1)":"none",Tv(I,S),I.style.opacity="1",f.current=!0,p.current)m.current=vE(c.current,a.current,p.current,m.current,!1);let T=()=>{I.style.transition="none",Tv(I,S)};return window.addEventListener("resize",T),()=>window.removeEventListener("resize",T)},[t.value]),o(()=>()=>clearTimeout(g.current),[]);let v=(S)=>(I)=>{if(I)a.current.set(S,I);else a.current.delete(S)},k;return n("nav",{"aria-label":t.ariaLabel,onPointerLeave:()=>{p.current=void 0,vE(c.current,a.current,void 0,m.current,!1),clearTimeout(g.current),g.current=setTimeout(()=>{if(!p.current)m.current=!1},150)},className:d("relative flex shrink-0 gap-1 overflow-x-auto pb-1 md:w-48 md:flex-col md:overflow-visible md:pb-0",t.className),children:[e("span",{ref:c,"aria-hidden":!0,className:"pointer-events-none absolute top-0 left-0 rounded-lg bg-raised/65 opacity-0 will-change-transform"}),e("span",{ref:u,"aria-hidden":!0,className:"pointer-events-none absolute top-0 left-0 rounded-lg bg-raised opacity-0 shadow-[inset_0_1px_0_oklch(1_0_0/0.06)] will-change-transform"}),t.options.map((S,I)=>{let T=S.value===t.value,L=S.group&&S.group!==k;return k=S.group,n(Xe,{children:[L&&e("div",{className:d("px-2.5 pb-1 text-[11px] font-medium tracking-wide text-faint",I>0&&"mt-3.5"),children:S.group}),n("button",{ref:v(S.value),type:"button",onPointerEnter:(R)=>{if(R.pointerType==="touch")return;clearTimeout(g.current);let A=p.current;p.current=S.value,m.current=vE(c.current,a.current,S.value,m.current,A!==S.value)},onPointerDown:(R)=>{if(R.button===0)t.onChange(S.value)},onClick:(R)=>R.preventDefault(),className:d("group relative flex h-9 shrink-0 items-center gap-2.5 rounded-lg px-2.5 text-left text-[13.5px] select-none transition-colors duration-150",T?"font-medium text-ink":"text-dim hover:text-ink"),children:[S.icon&&e("span",{className:d("relative flex items-center transition-[color,scale] duration-180 ease-out-quint [&_svg]:size-4",T?"text-ink":"text-faint group-hover:scale-105 group-hover:text-dim"),children:S.icon}),e("span",{className:"relative truncate",children:S.label})]})]},S.value)})]})}function Pi(t){let a=i(new Map),c=i(null),u=i(!1);K(()=>{let m=a.current.get(t.value),p=c.current;if(!m||!p)return;p.style.transition=u.current?"transform 90ms cubic-bezier(0.16, 1, 0.3, 1), width 90ms cubic-bezier(0.16, 1, 0.3, 1)":"none",Tv(p,m),p.style.opacity="1",u.current=!0;let g=()=>{p.style.transition="none",Tv(p,m)};return window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[t.value]);let f=(m)=>(p)=>{if(p)a.current.set(m,p);else a.current.delete(m)};return n("div",{className:l("control.segmented",t.className),children:[e("span",{ref:c,"aria-hidden":!0,className:l("control.segmentedPill")}),t.options.map((m)=>{let p=m.value===t.value;return n("button",{ref:f(m.value),type:"button",onPointerDown:(g)=>{if(g.button===0)t.onChange(m.value)},onClick:(g)=>g.preventDefault(),className:d("relative flex h-7.5 items-center justify-center gap-1.5 rounded-lg px-2.5 text-xs font-medium select-none transition-colors duration-75",p?"text-ink":"text-dim hover:text-ink"),children:[m.icon&&e("span",{className:"relative flex items-center [&_svg]:size-3.5",children:m.icon}),e("span",{className:"relative",children:m.label})]},m.value)})]})}function kfe(t){if(!t||typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css",a.appendChild(c),c.styleSheet?c.styleSheet.cssText=t:c.appendChild(document.createTextNode(t))}var Sfe=(t)=>{switch(t){case"success":return Tfe;case"info":return Rfe;case"warning":return Lfe;case"error":return Efe;default:return null}},Cfe=Array(12).fill(0),Ife=({visible:t,className:a})=>ct("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":t},ct("div",{className:"sonner-spinner"},Cfe.map((c,u)=>ct("div",{className:"sonner-loading-bar",key:`spinner-bar-${u}`})))),Tfe=ct("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ct("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Lfe=ct("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ct("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Rfe=ct("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ct("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Efe=ct("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ct("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Pfe=ct("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},ct("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ct("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Afe=()=>{let[t,a]=r(document.hidden);return o(()=>{let c=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)},[]),t},Mfe=1,Dfe=100,SU=(t)=>{var a;return typeof(t==null?void 0:t.id)==="number"||(t==null?void 0:(a=t.id)==null?void 0:a.length)>0?t.id:Mfe++};class TU{constructor(){this.subscribe=(t)=>(this.subscribers.push(t),this.getActiveToasts().forEach((a)=>t(a)),()=>{let a=this.subscribers.indexOf(t);this.subscribers.splice(a,1)}),this.publish=(t)=>{this.subscribers.forEach((a)=>a(t))},this.addToast=(t)=>{this.publish(t),this.toasts=[...this.toasts,t],this.trimHistory()},this.trimHistory=()=>{let t=this.toasts.length-Dfe;if(t<=0)return;this.toasts=this.toasts.filter((a)=>{if(t>0&&this.dismissedToasts.has(a.id))return this.dismissedToasts.delete(a.id),t--,!1;return!0})},this.create=(t)=>{let{message:a,...c}=t,u=SU(t),f=this.pendingDismissals.get(u);if(f!==void 0)cancelAnimationFrame(f),this.pendingDismissals.delete(u),this.dismissedToasts.delete(u);let m=this.dismissedToasts.has(u),p=t.dismissible===void 0?!0:t.dismissible;if(m)this.dismissedToasts.delete(u),this.toasts=this.toasts.filter((v)=>v.id!==u);if(m?void 0:this.toasts.find((v)=>v.id===u))this.toasts=this.toasts.map((v)=>{if(v.id===u)return this.publish({...v,...t,id:u,title:a}),{...v,...t,id:u,dismissible:p,title:a};return v});else this.addToast({title:a,...c,dismissible:p,id:u});return u},this.dismiss=(t)=>{if(t===void 0||t===null)return this.getActiveToasts().forEach((c)=>{this.dismissedToasts.add(c.id),this.subscribers.forEach((u)=>u({id:c.id,dismiss:!0}))}),t;this.dismissedToasts.add(t);let a=this.pendingDismissals.get(t);if(a!==void 0)cancelAnimationFrame(a);return this.pendingDismissals.set(t,requestAnimationFrame(()=>{this.pendingDismissals.delete(t),this.subscribers.forEach((c)=>c({id:t,dismiss:!0}))})),t},this.message=(t,a)=>this.create({...a,message:t,type:void 0}),this.error=(t,a)=>this.create({...a,message:t,type:"error"}),this.success=(t,a)=>this.create({...a,type:"success",message:t}),this.info=(t,a)=>this.create({...a,type:"info",message:t}),this.warning=(t,a)=>this.create({...a,type:"warning",message:t}),this.loading=(t,a)=>this.create({...a,type:"loading",message:t}),this.promise=(t,a)=>{if(!a)return;let c=void 0;if(a.loading!==void 0)c=this.create({...a,promise:t,type:"loading",message:a.loading,description:typeof a.description!=="function"?a.description:void 0});let u=Promise.resolve(t instanceof Function?t():t),f=c!==void 0,m,p=u.then(async(v)=>{if(m=["resolve",v],eo(v))f=!1,this.create({id:c,type:"default",message:v});else if(Ofe(v)&&!v.ok){f=!1;let S=typeof a.error==="function"?await a.error(`HTTP error! status: ${v.status}`):a.error,I=typeof a.description==="function"?await a.description(`HTTP error! status: ${v.status}`):a.description,L=typeof S==="object"&&!eo(S)?S:{message:S};this.create({id:c,type:"error",description:I,...L})}else if(v instanceof Error){f=!1;let S=typeof a.error==="function"?await a.error(v):a.error,I=typeof a.description==="function"?await a.description(v):a.description,L=typeof S==="object"&&!eo(S)?S:{message:S};this.create({id:c,type:"error",description:I,...L})}else if(a.success!==void 0){f=!1;let S=typeof a.success==="function"?await a.success(v):a.success,I=typeof a.description==="function"?await a.description(v):a.description,L=typeof S==="object"&&!eo(S)?S:{message:S};this.create({id:c,type:"success",description:I,...L})}}).catch(async(v)=>{if(m=["reject",v],a.error!==void 0){f=!1;let k=typeof a.error==="function"?await a.error(v):a.error,S=typeof a.description==="function"?await a.description(v):a.description,T=typeof k==="object"&&!eo(k)?k:{message:k};this.create({id:c,type:"error",description:S,...T})}}).finally(()=>{if(f)this.dismiss(c),c=void 0;a.finally==null||a.finally.call(a)}),g=()=>new Promise((v,k)=>p.then(()=>m[0]==="reject"?k(m[1]):v(m[1])).catch(k));if(typeof c!=="string"&&typeof c!=="number")return{unwrap:g};else return Object.assign(c,{unwrap:g})},this.custom=(t,a)=>{let c=SU(a);return this.create({...a,jsx:t(c),id:c,type:void 0}),c},this.getActiveToasts=()=>this.toasts.filter((t)=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}var Na=new TU,Nfe=(t,a)=>Na.message(t,a),Ofe=(t)=>t&&typeof t==="object"&&("ok"in t)&&typeof t.ok==="boolean"&&("status"in t)&&typeof t.status==="number",_fe=Nfe,zfe=()=>Na.toasts,Bfe=()=>Na.getActiveToasts(),le=Object.assign(_fe,{success:Na.success,info:Na.info,warning:Na.warning,error:Na.error,custom:Na.custom,message:Na.message,promise:Na.promise,dismiss:Na.dismiss,loading:Na.loading},{getHistory:zfe,getToasts:Bfe});kfe("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Vk(t){return t.label!==void 0}var Ffe=3,Vfe="24px",Ufe="16px",CU=4000,qfe=356,Hfe=14,jfe=45,Gfe=200;function gl(...t){return t.filter(Boolean).join(" ")}function $fe(t){let[a,c]=t.split("-"),u=[];if(a)u.push(a);if(c)u.push(c);return u}var Kfe=(t)=>{var a,c,u,f,m,p,g,v,k;let{invert:S,toast:I,unstyled:T,interacting:L,setHeights:R,visibleToasts:A,heights:E,index:P,toasts:D,expanded:N,removeToast:O,defaultRichColors:F,closeButton:z,style:B,cancelButtonStyle:U,actionButtonStyle:Y,className:G="",descriptionClassName:ce="",duration:re,position:Q,gap:ae,expandByDefault:xe,classNames:Te,icons:me,closeButtonAriaLabel:Ce="Close toast"}=t,[Be,X]=r(null),[He,Le]=r(null),[J,Me]=r(!1),[Ie,qe]=r(!1),[Qe,Re]=r(!1),[Ne,ut]=r(!1),[kt,It]=r(!1),[Ee,nt]=r(0),[Kt,an]=r(0),mn=i(I.duration||re||CU),br=i(null),Ao=i(null),Ba=P===0,Fl=P+1<=A,or=I.type,Vl=or!=null?or:"default",mi=I.dismissible!==!1,Ge=I.className||"",Tt=I.descriptionClassName||"",he=w(()=>E.findIndex(($t)=>$t.toastId===I.id)||0,[E,I.id]),Fe=w(()=>{var $t;return($t=I.closeButton)!=null?$t:z},[I.closeButton,z]),ft=w(()=>I.duration||re||CU,[I.duration,re]),ze=i(0),lt=i(0),Bt=i(0),vn=i(null),[wr,hn]=Q.split("-"),kr=w(()=>E.reduce(($t,$r,xo)=>{if(xo>=he)return $t;return $t+$r.height},0),[E,he]),ar=Afe(),Fo=w(()=>{var $t;return($t=t.swipeDirections)!=null?$t:$fe(Q)},[t.swipeDirections,Q]),Fc=I.invert||S,Rr=or==="loading";lt.current=w(()=>he*ae+kr,[he,kr]),o(()=>{mn.current=ft},[ft]),o(()=>{Me(!0)},[]),o(()=>{let $t=Ao.current;if($t){let $r=$t.getBoundingClientRect().height;return an($r),R((xo)=>[{toastId:I.id,height:$r,position:I.position},...xo]),()=>R((xo)=>xo.filter((la)=>la.toastId!==I.id))}},[R,I.id]),K(()=>{if(!J)return;let $t=Ao.current,$r=$t.style.height;$t.style.height="auto";let xo=$t.getBoundingClientRect().height;$t.style.height=$r,an(xo),R((la)=>{if(!la.find((vo)=>vo.toastId===I.id))return[{toastId:I.id,height:xo,position:I.position},...la];else return la.map((vo)=>vo.toastId===I.id?{...vo,height:xo}:vo)})},[J,I.title,I.description,R,I.id,I.jsx,I.action,I.cancel]);let ir=y(()=>{qe(!0),nt(lt.current),R(($t)=>$t.filter(($r)=>$r.toastId!==I.id)),setTimeout(()=>{O(I)},Gfe)},[I,O,R,lt]);o(()=>{if(I.promise&&or==="loading"||I.duration===1/0||I.type==="loading")return;let $t,$r=()=>{if(Bt.current<ze.current){let la=new Date().getTime()-ze.current;mn.current=mn.current-la}Bt.current=new Date().getTime()},xo=()=>{if(mn.current===1/0)return;ze.current=new Date().getTime(),$t=setTimeout(()=>{I.onAutoClose==null||I.onAutoClose.call(I,I),ir()},mn.current)};if(N||L||ar)$r();else xo();return()=>clearTimeout($t)},[N,L,I,or,ar,ir]),o(()=>{if(I.delete)ir(),I.onDismiss==null||I.onDismiss.call(I,I)},[ir,I.delete]);function sa(){var $t;if(me==null?void 0:me.loading){var $r;return ct("div",{className:gl(Te==null?void 0:Te.loader,I==null?void 0:($r=I.classNames)==null?void 0:$r.loader,"sonner-loader"),"data-visible":or==="loading"},me.loading)}return ct(Ife,{className:gl(Te==null?void 0:Te.loader,I==null?void 0:($t=I.classNames)==null?void 0:$t.loader),visible:or==="loading"})}let yb=I.icon||(me==null?void 0:me[or])||Sfe(or);var P4,A4;return ct("li",{tabIndex:0,ref:Ao,className:gl(G,Ge,Te==null?void 0:Te.toast,I==null?void 0:(a=I.classNames)==null?void 0:a.toast,Te==null?void 0:Te[Vl],I==null?void 0:(c=I.classNames)==null?void 0:c[Vl]),"data-sonner-toast":"","data-rich-colors":(P4=I.richColors)!=null?P4:F,"data-styled":!Boolean(I.jsx||I.unstyled||T),"data-mounted":J,"data-promise":Boolean(I.promise),"data-swiped":kt,"data-removed":Ie,"data-visible":Fl,"data-y-position":wr,"data-x-position":hn,"data-index":P,"data-front":Ba,"data-swiping":Qe,"data-dismissible":mi,"data-type":or,"data-invert":Fc,"data-swipe-out":Ne,"data-swipe-direction":He,"data-expanded":Boolean(N||xe&&J),"data-testid":I.testId,style:{"--index":P,"--toasts-before":P,"--z-index":D.length-P,"--offset":`${Ie?Ee:lt.current}px`,"--initial-height":xe?"auto":`${Kt}px`,...B,...I.style},onDragEnd:()=>{Re(!1),X(null),vn.current=null},onPointerDown:($t)=>{if($t.button===2)return;if(Rr||!mi)return;if(br.current=new Date,nt(lt.current),$t.target.setPointerCapture($t.pointerId),$t.target.tagName==="BUTTON")return;Re(!0),vn.current={x:$t.clientX,y:$t.clientY}},onPointerUp:()=>{var $t,$r,xo;if(Ne||!mi)return;vn.current=null;let la=Number((($t=Ao.current)==null?void 0:$t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),tg=Number((($r=Ao.current)==null?void 0:$r.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),vo=new Date().getTime()-((xo=br.current)==null?void 0:xo.getTime()),pi=Be==="x"?la:tg,As=Math.abs(pi)/vo;if((Be==="x"?Fo.includes(la>0?"right":"left"):Fo.includes(tg>0?"bottom":"top"))&&(Math.abs(pi)>=jfe||As>0.11)){if(nt(lt.current),I.onDismiss==null||I.onDismiss.call(I,I),Be==="x")Le(la>0?"right":"left");else Le(tg>0?"down":"up");ir(),ut(!0);return}else{var Ms,g2;(Ms=Ao.current)==null||Ms.style.setProperty("--swipe-amount-x","0px"),(g2=Ao.current)==null||g2.style.setProperty("--swipe-amount-y","0px")}It(!1),Re(!1),X(null)},onPointerMove:($t)=>{var $r,xo,la;if(!vn.current||!mi)return;if((($r=window.getSelection())==null?void 0:$r.toString().length)>0)return;let vo=$t.clientY-vn.current.y,pi=$t.clientX-vn.current.x;if(!Be&&(Math.abs(pi)>1||Math.abs(vo)>1))X(Math.abs(pi)>Math.abs(vo)?"x":"y");let As={x:0,y:0},h2=(Ms)=>1/(1.5+Math.abs(Ms)/20);if(Be==="y"){if(Fo.includes("top")||Fo.includes("bottom"))if(Fo.includes("top")&&vo<0||Fo.includes("bottom")&&vo>0)As.y=vo;else{let Ms=vo*h2(vo);As.y=Math.abs(Ms)<Math.abs(vo)?Ms:vo}}else if(Be==="x"){if(Fo.includes("left")||Fo.includes("right"))if(Fo.includes("left")&&pi<0||Fo.includes("right")&&pi>0)As.x=pi;else{let Ms=pi*h2(pi);As.x=Math.abs(Ms)<Math.abs(pi)?Ms:pi}}if(Math.abs(As.x)>0||Math.abs(As.y)>0)It(!0);(xo=Ao.current)==null||xo.style.setProperty("--swipe-amount-x",`${As.x}px`),(la=Ao.current)==null||la.style.setProperty("--swipe-amount-y",`${As.y}px`)}},Fe&&!I.jsx&&or!=="loading"?ct("button",{"aria-label":Ce,"data-disabled":Rr,"data-close-button":!0,onClick:Rr||!mi?()=>{}:()=>{ir(),I.onDismiss==null||I.onDismiss.call(I,I)},className:gl(Te==null?void 0:Te.closeButton,I==null?void 0:(u=I.classNames)==null?void 0:u.closeButton)},(A4=me==null?void 0:me.close)!=null?A4:Pfe):null,(or||I.icon||I.promise)&&I.icon!==null&&((me==null?void 0:me[or])!==null||I.icon)?ct("div",{"data-icon":"",className:gl(Te==null?void 0:Te.icon,I==null?void 0:(f=I.classNames)==null?void 0:f.icon)},or==="loading"?I.icon||sa():I.promise?sa():null,or!=="loading"?yb:null):null,ct("div",{"data-content":"",className:gl(Te==null?void 0:Te.content,I==null?void 0:(m=I.classNames)==null?void 0:m.content)},ct("div",{"data-title":"",className:gl(Te==null?void 0:Te.title,I==null?void 0:(p=I.classNames)==null?void 0:p.title)},I.jsx?I.jsx:typeof I.title==="function"?I.title():I.title),I.description?ct("div",{"data-description":"",className:gl(ce,Tt,Te==null?void 0:Te.description,I==null?void 0:(g=I.classNames)==null?void 0:g.description)},typeof I.description==="function"?I.description():I.description):null),eo(I.cancel)?I.cancel:I.cancel&&Vk(I.cancel)?ct("button",{"data-button":!0,"data-cancel":!0,style:I.cancelButtonStyle||U,onClick:($t)=>{if(!Vk(I.cancel))return;if(!mi)return;I.cancel.onClick==null||I.cancel.onClick.call(I.cancel,$t),ir()},className:gl(Te==null?void 0:Te.cancelButton,I==null?void 0:(v=I.classNames)==null?void 0:v.cancelButton)},I.cancel.label):null,eo(I.action)?I.action:I.action&&Vk(I.action)?ct("button",{"data-button":!0,"data-action":!0,style:I.actionButtonStyle||Y,onClick:($t)=>{if(!Vk(I.action))return;if(I.action.onClick==null||I.action.onClick.call(I.action,$t),$t.defaultPrevented)return;ir()},className:gl(Te==null?void 0:Te.actionButton,I==null?void 0:(k=I.classNames)==null?void 0:k.actionButton)},I.action.label):null)};function IU(){if(typeof window>"u")return"ltr";if(typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");if(t==="auto"||!t)return window.getComputedStyle(document.documentElement).direction;return t}function Wfe(t,a){let c={};return[t,a].forEach((u,f)=>{let m=f===1,p=m?"--mobile-offset":"--offset",g=m?Ufe:Vfe;function v(k){["top","right","bottom","left"].forEach((S)=>{c[`${p}-${S}`]=typeof k==="number"?`${k}px`:k})}if(typeof u==="number"||typeof u==="string")v(u);else if(typeof u==="object")["top","right","bottom","left"].forEach((k)=>{if(u[k]===void 0)c[`${p}-${k}`]=g;else c[`${p}-${k}`]=typeof u[k]==="number"?`${u[k]}px`:u[k]});else v(g)}),c}var LU=_e(function(a,c){let{id:u,invert:f,position:m="bottom-right",hotkey:p=["altKey","KeyT"],expand:g,closeButton:v,className:k,offset:S,mobileOffset:I,theme:T="light",richColors:L,duration:R,style:A,visibleToasts:E=Ffe,toastOptions:P,dir:D=IU(),gap:N=Hfe,icons:O,customAriaLabel:F,containerAriaLabel:z="Notifications"}=a,[B,U]=r([]),Y=w(()=>{if(u)return B.filter((Me)=>Me.toasterId===u);return B.filter((Me)=>!Me.toasterId)},[B,u]),G=w(()=>Array.from(new Set([m].concat(Y.filter((Me)=>Me.position).map((Me)=>Me.position)))),[Y,m]),[ce,re]=r([]),[Q,ae]=r(!1),[xe,Te]=r(!1),[me,Ce]=r(T!=="system"?T:typeof window<"u"?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"light"),Be=i(null),X=p.join("+").replace(/Key/g,"").replace(/Digit/g,""),He=i(null),Le=i(!1),J=y((Me)=>{U((Ie)=>{var qe;if(!((qe=Ie.find((Qe)=>Qe.id===Me.id))==null?void 0:qe.delete))Na.dismiss(Me.id);return Ie.filter(({id:Qe})=>Qe!==Me.id)})},[]);return o(()=>Na.subscribe((Me)=>{if(Me.dismiss){requestAnimationFrame(()=>{U((Ie)=>Ie.map((qe)=>qe.id===Me.id?{...qe,delete:!0}:qe))});return}setTimeout(()=>{kd(()=>{U((Ie)=>{let qe=Ie.findIndex((Qe)=>Qe.id===Me.id);if(qe!==-1)return[...Ie.slice(0,qe),{...Ie[qe],...Me},...Ie.slice(qe+1)];return[Me,...Ie]})})})}),[]),o(()=>{if(T!=="system"){Ce(T);return}if(T==="system")if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)Ce("dark");else Ce("light");if(typeof window>"u")return;let Me=window.matchMedia("(prefers-color-scheme: dark)");try{Me.addEventListener("change",({matches:Ie})=>{if(Ie)Ce("dark");else Ce("light")})}catch(Ie){Me.addListener(({matches:qe})=>{try{if(qe)Ce("dark");else Ce("light")}catch(Qe){console.error(Qe)}})}},[T]),o(()=>{if(B.length<=1)ae(!1)},[B]),o(()=>{let Me=(Ie)=>{var qe;if(p.length>0&&p.every((Ne)=>Ie[Ne]||Ie.code===Ne)){var Re;ae(!0),(Re=Be.current)==null||Re.focus()}if(Ie.code==="Escape"&&(document.activeElement===Be.current||((qe=Be.current)==null?void 0:qe.contains(document.activeElement))))ae(!1)};return document.addEventListener("keydown",Me),()=>document.removeEventListener("keydown",Me)},[p]),o(()=>{if(Be.current)return()=>{if(He.current)He.current.focus({preventScroll:!0}),He.current=null,Le.current=!1}},[Be.current]),ct("section",{ref:c,"aria-label":F!=null?F:`${z} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},G.map((Me,Ie)=>{var qe;let[Qe,Re]=Me.split("-");if(!Y.length)return null;return ct("ol",{key:Me,dir:D==="auto"?IU():D,tabIndex:-1,ref:Be,className:k,"data-sonner-toaster":!0,"data-sonner-theme":me,"data-y-position":Qe,"data-x-position":Re,style:{"--front-toast-height":`${((qe=ce[0])==null?void 0:qe.height)||0}px`,"--width":`${qfe}px`,"--gap":`${N}px`,...A,...Wfe(S,I)},onBlur:(Ne)=>{if(Le.current&&!Ne.currentTarget.contains(Ne.relatedTarget)){if(Le.current=!1,He.current)He.current.focus({preventScroll:!0}),He.current=null}},onFocus:(Ne)=>{if(Ne.target instanceof HTMLElement&&Ne.target.dataset.dismissible==="false")return;if(!Le.current)Le.current=!0,He.current=Ne.relatedTarget},onMouseEnter:()=>ae(!0),onMouseMove:()=>ae(!0),onMouseLeave:()=>{if(!xe)ae(!1)},onDragEnd:()=>ae(!1),onPointerDown:(Ne)=>{if(Ne.target instanceof HTMLElement&&Ne.target.dataset.dismissible==="false")return;Te(!0)},onPointerUp:()=>Te(!1)},Y.filter((Ne)=>!Ne.position&&Ie===0||Ne.position===Me).map((Ne,ut)=>{var kt,It;return ct(Kfe,{key:Ne.id,icons:O,index:ut,toast:Ne,defaultRichColors:L,duration:(kt=P==null?void 0:P.duration)!=null?kt:R,className:P==null?void 0:P.className,descriptionClassName:P==null?void 0:P.descriptionClassName,invert:f,visibleToasts:E,closeButton:(It=P==null?void 0:P.closeButton)!=null?It:v,interacting:xe,position:Me,style:P==null?void 0:P.style,unstyled:P==null?void 0:P.unstyled,classNames:P==null?void 0:P.classNames,cancelButtonStyle:P==null?void 0:P.cancelButtonStyle,actionButtonStyle:P==null?void 0:P.actionButtonStyle,closeButtonAriaLabel:P==null?void 0:P.closeButtonAriaLabel,removeToast:J,toasts:Y.filter((Ee)=>Ee.position==Ne.position),heights:ce.filter((Ee)=>Ee.position==Ne.position),setHeights:re,expandByDefault:g,gap:N,expanded:Q,swipeDirections:a.swipeDirections})}))}))});function Lv(t){return`connection:${t}`}function RU(t,a){return`plugin-web:${t}:${a}`}var Xfe="basalt-cache",bE="kv",sm=typeof indexedDB>"u"?void 0:Yfe();function Yfe(){let t,a=()=>(t??=new Promise((u,f)=>{let m=indexedDB.open(Xfe,1);m.onupgradeneeded=()=>m.result.createObjectStore(bE),m.onsuccess=()=>u(m.result),m.onerror=()=>f(m.error)}),t.catch(()=>{return}),t),c=(u,f)=>a().then((m)=>new Promise((p,g)=>{let v=f(m.transaction(bE,u).objectStore(bE));v.onsuccess=()=>p(v.result),v.onerror=()=>g(v.error)}));return{get:(u)=>c("readonly",(f)=>f.get(u)).catch(()=>{return}),set:(u,f)=>c("readwrite",(m)=>m.put(f,u)).catch(()=>{return}),delete:(u)=>c("readwrite",(f)=>f.delete(u)).catch(()=>{return})}}function Vr(t=crypto){if(t.randomUUID)return t.randomUUID();let a=t.getRandomValues(new Uint8Array(16));a[6]=(a[6]??0)&15|64,a[8]=(a[8]??0)&63|128;let c=Array.from(a,(u)=>u.toString(16).padStart(2,"0")).join("");return`${c.slice(0,8)}-${c.slice(8,12)}-${c.slice(12,16)}-${c.slice(16,20)}-${c.slice(20)}`}function di(t,a){let c=new Headers;for(let[u,f]of Object.entries(t.headers??{})){if(!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(u))throw Error("请求头名称必须是非空的合法 HTTP 名称");try{new Headers([[u,f]])}catch{throw Error(`请求头「${u}」的值无效`)}if(["authorization","content-type"].includes(u.toLowerCase()))continue;c.set(u,f)}if(new Headers(a).forEach((u,f)=>{c.set(f,u)}),t.token)c.set("authorization",`Bearer ${t.token}`);return c}function yE(t){let a=Object.create(null);for(let c of t){if(!c.name.trim()&&!c.value.trim())continue;let u=c.name;if(Object.keys(a).some((f)=>f.toLowerCase()===u.toLowerCase()))throw Error(`请求头「${u}」重复`);a[u]=c.value}return di({headers:a}),a}var PU="basalt.servers";function Qfe(){try{let t=JSON.parse(localStorage.getItem(PU)??"[]");return Array.isArray(t)?t:[]}catch{return[]}}var go=Tr(Qfe());go.subscribe((t)=>{try{localStorage.setItem(PU,JSON.stringify(t))}catch{}});function Ls(t){let a=t.trim().replace(/\/+$/,"");if(/^https?:\/\//.test(a))return a;return`${/^(127\.0\.0\.1|localhost|\[::1\])(?::\d+)?(?:\/|$)/i.test(a)?"http":"https"}://${a}`}function kh(t){try{let a=new URL(Ls(t));return a.hostname==="127.0.0.1"||a.hostname==="localhost"||a.hostname==="[::1]"}catch{return!1}}function zn(t){if(!kh(t.url))return t.name;let a=new URL(Ls(t.url)).port;if(!a)return"本地";return`本地(${a})`}async function nd(t,a,c=15000){let u=await fetch(`${t}/api/info`,{headers:di({headers:a}),signal:AbortSignal.timeout(c)});if(!u.ok)throw Error(u.status===403?"当前网页未被允许访问该服务器":`服务器响应异常(HTTP ${u.status})`);return wE(await u.json())}function wE(t){let a=t;if(typeof a?.version!=="string"||typeof a?.auth!=="boolean")throw Error("无效的服务器响应");return a}async function rd(t,a,c,u){t=Ls(t);let f=u??await nd(t,c),m=Vr(),p;if(f.auth)if(!a&&f.localApproval){let v=await fetch(`${t}/api/pair/approve`,{method:"POST",headers:di({headers:c},{"content-type":"application/json"}),signal:AbortSignal.timeout(75000),body:JSON.stringify({device:EU()})});if(!v.ok)throw Error(v.status===403?"连接请求被拒绝":`授权失败(${v.status})`);let k=await v.json();m=k.deviceID,p=k.token}else{if(!a)throw Error("这台服务器需要配对码");let v=await fetch(`${t}/api/pair`,{method:"POST",headers:di({headers:c},{"content-type":"application/json"}),signal:AbortSignal.timeout(15000),body:JSON.stringify({code:a,device:EU()})});if(!v.ok)throw Error(v.status===401?"配对码无效或已过期":`配对失败(${v.status})`);let k=await v.json();m=k.deviceID,p=k.token}let g={id:m,url:t,name:new URL(t).host,token:p,headers:c};return go.set((v)=>[...v.filter((k)=>k.url!==t),g]),g}function AU(t){go.set((a)=>a.filter((c)=>c.id!==t)),sm?.delete(Lv(t))}function Dc(t){return t.toUpperCase().replace(/[^0-9A-Z]/g,"").slice(0,8)}function MU(t){try{let a=atob(t.replace(/-/g,"+").replace(/_/g,"/")),c=JSON.parse(new TextDecoder().decode(Uint8Array.from(a,(u)=>u.charCodeAt(0))));return typeof c.server==="string"&&typeof c.code==="string"?c:void 0}catch{return}}function Sh(t){let a=t.trim();if(!a)return;let c=/#pair=([\w-]+)/.exec(a);if(c?.[1]){let m=MU(c[1]);if(m)return{server:Ls(m.server),code:Dc(m.code)}}let u=/(https?:\/\/[^\s"'<>#]+)/i.exec(a),f=/(?:^|[^0-9A-Z])([0-9A-Z]{4}-[0-9A-Z]{4})(?=$|[^0-9A-Z])/i.exec(a);if(u?.[1]||f?.[1])return{server:u?.[1]?Ls(u[1]):void 0,code:f?.[1]?Dc(f[1]):void 0};if(/^[0-9A-Z]{4}[-\s]?[0-9A-Z]{4}$/i.test(a))return{code:Dc(a)};return}function Uk(){if(typeof location>"u")return;let t=/^#pair=([\w-]+)$/.exec(location.hash);if(!t?.[1])return;return history.replaceState(null,"",location.pathname+location.search),MU(t[1])}function EU(){let t=navigator.userAgent,a=/iPhone|iPad/.test(t)?"iOS":/Android/.test(t)?"Android":/Mac/.test(t)?"macOS":/Windows/.test(t)?"Windows":"Linux";return`${/Edg\//.test(t)?"Edge":/Chrome\//.test(t)?"Chrome":/Safari\//.test(t)?"Safari":"Browser"} on ${a}`}var NU=typeof location<"u"?Zfe():Promise.resolve({});async function Zfe(){let t=Uk();if(t){let u=go.get().find((f)=>f.url===Ls(t.server));if(u?.token)return{selected:u.id};if(!kh(t.server))return{prompt:{url:t.server,code:t.code}};try{return{selected:(await rd(t.server,t.code)).id}}catch(f){return{prompt:{url:t.server,error:ot(f)}}}}let a=location.origin,c=go.get().find((u)=>u.url===a);if(c)return{selected:c.id};if(!a.startsWith("http"))return{};if(a!==p7)try{let u=await Jfe()??await nd(a);if((!u.auth||Boolean(u.localApproval))&&!DU())try{return{selected:(await rd(a,void 0,void 0,u)).id}}catch(m){return go.get().length?{}:{prompt:{url:a,error:ot(m)}}}return go.get().length?{}:{prompt:{url:a,localApproval:Boolean(u.localApproval)}}}catch{}if(go.get().length>0)return{};try{let u=await nd(Du);if((!u.auth||Boolean(u.localApproval))&&!DU())try{return{selected:(await rd(Du)).id}}catch(m){return{prompt:{url:Du,error:ot(m),localApproval:Boolean(u.localApproval)}}}return{prompt:{url:Du,localApproval:Boolean(u.localApproval)}}}catch{return{prompt:{url:Du}}}}async function Jfe(){let t=window.__basaltInfo;if(!t)return;try{return wE(await t)}catch{return}}function DU(){try{return localStorage.getItem("basalt.servers")!==null&&go.get().length===0}catch{return!1}}function ot(t){if(t instanceof TypeError)return"无法连接到服务器,请确认服务已启动";return t instanceof Error?t.message:String(t)}function kE(){let t=_(),a=typeof matchMedia<"u"&&matchMedia("(max-width: 639px)").matches,c={top:"calc(env(safe-area-inset-top) + 16px)",right:16,bottom:16,left:16};return e(LU,{theme:t.resolved,position:a?"top-center":"bottom-right",gap:8,offset:c,mobileOffset:c,toastOptions:{unstyled:!0,classNames:{toast:l("toast.item","w-[var(--width)] py-3"),title:"font-medium leading-5",description:"mt-0.5 text-dim leading-5",icon:"mt-0.5 [&_svg]:size-4",error:l("toast.danger","[&_[data-icon]]:text-danger"),success:"[&_[data-icon]]:text-success",actionButton:"ml-auto shrink-0 rounded-md bg-ink px-2 py-1 text-xs font-medium text-bg",cancelButton:"shrink-0 rounded-md px-2 py-1 text-xs text-dim hover:bg-raised"}}})}function V(t,a){if(a)le.error(a,{description:ot(t)});else le.error(ot(t))}function fn(){}function qk(){}function Wo(t,a){let c=a||{};return(t[t.length-1]===""?[...t,""]:t).join((c.padRight?" ":"")+","+(c.padLeft===!1?"":" ")).trim()}var eme=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tme=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nme={};function Hk(t,a){return((a||nme).jsx?tme:eme).test(t)}var rme=/[ \t\n\f\r]/g;function gr(t){return typeof t==="object"?t.type==="text"?OU(t.value):!1:OU(t)}function OU(t){return t.replace(rme,"")===""}class od{constructor(t,a,c){if(this.normal=a,this.property=t,c)this.space=c}}od.prototype.normal={};od.prototype.property={};od.prototype.space=void 0;function SE(t,a){let c={},u={};for(let f of t)Object.assign(c,f.property),Object.assign(u,f.normal);return new od(c,u,a)}function Rv(t){return t.toLowerCase()}class Eo{constructor(t,a){this.attribute=a,this.property=t}}Eo.prototype.attribute="";Eo.prototype.booleanish=!1;Eo.prototype.boolean=!1;Eo.prototype.commaOrSpaceSeparated=!1;Eo.prototype.commaSeparated=!1;Eo.prototype.defined=!1;Eo.prototype.mustUseProperty=!1;Eo.prototype.number=!1;Eo.prototype.overloadedBoolean=!1;Eo.prototype.property="";Eo.prototype.spaceSeparated=!1;Eo.prototype.space=void 0;var ome=0,qt=lm(),xr=lm(),jk=lm(),We=lm(),Tn=lm(),Nc=lm(),Oa=lm();function lm(){return 2**++ome}var CE=Object.keys(Ev);class Ch extends Eo{constructor(t,a,c,u){let f=-1;super(t,a);if(_U(this,"space",u),typeof c==="number")while(++f<CE.length){let m=CE[f];_U(this,CE[f],(c&Ev[m])===Ev[m])}}}Ch.prototype.defined=!0;function _U(t,a,c){if(c)t[a]=c}function Gi(t){let a={},c={};for(let[u,f]of Object.entries(t.properties)){let m=new Ch(u,t.transform(t.attributes||{},u),f,t.space);if(t.mustUseProperty&&t.mustUseProperty.includes(u))m.mustUseProperty=!0;a[u]=m,c[Rv(u)]=u,c[Rv(m.attribute)]=u}return new od(a,c,t.space)}var IE=Gi({properties:{ariaActiveDescendant:null,ariaAtomic:xr,ariaAutoComplete:null,ariaBusy:xr,ariaChecked:xr,ariaColCount:We,ariaColIndex:We,ariaColSpan:We,ariaControls:Tn,ariaCurrent:null,ariaDescribedBy:Tn,ariaDetails:null,ariaDisabled:xr,ariaDropEffect:Tn,ariaErrorMessage:null,ariaExpanded:xr,ariaFlowTo:Tn,ariaGrabbed:xr,ariaHasPopup:null,ariaHidden:xr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Tn,ariaLevel:We,ariaLive:null,ariaModal:xr,ariaMultiLine:xr,ariaMultiSelectable:xr,ariaOrientation:null,ariaOwns:Tn,ariaPlaceholder:null,ariaPosInSet:We,ariaPressed:xr,ariaReadOnly:xr,ariaRelevant:null,ariaRequired:xr,ariaRoleDescription:Tn,ariaRowCount:We,ariaRowIndex:We,ariaRowSpan:We,ariaSelected:xr,ariaSetSize:We,ariaSort:null,ariaValueMax:We,ariaValueMin:We,ariaValueNow:We,ariaValueText:null,role:null},transform(t,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()}});function Gk(t,a){return a in t?t[a]:a}function $k(t,a){return Gk(t,a.toLowerCase())}var zU=Gi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Nc,acceptCharset:Tn,accessKey:Tn,action:null,allow:null,allowFullScreen:qt,allowPaymentRequest:qt,allowUserMedia:qt,alpha:qt,alt:null,as:null,async:qt,autoCapitalize:null,autoComplete:Tn,autoFocus:qt,autoPlay:qt,blocking:Tn,capture:null,charSet:null,checked:qt,cite:null,className:Tn,closedBy:null,colorSpace:null,cols:We,colSpan:We,command:null,commandFor:null,content:null,contentEditable:xr,controls:qt,controlsList:Tn,coords:We|Nc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qt,defer:qt,dir:null,dirName:null,disabled:qt,download:jk,draggable:xr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qt,formTarget:null,headers:Tn,height:We,hidden:jk,high:We,href:null,hrefLang:null,htmlFor:Tn,httpEquiv:Tn,id:null,imageSizes:null,imageSrcSet:null,inert:qt,inputMode:null,integrity:null,is:null,isMap:qt,itemId:null,itemProp:Tn,itemRef:Tn,itemScope:qt,itemType:Tn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qt,low:We,manifest:null,max:null,maxLength:We,media:null,method:null,min:null,minLength:We,multiple:qt,muted:qt,name:null,nonce:null,noModule:qt,noValidate:qt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:qt,optimum:We,pattern:null,ping:Tn,placeholder:null,playsInline:qt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qt,referrerPolicy:null,rel:Tn,required:qt,reversed:qt,rows:We,rowSpan:We,sandbox:Tn,scope:null,scoped:qt,seamless:qt,selected:qt,shadowRootClonable:qt,shadowRootCustomElementRegistry:qt,shadowRootDelegatesFocus:qt,shadowRootMode:null,shadowRootSerializable:qt,shape:null,size:We,sizes:null,slot:null,span:We,spellCheck:xr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:We,step:null,style:null,tabIndex:We,target:null,title:null,translate:null,type:null,typeMustMatch:qt,useMap:null,value:xr,width:We,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Tn,axis:null,background:null,bgColor:null,border:We,borderColor:null,bottomMargin:We,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qt,declare:qt,event:null,face:null,frame:null,frameBorder:null,hSpace:We,leftMargin:We,link:null,longDesc:null,lowSrc:null,marginHeight:We,marginWidth:We,noResize:qt,noHref:qt,noShade:qt,noWrap:qt,object:null,profile:null,prompt:null,rev:null,rightMargin:We,rules:null,scheme:null,scrolling:xr,standby:null,summary:null,text:null,topMargin:We,valueType:null,version:null,vAlign:null,vLink:null,vSpace:We,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:qt,disablePictureInPicture:qt,disableRemotePlayback:qt,exportParts:Nc,part:Tn,prefix:null,property:null,results:We,security:null,unselectable:null},space:"html",transform:$k});var BU=Gi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Oa,accentHeight:We,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:We,amplitude:We,arabicForm:null,ascent:We,attributeName:null,attributeType:null,azimuth:We,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:We,by:null,calcMode:null,capHeight:We,className:Tn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:We,diffuseConstant:We,direction:null,display:null,dur:null,divisor:We,dominantBaseline:null,download:qt,dx:null,dy:null,edgeMode:null,editable:null,elevation:We,enableBackground:null,end:null,event:null,exponent:We,externalResourcesRequired:null,fill:null,fillOpacity:We,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Nc,g2:Nc,glyphName:Nc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:We,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:We,horizOriginX:We,horizOriginY:We,id:null,ideographic:We,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:We,k:We,k1:We,k2:We,k3:We,k4:We,kernelMatrix:Oa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:We,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:We,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:We,overlineThickness:We,paintOrder:null,panose1:null,path:null,pathLength:We,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Tn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:We,pointsAtY:We,pointsAtZ:We,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Oa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Oa,rev:Oa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Oa,requiredFeatures:Oa,requiredFonts:Oa,requiredFormats:Oa,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:We,specularExponent:We,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:We,strikethroughThickness:We,string:null,stroke:null,strokeDashArray:Oa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:We,strokeOpacity:We,strokeWidth:null,style:null,surfaceScale:We,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Oa,tabIndex:We,tableValues:null,target:null,targetX:We,targetY:We,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Oa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:We,underlineThickness:We,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:We,values:null,vAlphabetic:We,vMathematical:We,vectorEffect:null,vHanging:We,vIdeographic:We,version:null,vertAdvY:We,vertOriginX:We,vertOriginY:We,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:We,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Gk});var TE=Gi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,a){return"xlink:"+a.slice(5).toLowerCase()}});var LE=Gi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$k});var RE=Gi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,a){return"xml:"+a.slice(3).toLowerCase()}});var EE={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var ame=/[A-Z]/g,FU=/-[a-z]/g,ime=/^data[-\w.:]+$/i;function Ri(t,a){let c=Rv(a),u=a,f=Eo;if(c in t.normal)return t.property[t.normal[c]];if(c.length>4&&c.slice(0,4)==="data"&&ime.test(a)){if(a.charAt(4)==="-"){let m=a.slice(5).replace(FU,lme);u="data"+m.charAt(0).toUpperCase()+m.slice(1)}else{let m=a.slice(4);if(!FU.test(m)){let p=m.replace(ame,sme);if(p.charAt(0)!=="-")p="-"+p;a="data"+p}}f=Ch}return new f(u,a)}function sme(t){return"-"+t.toLowerCase()}function lme(t){return t.charAt(1).toUpperCase()}var Vo=SE([IE,zU,TE,LE,RE],"html"),zr=SE([IE,BU,TE,LE,RE],"svg");function Go(t){return t.join(" ").trim()}var nq=Ye(ZU(),1);var Kk=JU("end"),Ih=JU("start");function JU(t){return a;function a(c){let u=c&&c.position&&c.position[t]||{};if(typeof u.line==="number"&&u.line>0&&typeof u.column==="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset==="number"&&u.offset>-1?u.offset:void 0}}}function ME(t){let a=Ih(t),c=Kk(t);if(a&&c)return{start:a,end:c}}function ad(t){if(!t||typeof t!=="object")return"";if("position"in t||"type"in t)return eq(t.position);if("start"in t||"end"in t)return eq(t);if("line"in t||"column"in t)return DE(t);return""}function DE(t){return tq(t&&t.line)+":"+tq(t&&t.column)}function eq(t){return DE(t&&t.start)+"-"+DE(t&&t.end)}function tq(t){return t&&typeof t==="number"?t:1}class _r extends Error{constructor(t,a,c){super();if(typeof a==="string")c=a,a=void 0;let u="",f={},m=!1;if(a)if("line"in a&&"column"in a)f={place:a};else if("start"in a&&"end"in a)f={place:a};else if("type"in a)f={ancestors:[a],place:a.position};else f={...a};if(typeof t==="string")u=t;else if(!f.cause&&t)m=!0,u=t.message,f.cause=t;if(!f.ruleId&&!f.source&&typeof c==="string"){let g=c.indexOf(":");if(g===-1)f.ruleId=c;else f.source=c.slice(0,g),f.ruleId=c.slice(g+1)}if(!f.place&&f.ancestors&&f.ancestors){let g=f.ancestors[f.ancestors.length-1];if(g)f.place=g.position}let p=f.place&&"start"in f.place?f.place.start:f.place;this.ancestors=f.ancestors||void 0,this.cause=f.cause||void 0,this.column=p?p.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=p?p.line:void 0,this.name=ad(f.place)||"1:1",this.place=f.place||void 0,this.reason=this.message,this.ruleId=f.ruleId||void 0,this.source=f.source||void 0,this.stack=m&&f.cause&&typeof f.cause.stack==="string"?f.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}_r.prototype.file="";_r.prototype.name="";_r.prototype.reason="";_r.prototype.message="";_r.prototype.stack="";_r.prototype.column=void 0;_r.prototype.line=void 0;_r.prototype.ancestors=void 0;_r.prototype.cause=void 0;_r.prototype.fatal=void 0;_r.prototype.place=void 0;_r.prototype.ruleId=void 0;_r.prototype.source=void 0;var NE={}.hasOwnProperty,Nme=new Map,Ome=/[A-Z]/g,_me=new Set(["table","tbody","thead","tfoot","tr"]),zme=new Set(["td","th"]),rq="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function OE(t,a){if(!a||a.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let c=a.filePath||void 0,u;if(a.development){if(typeof a.jsxDEV!=="function")throw TypeError("Expected `jsxDEV` in options when `development: true`");u=Gme(c,a.jsxDEV)}else{if(typeof a.jsx!=="function")throw TypeError("Expected `jsx` in production options");if(typeof a.jsxs!=="function")throw TypeError("Expected `jsxs` in production options");u=jme(c,a.jsx,a.jsxs)}let f={Fragment:a.Fragment,ancestors:[],components:a.components||{},create:u,elementAttributeNameCase:a.elementAttributeNameCase||"react",evaluater:a.createEvaluater?a.createEvaluater():void 0,filePath:c,ignoreInvalidStyle:a.ignoreInvalidStyle||!1,passKeys:a.passKeys!==!1,passNode:a.passNode||!1,schema:a.space==="svg"?zr:Vo,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},m=oq(f,t,void 0);if(m&&typeof m!=="string")return m;return f.create(t,f.Fragment,{children:m||void 0},void 0)}function oq(t,a,c){if(a.type==="element")return Bme(t,a,c);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return Fme(t,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return Ume(t,a,c);if(a.type==="mdxjsEsm")return Vme(t,a);if(a.type==="root")return qme(t,a,c);if(a.type==="text")return Hme(t,a)}function Bme(t,a,c){let u=t.schema,f=u;if(a.tagName.toLowerCase()==="svg"&&u.space==="html")f=zr,t.schema=f;t.ancestors.push(a);let m=iq(t,a.tagName,!1),p=$me(t,a),g=zE(t,a);if(_me.has(a.tagName))g=g.filter(function(v){return typeof v==="string"?!gr(v):!0});return aq(t,p,m,a),_E(p,g),t.ancestors.pop(),t.schema=u,t.create(a,m,p,c)}function Fme(t,a){if(a.data&&a.data.estree&&t.evaluater){let u=a.data.estree.body[0];return fn(u.type==="ExpressionStatement"),t.evaluater.evaluateExpression(u.expression)}Av(t,a.position)}function Vme(t,a){if(a.data&&a.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(a.data.estree);Av(t,a.position)}function Ume(t,a,c){let u=t.schema,f=u;if(a.name==="svg"&&u.space==="html")f=zr,t.schema=f;t.ancestors.push(a);let m=a.name===null?t.Fragment:iq(t,a.name,!0),p=Kme(t,a),g=zE(t,a);return aq(t,p,m,a),_E(p,g),t.ancestors.pop(),t.schema=u,t.create(a,m,p,c)}function qme(t,a,c){let u={};return _E(u,zE(t,a)),t.create(a,t.Fragment,u,c)}function Hme(t,a){return a.value}function aq(t,a,c,u){if(typeof c!=="string"&&c!==t.Fragment&&t.passNode)a.node=u}function _E(t,a){if(a.length>0){let c=a.length>1?a:a[0];if(c)t.children=c}}function jme(t,a,c){return u;function u(f,m,p,g){let k=Array.isArray(p.children)?c:a;return g?k(m,p,g):k(m,p)}}function Gme(t,a){return c;function c(u,f,m,p){let g=Array.isArray(m.children),v=Ih(u);return a(f,m,p,g,{columnNumber:v?v.column-1:void 0,fileName:t,lineNumber:v?v.line:void 0},void 0)}}function $me(t,a){let c={},u,f;for(f in a.properties)if(f!=="children"&&NE.call(a.properties,f)){let m=Wme(t,f,a.properties[f]);if(m){let[p,g]=m;if(t.tableCellAlignToStyle&&p==="align"&&typeof g==="string"&&zme.has(a.tagName))u=g;else c[p]=g}}if(u){let m=c.style||(c.style={});m[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return c}function Kme(t,a){let c={};for(let u of a.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&t.evaluater){let m=u.data.estree.body[0];fn(m.type==="ExpressionStatement");let p=m.expression;fn(p.type==="ObjectExpression");let g=p.properties[0];fn(g.type==="SpreadElement"),Object.assign(c,t.evaluater.evaluateExpression(g.argument))}else Av(t,a.position);else{let f=u.name,m;if(u.value&&typeof u.value==="object")if(u.value.data&&u.value.data.estree&&t.evaluater){let g=u.value.data.estree.body[0];fn(g.type==="ExpressionStatement"),m=t.evaluater.evaluateExpression(g.expression)}else Av(t,a.position);else m=u.value===null?!0:u.value;c[f]=m}return c}function zE(t,a){let c=[],u=-1,f=t.passKeys?new Map:Nme;while(++u<a.children.length){let m=a.children[u],p;if(t.passKeys){let v=m.type==="element"?m.tagName:m.type==="mdxJsxFlowElement"||m.type==="mdxJsxTextElement"?m.name:void 0;if(v){let k=f.get(v)||0;p=v+"-"+k,f.set(v,k+1)}}let g=oq(t,m,p);if(g!==void 0)c.push(g)}return c}function Wme(t,a,c){let u=Ri(t.schema,a);if(c===null||c===void 0||typeof c==="number"&&Number.isNaN(c))return;if(Array.isArray(c))c=u.commaSeparated?Wo(c):Go(c);if(u.property==="style"){let f=typeof c==="object"?c:Xme(t,String(c));if(t.stylePropertyNameCase==="css")f=Yme(f);return["style",f]}return[t.elementAttributeNameCase==="react"&&u.space?EE[u.property]||u.property:u.attribute,c]}function Xme(t,a){try{return nq.default(a,{reactCompat:!0})}catch(c){if(t.ignoreInvalidStyle)return{};let u=c,f=new _r("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:u,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw f.file=t.filePath||void 0,f.url=rq+"#cannot-parse-style-attribute",f}}function iq(t,a,c){let u;if(!c)u={type:"Literal",value:a};else if(a.includes(".")){let f=a.split("."),m=-1,p;while(++m<f.length){let g=Hk(f[m])?{type:"Identifier",name:f[m]}:{type:"Literal",value:f[m]};p=p?{type:"MemberExpression",object:p,property:g,computed:Boolean(m&&g.type==="Literal"),optional:!1}:g}fn(p,"always a result"),u=p}else u=Hk(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(u.type==="Literal"){let f=u.value;return NE.call(t.components,f)?t.components[f]:f}if(t.evaluater)return t.evaluater.evaluateExpression(u);Av(t)}function Av(t,a){let c=new _r("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:a,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw c.file=t.filePath||void 0,c.url=rq+"#cannot-handle-mdx-estrees-without-createevaluater",c}function Yme(t){let a={},c;for(c in t)if(NE.call(t,c))a[Qme(c)]=t[c];return a}function Qme(t){let a=t.replace(Ome,Zme);if(a.slice(0,3)==="ms-")a="-"+a;return a}function Zme(t){return"-"+t.toLowerCase()}var Mv={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};var Jme={};function um(t,a){let c=a||Jme,u=typeof c.includeImageAlt==="boolean"?c.includeImageAlt:!0,f=typeof c.includeHtml==="boolean"?c.includeHtml:!0;return lq(t,u,f)}function lq(t,a,c){if(epe(t)){if("value"in t)return t.type==="html"&&!c?"":t.value;if(a&&"alt"in t&&t.alt)return t.alt;if("children"in t)return sq(t.children,a,c)}if(Array.isArray(t))return sq(t,a,c);return""}function sq(t,a,c){let u=[],f=-1;while(++f<t.length)u[f]=lq(t[f],a,c);return u.join("")}function epe(t){return Boolean(t&&typeof t==="object")}var cq=document.createElement("i");function Th(t){let a="&"+t+";";cq.innerHTML=a;let c=cq.textContent;if(c.charCodeAt(c.length-1)===59&&t!=="semi")return!1;return c===a?!1:c}function Hr(t,a,c,u){let f=t.length,m=0,p;if(a<0)a=-a>f?0:f+a;else a=a>f?f:a;if(c=c>0?c:0,u.length<1e4)p=Array.from(u),p.unshift(a,c),t.splice(...p);else{if(c)t.splice(a,c);while(m<u.length)p=u.slice(m,m+1e4),p.unshift(a,0),t.splice(...p),m+=1e4,a+=1e4}}function Lr(t,a){if(t.length>0)return Hr(t,t.length,0,a),t;return a}var uq={}.hasOwnProperty;function Wk(t){let a={},c=-1;while(++c<t.length)tpe(a,t[c]);return a}function tpe(t,a){let c;for(c in a){let f=(uq.call(t,c)?t[c]:void 0)||(t[c]={}),m=a[c],p;if(m)for(p in m){if(!uq.call(f,p))f[p]=[];let g=m[p];npe(f[p],Array.isArray(g)?g:g?[g]:[])}}}function npe(t,a){let c=-1,u=[];while(++c<a.length)(a[c].add==="after"?t:u).push(a[c]);Hr(t,0,0,u)}function Xk(t,a){let c=Number.parseInt(t,a);if(c<9||c===11||c>13&&c<32||c>126&&c<160||c>55295&&c<57344||c>64975&&c<65008||(c&65535)===65535||(c&65535)===65534||c>1114111)return"�";return String.fromCodePoint(c)}function zo(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Jr=id(/[A-Za-z]/),vr=id(/[\dA-Za-z]/),dq=id(/[#-'*+\--9=?A-Z^-~]/);function dm(t){return t!==null&&(t<32||t===127)}var Dv=id(/\d/),fq=id(/[\dA-Fa-f]/),mq=id(/[!-/:-@[-`{-~]/);function rt(t){return t!==null&&t<-2}function nn(t){return t!==null&&(t<0||t===32)}function Rt(t){return t===-2||t===-1||t===32}var fm=id(/\p{P}|\p{S}/u),Il=id(/\s/);function id(t){return a;function a(c){return c!==null&&c>-1&&t.test(String.fromCharCode(c))}}function Ki(t){let a=[],c=-1,u=0,f=0;while(++c<t.length){let m=t.charCodeAt(c),p="";if(m===37&&vr(t.charCodeAt(c+1))&&vr(t.charCodeAt(c+2)))f=2;else if(m<128){if(!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(m)))p=String.fromCharCode(m)}else if(m>55295&&m<57344){let g=t.charCodeAt(c+1);if(m<56320&&g>56319&&g<57344)p=String.fromCharCode(m,g),f=1;else p="�"}else p=String.fromCharCode(m);if(p)a.push(t.slice(u,c),encodeURIComponent(p)),u=c+f+1,p="";if(f)c+=f,f=0}return a.join("")+t.slice(u)}function Lt(t,a,c,u){let f=u?u-1:1/0,m=0;return p;function p(v){if(Rt(v))return t.enter(c),g(v);return a(v)}function g(v){if(Rt(v)&&m++<f)return t.consume(v),g;return t.exit(c),a(v)}}function BE(t,a,c,u,f,m){let p=0;return g;function g(S){if(m>0&&Rt(S))return t.enter(u),v(S);return k(S)}function v(S){if(Rt(S)&&p<m)return t.consume(S),p++,v;return t.exit(u),k(S)}function k(S){return p>=f?a(S):c(S)}}var pq={tokenize:rpe};function rpe(t){let a=t.attempt(this.parser.constructs.contentInitial,u,f),c;return a;function u(g){if(g===null){t.consume(g);return}return t.enter("lineEnding"),t.consume(g),t.exit("lineEnding"),Lt(t,a,"linePrefix")}function f(g){return t.enter("paragraph"),m(g)}function m(g){let v=t.enter("chunkText",{contentType:"text",previous:c});if(c)c.next=v;return c=v,p(g)}function p(g){if(g===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(g);return}if(rt(g))return t.consume(g),t.exit("chunkText"),m;return t.consume(g),p}}class sd{constructor(){this.index=new Map,this.map=[]}add(t,a,c){hq(this,t,a,c,!1)}addBefore(t,a,c){hq(this,t,a,c,!0)}consume(t){if(this.map.sort(function(f,m){return f[0]-m[0]}),this.map.length===0)return;let a=this.map.length,c=[];while(a>0)a-=1,c.push(t.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),t.length=this.map[a][0];c.push(t.slice()),t.length=0;let u=c.pop();while(u){for(let f of u)t.push(f);u=c.pop()}this.map.length=0,this.index.clear()}}function hq(t,a,c,u,f){if(c===0&&u.length===0)return;let m=t.index.get(a);if(m){if(m[1]+=c,f)u.push(...m[2]),m[2]=u;else m[2].push(...u);return}let p=[a,c,u];t.map.push(p),t.index.set(a,p)}var xq={tokenize:ope},gq={tokenize:ape};function ope(t){let a=this,c=[],u=0,f,m,p;return g;function g(N){if(u<c.length){let O=c[u];return a.containerState=O[1],t.attempt(O[0].continuation,v,k)(N)}return k(N)}function v(N){if(u++,a.containerState._closeFlow){if(a.containerState._closeFlow=void 0,f)D();let O=a.events.length,F=O,z;while(F--)if(a.events[F][0]==="exit"&&a.events[F][1].type==="chunkFlow"){z=a.events[F][1].end;break}P(u);let B=O;while(B<a.events.length)a.events[B][1].end={...z},B++;let U=new sd;return U.add(F+1,0,a.events.slice(O)),U.add(O,B-O,[]),U.consume(a.events),k(N)}return g(N)}function k(N){if(u===c.length){if(!f)return T(N);if(f.currentConstruct&&f.currentConstruct.concrete)return R(N);a.interrupt=Boolean(f.currentConstruct&&!f._gfmTableDynamicInterruptHack)}return a.containerState={},t.check(gq,S,I)(N)}function S(N){if(f)D();return P(u),T(N)}function I(N){return a.parser.lazy[a.now().line]=u!==c.length,p=a.now().offset,R(N)}function T(N){return a.containerState={},t.attempt(gq,L,R)(N)}function L(N){return u++,c.push([a.currentConstruct,a.containerState]),T(N)}function R(N){if(N===null){if(f)D();P(0),t.consume(N);return}return f=f||a.parser.flow(a.now()),t.enter("chunkFlow",{_tokenizer:f,contentType:"flow",previous:m}),A(N)}function A(N){if(N===null){E(t.exit("chunkFlow"),!0),P(0),t.consume(N);return}if(rt(N))return t.consume(N),E(t.exit("chunkFlow")),u=0,a.interrupt=void 0,g;return t.consume(N),A}function E(N,O){let F=a.sliceStream(N);if(O)F.push(null);if(N.previous=m,m)m.next=N;if(m=N,f.defineSkip(N.start),f.write(F),a.parser.lazy[N.start.line]){let z=f.events.length;while(z--)if(f.events[z][1].start.offset<p&&(!f.events[z][1].end||f.events[z][1].end.offset>p))return;let B=a.events.length,U=B,Y,G;while(U--)if(a.events[U][0]==="exit"&&a.events[U][1].type==="chunkFlow"){if(Y){G=a.events[U][1].end;break}Y=!0}P(u),z=B;while(z<a.events.length)a.events[z][1].end={...G},z++;let ce=new sd;ce.add(U+1,0,a.events.slice(B)),ce.add(B,z-B,[]),ce.consume(a.events)}}function P(N){let O=c.length;while(O-- >N){let F=c[O];a.containerState=F[1],F[0].exit.call(a,t)}c.length=N}function D(){f.write([null]),m=void 0,f=void 0,a.containerState._closeFlow=void 0}}function ape(t,a,c){return Lt(t,t.attempt(this.parser.constructs.document,a,c),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Lh(t){if(t===null||nn(t)||Il(t))return 1;if(fm(t))return 2}function Ll(t,a,c){let u=[],f=-1;while(++f<t.length){let m=t[f].resolveAll;if(m&&!u.includes(m))a=m(a,c),u.push(m)}return a}var Nv={name:"attention",resolveAll:ipe,tokenize:spe};function ipe(t,a){let c=-1,u;while(++c<t.length)if(t[c][0]==="enter"&&t[c][1].type==="attentionSequence"&&t[c][1]._close){let f=c;while(f--)if(t[f][0]==="exit"&&t[f][1].type==="attentionSequence"&&t[f][1]._open&&a.sliceSerialize(t[f][1]).charCodeAt(0)===a.sliceSerialize(t[c][1]).charCodeAt(0)){if((t[f][1]._close||t[c][1]._open)&&(t[c][1].end.offset-t[c][1].start.offset)%3&&!((t[f][1].end.offset-t[f][1].start.offset+t[c][1].end.offset-t[c][1].start.offset)%3))continue;let m=t[f][1].end.offset-t[f][1].start.offset>1&&t[c][1].end.offset-t[c][1].start.offset>1?2:1,p={...t[f][1].end},g={...t[c][1].start};vq(p,-m),vq(g,m);let v={type:m>1?"strongSequence":"emphasisSequence",start:p,end:{...t[f][1].end}},k={type:m>1?"strongSequence":"emphasisSequence",start:{...t[c][1].start},end:g},S={type:m>1?"strongText":"emphasisText",start:{...t[f][1].end},end:{...t[c][1].start}},I={type:m>1?"strong":"emphasis",start:{...v.start},end:{...k.end}};if(t[f][1].end={...v.start},t[c][1].start={...k.end},u=[],t[f][1].end.offset-t[f][1].start.offset)u=Lr(u,[["enter",t[f][1],a],["exit",t[f][1],a]]);u=Lr(u,[["enter",I,a],["enter",v,a],["exit",v,a],["enter",S,a]]),u=Lr(u,Ll(a.parser.constructs.insideSpan.null,t.slice(f+1,c),a)),u=Lr(u,[["exit",S,a],["enter",k,a],["exit",k,a],["exit",I,a]]);let T=0;if(t[c][1].end.offset-t[c][1].start.offset)T=2,u=Lr(u,[["enter",t[c][1],a],["exit",t[c][1],a]]);Hr(t,f-1,c-f+3,u),c=f+u.length-T-2;break}}c=-1;while(++c<t.length)if(t[c][1].type==="attentionSequence")t[c][1].type="data";return t}function spe(t,a){let c=this.parser.constructs.attentionMarkers.null,u=this.previous,f=Lh(u),m;return p;function p(v){return m=v,t.enter("attentionSequence"),g(v)}function g(v){if(v===m)return t.consume(v),g;let k=t.exit("attentionSequence"),S=Lh(v),I=!S||S===2&&f||c.includes(v)&&v!==42&&v!==95,T=!f||f===2&&S||c.includes(u)&&u!==42&&u!==95;return k._open=Boolean(m===42?I:I&&(f||!T)),k._close=Boolean(m===42?T:T&&(S||!I)),a(v)}}function vq(t,a){t.column+=a,t.offset+=a,t._bufferIndex+=a}var FE={name:"autolink",tokenize:lpe};function lpe(t,a,c){let u=0;return f;function f(L){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(L),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),m}function m(L){if(Jr(L))return t.consume(L),p;if(L===64)return c(L);return k(L)}function p(L){if(L===43||L===45||L===46||vr(L))return u=1,g(L);return k(L)}function g(L){if(L===58)return t.consume(L),u=0,v;if((L===43||L===45||L===46||vr(L))&&u++<32)return t.consume(L),g;return u=0,k(L)}function v(L){if(L===62)return t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(L),t.exit("autolinkMarker"),t.exit("autolink"),a;if(L===null||L===32||L===60||dm(L))return c(L);return t.consume(L),v}function k(L){if(L===64)return t.consume(L),S;if(dq(L))return t.consume(L),k;return c(L)}function S(L){return vr(L)?I(L):c(L)}function I(L){if(L===46)return t.consume(L),u=0,S;if(L===62)return t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(L),t.exit("autolinkMarker"),t.exit("autolink"),a;return T(L)}function T(L){if((L===45||vr(L))&&u++<63){let R=L===45?T:I;return t.consume(L),R}return c(L)}}var Pl={partial:!0,tokenize:cpe};function cpe(t,a,c){return u;function u(m){return Rt(m)?Lt(t,f,"linePrefix")(m):f(m)}function f(m){return m===null||rt(m)?a(m):c(m)}}var Yk={continuation:{tokenize:dpe},exit:fpe,name:"blockQuote",tokenize:upe};function upe(t,a,c){let u=this;return f;function f(p){if(p===62){let g=u.containerState;if(!g.open)t.enter("blockQuote",{_container:!0}),g.open=!0;return t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(p),t.exit("blockQuoteMarker"),m}return c(p)}function m(p){if(Rt(p))return t.enter("blockQuotePrefixWhitespace"),t.consume(p),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),a;return t.exit("blockQuotePrefix"),a(p)}}function dpe(t,a,c){let u=this;return f;function f(p){if(Rt(p))return Lt(t,m,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p);return m(p)}function m(p){return t.attempt(Yk,a,c)(p)}}function fpe(t){t.exit("blockQuote")}var Qk={name:"characterEscape",tokenize:mpe};function mpe(t,a,c){return u;function u(m){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(m),t.exit("escapeMarker"),f}function f(m){if(mq(m))return t.enter("characterEscapeValue"),t.consume(m),t.exit("characterEscapeValue"),t.exit("characterEscape"),a;return c(m)}}var Zk={name:"characterReference",tokenize:ppe};function ppe(t,a,c){let u=this,f=0,m,p;return g;function g(I){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(I),t.exit("characterReferenceMarker"),v}function v(I){if(I===35)return t.enter("characterReferenceMarkerNumeric"),t.consume(I),t.exit("characterReferenceMarkerNumeric"),k;return t.enter("characterReferenceValue"),m=31,p=vr,S(I)}function k(I){if(I===88||I===120)return t.enter("characterReferenceMarkerHexadecimal"),t.consume(I),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),m=6,p=fq,S;return t.enter("characterReferenceValue"),m=7,p=Dv,S(I)}function S(I){if(I===59&&f){let T=t.exit("characterReferenceValue");if(p===vr&&!Th(u.sliceSerialize(T)))return c(I);return t.enter("characterReferenceMarker"),t.consume(I),t.exit("characterReferenceMarker"),t.exit("characterReference"),a}if(p(I)&&f++<m)return t.consume(I),S;return c(I)}}var Ov={partial:!0,tokenize:hpe};function hpe(t,a,c){let u=this;return f;function f(p){if(p===null)return c(p);return t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),m}function m(p){return u.parser.lazy[u.now().line]?c(p):a(p)}}var Jk={concrete:!0,name:"codeFenced",tokenize:gpe};function gpe(t,a,c){let u=this,f={partial:!0,tokenize:F},m=0,p=0,g;return v;function v(z){return k(z)}function k(z){let B=u.events[u.events.length-1];return m=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,g=z,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),S(z)}function S(z){if(z===g)return p++,t.consume(z),S;if(p<3)return c(z);return t.exit("codeFencedFenceSequence"),Rt(z)?Lt(t,I,"whitespace")(z):I(z)}function I(z){if(z===null||rt(z))return t.exit("codeFencedFence"),u.interrupt?a(z):t.check(Ov,A,O)(z);return t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),T(z)}function T(z){if(z===null||rt(z))return t.exit("chunkString"),t.exit("codeFencedFenceInfo"),I(z);if(Rt(z))return t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Lt(t,L,"whitespace")(z);if(z===96&&z===g)return c(z);return t.consume(z),T}function L(z){if(z===null||rt(z))return I(z);return t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),R(z)}function R(z){if(z===null||rt(z))return t.exit("chunkString"),t.exit("codeFencedFenceMeta"),I(z);if(z===96&&z===g)return c(z);return t.consume(z),R}function A(z){return t.attempt(f,O,E)(z)}function E(z){return t.enter("lineEnding"),t.consume(z),t.exit("lineEnding"),P}function P(z){return m>0&&Rt(z)?Lt(t,D,"linePrefix",m+1)(z):D(z)}function D(z){if(z===null||rt(z))return t.check(Ov,A,O)(z);return t.enter("codeFlowValue"),N(z)}function N(z){if(z===null||rt(z))return t.exit("codeFlowValue"),D(z);return t.consume(z),N}function O(z){return t.exit("codeFenced"),a(z)}function F(z,B,U){let Y=0;return G;function G(xe){return z.enter("lineEnding"),z.consume(xe),z.exit("lineEnding"),ce}function ce(xe){return z.enter("codeFencedFence"),Rt(xe)?Lt(z,re,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(xe):re(xe)}function re(xe){if(xe===g)return z.enter("codeFencedFenceSequence"),Q(xe);return U(xe)}function Q(xe){if(xe===g)return Y++,z.consume(xe),Q;if(Y>=p)return z.exit("codeFencedFenceSequence"),Rt(xe)?Lt(z,ae,"whitespace")(xe):ae(xe);return U(xe)}function ae(xe){if(xe===null||rt(xe))return z.exit("codeFencedFence"),B(xe);return U(xe)}}}var _v={name:"codeIndented",tokenize:vpe},xpe={partial:!0,tokenize:bpe};function vpe(t,a,c){return u;function u(g){return t.enter("codeIndented"),BE(t,f,c,"linePrefix",4,4)(g)}function f(g){if(g===null)return p(g);if(rt(g))return t.attempt(xpe,f,p)(g);return t.enter("codeFlowValue"),m(g)}function m(g){if(g===null||rt(g))return t.exit("codeFlowValue"),f(g);return t.consume(g),m}function p(g){return t.exit("codeIndented"),a(g)}}function bpe(t,a,c){let u=this;return f;function f(p){if(u.parser.lazy[u.now().line])return c(p);if(rt(p))return t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),f;return BE(t,a,m,"linePrefix",4,4)(p)}function m(p){return rt(p)?f(p):c(p)}}var VE={name:"codeText",previous:wpe,resolve:ype,tokenize:kpe};function ype(t){let a=t.length-4,c=3,u,f;if((t[c][1].type==="lineEnding"||t[c][1].type==="space")&&(t[a][1].type==="lineEnding"||t[a][1].type==="space")){u=c;while(++u<a)if(t[u][1].type==="codeTextData"){t[c][1].type="codeTextPadding",t[a][1].type="codeTextPadding",c+=2,a-=2;break}}u=c-1,a++;while(++u<=a)if(f===void 0){if(u!==a&&t[u][1].type!=="lineEnding")f=u}else if(u===a||t[u][1].type==="lineEnding"){if(t[f][1].type="codeTextData",u!==f+2)t[f][1].end=t[u-1][1].end,t.splice(f+2,u-f-2),a-=u-f-2,u=f+2;f=void 0}return t}function wpe(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kpe(t,a,c){let u=this,f=0,m,p;return g;function g(T){return t.enter("codeText"),t.enter("codeTextSequence"),v(T)}function v(T){if(T===96)return t.consume(T),f++,v;return t.exit("codeTextSequence"),k(T)}function k(T){if(T===null)return c(T);if(T===32)return t.enter("space"),t.consume(T),t.exit("space"),k;if(T===96)return p=t.enter("codeTextSequence"),m=0,I(T);if(rt(T))return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),k;return t.enter("codeTextData"),S(T)}function S(T){if(T===null||T===32||T===96||rt(T))return t.exit("codeTextData"),k(T);return t.consume(T),S}function I(T){if(T===96)return t.consume(T),m++,I;if(m===f)return t.exit("codeTextSequence"),t.exit("codeText"),a(T);return p.type="codeTextData",S(T)}}class UE{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");if(t<this.left.length)return this.left[t];return this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,a){let c=a===null||a===void 0?Number.POSITIVE_INFINITY:a;if(c<this.left.length)return this.left.slice(t,c);if(t>this.left.length)return this.right.slice(this.right.length-c+this.left.length,this.right.length-t+this.left.length).reverse();return this.left.slice(t).concat(this.right.slice(this.right.length-c+this.left.length).reverse())}splice(t,a,c){let u=a||0;this.setCursor(Math.trunc(t));let f=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);if(c)zv(this.left,c);return f.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),zv(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),zv(this.right,t.reverse())}setCursor(t){if(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0)return;if(t<this.left.length){let a=this.left.splice(t,Number.POSITIVE_INFINITY);zv(this.right,a.reverse())}else{let a=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);zv(this.left,a.reverse())}}}function zv(t,a){let c=0;if(a.length<1e4)t.push(...a);else while(c<a.length)t.push(...a.slice(c,c+1e4)),c+=1e4}function eS(t){let a={},c=-1,u,f,m,p,g,v,k,S=new UE(t);while(++c<S.length){while(c in a)c=a[c];if(u=S.get(c),c&&u[1].type==="chunkFlow"&&S.get(c-1)[1].type==="listItemPrefix"){if(v=u[1]._tokenizer.events,m=0,m<v.length&&v[m][1].type==="lineEndingBlank")m+=2;if(m<v.length&&v[m][1].type==="content")while(++m<v.length){if(v[m][1].type==="content")break;if(v[m][1].type==="chunkText")v[m][1]._isInFirstContentOfListItem=!0,m++}}if(u[0]==="enter"){if(u[1].contentType)Object.assign(a,Spe(S,c)),c=a[c],k=!0}else if(u[1]._container){m=c,f=void 0;while(m--)if(p=S.get(m),p[1].type==="lineEnding"||p[1].type==="lineEndingBlank"){if(p[0]==="enter"){if(f)S.get(f)[1].type="lineEndingBlank";p[1].type="lineEnding",f=m}}else if(p[1].type==="linePrefix"||p[1].type==="listItemIndent");else break;if(f)u[1].end={...S.get(f)[1].start},g=S.slice(f,c),g.unshift(u),S.splice(f,c-f+1,g)}}return Hr(t,0,Number.POSITIVE_INFINITY,S.slice(0)),!k}function Spe(t,a){let c=t.get(a)[1],u=t.get(a)[2],f=a-1,m=[],p=c._tokenizer;if(!p){if(p=u.parser[c.contentType](c.start),c._contentTypeTextTrailing)p._contentTypeTextTrailing=!0}let g=p.events,v=[],k={},S,I,T=-1,L=c,R=0,A=0,E=[A];while(L){while(t.get(++f)[1]!==L);if(m.push(f),!L._tokenizer){if(S=u.sliceStream(L),!L.next)S.push(null);if(I)p.defineSkip(L.start);if(L._isInFirstContentOfListItem)p._gfmTasklistFirstContentOfListItem=!0;if(p.write(S),L._isInFirstContentOfListItem)p._gfmTasklistFirstContentOfListItem=void 0}I=L,L=L.next}L=c;while(++T<g.length)if(g[T][0]==="exit"&&g[T-1][0]==="enter"&&g[T][1].type===g[T-1][1].type&&g[T][1].start.line!==g[T][1].end.line)A=T+1,E.push(A),L._tokenizer=void 0,L.previous=void 0,L=L.next;if(p.events=[],L)L._tokenizer=void 0,L.previous=void 0;else E.pop();T=E.length;while(T--){let P=g.slice(E[T],E[T+1]),D=m.pop();v.push([D,D+P.length-1]),t.splice(D,2,P)}v.reverse(),T=-1;while(++T<v.length)k[R+v[T][0]]=R+v[T][1],R+=v[T][1]-v[T][0]-1;return k}var qE={resolve:Ipe,tokenize:Tpe},Cpe={partial:!0,tokenize:Lpe};function Ipe(t){return eS(t),t}function Tpe(t,a){let c;return u;function u(g){return t.enter("content"),c=t.enter("chunkContent",{contentType:"content"}),f(g)}function f(g){if(g===null)return m(g);if(rt(g))return t.check(Cpe,p,m)(g);return t.consume(g),f}function m(g){return t.exit("chunkContent"),t.exit("content"),a(g)}function p(g){return t.consume(g),t.exit("chunkContent"),c.next=t.enter("chunkContent",{contentType:"content",previous:c}),c=c.next,f}}function Lpe(t,a,c){let u=this;return f;function f(p){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),Lt(t,m,"linePrefix")}function m(p){if(p===null||rt(p))return c(p);let g=u.events[u.events.length-1];if(!u.parser.constructs.disable.null.includes("codeIndented")&&g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4)return a(p);return t.interrupt(u.parser.constructs.flow,c,a)(p)}}function tS(t,a,c,u,f,m,p,g,v){let k=v||Number.POSITIVE_INFINITY,S=0;return I;function I(P){if(P===60)return t.enter(u),t.enter(f),t.enter(m),t.consume(P),t.exit(m),T;if(P===null||P===32||P===41||dm(P))return c(P);return t.enter(u),t.enter(p),t.enter(g),t.enter("chunkString",{contentType:"string"}),A(P)}function T(P){if(P===62)return t.enter(m),t.consume(P),t.exit(m),t.exit(f),t.exit(u),a;return t.enter(g),t.enter("chunkString",{contentType:"string"}),L(P)}function L(P){if(P===62)return t.exit("chunkString"),t.exit(g),T(P);if(P===null||P===60||rt(P))return c(P);return t.consume(P),P===92?R:L}function R(P){if(P===60||P===62||P===92)return t.consume(P),L;return L(P)}function A(P){if(!S&&(P===null||P===41||nn(P)))return t.exit("chunkString"),t.exit(g),t.exit(p),t.exit(u),a(P);if(S<k&&P===40)return t.consume(P),S++,A;if(P===41)return t.consume(P),S--,A;if(P===null||P===32||P===40||dm(P))return c(P);return t.consume(P),P===92?E:A}function E(P){if(P===40||P===41||P===92)return t.consume(P),A;return A(P)}}function nS(t,a,c,u,f,m){let p=this,g=0,v;return k;function k(L){return t.enter(u),t.enter(f),t.consume(L),t.exit(f),t.enter(m),S}function S(L){if(g>999||L===null||L===91||L===93&&!v||L===94&&!g&&"_hiddenFootnoteSupport"in p.parser.constructs)return c(L);if(L===93)return t.exit(m),t.enter(f),t.consume(L),t.exit(f),t.exit(u),a;if(rt(L))return t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),S;return t.enter("chunkString",{contentType:"string"}),I(L)}function I(L){if(L===null||L===91||L===93||rt(L)||g++>999)return t.exit("chunkString"),S(L);if(t.consume(L),!v)v=!Rt(L);return L===92?T:I}function T(L){if(L===91||L===92||L===93)return t.consume(L),g++,I;return I(L)}}function rS(t,a,c,u,f,m){let p;return g;function g(T){if(T===34||T===39||T===40)return t.enter(u),t.enter(f),t.consume(T),t.exit(f),p=T===40?41:T,v;return c(T)}function v(T){if(T===p)return t.enter(f),t.consume(T),t.exit(f),t.exit(u),a;return t.enter(m),k(T)}function k(T){if(T===p)return t.exit(m),v(p);if(T===null)return c(T);if(rt(T))return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),Lt(t,k,"linePrefix");return t.enter("chunkString",{contentType:"string"}),S(T)}function S(T){if(T===p||T===null||rt(T))return t.exit("chunkString"),k(T);return t.consume(T),T===92?I:S}function I(T){if(T===p||T===92)return t.consume(T),S;return S(T)}}function mm(t,a){let c;return u;function u(f){if(rt(f))return t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c=!0,u;if(Rt(f))return Lt(t,u,c?"linePrefix":"lineSuffix")(f);return a(f)}}var HE={name:"definition",tokenize:Epe},Rpe={partial:!0,tokenize:Ppe};function Epe(t,a,c){let u=this,f;return m;function m(L){return t.enter("definition"),p(L)}function p(L){return nS.call(u,t,g,c,"definitionLabel","definitionLabelMarker","definitionLabelString")(L)}function g(L){if(f=zo(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),L===58)return t.enter("definitionMarker"),t.consume(L),t.exit("definitionMarker"),v;return c(L)}function v(L){return nn(L)?mm(t,k)(L):k(L)}function k(L){return tS(t,S,c,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(L)}function S(L){return t.attempt(Rpe,I,I)(L)}function I(L){return Rt(L)?Lt(t,T,"whitespace")(L):T(L)}function T(L){if(L===null||rt(L))return t.exit("definition"),u.parser.defined.push(f),a(L);return c(L)}}function Ppe(t,a,c){return u;function u(g){return nn(g)?mm(t,f)(g):c(g)}function f(g){return rS(t,m,c,"definitionTitle","definitionTitleMarker","definitionTitleString")(g)}function m(g){return Rt(g)?Lt(t,p,"whitespace")(g):p(g)}function p(g){return g===null||rt(g)?a(g):c(g)}}var jE={name:"hardBreakEscape",tokenize:Ape};function Ape(t,a,c){return u;function u(m){return t.enter("hardBreakEscape"),t.consume(m),f}function f(m){if(rt(m))return t.exit("hardBreakEscape"),a(m);return c(m)}}var GE={name:"headingAtx",resolve:Mpe,tokenize:Dpe};function Mpe(t,a){let c=t.length-2,u=3;if(t[u][1].type==="whitespace")u+=2;if(c-2>u&&t[c][1].type==="whitespace")c-=2;if(t[c][1].type==="atxHeadingSequence"&&(u===c-1||c-4>u&&t[c-2][1].type==="whitespace"))c-=u+1===c?2:4;if(c>u){let f={type:"atxHeadingText",start:t[u][1].start,end:t[c][1].end},m={type:"chunkText",start:t[u][1].start,end:t[c][1].end,contentType:"text"};Hr(t,u,c-u+1,[["enter",f,a],["enter",m,a],["exit",m,a],["exit",f,a]])}return t}function Dpe(t,a,c){let u=0;return f;function f(S){return t.enter("atxHeading"),m(S)}function m(S){return t.enter("atxHeadingSequence"),p(S)}function p(S){if(S===35&&u++<6)return t.consume(S),p;if(S===null||nn(S))return t.exit("atxHeadingSequence"),g(S);return c(S)}function g(S){if(S===35)return t.enter("atxHeadingSequence"),v(S);if(S===null||rt(S))return t.exit("atxHeading"),a(S);if(Rt(S))return Lt(t,g,"whitespace")(S);return t.enter("atxHeadingText"),k(S)}function v(S){if(S===35)return t.consume(S),v;return t.exit("atxHeadingSequence"),g(S)}function k(S){if(S===null||S===35||nn(S))return t.exit("atxHeadingText"),g(S);return t.consume(S),k}}var bq=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$E=["pre","script","style","textarea"];var KE={concrete:!0,name:"htmlFlow",resolveTo:Ope,tokenize:_pe},Npe={partial:!0,tokenize:zpe};function Ope(t){let a=t.length;while(a--)if(t[a][0]==="enter"&&t[a][1].type==="htmlFlow")break;if(a>1&&t[a-2][1].type==="linePrefix")t[a][1].start=t[a-2][1].start,t[a+1][1].start=t[a-2][1].start,t.splice(a-2,2);return t}function _pe(t,a,c){let u=this,f,m,p,g,v;return k;function k(J){return S(J)}function S(J){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(J),I}function I(J){if(J===33)return t.consume(J),T;if(J===47)return t.consume(J),m=!0,A;if(J===63)return t.consume(J),f=3,u.interrupt?a:X;if(Jr(J))return t.consume(J),p=String.fromCharCode(J),E;return c(J)}function T(J){if(J===45)return t.consume(J),f=2,L;if(J===91)return t.consume(J),f=5,g=0,R;if(Jr(J))return t.consume(J),f=4,u.interrupt?a:X;return c(J)}function L(J){if(J===45)return t.consume(J),u.interrupt?a:X;return c(J)}function R(J){if(J==="CDATA[".charCodeAt(g++)){if(t.consume(J),g===6)return u.interrupt?a:re;return R}return c(J)}function A(J){if(Jr(J))return t.consume(J),p=String.fromCharCode(J),E;return c(J)}function E(J){if(J===null||J===47||J===62||nn(J)){let Me=J===47,Ie=p.toLowerCase();if(!Me&&!m&&$E.includes(Ie))return f=1,u.interrupt?a(J):re(J);if(bq.includes(p.toLowerCase())){if(f=6,Me)return t.consume(J),P;return u.interrupt?a(J):re(J)}return f=7,u.interrupt&&!u.parser.lazy[u.now().line]?c(J):m?D(J):N(J)}if(J===45||vr(J))return t.consume(J),p+=String.fromCharCode(J),E;return c(J)}function P(J){if(J===62)return t.consume(J),u.interrupt?a:re;return c(J)}function D(J){if(Rt(J))return t.consume(J),D;return G(J)}function N(J){if(J===47)return t.consume(J),G;if(J===58||J===95||Jr(J))return t.consume(J),O;if(Rt(J))return t.consume(J),N;return G(J)}function O(J){if(J===45||J===46||J===58||J===95||vr(J))return t.consume(J),O;return F(J)}function F(J){if(J===61)return t.consume(J),z;if(Rt(J))return t.consume(J),F;return N(J)}function z(J){if(J===null||J===60||J===61||J===62||J===96)return c(J);if(J===34||J===39)return t.consume(J),v=J,B;if(Rt(J))return t.consume(J),z;return U(J)}function B(J){if(J===v)return t.consume(J),v=null,Y;if(J===null||rt(J))return c(J);return t.consume(J),B}function U(J){if(J===null||J===34||J===39||J===47||J===60||J===61||J===62||J===96||nn(J))return F(J);return t.consume(J),U}function Y(J){if(J===47||J===62||Rt(J))return N(J);return c(J)}function G(J){if(J===62)return t.consume(J),ce;return c(J)}function ce(J){if(J===null||rt(J))return re(J);if(Rt(J))return t.consume(J),ce;return c(J)}function re(J){if(J===45&&f===2)return t.consume(J),Te;if(J===60&&f===1)return t.consume(J),me;if(J===62&&f===4)return t.consume(J),He;if(J===63&&f===3)return t.consume(J),X;if(J===93&&f===5)return t.consume(J),Be;if(rt(J)&&(f===6||f===7))return t.exit("htmlFlowData"),t.check(Npe,Le,Q)(J);if(J===null||rt(J))return t.exit("htmlFlowData"),Q(J);return t.consume(J),re}function Q(J){return t.check(Ov,ae,Le)(J)}function ae(J){return t.enter("lineEnding"),t.consume(J),t.exit("lineEnding"),xe}function xe(J){if(J===null||rt(J))return Q(J);return t.enter("htmlFlowData"),re(J)}function Te(J){if(J===45)return t.consume(J),X;return re(J)}function me(J){if(J===47)return t.consume(J),p="",Ce;return re(J)}function Ce(J){if(J===62){let Me=p.toLowerCase();if($E.includes(Me))return t.consume(J),He;return re(J)}if(Jr(J)&&p.length<8)return t.consume(J),p+=String.fromCharCode(J),Ce;return re(J)}function Be(J){if(J===93)return t.consume(J),X;return re(J)}function X(J){if(J===62)return t.consume(J),He;if(J===45&&f===2)return t.consume(J),X;return re(J)}function He(J){if(J===null||rt(J))return t.exit("htmlFlowData"),Le(J);return t.consume(J),He}function Le(J){return t.exit("htmlFlow"),a(J)}}function zpe(t,a,c){return u;function u(f){return t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),t.attempt(Pl,a,c)}}var WE={name:"htmlText",tokenize:Bpe};function Bpe(t,a,c){let u=this,f,m,p;return g;function g(X){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(X),v}function v(X){if(X===33)return t.consume(X),k;if(X===47)return t.consume(X),F;if(X===63)return t.consume(X),N;if(Jr(X))return t.consume(X),U;return c(X)}function k(X){if(X===45)return t.consume(X),S;if(X===91)return t.consume(X),m=0,R;if(Jr(X))return t.consume(X),D;return c(X)}function S(X){if(X===45)return t.consume(X),L;return c(X)}function I(X){if(X===null)return c(X);if(X===45)return t.consume(X),T;if(rt(X))return p=I,me(X);return t.consume(X),I}function T(X){if(X===45)return t.consume(X),L;return I(X)}function L(X){return X===62?Te(X):X===45?T(X):I(X)}function R(X){if(X==="CDATA[".charCodeAt(m++))return t.consume(X),m===6?A:R;return c(X)}function A(X){if(X===null)return c(X);if(X===93)return t.consume(X),E;if(rt(X))return p=A,me(X);return t.consume(X),A}function E(X){if(X===93)return t.consume(X),P;return A(X)}function P(X){if(X===62)return Te(X);if(X===93)return t.consume(X),P;return A(X)}function D(X){if(X===null||X===62)return Te(X);if(rt(X))return p=D,me(X);return t.consume(X),D}function N(X){if(X===null)return c(X);if(X===63)return t.consume(X),O;if(rt(X))return p=N,me(X);return t.consume(X),N}function O(X){return X===62?Te(X):N(X)}function F(X){if(Jr(X))return t.consume(X),z;return c(X)}function z(X){if(X===45||vr(X))return t.consume(X),z;return B(X)}function B(X){if(rt(X))return p=B,me(X);if(Rt(X))return t.consume(X),B;return Te(X)}function U(X){if(X===45||vr(X))return t.consume(X),U;if(X===47||X===62||nn(X))return Y(X);return c(X)}function Y(X){if(X===47)return t.consume(X),Te;if(X===58||X===95||Jr(X))return t.consume(X),G;if(rt(X))return p=Y,me(X);if(Rt(X))return t.consume(X),Y;return Te(X)}function G(X){if(X===45||X===46||X===58||X===95||vr(X))return t.consume(X),G;return ce(X)}function ce(X){if(X===61)return t.consume(X),re;if(rt(X))return p=ce,me(X);if(Rt(X))return t.consume(X),ce;return Y(X)}function re(X){if(X===null||X===60||X===61||X===62||X===96)return c(X);if(X===34||X===39)return t.consume(X),f=X,Q;if(rt(X))return p=re,me(X);if(Rt(X))return t.consume(X),re;return t.consume(X),ae}function Q(X){if(X===f)return t.consume(X),f=void 0,xe;if(X===null)return c(X);if(rt(X))return p=Q,me(X);return t.consume(X),Q}function ae(X){if(X===null||X===34||X===39||X===60||X===61||X===96)return c(X);if(X===47||X===62||nn(X))return Y(X);return t.consume(X),ae}function xe(X){if(X===47||X===62||nn(X))return Y(X);return c(X)}function Te(X){if(X===62)return t.consume(X),t.exit("htmlTextData"),t.exit("htmlText"),a;return c(X)}function me(X){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(X),t.exit("lineEnding"),Ce}function Ce(X){return Rt(X)?Lt(t,Be,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):Be(X)}function Be(X){return t.enter("htmlTextData"),p(X)}}var pm={name:"labelEnd",resolveAll:qpe,resolveTo:Hpe,tokenize:jpe},Fpe={tokenize:Gpe},Vpe={tokenize:$pe},Upe={tokenize:Kpe};function qpe(t){let a=-1,c=[];while(++a<t.length){let u=t[a][1];if(c.push(t[a]),u.type==="labelImage"||u.type==="labelLink"||u.type==="labelEnd"){let f=u.type==="labelImage"?4:2;u.type="data",a+=f}}if(t.length!==c.length)Hr(t,0,t.length,c);return t}function Hpe(t,a){let c=t.length,u=0,f,m,p;while(c--){let S=t[c][1];if(f){if(S.type==="link"||S.type==="labelLink"&&S._inactive)break;if(t[c][0]==="enter"&&S.type==="labelLink")S._inactive=!0}else if(m){if(t[c][0]==="enter"&&(S.type==="labelImage"||S.type==="labelLink")&&!S._balanced){if(f=c,S.type!=="labelLink"){u=2;break}}}else if(S.type==="labelEnd")m=c}let g={type:t[f][1].type==="labelLink"?"link":"image",start:{...t[f][1].start},end:{...t[t.length-1][1].end}},v={type:"label",start:{...t[f][1].start},end:{...t[m][1].end}},k={type:"labelText",start:{...t[f+u+2][1].end},end:{...t[m-2][1].start}};return p=[["enter",g,a],["enter",v,a]],p=Lr(p,t.slice(f+1,f+u+3)),p=Lr(p,[["enter",k,a]]),p=Lr(p,Ll(a.parser.constructs.insideSpan.null,t.slice(f+u+4,m-3),a)),p=Lr(p,[["exit",k,a],t[m-2],t[m-1],["exit",v,a]]),p=Lr(p,t.slice(m+1)),p=Lr(p,[["exit",g,a]]),Hr(t,f,t.length,p),t}function jpe(t,a,c){let u=this,f=u._labelStarts,m,p;if(f){while(f.length>0&&f[f.length-1]._balanced)f.pop();m=f[f.length-1]}return g;function g(T){if(!m)return c(T);if(m._inactive)return I(T);return p=u.parser.defined.includes(zo(u.sliceSerialize({start:m.end,end:u.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(T),t.exit("labelMarker"),t.exit("labelEnd"),v}function v(T){if(T===40)return t.attempt(Fpe,S,p?S:I)(T);if(T===91)return t.attempt(Vpe,S,p?k:I)(T);return p?S(T):I(T)}function k(T){return t.attempt(Upe,S,I)(T)}function S(T){return f.pop(),a(T)}function I(T){return m._balanced=!0,c(T)}}function Gpe(t,a,c){return u;function u(I){return t.enter("resource"),t.enter("resourceMarker"),t.consume(I),t.exit("resourceMarker"),f}function f(I){return nn(I)?mm(t,m)(I):m(I)}function m(I){if(I===41)return S(I);return tS(t,p,g,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(I)}function p(I){return nn(I)?mm(t,v)(I):S(I)}function g(I){return c(I)}function v(I){if(I===34||I===39||I===40)return rS(t,k,c,"resourceTitle","resourceTitleMarker","resourceTitleString")(I);return S(I)}function k(I){return nn(I)?mm(t,S)(I):S(I)}function S(I){if(I===41)return t.enter("resourceMarker"),t.consume(I),t.exit("resourceMarker"),t.exit("resource"),a;return c(I)}}function $pe(t,a,c){let u=this;return f;function f(g){return nS.call(u,t,m,p,"reference","referenceMarker","referenceString")(g)}function m(g){return u.parser.defined.includes(zo(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)))?a(g):c(g)}function p(g){return c(g)}}function Kpe(t,a,c){return u;function u(m){return t.enter("reference"),t.enter("referenceMarker"),t.consume(m),t.exit("referenceMarker"),f}function f(m){if(m===93)return t.enter("referenceMarker"),t.consume(m),t.exit("referenceMarker"),t.exit("reference"),a;return c(m)}}var XE={name:"labelStartImage",resolveAll:pm.resolveAll,tokenize:Wpe};function Wpe(t,a,c){let u=this,f;return m;function m(v){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(v),t.exit("labelImageMarker"),p}function p(v){if(v===91)return t.enter("labelMarker"),t.consume(v),t.exit("labelMarker"),f=t.exit("labelImage"),g;return c(v)}function g(v){if(v===94&&"_hiddenFootnoteSupport"in u.parser.constructs)return c(v);return u._labelStarts=u._labelStarts||[],u._labelStarts.push(f),a(v)}}var YE={name:"labelStartLink",resolveAll:pm.resolveAll,tokenize:Xpe};function Xpe(t,a,c){let u=this,f;return m;function m(g){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(g),t.exit("labelMarker"),f=t.exit("labelLink"),p}function p(g){if(g===94&&"_hiddenFootnoteSupport"in u.parser.constructs)return c(g);return u._labelStarts=u._labelStarts||[],u._labelStarts.push(f),a(g)}}var Bv={name:"lineEnding",tokenize:Ype};function Ype(t,a){return c;function c(u){return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),Lt(t,a,"linePrefix")}}var hm={name:"thematicBreak",tokenize:Qpe};function Qpe(t,a,c){let u=0,f;return m;function m(k){return t.enter("thematicBreak"),p(k)}function p(k){return f=k,g(k)}function g(k){if(k===f)return t.enter("thematicBreakSequence"),v(k);if(u>=3&&(k===null||rt(k)))return t.exit("thematicBreak"),a(k);return c(k)}function v(k){if(k===f)return t.consume(k),u++,v;return t.exit("thematicBreakSequence"),Rt(k)?Lt(t,g,"whitespace")(k):g(k)}}var Bo={continuation:{tokenize:the},exit:rhe,name:"list",tokenize:ehe},Zpe={partial:!0,tokenize:ohe},Jpe={partial:!0,tokenize:nhe};function ehe(t,a,c){let u=this,f=u.events[u.events.length-1],m=f&&f[1].type==="linePrefix"?f[2].sliceSerialize(f[1],!0).length:0,p=0;return g;function g(L){let R=u.containerState.type||(L===42||L===43||L===45?"listUnordered":"listOrdered");if(R==="listUnordered"?!u.containerState.marker||L===u.containerState.marker:Dv(L)){if(!u.containerState.type)u.containerState.type=R,t.enter(R,{_container:!0});if(R==="listUnordered")return t.enter("listItemPrefix"),L===42||L===45?t.check(hm,c,k)(L):k(L);if(!u.interrupt||L===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),v(L)}return c(L)}function v(L){if(Dv(L)&&++p<10)return t.consume(L),v;if((!u.interrupt||p<2)&&(u.containerState.marker?L===u.containerState.marker:L===41||L===46))return t.exit("listItemValue"),k(L);return c(L)}function k(L){return t.enter("listItemMarker"),t.consume(L),t.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||L,t.check(Pl,u.interrupt?c:S,t.attempt(Zpe,T,I))}function S(L){return u.containerState.initialBlankLine=!0,m++,T(L)}function I(L){if(Rt(L))return t.enter("listItemPrefixWhitespace"),t.consume(L),t.exit("listItemPrefixWhitespace"),T;return c(L)}function T(L){return u.containerState.size=m+u.sliceSerialize(t.exit("listItemPrefix"),!0).length,a(L)}}function the(t,a,c){let u=this;return u.containerState._closeFlow=void 0,t.check(Pl,f,m);function f(g){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,Lt(t,a,"listItemIndent",u.containerState.size+1)(g)}function m(g){if(u.containerState.furtherBlankLines||!Rt(g))return u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,p(g);return u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,t.attempt(Jpe,a,p)(g)}function p(g){return u.containerState._closeFlow=!0,u.interrupt=void 0,Lt(t,t.attempt(Bo,a,c),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g)}}function nhe(t,a,c){let u=this;return Lt(t,f,"listItemIndent",u.containerState.size+1);function f(m){let p=u.events[u.events.length-1];return p&&p[1].type==="listItemIndent"&&p[2].sliceSerialize(p[1],!0).length===u.containerState.size?a(m):c(m)}}function rhe(t){t.exit(this.containerState.type)}function ohe(t,a,c){let u=this;return Lt(t,f,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function f(m){let p=u.events[u.events.length-1];return!Rt(m)&&p&&p[1].type==="listItemPrefixWhitespace"?a(m):c(m)}}var oS={name:"setextUnderline",resolveTo:ahe,tokenize:ihe};function ahe(t,a){let c=new sd,u=t.length,f,m,p;while(u--)if(t[u][0]==="enter"){if(t[u][1].type==="content"){f=u;break}if(t[u][1].type==="paragraph")m=u}else{if(t[u][1].type==="content")c.add(u,1,[]);if(!p&&t[u][1].type==="definition")p=u}let g={type:"setextHeading",start:{...t[f][1].start},end:{...t[t.length-1][1].end}};if(t[m][1].type="setextHeadingText",p)c.add(m,0,[["enter",g,a]]),c.add(p+1,0,[["exit",t[f][1],a]]),t[f][1].end={...t[p][1].end};else t[f][1]=g;return c.add(t.length,0,[["exit",g,a]]),c.consume(t),t}function ihe(t,a,c){let u=this,f;return m;function m(k){let S=u.events.length,I;while(S--)if(u.events[S][1].type!=="lineEnding"&&u.events[S][1].type!=="linePrefix"&&u.events[S][1].type!=="content"){I=u.events[S][1].type==="paragraph";break}if(!u.parser.lazy[u.now().line]&&(u.interrupt||I))return t.enter("setextHeadingLine"),f=k,p(k);return c(k)}function p(k){return t.enter("setextHeadingLineSequence"),g(k)}function g(k){if(k===f)return t.consume(k),g;return t.exit("setextHeadingLineSequence"),Rt(k)?Lt(t,v,"lineSuffix")(k):v(k)}function v(k){if(k===null||rt(k))return t.exit("setextHeadingLine"),a(k);return c(k)}}var yq={tokenize:she};function she(t){let a=this,c=t.attempt(Pl,u,t.attempt(this.parser.constructs.flowInitial,f,Lt(t,t.attempt(this.parser.constructs.flow,f,t.attempt(qE,f)),"linePrefix")));return c;function u(m){if(m===null){t.consume(m);return}return t.enter("lineEndingBlank"),t.consume(m),t.exit("lineEndingBlank"),a.currentConstruct=void 0,c}function f(m){if(m===null){t.consume(m);return}return t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),a.currentConstruct=void 0,c}}var wq={resolveAll:Iq()},kq=Cq("string"),Sq=Cq("text");function Cq(t){return{resolveAll:Iq(t==="text"?lhe:void 0),tokenize:a};function a(c){let u=this,f=this.parser.constructs[t],m=c.attempt(f,p,g);return p;function p(S){return k(S)?m(S):g(S)}function g(S){if(S===null){c.consume(S);return}return c.enter("data"),c.consume(S),v}function v(S){if(k(S))return c.exit("data"),m(S);return c.consume(S),v}function k(S){if(S===null)return!0;let I=f[S],T=-1;if(I)while(++T<I.length){let L=I[T];if(!L.previous||L.previous.call(u,u.previous))return!0}return!1}}}function Iq(t){return a;function a(c,u){let f=-1,m;while(++f<=c.length)if(m===void 0){if(c[f]&&c[f][1].type==="data")m=f,f++}else if(!c[f]||c[f][1].type!=="data"){if(f!==m+2)c[m][1].end=c[f-1][1].end,c.splice(m+2,f-m-2),f=m+2;m=void 0}return t?t(c,u):c}}function lhe(t,a){let c=new sd,u=0;while(++u<=t.length)if((u===t.length||t[u][1].type==="lineEnding")&&t[u-1][1].type==="data"){let f=t[u-1][1],m=a.sliceStream(f),p=m.length,g=-1,v=0,k;while(p--){let S=m[p];if(typeof S==="string"){g=S.length;while(S.charCodeAt(g-1)===32)v++,g--;if(g)break;g=-1}else if(S===-2)k=!0,v++;else if(S===-1);else{p++;break}}if(a._contentTypeTextTrailing&&u===t.length)v=0;if(v){let S={type:u===t.length||k||v<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:p?g:f.start._bufferIndex+g,_index:f.start._index+p,line:f.end.line,column:f.end.column-v,offset:f.end.offset-v},end:{...f.end}};if(f.end={...S.start},f.start.offset===f.end.offset)Object.assign(f,S);else c.add(u,0,[["enter",S,a],["exit",S,a]])}u++}return c.consume(t),t}var che={[42]:Bo,[43]:Bo,[45]:Bo,[48]:Bo,[49]:Bo,[50]:Bo,[51]:Bo,[52]:Bo,[53]:Bo,[54]:Bo,[55]:Bo,[56]:Bo,[57]:Bo,[62]:Yk},uhe={[91]:HE},dhe={[-2]:_v,[-1]:_v,[32]:_v},fhe={[35]:GE,[42]:hm,[45]:[oS,hm],[60]:KE,[61]:oS,[95]:hm,[96]:Jk,[126]:Jk},mhe={[38]:Zk,[92]:Qk},phe={[-5]:Bv,[-4]:Bv,[-3]:Bv,[33]:XE,[38]:Zk,[42]:Nv,[60]:[FE,WE],[91]:YE,[92]:[jE,Qk],[93]:pm,[95]:Nv,[96]:VE},hhe={null:[Nv,wq]},ghe={null:[42,95]},xhe={null:[]};function Tq(t,a,c){let u={_bufferIndex:-1,_index:0,line:c&&c.line||1,column:c&&c.column||1,offset:c&&c.offset||0},f={},m=[],p=[],g=[],v=!0,k={attempt:Y(B),check:Y(U),consume:O,enter:F,exit:z,interrupt:Y(U,{interrupt:!0})},S={code:null,containerState:{},defineSkip:P,events:[],now:E,parser:t,previous:null,sliceSerialize:R,sliceStream:A,write:L},I=a.tokenize.call(S,k),T;if(a.resolveAll)m.push(a);return S;function L(Q){if(p=Lr(p,Q),D(),p[p.length-1]!==null)return[];return G(a,0),S.events=Ll(m,S.events,S),S.events}function R(Q,ae){return bhe(A(Q),ae)}function A(Q){return vhe(p,Q)}function E(){let{_bufferIndex:Q,_index:ae,line:xe,column:Te,offset:me}=u;return{_bufferIndex:Q,_index:ae,line:xe,column:Te,offset:me}}function P(Q){f[Q.line]=Q.column,re()}function D(){while(u._index<p.length){let Q=p[u._index];if(typeof Q==="string"){let ae=u._index;if(u._bufferIndex<0)u._bufferIndex=0;while(u._index===ae&&u._bufferIndex<Q.length)N(Q.charCodeAt(u._bufferIndex))}else N(Q)}}function N(Q){v=void 0,T=Q,I=I(Q)}function O(Q){if(rt(Q))u.line++,u.column=1,u.offset+=Q===-3?2:1,re();else if(Q!==-1)u.column++,u.offset++;if(u._bufferIndex<0)u._index++;else if(u._bufferIndex++,u._bufferIndex===p[u._index].length)u._bufferIndex=-1,u._index++;S.previous=Q,v=!0}function F(Q,ae){let xe=ae||{};return xe.type=Q,xe.start=E(),S.events.push(["enter",xe,S]),g.push(xe),xe}function z(Q){let ae=g.pop();return ae.end=E(),S.events.push(["exit",ae,S]),ae}function B(Q,ae){G(Q,ae.from)}function U(Q,ae){ae.restore()}function Y(Q,ae){return xe;function xe(Te,me,Ce){let Be,X,He,Le;return Array.isArray(Te)?Me(Te):("tokenize"in Te)?Me([Te]):J(Te);function J(Re){return Ne;function Ne(ut){let kt=ut!==null&&Re[ut],It=ut!==null&&Re.null,Ee=[...Array.isArray(kt)?kt:kt?[kt]:[],...Array.isArray(It)?It:It?[It]:[]];return Me(Ee)(ut)}}function Me(Re){if(Be=Re,X=0,Re.length===0)return Ce;return Ie(Re[X])}function Ie(Re){return Ne;function Ne(ut){if(Le=ce(),He=Re,!Re.partial)S.currentConstruct=Re;if(Re.name&&S.parser.constructs.disable.null.includes(Re.name))return Qe(ut);return Re.tokenize.call(ae?Object.assign(Object.create(S),ae):S,k,qe,Qe)(ut)}}function qe(Re){return v=!0,Q(He,Le),me}function Qe(Re){if(v=!0,Le.restore(),++X<Be.length)return Ie(Be[X]);return Ce}}}function G(Q,ae){if(Q.resolveAll&&!m.includes(Q))m.push(Q);if(Q.resolve)Hr(S.events,ae,S.events.length-ae,Q.resolve(S.events.slice(ae),S));if(Q.resolveTo)S.events=Q.resolveTo(S.events,S)}function ce(){let Q=E(),{previous:ae,currentConstruct:xe}=S,Te=S.events.length,me=Array.from(g);return{from:Te,restore:Ce};function Ce(){u=Q,S.previous=ae,S.currentConstruct=xe,S.events.length=Te,g=me,re()}}function re(){if(u.line in f&&u.column<2)u.column=f[u.line],u.offset+=f[u.line]-1}}function vhe(t,a){let c=a.start._index,u=a.start._bufferIndex,f=a.end._index,m=a.end._bufferIndex,p;if(c===f)p=[t[c].slice(u,m)];else{if(p=t.slice(c,f),u>-1){let g=p[0];if(typeof g==="string")p[0]=g.slice(u);else p.shift()}if(m>0)p.push(t[f].slice(0,m))}return p}function bhe(t,a){let c=-1,u=[],f;while(++c<t.length){let m=t[c],p;if(typeof m==="string")p=m;else switch(m){case-5:{p="\r";break}case-4:{p=`
75
+ `;break}case-3:{p=`\r
76
+ `;break}case-2:{p=a?" ":"\t";break}case-1:{if(!a&&f)continue;p=" ";break}default:p=String.fromCharCode(m)}f=m===-2,u.push(p)}return u.join("")}function ZE(t){let u={constructs:Wk([QE,...(t||{}).extensions||[]]),content:f(pq),defined:[],document:f(xq),flow:f(yq),lazy:{},string:f(kq),text:f(Sq)};return u;function f(m){return p;function p(g){return Tq(u,m,g)}}}function JE(t){while(!eS(t));return t}var Lq=/[\0\t\n\r]/g;function eP(){let t=1,a="",c=!0,u;return f;function f(m,p,g){m=a+(typeof m==="string"?m.toString():new TextDecoder(p||void 0).decode(m));let v=[],k=0;if(a="",c){if(m.charCodeAt(0)===65279)k++;c=void 0}while(k<m.length){Lq.lastIndex=k;let S=Lq.exec(m),I=S&&S.index!==void 0?S.index:m.length,T=m.charCodeAt(I);if(!S){a=m.slice(k);break}if(T===10&&k===I&&u)v.push(-3),u=void 0;else{if(u)v.push(-5),u=void 0;if(k<I)v.push(m.slice(k,I)),t+=I-k;switch(T){case 0:{v.push(65533),t++;break}case 9:{let L=Math.ceil(t/4)*4;v.push(-2);while(t++<L)v.push(-1);break}case 10:{v.push(-4),t=1;break}default:u=!0,t=1}}k=I+1}if(g){if(u)v.push(-5);if(a)v.push(a);v.push(null)}return v}}var yhe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Rq(t){return t.replace(yhe,whe)}function whe(t,a,c){if(a)return a;if(c.charCodeAt(0)===35){let f=c.charCodeAt(1),m=f===120||f===88;return Xk(c.slice(m?2:1),m?16:10)}return Th(c)||t}var Pq={}.hasOwnProperty;function tP(t,a,c){if(a&&typeof a==="object")c=a,a=void 0;return khe(c)(JE(ZE(c).document().write(eP()(t,a,!0))))}function khe(t){let a={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:p(Ba),autolinkProtocol:G,autolinkEmail:G,atxHeading:p(an),blockQuote:p(kt),characterEscape:G,characterReference:G,codeFenced:p(It),codeFencedFenceInfo:g,codeFencedFenceMeta:g,codeIndented:p(It,g),codeText:p(Ee,g),codeTextData:G,data:G,codeFlowValue:G,definition:p(nt),definitionDestinationString:g,definitionLabelString:g,definitionTitleString:g,emphasis:p(Kt),hardBreakEscape:p(mn),hardBreakTrailing:p(mn),htmlFlow:p(br,g),htmlFlowData:G,htmlText:p(br,g),htmlTextData:G,image:p(Ao),label:g,link:p(Ba),listItem:p(or),listItemValue:L,listOrdered:p(Fl,T),listUnordered:p(Fl),paragraph:p(Vl),reference:Me,referenceString:g,resourceDestinationString:g,resourceTitleString:g,setextHeading:p(an),strong:p(mi),thematicBreak:p(Tt)},exit:{atxHeading:k(),atxHeadingSequence:z,autolink:k(),autolinkEmail:ut,autolinkProtocol:Ne,blockQuote:k(),characterEscapeValue:ce,characterReferenceMarkerHexadecimal:qe,characterReferenceMarkerNumeric:qe,characterReferenceValue:Qe,characterReference:Re,codeFenced:k(P),codeFencedFence:E,codeFencedFenceInfo:R,codeFencedFenceMeta:A,codeFlowValue:ce,codeIndented:k(D),codeText:k(Te),codeTextData:ce,data:ce,definition:k(),definitionDestinationString:F,definitionLabelString:N,definitionTitleString:O,emphasis:k(),hardBreakEscape:k(Q),hardBreakTrailing:k(Q),htmlFlow:k(ae),htmlFlowData:ce,htmlText:k(xe),htmlTextData:ce,image:k(Ce),label:X,labelText:Be,lineEnding:re,link:k(me),listItem:k(),listOrdered:k(),listUnordered:k(),paragraph:k(),referenceString:Ie,resourceDestinationString:He,resourceTitleString:Le,resource:J,setextHeading:k(Y),setextHeadingLineSequence:U,setextHeadingText:B,strong:k(),thematicBreak:k()}};Aq(a,(t||{}).mdastExtensions||[]);let c={};return u;function u(he){let Fe={type:"root",children:[],position:void 0},ft={stack:[Fe],tokenStack:[],config:a,enter:v,exit:S,buffer:g,resume:I,data:c},ze=[],lt=[],Bt=-1;while(++Bt<he.length)if(lt.push(he[Bt]),he[Bt][1].type==="listOrdered"||he[Bt][1].type==="listUnordered")if(he[Bt][0]==="enter")ze.push(lt.length-1);else{let vn=ze.pop();m(lt,vn)}he=lt,Bt=-1;while(++Bt<he.length){let vn=a[he[Bt][0]];if(he[Bt][0]==="enter"&&a.beforeEnter.length>0)f(a.beforeEnter,{...ft,sliceSerialize:he[Bt][2].sliceSerialize},he[Bt][1]);if(Pq.call(vn,he[Bt][1].type))vn[he[Bt][1].type].call({...ft,sliceSerialize:he[Bt][2].sliceSerialize},he[Bt][1]);if(he[Bt][0]==="exit"&&a.afterExit.length>0)f(a.afterExit,{...ft,sliceSerialize:he[Bt][2].sliceSerialize},he[Bt][1])}if(ft.tokenStack.length>0){let vn=ft.tokenStack[ft.tokenStack.length-1];(vn[1]||Eq).call(ft,void 0,vn[0])}Fe.position={start:ld(he.length>0?he[0][1].start:{line:1,column:1,offset:0}),end:ld(he.length>0?he[he.length-2][1].end:{line:1,column:1,offset:0})},Bt=-1;while(++Bt<a.transforms.length)Fe=a.transforms[Bt](Fe)||Fe;return Fe}function f(he,Fe,ft){let ze=-1;while(++ze<he.length)he[ze].call(Fe,ft)}function m(he,Fe){let ft=he.length-1,ze=Fe-1,lt=-1,Bt=!1,vn,wr,hn,kr,ar=[];while(++ze<=ft){let Rr=he[ze];switch(Rr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{if(Rr[0]==="enter")lt++;else lt--;kr=void 0;break}case"lineEndingBlank":{if(Rr[0]==="enter"){if(vn&&!kr&&!lt&&!hn)hn=ze;kr=void 0}break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:kr=void 0}if(!lt&&Rr[0]==="enter"&&Rr[1].type==="listItemPrefix"||lt===-1&&Rr[0]==="exit"&&(Rr[1].type==="listUnordered"||Rr[1].type==="listOrdered")){if(vn){let ir=ze;wr=void 0;while(ir--){let sa=he[ir];if(sa[1].type==="lineEnding"||sa[1].type==="lineEndingBlank"){if(sa[0]==="exit")continue;if(wr)he[wr][1].type="lineEndingBlank",Bt=!0;sa[1].type="lineEnding",wr=ir}else if(sa[1].type==="linePrefix"||sa[1].type==="blockQuotePrefix"||sa[1].type==="blockQuotePrefixWhitespace"||sa[1].type==="blockQuoteMarker"||sa[1].type==="listItemIndent");else break}if(hn&&(!wr||hn<wr))vn._spread=!0;vn.end=Object.assign({},wr?he[wr][1].start:Rr[1].end),ar.push({at:wr||ze,event:["exit",vn,Rr[2]]})}if(Rr[1].type==="listItemPrefix"){let ir={type:"listItem",_spread:!1,start:Object.assign({},Rr[1].start),end:void 0};vn=ir,ar.push({at:ze,event:["enter",ir,Rr[2]]}),hn=void 0,kr=!0}}}let Fo=he.splice(Fe),Fc=0;ze=-1;while(++ze<Fo.length){while(Fc<ar.length&&ar[Fc].at===Fe+ze)he.push(ar[Fc++].event);he.push(Fo[ze])}he[Fe][1]._spread=Bt}function p(he,Fe){return ft;function ft(ze){if(v.call(this,he(ze),ze),Fe)Fe.call(this,ze)}}function g(){this.stack.push({type:"fragment",children:[]})}function v(he,Fe,ft){this.stack[this.stack.length-1].children.push(he),this.stack.push(he),this.tokenStack.push([Fe,ft||void 0]),he.position={start:ld(Fe.start),end:void 0}}function k(he){return Fe;function Fe(ft){if(he)he.call(this,ft);S.call(this,ft)}}function S(he,Fe){let ft=this.stack.pop(),ze=this.tokenStack.pop();if(!ze)throw Error("Cannot close `"+he.type+"` ("+ad({start:he.start,end:he.end})+"): it’s not open");if(ze[0].type!==he.type)if(Fe)Fe.call(this,he,ze[0]);else(ze[1]||Eq).call(this,he,ze[0]);ft.position.end=ld(he.end)}function I(){return um(this.stack.pop())}function T(){this.data.expectingFirstListItemValue=!0}function L(he){if(this.data.expectingFirstListItemValue){let Fe=this.stack[this.stack.length-2];Fe.start=Number.parseInt(this.sliceSerialize(he),10),this.data.expectingFirstListItemValue=void 0}}function R(){let he=this.resume(),Fe=this.stack[this.stack.length-1];Fe.lang=he}function A(){let he=this.resume(),Fe=this.stack[this.stack.length-1];Fe.meta=he}function E(){if(this.data.flowCodeInside)return;this.buffer(),this.data.flowCodeInside=!0}function P(){let he=this.resume(),Fe=this.stack[this.stack.length-1];Fe.value=he.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function D(){let he=this.resume(),Fe=this.stack[this.stack.length-1];Fe.value=he.replace(/(\r?\n|\r)$/g,"")}function N(he){let Fe=this.resume(),ft=this.stack[this.stack.length-1];ft.label=Fe,ft.identifier=zo(this.sliceSerialize(he)).toLowerCase()}function O(){let he=this.resume(),Fe=this.stack[this.stack.length-1];Fe.title=he}function F(){let he=this.resume(),Fe=this.stack[this.stack.length-1];Fe.url=he}function z(he){let Fe=this.stack[this.stack.length-1];if(!Fe.depth){let ft=this.sliceSerialize(he).length;Fe.depth=ft}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function U(he){let Fe=this.stack[this.stack.length-1];Fe.depth=this.sliceSerialize(he).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function G(he){let ft=this.stack[this.stack.length-1].children,ze=ft[ft.length-1];if(!ze||ze.type!=="text")ze=Ge(),ze.position={start:ld(he.start),end:void 0},ft.push(ze);this.stack.push(ze)}function ce(he){let Fe=this.stack.pop();Fe.value+=this.sliceSerialize(he),Fe.position.end=ld(he.end)}function re(he){let Fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){let ft=Fe.children[Fe.children.length-1];ft.position.end=ld(he.end),this.data.atHardBreak=void 0;return}if(!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(Fe.type))G.call(this,he),ce.call(this,he)}function Q(){this.data.atHardBreak=!0}function ae(){let he=this.resume(),Fe=this.stack[this.stack.length-1];Fe.value=he}function xe(){let he=this.resume(),Fe=this.stack[this.stack.length-1];Fe.value=he}function Te(){let he=this.resume(),Fe=this.stack[this.stack.length-1];Fe.value=he}function me(){let he=this.stack[this.stack.length-1];if(this.data.inReference){let Fe=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=Fe,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function Ce(){let he=this.stack[this.stack.length-1];if(this.data.inReference){let Fe=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=Fe,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function Be(he){let Fe=this.sliceSerialize(he),ft=this.stack[this.stack.length-2];ft.label=Rq(Fe),ft.identifier=zo(Fe).toLowerCase()}function X(){let he=this.stack[this.stack.length-1],Fe=this.resume(),ft=this.stack[this.stack.length-1];if(this.data.inReference=!0,ft.type==="link"){let ze=he.children;ft.children=ze}else ft.alt=Fe}function He(){let he=this.resume(),Fe=this.stack[this.stack.length-1];Fe.url=he}function Le(){let he=this.resume(),Fe=this.stack[this.stack.length-1];Fe.title=he}function J(){this.data.inReference=void 0}function Me(){this.data.referenceType="collapsed"}function Ie(he){let Fe=this.resume(),ft=this.stack[this.stack.length-1];ft.label=Fe,ft.identifier=zo(this.sliceSerialize(he)).toLowerCase(),this.data.referenceType="full"}function qe(he){this.data.characterReferenceType=he.type}function Qe(he){let Fe=this.sliceSerialize(he),ft=this.data.characterReferenceType,ze;if(ft)ze=Xk(Fe,ft==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0;else ze=Th(Fe);let lt=this.stack[this.stack.length-1];lt.value+=ze}function Re(he){let Fe=this.stack.pop();Fe.position.end=ld(he.end)}function Ne(he){ce.call(this,he);let Fe=this.stack[this.stack.length-1];Fe.url=this.sliceSerialize(he)}function ut(he){ce.call(this,he);let Fe=this.stack[this.stack.length-1];Fe.url="mailto:"+this.sliceSerialize(he)}function kt(){return{type:"blockquote",children:[],position:void 0}}function It(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Ee(){return{type:"inlineCode",value:"",position:void 0}}function nt(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Kt(){return{type:"emphasis",children:[],position:void 0}}function an(){return{type:"heading",depth:0,children:[],position:void 0}}function mn(){return{type:"break",position:void 0}}function br(){return{type:"html",value:"",position:void 0}}function Ao(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function Ba(){return{type:"link",title:null,url:"",children:[],position:void 0}}function Fl(he){return{type:"list",ordered:he.type==="listOrdered",start:null,spread:he._spread,children:[],position:void 0}}function or(he){return{type:"listItem",spread:he._spread,checked:null,children:[],position:void 0}}function Vl(){return{type:"paragraph",children:[],position:void 0}}function mi(){return{type:"strong",children:[],position:void 0}}function Ge(){return{type:"text",value:"",position:void 0}}function Tt(){return{type:"thematicBreak",position:void 0}}}function ld(t){return{line:t.line,column:t.column,offset:t.offset}}function Aq(t,a){let c=-1;while(++c<a.length){let u=a[c];if(Array.isArray(u))Aq(t,u);else She(t,u)}}function She(t,a){let c;for(c in a)if(Pq.call(a,c))switch(c){case"canContainEols":{let u=a[c];if(u)t[c].push(...u);break}case"transforms":{let u=a[c];if(u)t[c].push(...u);break}case"afterExit":case"beforeEnter":{let u=a[c];if(u)t[c].push(u);break}case"enter":case"exit":{let u=a[c];if(u)Object.assign(t[c],u);break}}}function Eq(t,a){if(t)throw Error("Cannot close `"+t.type+"` ("+ad({start:t.start,end:t.end})+"): a different token (`"+a.type+"`, "+ad({start:a.start,end:a.end})+") is open");throw Error("Cannot close document, a token (`"+a.type+"`, "+ad({start:a.start,end:a.end})+") is still open")}function aS(t){let a=this;a.parser=c;function c(u){return tP(u,{...a.data("settings"),...t,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}var iS=-1,Rh=0,gm=1,Eh=2,Fv=3,Vv=4,Uv=5,qv=6,sS=7,lS=8;var{defineProperty:Che}=Object,Dq=typeof self==="object"?self:globalThis,Mq=(t,a)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw TypeError("unable to deserialize "+t)}return new Dq[t](a)},Ihe=(t,a)=>{let c=(f,m)=>(t.set(m,f),f),u=(f)=>{if(t.has(f))return t.get(f);let[m,p]=a[f];switch(m){case Rh:case iS:return c(p,f);case gm:{let g=c([],f);for(let v of p)g.push(u(v));return g}case Eh:{let g=c({},f);for(let[v,k]of p){let S=u(v),I=u(k);if(S==="__proto__")Che(g,S,{value:I,configurable:!0,enumerable:!0,writable:!0});else g[S]=I}return g}case Fv:return c(new Date(p),f);case Vv:{let{source:g,flags:v}=p;return c(new RegExp(g,v),f)}case Uv:{let g=c(new Map,f);for(let[v,k]of p)g.set(u(v),u(k));return g}case qv:{let g=c(new Set,f);for(let v of p)g.add(u(v));return g}case sS:{let{name:g,message:v}=p;return c(typeof Dq[g]==="function"?Mq(g,v):Error(v),f)}case lS:return c(BigInt(p),f);case"BigInt":return c(Object(BigInt(p)),f);case"ArrayBuffer":return c(new Uint8Array(p).buffer,p);case"DataView":{let{buffer:g}=new Uint8Array(p);return c(new DataView(g),p)}case"-0":return-0}return c(Mq(m,p),f)};return u},nP=(t)=>Ihe(new Map,t)(0);var xm="",{toString:The}={},{keys:Lhe,is:Rhe}=Object,Hv=(t)=>{let a=typeof t;if(a!=="object"||!t)return[Rh,a];let c=The.call(t).slice(8,-1);switch(c){case"Array":return[gm,xm];case"Object":return[Eh,xm];case"Date":return[Fv,xm];case"RegExp":return[Vv,xm];case"Map":return[Uv,xm];case"Set":return[qv,xm];case"DataView":return[gm,c]}if(c.includes("Array"))return[gm,c];if(t instanceof Error)return[sS,t.name||"Error"];return[Eh,c]},cS=([t,a])=>t===Rh&&(a==="function"||a==="symbol"),Ehe=(t,a,c,u)=>{let f=(p,g)=>{let v=u.push(p)-1;return c.set(g,v),v},m=(p)=>{if(c.has(p))return c.get(p);let[g,v]=Hv(p);switch(g){case Rh:{let S=p;switch(v){case"bigint":g=lS,S=p.toString();break;case"number":if(!p&&Rhe(p,-0))return u.push(["-0"])-1;break;case"function":case"symbol":if(t)throw TypeError("unable to serialize "+v);S=null;break;case"undefined":return f([iS],p)}return f([g,S],p)}case gm:{if(v){let T=p;if(v==="DataView")T=new Uint8Array(p.buffer);else if(v==="ArrayBuffer")T=new Uint8Array(p);return f([v,[...T]],p)}let S=[],I=f([g,S],p);for(let T of p)S.push(m(T));return I}case Eh:{if(v)switch(v){case"BigInt":return f([v,p.toString()],p);case"Boolean":case"Number":case"String":return f([v,p.valueOf()],p)}if(a&&"toJSON"in p)return m(p.toJSON());let S=[],I=f([g,S],p);for(let T of Lhe(p))if(t||!cS(Hv(p[T])))S.push([m(T),m(p[T])]);return I}case Fv:return f([g,isNaN(p.getTime())?xm:p.toISOString()],p);case Vv:{let{source:S,flags:I}=p;return f([g,{source:S,flags:I}],p)}case Uv:{let S=[],I=f([g,S],p);for(let[T,L]of p)if(t||!(cS(Hv(T))||cS(Hv(L))))S.push([m(T),m(L)]);return I}case qv:{let S=[],I=f([g,S],p);for(let T of p)if(t||!cS(Hv(T)))S.push(m(T));return I}}let{message:k}=p;return f([g,{name:v,message:k}],p)};return m},rP=(t,{json:a,lossy:c}={})=>{let u=[];return Ehe(!(a||c),!!a,new Map,u)(t),u};var Ph=typeof structuredClone==="function"?(t,a)=>a&&(("json"in a)||("lossy"in a))?nP(rP(t,a)):structuredClone(t):(t,a)=>nP(rP(t,a));function Phe(t,a){let c=[{type:"text",value:"↩"}];if(a>1)c.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(a)}]});return c}function Ahe(t,a){return"Back to reference "+(t+1)+(a>1?"-"+a:"")}function Nq(t){let a=typeof t.options.clobberPrefix==="string"?t.options.clobberPrefix:"user-content-",c=t.options.footnoteBackContent||Phe,u=t.options.footnoteBackLabel||Ahe,f=t.options.footnoteLabel||"Footnotes",m=t.options.footnoteLabelTagName||"h2",p=t.options.footnoteLabelProperties||{className:["sr-only"]},g=[],v=-1;while(++v<t.footnoteOrder.length){let k=t.footnoteById.get(t.footnoteOrder[v]);if(!k)continue;let S=t.all(k),I=String(k.identifier).toUpperCase(),T=Ki(I.toLowerCase()),L=0,R=[],A=t.footnoteCounts.get(I);while(A!==void 0&&++L<=A){if(R.length>0)R.push({type:"text",value:" "});let D=typeof c==="string"?c:c(v,L);if(typeof D==="string")D={type:"text",value:D};R.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+T+(L>1?"-"+L:""),dataFootnoteBackref:"",ariaLabel:typeof u==="string"?u:u(v,L),className:["data-footnote-backref"]},children:Array.isArray(D)?D:[D]})}let E=S[S.length-1];if(E&&E.type==="element"&&E.tagName==="p"){let D=E.children[E.children.length-1];if(D&&D.type==="text")D.value+=" ";else E.children.push({type:"text",value:" "});E.children.push(...R)}else S.push(...R);let P={type:"element",tagName:"li",properties:{id:a+"fn-"+T},children:t.wrap(S,!0)};t.patch(k,P),g.push(P)}if(g.length===0)return;return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:m,properties:{...Ph(p),id:"footnote-label"},children:[{type:"text",value:f}]},{type:"text",value:`
77
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(g,!0)},{type:"text",value:`
78
+ `}]}}var cd=function(t){if(t===null||t===void 0)return Ohe;if(typeof t==="function")return uS(t);if(typeof t==="object")return Array.isArray(t)?Mhe(t):Dhe(t);if(typeof t==="string")return Nhe(t);throw Error("Expected function, string, or object as test")};function Mhe(t){let a=[],c=-1;while(++c<t.length)a[c]=cd(t[c]);return uS(u);function u(...f){let m=-1;while(++m<a.length)if(a[m].apply(this,f))return!0;return!1}}function Dhe(t){let a=t;return uS(c);function c(u){let f=u,m;for(m in t)if(f[m]!==a[m])return!1;return!0}}function Nhe(t){return uS(a);function a(c){return c&&c.type===t}}function uS(t){return a;function a(c,u,f){return Boolean(_he(c)&&t.call(this,c,typeof u==="number"?u:void 0,f||void 0))}}function Ohe(){return!0}function _he(t){return t!==null&&typeof t==="object"&&"type"in t}function Oq(t){return t}var _q=[],dS=!0,vm=!1,fS="skip";function jv(t,a,c,u){let f;if(typeof a==="function"&&typeof c!=="function")u=c,c=a;else f=a;let m=cd(f),p=u?-1:1;g(t,void 0,[])();function g(v,k,S){let I=v&&typeof v==="object"?v:{};if(typeof I.type==="string"){let L=typeof I.tagName==="string"?I.tagName:typeof I.name==="string"?I.name:void 0;Object.defineProperty(T,"name",{value:"node ("+Oq(v.type+(L?"<"+L+">":""))+")"})}return T;function T(){let L=_q,R,A,E;if(!a||m(v,k,S[S.length-1]||void 0)){if(L=zhe(c(v,S)),L[0]===vm)return L}if("children"in v&&v.children){let P=v;if(P.children&&L[0]!==fS){A=(u?P.children.length:-1)+p,E=S.concat(P);while(A>-1&&A<P.children.length){let D=P.children[A];if(R=g(D,A,E)(),R[0]===vm)return R;A=typeof R[1]==="number"?R[1]:A+p}}}return L}}}function zhe(t){if(Array.isArray(t))return t;if(typeof t==="number")return[dS,t];return t===null||t===void 0?_q:[t]}function bm(t,a,c,u){let f,m,p;if(typeof a==="function"&&typeof c!=="function")m=void 0,p=a,f=c;else m=a,p=c,f=u;jv(t,m,g,f);function g(v,k){let S=k[k.length-1],I=S?S.children.indexOf(v):void 0;return p(v,I,S)}}function zq(t,a){let c={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(a),!0)};return t.patch(a,c),t.applyData(a,c)}function Bq(t,a){let c={type:"element",tagName:"br",properties:{},children:[]};return t.patch(a,c),[t.applyData(a,c),{type:"text",value:`
79
+ `}]}function Fq(t,a){let c=a.value?a.value+`
80
+ `:"",u={},f=a.lang?a.lang.split(/\s+/):[];if(f.length>0)u.className=["language-"+f[0]];let m={type:"element",tagName:"code",properties:u,children:[{type:"text",value:c}]};if(a.meta)m.data={meta:a.meta};return t.patch(a,m),m=t.applyData(a,m),m={type:"element",tagName:"pre",properties:{},children:[m]},t.patch(a,m),m}function Vq(t,a){let c={type:"element",tagName:"del",properties:{},children:t.all(a)};return t.patch(a,c),t.applyData(a,c)}function Uq(t,a){let c={type:"element",tagName:"em",properties:{},children:t.all(a)};return t.patch(a,c),t.applyData(a,c)}function qq(t,a){let c=typeof t.options.clobberPrefix==="string"?t.options.clobberPrefix:"user-content-",u=String(a.identifier).toUpperCase(),f=Ki(u.toLowerCase()),m=t.footnoteOrder.indexOf(u),p,g=t.footnoteCounts.get(u);if(g===void 0)g=0,t.footnoteOrder.push(u),p=t.footnoteOrder.length;else p=m+1;g+=1,t.footnoteCounts.set(u,g);let v={type:"element",tagName:"a",properties:{href:"#"+c+"fn-"+f,id:c+"fnref-"+f+(g>1?"-"+g:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(p)}]};t.patch(a,v);let k={type:"element",tagName:"sup",properties:{},children:[v]};return t.patch(a,k),t.applyData(a,k)}function Hq(t,a){let c={type:"element",tagName:"h"+a.depth,properties:{},children:t.all(a)};return t.patch(a,c),t.applyData(a,c)}function jq(t,a){if(t.options.allowDangerousHtml){let c={type:"raw",value:a.value};return t.patch(a,c),t.applyData(a,c)}return}function mS(t,a){let c=a.referenceType,u="]";if(c==="collapsed")u+="[]";else if(c==="full")u+="["+(a.label||a.identifier)+"]";if(a.type==="imageReference")return[{type:"text",value:"!["+a.alt+u}];let f=t.all(a),m=f[0];if(m&&m.type==="text")m.value="["+m.value;else f.unshift({type:"text",value:"["});let p=f[f.length-1];if(p&&p.type==="text")p.value+=u;else f.push({type:"text",value:u});return f}function Gq(t,a){let c=String(a.identifier).toUpperCase(),u=t.definitionById.get(c);if(!u)return mS(t,a);let f={src:Ki(u.url||""),alt:a.alt};if(u.title!==null&&u.title!==void 0)f.title=u.title;let m={type:"element",tagName:"img",properties:f,children:[]};return t.patch(a,m),t.applyData(a,m)}function $q(t,a){let c={src:Ki(a.url)};if(a.alt!==null&&a.alt!==void 0)c.alt=a.alt;if(a.title!==null&&a.title!==void 0)c.title=a.title;let u={type:"element",tagName:"img",properties:c,children:[]};return t.patch(a,u),t.applyData(a,u)}function Kq(t,a){let c={type:"text",value:a.value.replace(/\r?\n|\r/g," ")};t.patch(a,c);let u={type:"element",tagName:"code",properties:{},children:[c]};return t.patch(a,u),t.applyData(a,u)}function Wq(t,a){let c=String(a.identifier).toUpperCase(),u=t.definitionById.get(c);if(!u)return mS(t,a);let f={href:Ki(u.url||"")};if(u.title!==null&&u.title!==void 0)f.title=u.title;let m={type:"element",tagName:"a",properties:f,children:t.all(a)};return t.patch(a,m),t.applyData(a,m)}function Xq(t,a){let c={href:Ki(a.url)};if(a.title!==null&&a.title!==void 0)c.title=a.title;let u={type:"element",tagName:"a",properties:c,children:t.all(a)};return t.patch(a,u),t.applyData(a,u)}function Yq(t,a,c){let u=t.all(a),f=c?Bhe(c):Qq(a),m={},p=[];if(typeof a.checked==="boolean"){let S=u[0],I;if(S&&S.type==="element"&&S.tagName==="p")I=S;else I={type:"element",tagName:"p",properties:{},children:[]},u.unshift(I);if(I.children.length>0)I.children.unshift({type:"text",value:" "});I.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:a.checked,disabled:!0},children:[]}),m.className=["task-list-item"]}let g=-1;while(++g<u.length){let S=u[g];if(f||g!==0||S.type!=="element"||S.tagName!=="p")p.push({type:"text",value:`
81
+ `});if(S.type==="element"&&S.tagName==="p"&&!f)p.push(...S.children);else p.push(S)}let v=u[u.length-1];if(v&&(f||v.type!=="element"||v.tagName!=="p"))p.push({type:"text",value:`
82
+ `});let k={type:"element",tagName:"li",properties:m,children:p};return t.patch(a,k),t.applyData(a,k)}function Bhe(t){let a=!1;if(t.type==="list"){a=t.spread||!1;let c=t.children,u=-1;while(!a&&++u<c.length)a=Qq(c[u])}return a}function Qq(t){let a=t.spread;return a===null||a===void 0?t.children.length>1:a}function Zq(t,a){let c={},u=t.all(a),f=-1;if(typeof a.start==="number"&&a.start!==1)c.start=a.start;while(++f<u.length){let p=u[f];if(p.type==="element"&&p.tagName==="li"&&p.properties&&Array.isArray(p.properties.className)&&p.properties.className.includes("task-list-item")){c.className=["contains-task-list"];break}}let m={type:"element",tagName:a.ordered?"ol":"ul",properties:c,children:t.wrap(u,!0)};return t.patch(a,m),t.applyData(a,m)}function Jq(t,a){let c={type:"element",tagName:"p",properties:{},children:t.all(a)};return t.patch(a,c),t.applyData(a,c)}function eH(t,a){let c={type:"root",children:t.wrap(t.all(a))};return t.patch(a,c),t.applyData(a,c)}function tH(t,a){let c={type:"element",tagName:"strong",properties:{},children:t.all(a)};return t.patch(a,c),t.applyData(a,c)}function nH(t,a){let c=t.all(a),u=c.shift(),f=[];if(u){let p={type:"element",tagName:"thead",properties:{},children:t.wrap([u],!0)};t.patch(a.children[0],p),f.push(p)}if(c.length>0){let p={type:"element",tagName:"tbody",properties:{},children:t.wrap(c,!0)},g=Ih(a.children[1]),v=Kk(a.children[a.children.length-1]);if(g&&v)p.position={start:g,end:v};f.push(p)}let m={type:"element",tagName:"table",properties:{},children:t.wrap(f,!0)};return t.patch(a,m),t.applyData(a,m)}function rH(t,a,c){let u=c?c.children:void 0,m=(u?u.indexOf(a):1)===0?"th":"td",p=c&&c.type==="table"?c.align:void 0,g=p?p.length:a.children.length,v=-1,k=[];while(++v<g){let I=a.children[v],T={},L=p?p[v]:void 0;if(L)T.align=L;let R={type:"element",tagName:m,properties:T,children:[]};if(I)R.children=t.all(I),t.patch(I,R),R=t.applyData(I,R);k.push(R)}let S={type:"element",tagName:"tr",properties:{},children:t.wrap(k,!0)};return t.patch(a,S),t.applyData(a,S)}function oH(t,a){let c={type:"element",tagName:"td",properties:{},children:t.all(a)};return t.patch(a,c),t.applyData(a,c)}function iH(t){let a=String(t),c=/\r?\n|\r/g,u=c.exec(a),f=0,m=[];while(u)m.push(aH(a.slice(f,u.index),f>0,!0),u[0]),f=u.index+u[0].length,u=c.exec(a);return m.push(aH(a.slice(f),f>0,!1)),m.join("")}function aH(t,a,c){let u=0,f=t.length;if(a){let m=t.codePointAt(u);while(m===9||m===32)u++,m=t.codePointAt(u)}if(c){let m=t.codePointAt(f-1);while(m===9||m===32)f--,m=t.codePointAt(f-1)}return f>u?t.slice(u,f):""}function sH(t,a){let c={type:"text",value:iH(String(a.value))};return t.patch(a,c),t.applyData(a,c)}function lH(t,a){let c={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(a,c),t.applyData(a,c)}var cH={blockquote:zq,break:Bq,code:Fq,delete:Vq,emphasis:Uq,footnoteReference:qq,heading:Hq,html:jq,imageReference:Gq,image:$q,inlineCode:Kq,linkReference:Wq,link:Xq,listItem:Yq,list:Zq,paragraph:Jq,root:eH,strong:tH,table:nH,tableCell:oH,tableRow:rH,text:sH,thematicBreak:lH,toml:pS,yaml:pS,definition:pS,footnoteDefinition:pS};function pS(){return}var oP={}.hasOwnProperty,Fhe={};function dH(t,a){let c=a||Fhe,u=new Map,f=new Map,m=new Map,p={...cH,...c.handlers},g={all:k,applyData:Uhe,definitionById:u,footnoteById:f,footnoteCounts:m,footnoteOrder:[],handlers:p,one:v,options:c,patch:Vhe,wrap:Hhe};return bm(t,function(S){if(S.type==="definition"||S.type==="footnoteDefinition"){let I=S.type==="definition"?u:f,T=String(S.identifier).toUpperCase();if(!I.has(T))I.set(T,S)}}),g;function v(S,I){let T=S.type,L=g.handlers[T];if(oP.call(g.handlers,T)&&L)return L(g,S,I);if(g.options.passThrough&&g.options.passThrough.includes(T)){if("children"in S){let{children:A,...E}=S,P=Ph(E);return P.children=g.all(S),P}return Ph(S)}return(g.options.unknownHandler||qhe)(g,S,I)}function k(S){let I=[];if("children"in S){let T=S.children,L=-1;while(++L<T.length){let R=g.one(T[L],S);if(R){if(L&&T[L-1].type==="break"){if(!Array.isArray(R)&&R.type==="text")R.value=uH(R.value);if(!Array.isArray(R)&&R.type==="element"){let A=R.children[0];if(A&&A.type==="text")A.value=uH(A.value)}}if(Array.isArray(R))I.push(...R);else I.push(R)}}}return I}}function Vhe(t,a){if(t.position)a.position=ME(t)}function Uhe(t,a){let c=a;if(t&&t.data){let u=t.data.hName,f=t.data.hChildren,m=t.data.hProperties;if(typeof u==="string")if(c.type==="element")c.tagName=u;else{let p="children"in c?c.children:[c];c={type:"element",tagName:u,properties:{},children:p}}if(c.type==="element"&&m)Object.assign(c.properties,Ph(m));if("children"in c&&c.children&&f!==null&&f!==void 0)c.children=f}return c}function qhe(t,a){let c=a.data||{},u="value"in a&&!(oP.call(c,"hProperties")||oP.call(c,"hChildren"))?{type:"text",value:a.value}:{type:"element",tagName:"div",properties:{},children:t.all(a)};return t.patch(a,u),t.applyData(a,u)}function Hhe(t,a){let c=[],u=-1;if(a)c.push({type:"text",value:`
83
+ `});while(++u<t.length){if(u)c.push({type:"text",value:`
84
+ `});c.push(t[u])}if(a&&t.length>0)c.push({type:"text",value:`
85
+ `});return c}function uH(t){let a=0,c=t.charCodeAt(a);while(c===9||c===32)a++,c=t.charCodeAt(a);return t.slice(a)}function hS(t,a){let c=dH(t,a),u=c.one(t,void 0),f=Nq(c),m=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};if(f)fn("children"in m),m.children.push({type:"text",value:`
86
+ `},f);return m}function gS(t,a){if(t&&"run"in t)return async function(c,u){let f=hS(c,{file:u,...a});await t.run(f,u)};return function(c,u){return hS(c,{file:u,...t||a})}}function aP(t){if(t)throw t}var bS=Ye(yH(),1);function Gv(t){if(typeof t!=="object"||t===null)return!1;let a=Object.getPrototypeOf(t);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function iP(){let t=[],a={run:c,use:u};return a;function c(...f){let m=-1,p=f.pop();if(typeof p!=="function")throw TypeError("Expected function as last argument, not "+p);g(null,...f);function g(v,...k){let S=t[++m],I=-1;if(v){p(v);return}while(++I<f.length)if(k[I]===null||k[I]===void 0)k[I]=f[I];if(f=k,S)wH(S,g)(...k);else p(null,...k)}}function u(f){if(typeof f!=="function")throw TypeError("Expected `middelware` to be a function, not "+f);return t.push(f),a}}function wH(t,a){let c;return u;function u(...p){let g=t.length>p.length,v;if(g)p.push(f);try{v=t.apply(this,p)}catch(k){let S=k;if(g&&c)throw S;return f(S)}if(!g)if(v&&v.then&&typeof v.then==="function")v.then(m,f);else if(v instanceof Error)f(v);else m(v)}function f(p,...g){if(!c)c=!0,a(p,...g)}function m(p){f(null,p)}}var Rs={basename:jhe,dirname:Ghe,extname:$he,join:Khe,sep:"/"};function jhe(t,a){if(a!==void 0&&typeof a!=="string")throw TypeError('"ext" argument must be a string');$v(t);let c=0,u=-1,f=t.length,m;if(a===void 0||a.length===0||a.length>t.length){while(f--)if(t.codePointAt(f)===47){if(m){c=f+1;break}}else if(u<0)m=!0,u=f+1;return u<0?"":t.slice(c,u)}if(a===t)return"";let p=-1,g=a.length-1;while(f--)if(t.codePointAt(f)===47){if(m){c=f+1;break}}else{if(p<0)m=!0,p=f+1;if(g>-1)if(t.codePointAt(f)===a.codePointAt(g--)){if(g<0)u=f}else g=-1,u=p}if(c===u)u=p;else if(u<0)u=t.length;return t.slice(c,u)}function Ghe(t){if($v(t),t.length===0)return".";let a=-1,c=t.length,u;while(--c)if(t.codePointAt(c)===47){if(u){a=c;break}}else if(!u)u=!0;return a<0?t.codePointAt(0)===47?"/":".":a===1&&t.codePointAt(0)===47?"//":t.slice(0,a)}function $he(t){$v(t);let a=t.length,c=-1,u=0,f=-1,m=0,p;while(a--){let g=t.codePointAt(a);if(g===47){if(p){u=a+1;break}continue}if(c<0)p=!0,c=a+1;if(g===46){if(f<0)f=a;else if(m!==1)m=1}else if(f>-1)m=-1}if(f<0||c<0||m===0||m===1&&f===c-1&&f===u+1)return"";return t.slice(f,c)}function Khe(...t){let a=-1,c;while(++a<t.length)if($v(t[a]),t[a])c=c===void 0?t[a]:c+"/"+t[a];return c===void 0?".":Whe(c)}function Whe(t){$v(t);let a=t.codePointAt(0)===47,c=Xhe(t,!a);if(c.length===0&&!a)c=".";if(c.length>0&&t.codePointAt(t.length-1)===47)c+="/";return a?"/"+c:c}function Xhe(t,a){let c="",u=0,f=-1,m=0,p=-1,g,v;while(++p<=t.length){if(p<t.length)g=t.codePointAt(p);else if(g===47)break;else g=47;if(g===47){if(f===p-1||m===1);else if(f!==p-1&&m===2){if(c.length<2||u!==2||c.codePointAt(c.length-1)!==46||c.codePointAt(c.length-2)!==46){if(c.length>2){if(v=c.lastIndexOf("/"),v!==c.length-1){if(v<0)c="",u=0;else c=c.slice(0,v),u=c.length-1-c.lastIndexOf("/");f=p,m=0;continue}}else if(c.length>0){c="",u=0,f=p,m=0;continue}}if(a)c=c.length>0?c+"/..":"..",u=2}else{if(c.length>0)c+="/"+t.slice(f+1,p);else c=t.slice(f+1,p);u=p-f-1}f=p,m=0}else if(g===46&&m>-1)m++;else m=-1}return c}function $v(t){if(typeof t!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify(t))}var kH={cwd:Yhe};function Yhe(){return"/"}function Ah(t){return Boolean(t!==null&&typeof t==="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function SH(t){if(typeof t==="string")t=new URL(t);else if(!Ah(t)){let a=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw a.code="ERR_INVALID_ARG_TYPE",a}if(t.protocol!=="file:"){let a=TypeError("The URL must be of scheme file");throw a.code="ERR_INVALID_URL_SCHEME",a}return Qhe(t)}function Qhe(t){if(t.hostname!==""){let u=TypeError('File URL host must be "localhost" or empty on darwin');throw u.code="ERR_INVALID_FILE_URL_HOST",u}let a=t.pathname,c=-1;while(++c<a.length)if(a.codePointAt(c)===37&&a.codePointAt(c+1)===50){let u=a.codePointAt(c+2);if(u===70||u===102){let f=TypeError("File URL path must not include encoded / characters");throw f.code="ERR_INVALID_FILE_URL_PATH",f}}return decodeURIComponent(a)}var sP=["history","path","basename","stem","extname","dirname"];class Mh{constructor(t){let a;if(!t)a={};else if(Ah(t))a={path:t};else if(typeof t==="string"||Zhe(t))a={value:t};else a=t;this.cwd="cwd"in a?"":kH.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let c=-1;while(++c<sP.length){let f=sP[c];if(f in a&&a[f]!==void 0&&a[f]!==null)this[f]=f==="history"?[...a[f]]:a[f]}let u;for(u in a)if(!sP.includes(u))this[u]=a[u]}get basename(){return typeof this.path==="string"?Rs.basename(this.path):void 0}set basename(t){cP(t,"basename"),lP(t,"basename"),this.path=Rs.join(this.dirname||"",t)}get dirname(){return typeof this.path==="string"?Rs.dirname(this.path):void 0}set dirname(t){CH(this.basename,"dirname"),this.path=Rs.join(t||"",this.basename)}get extname(){return typeof this.path==="string"?Rs.extname(this.path):void 0}set extname(t){if(lP(t,"extname"),CH(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(t.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=Rs.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){if(Ah(t))t=SH(t);if(cP(t,"path"),this.path!==t)this.history.push(t)}get stem(){return typeof this.path==="string"?Rs.basename(this.path,this.extname):void 0}set stem(t){cP(t,"stem"),lP(t,"stem"),this.path=Rs.join(this.dirname||"",t+(this.extname||""))}fail(t,a,c){let u=this.message(t,a,c);throw u.fatal=!0,u}info(t,a,c){let u=this.message(t,a,c);return u.fatal=void 0,u}message(t,a,c){let u=new _r(t,a,c);if(this.path)u.name=this.path+":"+u.name,u.file=this.path;return u.fatal=!1,this.messages.push(u),u}toString(t){if(this.value===void 0)return"";if(typeof this.value==="string")return this.value;return new TextDecoder(t||void 0).decode(this.value)}}function lP(t,a){if(t&&t.includes(Rs.sep))throw Error("`"+a+"` cannot be a path: did not expect `"+Rs.sep+"`")}function cP(t,a){if(!t)throw Error("`"+a+"` cannot be empty")}function CH(t,a){if(!t)throw Error("Setting `"+a+"` requires `path` to be set too")}function Zhe(t){return Boolean(t&&typeof t==="object"&&"byteLength"in t&&"byteOffset"in t)}var IH=function(t){let u=this.constructor.prototype,f=u[t],m=function(){return f.apply(m,arguments)};return Object.setPrototypeOf(m,u),m};var Jhe={}.hasOwnProperty;class mP extends IH{constructor(){super("copy");this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=iP()}copy(){let t=new mP,a=-1;while(++a<this.attachers.length){let c=this.attachers[a];t.use(...c)}return t.data(bS.default(!0,{},this.namespace)),t}data(t,a){if(typeof t==="string"){if(arguments.length===2)return fP("data",this.frozen),this.namespace[t]=a,this;return Jhe.call(this.namespace,t)&&this.namespace[t]||void 0}if(t)return fP("data",this.frozen),this.namespace=t,this;return this.namespace}freeze(){if(this.frozen)return this;let t=this;while(++this.freezeIndex<this.attachers.length){let[a,...c]=this.attachers[this.freezeIndex];if(c[0]===!1)continue;if(c[0]===!0)c[0]=void 0;let u=a.call(t,...c);if(typeof u==="function")this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let a=vS(t),c=this.parser||this.Parser;return uP("parse",c),c(String(a),a)}process(t,a){let c=this;return this.freeze(),uP("process",this.parser||this.Parser),dP("process",this.compiler||this.Compiler),a?u(void 0,a):new Promise(u);function u(f,m){let p=vS(t),g=c.parse(p);c.run(g,p,function(k,S,I){if(k||!S||!I)return v(k);let T=S,L=c.stringify(T,I);if(tge(L))I.value=L;else I.result=L;v(k,I)});function v(k,S){if(k||!S)m(k);else if(f)f(S);else fn(a,"`done` is defined if `resolve` is not"),a(void 0,S)}}}processSync(t){let a=!1,c;return this.freeze(),uP("processSync",this.parser||this.Parser),dP("processSync",this.compiler||this.Compiler),this.process(t,u),LH("processSync","process",a),fn(c,"we either bailed on an error or have a tree"),c;function u(f,m){a=!0,aP(f),c=m}}run(t,a,c){TH(t),this.freeze();let u=this.transformers;if(!c&&typeof a==="function")c=a,a=void 0;return c?f(void 0,c):new Promise(f);function f(m,p){fn(typeof a!=="function","`file` can’t be a `done` anymore, we checked");let g=vS(a);u.run(t,g,v);function v(k,S,I){let T=S||t;if(k)p(k);else if(m)m(T);else fn(c,"`done` is defined if `resolve` is not"),c(void 0,T,I)}}}runSync(t,a){let c=!1,u;return this.run(t,a,f),LH("runSync","run",c),fn(u,"we either bailed on an error or have a tree"),u;function f(m,p){aP(m),u=p,c=!0}}stringify(t,a){this.freeze();let c=vS(a),u=this.compiler||this.Compiler;return dP("stringify",u),TH(t),u(t,c)}use(t,...a){let c=this.attachers,u=this.namespace;if(fP("use",this.frozen),t===null||t===void 0);else if(typeof t==="function")g(t,a);else if(typeof t==="object")if(Array.isArray(t))p(t);else m(t);else throw TypeError("Expected usable value, not `"+t+"`");return this;function f(v){if(typeof v==="function")g(v,[]);else if(typeof v==="object")if(Array.isArray(v)){let[k,...S]=v;g(k,S)}else m(v);else throw TypeError("Expected usable value, not `"+v+"`")}function m(v){if(!("plugins"in v)&&!("settings"in v))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");if(p(v.plugins),v.settings)u.settings=bS.default(!0,u.settings,v.settings)}function p(v){let k=-1;if(v===null||v===void 0);else if(Array.isArray(v))while(++k<v.length){let S=v[k];f(S)}else throw TypeError("Expected a list of plugins, not `"+v+"`")}function g(v,k){let S=-1,I=-1;while(++S<c.length)if(c[S][0]===v){I=S;break}if(I===-1)c.push([v,...k]);else if(k.length>0){let[T,...L]=k,R=c[I][1];if(Gv(R)&&Gv(T))T=bS.default(!0,R,T);c[I]=[v,T,...L]}}}}var pP=new mP().freeze();function uP(t,a){if(typeof a!=="function")throw TypeError("Cannot `"+t+"` without `parser`")}function dP(t,a){if(typeof a!=="function")throw TypeError("Cannot `"+t+"` without `compiler`")}function fP(t,a){if(a)throw Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function TH(t){if(!Gv(t)||typeof t.type!=="string")throw TypeError("Expected node, got `"+t+"`")}function LH(t,a,c){if(!c)throw Error("`"+t+"` finished async. Use `"+a+"` instead")}function vS(t){return ege(t)?t:new Mh(t)}function ege(t){return Boolean(t&&typeof t==="object"&&"message"in t&&"messages"in t)}function tge(t){return typeof t==="string"||nge(t)}function nge(t){return Boolean(t&&typeof t==="object"&&"byteLength"in t&&"byteOffset"in t)}var rge="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",RH=[],EH={allowDangerousHtml:!0},oge=/^(https?|ircs?|mailto|xmpp)$/i,age=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function yS(t){let a=ige(t),c=sge(t);return lge(a.runSync(a.parse(c),c),t)}function ige(t){let a=t.rehypePlugins||RH,c=t.remarkPlugins||RH,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...EH}:EH;return pP().use(aS).use(c).use(gS,u).use(a)}function sge(t){let a=t.children||"",c=new Mh;if(typeof a==="string")c.value=a;else qk("Unexpected value `"+a+"` for `children` prop, expected `string`");return c}function lge(t,a){let{allowedElements:c,allowElement:u,components:f,disallowedElements:m,skipHtml:p,unwrapDisallowed:g}=a,v=a.urlTransform||PH;for(let S of age)if(Object.hasOwn(a,S.from))qk("Unexpected `"+S.from+"` prop, "+(S.to?"use `"+S.to+"` instead":"remove it")+" (see <"+rge+"#"+S.id+"> for more info)");if(c&&m)qk("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other");return bm(t,k),OE(t,{Fragment:h,components:f,ignoreInvalidStyle:!0,jsx:e,jsxs:n,passKeys:!0,passNode:!0});function k(S,I,T){if(S.type==="raw"&&T&&typeof I==="number"){if(p)T.children.splice(I,1);else T.children[I]={type:"text",value:S.value};return I}if(S.type==="element"){let L;for(L in Mv)if(Object.hasOwn(Mv,L)&&Object.hasOwn(S.properties,L)){let R=S.properties[L],A=Mv[L];if(A===null||A.includes(S.tagName))S.properties[L]=v(String(R||""),L,S)}}if(S.type==="element"){let L=c?!c.includes(S.tagName):m?m.includes(S.tagName):!1;if(!L&&u&&typeof I==="number")L=!u(S,I,T);if(L&&T&&typeof I==="number"){if(g&&S.children)T.children.splice(I,1,...S.children);else T.children.splice(I,1);return I}}}}function PH(t){let a=t.indexOf(":"),c=t.indexOf("?"),u=t.indexOf("#"),f=t.indexOf("/");if(a===-1||f!==-1&&a>f||c!==-1&&a>c||u!==-1&&a>u||oge.test(t.slice(0,a)))return t;return""}var Ln={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533};var ym={attentionSideAfter:2,attentionSideBefore:1,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:"content",contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4};var Ml={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"};var AH=161,MH=1114109,DH=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],NH=12288,OH=65510,_H=[12288,12288,65281,65376,65504,65510],zH=8361,BH=65518,FH=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],VH=32,UH=10630,qH=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],HH=4352,jH=262141,hP=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101594,101631,101664,101760,101874,101888,102801,102816,102866,110576,110579,110581,110587,110589,110590,110592,110888,110898,110898,110928,110930,110933,110933,110948,110952,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127406,127406,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128729,128732,128735,128747,128748,128756,128764,128986,128986,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129734,129736,129736,129740,129757,129759,129771,129775,129786,131072,196605,196608,262141];var Dh=(t,a)=>{let c=0,u=Math.floor(t.length/2)-1;while(c<=u){let f=Math.floor((c+u)/2),m=f*2;if(a<t[m])u=f-1;else if(a>t[m+1])c=f+1;else return!0}return!1};var GH=19968,[cge,uge]=dge(hP);function dge(t){let a=t[0],c=t[1];for(let u=0;u<t.length;u+=2){let f=t[u],m=t[u+1];if(GH>=f&&GH<=m)return[f,m];if(m-f>c-a)a=f,c=m}return[a,c]}var $H=(t)=>{if(t<AH||t>MH)return!1;return Dh(DH,t)},KH=(t)=>{if(t<NH||t>OH)return!1;return Dh(_H,t)},fge=(t)=>{if(t<zH||t>BH)return!1;return Dh(FH,t)},mge=(t)=>{if(t<VH||t>UH)return!1;return Dh(qH,t)},WH=(t)=>{if(t>=cge&&t<=uge)return!0;if(t<HH||t>jH)return!1;return Dh(hP,t)};function XH(t){if($H(t))return"ambiguous";if(KH(t))return"fullwidth";if(fge(t))return"halfwidth";if(mge(t))return"narrow";if(WH(t))return"wide";return"neutral"}function pge(t){if(!Number.isSafeInteger(t))throw TypeError(`Expected a code point, got \`${typeof t}\`.`)}function YH(t){return pge(t),XH(t)}function hge(t){return/^\p{Emoji_Presentation}/u.test(String.fromCodePoint(t))}function QH(t){if(!t||t<4352)return!1;switch(YH(t)){case"fullwidth":case"halfwidth":return!0;case"wide":return!hge(t);case"narrow":return!1;case"ambiguous":return 917760<=t&&t<=917999?null:!1;case"neutral":return/^\p{sc=Hangul}/u.test(String.fromCodePoint(t))}}function ZH(t,a){if(a!==65025||!t||t<8216)return!1;return t===8216||t===8217||t===8220||t===8221}function JH(t){return t!==null&&t>=65024&&t<=65038}var ej=nj(/\p{P}|\p{S}/u),tj=nj(/\s/);function nj(t){return a;function a(c){return c!==null&&c>-1&&t.test(String.fromCodePoint(c))}}function _a(t){return Boolean(t&ym.characterGroupWhitespace)}function ud(t){return(t&za.cjkPunctuation)===ym.characterGroupPunctuation}function Kv(t){return Boolean(t&za.cjk)}function wm(t){return Boolean(t&za.cjkOrIvs)}function Nh(t){return t===za.nonEmojiGeneralUseVS}function km(t){return Boolean(t&za.spaceOrPunctuation)}var za;(function(t){t.spaceOrPunctuation=3,t.cjk=4096,t.cjkPunctuation=4098,t.ivs=8192,t.cjkOrIvs=12288,t.nonEmojiGeneralUseVS=16384,t.variationSelector=24576,t.ivsToCjkRightShift=1})(za||(za={}));function Es(t){if(t===Ln.eof||nn(t)||tj(t))return ym.characterGroupWhitespace;let a=0;if(t>=4352){if(JH(t))return za.nonEmojiGeneralUseVS;switch(QH(t)){case null:return za.ivs;case!0:a|=za.cjk;break}}if(ej(t))a|=ym.characterGroupPunctuation;return a}function Wv(t,a,c){if(!Nh(t))return t;let u=a(),f=Es(u);return!u||_a(f)?t:ZH(u,c)?za.cjkPunctuation:gge(f)}function gge(t){return t&~za.ivs}function gP(t){return Boolean(t&&t>=55296&&t<=56319)}function xP(t){return Boolean(t&&t>=56320&&t<=57343)}function vP(t,a,c){if(a._bufferIndex<2)return t;let u=c({start:{...a,_bufferIndex:a._bufferIndex-2},end:a}).codePointAt(0);return u&&u>=65536?u:t}function rj(t,a,c){let u=t>=65536?2:1;if(a._bufferIndex<1+u)return null;let f=a._bufferIndex-u-2,m=c({start:{...a,_bufferIndex:f>=0?f:0},end:{...a,_bufferIndex:a._bufferIndex-u}}),p=m.charCodeAt(m.length-1);if(Number.isNaN(p))return null;if(m.length<2||p<56320||57343<p)return p;let g=m.codePointAt(0);if(g&&g>=65536)return g;return p}var bP=class{cachedValue=void 0;constructor(t,a,c){this.previousCode=t,this.nowPoint=a,this.sliceSerialize=c}value(){if(this.cachedValue===void 0)this.cachedValue=rj(this.previousCode,this.nowPoint,this.sliceSerialize);return this.cachedValue}};function yP(t,a,c){let u=c({start:a,end:{...a,_bufferIndex:a._bufferIndex+2}}).codePointAt(0);return u&&u>=65536?u:t}var wS={name:"attention",resolveAll:xge,tokenize:vge};function xge(t,a){let c=-1,u,f,m,p,g,v,k,S;while(++c<t.length)if(t[c][0]==="enter"&&t[c][1].type==="attentionSequence"&&t[c][1]._close){u=c;while(u--)if(t[u][0]==="exit"&&t[u][1].type==="attentionSequence"&&t[u][1]._open&&a.sliceSerialize(t[u][1]).charCodeAt(0)===a.sliceSerialize(t[c][1]).charCodeAt(0)){if((t[u][1]._close||t[c][1]._open)&&(t[c][1].end.offset-t[c][1].start.offset)%3&&!((t[u][1].end.offset-t[u][1].start.offset+t[c][1].end.offset-t[c][1].start.offset)%3))continue;v=t[u][1].end.offset-t[u][1].start.offset>1&&t[c][1].end.offset-t[c][1].start.offset>1?2:1;let I={...t[u][1].end},T={...t[c][1].start};if(oj(I,-v),oj(T,v),p={type:v>1?Ml.strongSequence:Ml.emphasisSequence,start:I,end:{...t[u][1].end}},g={type:v>1?Ml.strongSequence:Ml.emphasisSequence,start:{...t[c][1].start},end:T},m={type:v>1?Ml.strongText:Ml.emphasisText,start:{...t[u][1].end},end:{...t[c][1].start}},f={type:v>1?Ml.strong:Ml.emphasis,start:{...p.start},end:{...g.end}},t[u][1].end={...p.start},t[c][1].start={...g.end},k=[],t[u][1].end.offset-t[u][1].start.offset)k=Lr(k,[["enter",t[u][1],a],["exit",t[u][1],a]]);if(k=Lr(k,[["enter",f,a],["enter",p,a],["exit",p,a],["enter",m,a]]),fn(a.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),k=Lr(k,Ll(a.parser.constructs.insideSpan.null,t.slice(u+1,c),a)),k=Lr(k,[["exit",m,a],["enter",g,a],["exit",g,a],["exit",f,a]]),t[c][1].end.offset-t[c][1].start.offset)S=2,k=Lr(k,[["enter",t[c][1],a],["exit",t[c][1],a]]);else S=0;Hr(t,u-1,c-u+3,k),c=u+k.length-S-2;break}}c=-1;while(++c<t.length)if(t[c][1].type==="attentionSequence")t[c][1].type="data";return t}function vge(t,a){let c=this.parser.constructs.attentionMarkers.null,{now:u,sliceSerialize:f,previous:m}=this,p=xP(m)?vP(m,u(),f):m,g=Es(p),v=new bP(p,u(),f),k=Wv(g,v.value.bind(v),p),S;return I;function I(L){return fn(L===Ln.asterisk||L===Ln.underscore,"expected asterisk or underscore"),S=L,t.enter("attentionSequence"),T(L)}function T(L){if(L===S)return t.consume(L),T;let R=t.exit("attentionSequence"),A=gP(L)?yP(L,u(),f):L,E=Es(A);fn(c,"expected `attentionMarkers` to be populated");let P=ud(k),D=p===Ln.asterisk||p===Ln.underscore,N=P||_a(k)||D,O=ud(E),F=L===Ln.asterisk||L===Ln.underscore,z=O||_a(E)||F,B=wm(k),U=!z||O&&(N||B)||c.includes(L)&&L!==Ln.asterisk&&L!==Ln.underscore,Y=!N||P&&(z||Kv(E))||c.includes(p)&&p!==Ln.asterisk&&p!==Ln.underscore;return R._open=Boolean(S===Ln.asterisk?U:U&&(km(k)||!Y)),R._close=Boolean(S===Ln.asterisk?Y:Y&&(km(E)||!U)),a(L)}}function oj(t,a){t.column+=a,t.offset+=a,t._bufferIndex+=a}function aj(){return{text:{[Ln.asterisk]:wS,[Ln.underscore]:wS},insideSpan:{null:[wS]}}}function ij(){let t=this.data();(t.micromarkExtensions||(t.micromarkExtensions=[])).push(aj())}var bge=";".codePointAt(0)??Ln.eof,yge="&".codePointAt(0)??Ln.eof;function dj(){return{handlers:{emphasis:fj,strong:mj,text:wge}}}fj.peek=pj;mj.peek=hj;function fj(t,a,c,u){return gj(t,a,c,u,pj(t,a,c),1)}function mj(t,a,c,u){return gj(t,a,c,u,hj(t,a,c),2)}function pj(t,a,c){return c.options.emphasis||"*"}function hj(t,a,c){return c.options.strong||"*"}function gj(t,a,c,u,f,m){let p=f.repeat(m),g=c.enter(m===1?"emphasis":"strong"),v=c.createTracker(u),k=v.move(p),S=v.move(c.containerPhrasing(t,{after:f,before:k,...v.current()})),I=Cge(t,a,c,u.before),T=Ige(t,a,c,u.after),L=sj(I,kS(S),f,"open");if(L.inside&&S)S=Pge(S);let R=sj({current:SP(S),previous:kP(S)},T,f,"close");if(R.inside&&S)S=Age(S);let A=v.move(p);g();let E=R.outside&&Ege(a,c);return c.attentionEncodeSurroundingInfo={after:R.outside&&!E,before:L.outside},bj(c).cjkFriendlyEncodeAfterSupplementaryText=E,k+S+A}function wge(t,a,c,u){let f=bj(c);if(!f.cjkFriendlyEncodeAfterSupplementaryText)return c.safe(t.value,u);f.cjkFriendlyEncodeAfterSupplementaryText=!1;let[m=""]=[...t.value],p=t.value.slice(m.length);return`${IP(m.codePointAt(0)??Ln.eof)}${c.safe(p,{...u,before:";"})}`}function sj(t,a,c,u){let f=CP(t),m=Es(a);if(!wm(f)&&!wm(m))return u==="open"?lj(f,m,c):lj(m,f,c);let p={inside:!1,outside:!1},g={inside:!0,outside:!1},v={inside:!1,outside:!0},k={inside:!0,outside:!0};for(let S of[p,g,v,k]){let I=u==="open"?S.outside?cj:t:S.inside?cj:t,T=u==="open"?S.inside?uj:a:S.outside?uj:a;if(u==="open"?kge(c,I,T):Sge(c,I,T))return S}return k}function lj(t,a,c){if(wP(t))return wP(a)?c==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:_a(a)?{inside:!0,outside:!0}:{inside:!1,outside:!0};if(_a(t))return wP(a)?{inside:!1,outside:!1}:_a(a)?{inside:!0,outside:!0}:{inside:!1,outside:!1};return _a(a)?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function kge(t,a,c){let u=CP(a),{close:f,open:m}=xj(u,Es(c));return t==="_"?m&&(km(u)||!f):m}function Sge(t,a,c){let u=Es(c),{close:f,open:m}=xj(CP(a),u);return t==="_"?f&&(km(u)||!m):f}function xj(t,a){let c=ud(t),u=c||_a(t),f=ud(a),m=f||_a(a);return{open:!m||f&&(u||wm(t)),close:!u||c&&(m||Kv(a))}}function wP(t){return!_a(t)&&!ud(t)}function CP(t){let a=Es(t.current);return t.current===null||!Nh(a)?a:Wv(a,()=>t.previous,t.current)}function Cge(t,a,c,u){let f=SP(u),m=kP(u);if(Tge(f)||Rge(f,m)){let p=vj(t,a,c,-1);if(p)f=SP(p),m=kP(p)}return{current:f,previous:m}}function Ige(t,a,c,u){let f=kS(u);if(!Lge(f))return f;let m=vj(t,a,c,1);return m?kS(m):f}function Tge(t){return t!==null&&56320<=t&&t<=57343}function Lge(t){return t!==null&&55296<=t&&t<=56319}function Rge(t,a){return Nh(Es(t))&&(a===null||a===Ln.eof)}function vj(t,a,c,u){if(!a)return;let f=c.indexStack.at(-1),m=a.children,p=typeof f==="number"?f:m.indexOf(t);if(p<0)return;let g=m[p+u];return yj(g)||void 0}function Ege(t,a){if(!t)return!1;let c=a.indexStack.at(-1);if(typeof c!=="number")return!1;let u=t.children[c+1];return u?.type==="text"&&(kS(u.value)??0)>65535}function bj(t){return t}function yj(t){if(!t||typeof t!=="object")return"";if("value"in t&&typeof t.value==="string")return t.value;if("alt"in t&&typeof t.alt==="string")return t.alt;if("children"in t&&Array.isArray(t.children))return t.children.map(yj).join("");return""}function IP(t){return`&#x${(t??0).toString(16).toUpperCase()};`}function Pge(t){let[a=""]=[...t];return IP(a.codePointAt(0)??Ln.eof)+t.slice(a.length)}function Age(t){let a=[...t],c=a.pop();return`${a.join("")}${IP(c?.codePointAt(0)??Ln.eof)}`}function kP(t){let a=[...t];return a.pop(),a.at(-1)?.codePointAt(0)??Ln.eof}function kS(t){return t.codePointAt(0)??Ln.eof}function SP(t){return[...t].at(-1)?.codePointAt(0)??Ln.eof}var cj={current:bge,previous:Ln.eof},uj=yge;function wj(){let t=this.data();(t.toMarkdownExtensions||(t.toMarkdownExtensions=[])).push(dj())}function kj(){ij.call(this),wj.call(this)}var TP=kj;function ei(t,a){let c=String(t);if(typeof a!=="string")throw TypeError("Expected character");let u=0,f=c.indexOf(a);while(f!==-1)u++,f=c.indexOf(a,f+a.length);return u}function LP(t){if(typeof t!=="string")throw TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function RP(t,a,c){let f=cd((c||{}).ignore||[]),m=Mge(a),p=-1;while(++p<m.length)jv(t,"text",g);function g(k,S){let I=-1,T;while(++I<S.length){let L=S[I],R=T?T.children:void 0;if(f(L,R?R.indexOf(L):void 0,T))return;T=L}if(T)return v(k,S)}function v(k,S){let I=S[S.length-1],T=m[p][0],L=m[p][1],R=0,E=I.children.indexOf(k),P=!1,D=[];T.lastIndex=0;let N=T.exec(k.value);while(N){let F=N.index,z={index:N.index,input:N.input,stack:[...S,k]},B=L(...N,z);if(typeof B==="string")B=B.length>0?{type:"text",value:B}:void 0;if(B===!1)T.lastIndex=F+1;else{if(R!==F)O({type:"text",value:k.value.slice(R,F)});if(Array.isArray(B))for(let U of B)O(U);else if(B)O(B);R=F+N[0].length,P=!0}if(!T.global)break;N=T.exec(k.value)}if(P){if(R<k.value.length)O({type:"text",value:k.value.slice(R)});I.children.splice(E,1,...D)}else D=[k];return E+D.length;function O(F){let z=D[D.length-1];if(z&&z.type==="text"&&F.type==="text")z.value+=F.value;else D.push(F)}}}function Mge(t){if(!Array.isArray(t))throw TypeError("Expected find and replace tuple or list of tuples");let a=[],c=!t[0]||Array.isArray(t[0])?t:[t],u=-1;while(++u<c.length){let f=c[u];a.push([Dge(f[0]),Nge(f[1])])}return a}function Dge(t){return typeof t==="string"?new RegExp(LP(t),"g"):t}function Nge(t){return typeof t==="function"?t:function(){return t}}var EP="phrasing",PP=["autolink","link","image","label"];function MP(){return{transforms:[Vge],enter:{literalAutolink:Oge,literalAutolinkEmail:AP,literalAutolinkHttp:AP,literalAutolinkWww:AP},exit:{literalAutolink:Fge,literalAutolinkEmail:Bge,literalAutolinkHttp:_ge,literalAutolinkWww:zge}}}function DP(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:EP,notInConstruct:PP},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:EP,notInConstruct:PP},{character:":",before:"[ps]",after:"\\/",inConstruct:EP,notInConstruct:PP}]}}function Oge(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function AP(t){this.config.enter.autolinkProtocol.call(this,t)}function _ge(t){this.config.exit.autolinkProtocol.call(this,t)}function zge(t){this.config.exit.data.call(this,t);let a=this.stack[this.stack.length-1];fn(a.type==="link"),a.url="http://"+this.sliceSerialize(t)}function Bge(t){this.config.exit.autolinkEmail.call(this,t)}function Fge(t){this.exit(t)}function Vge(t){RP(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Uge],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,qge]],{ignore:["link","linkReference"]})}function Uge(t,a,c,u,f){let m="";if(!Sj(f))return!1;if(/^w/i.test(a))c=a+c,a="",m="http://";if(!Hge(c))return!1;let p=jge(c+u);if(!p[0])return!1;let g={type:"link",title:null,url:m+a+p[0],children:[{type:"text",value:a+p[0]}]};if(p[1])return[g,{type:"text",value:p[1]}];return g}function qge(t,a,c,u){if(!Sj(u,!0)||/[-\d_]$/.test(c))return!1;return{type:"link",title:null,url:"mailto:"+a+"@"+c,children:[{type:"text",value:a+"@"+c}]}}function Hge(t){let a=t.split(".");if(a.length<2||a[a.length-1]&&(/_/.test(a[a.length-1])||!/[a-zA-Z\d]/.test(a[a.length-1]))||a[a.length-2]&&(/_/.test(a[a.length-2])||!/[a-zA-Z\d]/.test(a[a.length-2])))return!1;return!0}function jge(t){let a=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!a)return[t,void 0];t=t.slice(0,a.index);let c=a[0],u=c.indexOf(")"),f=ei(t,"("),m=ei(t,")");while(u!==-1&&f>m)t+=c.slice(0,u+1),c=c.slice(u+1),u=c.indexOf(")"),m++;return[t,c]}function Sj(t,a){let c=t.input.charCodeAt(t.index-1);return(t.index===0||Il(c)||fm(c))&&(!a||c!==47)}Cj.peek=Jge;function Gge(){this.buffer()}function $ge(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Kge(){this.buffer()}function Wge(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Xge(t){let a=this.resume(),c=this.stack[this.stack.length-1];fn(c.type==="footnoteReference"),c.identifier=zo(this.sliceSerialize(t)).toLowerCase(),c.label=a}function Yge(t){this.exit(t)}function Qge(t){let a=this.resume(),c=this.stack[this.stack.length-1];fn(c.type==="footnoteDefinition"),c.identifier=zo(this.sliceSerialize(t)).toLowerCase(),c.label=a}function Zge(t){this.exit(t)}function Jge(){return"["}function Cj(t,a,c,u){let f=c.createTracker(u),m=f.move("[^"),p=c.enter("footnoteReference"),g=c.enter("reference");return m+=f.move(c.safe(c.associationId(t),{after:"]",before:m})),g(),p(),m+=f.move("]"),m}function NP(){return{enter:{gfmFootnoteCallString:Gge,gfmFootnoteCall:$ge,gfmFootnoteDefinitionLabelString:Kge,gfmFootnoteDefinition:Wge},exit:{gfmFootnoteCallString:Xge,gfmFootnoteCall:Yge,gfmFootnoteDefinitionLabelString:Qge,gfmFootnoteDefinition:Zge}}}function OP(t){let a=!1;if(t&&t.firstLineBlank)a=!0;return{handlers:{footnoteDefinition:c,footnoteReference:Cj},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function c(u,f,m,p){let g=m.createTracker(p),v=g.move("[^"),k=m.enter("footnoteDefinition"),S=m.enter("label");if(v+=g.move(m.safe(m.associationId(u),{before:v,after:"]"})),S(),v+=g.move("]:"),u.children&&u.children.length>0)g.shift(4),v+=g.move((a?`
87
+ `:" ")+m.indentLines(m.containerFlow(u,g.current()),a?Ij:exe));return k(),v}}function exe(t,a,c){return a===0?t:Ij(t,a,c)}function Ij(t,a,c){return(c?"":" ")+t}var txe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];BP.attention=oxe;BP.peek=axe;function _P(){return{canContainEols:["delete"],enter:{strikethrough:nxe},exit:{strikethrough:rxe}}}function zP(){return{handlers:{delete:BP},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:txe}]}}function nxe(t){this.enter({type:"delete",children:[],position:void 0},t)}function rxe(t){this.exit(t)}function BP(t,a,c,u){let f=c.createTracker(u),m=c.stack.includes("strikethrough")?"~":"~~",p=c.enter("strikethrough"),g=f.move(m);return g+=c.containerPhrasing(t,{...f.current(),before:g,after:"~"}),g+=f.move(m),p(),g}function oxe(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function axe(){return"~"}function ixe(t){return t.length}function Lj(t,a){let c=a||{},u=(c.align||[]).concat(),f=c.stringLength||ixe,m=[],p=[],g=[],v=[],k=0,S=-1;while(++S<t.length){let A=[],E=[],P=-1;if(t[S].length>k)k=t[S].length;while(++P<t[S].length){let D=sxe(t[S][P]);if(c.alignDelimiters!==!1){let N=f(D);if(E[P]=N,v[P]===void 0||N>v[P])v[P]=N}A.push(D)}p[S]=A,g[S]=E}let I=-1;if(typeof u==="object"&&"length"in u)while(++I<k)m[I]=Tj(u[I]);else{let A=Tj(u);while(++I<k)m[I]=A}I=-1;let T=[],L=[];while(++I<k){let A=m[I],E="",P="";if(A===99)E=":",P=":";else if(A===108)E=":";else if(A===114)P=":";let D=c.alignDelimiters===!1?1:Math.max(1,v[I]-E.length-P.length),N=E+"-".repeat(D)+P;if(c.alignDelimiters!==!1){if(D=E.length+D+P.length,D>v[I])v[I]=D;L[I]=D}T[I]=N}p.splice(1,0,T),g.splice(1,0,L),S=-1;let R=[];while(++S<p.length){let A=p[S],E=g[S];I=-1;let P=[];while(++I<k){let D=A[I]||"",N="",O="";if(c.alignDelimiters!==!1){let F=v[I]-(E[I]||0),z=m[I];if(z===114)N=" ".repeat(F);else if(z===99)if(F%2)N=" ".repeat(F/2+0.5),O=" ".repeat(F/2-0.5);else N=" ".repeat(F/2),O=N;else O=" ".repeat(F)}if(c.delimiterStart!==!1&&!I)P.push("|");if(c.padding!==!1&&!(c.alignDelimiters===!1&&D==="")&&(c.delimiterStart!==!1||I))P.push(" ");if(c.alignDelimiters!==!1)P.push(N);if(P.push(D),c.alignDelimiters!==!1)P.push(O);if(c.padding!==!1)P.push(" ");if(c.delimiterEnd!==!1||I!==k-1)P.push("|")}R.push(c.delimiterEnd===!1?P.join("").replace(/ +$/,""):P.join(""))}return R.join(`
88
+ `)}function sxe(t){return t===null||t===void 0?"":String(t)}function Tj(t){let a=typeof t==="string"?t.codePointAt(0):0;return a===67||a===99?99:a===76||a===108?108:a===82||a===114?114:0}function Rj(t,a,c,u){let f=c.enter("blockquote"),m=c.createTracker(u);m.move("> "),m.shift(2);let p=c.indentLines(c.containerFlow(t,m.current()),lxe);return f(),p}function lxe(t,a,c){return">"+(c?"":" ")+t}function Pj(t,a){return Ej(t,a.inConstruct,!0)&&!Ej(t,a.notInConstruct,!1)}function Ej(t,a,c){if(typeof a==="string")a=[a];if(!a||a.length===0)return c;let u=-1;while(++u<a.length)if(t.includes(a[u]))return!0;return!1}function FP(t,a,c,u){let f=-1;while(++f<c.unsafe.length){let m=c.unsafe[f];if(m.character===`
89
+ `&&!m.before&&!m.after&&Pj(c.stack,m))return/[\t ]/.test(u.before)?"":" "}return"\\\n"}function SS(t,a){let c=String(t),u=c.indexOf(a),f=u,m=0,p=0;if(typeof a!=="string")throw TypeError("Expected substring");while(u!==-1){if(u===f){if(++m>p)p=m}else m=1;f=u+a.length,u=c.indexOf(a,f)}return p}function Aj(t,a){return Boolean(a.options.fences===!1&&t.value&&!t.lang&&/[^\n\r ]/.test(t.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(t.value))}function Mj(t){let a=t.options.fence||"`";if(a!=="`"&&a!=="~")throw Error("Cannot serialize code with `"+a+"` for `options.fence`, expected `` ` `` or `~`");return a}function Dj(t,a,c,u){let f=Mj(c),m=t.value||"";if(Aj(t,c)){let I=c.enter("codeIndented"),T=c.indentLines(m,cxe);return I(),T}let p=c.createTracker(u),g=f.repeat(Math.max(SS(m,f)+1,3)),v=c.enter("codeFenced"),k=f==="`"?"GraveAccent":"Tilde",S=p.move(g);if(t.lang){let I=c.enter(`codeFencedLang${k}`);S+=p.move(c.safe(t.lang,{before:S,after:" ",encode:["`"],...p.current()})),I()}if(t.lang&&t.meta){let I=c.enter(`codeFencedMeta${k}`);S+=p.move(" "),S+=p.move(c.safe(t.meta,{before:S,after:`
90
+ `,encode:["`"],...p.current()})),I()}if(S+=p.move(`
91
+ `),m)S+=p.move(m+`
92
+ `);return S+=p.move(g),v(),S}function cxe(t,a,c){return(c?"":" ")+t}function Oh(t){let a=t.options.quote||'"';if(a!=='"'&&a!=="'")throw Error("Cannot serialize title with `"+a+"` for `options.quote`, expected `\"`, or `'`");return a}function Nj(t,a,c,u){let f=Oh(c),m=f==='"'?"Quote":"Apostrophe",p=c.enter("definition"),g=c.enter("label"),v=c.createTracker(u),k=v.move("[");if(k+=v.move(c.safe(c.associationId(t),{before:k,after:"]",...v.current()})),k+=v.move("]: "),g(),!t.url||/[\0- \u007F]/.test(t.url))g=c.enter("destinationLiteral"),k+=v.move("<"),k+=v.move(c.safe(t.url,{before:k,after:">",...v.current()})),k+=v.move(">");else g=c.enter("destinationRaw"),k+=v.move(c.safe(t.url,{before:k,after:t.title?" ":`
93
+ `,...v.current()}));if(g(),t.title)g=c.enter(`title${m}`),k+=v.move(" "+f),k+=v.move(c.safe(t.title,{before:k,after:f,...v.current()})),k+=v.move(f),g();return p(),k}function Oj(t){let a=t.options.emphasis||"*";if(a!=="*"&&a!=="_")throw Error("Cannot serialize emphasis with `"+a+"` for `options.emphasis`, expected `*`, or `_`");return a}CS.attention=uxe;CS.peek=dxe;function CS(t,a,c,u){let f=c.enter("phrasing"),m=c.containerPhrasing({type:"root",children:[t]},u);return f(),m}function uxe(t,a){return{construct:"emphasis",markers:Oj(a)==="*"?["*","_"]:["_","*"],sizes:[1]}}function dxe(t,a,c){return c.options.emphasis||"*"}function _j(t){return"&#x"+t.toString(16).toUpperCase()+";"}function zj(t,a){let c=!1;return bm(t,function(u){if("value"in u&&/\r?\n|\r/.test(u.value)||u.type==="break")return c=!0,vm}),Boolean((!t.depth||t.depth<3)&&um(t)&&(a.options.setext||c))}function Bj(t,a,c,u){let f=Math.max(Math.min(6,t.depth||1),1),m=c.createTracker(u);if(zj(t,c)){let I=c.enter("headingSetext"),T=c.enter("phrasing"),L=c.containerPhrasing(t,{...m.current(),before:`
94
+ `,after:`
95
+ `});return T(),I(),L+`
96
+ `+(f===1?"=":"-").repeat(L.length-(Math.max(L.lastIndexOf("\r"),L.lastIndexOf(`
97
+ `))+1))}let p="#".repeat(f),g=c.enter("headingAtx"),v=c.enter("phrasing");m.move(p+" ");let k=c.containerPhrasing(t,{before:"# ",after:`
98
+ `,...m.current()}),S=k.charCodeAt(0);if(S===9||S===32)k=_j(S)+k.slice(1);if(k=k?p+" "+k:p,c.options.closeAtx)k+=" "+p;return v(),g(),k}VP.peek=fxe;function VP(t){return t.value||""}function fxe(){return"<"}UP.peek=mxe;function UP(t,a,c,u){let f=Oh(c),m=f==='"'?"Quote":"Apostrophe",p=c.enter("image"),g=c.enter("label"),v=c.createTracker(u),k=v.move("![");if(k+=v.move(c.safe(t.alt,{before:k,after:"]",...v.current()})),k+=v.move("]("),g(),!t.url&&t.title||/[\0- \u007F]/.test(t.url))g=c.enter("destinationLiteral"),k+=v.move("<"),k+=v.move(c.safe(t.url,{before:k,after:">",...v.current()})),k+=v.move(">");else g=c.enter("destinationRaw"),k+=v.move(c.safe(t.url,{before:k,after:t.title?" ":")",...v.current()}));if(g(),t.title)g=c.enter(`title${m}`),k+=v.move(" "+f),k+=v.move(c.safe(t.title,{before:k,after:f,...v.current()})),k+=v.move(f),g();return k+=v.move(")"),p(),k}function mxe(){return"!"}qP.peek=pxe;function qP(t,a,c,u){let f=t.referenceType,m=c.enter("imageReference"),p=c.enter("label"),g=c.createTracker(u),v=g.move("!["),k=c.safe(t.alt,{before:v,after:"]",...g.current()});v+=g.move(k+"]["),p();let S=c.stack;c.stack=S.filter(function(T){return T!=="phrasing"}),p=c.enter("reference");let I=c.safe(c.associationId(t),{before:v,after:"]",...g.current()});if(p(),c.stack=S,m(),f==="full"||!k||k!==I)v+=g.move(I+"]");else if(f==="shortcut")v=v.slice(0,-1);else v+=g.move("]");return v}function pxe(){return"!"}HP.peek=hxe;function HP(t,a,c){let u=t.value||"",f="`",m=-1;while(new RegExp("(^|[^`])"+f+"([^`]|$)").test(u))f+="`";if(/[^\n\r ]/.test(u)&&(/^[\n\r ]/.test(u)&&/[\n\r ]$/.test(u)||/^`|`$/.test(u)))u=" "+u+" ";while(++m<c.unsafe.length){let p=c.unsafe[m],g=c.compilePattern(p);if(!p.atBreak)continue;let v;while(v=g.exec(u)){let k=v.index;if(u.charCodeAt(k)===10&&u.charCodeAt(k-1)===13)k--;u=u.slice(0,k)+" "+u.slice(v.index+1)}}return f+u+f}function hxe(){return"`"}function jP(t,a){let c=um(t);return Boolean(!a.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(c===t.url||"mailto:"+c===t.url)&&/^[a-z][+\-.a-z]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}GP.peek=gxe;function GP(t,a,c,u){let f=Oh(c),m=f==='"'?"Quote":"Apostrophe",p=c.createTracker(u);if(jP(t,c)){let S=c.stack;c.stack=S.filter(function(L){return L!=="phrasing"});let I=c.enter("autolink"),T=p.move("<");return T+=p.move(c.containerPhrasing(t,{before:T,after:">",...p.current()})),T+=p.move(">"),I(),c.stack=S,T}let g=c.enter("link"),v=c.enter("label"),k=p.move("[");if(k+=p.move(c.containerPhrasing(t,{before:k,after:"](",...p.current()})),k+=p.move("]("),v(),!t.url&&t.title||/[\0- \u007F]/.test(t.url))v=c.enter("destinationLiteral"),k+=p.move("<"),k+=p.move(c.safe(t.url,{before:k,after:">",...p.current()})),k+=p.move(">");else v=c.enter("destinationRaw"),k+=p.move(c.safe(t.url,{before:k,after:t.title?" ":")",...p.current()}));if(v(),t.title)v=c.enter(`title${m}`),k+=p.move(" "+f),k+=p.move(c.safe(t.title,{before:k,after:f,...p.current()})),k+=p.move(f),v();return k+=p.move(")"),g(),k}function gxe(t,a,c){return jP(t,c)?"<":"["}$P.peek=xxe;function $P(t,a,c,u){let f=t.referenceType,m=c.enter("linkReference"),p=c.enter("label"),g=c.createTracker(u),v=g.move("["),k=c.containerPhrasing(t,{before:v,after:"]",...g.current()});v+=g.move(k+"]["),p();let S=c.stack;c.stack=S.filter(function(T){return T!=="phrasing"}),p=c.enter("reference");let I=c.safe(c.associationId(t),{before:v,after:"]",...g.current()});if(p(),c.stack=S,m(),f==="full"||!k||k!==I)v+=g.move(I+"]");else if(f==="shortcut")v=v.slice(0,-1);else v+=g.move("]");return v}function xxe(){return"["}function _h(t){let a=t.options.bullet||"*";if(a!=="*"&&a!=="+"&&a!=="-")throw Error("Cannot serialize items with `"+a+"` for `options.bullet`, expected `*`, `+`, or `-`");return a}function Fj(t){let a=_h(t),c=t.options.bulletOther;if(!c)return a==="*"?"-":"*";if(c!=="*"&&c!=="+"&&c!=="-")throw Error("Cannot serialize items with `"+c+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(c===a)throw Error("Expected `bullet` (`"+a+"`) and `bulletOther` (`"+c+"`) to be different");return c}function Vj(t){let a=t.options.bulletOrdered||".";if(a!=="."&&a!==")")throw Error("Cannot serialize items with `"+a+"` for `options.bulletOrdered`, expected `.` or `)`");return a}function IS(t){let a=t.options.rule||"*";if(a!=="*"&&a!=="-"&&a!=="_")throw Error("Cannot serialize rules with `"+a+"` for `options.rule`, expected `*`, `-`, or `_`");return a}function Uj(t,a,c,u){let f=c.enter("list"),m=c.bulletCurrent,p=t.ordered?Vj(c):_h(c),g=t.ordered?p==="."?")":".":Fj(c),v=a&&c.bulletLastUsed?p===c.bulletLastUsed:!1;if(!t.ordered){let S=t.children?t.children[0]:void 0;if((p==="*"||p==="-")&&S&&(!S.children||!S.children[0])&&c.stack[c.stack.length-1]==="list"&&c.stack[c.stack.length-2]==="listItem"&&c.stack[c.stack.length-3]==="list"&&c.stack[c.stack.length-4]==="listItem"&&c.indexStack[c.indexStack.length-1]===0&&c.indexStack[c.indexStack.length-2]===0&&c.indexStack[c.indexStack.length-3]===0)v=!0;if(IS(c)===p&&S){let I=-1;while(++I<t.children.length){let T=t.children[I];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){v=!0;break}}}}if(v)p=g;c.bulletCurrent=p;let k=c.containerFlow(t,u);return c.bulletLastUsed=p,c.bulletCurrent=m,f(),k}function qj(t){let a=t.options.listItemIndent||"one";if(a!=="tab"&&a!=="one"&&a!=="mixed")throw Error("Cannot serialize items with `"+a+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return a}function Hj(t,a,c,u){let f=qj(c),m=c.bulletCurrent||_h(c);if(a&&a.type==="list"&&a.ordered)m=(typeof a.start==="number"&&a.start>-1?a.start:1)+(c.options.incrementListMarker===!1?0:a.children.indexOf(t))+m;let p=m.length+1;if(f==="tab"||f==="mixed"&&(a&&a.type==="list"&&a.spread||t.spread))p=Math.ceil(p/4)*4;let g=c.createTracker(u);g.move(m+" ".repeat(p-m.length)),g.shift(p);let v=c.enter("listItem"),k=c.indentLines(c.containerFlow(t,g.current()),S);return v(),k;function S(I,T,L){if(T)return(L?"":" ".repeat(p))+I;return(L?m:m+" ".repeat(p-m.length))+I}}function jj(t,a,c,u){let f=c.enter("paragraph"),m=c.enter("phrasing"),p=c.containerPhrasing(t,u);return m(),f(),p}var KP=cd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Gj(t,a,c,u){if(!t.children.some(function(g){return KP(g)}))return c.containerFlow(t,u);let m=c.enter("phrasing"),p=c.containerPhrasing(t,u);return m(),p}function $j(t){let a=t.options.strong||"*";if(a!=="*"&&a!=="_")throw Error("Cannot serialize strong with `"+a+"` for `options.strong`, expected `*`, or `_`");return a}TS.attention=vxe;TS.peek=bxe;function TS(t,a,c,u){let f=c.enter("phrasing"),m=c.containerPhrasing({type:"root",children:[t]},u);return f(),m}function vxe(t,a){return{construct:"strong",markers:$j(a)==="*"?["*","_"]:["_","*"],sizes:[2]}}function bxe(t,a,c){return c.options.strong||"*"}function Kj(t,a,c,u){let f=a?a.children:[],m=f.indexOf(t);return c.safe(t.value,{...u,afterNode:f[m+1],beforeNode:f[m-1]})}function Wj(t){let a=t.options.ruleRepetition||3;if(a<3)throw Error("Cannot serialize rules with repetition `"+a+"` for `options.ruleRepetition`, expected `3` or more");return a}function Xj(t,a,c){let u=(IS(c)+(c.options.ruleSpaces?" ":"")).repeat(Wj(c));return c.options.ruleSpaces?u.slice(0,-1):u}var Xv={blockquote:Rj,break:FP,code:Dj,definition:Nj,emphasis:CS,hardBreak:FP,heading:Bj,html:VP,image:UP,imageReference:qP,inlineCode:HP,link:GP,linkReference:$P,list:Uj,listItem:Hj,paragraph:jj,root:Gj,strong:TS,text:Kj,thematicBreak:Xj};function XP(){return{enter:{table:yxe,tableData:Yj,tableHeader:Yj,tableRow:kxe},exit:{codeText:Sxe,table:wxe,tableData:WP,tableHeader:WP,tableRow:WP}}}function yxe(t){let a=t._align;fn(a,"expected `_align` on table"),this.enter({type:"table",align:a.map(function(c){return c==="none"?null:c}),children:[]},t),this.data.inTable=!0}function wxe(t){this.exit(t),this.data.inTable=void 0}function kxe(t){this.enter({type:"tableRow",children:[]},t)}function WP(t){this.exit(t)}function Yj(t){this.enter({type:"tableCell",children:[]},t)}function Sxe(t){let a=this.resume();if(this.data.inTable)a=a.replace(/\\([\\|])/g,Cxe);let c=this.stack[this.stack.length-1];fn(c.type==="inlineCode"),c.value=a,this.exit(t)}function Cxe(t,a){return a==="|"?a:t}function YP(t){let a=t||{},{tableCellPadding:c,tablePipeAlign:u,stringLength:f}=a,m=c?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
99
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:T,table:p,tableCell:v,tableRow:g}};function p(L,R,A,E){return k(S(L,A,E),L.align)}function g(L,R,A,E){let P=I(L,A,E),D=k([P]);return D.slice(0,D.indexOf(`
100
+ `))}function v(L,R,A,E){let P=A.enter("tableCell"),D=A.enter("phrasing"),N=A.containerPhrasing(L,{...E,before:m,after:m});return D(),P(),N}function k(L,R){return Lj(L,{align:R,alignDelimiters:u,padding:c,stringLength:f})}function S(L,R,A){let E=L.children,P=-1,D=[],N=R.enter("table");while(++P<E.length)D[P]=I(E[P],R,A);return N(),D}function I(L,R,A){let E=L.children,P=-1,D=[],N=R.enter("tableRow");while(++P<E.length)D[P]=v(E[P],L,R,A);return N(),D}function T(L,R,A){let E=Xv.inlineCode(L,R,A);if(A.stack.includes("tableCell"))E=E.replace(/\|/g,"\\$&");return E}}function QP(){return{exit:{taskListCheckValueChecked:Qj,taskListCheckValueUnchecked:Qj,paragraph:Ixe}}}function ZP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Txe}}}function Qj(t){let a=this.stack[this.stack.length-2];fn(a.type==="listItem"),a.checked=t.type==="taskListCheckValueChecked"}function Ixe(t){let a=this.stack[this.stack.length-2];if(a&&a.type==="listItem"&&typeof a.checked==="boolean"){let c=this.stack[this.stack.length-1];fn(c.type==="paragraph");let u=c.children[0];if(u&&u.type==="text"){let f=a.children,m=-1,p;while(++m<f.length){let g=f[m];if(g.type==="paragraph"){p=g;break}}if(p===c){if(u.value=u.value.slice(1),u.value.length===0)c.children.shift();else if(c.position&&u.position&&typeof u.position.start.offset==="number")u.position.start.column++,u.position.start.offset++,c.position.start=Object.assign({},u.position.start)}}}this.exit(t)}function Txe(t,a,c,u){let f=t.children[0],m=typeof t.checked==="boolean"&&f&&f.type==="paragraph",p="["+(t.checked?"x":" ")+"] ",g=c.createTracker(u);if(m)g.move(p);let v=Xv.listItem(t,a,c,{...u,...g.current()});if(m)v=v.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,k);return v;function k(S){return S+p}}function JP(){return[MP(),NP(),_P(),XP(),QP()]}function eA(t){return{extensions:[DP(),OP(t),zP(),YP(t),ZP()]}}var Lxe={tokenize:Mxe,partial:!0},Zj={tokenize:Dxe,partial:!0},Jj={tokenize:Nxe,partial:!0},eG={tokenize:Oxe,partial:!0},Rxe={tokenize:_xe,partial:!0},tG={name:"wwwAutolink",tokenize:Pxe,previous:rG},nG={name:"protocolAutolink",tokenize:Axe,previous:oG},Oc={name:"emailAutolink",tokenize:Exe,previous:aG},Dl={};function nA(){return{text:Dl}}var Sm=48;while(Sm<123)if(Dl[Sm]=Oc,Sm++,Sm===58)Sm=65;else if(Sm===91)Sm=97;Dl[43]=Oc;Dl[45]=Oc;Dl[46]=Oc;Dl[95]=Oc;Dl[72]=[Oc,nG];Dl[104]=[Oc,nG];Dl[87]=[Oc,tG];Dl[119]=[Oc,tG];function Exe(t,a,c){let u=this,f,m;return p;function p(I){if(!tA(I)||!aG.call(u,u.previous)||rA(u.events))return c(I);return t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),g(I)}function g(I){if(tA(I))return t.consume(I),g;if(I===64)return t.consume(I),v;return c(I)}function v(I){if(I===46)return t.check(Rxe,S,k)(I);if(I===45||I===95||vr(I))return m=!0,t.consume(I),v;return S(I)}function k(I){return t.consume(I),f=!0,v}function S(I){if(m&&f&&Jr(u.previous))return t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),a(I);return c(I)}}function Pxe(t,a,c){let u=this;return f;function f(p){if(p!==87&&p!==119||!rG.call(u,u.previous)||rA(u.events))return c(p);return t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Lxe,t.attempt(Zj,t.attempt(Jj,m),c),c)(p)}function m(p){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),a(p)}}function Axe(t,a,c){let u=this,f="",m=!1;return p;function p(I){if((I===72||I===104)&&oG.call(u,u.previous)&&!rA(u.events))return t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),f+=String.fromCodePoint(I),t.consume(I),g;return c(I)}function g(I){if(Jr(I)&&f.length<5)return f+=String.fromCodePoint(I),t.consume(I),g;if(I===58){let T=f.toLowerCase();if(T==="http"||T==="https")return t.consume(I),v}return c(I)}function v(I){if(I===47){if(t.consume(I),m)return k;return m=!0,v}return c(I)}function k(I){return I===null||dm(I)||nn(I)||Il(I)||fm(I)?c(I):t.attempt(Zj,t.attempt(Jj,S),c)(I)}function S(I){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),a(I)}}function Mxe(t,a,c){let u=0;return f;function f(p){if((p===87||p===119)&&u<3)return u++,t.consume(p),f;if(p===46&&u===3)return t.consume(p),m;return c(p)}function m(p){return p===null?c(p):a(p)}}function Dxe(t,a,c){let u,f,m;return p;function p(k){if(k===46||k===95)return t.check(eG,v,g)(k);if(k===null||nn(k)||Il(k)||k!==45&&fm(k))return v(k);return m=!0,t.consume(k),p}function g(k){if(k===95)u=!0;else f=u,u=void 0;return t.consume(k),p}function v(k){if(f||u||!m)return c(k);return a(k)}}function Nxe(t,a){let c=0,u=0;return f;function f(p){if(p===40)return c++,t.consume(p),f;if(p===41&&u<c)return m(p);if(p===33||p===34||p===38||p===39||p===41||p===42||p===44||p===46||p===58||p===59||p===60||p===63||p===93||p===95||p===126)return t.check(eG,a,m)(p);if(p===null||nn(p)||Il(p))return a(p);return t.consume(p),f}function m(p){if(p===41)u++;return t.consume(p),f}}function Oxe(t,a,c){return u;function u(g){if(g===33||g===34||g===39||g===41||g===42||g===44||g===46||g===58||g===59||g===63||g===95||g===126)return t.consume(g),u;if(g===38)return t.consume(g),m;if(g===93)return t.consume(g),f;if(g===60||g===null||nn(g)||Il(g))return a(g);return c(g)}function f(g){if(g===null||g===40||g===91||nn(g)||Il(g))return a(g);return u(g)}function m(g){return Jr(g)?p(g):c(g)}function p(g){if(g===59)return t.consume(g),u;if(Jr(g))return t.consume(g),p;return c(g)}}function _xe(t,a,c){return u;function u(m){return t.consume(m),f}function f(m){return vr(m)?c(m):a(m)}}function rG(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||nn(t)}function oG(t){return!Jr(t)}function aG(t){return!(t===47||tA(t))}function tA(t){return t===43||t===45||t===46||t===95||vr(t)}function rA(t){let a=t.length,c=!1;while(a--){let u=t[a][1];if((u.type==="labelLink"||u.type==="labelImage")&&!u._balanced){c=!0;break}if(u._gfmAutolinkLiteralWalkedInto){c=!1;break}}if(t.length>0&&!c)t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0;return c}var zxe={tokenize:jxe,partial:!0};function oA(){return{document:{[91]:{name:"gfmFootnoteDefinition",tokenize:Uxe,continuation:{tokenize:qxe},exit:Hxe}},text:{[91]:{name:"gfmFootnoteCall",tokenize:Vxe},[93]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Bxe,resolveTo:Fxe}}}}function Bxe(t,a,c){let u=this,f=u.events.length,m=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]),p;while(f--){let v=u.events[f][1];if(v.type==="labelImage"){p=v;break}if(v.type==="gfmFootnoteCall"||v.type==="labelLink"||v.type==="label"||v.type==="image"||v.type==="link")break}return g;function g(v){if(!p||!p._balanced)return c(v);let k=zo(u.sliceSerialize({start:p.end,end:u.now()}));if(k.codePointAt(0)!==94||!m.includes(k.slice(1)))return c(v);return t.enter("gfmFootnoteCallLabelMarker"),t.consume(v),t.exit("gfmFootnoteCallLabelMarker"),a(v)}}function Fxe(t,a){let c=t.length,u;while(c--)if(t[c][1].type==="labelImage"&&t[c][0]==="enter"){u=t[c][1];break}t[c+1][1].type="data",t[c+3][1].type="gfmFootnoteCallLabelMarker";let f={type:"gfmFootnoteCall",start:Object.assign({},t[c+3][1].start),end:Object.assign({},t[t.length-1][1].end)},m={type:"gfmFootnoteCallMarker",start:Object.assign({},t[c+3][1].end),end:Object.assign({},t[c+3][1].end)};m.end.column++,m.end.offset++,m.end._bufferIndex++;let p={type:"gfmFootnoteCallString",start:Object.assign({},m.end),end:Object.assign({},t[t.length-1][1].start)},g={type:"chunkString",contentType:"string",start:Object.assign({},p.start),end:Object.assign({},p.end)},v=[t[c+1],t[c+2],["enter",f,a],t[c+3],t[c+4],["enter",m,a],["exit",m,a],["enter",p,a],["enter",g,a],["exit",g,a],["exit",p,a],t[t.length-2],t[t.length-1],["exit",f,a]];return t.splice(c,t.length-c+1,...v),t}function Vxe(t,a,c){let u=this,f=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]),m=0,p;return g;function g(I){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(I),t.exit("gfmFootnoteCallLabelMarker"),v}function v(I){if(I!==94)return c(I);return t.enter("gfmFootnoteCallMarker"),t.consume(I),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",k}function k(I){if(m>999||I===93&&!p||I===null||I===91||nn(I))return c(I);if(I===93){t.exit("chunkString");let T=t.exit("gfmFootnoteCallString");if(!f.includes(zo(u.sliceSerialize(T))))return c(I);return t.enter("gfmFootnoteCallLabelMarker"),t.consume(I),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),a}if(!nn(I))p=!0;return m++,t.consume(I),I===92?S:k}function S(I){if(I===91||I===92||I===93)return t.consume(I),m++,k;return k(I)}}function Uxe(t,a,c){let u=this,f=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]),m,p=0,g;return v;function v(R){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(R),t.exit("gfmFootnoteDefinitionLabelMarker"),k}function k(R){if(R===94)return t.enter("gfmFootnoteDefinitionMarker"),t.consume(R),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",S;return c(R)}function S(R){if(p>999||R===93&&!g||R===null||R===91||nn(R))return c(R);if(R===93){t.exit("chunkString");let A=t.exit("gfmFootnoteDefinitionLabelString");return m=zo(u.sliceSerialize(A)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(R),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),T}if(!nn(R))g=!0;return p++,t.consume(R),R===92?I:S}function I(R){if(R===91||R===92||R===93)return t.consume(R),p++,S;return S(R)}function T(R){if(R===58){if(t.enter("definitionMarker"),t.consume(R),t.exit("definitionMarker"),!f.includes(m))f.push(m);return Lt(t,L,"gfmFootnoteDefinitionWhitespace")}return c(R)}function L(R){return a(R)}}function qxe(t,a,c){return t.check(Pl,a,t.attempt(zxe,a,c))}function Hxe(t){t.exit("gfmFootnoteDefinition")}function jxe(t,a,c){let u=this;return Lt(t,f,"gfmFootnoteDefinitionIndent",5);function f(m){let p=u.events[u.events.length-1];return p&&p[1].type==="gfmFootnoteDefinitionIndent"&&p[2].sliceSerialize(p[1],!0).length===4?a(m):c(m)}}function aA(t){let c=(t||{}).singleTilde,u={name:"strikethrough",tokenize:m,resolveAll:f};if(c===null||c===void 0)c=!0;return{text:{[126]:u},insideSpan:{null:[u]},attentionMarkers:{null:[126]}};function f(p,g){let v=-1;while(++v<p.length)if(p[v][0]==="enter"&&p[v][1].type==="strikethroughSequenceTemporary"&&p[v][1]._close){let k=v;while(k--)if(p[k][0]==="exit"&&p[k][1].type==="strikethroughSequenceTemporary"&&p[k][1]._open&&p[v][1].end.offset-p[v][1].start.offset===p[k][1].end.offset-p[k][1].start.offset){p[v][1].type="strikethroughSequence",p[k][1].type="strikethroughSequence";let S={type:"strikethrough",start:Object.assign({},p[k][1].start),end:Object.assign({},p[v][1].end)},I={type:"strikethroughText",start:Object.assign({},p[k][1].end),end:Object.assign({},p[v][1].start)},T=[["enter",S,g],["enter",p[k][1],g],["exit",p[k][1],g],["enter",I,g]],L=g.parser.constructs.insideSpan.null;if(L)Hr(T,T.length,0,Ll(L,p.slice(k+1,v),g));Hr(T,T.length,0,[["exit",I,g],["enter",p[v][1],g],["exit",p[v][1],g],["exit",S,g]]),Hr(p,k-1,v-k+3,T),v=k+T.length-2;break}}v=-1;while(++v<p.length)if(p[v][1].type==="strikethroughSequenceTemporary")p[v][1].type="data";return p}function m(p,g,v){let k=this.previous,S=this.events,I=0;return T;function T(R){if(k===126&&S[S.length-1][1].type!=="characterEscape")return v(R);return p.enter("strikethroughSequenceTemporary"),L(R)}function L(R){let A=Lh(k);if(R===126){if(I>1)return v(R);return p.consume(R),I++,L}if(I<2&&!c)return v(R);let E=p.exit("strikethroughSequenceTemporary"),P=Lh(R);return E._open=!P||P===2&&Boolean(A),E._close=!A||A===2&&Boolean(P),g(R)}}}class iA{constructor(){this.map=[],this.index=new Map}add(t,a,c){Gxe(this,t,a,c)}consume(t){if(this.map.sort(function(f,m){return f[0]-m[0]}),this.map.length===0)return;let a=this.map.length,c=[];while(a>0)a-=1,c.push(t.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),t.length=this.map[a][0];c.push(t.slice()),t.length=0;let u=c.pop();while(u){for(let f of u)t.push(f);u=c.pop()}this.map.length=0,this.index.clear()}}function Gxe(t,a,c,u){if(c===0&&u.length===0)return;let f=t.index.get(a);if(f){f[1]+=c,f[2].push(...u);return}let m=[a,c,u];t.map.push(m),t.index.set(a,m)}function iG(t,a){let c=!1,u=[];while(a<t.length){let f=t[a];if(c){if(f[0]==="enter"){if(f[1].type==="tableContent")u.push(t[a+1][1].type==="tableDelimiterMarker"?"left":"none")}else if(f[1].type==="tableContent"){if(t[a-1][1].type==="tableDelimiterMarker"){let m=u.length-1;u[m]=u[m]==="left"?"center":"right"}}else if(f[1].type==="tableDelimiterRow")break}else if(f[0]==="enter"&&f[1].type==="tableDelimiterRow")c=!0;a+=1}return u}function sA(){return{flow:{null:{name:"table",tokenize:$xe,resolveAll:Kxe}}}}function $xe(t,a,c){let u=this,f=0,m=0,p;return g;function g(G){let ce=u.events.length-1;while(ce>-1){let{type:ae}=u.events[ce][1];if(ae==="lineEnding"||ae==="linePrefix")ce--;else break}let re=ce>-1?u.events[ce][1].type:null,Q=re==="tableHead"||re==="tableRow"?z:v;if(Q===z&&u.parser.lazy[u.now().line])return c(G);return Q(G)}function v(G){return t.enter("tableHead"),t.enter("tableRow"),k(G)}function k(G){if(G===124)return S(G);return p=!0,m+=1,S(G)}function S(G){if(G===null)return c(G);if(rt(G)){if(m>1)return m=0,u.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(G),t.exit("lineEnding"),L;return c(G)}if(Rt(G))return Lt(t,S,"whitespace")(G);if(m+=1,p)p=!1,f+=1;if(G===124)return t.enter("tableCellDivider"),t.consume(G),t.exit("tableCellDivider"),p=!0,S;return t.enter("data"),I(G)}function I(G){if(G===null||G===124||nn(G))return t.exit("data"),S(G);return t.consume(G),G===92?T:I}function T(G){if(G===92||G===124)return t.consume(G),I;return I(G)}function L(G){if(u.interrupt=!1,u.parser.lazy[u.now().line])return c(G);if(t.enter("tableDelimiterRow"),p=!1,Rt(G))return Lt(t,R,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G);return R(G)}function R(G){if(G===45||G===58)return E(G);if(G===124)return p=!0,t.enter("tableCellDivider"),t.consume(G),t.exit("tableCellDivider"),A;return F(G)}function A(G){if(Rt(G))return Lt(t,E,"whitespace")(G);return E(G)}function E(G){if(G===58)return m+=1,p=!0,t.enter("tableDelimiterMarker"),t.consume(G),t.exit("tableDelimiterMarker"),P;if(G===45)return m+=1,P(G);if(G===null||rt(G))return O(G);return F(G)}function P(G){if(G===45)return t.enter("tableDelimiterFiller"),D(G);return F(G)}function D(G){if(G===45)return t.consume(G),D;if(G===58)return p=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(G),t.exit("tableDelimiterMarker"),N;return t.exit("tableDelimiterFiller"),N(G)}function N(G){if(Rt(G))return Lt(t,O,"whitespace")(G);return O(G)}function O(G){if(G===124)return R(G);if(G===null||rt(G)){if(!p||f!==m)return F(G);return t.exit("tableDelimiterRow"),t.exit("tableHead"),a(G)}return F(G)}function F(G){return c(G)}function z(G){return t.enter("tableRow"),B(G)}function B(G){if(G===124)return t.enter("tableCellDivider"),t.consume(G),t.exit("tableCellDivider"),B;if(G===null||rt(G))return t.exit("tableRow"),a(G);if(Rt(G))return Lt(t,B,"whitespace")(G);return t.enter("data"),U(G)}function U(G){if(G===null||G===124||nn(G))return t.exit("data"),B(G);return t.consume(G),G===92?Y:U}function Y(G){if(G===92||G===124)return t.consume(G),U;return U(G)}}function Kxe(t,a){let c=-1,u=!0,f=0,m=[0,0,0,0],p=[0,0,0,0],g=!1,v=0,k,S,I,T=new iA;while(++c<t.length){let L=t[c],R=L[1];if(L[0]==="enter"){if(R.type==="tableHead"){if(g=!1,v!==0)sG(T,a,v,k,S),S=void 0,v=0;k={type:"table",start:Object.assign({},R.start),end:Object.assign({},R.end)},T.add(c,0,[["enter",k,a]])}else if(R.type==="tableRow"||R.type==="tableDelimiterRow"){if(u=!0,I=void 0,m=[0,0,0,0],p=[0,c+1,0,0],g)g=!1,S={type:"tableBody",start:Object.assign({},R.start),end:Object.assign({},R.end)},T.add(c,0,[["enter",S,a]]);f=R.type==="tableDelimiterRow"?2:S?3:1}else if(f&&(R.type==="data"||R.type==="tableDelimiterMarker"||R.type==="tableDelimiterFiller")){if(u=!1,p[2]===0){if(m[1]!==0)p[0]=p[1],I=LS(T,a,m,f,void 0,I),m=[0,0,0,0];p[2]=c}}else if(R.type==="tableCellDivider")if(u)u=!1;else{if(m[1]!==0)p[0]=p[1],I=LS(T,a,m,f,void 0,I);m=p,p=[m[1],c,0,0]}}else if(R.type==="tableHead")g=!0,v=c;else if(R.type==="tableRow"||R.type==="tableDelimiterRow"){if(v=c,m[1]!==0)p[0]=p[1],I=LS(T,a,m,f,c,I);else if(p[1]!==0)I=LS(T,a,p,f,c,I);f=0}else if(f&&(R.type==="data"||R.type==="tableDelimiterMarker"||R.type==="tableDelimiterFiller"))p[3]=c}if(v!==0)sG(T,a,v,k,S);T.consume(a.events),c=-1;while(++c<a.events.length){let L=a.events[c];if(L[0]==="enter"&&L[1].type==="table")L[1]._align=iG(a.events,c)}return t}function LS(t,a,c,u,f,m){let p=u===1?"tableHeader":u===2?"tableDelimiter":"tableData",g="tableContent";if(c[0]!==0)m.end=Object.assign({},zh(a.events,c[0])),t.add(c[0],0,[["exit",m,a]]);let v=zh(a.events,c[1]);if(m={type:p,start:Object.assign({},v),end:Object.assign({},v)},t.add(c[1],0,[["enter",m,a]]),c[2]!==0){let k=zh(a.events,c[2]),S=zh(a.events,c[3]),I={type:"tableContent",start:Object.assign({},k),end:Object.assign({},S)};if(t.add(c[2],0,[["enter",I,a]]),u!==2){let T=a.events[c[2]],L=a.events[c[3]];if(T[1].end=Object.assign({},L[1].end),T[1].type="chunkText",T[1].contentType="text",c[3]>c[2]+1){let R=c[2]+1,A=c[3]-c[2]-1;t.add(R,A,[])}}t.add(c[3]+1,0,[["exit",I,a]])}if(f!==void 0)m.end=Object.assign({},zh(a.events,f)),t.add(f,0,[["exit",m,a]]),m=void 0;return m}function sG(t,a,c,u,f){let m=[],p=zh(a.events,c);if(f)f.end=Object.assign({},p),m.push(["exit",f,a]);u.end=Object.assign({},p),m.push(["exit",u,a]),t.add(c+1,0,m)}function zh(t,a){let c=t[a],u=c[0]==="enter"?"start":"end";return c[1][u]}var Wxe={name:"tasklistCheck",tokenize:Xxe};function lA(){return{text:{[91]:Wxe}}}function Xxe(t,a,c){let u=this;return f;function f(v){if(u.previous!==null||!u._gfmTasklistFirstContentOfListItem)return c(v);return t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(v),t.exit("taskListCheckMarker"),m}function m(v){if(nn(v))return t.enter("taskListCheckValueUnchecked"),t.consume(v),t.exit("taskListCheckValueUnchecked"),p;if(v===88||v===120)return t.enter("taskListCheckValueChecked"),t.consume(v),t.exit("taskListCheckValueChecked"),p;return c(v)}function p(v){if(v===93)return t.enter("taskListCheckMarker"),t.consume(v),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),g;return c(v)}function g(v){if(rt(v))return a(v);if(Rt(v))return t.check({tokenize:Yxe},a,c)(v);return c(v)}}function Yxe(t,a,c){return Lt(t,u,"whitespace");function u(f){return f===null?c(f):a(f)}}function lG(t){return Wk([nA(),oA(),aA(t),sA(),lA()])}var Qxe={};function Yv(t){let a=this,c=t||Qxe,u=a.data(),f=u.micromarkExtensions||(u.micromarkExtensions=[]),m=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),p=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);f.push(lG(c)),m.push(JP()),p.push(eA(c))}function cA(){return{enter:{mathFlow:t,mathFlowFenceMeta:a,mathText:m},exit:{mathFlow:f,mathFlowFence:u,mathFlowFenceMeta:c,mathFlowValue:g,mathText:p,mathTextData:g}};function t(v){let k={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[k]}},v)}function a(){this.buffer()}function c(){let v=this.resume(),k=this.stack[this.stack.length-1];fn(k.type==="math"),k.meta=v}function u(){if(this.data.mathFlowInside)return;this.buffer(),this.data.mathFlowInside=!0}function f(v){let k=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),S=this.stack[this.stack.length-1];fn(S.type==="math"),this.exit(v),S.value=k;let I=S.data.hChildren[0];fn(I.type==="element"),fn(I.tagName==="code"),I.children.push({type:"text",value:k}),this.data.mathFlowInside=void 0}function m(v){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},v),this.buffer()}function p(v){let k=this.resume(),S=this.stack[this.stack.length-1];fn(S.type==="inlineMath"),this.exit(v),S.value=k,S.data.hChildren.push({type:"text",value:k})}function g(v){this.config.enter.data.call(this,v),this.config.exit.data.call(this,v)}}function uA(t){let a=(t||{}).singleDollarTextMath;if(a===null||a===void 0)a=!0;return u.peek=f,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
101
+ `,inConstruct:"mathFlowMeta"},{character:"$",after:a?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:c,inlineMath:u}};function c(m,p,g,v){let k=m.value||"",S=g.createTracker(v),I="$".repeat(Math.max(SS(k,"$")+1,2)),T=g.enter("mathFlow"),L=S.move(I);if(m.meta){let R=g.enter("mathFlowMeta");L+=S.move(g.safe(m.meta,{after:`
102
+ `,before:L,encode:["$"],...S.current()})),R()}if(L+=S.move(`
103
+ `),k)L+=S.move(k+`
104
+ `);return L+=S.move(I),T(),L}function u(m,p,g){let v=m.value||"",k=1;if(!a)k++;while(new RegExp("(^|[^$])"+"\\$".repeat(k)+"([^$]|$)").test(v))k++;let S="$".repeat(k);if(/[^ \r\n]/.test(v)&&(/^[ \r\n]/.test(v)&&/[ \r\n]$/.test(v)||/^\$|\$$/.test(v)))v=" "+v+" ";let I=-1;while(++I<g.unsafe.length){let T=g.unsafe[I];if(!T.atBreak)continue;let L=g.compilePattern(T),R;while(R=L.exec(v)){let A=R.index;if(v.codePointAt(A)===10&&v.codePointAt(A-1)===13)A--;v=v.slice(0,A)+" "+v.slice(R.index+1)}}return S+v+S}function f(){return"$"}}var uG={tokenize:Zxe,concrete:!0,name:"mathFlow"},cG={tokenize:Jxe,partial:!0};function Zxe(t,a,c){let u=this,f=u.events[u.events.length-1],m=f&&f[1].type==="linePrefix"?f[2].sliceSerialize(f[1],!0).length:0,p=0;return g;function g(D){return t.enter("mathFlow"),t.enter("mathFlowFence"),t.enter("mathFlowFenceSequence"),v(D)}function v(D){if(D===36)return t.consume(D),p++,v;if(p<2)return c(D);return t.exit("mathFlowFenceSequence"),Lt(t,k,"whitespace")(D)}function k(D){if(D===null||rt(D))return I(D);return t.enter("mathFlowFenceMeta"),t.enter("chunkString",{contentType:"string"}),S(D)}function S(D){if(D===null||rt(D))return t.exit("chunkString"),t.exit("mathFlowFenceMeta"),I(D);if(D===36)return c(D);return t.consume(D),S}function I(D){if(t.exit("mathFlowFence"),u.interrupt)return a(D);return t.attempt(cG,T,E)(D)}function T(D){return t.attempt({tokenize:P,partial:!0},E,L)(D)}function L(D){return(m?Lt(t,R,"linePrefix",m+1):R)(D)}function R(D){if(D===null)return E(D);if(rt(D))return t.attempt(cG,T,E)(D);return t.enter("mathFlowValue"),A(D)}function A(D){if(D===null||rt(D))return t.exit("mathFlowValue"),R(D);return t.consume(D),A}function E(D){return t.exit("mathFlow"),a(D)}function P(D,N,O){let F=0;return Lt(D,z,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function z(Y){return D.enter("mathFlowFence"),D.enter("mathFlowFenceSequence"),B(Y)}function B(Y){if(Y===36)return F++,D.consume(Y),B;if(F<p)return O(Y);return D.exit("mathFlowFenceSequence"),Lt(D,U,"whitespace")(Y)}function U(Y){if(Y===null||rt(Y))return D.exit("mathFlowFence"),N(Y);return O(Y)}}}function Jxe(t,a,c){let u=this;return f;function f(p){if(p===null)return a(p);return t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),m}function m(p){return u.parser.lazy[u.now().line]?c(p):a(p)}}function dG(t){let c=(t||{}).singleDollarTextMath;if(c===null||c===void 0)c=!0;return{tokenize:u,resolve:e0e,previous:t0e,name:"mathText"};function u(f,m,p){let g=this,v=0,k,S;return I;function I(E){return f.enter("mathText"),f.enter("mathTextSequence"),T(E)}function T(E){if(E===36)return f.consume(E),v++,T;if(v<2&&!c)return p(E);return f.exit("mathTextSequence"),L(E)}function L(E){if(E===null)return p(E);if(E===36)return S=f.enter("mathTextSequence"),k=0,A(E);if(E===32)return f.enter("space"),f.consume(E),f.exit("space"),L;if(rt(E))return f.enter("lineEnding"),f.consume(E),f.exit("lineEnding"),L;return f.enter("mathTextData"),R(E)}function R(E){if(E===null||E===32||E===36||rt(E))return f.exit("mathTextData"),L(E);return f.consume(E),R}function A(E){if(E===36)return f.consume(E),k++,A;if(k===v)return f.exit("mathTextSequence"),f.exit("mathText"),m(E);return S.type="mathTextData",R(E)}}}function e0e(t){let a=t.length-4,c=3,u,f;if((t[c][1].type==="lineEnding"||t[c][1].type==="space")&&(t[a][1].type==="lineEnding"||t[a][1].type==="space")){u=c;while(++u<a)if(t[u][1].type==="mathTextData"){t[a][1].type="mathTextPadding",t[c][1].type="mathTextPadding",c+=2,a-=2;break}}u=c-1,a++;while(++u<=a)if(f===void 0){if(u!==a&&t[u][1].type!=="lineEnding")f=u}else if(u===a||t[u][1].type==="lineEnding"){if(t[f][1].type="mathTextData",u!==f+2)t[f][1].end=t[u-1][1].end,t.splice(f+2,u-f-2),a-=u-f-2,u=f+2;f=void 0}return t}function t0e(t){return t!==36||this.events[this.events.length-1][1].type==="characterEscape"}function dA(t){return{flow:{[36]:uG},text:{[36]:dG(t)}}}var n0e={};function RS(t){let a=this,c=t||n0e,u=a.data(),f=u.micromarkExtensions||(u.micromarkExtensions=[]),m=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),p=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);f.push(dA(c)),m.push(cA()),p.push(uA(c))}var fG=`.katex {
105
+ font:
106
+ normal 1.21em KaTeX_Main,
107
+ math,
108
+ Times New Roman,
109
+ serif;
110
+ line-height: 1.2;
111
+ position: relative;
112
+ text-indent: 0;
113
+ text-rendering: auto;
114
+ }
115
+ .katex * {
116
+ border-color: currentColor;
117
+ }
118
+ .katex .katex-version:after {
119
+ content: "0.19.0";
120
+ }
121
+ .katex .katex-mathml {
122
+ border: 0;
123
+ -webkit-clip-path: inset(50%);
124
+ clip-path: inset(50%);
125
+ height: 1px;
126
+ overflow: hidden;
127
+ padding: 0;
128
+ position: absolute;
129
+ width: 1px;
130
+ }
131
+ .katex .katex-html > .katex-newline {
132
+ display: block;
133
+ }
134
+ .katex .katex-base {
135
+ position: relative;
136
+ white-space: nowrap;
137
+ width: min-content;
138
+ }
139
+ .katex .katex-base,
140
+ .katex .katex-strut {
141
+ display: inline-block;
142
+ }
143
+ .katex .textbf {
144
+ font-weight: 700;
145
+ }
146
+ .katex .textit {
147
+ font-style: italic;
148
+ }
149
+ .katex .textrm {
150
+ font-family: KaTeX_Main, serif;
151
+ }
152
+ .katex .textsf {
153
+ font-family: KaTeX_SansSerif, sans-serif;
154
+ }
155
+ .katex .texttt {
156
+ font-family: KaTeX_Typewriter, monospace;
157
+ }
158
+ .katex .mathnormal {
159
+ font-family: KaTeX_Math, math;
160
+ font-style: italic;
161
+ }
162
+ .katex .mathit {
163
+ font-family: KaTeX_Main, serif;
164
+ font-style: italic;
165
+ }
166
+ .katex .mathrm {
167
+ font-style: normal;
168
+ }
169
+ .katex .mathbf {
170
+ font-family: KaTeX_Main, serif;
171
+ font-weight: 700;
172
+ }
173
+ .katex .boldsymbol {
174
+ font-family: KaTeX_Math, math;
175
+ font-style: italic;
176
+ font-weight: 700;
177
+ }
178
+ .katex .amsrm,
179
+ .katex .mathbb,
180
+ .katex .textbb {
181
+ font-family: KaTeX_AMS, math;
182
+ }
183
+ .katex .mathcal {
184
+ font-family: KaTeX_Caligraphic, math;
185
+ }
186
+ .katex .mathfrak,
187
+ .katex .textfrak {
188
+ font-family: KaTeX_Fraktur, math;
189
+ }
190
+ .katex .mathboldfrak,
191
+ .katex .textboldfrak {
192
+ font-family: KaTeX_Fraktur, math;
193
+ font-weight: 700;
194
+ }
195
+ .katex .mathtt {
196
+ font-family: KaTeX_Typewriter, monospace;
197
+ }
198
+ .katex .mathscr,
199
+ .katex .textscr {
200
+ font-family: KaTeX_Script, math;
201
+ }
202
+ .katex .mathsf,
203
+ .katex .textsf {
204
+ font-family: KaTeX_SansSerif, sans-serif;
205
+ }
206
+ .katex .mathboldsf,
207
+ .katex .textboldsf {
208
+ font-family: KaTeX_SansSerif, sans-serif;
209
+ font-weight: 700;
210
+ }
211
+ .katex .mathitsf,
212
+ .katex .mathsfit,
213
+ .katex .textitsf {
214
+ font-family: KaTeX_SansSerif, sans-serif;
215
+ font-style: italic;
216
+ }
217
+ .katex .mainrm {
218
+ font-family: KaTeX_Main, serif;
219
+ font-style: normal;
220
+ }
221
+ .katex .vlist-t {
222
+ border-collapse: collapse;
223
+ display: inline-table;
224
+ table-layout: fixed;
225
+ }
226
+ .katex .vlist-r {
227
+ display: table-row;
228
+ }
229
+ .katex .vlist {
230
+ display: table-cell;
231
+ position: relative;
232
+ vertical-align: bottom;
233
+ }
234
+ .katex .vlist > span {
235
+ display: block;
236
+ height: 0;
237
+ position: relative;
238
+ }
239
+ .katex .vlist > span > span {
240
+ display: inline-block;
241
+ }
242
+ .katex .vlist > span > .pstrut {
243
+ overflow: hidden;
244
+ width: 0;
245
+ }
246
+ .katex .vlist-t2 {
247
+ margin-right: -2px;
248
+ }
249
+ .katex .vlist-s {
250
+ display: table-cell;
251
+ font-size: 1px;
252
+ min-width: 2px;
253
+ vertical-align: bottom;
254
+ width: 2px;
255
+ }
256
+ .katex .katex-vbox {
257
+ align-items: baseline;
258
+ display: inline-flex;
259
+ flex-direction: column;
260
+ }
261
+ .katex .katex-thinbox {
262
+ display: inline-flex;
263
+ flex-direction: row;
264
+ max-width: 0;
265
+ width: 0;
266
+ }
267
+ .katex .msupsub {
268
+ text-align: left;
269
+ }
270
+ .katex .mfrac > span > span {
271
+ text-align: center;
272
+ }
273
+ .katex .mfrac .frac-line {
274
+ border-bottom-style: solid;
275
+ display: inline-block;
276
+ width: 100%;
277
+ }
278
+ .katex .katex-hdashline,
279
+ .katex .katex-hline,
280
+ .katex .katex-overline .overline-line,
281
+ .katex .katex-rule,
282
+ .katex .katex-underline .underline-line,
283
+ .katex .mfrac .frac-line {
284
+ min-height: 1px;
285
+ }
286
+ .katex .mspace {
287
+ display: inline-block;
288
+ }
289
+ .katex .katex-smash {
290
+ display: inline;
291
+ line-height: 0;
292
+ }
293
+ .katex .clap,
294
+ .katex .llap,
295
+ .katex .rlap {
296
+ position: relative;
297
+ width: 0;
298
+ }
299
+ .katex .clap > .katex-inner,
300
+ .katex .llap > .katex-inner,
301
+ .katex .rlap > .katex-inner {
302
+ position: absolute;
303
+ }
304
+ .katex .clap > .katex-fix,
305
+ .katex .llap > .katex-fix,
306
+ .katex .rlap > .katex-fix {
307
+ display: inline-block;
308
+ }
309
+ .katex .llap > .katex-inner {
310
+ right: 0;
311
+ }
312
+ .katex .clap > .katex-inner,
313
+ .katex .rlap > .katex-inner {
314
+ left: 0;
315
+ }
316
+ .katex .clap > .katex-inner > span {
317
+ margin-left: -50%;
318
+ margin-right: 50%;
319
+ }
320
+ .katex .katex-rule {
321
+ border: 0 solid;
322
+ display: inline-block;
323
+ position: relative;
324
+ }
325
+ .katex .katex-hline,
326
+ .katex .katex-overline .overline-line,
327
+ .katex .katex-underline .underline-line {
328
+ border-bottom-style: solid;
329
+ display: inline-block;
330
+ width: 100%;
331
+ }
332
+ .katex .katex-hdashline {
333
+ border-bottom-style: dashed;
334
+ display: inline-block;
335
+ width: 100%;
336
+ }
337
+ .katex .sqrt > .katex-root {
338
+ margin-left: 0.2777777778em;
339
+ margin-right: -0.5555555556em;
340
+ }
341
+ .katex .fontsize-ensurer.reset-size1.size1,
342
+ .katex .katex-sizing.reset-size1.size1 {
343
+ font-size: 1em;
344
+ }
345
+ .katex .fontsize-ensurer.reset-size1.size2,
346
+ .katex .katex-sizing.reset-size1.size2 {
347
+ font-size: 1.2em;
348
+ }
349
+ .katex .fontsize-ensurer.reset-size1.size3,
350
+ .katex .katex-sizing.reset-size1.size3 {
351
+ font-size: 1.4em;
352
+ }
353
+ .katex .fontsize-ensurer.reset-size1.size4,
354
+ .katex .katex-sizing.reset-size1.size4 {
355
+ font-size: 1.6em;
356
+ }
357
+ .katex .fontsize-ensurer.reset-size1.size5,
358
+ .katex .katex-sizing.reset-size1.size5 {
359
+ font-size: 1.8em;
360
+ }
361
+ .katex .fontsize-ensurer.reset-size1.size6,
362
+ .katex .katex-sizing.reset-size1.size6 {
363
+ font-size: 2em;
364
+ }
365
+ .katex .fontsize-ensurer.reset-size1.size7,
366
+ .katex .katex-sizing.reset-size1.size7 {
367
+ font-size: 2.4em;
368
+ }
369
+ .katex .fontsize-ensurer.reset-size1.size8,
370
+ .katex .katex-sizing.reset-size1.size8 {
371
+ font-size: 2.88em;
372
+ }
373
+ .katex .fontsize-ensurer.reset-size1.size9,
374
+ .katex .katex-sizing.reset-size1.size9 {
375
+ font-size: 3.456em;
376
+ }
377
+ .katex .fontsize-ensurer.reset-size1.size10,
378
+ .katex .katex-sizing.reset-size1.size10 {
379
+ font-size: 4.148em;
380
+ }
381
+ .katex .fontsize-ensurer.reset-size1.size11,
382
+ .katex .katex-sizing.reset-size1.size11 {
383
+ font-size: 4.976em;
384
+ }
385
+ .katex .fontsize-ensurer.reset-size2.size1,
386
+ .katex .katex-sizing.reset-size2.size1 {
387
+ font-size: 0.8333333333em;
388
+ }
389
+ .katex .fontsize-ensurer.reset-size2.size2,
390
+ .katex .katex-sizing.reset-size2.size2 {
391
+ font-size: 1em;
392
+ }
393
+ .katex .fontsize-ensurer.reset-size2.size3,
394
+ .katex .katex-sizing.reset-size2.size3 {
395
+ font-size: 1.1666666667em;
396
+ }
397
+ .katex .fontsize-ensurer.reset-size2.size4,
398
+ .katex .katex-sizing.reset-size2.size4 {
399
+ font-size: 1.3333333333em;
400
+ }
401
+ .katex .fontsize-ensurer.reset-size2.size5,
402
+ .katex .katex-sizing.reset-size2.size5 {
403
+ font-size: 1.5em;
404
+ }
405
+ .katex .fontsize-ensurer.reset-size2.size6,
406
+ .katex .katex-sizing.reset-size2.size6 {
407
+ font-size: 1.6666666667em;
408
+ }
409
+ .katex .fontsize-ensurer.reset-size2.size7,
410
+ .katex .katex-sizing.reset-size2.size7 {
411
+ font-size: 2em;
412
+ }
413
+ .katex .fontsize-ensurer.reset-size2.size8,
414
+ .katex .katex-sizing.reset-size2.size8 {
415
+ font-size: 2.4em;
416
+ }
417
+ .katex .fontsize-ensurer.reset-size2.size9,
418
+ .katex .katex-sizing.reset-size2.size9 {
419
+ font-size: 2.88em;
420
+ }
421
+ .katex .fontsize-ensurer.reset-size2.size10,
422
+ .katex .katex-sizing.reset-size2.size10 {
423
+ font-size: 3.4566666667em;
424
+ }
425
+ .katex .fontsize-ensurer.reset-size2.size11,
426
+ .katex .katex-sizing.reset-size2.size11 {
427
+ font-size: 4.1466666667em;
428
+ }
429
+ .katex .fontsize-ensurer.reset-size3.size1,
430
+ .katex .katex-sizing.reset-size3.size1 {
431
+ font-size: 0.7142857143em;
432
+ }
433
+ .katex .fontsize-ensurer.reset-size3.size2,
434
+ .katex .katex-sizing.reset-size3.size2 {
435
+ font-size: 0.8571428571em;
436
+ }
437
+ .katex .fontsize-ensurer.reset-size3.size3,
438
+ .katex .katex-sizing.reset-size3.size3 {
439
+ font-size: 1em;
440
+ }
441
+ .katex .fontsize-ensurer.reset-size3.size4,
442
+ .katex .katex-sizing.reset-size3.size4 {
443
+ font-size: 1.1428571429em;
444
+ }
445
+ .katex .fontsize-ensurer.reset-size3.size5,
446
+ .katex .katex-sizing.reset-size3.size5 {
447
+ font-size: 1.2857142857em;
448
+ }
449
+ .katex .fontsize-ensurer.reset-size3.size6,
450
+ .katex .katex-sizing.reset-size3.size6 {
451
+ font-size: 1.4285714286em;
452
+ }
453
+ .katex .fontsize-ensurer.reset-size3.size7,
454
+ .katex .katex-sizing.reset-size3.size7 {
455
+ font-size: 1.7142857143em;
456
+ }
457
+ .katex .fontsize-ensurer.reset-size3.size8,
458
+ .katex .katex-sizing.reset-size3.size8 {
459
+ font-size: 2.0571428571em;
460
+ }
461
+ .katex .fontsize-ensurer.reset-size3.size9,
462
+ .katex .katex-sizing.reset-size3.size9 {
463
+ font-size: 2.4685714286em;
464
+ }
465
+ .katex .fontsize-ensurer.reset-size3.size10,
466
+ .katex .katex-sizing.reset-size3.size10 {
467
+ font-size: 2.9628571429em;
468
+ }
469
+ .katex .fontsize-ensurer.reset-size3.size11,
470
+ .katex .katex-sizing.reset-size3.size11 {
471
+ font-size: 3.5542857143em;
472
+ }
473
+ .katex .fontsize-ensurer.reset-size4.size1,
474
+ .katex .katex-sizing.reset-size4.size1 {
475
+ font-size: 0.625em;
476
+ }
477
+ .katex .fontsize-ensurer.reset-size4.size2,
478
+ .katex .katex-sizing.reset-size4.size2 {
479
+ font-size: 0.75em;
480
+ }
481
+ .katex .fontsize-ensurer.reset-size4.size3,
482
+ .katex .katex-sizing.reset-size4.size3 {
483
+ font-size: 0.875em;
484
+ }
485
+ .katex .fontsize-ensurer.reset-size4.size4,
486
+ .katex .katex-sizing.reset-size4.size4 {
487
+ font-size: 1em;
488
+ }
489
+ .katex .fontsize-ensurer.reset-size4.size5,
490
+ .katex .katex-sizing.reset-size4.size5 {
491
+ font-size: 1.125em;
492
+ }
493
+ .katex .fontsize-ensurer.reset-size4.size6,
494
+ .katex .katex-sizing.reset-size4.size6 {
495
+ font-size: 1.25em;
496
+ }
497
+ .katex .fontsize-ensurer.reset-size4.size7,
498
+ .katex .katex-sizing.reset-size4.size7 {
499
+ font-size: 1.5em;
500
+ }
501
+ .katex .fontsize-ensurer.reset-size4.size8,
502
+ .katex .katex-sizing.reset-size4.size8 {
503
+ font-size: 1.8em;
504
+ }
505
+ .katex .fontsize-ensurer.reset-size4.size9,
506
+ .katex .katex-sizing.reset-size4.size9 {
507
+ font-size: 2.16em;
508
+ }
509
+ .katex .fontsize-ensurer.reset-size4.size10,
510
+ .katex .katex-sizing.reset-size4.size10 {
511
+ font-size: 2.5925em;
512
+ }
513
+ .katex .fontsize-ensurer.reset-size4.size11,
514
+ .katex .katex-sizing.reset-size4.size11 {
515
+ font-size: 3.11em;
516
+ }
517
+ .katex .fontsize-ensurer.reset-size5.size1,
518
+ .katex .katex-sizing.reset-size5.size1 {
519
+ font-size: 0.5555555556em;
520
+ }
521
+ .katex .fontsize-ensurer.reset-size5.size2,
522
+ .katex .katex-sizing.reset-size5.size2 {
523
+ font-size: 0.6666666667em;
524
+ }
525
+ .katex .fontsize-ensurer.reset-size5.size3,
526
+ .katex .katex-sizing.reset-size5.size3 {
527
+ font-size: 0.7777777778em;
528
+ }
529
+ .katex .fontsize-ensurer.reset-size5.size4,
530
+ .katex .katex-sizing.reset-size5.size4 {
531
+ font-size: 0.8888888889em;
532
+ }
533
+ .katex .fontsize-ensurer.reset-size5.size5,
534
+ .katex .katex-sizing.reset-size5.size5 {
535
+ font-size: 1em;
536
+ }
537
+ .katex .fontsize-ensurer.reset-size5.size6,
538
+ .katex .katex-sizing.reset-size5.size6 {
539
+ font-size: 1.1111111111em;
540
+ }
541
+ .katex .fontsize-ensurer.reset-size5.size7,
542
+ .katex .katex-sizing.reset-size5.size7 {
543
+ font-size: 1.3333333333em;
544
+ }
545
+ .katex .fontsize-ensurer.reset-size5.size8,
546
+ .katex .katex-sizing.reset-size5.size8 {
547
+ font-size: 1.6em;
548
+ }
549
+ .katex .fontsize-ensurer.reset-size5.size9,
550
+ .katex .katex-sizing.reset-size5.size9 {
551
+ font-size: 1.92em;
552
+ }
553
+ .katex .fontsize-ensurer.reset-size5.size10,
554
+ .katex .katex-sizing.reset-size5.size10 {
555
+ font-size: 2.3044444444em;
556
+ }
557
+ .katex .fontsize-ensurer.reset-size5.size11,
558
+ .katex .katex-sizing.reset-size5.size11 {
559
+ font-size: 2.7644444444em;
560
+ }
561
+ .katex .fontsize-ensurer.reset-size6.size1,
562
+ .katex .katex-sizing.reset-size6.size1 {
563
+ font-size: 0.5em;
564
+ }
565
+ .katex .fontsize-ensurer.reset-size6.size2,
566
+ .katex .katex-sizing.reset-size6.size2 {
567
+ font-size: 0.6em;
568
+ }
569
+ .katex .fontsize-ensurer.reset-size6.size3,
570
+ .katex .katex-sizing.reset-size6.size3 {
571
+ font-size: 0.7em;
572
+ }
573
+ .katex .fontsize-ensurer.reset-size6.size4,
574
+ .katex .katex-sizing.reset-size6.size4 {
575
+ font-size: 0.8em;
576
+ }
577
+ .katex .fontsize-ensurer.reset-size6.size5,
578
+ .katex .katex-sizing.reset-size6.size5 {
579
+ font-size: 0.9em;
580
+ }
581
+ .katex .fontsize-ensurer.reset-size6.size6,
582
+ .katex .katex-sizing.reset-size6.size6 {
583
+ font-size: 1em;
584
+ }
585
+ .katex .fontsize-ensurer.reset-size6.size7,
586
+ .katex .katex-sizing.reset-size6.size7 {
587
+ font-size: 1.2em;
588
+ }
589
+ .katex .fontsize-ensurer.reset-size6.size8,
590
+ .katex .katex-sizing.reset-size6.size8 {
591
+ font-size: 1.44em;
592
+ }
593
+ .katex .fontsize-ensurer.reset-size6.size9,
594
+ .katex .katex-sizing.reset-size6.size9 {
595
+ font-size: 1.728em;
596
+ }
597
+ .katex .fontsize-ensurer.reset-size6.size10,
598
+ .katex .katex-sizing.reset-size6.size10 {
599
+ font-size: 2.074em;
600
+ }
601
+ .katex .fontsize-ensurer.reset-size6.size11,
602
+ .katex .katex-sizing.reset-size6.size11 {
603
+ font-size: 2.488em;
604
+ }
605
+ .katex .fontsize-ensurer.reset-size7.size1,
606
+ .katex .katex-sizing.reset-size7.size1 {
607
+ font-size: 0.4166666667em;
608
+ }
609
+ .katex .fontsize-ensurer.reset-size7.size2,
610
+ .katex .katex-sizing.reset-size7.size2 {
611
+ font-size: 0.5em;
612
+ }
613
+ .katex .fontsize-ensurer.reset-size7.size3,
614
+ .katex .katex-sizing.reset-size7.size3 {
615
+ font-size: 0.5833333333em;
616
+ }
617
+ .katex .fontsize-ensurer.reset-size7.size4,
618
+ .katex .katex-sizing.reset-size7.size4 {
619
+ font-size: 0.6666666667em;
620
+ }
621
+ .katex .fontsize-ensurer.reset-size7.size5,
622
+ .katex .katex-sizing.reset-size7.size5 {
623
+ font-size: 0.75em;
624
+ }
625
+ .katex .fontsize-ensurer.reset-size7.size6,
626
+ .katex .katex-sizing.reset-size7.size6 {
627
+ font-size: 0.8333333333em;
628
+ }
629
+ .katex .fontsize-ensurer.reset-size7.size7,
630
+ .katex .katex-sizing.reset-size7.size7 {
631
+ font-size: 1em;
632
+ }
633
+ .katex .fontsize-ensurer.reset-size7.size8,
634
+ .katex .katex-sizing.reset-size7.size8 {
635
+ font-size: 1.2em;
636
+ }
637
+ .katex .fontsize-ensurer.reset-size7.size9,
638
+ .katex .katex-sizing.reset-size7.size9 {
639
+ font-size: 1.44em;
640
+ }
641
+ .katex .fontsize-ensurer.reset-size7.size10,
642
+ .katex .katex-sizing.reset-size7.size10 {
643
+ font-size: 1.7283333333em;
644
+ }
645
+ .katex .fontsize-ensurer.reset-size7.size11,
646
+ .katex .katex-sizing.reset-size7.size11 {
647
+ font-size: 2.0733333333em;
648
+ }
649
+ .katex .fontsize-ensurer.reset-size8.size1,
650
+ .katex .katex-sizing.reset-size8.size1 {
651
+ font-size: 0.3472222222em;
652
+ }
653
+ .katex .fontsize-ensurer.reset-size8.size2,
654
+ .katex .katex-sizing.reset-size8.size2 {
655
+ font-size: 0.4166666667em;
656
+ }
657
+ .katex .fontsize-ensurer.reset-size8.size3,
658
+ .katex .katex-sizing.reset-size8.size3 {
659
+ font-size: 0.4861111111em;
660
+ }
661
+ .katex .fontsize-ensurer.reset-size8.size4,
662
+ .katex .katex-sizing.reset-size8.size4 {
663
+ font-size: 0.5555555556em;
664
+ }
665
+ .katex .fontsize-ensurer.reset-size8.size5,
666
+ .katex .katex-sizing.reset-size8.size5 {
667
+ font-size: 0.625em;
668
+ }
669
+ .katex .fontsize-ensurer.reset-size8.size6,
670
+ .katex .katex-sizing.reset-size8.size6 {
671
+ font-size: 0.6944444444em;
672
+ }
673
+ .katex .fontsize-ensurer.reset-size8.size7,
674
+ .katex .katex-sizing.reset-size8.size7 {
675
+ font-size: 0.8333333333em;
676
+ }
677
+ .katex .fontsize-ensurer.reset-size8.size8,
678
+ .katex .katex-sizing.reset-size8.size8 {
679
+ font-size: 1em;
680
+ }
681
+ .katex .fontsize-ensurer.reset-size8.size9,
682
+ .katex .katex-sizing.reset-size8.size9 {
683
+ font-size: 1.2em;
684
+ }
685
+ .katex .fontsize-ensurer.reset-size8.size10,
686
+ .katex .katex-sizing.reset-size8.size10 {
687
+ font-size: 1.4402777778em;
688
+ }
689
+ .katex .fontsize-ensurer.reset-size8.size11,
690
+ .katex .katex-sizing.reset-size8.size11 {
691
+ font-size: 1.7277777778em;
692
+ }
693
+ .katex .fontsize-ensurer.reset-size9.size1,
694
+ .katex .katex-sizing.reset-size9.size1 {
695
+ font-size: 0.2893518519em;
696
+ }
697
+ .katex .fontsize-ensurer.reset-size9.size2,
698
+ .katex .katex-sizing.reset-size9.size2 {
699
+ font-size: 0.3472222222em;
700
+ }
701
+ .katex .fontsize-ensurer.reset-size9.size3,
702
+ .katex .katex-sizing.reset-size9.size3 {
703
+ font-size: 0.4050925926em;
704
+ }
705
+ .katex .fontsize-ensurer.reset-size9.size4,
706
+ .katex .katex-sizing.reset-size9.size4 {
707
+ font-size: 0.462962963em;
708
+ }
709
+ .katex .fontsize-ensurer.reset-size9.size5,
710
+ .katex .katex-sizing.reset-size9.size5 {
711
+ font-size: 0.5208333333em;
712
+ }
713
+ .katex .fontsize-ensurer.reset-size9.size6,
714
+ .katex .katex-sizing.reset-size9.size6 {
715
+ font-size: 0.5787037037em;
716
+ }
717
+ .katex .fontsize-ensurer.reset-size9.size7,
718
+ .katex .katex-sizing.reset-size9.size7 {
719
+ font-size: 0.6944444444em;
720
+ }
721
+ .katex .fontsize-ensurer.reset-size9.size8,
722
+ .katex .katex-sizing.reset-size9.size8 {
723
+ font-size: 0.8333333333em;
724
+ }
725
+ .katex .fontsize-ensurer.reset-size9.size9,
726
+ .katex .katex-sizing.reset-size9.size9 {
727
+ font-size: 1em;
728
+ }
729
+ .katex .fontsize-ensurer.reset-size9.size10,
730
+ .katex .katex-sizing.reset-size9.size10 {
731
+ font-size: 1.2002314815em;
732
+ }
733
+ .katex .fontsize-ensurer.reset-size9.size11,
734
+ .katex .katex-sizing.reset-size9.size11 {
735
+ font-size: 1.4398148148em;
736
+ }
737
+ .katex .fontsize-ensurer.reset-size10.size1,
738
+ .katex .katex-sizing.reset-size10.size1 {
739
+ font-size: 0.2410800386em;
740
+ }
741
+ .katex .fontsize-ensurer.reset-size10.size2,
742
+ .katex .katex-sizing.reset-size10.size2 {
743
+ font-size: 0.2892960463em;
744
+ }
745
+ .katex .fontsize-ensurer.reset-size10.size3,
746
+ .katex .katex-sizing.reset-size10.size3 {
747
+ font-size: 0.337512054em;
748
+ }
749
+ .katex .fontsize-ensurer.reset-size10.size4,
750
+ .katex .katex-sizing.reset-size10.size4 {
751
+ font-size: 0.3857280617em;
752
+ }
753
+ .katex .fontsize-ensurer.reset-size10.size5,
754
+ .katex .katex-sizing.reset-size10.size5 {
755
+ font-size: 0.4339440694em;
756
+ }
757
+ .katex .fontsize-ensurer.reset-size10.size6,
758
+ .katex .katex-sizing.reset-size10.size6 {
759
+ font-size: 0.4821600771em;
760
+ }
761
+ .katex .fontsize-ensurer.reset-size10.size7,
762
+ .katex .katex-sizing.reset-size10.size7 {
763
+ font-size: 0.5785920926em;
764
+ }
765
+ .katex .fontsize-ensurer.reset-size10.size8,
766
+ .katex .katex-sizing.reset-size10.size8 {
767
+ font-size: 0.6943105111em;
768
+ }
769
+ .katex .fontsize-ensurer.reset-size10.size9,
770
+ .katex .katex-sizing.reset-size10.size9 {
771
+ font-size: 0.8331726133em;
772
+ }
773
+ .katex .fontsize-ensurer.reset-size10.size10,
774
+ .katex .katex-sizing.reset-size10.size10 {
775
+ font-size: 1em;
776
+ }
777
+ .katex .fontsize-ensurer.reset-size10.size11,
778
+ .katex .katex-sizing.reset-size10.size11 {
779
+ font-size: 1.1996142719em;
780
+ }
781
+ .katex .fontsize-ensurer.reset-size11.size1,
782
+ .katex .katex-sizing.reset-size11.size1 {
783
+ font-size: 0.2009646302em;
784
+ }
785
+ .katex .fontsize-ensurer.reset-size11.size2,
786
+ .katex .katex-sizing.reset-size11.size2 {
787
+ font-size: 0.2411575563em;
788
+ }
789
+ .katex .fontsize-ensurer.reset-size11.size3,
790
+ .katex .katex-sizing.reset-size11.size3 {
791
+ font-size: 0.2813504823em;
792
+ }
793
+ .katex .fontsize-ensurer.reset-size11.size4,
794
+ .katex .katex-sizing.reset-size11.size4 {
795
+ font-size: 0.3215434084em;
796
+ }
797
+ .katex .fontsize-ensurer.reset-size11.size5,
798
+ .katex .katex-sizing.reset-size11.size5 {
799
+ font-size: 0.3617363344em;
800
+ }
801
+ .katex .fontsize-ensurer.reset-size11.size6,
802
+ .katex .katex-sizing.reset-size11.size6 {
803
+ font-size: 0.4019292605em;
804
+ }
805
+ .katex .fontsize-ensurer.reset-size11.size7,
806
+ .katex .katex-sizing.reset-size11.size7 {
807
+ font-size: 0.4823151125em;
808
+ }
809
+ .katex .fontsize-ensurer.reset-size11.size8,
810
+ .katex .katex-sizing.reset-size11.size8 {
811
+ font-size: 0.578778135em;
812
+ }
813
+ .katex .fontsize-ensurer.reset-size11.size9,
814
+ .katex .katex-sizing.reset-size11.size9 {
815
+ font-size: 0.6945337621em;
816
+ }
817
+ .katex .fontsize-ensurer.reset-size11.size10,
818
+ .katex .katex-sizing.reset-size11.size10 {
819
+ font-size: 0.8336012862em;
820
+ }
821
+ .katex .fontsize-ensurer.reset-size11.size11,
822
+ .katex .katex-sizing.reset-size11.size11 {
823
+ font-size: 1em;
824
+ }
825
+ .katex .delimsizing.size1 {
826
+ font-family: KaTeX_Size1, math;
827
+ }
828
+ .katex .delimsizing.size2 {
829
+ font-family: KaTeX_Size2, math;
830
+ }
831
+ .katex .delimsizing.size3 {
832
+ font-family: KaTeX_Size3, math;
833
+ }
834
+ .katex .delimsizing.size4 {
835
+ font-family: KaTeX_Size4, math;
836
+ }
837
+ .katex .delimsizing.mult .delim-size1 > span {
838
+ font-family: KaTeX_Size1, math;
839
+ }
840
+ .katex .delimsizing.mult .delim-size4 > span {
841
+ font-family: KaTeX_Size4, math;
842
+ }
843
+ .katex .nulldelimiter {
844
+ display: inline-block;
845
+ width: 0.12em;
846
+ }
847
+ .katex .delimcenter,
848
+ .katex .op-symbol {
849
+ position: relative;
850
+ }
851
+ .katex .op-symbol.small-op {
852
+ font-family: KaTeX_Size1, math;
853
+ }
854
+ .katex .op-symbol.large-op {
855
+ font-family: KaTeX_Size2, math;
856
+ }
857
+ .katex .katex-accent > .vlist-t,
858
+ .katex .op-limits > .vlist-t {
859
+ text-align: center;
860
+ }
861
+ .katex .katex-accent .accent-body {
862
+ position: relative;
863
+ }
864
+ .katex .katex-accent .accent-body:not(.accent-full) {
865
+ width: 0;
866
+ }
867
+ .katex .katex-overlay {
868
+ display: block;
869
+ }
870
+ .katex .mtable .vertical-separator {
871
+ display: inline-block;
872
+ min-width: 1px;
873
+ }
874
+ .katex .mtable .arraycolsep {
875
+ display: inline-block;
876
+ }
877
+ .katex .mtable .col-align-c > .vlist-t {
878
+ text-align: center;
879
+ }
880
+ .katex .mtable .col-align-l > .vlist-t {
881
+ text-align: left;
882
+ }
883
+ .katex .mtable .col-align-r > .vlist-t {
884
+ text-align: right;
885
+ }
886
+ .katex .svg-align {
887
+ text-align: left;
888
+ }
889
+ .katex svg {
890
+ fill: currentColor;
891
+ stroke: currentColor;
892
+ display: block;
893
+ height: inherit;
894
+ position: absolute;
895
+ width: 100%;
896
+ }
897
+ .katex svg path {
898
+ stroke: none;
899
+ }
900
+ .katex svg {
901
+ fill-rule: nonzero;
902
+ fill-opacity: 1;
903
+ stroke-width: 1;
904
+ stroke-linecap: butt;
905
+ stroke-linejoin: miter;
906
+ stroke-miterlimit: 4;
907
+ stroke-dasharray: none;
908
+ stroke-dashoffset: 0;
909
+ stroke-opacity: 1;
910
+ }
911
+ .katex img {
912
+ border-style: none;
913
+ max-height: none;
914
+ max-width: none;
915
+ min-height: 0;
916
+ min-width: 0;
917
+ }
918
+ .katex .katex-stretchy {
919
+ display: block;
920
+ overflow: hidden;
921
+ position: relative;
922
+ width: 100%;
923
+ }
924
+ .katex .katex-stretchy:after,
925
+ .katex .katex-stretchy:before {
926
+ content: "";
927
+ }
928
+ .katex .hide-tail {
929
+ overflow: hidden;
930
+ position: relative;
931
+ width: 100%;
932
+ }
933
+ .katex .halfarrow-left {
934
+ left: 0;
935
+ overflow: hidden;
936
+ position: absolute;
937
+ width: 50.2%;
938
+ }
939
+ .katex .halfarrow-right {
940
+ overflow: hidden;
941
+ position: absolute;
942
+ right: 0;
943
+ width: 50.2%;
944
+ }
945
+ .katex .brace-left {
946
+ left: 0;
947
+ overflow: hidden;
948
+ position: absolute;
949
+ width: 25.1%;
950
+ }
951
+ .katex .brace-center {
952
+ left: 25%;
953
+ overflow: hidden;
954
+ position: absolute;
955
+ width: 50%;
956
+ }
957
+ .katex .brace-right {
958
+ overflow: hidden;
959
+ position: absolute;
960
+ right: 0;
961
+ width: 25.1%;
962
+ }
963
+ .katex .x-arrow-pad {
964
+ padding: 0 0.5em;
965
+ }
966
+ .katex .cd-arrow-pad {
967
+ padding: 0 0.55556em 0 0.27778em;
968
+ }
969
+ .katex .mover,
970
+ .katex .munder,
971
+ .katex .x-arrow {
972
+ text-align: center;
973
+ }
974
+ .katex .boxpad {
975
+ padding: 0 0.3em;
976
+ }
977
+ .katex .fbox,
978
+ .katex .fcolorbox {
979
+ border: 0.04em solid;
980
+ box-sizing: border-box;
981
+ }
982
+ .katex .cancel-pad {
983
+ padding: 0 0.2em;
984
+ }
985
+ .katex .cancel-lap {
986
+ margin-left: -0.2em;
987
+ margin-right: -0.2em;
988
+ }
989
+ .katex .katex-sout {
990
+ border-bottom-style: solid;
991
+ border-bottom-width: 0.08em;
992
+ }
993
+ .katex .angl {
994
+ border-right: 0.049em solid;
995
+ border-top: 0.049em solid;
996
+ box-sizing: border-box;
997
+ margin-right: 0.03889em;
998
+ }
999
+ .katex .anglpad {
1000
+ padding: 0 0.03889em;
1001
+ }
1002
+ .katex .reflectbox {
1003
+ display: inline-block;
1004
+ transform: scaleX(-1);
1005
+ }
1006
+ .katex .eqn-num:before {
1007
+ content: "(" counter(katexEqnNo) ")";
1008
+ counter-increment: katexEqnNo;
1009
+ }
1010
+ .katex .mml-eqn-num:before {
1011
+ content: "(" counter(mmlEqnNo) ")";
1012
+ counter-increment: mmlEqnNo;
1013
+ }
1014
+ .katex .mtr-glue {
1015
+ width: 50%;
1016
+ }
1017
+ .katex .cd-vert-arrow {
1018
+ display: inline-block;
1019
+ position: relative;
1020
+ }
1021
+ .katex .cd-label-left {
1022
+ display: inline-block;
1023
+ position: absolute;
1024
+ right: calc(50% + 0.3em);
1025
+ text-align: left;
1026
+ }
1027
+ .katex .cd-label-right {
1028
+ display: inline-block;
1029
+ left: calc(50% + 0.3em);
1030
+ position: absolute;
1031
+ text-align: right;
1032
+ }
1033
+ .katex-display {
1034
+ display: block;
1035
+ margin: 1em 0;
1036
+ text-align: center;
1037
+ }
1038
+ .katex-display > .katex {
1039
+ display: block;
1040
+ text-align: center;
1041
+ white-space: nowrap;
1042
+ }
1043
+ .katex-display > .katex > .katex-html {
1044
+ display: block;
1045
+ position: relative;
1046
+ }
1047
+ .katex-display > .katex > .katex-html > .katex-tag {
1048
+ position: absolute;
1049
+ right: 0;
1050
+ }
1051
+ .katex-display.leqno > .katex > .katex-html > .katex-tag {
1052
+ left: 0;
1053
+ right: auto;
1054
+ }
1055
+ .katex-display.fleqn > .katex {
1056
+ padding-left: 2em;
1057
+ text-align: left;
1058
+ }
1059
+ body {
1060
+ counter-reset: katexEqnNo mmlEqnNo;
1061
+ }
1062
+ `;var mG="./KaTeX_AMS-Regular-n7eqehx2.woff2";var pG="./KaTeX_Caligraphic-Bold-20r3b6fv.woff2";var hG="./KaTeX_Caligraphic-Regular-kkjm8f18.woff2";var gG="./KaTeX_Fraktur-Bold-pz5vg4t0.woff2";var xG="./KaTeX_Fraktur-Regular-a1e9wkwk.woff2";var vG="./KaTeX_Main-Bold-mcp098h8.woff2";var bG="./KaTeX_Main-BoldItalic-fy74z249.woff2";var yG="./KaTeX_Main-Italic-hw2gxy7f.woff2";var wG="./KaTeX_Main-Regular-xvp1b75c.woff2";var kG="./KaTeX_Math-BoldItalic-mf5nf33d.woff2";var SG="./KaTeX_Math-Italic-ap60jrna.woff2";var CG="./KaTeX_SansSerif-Bold-we3bymb6.woff2";var IG="./KaTeX_SansSerif-Italic-ent92bjx.woff2";var TG="./KaTeX_SansSerif-Regular-0573pbz9.woff2";var LG="./KaTeX_Script-Regular-z2rtj6vq.woff2";var RG="./KaTeX_Size1-Regular-dfr3w1hv.woff2";var EG="./KaTeX_Size2-Regular-kted78zb.woff2";var PG="./KaTeX_Size3-Regular-e6k1k5jk.woff2";var AG="./KaTeX_Size4-Regular-abedc1pd.woff2";var MG="./KaTeX_Typewriter-Regular-scw9zx1z.woff2";var C0e=[["KaTeX_AMS",mG,{weight:"400",style:"normal"}],["KaTeX_Caligraphic",pG,{weight:"700",style:"normal"}],["KaTeX_Caligraphic",hG,{weight:"400",style:"normal"}],["KaTeX_Fraktur",gG,{weight:"700",style:"normal"}],["KaTeX_Fraktur",xG,{weight:"400",style:"normal"}],["KaTeX_Main",vG,{weight:"700",style:"normal"}],["KaTeX_Main",bG,{weight:"700",style:"italic"}],["KaTeX_Main",yG,{weight:"400",style:"italic"}],["KaTeX_Main",wG,{weight:"400",style:"normal"}],["KaTeX_Math",kG,{weight:"700",style:"italic"}],["KaTeX_Math",SG,{weight:"400",style:"italic"}],["KaTeX_SansSerif",CG,{weight:"700",style:"normal"}],["KaTeX_SansSerif",IG,{weight:"400",style:"italic"}],["KaTeX_SansSerif",TG,{weight:"400",style:"normal"}],["KaTeX_Script",LG,{weight:"400",style:"normal"}],["KaTeX_Size1",RG,{weight:"400",style:"normal"}],["KaTeX_Size2",EG,{weight:"400",style:"normal"}],["KaTeX_Size3",PG,{weight:"400",style:"normal"}],["KaTeX_Size4",AG,{weight:"400",style:"normal"}],["KaTeX_Typewriter",MG,{weight:"400",style:"normal"}]],DG=!1;function NG(){if(DG||typeof FontFace>"u")return;DG=!0;for(let[t,a,c]of C0e)document.fonts.add(new FontFace(t,`url(${a}) format("woff2")`,{display:"swap",...c}))}var Qv=null,fA=null,mA=new Set,OG=!1;function I0e(){if(OG||typeof document>"u")return;OG=!0;let t=document.createElement("style");t.dataset.basaltKatex="",t.textContent=fG,document.head.append(t)}function _G(){if(Qv)return Promise.resolve(Qv);return fA??=(C("nj0cv1cq"),import("./chunk-nj0cv1cq.js")).then((t)=>{I0e(),NG(),Qv=t.default;for(let a of mA)a();return Qv}).catch(()=>(fA=null,null)),fA}function zG(t){return mA.add(t),()=>{mA.delete(t)}}function pA(){return Qv}var BG=q(function(a){let c=Kr(zG,pA,pA);o(()=>{if(!c)_G()},[c]);let u=w(()=>{if(!c)return null;try{return c.renderToString(a.tex,{displayMode:a.display,throwOnError:!0,strict:"ignore"})}catch{return null}},[c,a.tex,a.display]);if(!u){let f=a.display?`$$
1063
+ ${a.tex}
1064
+ $$`:`$${a.tex}$`;return a.display?e("div",{className:"my-3 overflow-x-auto font-mono text-[0.9em] whitespace-pre-wrap text-dim",children:f}):e("code",{className:"font-mono text-[0.84em] break-words text-dim",children:f})}return a.display?e("div",{dangerouslySetInnerHTML:{__html:u}}):e("span",{dangerouslySetInnerHTML:{__html:u}})});class aa extends Vc{state={};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t){if(this.props.pluginID)ve.reportError(this.props.pluginID,t)}componentDidUpdate(t){if(this.state.error&&t.resetKey!==this.props.resetKey)this.setState({error:void 0})}retry=()=>this.setState({error:void 0});render(){let t=this.state.error;if(!t)return this.props.children;if(this.props.fallback!==void 0)return this.props.fallback;let a=t instanceof zw;return n("div",{role:"alert",className:l("surface.subtle","my-1 flex flex-wrap items-center justify-between gap-2 bg-panel/60 px-3 py-2 text-xs text-dim"),children:[n("span",{className:"min-w-0 flex-1 break-words",children:[this.props.fallbackText??"视图加载失败",n("span",{className:"text-faint",children:[":",t.message||String(t)]})]}),a?e(b,{variant:"ghost",size:"sm",onClick:()=>location.reload(),children:"刷新页面"}):e(b,{variant:"ghost",size:"sm",onClick:this.retry,children:"重试"})]})}}var hA=Tr({open:!1});function Nl(t){hA.set({payload:t,open:!0})}function T0e(){hA.set((t)=>({...t,open:!1}))}var FG=0.25,VG=8;function UG(){_();let t=se(hA);return e(L0e,{open:t.open,onOpenChange:(a)=>{if(!a)T0e()},payload:t.payload})}function L0e(t){let{open:a,onOpenChange:c,payload:u}=t,[f,m]=r(1),[p,g]=r({x:0,y:0}),[v,k]=r(!1),S=i(null),I=i({x:0,y:0,offsetX:0,offsetY:0,moved:!1});o(()=>{if(a)m(1),g({x:0,y:0}),k(!1)},[a]);let T=y((B)=>{m((U)=>{let Y=typeof B==="function"?B(U):B,G=Math.min(Math.max(Y,FG),VG);if(G<=1)g({x:0,y:0});return G})},[]),L=y(()=>{T((B)=>Number((B*1.25).toFixed(2)))},[T]),R=y(()=>{T((B)=>Number((B/1.25).toFixed(2)))},[T]),A=y(()=>{m(1),g({x:0,y:0})},[]);if(o(()=>{let B=S.current;if(!a||!B)return;let U=(Y)=>{Y.preventDefault();let G=Y.deltaY<0?1.15:0.87;T((ce)=>Number((ce*G).toFixed(2)))};return B.addEventListener("wheel",U,{passive:!1}),()=>B.removeEventListener("wheel",U)},[a,T]),o(()=>{if(!a)return;let B=(U)=>{if(U.target instanceof HTMLInputElement||U.target instanceof HTMLTextAreaElement)return;if(U.key==="="||U.key==="+")U.preventDefault(),L();else if(U.key==="-"||U.key==="_")U.preventDefault(),R();else if(U.key==="0")U.preventDefault(),A()};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[a,L,R,A]),!u?.src)return null;let E=(B)=>{if(B.button!==0)return;I.current={x:B.clientX,y:B.clientY,offsetX:p.x,offsetY:p.y,moved:!1},k(!0),B.currentTarget.setPointerCapture(B.pointerId)},P=(B)=>{if(!v)return;let U=B.clientX-I.current.x,Y=B.clientY-I.current.y;if(Math.abs(U)>3||Math.abs(Y)>3)I.current.moved=!0;g({x:I.current.offsetX+U,y:I.current.offsetY+Y})},D=(B)=>{if(!v)return;k(!1);try{B.currentTarget.releasePointerCapture(B.pointerId)}catch{}if(!I.current.moved){if(B.target.dataset.previewBackdrop)c(!1)}},N=(B)=>{if(B.stopPropagation(),Math.abs(f-1)<0.05)T(2);else A()},O=()=>{let B=document.createElement("a");B.href=u.src,B.download=u.alt||u.title||"image",document.body.appendChild(B),B.click(),document.body.removeChild(B)},F=u.title||u.alt||"图片预览",z=`${Math.round(f*100)}%`;return e(Hu,{open:a,onOpenChange:c,children:n(ju,{children:[e(Gu,{className:l("surface.overlay","z-50 backdrop-blur-md")}),n($u,{"aria-describedby":void 0,className:"fixed inset-0 z-50 flex flex-col items-center justify-between outline-none select-none",children:[e(ph,{className:"sr-only",children:F}),n("div",{className:"flex w-full items-center justify-between px-4 py-3 sm:px-6",children:[e("div",{className:"max-w-[70vw] truncate text-xs font-medium text-white/70",children:u.alt||u.title||""}),e("button",{type:"button",onClick:()=>c(!1),className:"flex size-9 cursor-pointer items-center justify-center rounded-full border border-white/10 bg-black/40 text-white/80 transition-colors hover:bg-white/20 hover:text-white",title:"关闭预览 (Esc)","aria-label":"关闭预览",children:e(oe,{className:"size-4"})})]}),e("div",{ref:S,"data-preview-backdrop":"true",onPointerDown:E,onPointerMove:P,onPointerUp:D,onPointerCancel:D,className:d("relative flex size-full flex-1 items-center justify-center overflow-hidden touch-none",v?"cursor-grabbing":f>1?"cursor-grab":"cursor-zoom-in"),children:e("img",{src:u.src,alt:u.alt,title:u.title,draggable:!1,onDoubleClick:N,style:{transform:`translate3d(${p.x}px, ${p.y}px, 0) scale(${f})`,transition:v?"none":"transform 0.15s ease-out"},className:"max-h-[82vh] max-w-[88vw] rounded-lg object-contain shadow-2xl select-none"})}),e("div",{className:"flex items-center gap-1 pb-5 sm:pb-6",children:n("div",{className:"flex items-center gap-1 rounded-full border border-white/15 bg-black/60 px-2 py-1.5 shadow-2xl backdrop-blur-md",children:[e("button",{type:"button",onClick:R,disabled:f<=FG,className:"flex size-8 cursor-pointer items-center justify-center rounded-full text-white/80 transition-colors hover:bg-white/15 hover:text-white disabled:pointer-events-none disabled:opacity-40",title:"缩小 (-)","aria-label":"缩小",children:e(K0,{className:"size-4"})}),e("button",{type:"button",onClick:A,className:"flex h-8 cursor-pointer items-center justify-center rounded-full px-2.5 font-mono text-xs font-medium text-white/90 transition-colors hover:bg-white/15 hover:text-white",title:"重置缩放 (0)","aria-label":"重置缩放",children:z}),e("button",{type:"button",onClick:L,disabled:f>=VG,className:"flex size-8 cursor-pointer items-center justify-center rounded-full text-white/80 transition-colors hover:bg-white/15 hover:text-white disabled:pointer-events-none disabled:opacity-40",title:"放大 (+)","aria-label":"放大",children:e($0,{className:"size-4"})}),e("div",{className:"mx-1 h-3.5 w-px bg-white/20"}),e("button",{type:"button",onClick:A,className:"flex size-8 cursor-pointer items-center justify-center rounded-full text-white/80 transition-colors hover:bg-white/15 hover:text-white",title:"适应屏幕与复位","aria-label":"适应屏幕",children:e(Of,{className:"size-3.5"})}),e("button",{type:"button",onClick:O,className:"flex size-8 cursor-pointer items-center justify-center rounded-full text-white/80 transition-colors hover:bg-white/15 hover:text-white",title:"下载原图","aria-label":"下载原图",children:e(da,{className:"size-3.5"})}),e("a",{href:u.src,target:"_blank",rel:"noopener noreferrer",className:"flex size-8 cursor-pointer items-center justify-center rounded-full text-white/80 transition-colors hover:bg-white/15 hover:text-white",title:"在新标签页中打开","aria-label":"在新标签页中打开",children:e(mr,{className:"size-3.5"})})]})})]})]})})}function R0e(t){if(!t.includes("```")&&!t.includes("~~~"))return t;let a=t.split(`
1065
+ `),c=/^([ \t]*)(`{3,}|~{3,})(.*)$/,u=a.map((m)=>{let p=c.exec(m);if(!p)return;let g=p[1]??"",v=p[2]??"",k=v[0]??"",S=v.length,I=(p[3]??"").trim();if(k==="`"&&I.includes("`"))return;return{indent:g,marker:v,char:k,len:S,info:I}}),f=0;while(f<a.length){let m=u[f];if(!m){f+=1;continue}let p=1,g=0,v=f+1,k=-1;while(v<a.length){let S=u[v];if(S&&S.char===m.char&&S.len>=m.len){if(S.info===""){if(p-=1,p===0){k=v;break}}else if(/^[a-zA-Z0-9_+#.-]+$/.test(S.info)){let I=p+1;for(let T=v+1;T<a.length;T++){let L=u[T];if(!L||L.char!==m.char||L.len<m.len)continue;if(L.info===""){if(I-=1,I===0)break}else if(/^[a-zA-Z0-9_+#.-]+$/.test(L.info))I+=1}if(I===0){if(p+=1,S.len>g)g=S.len}}}v+=1}if(k!==-1){if(g>=m.len){let S=m.char.repeat(g+1),I=u[k];if(a[f]=`${m.indent}${S}${m.info?`${a[f]?.slice(m.indent.length+m.len)}`:""}`,I)a[k]=`${I.indent}${S}`}f=k+1}else f+=1}return a.join(`
1066
+ `)}function HG(t){let c=R0e(t).split(`
1067
+ `),u=[],f=[],m,p=(v)=>{let k=v.replace(/`(\$\$[\s\S]+?\$\$)`/g,"$1");return k=k.replace(/`(\$[^`\n]+?\$|\\\[[\s\S]+?\\\]|\\\([\s\S]+?\\\))`(?=[^`]|$)/g,"$1"),k.replace(/(`+)[^\n]*?\1|\\\[([\s\S]+?)\\\]|\\\(([\s\S]+?)\\\)/g,(S,I,T,L)=>{if(T!==void 0)return`$$${T}$$`;if(L!==void 0)return`$${L}$`;return S})},g=()=>{if(f.length===0)return;u.push(p(f.join(`
1068
+ `))),f=[]};for(let v of c){let k=$G(v);if(k){let{char:S,length:I,info:T}=k;if(m){if(S===m.char&&I>=m.length&&T==="")m=void 0;u.push(v);continue}if(S!=="`"||!T.includes("`")){g(),m={char:S,length:I},u.push(v);continue}}if(m)u.push(v);else f.push(v)}return g(),u.join(`
1069
+ `)}function qG(t){return t.replace(/<\s*br\s*\/?\s*>/gi," ").replace(/<\s*(?:b|strong)\b[^>]*>([\s\S]*?)<\s*\/\s*(?:b|strong)\s*>/gi,"**$1**").replace(/<\s*(?:i|em)\b[^>]*>([\s\S]*?)<\s*\/\s*(?:i|em)\s*>/gi,"*$1*").replace(/<\s*code\b[^>]*>([\s\S]*?)<\s*\/\s*code\s*>/gi,"`$1`").replace(/<\s*(?:s|del|strike)\b[^>]*>([\s\S]*?)<\s*\/\s*(?:s|del|strike)\s*>/gi,"~~$1~~").replace(/<\s*\/?\s*(?:b|strong|i|em|code|s|del|strike|span)\b[^>]*>/gi,"").replace(/<[a-zA-Z/][^>]*$/,"").replace(/\s*\n\s*/g," ").trim()}function jG(t){let a=t.trim(),c=!1,u=/^<details\b([^>]*)>/i.exec(a);if(u)c=/\bopen\b/i.test(u[1]??""),a=a.slice(u[0].length);a=a.replace(/<\/details\s*>\s*$/i,"").replace(/<\/?(?:details|summary)\b[^>]*$/i,"");let f="",m=/^\s*<summary\b[^>]*>([\s\S]*?)<\/summary\s*>/i.exec(a);if(m)f=qG(m[1]??""),a=a.slice(m[0].length);else{let p=/^\s*<summary\b[^>]*>([\s\S]*)$/i.exec(a);if(p)f=qG(p[1]??""),a=""}return{open:c,summary:f,body:a.trim()}}function GG(t){if(!t)return[];if(/\[\^[^\]]+\]/.test(t)||/^[ \t]{0,3}\[[^\]]+\]:/m.test(t))return[t];let a=t.split(`
1070
+ `),c=[],u=[],f,m=!1,p=0,g=()=>{let v=u.join(`
1071
+ `).trim();if(v)c.push(v);u=[]};for(let v=0;v<a.length;v++){let k=a[v]??"",S=k.trim(),I=$G(k);if(I){let{char:T,length:L,info:R}=I;if(f){if(T===f.char&&L>=f.length&&R===""){f=void 0,u.push(k);let A=/^[ \t]{0,3}([-*+]|\d+[.)])[ \t]/m.test(u.join(`
1072
+ `).trim());if(!m&&p===0&&!A)g();continue}}else if(T!=="`"||!R.includes("`")){let A=u.join(`
1073
+ `).trim(),E=/^[ \t]{0,3}([-*+]|\d+[.)])[ \t]/m.test(A);if(!m&&p===0&&A&&!E)g();f={char:T,length:L},u.push(k);continue}}if(!f){let T=k.match(/\$\$/g);if(T&&T.length%2===1)m=!m}if(!f&&!m){let T=k.replace(/(`+)[^\n]*?\1/g,""),L=T.match(/<details\b[^>]*>/gi)?.length??0,R=T.match(/<\/details\s*>/gi)?.length??0;if(p===0){if(L>0){if(u.length>0)g();if(u.push(k),p=Math.max(0,L-R),p===0)g();continue}if(R>0||/<\/?(?:details|summary)\b[^>]*$/i.test(T)){let A=k.replace(/(`+)[^\n]*?\1|<\/details\s*>|<\/?(?:details|summary)\b[^>]*$/gi,(E)=>E.startsWith("`")?E:"");u.push(A);continue}}else{if(u.push(k),p=Math.max(0,p+L-R),p===0)g();continue}}if(!f&&!m&&p===0&&/^[ \t]{0,3}#{1,6}[ \t]+/.test(k)&&u.length>0){g(),u.push(k);continue}if(!f&&!m&&p===0&&S===""){let T="";for(let E=v+1;E<a.length;E++)if((a[E]??"").trim()!==""){T=a[E]??"";break}let L=u.join(`
1074
+ `).trim(),A=/^[ \t]{0,3}([-*+]|\d+[.)])[ \t]/m.test(L)&&(/^[ \t]{2,}/.test(T)||/^[ \t]{0,3}([-*+]|\d+[.)])[ \t]/.test(T));if(L&&T&&!A){c.push(L),u=[];continue}}u.push(k)}return g(),c}function $G(t){let a=/^[ \t]*(`{3,}|~{3,})(.*)$/.exec(t);if(!a)return;let c=a[1]??"";return{char:c[0]??"",length:c.length,info:(a[2]??"").trim()}}var ES=jt(void 0);function E0e(t=typeof window<"u"?window.location.hostname:""){return t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t==="::1"}function P0e(t){let a=t.trim();if(!a)return!1;if(/^(?:https?:|mailto:|tel:|#|javascript:|data:)/i.test(a))return!1;if(/^(?:vscode|vscode-insiders|cursor|file):/i.test(a))return!0;if(/^[a-z][a-z0-9+.-]*:/i.test(a)&&!/^[a-z]:[\\/]/i.test(a))return!1;return!0}function A0e(t){let a=t.trim();if(a.startsWith("file://"))a=a.replace(/^file:\/\/\/?/,"");if(a.startsWith("vscode://file/"))a=a.replace(/^vscode:\/\/file\//,"");let c=/^(.*?):(\d+)(?::(\d+))?$/.exec(a);if(c){let u=c[1]??"",f=Number.parseInt(c[2]??"",10),m=c[3]?Number.parseInt(c[3],10):void 0;return{raw:t,cleanPath:u,line:Number.isNaN(f)?void 0:f,col:Number.isNaN(m)?void 0:m}}return{raw:t,cleanPath:a}}function M0e(t,a){let c=t.replace(/\\/g,"/");if(/^[a-zA-Z]:\//i.test(c)||c.startsWith("/"))return c;if(a){let f=a.replace(/\\/g,"/").replace(/\/+$/,""),m=c.replace(/^\.?\/+/,"");return`${f}/${m}`}return c}function D0e(t,a,c){let u=t.replace(/^\/+/,""),f=a!==void 0?`:${a}${c!==void 0?`:${c}`:""}`:"";return`vscode://file/${u}${f}`}function KG(t){_();let a=t.href??"",c=M(ES);if(P0e(a)){let u=E0e(),f=A0e(a),m=M0e(f.cleanPath,c),p=D0e(m,f.line,f.col),g=(k)=>{if(!u){k.preventDefault();let S=f.raw||a;if(typeof navigator<"u"&&navigator.clipboard?.writeText)navigator.clipboard.writeText(S).then(()=>le(`已复制文件路径: ${S}`),()=>le(`复制失败: ${S}`));else le(`无法访问剪贴板: ${S}`)}else le("正在唤起 VS Code…")},v=u?`在 VS Code 中打开${f.line?`(第 ${f.line} 行)`:""}`:"点击复制文件路径";return e(ui,{label:v,side:"top",children:e("a",{href:u?p:"#",onClick:g,className:l("markdown.fileChip"),children:t.children})})}return e("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:l("markdown.a"),children:t.children})}var Bh=jt(!1),N0e=260,O0e=6,WG=q(function(a){let{text:c}=a,f=i({committedEnd:0,prevText:"",nextId:1,slices:[]}).current;if(c!==f.prevText){let m=typeof performance<"u"?performance.now():0,p=f.prevText,g=0,v=Math.min(p.length,c.length);while(g<v&&p.charCodeAt(g)===c.charCodeAt(g))g+=1;if(g<p.length){f.committedEnd=Math.min(f.committedEnd,g);let S=[];for(let I of f.slices)if(I.end<=g)S.push(I);else if(I.start<g)S.push({...I,end:g});f.slices=S}let k=0;while(k<f.slices.length){let S=f.slices[k];if(!S||m-(S.bornAt+S.delayMs)<N0e)break;k+=1}if(k>0&&(k===f.slices.length||k>=6)){let S=f.slices[k-1];if(S)f.committedEnd=S.end,f.slices=f.slices.slice(k)}if(c.length>g){let S=c.slice(g),I=Array.from(S),T=Math.max(1,Math.ceil(I.length/O0e)),L=Math.ceil(I.length/T),R=g;for(let A=0;A<L;A++){let E=I.slice(A*T,(A+1)*T).join(""),P=R+E.length,D=L>1?Math.round(A/L*16):0;f.slices.push({id:f.nextId++,start:R,end:P,bornAt:m,delayMs:D}),R=P}}f.prevText=c}if(f.slices.length===0)return c;return n(h,{children:[f.committedEnd>0?c.slice(0,f.committedEnd):null,f.slices.map((m)=>e("span",{className:"animate-stream-chunk",style:m.delayMs>0?{animationDelay:`${m.delayMs}ms`}:void 0,children:c.slice(m.start,m.end)},m.id))]})}),_c=q(function(a){if(!M(Bh))return a.children;let{children:u}=a;if(typeof u==="string")return e(WG,{text:u},0);if(Array.isArray(u)&&u.length>0)return u.map((f,m)=>typeof f==="string"?e(WG,{text:f},m):f);return u});function _0e(t){return kc(t,()=>t.load())}function z0e(t){let a=U9(t.lang),c=M(Bh),u=M(Je),f=e(dE,{code:t.code,lang:t.lang,className:"in-data-[streaming]:animate-stream-block"});if(!a||!u||!t.lang)return f;let m=_0e(a.definition);return e(aa,{pluginID:a.pluginID,resetKey:m,fallback:f,children:e(qo,{fallback:e("div",{className:"contents","data-render-pending":"true",children:f}),children:e(m,{code:t.code,lang:t.lang.toLowerCase(),streaming:c})})})}function XG(t){return Uo.toArray(t).flatMap((a,c)=>{if(typeof a!=="string")return[a];return a.split(/<br\s*\/?>/i).flatMap((f,m)=>{if(m===0)return[f];return[e("br",{},`${c}-${m}`),f]})})}var B0e={p:(t)=>e(_c,{children:t.children}),strong:(t)=>e("strong",{className:l("markdown.strong"),children:t.children}),em:(t)=>e("em",{children:t.children}),code:(t)=>e("code",{className:l("markdown.inlineCode"),children:t.children})};function F0e(t){let{open:a,summary:c,body:u}=t.data,[f,m]=r(a),p=i(!1);return o(()=>{if(!p.current)m(a)},[a]),n(Oe,{open:f,onOpenChange:(g)=>{p.current=!0,m(g)},className:l("markdown.details"),children:[n($e,{className:l("markdown.detailsTrigger"),children:[e(tt,{className:"text-faint"}),e("span",{className:"min-w-0 flex-1 break-words [&_strong]:font-semibold",children:c?e(Bh.Provider,{value:t.active,children:e(yS,{remarkPlugins:[Yv,TP],components:B0e,children:c})}):"详情"})]}),e(De,{children:e("div",{className:l("markdown.detailsContent"),children:u?e(fi,{text:u,stream:t.active}):null})})]})}var V0e={p:(t)=>e("p",{className:l("markdown.p"),children:e(_c,{children:t.children})}),a:KG,strong:(t)=>e("strong",{className:l("markdown.strong"),children:t.children}),em:(t)=>e("em",{children:t.children}),h1:(t)=>e("h3",{className:l("markdown.h1"),children:e(_c,{children:t.children})}),h2:(t)=>e("h3",{className:l("markdown.h2"),children:e(_c,{children:t.children})}),h3:(t)=>e("h4",{className:l("markdown.h3"),children:e(_c,{children:t.children})}),h4:(t)=>e("h4",{className:l("markdown.h4"),children:e(_c,{children:t.children})}),ul:(t)=>e("ul",{className:l("markdown.ul"),children:t.children}),ol:(t)=>e("ol",{start:t.start,className:l("markdown.ol"),children:t.children}),li:(t)=>e("li",{className:l("markdown.li"),children:e(_c,{children:t.children})}),blockquote:(t)=>e("blockquote",{className:l("markdown.blockquote"),children:t.children}),hr:()=>e("hr",{className:l("markdown.hr")}),pre:(t)=>e(h,{children:t.children}),code:(t)=>{let a=t.className??"";if(/\blanguage-math\b/.test(a))return e(BG,{tex:String(t.children??"").replace(/\n$/,""),display:!/\bmath-inline\b/.test(a)});let c=/language-([\w+#.-]+)/.exec(a)?.[1],u=String(t.children??"");if(c||u.includes(`
1075
+ `))return e(z0e,{code:u.replace(/\n$/,""),lang:c});return e("code",{className:l("markdown.inlineCode"),children:t.children})},img:(t)=>{let a=t.title?`${t.title}(点击放大预览)`:t.alt?`${t.alt}(点击放大预览)`:"点击放大预览";return e("button",{type:"button",title:a,onClick:()=>{if(t.src)Nl({src:t.src,alt:t.alt,title:t.title})},className:l("markdown.imageButton"),children:e("img",{src:t.src,alt:t.alt,loading:"lazy",className:"max-h-[32rem] object-contain"})})},table:(t)=>e("div",{className:l("markdown.tableWrap"),children:e("table",{className:l("markdown.table"),children:t.children})}),thead:(t)=>e("thead",{className:l("markdown.thead"),children:t.children}),th:(t)=>e("th",{className:l("markdown.th"),children:XG(t.children)}),td:(t)=>e("td",{className:l("markdown.td"),children:e(_c,{children:XG(t.children)})})},U0e=q(function(a){if(/^<details\b/i.test(a.text))return e(Bh.Provider,{value:a.active,children:e(F0e,{data:jG(a.text),active:a.active})});return e(Bh.Provider,{value:a.active,children:e(yS,{remarkPlugins:[Yv,RS,TP],components:V0e,children:a.text})})}),fi=q(function(a){_();let c=HG(a.text),u=GG(c);return u.map((f,m)=>e(U0e,{text:f,active:Boolean(a.stream)&&m===u.length-1},m))});var PS=new WeakMap,AS=new WeakMap,gA=new WeakMap;function Fh(t){let a=Et(t.state,(f)=>f.status),[c,u]=r(()=>AS.get(t));return o(()=>{let f=gA.get(t)??new Set;return f.add(u),gA.set(t,f),()=>{f.delete(u)}},[t]),o(()=>{let f=AS.get(t);if(f)u(f);if(a!=="open")return;let m=PS.get(t);if(!m)m=t.models().then((g)=>(AS.set(t,g),g)),PS.set(t,m),m.catch(()=>PS.delete(t));let p=!0;return m.then((g)=>p&&u(g)).catch(()=>{}),()=>{p=!1}},[t,a]),c}async function Wr(t){let a=await t.models();PS.delete(t),AS.set(t,a);for(let c of gA.get(t)??[])c(a);return a}function q0e(t){return t.includes("/")?t.slice(t.indexOf("/")+1):t}var H0e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function Ys(t){return[...t].sort((a,c)=>H0e.compare(Wi(a.id,a.name),Wi(c.id,c.name)))}function QG(t){let a=new Map;for(let c of t){let u=c.id.includes("/")?c.id.slice(0,c.id.indexOf("/")):"";a.set(u,[...a.get(u)??[],c])}return[...a].map(([c,u])=>[c,Ys(u)])}var YG={gpt:"GPT",claude:"Claude",gemini:"Gemini",deepseek:"DeepSeek",qwen:"Qwen",qwq:"QwQ",qvq:"QvQ",kimi:"Kimi",glm:"GLM",llama:"Llama",mistral:"Mistral",codestral:"Codestral",devstral:"Devstral",minimax:"MiniMax",grok:"Grok",swe:"SWE",devin:"Devin",mimo:"MiMo",zai:"ZAI",dbrx:"DBRX",yi:"Yi"};function Wi(t,a){if(a&&a!==t&&/[A-Z\s]/.test(a))return a.trim();let c=q0e(a||t).trim();if(!c)return"";if(/[A-Z]/.test(c)&&c.includes(" ")&&!c.includes("_"))return c;let u=c.split(/[-_\s]+/).filter(Boolean);if(u.length===0)return c;let f=[];for(let m=0;m<u.length;m++){let p=u[m];if(!p)continue;let g=p.toLowerCase();if(/^\d+(\.\d+)*$/.test(p)){let v=u[m+1];if(v&&/^\d+$/.test(v)&&/^\d+$/.test(p)){f.push(`${p}.${v}`),m++;continue}f.push(p);continue}if(YG[g]){f.push(YG[g]);continue}if(/^o[1-9]$/i.test(p)){f.push(g);continue}if(/^\d+[a-z]$/i.test(p)){f.push(p);continue}f.push(p.charAt(0).toUpperCase()+p.slice(1).toLowerCase())}return f.join(" ")}function Cm(t){let a=i(t);return K(()=>{a.current=t}),y((...c)=>a.current(...c),[])}var MS=new Map;function xA(t){MS.delete(t);try{if(typeof localStorage<"u")localStorage.removeItem("basalt.draft:"+t)}catch{}}function DS(t){let a=MS.get(t);if(a)return a;try{if(typeof localStorage<"u"){let c=localStorage.getItem("basalt.draft:"+t);if(c){let u=JSON.parse(c),f={text:typeof u.text==="string"?u.text:"",attachments:Array.isArray(u.attachments)?u.attachments:[]};return MS.set(t,f),f}}}catch{}return{text:"",attachments:[]}}function Vh(t,a){if(a.text||a.attachments.length>0){MS.set(t,a);try{if(typeof localStorage<"u")localStorage.setItem("basalt.draft:"+t,JSON.stringify(a))}catch{try{if(typeof localStorage<"u")localStorage.setItem("basalt.draft:"+t,JSON.stringify({text:a.text,attachments:[]}))}catch{}}}else xA(t)}function Jt(t){return _(),n(bue,{open:t.open,onOpenChange:t.onOpenChange,children:[e(yue,{asChild:!0,children:t.trigger}),e(wue,{children:e(kue,{align:t.align??"end",side:t.side??"bottom",sideOffset:6,collisionPadding:8,onCloseAutoFocus:(a)=>a.preventDefault(),className:l("surface.floating","origin-(--radix-dropdown-menu-content-transform-origin)",t.className),children:t.children})})]})}function ke(t){return _(),n(qV,{disabled:t.disabled,onSelect:t.onSelect,className:l("surface.floatingItem",wh,t.danger&&"text-danger data-highlighted:bg-danger/10 [&_svg]:text-danger"),children:[t.icon,e("span",{className:"min-w-0 flex-1 truncate",children:t.children}),t.trailing,t.shortcut&&e(je,{children:t.shortcut})]})}function Uh(t){return _(),n(qV,{onSelect:t.onSelect,className:l("surface.floatingItem",wh),children:[t.icon,n("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block truncate",children:t.children}),t.description&&e("span",{className:"block truncate text-xs text-faint",children:t.description})]}),e(Z,{className:d("text-accent! transition-opacity",t.checked?"opacity-100":"opacity-0")})]})}function vA(t){return _(),e(Cue,{className:l("surface.floatingLabel"),children:t.children})}function rr(){return _(),e(Iue,{className:l("surface.floatingSeparator")})}function j0e(t){return e(Sue,{className:d("max-h-72 overflow-y-auto",t.className),children:t.children})}function ZG(t,a){let c=a.flatMap((P)=>P.web??[]),u=c.find((P)=>P.sessionAction==="fork"),f=c.find((P)=>P.sessionAction==="edit"),m=c.find((P)=>P.sessionAction==="replay"),[p,g]=r(!1),v=i(!1),k=i(!0);o(()=>(k.current=!0,()=>{k.current=!1}),[]);let[S,I]=r();async function T(P){if(v.current)return;v.current=!0,g(!0);try{await P()}catch(D){V(D,"会话操作失败")}finally{if(v.current=!1,k.current)g(!1)}}let L=(P)=>T(async()=>{let D=await t.conn.copySession(t.session.id,P);if(D.draft)Vh(D.session.id,{text:D.draft.text,attachments:D.draft.attachments??[]});if(k.current)t.onOpen(D.session.id)}),R=()=>T(async()=>{if(!S||!S.text.trim()&&!S.attachments.length)return;if(await t.conn.editSession(t.session.id,S.seq,S.text,S.attachments),k.current)I(void 0)}),A=(P)=>T(async()=>{let D=m?.confirmation;if(!D)return;let N=t.conn.view(t.session.id).entries.filter((F)=>F.seq>=P).length;if(!await Ke({...D,description:D.description.replace("{count}",String(N))}))return;await t.conn.replaySession(t.session.id,P)});return{pending:p,editing:S,setEditing:I,submitEdit:R,replay:A,actions:(P,D)=>{let N=u&&t.session.kind!=="sub",O=D&&(f||m?.confirmation);if(!N&&!O)return;return n(Jt,{trigger:e(b,{size:"icon-sm",variant:"ghost","aria-label":"消息操作",disabled:p,children:e(Gt,{className:"size-4"})}),children:[D&&f&&e(ke,{disabled:t.session.archivedAt!==null,icon:e(et,{}),onSelect:()=>I({seq:P,text:D.text,attachments:[...D.attachments??[]]}),children:f.title}),N&&e(ke,{icon:e(at,{}),onSelect:()=>L(P),children:u.title}),D&&m?.confirmation&&e(ke,{icon:e(Of,{}),danger:!0,disabled:t.session.status==="busy"||t.session.archivedAt!==null,onSelect:()=>A(P),children:t.session.status==="busy"?"重放(请先停止会话)":m.title})]})}}}function NS(){return NS=Object.assign?Object.assign.bind():function(t){for(var a=1;a<arguments.length;a++){var c=arguments[a];for(var u in c)({}).hasOwnProperty.call(c,u)&&(t[u]=c[u])}return t},NS.apply(null,arguments)}function JG(t,a){if(t==null)return{};var c={};for(var u in t)if({}.hasOwnProperty.call(t,u)){if(a.indexOf(u)!==-1)continue;c[u]=t[u]}return c}var e$=K;var t$=function(a){var c=i(a);return e$(function(){c.current=a}),c};var n$=function(a,c){if(typeof a==="function"){a(c);return}a.current=c},r$=function(a,c){var u=i();return y(function(f){if(a.current=f,u.current)n$(u.current,null);if(u.current=c,!c)return;n$(c,f)},[c])};var o$={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},G0e=function(a){Object.keys(o$).forEach(function(c){a.style.setProperty(c,o$[c],"important")})},a$=G0e,ia=null,i$=function(a,c){var u=a.scrollHeight;if(c.sizingStyle.boxSizing==="border-box")return u+c.borderSize;return u-c.paddingSize};function $0e(t,a,c,u){if(c===void 0)c=1;if(u===void 0)u=1/0;if(!ia)ia=document.createElement("textarea"),ia.setAttribute("tabindex","-1"),ia.setAttribute("aria-hidden","true"),a$(ia);if(ia.parentNode===null)document.body.appendChild(ia);var{paddingSize:f,borderSize:m,sizingStyle:p}=t,g=p.boxSizing;Object.keys(p).forEach(function(T){var L=T;ia.style[L]=p[L]}),a$(ia),ia.value=a;var v=i$(ia,t);ia.value=a,v=i$(ia,t),ia.value="x";var k=ia.scrollHeight-f,S=k*c;if(g==="border-box")S=S+f+m;v=Math.max(S,v);var I=k*u;if(g==="border-box")I=I+f+m;return v=Math.min(I,v),[v,k]}var s$=function(){},K0e=function(a,c){return a.reduce(function(u,f){return u[f]=c[f],u},{})},W0e=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],X0e=!!document.documentElement.currentStyle,Y0e=function(a){var c=window.getComputedStyle(a);if(c===null)return null;var u=K0e(W0e,c),f=u.boxSizing;if(f==="")return null;if(X0e&&f==="border-box")u.width=parseFloat(u.width)+parseFloat(u.borderRightWidth)+parseFloat(u.borderLeftWidth)+parseFloat(u.paddingRight)+parseFloat(u.paddingLeft)+"px";var m=parseFloat(u.paddingBottom)+parseFloat(u.paddingTop),p=parseFloat(u.borderBottomWidth)+parseFloat(u.borderTopWidth);return{sizingStyle:u,paddingSize:m,borderSize:p}},Q0e=Y0e;function bA(t,a,c){var u=t$(c);K(function(){var f=function(p){return u.current(p)};if(!t)return;return t.addEventListener(a,f),function(){return t.removeEventListener(a,f)}},[])}var Z0e=function(a,c){bA(document.body,"reset",function(u){if(a.current.form===u.target)c(u)})},J0e=function(a){bA(window,"resize",a)},eve=function(a){bA(document.fonts,"loadingdone",a)},tve=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],nve=function(a,c){var{cacheMeasurements:u,maxRows:f,minRows:m,onChange:p}=a,g=p===void 0?s$:p,v=a.onHeightChange,k=v===void 0?s$:v,S=JG(a,tve),I=S.value!==void 0,T=i(null),L=r$(T,c),R=i(0),A=i(),E=function(){var N=T.current,O=u&&A.current?A.current:Q0e(N);if(!O)return;A.current=O;var F=$0e(O,N.value||N.placeholder||"x",m,f),z=F[0],B=F[1];if(R.current!==z)R.current=z,N.style.setProperty("height",z+"px","important"),k(z,{rowHeight:B})},P=function(N){if(!I)E();g(N)};return K(E),Z0e(T,function(){if(!I){var D=T.current.value;requestAnimationFrame(function(){var N=T.current;if(N&&D!==N.value)E()})}}),J0e(E),eve(E),ct("textarea",NS({},S,{onChange:P,ref:L}))},l$=_e(nve);var Zv=10,rve=10485760,ove=524288,ave=131072,ive=2048,sve=new Set(["image/png","image/jpeg","image/webp","image/gif"]),lve={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".webp":"image/webp",".gif":"image/gif"};function cve(t){let a=t.type.trim().toLowerCase();if(a==="image/jpg")return"image/jpeg";if(sve.has(a))return a;let c=t.name.lastIndexOf(".");if(c<0)return;return lve[t.name.slice(c).toLowerCase()]}function uve(t){return new Promise((a,c)=>{let u=new FileReader;u.onload=()=>{let f=typeof u.result==="string"?u.result:"",m=f.indexOf(",");a(m>=0?f.slice(m+1):f)},u.onerror=()=>c(Error(`读取文件「${t.name}」失败`)),u.readAsDataURL(t)})}function dve(t){if("path"in t&&typeof t.path==="string"&&t.path.trim())return t.path;if(t.webkitRelativePath?.trim())return t.webkitRelativePath;return t.name||"未命名文件"}async function fve(t,a){if(t.size<=ave||a==="image/gif"||typeof document>"u"||typeof createImageBitmap!=="function")return;let c;try{c=await createImageBitmap(t);let u=Math.min(1,ive/Math.max(c.width,c.height,1)),f=Math.max(1,Math.round(c.width*u)),m=Math.max(1,Math.round(c.height*u)),p=document.createElement("canvas");p.width=f,p.height=m;let g=p.getContext("2d",{willReadFrequently:a==="image/png"});if(!g)return;g.drawImage(c,0,0,f,m);let v=!1;if(a==="image/png"||a==="image/webp"){let A=g.getImageData(0,0,f,m).data;for(let E=3;E<A.length;E+=16)if((A[E]??255)<255){v=!0;break}}let k=v?"image/webp":"image/jpeg",S=v?0.88:0.86,I=p.toDataURL(k,S),T=I.indexOf(",");if(T<0||!I.startsWith(`data:${k};base64,`))return;let L=I.slice(T+1),R=Math.floor(L.length*3/4);if(R<=0||R>=t.size*0.8)return;return{mimeType:k,data:L}}catch{return}finally{c?.close()}}async function OS(t){let a=t.name||"未命名",c=cve(t);if(c){if(t.size>rve)throw Error(`图片「${a}」超过 10 MB 上限`);let f=await fve(t,c);if(f)return{name:a,mimeType:f.mimeType,kind:"image",data:f.data};return{name:a,mimeType:c,kind:"image",data:await uve(t)}}if(t.size<=ove)try{let f=await t.arrayBuffer();if(!new Uint8Array(f,0,Math.min(f.byteLength,8192)).includes(0)){let p=new TextDecoder("utf-8",{fatal:!0}).decode(f);if(p.trim())return{name:a,mimeType:t.type||"text/plain",kind:"text",data:p}}}catch{}let u=dve(t);return{name:a,mimeType:t.type||"application/octet-stream",kind:"path",data:u}}function c$(t){_();let{item:a}=t;if(a.kind==="image")return n("div",{className:"group/att relative size-14 shrink-0 overflow-hidden rounded-xl border border-line bg-raised",children:[e("button",{type:"button",onClick:()=>Nl({src:`data:${a.mimeType};base64,${a.data}`,alt:a.name}),className:"size-full cursor-zoom-in text-left transition-[filter] hover:brightness-90",title:`${a.name}(点击放大预览)`,children:e("img",{src:`data:${a.mimeType};base64,${a.data}`,alt:a.name,className:"size-full object-cover"})}),e("button",{type:"button","aria-label":`移除 ${a.name}`,onClick:t.onRemove,className:"absolute top-1 right-1 flex size-5 items-center justify-center rounded-full bg-bg/85 text-dim opacity-0 backdrop-blur-xs transition-opacity group-hover/att:opacity-100 hover:text-ink focus-visible:opacity-100",children:e(oe,{className:"size-3"})})]});if(a.kind==="path")return n("div",{title:a.data,className:l("composer.attachment","max-w-64"),children:[e(xs,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"truncate font-medium text-ink",children:a.name}),e("span",{className:"shrink-0 rounded-md bg-panel/80 px-1 py-0.5 text-[10.5px] text-faint",children:"路径"}),e("button",{type:"button","aria-label":`移除 ${a.name}`,onClick:t.onRemove,className:"flex size-5 shrink-0 items-center justify-center rounded-md text-faint transition-colors hover:bg-panel hover:text-ink",children:e(oe,{className:"size-3"})})]});let c=a.data.split(`
1076
+ `).length;return n("div",{title:a.name,className:l("composer.attachment","max-w-52"),children:[e(xt,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"truncate font-medium text-ink",children:a.name}),n("span",{className:"shrink-0 text-[11px] text-faint",children:[c," 行"]}),e("button",{type:"button","aria-label":`移除 ${a.name}`,onClick:t.onRemove,className:"flex size-5 shrink-0 items-center justify-center rounded-md text-faint transition-colors hover:bg-panel hover:text-ink",children:e(oe,{className:"size-3"})})]})}var u$="pointer-events-none absolute -inset-px rounded-[inherit] p-px",d$={mask:"linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",maskComposite:"exclude",WebkitMask:"linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",WebkitMaskComposite:"xor"};function dd(t){_();let a=DS(t.draftKey),[c,u]=r(a.text),f=t.text!==void 0&&t.onTextChange!==void 0,m=f?t.text??"":c,p=i(m);p.current=m;let g=t.onTextChange,v=y((Ee)=>{if(!f||!g){u(Ee);return}let nt=typeof Ee==="function"?Ee(p.current):Ee;p.current=nt,g(nt)},[f,g]),[k,S]=r(a.attachments),[I,T]=r(),[L,R]=r(!1),[A,E]=r(!1),[P,D]=r(!1),[N,O]=r(0),F=ee(),z=i(0),B=i(null),U=i(null),Y=i(t.draftKey);Y.current=t.draftKey,o(()=>Vh(Y.current,{text:m,attachments:k}),[m,k]);let G=y((Ee)=>{let nt=t.inputRef,Kt;if(U.current=Ee,typeof nt==="function"){let an=nt(Ee);if(typeof an==="function")Kt=an}else if(nt)nt.current=Ee;if(Ee&&t.autoFocus)Ee.focus({preventScroll:!0});return()=>{if(U.current=null,Kt)Kt();else if(typeof nt==="function")nt(null);else if(nt)nt.current=null}},[t.inputRef,t.autoFocus]),ce=w(()=>t.commands??[],[t.commands]),re=ce.length>0,Q=m.startsWith("/")?m.slice(1).toLowerCase():"",ae=P?ce.filter((Ee)=>`${Ee.name} ${Ee.title}`.toLowerCase().includes(Q)):[],xe=Math.min(N,ae.length-1);function Te(Ee){if(Ee.disabled)return;D(!1),v((nt)=>nt.startsWith("/")?nt.replace(/^\/\S*/,"").trimStart():nt),Ee.execute()}function me(Ee){O(Ee),document.getElementById(`${F}-${Ee}`)?.scrollIntoView({block:"nearest"})}let Ce=t.allowAttachments!==!1;async function Be(Ee){let nt=Array.from(Ee);if(nt.length===0||L||!Ce)return;T(void 0);try{let Kt=[];for(let an of nt)Kt.push(await OS(an));S((an)=>{let mn=[...an];for(let br of Kt){if(mn.some((Ba)=>Ba.name===br.name&&Ba.kind===br.kind&&Ba.data===br.data))continue;if(mn.length>=Zv){T(`最多添加 ${Zv} 个附件`);break}mn.push(br)}return mn})}catch(Kt){T(ot(Kt))}}function X(Ee){if(L)return;S((nt)=>nt.filter((Kt,an)=>an!==Ee))}async function He(){let Ee=m.trim(),nt=k.length>0;if(!Ee&&!nt||L||ae.length>0)return;let Kt=k,an=t.draftKey;T(void 0),R(!0);try{await t.onSend(Ee,Kt.length>0?Kt:void 0),v(""),S([]),xA(an)}catch(mn){T(ot(mn))}finally{R(!1)}}function Le(Ee){if(P&&!Ee.nativeEvent.isComposing){let nt=ae.length;if(Ee.key==="Escape"){Ee.preventDefault(),D(!1);return}if(nt>0&&(Ee.key==="ArrowDown"||Ee.key==="ArrowUp")){Ee.preventDefault();let an=Ee.key==="ArrowDown"?1:-1;me((xe+an+nt)%nt);return}let Kt=ae[xe];if(Kt&&(Ee.key==="Tab"||Ee.key==="Enter"&&!Ee.shiftKey)){Ee.preventDefault(),Te(Kt);return}}if(Ee.key==="Escape"&&t.busy&&t.onAbort){Ee.preventDefault(),t.onAbort();return}if(Ee.key!=="Enter"||Ee.shiftKey||Ee.nativeEvent.isComposing)return;if(matchMedia("(pointer: coarse)").matches)return;Ee.preventDefault(),He()}function J(Ee){if(Ee.clipboardData.files.length===0||!Ce)return;Ee.preventDefault(),Be(Ee.clipboardData.files)}function Me(Ee){if(!Ee.dataTransfer.types.includes("Files")||!Ce)return;Ee.preventDefault(),z.current++,E(!0)}function Ie(Ee){if(!Ee.dataTransfer.types.includes("Files")||!Ce)return;Ee.preventDefault(),Ee.dataTransfer.dropEffect="copy"}function qe(Ee){if(!Ee.dataTransfer.types.includes("Files"))return;if(Ee.preventDefault(),z.current=Math.max(0,z.current-1),z.current===0)E(!1)}function Qe(Ee){if(!Ee.dataTransfer.types.includes("Files")||!Ce)return;Ee.preventDefault(),z.current=0,E(!1),Be(Ee.dataTransfer.files)}function Re(Ee){let nt=Ee.currentTarget.getBoundingClientRect();Ee.currentTarget.style.setProperty("--mx",`${Ee.clientX-nt.left}px`),Ee.currentTarget.style.setProperty("--my",`${Ee.clientY-nt.top}px`)}let Ne=m.trim().length>0||k.length>0,ut=Ne&&!L,kt=t.busy?"引导":"发送";if(L)kt="发送中";let It=Boolean(t.busy||L);return n("div",{children:[e("input",{ref:B,type:"file",multiple:!0,className:"hidden",onChange:(Ee)=>{if(Ee.target.files)Be(Ee.target.files);Ee.target.value=""}}),e(de,{children:I&&e(H.p,{role:"alert",initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden px-1 text-[13px] text-danger",children:e("span",{className:"block pb-2",children:I})})}),n("fieldset",{"aria-label":"消息编辑器","aria-busy":L,"data-composer":!0,onPointerMove:Re,onDragEnter:Me,onDragOver:Ie,onDragLeave:qe,onDrop:Qe,className:l("composer.box",A&&"border-accent"),children:[e("div",{"aria-hidden":"true",style:{background:"radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklch, var(--color-accent) 6.5%, transparent), transparent 70%)"},className:"pointer-events-none absolute inset-0 rounded-[inherit] opacity-0 transition-opacity duration-300 group-hover/composer:opacity-100"}),e("div",{"aria-hidden":"true",style:{...d$,background:"radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklch, var(--color-accent) 75%, var(--color-line-strong)), transparent 75%)"},className:d(u$,"opacity-0 transition-opacity duration-300 group-hover/composer:opacity-100")}),It&&e("div",{"aria-hidden":"true",style:{...d$,backgroundImage:"linear-gradient(110deg, transparent 25%, color-mix(in oklch, var(--color-accent) 35%, transparent) 45%, var(--color-accent) 50%, color-mix(in oklch, var(--color-accent) 35%, transparent) 55%, transparent 75%)",backgroundSize:"200% 100%"},className:d(u$,"animate-shimmer")}),P&&e("div",{id:F,role:"listbox","aria-label":"指令",className:l("surface.floating","absolute right-0 bottom-full left-0 mb-2 max-h-[min(16rem,40dvh)] overflow-y-auto overscroll-contain"),children:ae.length===0?e("div",{className:l("surface.empty","py-4 text-[13px]"),children:"暂无匹配指令"}):ae.map((Ee,nt)=>n("button",{type:"button",tabIndex:-1,id:`${F}-${nt}`,role:"option","aria-selected":nt===xe,disabled:Ee.disabled,"data-highlighted":nt===xe?"":void 0,onPointerDown:(Kt)=>Kt.preventDefault(),onPointerMove:()=>O(nt),onClick:()=>Te(Ee),className:l("surface.floatingItem",Ee.disabled&&"pointer-events-none opacity-45"),children:[n("span",{className:"min-w-0 flex-1 truncate font-mono text-[13px] font-medium text-ink",children:["/",Ee.name]}),e("span",{className:"shrink-0 text-xs text-dim",children:Ee.title})]},Ee.id))}),t.header,e(de,{initial:!1,children:k.length>0&&e(H.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"relative overflow-hidden",children:e("div",{className:"flex flex-wrap items-center gap-2 px-3.5 pt-3.5 pb-0.5",children:k.map((Ee,nt)=>e(c$,{item:Ee,onRemove:()=>X(nt)},`${Ee.name}:${Ee.kind}:${Ee.data.slice(0,32)}`))})})}),e(l$,{ref:G,rows:1,maxRows:14,value:m,onChange:(Ee)=>{let nt=Ee.target.value;v(nt),D(re&&/^\/\S*$/.test(nt)),O(0)},onBlur:()=>{if(document.hasFocus())D(!1)},onKeyDown:Le,onPaste:J,readOnly:L,placeholder:t.placeholder,"aria-label":"消息","aria-expanded":P,"aria-controls":P?F:void 0,"aria-activedescendant":P&&xe>=0?`${F}-${xe}`:void 0,className:l("composer.input")}),n("div",{className:"relative flex items-center gap-1 px-2.5 pb-2.5",children:[n("div",{className:"flex flex-1 items-center gap-0.5",children:[Ce&&e(j,{label:"添加文件或图片",size:"icon-sm",onClick:()=>B.current?.click(),className:"text-dim hover:text-ink",children:e(eh,{className:"size-4"})}),re&&e(b,{size:"sm",variant:"ghost","aria-label":"选择指令","aria-expanded":P,disabled:It,onPointerDown:(Ee)=>Ee.preventDefault(),onClick:()=>{O(0),D((Ee)=>!Ee),U.current?.focus({preventScroll:!0})},children:"/"}),t.tools&&e("span",{"aria-hidden":"true",className:"mx-0.5 h-3.5 w-px shrink-0 bg-line"}),t.tools]}),t.conn&&e(Ol,{name:"composer:toolbar",connection:t.conn,sessionID:t.sessionID,session:t.session,plugins:t.plugins??[],context:{text:m,setText:v,attachments:k,setAttachments:S,busy:t.busy,disabled:L,draftKey:t.draftKey}}),t.aside,e("div",{className:"ml-1.5 flex shrink-0",children:(()=>{let Ee=e("div",{className:"relative size-8 shrink-0",children:e(de,{mode:"popLayout",initial:!1,children:t.busy&&!Ne?e(H.div,{initial:{scale:0.6,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0.6,opacity:0},transition:Is,children:e(j,{label:"停止",variant:"inverse",onClick:t.onAbort,className:"rounded-full",children:e(zf,{className:"size-3 fill-current",strokeWidth:0})})},"stop"):e(H.div,{initial:{scale:0.6,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0.6,opacity:0},transition:Is,children:n(b,{"aria-label":kt,title:kt,variant:"primary",size:"icon",disabled:!ut,loading:L,onClick:()=>void He(),className:d("group/send relative overflow-hidden rounded-full transition-shadow duration-300 disabled:opacity-35",ut&&"shadow-[0_0_16px_-2px_color-mix(in_oklch,var(--color-accent)_65%,transparent)]",L&&"disabled:opacity-100"),children:[e(zu,{className:"size-4.5 transition-all duration-300 ease-out-quint group-enabled/send:group-hover/send:-translate-y-5 group-enabled/send:group-hover/send:opacity-0",strokeWidth:2.4}),e(zu,{"aria-hidden":"true",className:"absolute size-4.5 translate-y-5 opacity-0 transition-all duration-300 ease-out-quint group-enabled/send:group-hover/send:translate-y-0 group-enabled/send:group-hover/send:opacity-100",strokeWidth:2.4})]})},"send")})});if(!t.conn||!t.sessionID)return Ee;return e(Ol,{name:"composer:action",connection:t.conn,sessionID:t.sessionID,session:t.session,plugins:t.plugins??[],context:{canSend:ut,busy:t.busy,entriesLength:t.entriesLength,sessionUpdated:t.sessionUpdated,onInspectContext:t.onInspectContext},children:Ee})})()})]}),e(de,{children:A&&n(H.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:0.15},className:"pointer-events-none absolute inset-1 z-20 flex items-center justify-center gap-2 rounded-2xl border border-dashed border-accent/60 bg-panel/92 text-sm font-medium text-ink backdrop-blur-[2px]",children:[e(eh,{className:"size-4 text-accent"}),"松手添加文件或图片"]})})]})]})}function _S(t){_();let{icon:a,label:c,trailing:u,className:f,...m}=t;return n(b,{variant:"ghost",size:"sm",...m,className:l("control.chipTrigger",f),children:[a,e("span",{className:"truncate",children:c}),u]})}var f$=1,mve=0.9,pve=0.8,hve=0.17,yA=0.1,wA=0.999,gve=0.9999,xve=0.99,vve=/[\\\/_+.#"@\[\(\{&]/,bve=/[\\\/_+.#"@\[\(\{&]/g,yve=/[\s-]/,p$=/[\s-]/g;function kA(t,a,c,u,f,m,p){if(m===a.length)return f===t.length?f$:xve;var g=`${f},${m}`;if(p[g]!==void 0)return p[g];for(var v=u.charAt(m),k=c.indexOf(v,f),S=0,I,T,L,R;k>=0;)I=kA(t,a,c,u,k+1,m+1,p),I>S&&(k===f?I*=f$:vve.test(t.charAt(k-1))?(I*=pve,L=t.slice(f,k-1).match(bve),L&&f>0&&(I*=Math.pow(wA,L.length))):yve.test(t.charAt(k-1))?(I*=mve,R=t.slice(f,k-1).match(p$),R&&f>0&&(I*=Math.pow(wA,R.length))):(I*=hve,f>0&&(I*=Math.pow(wA,k-f))),t.charAt(k)!==a.charAt(m)&&(I*=gve)),(I<yA&&c.charAt(k-1)===u.charAt(m+1)||u.charAt(m+1)===u.charAt(m)&&c.charAt(k-1)!==u.charAt(m))&&(T=kA(t,a,c,u,k+1,m+2,p),T*yA>I&&(I=T*yA)),I>S&&(S=I),k=c.indexOf(v,k+1);return p[g]=S,S}function m$(t){return t.toLowerCase().replace(p$," ")}function h$(t,a,c){return t=c&&c.length>0?`${t+" "+c.join(" ")}`:t,kA(t,a,m$(t),m$(a),0,0,{})}var Jv='[cmdk-group=""]',SA='[cmdk-group-items=""]',wve='[cmdk-group-heading=""]',x$='[cmdk-item=""]',g$=`${x$}:not([aria-disabled="true"])`,CA="cmdk-item-select",qh="data-value",kve=(t,a,c)=>h$(t,a,c),v$=jt(void 0),eb=()=>M(v$),b$=jt(void 0),IA=()=>M(b$),y$=jt(void 0),w$=_e((t,a)=>{let c=Hh(()=>{var Le,J;return{search:"",value:(J=(Le=t.value)!=null?Le:t.defaultValue)!=null?J:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=Hh(()=>new Set),f=Hh(()=>new Map),m=Hh(()=>new Map),p=Hh(()=>new Set),g=k$(t),{label:v,children:k,value:S,onValueChange:I,filter:T,shouldFilter:L,loop:R,disablePointerSelection:A=!1,vimBindings:E=!0,...P}=t,D=Dn(),N=Dn(),O=Dn(),F=i(null),z=Dve();Im(()=>{if(S!==void 0){let Le=S.trim();c.current.value=Le,B.emit()}},[S]),Im(()=>{z(6,Q)},[]);let B=w(()=>({subscribe:(Le)=>(p.current.add(Le),()=>p.current.delete(Le)),snapshot:()=>c.current,setState:(Le,J,Me)=>{var Ie,qe,Qe,Re;if(!Object.is(c.current[Le],J)){if(c.current[Le]=J,Le==="search")re(),G(),z(1,ce);else if(Le==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ne=document.getElementById(O);Ne?Ne.focus():(Ie=document.getElementById(D))==null||Ie.focus()}if(z(7,()=>{var Ne;c.current.selectedItemId=(Ne=ae())==null?void 0:Ne.id,B.emit()}),Me||z(5,Q),((qe=g.current)==null?void 0:qe.value)!==void 0){let Ne=J!=null?J:"";(Re=(Qe=g.current).onValueChange)==null||Re.call(Qe,Ne);return}}B.emit()}},emit:()=>{p.current.forEach((Le)=>Le())}}),[]),U=w(()=>({value:(Le,J,Me)=>{var Ie;J!==((Ie=m.current.get(Le))==null?void 0:Ie.value)&&(m.current.set(Le,{value:J,keywords:Me}),c.current.filtered.items.set(Le,Y(J,Me)),z(2,()=>{G(),B.emit()}))},item:(Le,J)=>(u.current.add(Le),J&&(f.current.has(J)?f.current.get(J).add(Le):f.current.set(J,new Set([Le]))),z(3,()=>{re(),G(),c.current.value||ce(),B.emit()}),()=>{m.current.delete(Le),u.current.delete(Le),c.current.filtered.items.delete(Le);let Me=ae();z(4,()=>{re(),(Me==null?void 0:Me.getAttribute("id"))===Le&&ce(),B.emit()})}),group:(Le)=>(f.current.has(Le)||f.current.set(Le,new Set),()=>{m.current.delete(Le),f.current.delete(Le)}),filter:()=>g.current.shouldFilter,label:v||t["aria-label"],getDisablePointerSelection:()=>g.current.disablePointerSelection,listId:D,inputId:O,labelId:N,listInnerRef:F}),[]);function Y(Le,J){var Me,Ie;let qe=(Ie=(Me=g.current)==null?void 0:Me.filter)!=null?Ie:kve;return Le?qe(Le,c.current.search,J):0}function G(){if(!c.current.search||g.current.shouldFilter===!1)return;let Le=c.current.filtered.items,J=[];c.current.filtered.groups.forEach((Ie)=>{let qe=f.current.get(Ie),Qe=0;qe.forEach((Re)=>{let Ne=Le.get(Re);Qe=Math.max(Ne,Qe)}),J.push([Ie,Qe])});let Me=F.current;xe().sort((Ie,qe)=>{var Qe,Re;let Ne=Ie.getAttribute("id"),ut=qe.getAttribute("id");return((Qe=Le.get(ut))!=null?Qe:0)-((Re=Le.get(Ne))!=null?Re:0)}).forEach((Ie)=>{let qe=Ie.closest(SA);qe?qe.appendChild(Ie.parentElement===qe?Ie:Ie.closest(`${SA} > *`)):Me.appendChild(Ie.parentElement===Me?Ie:Ie.closest(`${SA} > *`))}),J.sort((Ie,qe)=>qe[1]-Ie[1]).forEach((Ie)=>{var qe;let Qe=(qe=F.current)==null?void 0:qe.querySelector(`${Jv}[${qh}="${encodeURIComponent(Ie[0])}"]`);Qe==null||Qe.parentElement.appendChild(Qe)})}function ce(){let Le=xe().find((Me)=>Me.getAttribute("aria-disabled")!=="true"),J=Le==null?void 0:Le.getAttribute(qh);B.setState("value",J||void 0)}function re(){var Le,J,Me,Ie;if(!c.current.search||g.current.shouldFilter===!1){c.current.filtered.count=u.current.size;return}c.current.filtered.groups=new Set;let qe=0;for(let Qe of u.current){let Re=(J=(Le=m.current.get(Qe))==null?void 0:Le.value)!=null?J:"",Ne=(Ie=(Me=m.current.get(Qe))==null?void 0:Me.keywords)!=null?Ie:[],ut=Y(Re,Ne);c.current.filtered.items.set(Qe,ut),ut>0&&qe++}for(let[Qe,Re]of f.current)for(let Ne of Re)if(c.current.filtered.items.get(Ne)>0){c.current.filtered.groups.add(Qe);break}c.current.filtered.count=qe}function Q(){var Le,J,Me;let Ie=ae();Ie&&(((Le=Ie.parentElement)==null?void 0:Le.firstChild)===Ie&&((Me=(J=Ie.closest(Jv))==null?void 0:J.querySelector(wve))==null||Me.scrollIntoView({block:"nearest"})),Ie.scrollIntoView({block:"nearest"}))}function ae(){var Le;return(Le=F.current)==null?void 0:Le.querySelector(`${x$}[aria-selected="true"]`)}function xe(){var Le;return Array.from(((Le=F.current)==null?void 0:Le.querySelectorAll(g$))||[])}function Te(Le){let J=xe()[Le];J&&B.setState("value",J.getAttribute(qh))}function me(Le){var J;let Me=ae(),Ie=xe(),qe=Ie.findIndex((Re)=>Re===Me),Qe=Ie[qe+Le];(J=g.current)!=null&&J.loop&&(Qe=qe+Le<0?Ie[Ie.length-1]:qe+Le===Ie.length?Ie[0]:Ie[qe+Le]),Qe&&B.setState("value",Qe.getAttribute(qh))}function Ce(Le){let J=ae(),Me=J==null?void 0:J.closest(Jv),Ie;for(;Me&&!Ie;)Me=Le>0?Ave(Me,Jv):Mve(Me,Jv),Ie=Me==null?void 0:Me.querySelector(g$);Ie?B.setState("value",Ie.getAttribute(qh)):me(Le)}let Be=()=>Te(xe().length-1),X=(Le)=>{Le.preventDefault(),Le.metaKey?Be():Le.altKey?Ce(1):me(1)},He=(Le)=>{Le.preventDefault(),Le.metaKey?Te(0):Le.altKey?Ce(-1):me(-1)};return ct(St.div,{ref:a,tabIndex:-1,...P,"cmdk-root":"",onKeyDown:(Le)=>{var J;(J=P.onKeyDown)==null||J.call(P,Le);let Me=Le.nativeEvent.isComposing||Le.keyCode===229;if(!(Le.defaultPrevented||Me))switch(Le.key){case"n":case"j":{E&&Le.ctrlKey&&X(Le);break}case"ArrowDown":{X(Le);break}case"p":case"k":{E&&Le.ctrlKey&&He(Le);break}case"ArrowUp":{He(Le);break}case"Home":{Le.preventDefault(),Te(0);break}case"End":{Le.preventDefault(),Be();break}case"Enter":{Le.preventDefault();let Ie=ae();if(Ie){let qe=new Event(CA);Ie.dispatchEvent(qe)}}}}},ct("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:Ove},v),zS(t,(Le)=>ct(b$.Provider,{value:B},ct(v$.Provider,{value:U},Le))))}),Sve=_e((t,a)=>{var c,u;let f=Dn(),m=i(null),p=M(y$),g=eb(),v=k$(t),k=(u=(c=v.current)==null?void 0:c.forceMount)!=null?u:p==null?void 0:p.forceMount;Im(()=>{if(!k)return g.item(f,p==null?void 0:p.id)},[k]);let S=S$(f,m,[t.value,t.children,m],t.keywords),I=IA(),T=fd((z)=>z.value&&z.value===S.current),L=fd((z)=>k||g.filter()===!1?!0:z.search?z.filtered.items.get(f)>0:!0);o(()=>{let z=m.current;if(!(!z||t.disabled))return z.addEventListener(CA,R),()=>z.removeEventListener(CA,R)},[L,t.onSelect,t.disabled]);function R(){var z,B;A(),(B=(z=v.current).onSelect)==null||B.call(z,S.current)}function A(){I.setState("value",S.current,!0)}if(!L)return null;let{disabled:E,value:P,onSelect:D,forceMount:N,keywords:O,...F}=t;return ct(St.div,{ref:Vu(m,a),...F,id:f,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!T,"data-disabled":!!E,"data-selected":!!T,onPointerMove:E||g.getDisablePointerSelection()?void 0:A,onClick:E?void 0:R},t.children)}),Cve=_e((t,a)=>{let{heading:c,children:u,forceMount:f,...m}=t,p=Dn(),g=i(null),v=i(null),k=Dn(),S=eb(),I=fd((L)=>f||S.filter()===!1?!0:L.search?L.filtered.groups.has(p):!0);Im(()=>S.group(p),[]),S$(p,g,[t.value,t.heading,v]);let T=w(()=>({id:p,forceMount:f}),[f]);return ct(St.div,{ref:Vu(g,a),...m,"cmdk-group":"",role:"presentation",hidden:I?void 0:!0},c&&ct("div",{ref:v,"cmdk-group-heading":"","aria-hidden":!0,id:k},c),zS(t,(L)=>ct("div",{"cmdk-group-items":"",role:"group","aria-labelledby":c?k:void 0},ct(y$.Provider,{value:T},L))))}),Ive=_e((t,a)=>{let{alwaysRender:c,...u}=t,f=i(null),m=fd((p)=>!p.search);return!c&&!m?null:ct(St.div,{ref:Vu(f,a),...u,"cmdk-separator":"",role:"separator"})}),Tve=_e((t,a)=>{let{onValueChange:c,...u}=t,f=t.value!=null,m=IA(),p=fd((k)=>k.search),g=fd((k)=>k.selectedItemId),v=eb();return o(()=>{t.value!=null&&m.setState("search",t.value)},[t.value]),ct(St.input,{ref:a,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":v.listId,"aria-labelledby":v.labelId,"aria-activedescendant":g,id:v.inputId,type:"text",value:f?t.value:p,onChange:(k)=>{f||m.setState("search",k.target.value),c==null||c(k.target.value)}})}),Lve=_e((t,a)=>{let{children:c,label:u="Suggestions",...f}=t,m=i(null),p=i(null),g=fd((k)=>k.selectedItemId),v=eb();return o(()=>{if(p.current&&m.current){let k=p.current,S=m.current,I,T=new ResizeObserver(()=>{I=requestAnimationFrame(()=>{let L=k.offsetHeight;S.style.setProperty("--cmdk-list-height",L.toFixed(1)+"px")})});return T.observe(k),()=>{cancelAnimationFrame(I),T.unobserve(k)}}},[]),ct(St.div,{ref:Vu(m,a),...f,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":g,"aria-label":u,id:v.listId},zS(t,(k)=>ct("div",{ref:Vu(p,v.listInnerRef),"cmdk-list-sizer":""},k)))}),Rve=_e((t,a)=>{let{open:c,onOpenChange:u,overlayClassName:f,contentClassName:m,container:p,...g}=t;return ct(Hu,{open:c,onOpenChange:u},ct(ju,{container:p},ct(Gu,{"cmdk-overlay":"",className:f}),ct($u,{"aria-label":t.label,"cmdk-dialog":"",className:m},ct(w$,{ref:a,...g}))))}),Eve=_e((t,a)=>fd((c)=>c.filtered.count===0)?ct(St.div,{ref:a,...t,"cmdk-empty":"",role:"presentation"}):null),Pve=_e((t,a)=>{let{progress:c,children:u,label:f="Loading...",...m}=t;return ct(St.div,{ref:a,...m,"cmdk-loading":"",role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-label":f},zS(t,(p)=>ct("div",{"aria-hidden":!0},p)))}),zc=Object.assign(w$,{List:Lve,Item:Sve,Input:Tve,Group:Cve,Separator:Ive,Dialog:Rve,Empty:Eve,Loading:Pve});function Ave(t,a){let c=t.nextElementSibling;for(;c;){if(c.matches(a))return c;c=c.nextElementSibling}}function Mve(t,a){let c=t.previousElementSibling;for(;c;){if(c.matches(a))return c;c=c.previousElementSibling}}function k$(t){let a=i(t);return Im(()=>{a.current=t}),a}var Im=typeof window>"u"?o:K;function Hh(t){let a=i();return a.current===void 0&&(a.current=t()),a}function fd(t){let a=IA(),c=()=>t(a.snapshot());return Kr(a.subscribe,c,c)}function S$(t,a,c,u=[]){let f=i(),m=eb();return Im(()=>{var p;let g=(()=>{var k;for(let S of c){if(typeof S=="string")return S.trim();if(typeof S=="object"&&"current"in S)return S.current?(k=S.current.textContent)==null?void 0:k.trim():f.current}})(),v=u.map((k)=>k.trim());m.value(t,g,v),(p=a.current)==null||p.setAttribute(qh,g),f.current=g}),f}var Dve=()=>{let[t,a]=r(),c=Hh(()=>new Map);return Im(()=>{c.current.forEach((u)=>u()),c.current=new Map},[t]),(u,f)=>{c.current.set(u,f),a({})}};function Nve(t){let a=t.type;return typeof a=="function"?a(t.props):("render"in a)?a.render(t.props):t}function zS({asChild:t,children:a},c){return t&&eo(a)?wa(Nve(a),{ref:a.ref},c(a.props.children)):c(a)}var Ove={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function md({className:t,...a}){return e(zc,{...a,className:d("flex min-h-0 flex-1 flex-col text-ink",t)})}function pd({wrapperClassName:t,trailing:a,...c}){return _(),n("div",{className:l("command.inputWrap",t),children:[e(Pe,{className:"size-4 shrink-0 text-faint"}),e(zc.Input,{...c,className:l("command.input",c.className)}),a]})}function hd({className:t,...a}){return e(zc.List,{...a,className:d("min-h-0 flex-1 scroll-py-1 overflow-y-auto p-1",t)})}function jh(t){return _(),e(zc.Empty,{className:l("surface.empty","text-[13px]"),children:t.children})}function Xi({className:t,...a}){return _(),e(zc.Group,{...a,className:l("command.group",t)})}function tb(){return _(),e(zc.Separator,{className:l("surface.floatingSeparator")})}function Po({className:t,icon:a,shortcut:c,trailing:u,children:f,...m}){return _(),n(zc.Item,{...m,className:l("surface.floatingItem","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-45",t),children:[a,e("span",{className:"min-w-0 flex-1 truncate",children:f}),u,c&&e(je,{children:c})]})}function BS({className:t,...a}){return _(),e(zc.Item,{...a,className:l("command.row",t)})}function Tm(t){return _(),n(WV,{open:t.open,onOpenChange:t.onOpenChange,children:[e($ue,{asChild:!0,children:t.trigger}),e(XV,{children:e(YV,{align:t.align??"start",side:t.side??"bottom",sideOffset:6,collisionPadding:8,onOpenAutoFocus:(a)=>{if(matchMedia("(pointer: coarse)").matches)a.preventDefault()},onCloseAutoFocus:(a)=>a.preventDefault(),onWheel:(a)=>a.stopPropagation(),className:l("surface.floating","max-h-[min(24rem,var(--radix-popover-content-available-height,24rem))] origin-(--radix-popover-content-transform-origin) p-0",t.className),children:t.children})})]})}var C$="Anthropic";var I$=q(({size:t="1em",style:a,...c})=>n("svg",{fill:"currentColor",fillRule:"evenodd",height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:C$}),e("path",{d:"M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"})]}));var T$="Claude";var L$=q(({size:t="1em",style:a,...c})=>n("svg",{fill:"currentColor",fillRule:"evenodd",height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:T$}),e("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})]}));var R$="Cloudflare";var E$=q(({size:t="1em",style:a,...c})=>n("svg",{height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:R$}),e("path",{d:"M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437",fill:"#F38020"}),e("path",{d:"M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777",fill:"#FCAD32"})]}));var P$="Cursor";var A$=q(({size:t="1em",style:a,...c})=>n("svg",{fill:"currentColor",fillRule:"evenodd",height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:P$}),e("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})]}));var M$="DeepSeek";var D$=q(({size:t="1em",style:a,...c})=>n("svg",{height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:M$}),e("path",{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z",fill:"#4D6BFE"})]}));var N$="Devin";var O$=q(({size:t="1em",style:a,...c})=>n("svg",{fill:"currentColor",fillRule:"evenodd",height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:N$}),e("path",{d:"M2.033 9.867l2.554 1.483a.589.589 0 00.592 0l2.554-1.483.01-.008a.608.608 0 00.11-.084l.013-.015a.631.631 0 00.076-.1c.003-.005.008-.01.01-.016a.558.558 0 00.052-.125l.007-.028a.611.611 0 00.019-.14V7.868c0-.572.307-1.105.8-1.392a1.595 1.595 0 011.598 0l1.277.742a.54.54 0 00.129.053l.028.01c.044.01.088.015.133.016h.006l.013-.002a.587.587 0 00.27-.074l.011-.004 2.554-1.483a.596.596 0 00.297-.516V2.253a.595.595 0 00-.297-.516L12.293.257a.587.587 0 00-.591 0L9.148 1.737l-.01.01a.609.609 0 00-.109.083l-.014.015a.632.632 0 00-.076.1c-.003.005-.008.01-.01.016a.57.57 0 00-.052.124l-.007.028a.612.612 0 00-.018.14v1.483c0 .572-.307 1.105-.8 1.393a1.597 1.597 0 01-1.599 0l-1.276-.742a.603.603 0 00-.13-.053l-.028-.008a.658.658 0 00-.133-.018h-.02a.57.57 0 00-.269.074c-.003.002-.008.002-.012.005L2.033 5.872a.596.596 0 00-.297.515v2.966c0 .213.113.41.297.515z"}),e("path",{d:"M15.943 10.607a1.596 1.596 0 011.599 0l1.276.74c.041.025.085.04.13.055l.028.008c.043.01.088.016.133.018h.005c.005 0 .01-.002.014-.003a.474.474 0 00.122-.016l.021-.005a.616.616 0 00.126-.052c.004-.002.009-.002.013-.005l2.554-1.482a.597.597 0 00.297-.516V6.383a.596.596 0 00-.297-.515l-2.552-1.483a.587.587 0 00-.592 0l-2.553 1.482-.011.008a.61.61 0 00-.108.084l-.014.016a.637.637 0 00-.076.1c-.003.005-.008.01-.01.016a.57.57 0 00-.052.124l-.007.029a.612.612 0 00-.018.14v1.482c0 .572-.307 1.105-.8 1.393a1.597 1.597 0 01-1.599 0l-1.276-.742a.584.584 0 00-.13-.053l-.028-.008a.62.62 0 00-.133-.018h-.02a.587.587 0 00-.269.074l-.012.004L9.15 10a.596.596 0 00-.296.516v2.966c0 .212.112.409.296.515l2.554 1.483s.008.002.012.005c.04.022.082.04.126.052l.02.004a.57.57 0 00.123.017l.014.002h.006c.054 0 .108-.01.16-.025a.587.587 0 00.13-.054l1.277-.741a1.597 1.597 0 012.398 1.392v1.482c0 .049.007.095.019.14l.007.028a.619.619 0 00.051.125c.004.006.008.01.01.016a.6.6 0 00.076.1l.014.015c.033.032.069.06.108.084.004.002.006.006.011.008l2.554 1.483a.59.59 0 00.593 0l2.554-1.483a.597.597 0 00.296-.516v-2.965a.595.595 0 00-.296-.516l-2.554-1.483s-.008-.002-.012-.005a.54.54 0 00-.126-.051c-.007-.003-.013-.003-.02-.005a.635.635 0 00-.125-.017h-.018a.557.557 0 00-.16.026.588.588 0 00-.13.053l-1.276.742a1.595 1.595 0 01-1.598 0 1.615 1.615 0 010-2.785l-.005-.001z"}),e("path",{d:"M14.848 18.265l-2.554-1.482-.012-.005a.526.526 0 00-.126-.052c-.007-.002-.014-.002-.02-.005a.64.64 0 00-.124-.017h-.02a.56.56 0 00-.16.026.588.588 0 00-.13.053l-1.276.742a1.594 1.594 0 01-1.598 0c-.493-.286-.8-.82-.8-1.393V14.65a.563.563 0 00-.018-.14l-.008-.028a.604.604 0 00-.051-.124l-.01-.017a.603.603 0 00-.076-.1l-.014-.015a.596.596 0 00-.109-.084c-.003-.002-.005-.006-.01-.008L5.178 12.65a.587.587 0 00-.591 0l-2.554 1.483a.596.596 0 00-.297.516v2.965c0 .213.113.41.297.516l2.554 1.483.012.004a.618.618 0 00.267.074l.016.002h.007a.55.55 0 00.16-.026.584.584 0 00.129-.053l1.277-.742a1.597 1.597 0 012.398 1.393v1.482c0 .05.007.095.019.14l.007.028c.013.044.03.085.051.125l.01.016c.022.036.047.07.076.1l.014.015c.032.032.069.06.109.084l.01.008 2.554 1.483a.587.587 0 00.593 0l2.554-1.483a.596.596 0 00.296-.515v-2.966a.596.596 0 00-.296-.516h-.002z"})]}));var _ve=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function _$(t){return Array.from(t.match(_ve)??[])}function FS(t){return _$(t).map((a)=>a.toLowerCase()).join("-")}var VS=(t)=>{let a=ee(),c=`lobe-icons-${FS(t)}-${a}`;return w(()=>({fill:`url(#${c})`,id:c}),[t])},z$=(t,a)=>{let c=ee();return w(()=>Array.from({length:a},(u,f)=>{let m=`lobe-icons-${FS(t)}-${f}-${c}`;return{fill:`url(#${m})`,id:m}}),[t,a,c])};var TA="Gemini";var B$=q(({size:t="1em",style:a,...c})=>{let[u,f,m]=z$(TA,3);return n("svg",{height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:TA}),e("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"#3186FF"}),e("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:u.fill}),e("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:f.fill}),e("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:m.fill}),n("defs",{children:[n("linearGradient",{gradientUnits:"userSpaceOnUse",id:u.id,x1:"7",x2:"11",y1:"15.5",y2:"12",children:[e("stop",{stopColor:"#08B962"}),e("stop",{offset:"1",stopColor:"#08B962",stopOpacity:"0"})]}),n("linearGradient",{gradientUnits:"userSpaceOnUse",id:f.id,x1:"8",x2:"11.5",y1:"5.5",y2:"11",children:[e("stop",{stopColor:"#F94543"}),e("stop",{offset:"1",stopColor:"#F94543",stopOpacity:"0"})]}),n("linearGradient",{gradientUnits:"userSpaceOnUse",id:m.id,x1:"3.5",x2:"17.5",y1:"13.5",y2:"12",children:[e("stop",{stopColor:"#FABC12"}),e("stop",{offset:".46",stopColor:"#FABC12",stopOpacity:"0"})]})]})]})});var F$="Google";var V$=q(({size:t="1em",style:a,...c})=>n("svg",{height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:F$}),e("path",{d:"M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z",fill:"#4285F4"}),e("path",{d:"M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z",fill:"#34A853"}),e("path",{d:"M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z",fill:"#FBBC05"}),e("path",{d:"M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z",fill:"#EB4335"})]}));var U$="Grok";var q$=q(({size:t="1em",style:a,...c})=>n("svg",{fill:"currentColor",fillRule:"evenodd",height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:U$}),e("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})]}));var H$="Kimi";var j$=q(({size:t="1em",style:a,...c})=>n("svg",{fill:"currentColor",fillRule:"evenodd",height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:H$}),e("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),e("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]}));var G$="Meta";var LA=q(({size:t="1em",style:a,...c})=>n("svg",{fill:"currentColor",fillRule:"evenodd",height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:G$}),e("path",{d:"M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z"})]}));var RA="Minimax";var $$=q(({size:t="1em",style:a,...c})=>{let{id:u,fill:f}=VS(RA);return n("svg",{height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:RA}),e("defs",{children:n("linearGradient",{id:u,x1:"0%",x2:"100.182%",y1:"50.057%",y2:"50.057%",children:[e("stop",{offset:"0%",stopColor:"#E2167E"}),e("stop",{offset:"100%",stopColor:"#FE603C"})]})}),e("path",{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z",fill:f,fillRule:"nonzero"})]})});var K$="Mistral";var W$=q(({size:t="1em",style:a,...c})=>n("svg",{fill:"currentColor",fillRule:"evenodd",height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:K$}),e("path",{clipRule:"evenodd",d:"M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z"})]}));var X$="OpenAI";var Y$=q(({size:t="1em",style:a,...c})=>n("svg",{fill:"currentColor",fillRule:"evenodd",height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:X$}),e("path",{d:"M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"})]}));var EA="Qwen";var Q$=q(({size:t="1em",style:a,...c})=>{let{id:u,fill:f}=VS(EA);return n("svg",{height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:EA}),e("path",{d:"M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z",fill:f,fillRule:"nonzero"}),e("defs",{children:n("linearGradient",{id:u,x1:"0%",x2:"100%",y1:"0%",y2:"0%",children:[e("stop",{offset:"0%",stopColor:"#6336E7",stopOpacity:".84"}),e("stop",{offset:"100%",stopColor:"#6F69F7",stopOpacity:".84"})]})})]})});var Z$="XiaomiMiMo";var J$=q(({size:t="1em",style:a,...c})=>n("svg",{fill:"currentColor",fillRule:"evenodd",height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:Z$}),e("path",{d:"M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z"})]}));var eK="Z.ai";var tK=q(({size:t="1em",style:a,...c})=>n("svg",{fill:"currentColor",fillRule:"evenodd",height:t,style:{flex:"none",lineHeight:1,...a},viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg",...c,children:[e("title",{children:eK}),e("path",{d:"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"})]}));function PA(t){let a=t.size??18;return e("svg",{"aria-hidden":"true",fill:"currentColor",height:a,viewBox:"64 135 272 130",width:a,xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M129.274 147.769C157.85 147.769 181.099 171.018 181.099 199.594C181.099 228.17 157.85 251.419 129.274 251.419C100.697 251.419 77.4483 228.17 77.4483 199.594C77.4483 171.018 100.697 147.769 129.274 147.769ZM129.274 135.047C93.6209 135.047 64.7266 163.941 64.7266 199.594C64.7266 235.247 93.6209 264.141 129.274 264.141C164.926 264.141 193.821 235.247 193.821 199.594C193.821 163.941 164.926 135.047 129.274 135.047ZM271.09 135.047C235.437 135.047 206.542 163.941 206.542 199.594C206.542 235.247 235.437 264.141 271.09 264.141C306.742 264.141 335.637 235.247 335.637 199.594C335.637 163.941 306.742 135.047 271.09 135.047Z"})})}var nK=[{pattern:/^claude(?:[-_.\s]|$)/,Icon:L$},{pattern:/^(gpt|chatgpt|openai|o[134])(?:[-_.\s]|$)/,Icon:Y$},{pattern:/^gemini(?:[-_.\s]|$)/,Icon:B$},{pattern:/^deepseek(?:[-_.\s]|$)/,Icon:D$},{pattern:/^(qwen|qwq|qvq)(?:\d|[-_.\s]|$)/,Icon:Q$},{pattern:/^(kimi|moonshot)(?:[-_.\s]|$)|^k\d+(?:\.\d+)*(?:[-_\s]|$)/,Icon:j$},{pattern:/^(glm|chatglm|zai|zhipu)(?:\d|[-_.\s]|$)/,Icon:tK},{pattern:/^(mimo|xiaomi)(?:[-_.\s]|$)/,Icon:J$},{pattern:/^minimax(?:[-_.\s]|$)/,Icon:$$},{pattern:/^muse[-_.\s]spark(?:[-_.\s]|$)/,Icon:LA},{pattern:/^(swe|devin|cognition)(?:[-_.\s]|$)/,Icon:O$},{pattern:/^(composer|cursor)(?:[-_.\s]|$)/,Icon:A$},{pattern:/^(grok|xai)(?:[-_.\s]|$)/,Icon:q$},{pattern:/^(clef|cloudflare)(?:[-_.\s]|$)/,Icon:E$},{pattern:/^(beam|reflection)(?:[-_.\s]|$)/,Icon:PA},{pattern:/^(mistral|mixtral|codestral|devstral|ministral|pixtral|magistral)(?:[-_.\s]|$)/,Icon:W$},{pattern:/^(llama|meta|meta-llama)(?:\d|[-_.\s]|$)/,Icon:LA},{pattern:/^anthropic$/,Icon:I$},{pattern:/^google$/,Icon:V$}];function zve(t){let a=t.toLowerCase(),c=a.indexOf("/"),u=c<0?"":a.slice(0,c),f=c<0?a:a.slice(c+1);return(nK.find(({pattern:p})=>f.split("/").some((g)=>p.test(g)))??nK.find(({pattern:p})=>p.test(u)))?.Icon}function st(t){let a=zve(t.modelID),c=t.size;if(c===void 0)if(t.className?.includes("size-3.5"))c=14;else if(t.className?.includes("size-4"))c=16;else c=18;return e("span",{"aria-hidden":"true",className:d("inline-flex size-6 shrink-0 items-center justify-center text-ink",t.className),children:a?e(a,{size:c}):e(dr,{className:"size-full text-faint"})})}function Gh(t){let[a,c]=r(!1),u=t.variant==="field",f=t.variant==="add",m=u?"w-(--radix-popover-trigger-width) min-w-64 max-h-[min(22rem,var(--radix-popover-content-available-height,22rem))] flex flex-col overflow-hidden":"w-[min(22rem,calc(100vw-2rem))] max-h-[min(22rem,var(--radix-popover-content-available-height,22rem))] flex flex-col overflow-hidden",p=u||f?"bottom":"top",g=t.models.models.find((k)=>k.id===t.value),v=t.value?Wi(t.value,g?.name):"选择模型";return e(Tm,{open:a,onOpenChange:c,align:f?"start":"end",side:p,className:m,trigger:f?n("button",{id:t.id,type:"button",className:"group flex min-h-10 w-full items-center gap-3 rounded-lg text-left text-[13px] text-accent transition-colors hover:text-accent/80 focus-visible:outline-2 focus-visible:outline-accent",children:[e("span",{className:"flex size-5 shrink-0 items-center justify-center rounded-full bg-accent-soft",children:e(we,{className:"size-3.5"})}),"添加模型"]}):u?n("button",{id:t.id,type:"button",className:d(Sv,"group flex h-9.5 items-center gap-2 text-left"),children:[e(st,{modelID:t.value}),e("span",{className:"min-w-0 flex-1 truncate",children:v}),e(ge,{className:"size-4 shrink-0 text-faint transition-transform duration-200 group-data-[state=open]:rotate-180"})]}):e(_S,{icon:e(st,{modelID:t.value,className:"size-4"}),label:v,title:t.value,className:"max-w-44 shrink text-dim",trailing:e(ge,{className:"size-3.5 text-faint transition-transform duration-200 group-data-[state=open]:rotate-180"})}),children:n(md,{loop:!0,children:[e(pd,{placeholder:"搜索模型…",autoFocus:!matchMedia("(pointer: coarse)").matches}),n(hd,{className:"max-h-60 overflow-y-auto overscroll-contain",children:[e(jh,{children:n("div",{className:"flex flex-col items-center justify-center py-4 text-xs text-faint",children:[e("span",{children:"没有匹配的模型"}),t.onConfigure&&n("button",{type:"button",onClick:()=>{c(!1),t.onConfigure?.()},className:"mt-2.5 inline-flex items-center gap-1.5 rounded-lg border border-line bg-raised/70 px-2.5 py-1 text-xs font-medium text-ink transition-colors hover:bg-raised",children:[e(pt,{className:"size-3.5 text-faint"}),"配置模型服务商"]})]})}),QG(t.models.models).map(([k,S])=>e(Xi,{heading:k===u7?"ChatGPT 订阅":k||void 0,children:S.map((I)=>{let T=Wi(I.id,I.name);return e(Po,{value:`${I.id} ${I.name} ${T}`,keywords:[I.name,T],icon:e(st,{modelID:I.id,className:"size-5 rounded"}),onSelect:()=>{t.onChange(I.id),c(!1)},trailing:n("div",{className:"flex items-center gap-1.5",children:[I.contextWindow?e("span",{className:"font-mono text-[10px] text-faint",children:Wt(I.contextWindow)}):null,!f&&e(Z,{className:I.id===t.value?"text-accent!":"opacity-0"})]}),children:T},I.id)})},k))]}),t.onConfigure&&e("div",{className:"border-t border-line/60 p-1",children:n("button",{type:"button",onClick:()=>{c(!1),t.onConfigure?.()},className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-xs text-dim transition-colors hover:bg-raised hover:text-ink",children:[e(pt,{className:"size-3.5 text-faint"}),e("span",{children:"配置模型服务商…"})]})})]})})}var rK=[{value:"off",label:"None"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"XHigh"},{value:"max",label:"Max"}];function US(t){let[a,c]=r(!1),u=t.value==="none"?"off":t.value??"medium",f=rK.find((g)=>g.value===u),m=!u||u==="off",p=f?f.label:"None";return e(Tm,{open:a,onOpenChange:c,align:"end",side:"top",className:"w-32 p-1",trigger:e(_S,{icon:e(Ef,{className:d("size-3.5",m?"text-faint":"text-ink")}),label:p,title:f?`Thinking: ${f.label}`:"Thinking",className:d("shrink-0 text-dim max-sm:px-2.5 max-sm:[&>span]:sr-only",t.className),trailing:e(ge,{className:"size-3.5 text-faint transition-transform duration-200 group-data-[state=open]:rotate-180"})}),children:n("div",{className:"flex flex-col gap-0.5",children:[e("div",{className:"px-2 py-1 text-[11px] font-medium tracking-wider text-faint uppercase",children:"Thinking"}),rK.map((g)=>{let v=(u??"off")===g.value;return n("button",{type:"button",onClick:()=>{t.onChange(g.value),c(!1)},className:d("flex items-center justify-between rounded-md px-2 py-1.5 text-left text-xs transition-colors",v?"bg-raised font-medium text-ink":"text-dim hover:bg-raised/60 hover:text-ink"),children:[e("span",{children:g.label}),v&&e(Z,{className:"size-3.5 shrink-0 text-ink"})]},g.value)})]})})}var Bve={success:"text-success",danger:"text-danger",warning:"text-warning",faint:"text-faint",accent:"text-accent"},AA=new Map;function oK(){AA.clear();for(let t of Ae()){if(!t.notices)continue;for(let[a,c]of Object.entries(t.notices))AA.set(a,c)}}oK();pn(oK);function aK(t){Se();let a=t.notices[0],c=a?AA.get(a.sourceKind):void 0;if(c&&a){let m=c(a,t.text,{taskTitle:t.taskTitle});if(m)return n(nb,{icon:m.icon??Bu,tone:m.tone??"faint",output:m.output,children:[e("span",{className:"shrink-0",children:m.label}),m.title&&e("span",{className:"min-w-0 truncate font-mono text-[11.5px] opacity-80",children:m.title})]})}let u=t.text.split(`
1077
+ `),f=u.slice(1).join(`
1078
+ `).trim();return n(nb,{icon:Bu,tone:"faint",output:f||void 0,children:[e("span",{className:"shrink-0",children:a?`${a.sourceKind}.${a.state}`:"系统通知"}),u[0]&&e("span",{className:"min-w-0 truncate opacity-80",children:u[0]})]})}function MA({entry:t}){let a=t.display?.text??t.kind,c=a.split(`
1079
+ `,1)[0]??"",u;if(t.display?.text){if(a.includes(`
1080
+ `))u=a}else if(t.payload)u=JSON.stringify(t.payload,null,2);let f=t.display?.title?`${t.display.title} · ${c}`:c;return n(nb,{icon:Mt,output:u,children:[e("span",{className:"shrink-0 font-mono text-[11.5px]",title:`插件 ${t.namespace}`,children:t.namespace}),e("span",{className:"min-w-0 truncate opacity-80",title:f,children:f})]})}function nb(t){_();let a=t.icon,c=Boolean(t.output||t.detail);return n(Oe,{role:"status",className:"animate-fade",children:[n($e,{disabled:!c,className:l("chat.timelineRow"),children:[e("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e(a,{className:d("size-3.5",Bve[t.tone??"faint"])})}),t.children,e("span",{className:"flex-1"}),c&&e(tt,{className:"size-3.5 opacity-0 transition-opacity group-hover/collapsible:opacity-100 group-data-[state=open]/collapsible:opacity-100"})]}),t.detail&&!t.output&&e(De,{children:e("div",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-0.5 pl-[15px]",children:t.detail})}),t.output&&e(De,{children:e("pre",{className:"mt-0.5 mb-1.5 ml-2 max-h-60 overflow-auto border-l border-line py-0.5 pl-[15px] font-mono text-[12px] leading-[1.6] break-words whitespace-pre-wrap text-dim",children:t.output})})]})}var Fve={approved:{label:"已允许执行",tone:"success",icon:Z},denied:{label:"已拒绝执行",tone:"danger",icon:Ht},cancelled:{label:"授权已取消",tone:"faint",icon:Fr}};function iK(t){let a=new Map;for(let c of t){if(c.type!=="extension"||c.namespace!==gc)continue;let u=c.payload;if(!u||typeof u!=="object"||!("id"in u)||typeof u.id!=="string")continue;if(c.kind==="requested"&&"command"in u&&typeof u.command==="string"){a.set(u.id,{...u,state:"pending"});continue}let f=a.get(u.id);if(f?.state!=="pending")continue;if(c.kind==="cancelled")f.state="cancelled";else if(c.kind==="answered"){let m=u.approved===!0;f.state=m?"approved":"denied"}}for(let c of a.values())if(c.state==="pending")return c;return}async function Vve(t,a,c,u){await t.request(`/api/sessions/${encodeURIComponent(a)}/shell-approvals/${encodeURIComponent(c)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({approved:u})})}function sK(t,a){return t.trim()===a.trim()}function lK(t){let{approval:a}=t,[c,u]=r(),[f,m]=r(null),p=i(null);o(()=>{p.current?.focus()},[]);let g=async(S)=>{if(c)return;u(S?"approve":"deny"),m(null);try{await Vve(t.conn,t.sessionID,a.id,S)}catch(I){m(I instanceof Error?I.message:String(I)),u(void 0)}},v=(S)=>{if(c||S.nativeEvent.isComposing||S.key!=="Escape")return;S.preventDefault(),g(!1)},k=a.summary??[];return e("div",{ref:p,role:"dialog","aria-label":"危险命令待授权",tabIndex:-1,onKeyDown:v,className:l("surface.dock","animate-rise"),children:n("div",{className:"flex flex-col gap-2.5 px-4 pt-3.5 pb-3",children:[n("div",{className:"flex items-center gap-2",children:[e(Fr,{className:"size-4 shrink-0 text-amber-500"}),e("span",{className:"text-[14.5px] font-medium text-ink",children:"危险命令待授权"})]}),k.length>0&&e("ul",{className:"flex flex-col gap-0.5 text-[13px] text-dim",children:k.map((S)=>n("li",{children:[!sK(S.fragment,a.command)&&e("code",{className:l("markdown.inlineCode","mr-1.5"),children:S.fragment}),e("span",{children:S.reason})]},`${S.fragment}:${S.reason}`))}),e("pre",{className:"max-h-32 overflow-auto rounded-lg border border-line/60 bg-raised/40 px-3 py-2 font-mono text-xs leading-5 break-all whitespace-pre-wrap text-ink",children:e("code",{children:a.command})}),f&&e("div",{role:"alert",className:"text-xs text-red-500",children:f}),n("div",{className:"flex items-center justify-between gap-3",children:[n("span",{className:"hidden items-center gap-1 text-[11.5px] text-faint select-none sm:inline-flex",children:[e("kbd",{className:l("control.kbd","font-mono text-[10px] text-dim"),children:"Esc"}),e("span",{children:"拒绝"})]}),n("div",{className:"ml-auto flex items-center gap-2",children:[e(b,{variant:"secondary",size:"sm",loading:c==="deny",disabled:Boolean(c),onClick:()=>g(!1),children:"拒绝"}),e(b,{variant:"danger",size:"sm",loading:c==="approve",disabled:Boolean(c),onClick:()=>g(!0),children:"允许执行"})]})]})]})})}function cK(t){let a=t.entry.payload;if(!a||typeof a.id!=="string")return null;let c=a.state??"pending";if(c==="pending")return null;let u=Fve[c],f=a.command.split(`
1081
+ `,1)[0]??a.command,m=(a.summary??[]).map((g)=>sK(g.fragment,a.command)?g.reason:`${g.fragment} ${g.reason}`);if(a.command.includes(`
1082
+ `))m.push("",a.command);let p=m.join(`
1083
+ `).trim();return n(nb,{icon:u.icon,tone:u.tone,output:p||void 0,children:[e("span",{className:"shrink-0",children:u.label}),e("span",{className:"min-w-0 truncate font-mono text-[11.5px] opacity-80",title:f,children:f})]})}function DA(t){_();let a=t.todos.filter((f)=>f.status==="completed").length,c=a<t.todos.length,u=t.todos.length>0&&(c||t.busy);return e(de,{initial:!1,children:u&&e(H.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:0.3,ease:[0.22,1,0.36,1]},className:"relative overflow-hidden",children:e(Uve,{todos:t.todos,done:a,className:t.className})})})}function Uve(t){_();let[a,c]=r(!1),u=t.todos.find((g)=>g.status==="in_progress"),f=t.todos.length,m=u?u.content:"待办",p=(g)=>String(g).padStart(2,"0");return n(Oe,{open:a,onOpenChange:c,className:t.className,children:[n($e,{className:"group/collapsible flex w-full items-center gap-2.5 px-4 pt-3 pb-1 text-left text-[13px] text-dim transition-colors hover:text-ink",children:[e(qve,{value:f>0?t.done/f:0}),e("span",{className:"relative min-w-0 flex-1 overflow-hidden",children:e(de,{mode:"popLayout",initial:!1,children:e(H.span,{initial:{y:"100%",opacity:0},animate:{y:0,opacity:1},exit:{y:"-100%",opacity:0},transition:{duration:0.32,ease:[0.22,1,0.36,1]},className:d("block truncate",u&&"shimmer-text"),children:m},m)})}),n("span",{className:"shrink-0 font-mono text-[11px] tracking-wider text-faint tabular-nums",children:[p(t.done)," / ",p(f)]}),e(tt,{className:"-rotate-90 size-3.5 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),e(De,{children:e("ol",{className:"mx-4 mt-2 max-h-52 overflow-y-auto pb-1 text-[13px]",children:t.todos.map((g,v)=>{let k=v===t.todos.length-1;return n("li",{className:"relative flex items-start gap-3 pb-2.5 last:pb-0",children:[!k&&e("span",{"aria-hidden":!0,className:d("absolute top-5 bottom-0.5 left-[7.5px] w-px transition-colors duration-500",g.status==="completed"?"bg-accent/60":"bg-line")}),e(Hve,{status:g.status}),e("span",{className:d("leading-5 transition-colors duration-300",g.status==="completed"&&"text-faint line-through decoration-faint/60",g.status==="in_progress"&&"font-medium text-ink",g.status==="pending"&&"text-dim"),children:g.content})]},v)})})})]})}function qve(t){let c=2*Math.PI*5.5;return n("svg",{"aria-hidden":!0,viewBox:"0 0 16 16",className:"size-4 shrink-0 -rotate-90",children:[e("circle",{cx:"8",cy:"8",r:5.5,fill:"none",strokeWidth:"2",className:"stroke-line-strong"}),e("circle",{cx:"8",cy:"8",r:5.5,fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:c,strokeDashoffset:c*(1-t.value),className:"stroke-accent transition-[stroke-dashoffset] duration-700 ease-out-quint"})]})}function Hve(t){if(t.status==="in_progress")return e("span",{className:"mt-0.5 size-4 shrink-0 animate-spin rounded-full border-2 border-accent/20 border-t-accent bg-panel"});return e("span",{className:d("relative mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border bg-panel transition-colors duration-300",t.status==="completed"&&"border-accent bg-accent text-panel",t.status==="pending"&&"border-line-strong"),children:t.status==="completed"&&e(Z,{className:"size-2.5 animate-pop",strokeWidth:3.5})})}function uK(t){let{conn:a,session:c,busy:u,ready:f,plugins:m,entries:p}=t,g=c.parentID,[v,k]=r(null),[S,I]=r(null),T=g?v===c.id?!0:S===c.id?!1:DS(c.id).text.trim().length>0:!1,L=()=>{if(T)I(c.id),k(null);else k(c.id),I(null)};if(c.archivedAt!==null)return e("div",{className:"shrink-0 px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] sm:px-8",children:e("div",{className:"mx-auto max-w-3xl",children:t.archived})});let R=g?void 0:iK(p);return e("div",{style:{visibility:f?"visible":"hidden"},className:"shrink-0 px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] sm:px-8",children:n("div",{className:"mx-auto max-w-3xl",children:[(R||g)&&e(DA,{todos:c.todos,busy:u,className:l("surface.panel","mb-2")}),R?e(lK,{conn:a,sessionID:c.id,approval:R},R.id):g?n("div",{className:"space-y-2",children:[e(Ol,{name:"chat:child",connection:a,sessionID:c.id,session:c,plugins:m,context:{parentID:g,childID:c.id,busy:u,model:c.model,modelName:Wi(c.model,t.currentModel?.name),expanded:T,onToggleExpand:L,onOpen:t.onOpen}}),e(de,{initial:!1,children:T&&e(H.div,{initial:{opacity:0,y:10,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:8,height:0},transition:{duration:0.28,ease:[0.22,1,0.36,1]},className:"-m-1 overflow-hidden p-1",children:e(dd,{conn:a,sessionID:c.id,session:c,sessionUpdated:c.updated,entriesLength:t.entriesLength,plugins:m,onInspectContext:t.onInspectContext,draftKey:c.id,placeholder:"向子任务发送补充要求…",busy:u,autoFocus:!0,onSend:async(A)=>{t.onScrollToBottom(),await a.request(`/api/sessions/${encodeURIComponent(g)}/tasks/${encodeURIComponent(c.id)}/send`,{method:"POST",body:JSON.stringify({message:A,callID:Vr()})}),I(c.id),k(null)},onAbort:()=>a.abort(c.id).catch((A)=>V(A,"停止失败"))})},"child-composer")})]}):e(Ol,{name:"chat:dock",connection:a,sessionID:c.id,session:c,plugins:m,context:{entries:p},children:e(dd,{conn:a,sessionID:c.id,session:c,sessionUpdated:c.updated,entriesLength:t.entriesLength,plugins:m,onInspectContext:t.onInspectContext,draftKey:c.id,placeholder:u?"引导模型…":"回复…",busy:u,commands:t.commands,header:e(DA,{todos:c.todos,busy:u}),autoFocus:f&&!matchMedia("(pointer: coarse)").matches,onSend:(A,E)=>{if(t.onScrollToBottom(),u)return a.steer(c.id,A,E);return a.prompt(c.id,A,E)},onAbort:()=>a.abort(c.id).catch((A)=>V(A,"停止失败")),aside:t.models&&n("div",{className:"flex min-w-0 items-center gap-1",children:[e(Gh,{models:t.models,value:c.model,onChange:(A)=>{a.setSessionModel(c.id,A).catch((E)=>V(E,"修改模型失败"))},onConfigure:t.onConfigureModels}),e(US,{value:c.thinking,levels:t.currentModel?.thinkingLevels,onChange:(A)=>{a.setSessionThinking(c.id,A).catch((E)=>V(E,"修改思考强度失败"))}})]})})})]})})}var rb=new Map;function dK(t,a,c){let u=i(null),f=i(null),m=i(null),p=i(null),g=rb.get(t),[v,k]=r(()=>g?g.atBottom:!0),S=i(g?g.atBottom:!0),[I,T]=r(!1),L=i(!1),R=y(()=>{let E=f.current;if(!E)return;E.scrollTo({top:E.scrollHeight,behavior:"instant"}),S.current=!0,k(!0)},[]),A=y(()=>{S.current=!1,k(!1)},[]);return K(()=>{let E=f.current,P=m.current,D=u.current;if(!E||!P||!D||!c){L.current=!1,T(!1);return}let N=rb.get(t),O=E.scrollTop,F=0,z=!1,B,U,Y=(Re)=>{let Ne=Re?"true":"false";if(E.dataset.scrollbarActive!==Ne)E.dataset.scrollbarActive=Ne},G="",ce=null,re=(Re)=>{let Ne=p.current;if(!Ne)return;let ut=Re?Fk(Re.client,Re.scroll,Re.top):Fk(E.clientHeight,E.scrollHeight,E.scrollTop),kt=ut.scrollable?`${ut.size}|${ut.offset}`:"off";if(kt===G&&Ne===ce)return;if(G=kt,ce=Ne,!ut.scrollable){Ne.dataset.scrollable="false";return}Ne.dataset.scrollable="true",Ne.style.setProperty("--chat-scrollbar-thumb-size",`${ut.size}px`),Ne.style.setProperty("--chat-scrollbar-thumb-offset",`${ut.offset}px`),Ne.style.setProperty("--minimal-scrollbar-thumb-size",`${ut.size}px`),Ne.style.setProperty("--minimal-scrollbar-thumb-offset",`${ut.offset}px`)},Q=(Re)=>{if(Re.pointerType!=="mouse")return!1;let Ne=E.getBoundingClientRect();return Re.clientY>=Ne.top&&Re.clientY<=Ne.bottom&&Re.clientX>=Ne.right-Iv&&Re.clientX<=Ne.right+Iv},ae=(Re)=>{Y(Q(Re))},xe=(Re)=>{Y(z||Q(Re))},Te=()=>{if(!z)Y(!1)},me=()=>{let{scrollHeight:Re,clientHeight:Ne}=E,ut=Math.max(0,Re-Ne);if(Math.abs(E.scrollTop-ut)>0.5)E.scrollTop=ut,O=ut;else O=E.scrollTop;return{client:Ne,scroll:Re,top:ut}},Ce=()=>{if(S.current)S.current=!1,k(!1);O=E.scrollTop,rb.set(t,{top:E.scrollTop,atBottom:!1})},Be=(Re)=>{if(Re.deltaY<-1){if(F=performance.now()+350,L.current&&S.current&&E.scrollHeight>E.clientHeight)Ce()}else if(Re.deltaY>1)F=0},X=(Re)=>{if(Re.pointerType!=="mouse")return;if(E.offsetWidth-E.clientWidth>0&&Re.offsetX>=E.clientWidth)z=!0,Y(!0)},He=(Re)=>{z=!1,Y(Q(Re))},Le=(Re)=>{B=Re.touches[0]?.clientY},J=(Re)=>{let Ne=Re.touches[0]?.clientY;if(B!==void 0&&Ne!==void 0){if(Ne>B+1){if(F=performance.now()+350,L.current&&S.current&&E.scrollHeight>E.clientHeight)Ce()}else if(Ne<B-1)F=0}B=Ne},Me=(Re)=>{let Ne=Re.target;if(Ne?.tagName==="INPUT"||Ne?.tagName==="TEXTAREA"||Ne?.isContentEditable||Ne?.closest("[contenteditable='true']"))return;if(["PageUp","Home","ArrowUp"].includes(Re.key)){if(F=performance.now()+350,L.current&&S.current&&E.scrollHeight>E.clientHeight)Ce()}else if(["PageDown","End","ArrowDown"," "].includes(Re.key))F=0},Ie=()=>{if(re(),!L.current)return;let Re=12,ut=E.scrollHeight-E.clientHeight-E.scrollTop<=Re;if(z){if(E.scrollTop<O-1){F=performance.now()+350,Ce();return}if(ut)F=0}if(ut){if(performance.now()<F)return;if(F=0,!S.current)S.current=!0,k(!0);O=E.scrollTop,rb.set(t,{top:E.scrollTop,atBottom:!0});return}if(S.current&&!z&&performance.now()>=F){me();return}Ce()},qe=()=>{if(L.current){re(S.current?me():void 0);return}if(N&&!N.atBottom){let Re=Math.max(0,E.scrollHeight-E.clientHeight);E.scrollTop=Math.min(N.top,Re),S.current=!1,k(!1)}else me(),S.current=!0,k(!0);O=E.scrollTop,L.current=!0,re(),U?.disconnect(),E.style.visibility="visible",T(!0)};qe(),E.addEventListener("scroll",Ie,{passive:!0}),E.addEventListener("wheel",Be,{passive:!0}),E.addEventListener("pointerenter",ae,{passive:!0}),E.addEventListener("pointermove",xe,{passive:!0}),E.addEventListener("pointerleave",Te,{passive:!0}),E.addEventListener("pointerdown",X,{passive:!0}),window.addEventListener("pointerup",He,{passive:!0}),window.addEventListener("pointercancel",He,{passive:!0}),E.addEventListener("touchstart",Le,{passive:!0}),E.addEventListener("touchmove",J,{passive:!0}),window.addEventListener("keydown",Me,{passive:!0}),D.addEventListener("load",qe,!0),D.addEventListener("error",qe,!0),document.fonts.addEventListener("loadingdone",qe),document.fonts.addEventListener("loadingerror",qe);let Qe=new ResizeObserver(qe);if(Qe.observe(P),Qe.observe(E),!L.current)U=new MutationObserver(qe),U.observe(D,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-render-pending"]});return()=>{if(L.current)rb.set(t,{top:E.scrollTop,atBottom:S.current});E.removeEventListener("scroll",Ie),E.removeEventListener("wheel",Be),E.removeEventListener("pointerenter",ae),E.removeEventListener("pointermove",xe),E.removeEventListener("pointerleave",Te),E.removeEventListener("pointerdown",X),window.removeEventListener("pointerup",He),window.removeEventListener("pointercancel",He),E.removeEventListener("touchstart",Le),E.removeEventListener("touchmove",J),window.removeEventListener("keydown",Me),D.removeEventListener("load",qe,!0),D.removeEventListener("error",qe,!0),document.fonts.removeEventListener("loadingdone",qe),document.fonts.removeEventListener("loadingerror",qe),delete E.dataset.scrollbarActive,Qe.disconnect(),U?.disconnect()}},[t,c]),K(()=>{let E=f.current;if(E&&L.current&&S.current)E.scrollTo({top:E.scrollHeight,behavior:"instant"})},[a]),{containerRef:u,scrollRef:f,contentRef:m,scrollbarRef:p,isAtBottom:v,scrollToBottom:R,release:A,ready:I}}function mt(t,a=Date.now()){let c=t-a,u=Math.abs(c),f=c<0?"前":"后";if(u<60000)return c<0?"刚刚":"马上";if(u<3600000)return`${Math.round(u/60000)} 分钟${f}`;if(u<86400000)return`${Math.round(u/3600000)} 小时${f}`;return new Date(t).toLocaleString("zh-CN",{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})}function fK(t,a=new Date){let c=new Date(a.getFullYear(),a.getMonth(),a.getDate()).getTime();if(t>=c)return"今天";if(t>=c-86400000)return"昨天";if(t>=c-604800000)return"7 天内";if(t>=c-2592000000)return"30 天内";return"更早"}function qS(t){if(t<100)return"<0.1s";if(t<60000)return`${(Math.round(t/100)/10).toFixed(1)}s`;let a=Math.floor(t/60000),c=Math.floor(t%60000/1000);return`${a}m ${c}s`}function mK({activity:t}){_();let[a,c]=r(Date.now);o(()=>{if(!t.refreshMs||t.refreshMs<1000)return;let f=setInterval(()=>c(Date.now()),t.refreshMs);return()=>clearInterval(f)},[t.refreshMs]);let u=t.icon??c0;return n("section",{"aria-label":t.title,className:"group/bg -mx-2 rounded-xl p-2.5 text-xs text-dim transition-colors hover:bg-raised/40",children:[n("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e("span",{className:"flex size-5 shrink-0 items-center justify-center rounded-md bg-raised text-faint",children:e(u,{"aria-hidden":!0,className:"size-3.5"})}),e("span",{className:"font-medium text-ink",children:t.title}),e(it,{tone:t.status.tone,pulse:t.status.pulse,children:t.status.label}),t.dueAt!==void 0&&e("time",{dateTime:new Date(t.dueAt).toISOString(),title:new Date(t.dueAt).toLocaleString("zh-CN"),className:"text-[11.5px] text-faint tabular-nums ml-auto",children:mt(t.dueAt,a)})]}),n("div",{className:"mt-2 ml-2.5 min-w-0 space-y-1.5 border-l border-line/70 pl-3.5",children:[e("p",{className:"break-words whitespace-pre-wrap leading-relaxed text-dim/90 [overflow-wrap:anywhere]",children:t.monospace?e("code",{className:"rounded bg-raised/80 px-1 py-0.5 font-mono text-[11px] text-ink",children:t.text}):t.text}),t.output&&e("pre",{className:l("surface.subtle","max-h-36 overflow-auto p-2 whitespace-pre-wrap break-words font-mono text-[11px] leading-relaxed text-ink/90 [overflow-wrap:anywhere]"),children:t.output}),t.truncated&&e("p",{className:"text-[11px] text-faint",children:"仅显示最近输出"}),t.discarded&&n("p",{className:"break-words text-[11px] text-faint",children:["通知未投递 · ",t.discarded]})]})]})}function pK(t){return t===42||t===96||t===126||t===95||t===36||t===92||t===91||t===93||t===40||t===41}function hK(t,a){let u=t.slice(0,a).split(`
1084
+ `),f;for(let m of u){let p=/^[ \t]{0,3}(`{3,}|~{3,})(.*)$/.exec(m);if(!p)continue;let g=p[1]??"",v=g[0]??"",k=g.length,S=(p[2]??"").trim();if(f){if(v===f.char&&k>=f.length&&S==="")f=void 0}else if(v!=="`"||!S.includes("`"))f={char:v,length:k}}return f!==void 0}function ob(t,a,c){let u=Math.max(0,Math.min(t.length,Math.floor(a)));if(u===0)return 0;if(!c&&u>=t.length)return t.length;if(u<t.length){let v=t.charCodeAt(u-1);if(v>=55296&&v<=56319)u=Math.min(t.length,u+1);let k=0;while(u>0&&u<t.length&&k<4&&pK(t.charCodeAt(u-1))&&pK(t.charCodeAt(u)))u+=1,k+=1}let f=u>0&&t.charCodeAt(u-1)===10?u-1:u,m=f>0?t.lastIndexOf(`
1085
+ `,f-1)+1:0,p=t.slice(m,f);if(/^[ \t]{0,3}(`{3,}|~{3,})[^\n]*$/.test(p)){let v=t.indexOf(`
1086
+ `,m);if(hK(t,m)){if(v!==-1&&v-m<=48)return v+1;if(c&&m>0)return m}else{if(v!==-1&&v-m<=48){if(!c||v+1<t.length)return Math.min(t.length,Math.max(u,v+2))}if(c&&m>0)return m}}if(u>=t.length)return t.length;let g=p.lastIndexOf("](");if(g!==-1&&!p.slice(g+2).includes(")")){let v=t.indexOf(")",u),k=t.indexOf(`
1087
+ `,u);if(v!==-1&&(k===-1||v<k)&&v-u<=160)return v+1}return u}function jve(t,a,c,u,f=0){if(a>=t.length){let T=ob(t,t.length,u);return{nextPos:t.length,cursor:T,velocity:0}}let p=Math.min(48,Math.max(8,c))/16.67,g=t.length-a,v=hK(t,a),k;if(!u){let T=Math.max(3.6,g*0.34);k=Math.max(f,T)}else{let T=v?0.22:0.125,L=v?1.6:0.55,R=g>64?(g-64)*0.18:0,A=Math.max(L,g*T+R);if(f<=0)k=Math.min(A,v?3.2:2.2);else{let E=Math.min(1,0.32*p);k=f+(A-f)*E}}let S=Math.min(t.length,a+k*p),I=ob(t,S,u);return{nextPos:Math.max(S,I),cursor:I,velocity:k}}function Gve(){if(typeof window>"u"||typeof requestAnimationFrame!=="function")return!1;return!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}function HS(t,a,c=a){let u=Gve(),f=i(u&&c);if(u&&a)f.current=!0;let m=u&&c&&t.length<=96?ob(t,2,a):t.length,p=i(m),g=i(0),v=i(m),k=i(t),S=i(a),I=i(0),T=i(0),[L,R]=r(m);if(k.current=t,S.current=a,!u||!f.current)p.current=t.length,g.current=0,v.current=t.length;else if(t.length<p.current)p.current=t.length,g.current=0,v.current=t.length;if(o(()=>{if(!u||!f.current)return;if(!a&&p.current>=t.length){let D=ob(t,t.length,!1);if(v.current!==D)v.current=D,R(D);g.current=0,f.current=!1;return}if(I.current!==0)return;T.current=performance.now();let P=(D)=>{I.current=0;let N=k.current,O=S.current,F=D-T.current;if(T.current=D,p.current<N.length){let z=jve(N,p.current,F,O,g.current);if(p.current=z.nextPos,g.current=z.velocity,z.cursor!==v.current)v.current=z.cursor,R(z.cursor)}else if(!O){let z=ob(N,N.length,!1);if(v.current!==z)v.current=z,R(z);g.current=0,f.current=!1;return}else g.current*=0.82;if(O||p.current<N.length)I.current=requestAnimationFrame(P);else f.current=!1};I.current=requestAnimationFrame(P)},[u,t,a]),o(()=>()=>{if(I.current!==0)cancelAnimationFrame(I.current),I.current=0},[]),!u||!f.current)return{text:t,streaming:!1};let A=Math.min(L,t.length),E=a||A<t.length;return{text:A<t.length?t.slice(0,A):t,streaming:E}}function ba(t){let a=(t.tone??"info")==="danger",c=a?be:Bu;return n("div",{role:a?"alert":void 0,className:l("callout.base",l(a?"callout.danger":"callout.info"),t.className),children:[e(c,{className:"mt-px size-4 shrink-0"}),e("div",{className:"min-w-0 flex-1 break-words",children:t.children}),t.action]})}var $ve=720,vK=6000,Kve=1100,gK=(t)=>new Promise((a)=>setTimeout(a,t)),xK=()=>new Promise((t)=>requestAnimationFrame(t));function Wve(t){let a=new Date(t.time??Date.now()).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"});return e("div",{ref:(c)=>{if(c)t.onMount(c)},style:{width:$ve},className:"bg-bg bg-[radial-gradient(90%_60%_at_0%_0%,var(--color-accent-soft),transparent_70%),radial-gradient(80%_60%_at_100%_100%,var(--color-accent-soft),transparent_70%)] p-9",children:n("div",{className:"rounded-[22px] border border-line bg-panel px-9 pt-6 pb-5 shadow-[0_1px_2px_oklch(0_0_0/0.04),0_12px_32px_-12px_oklch(0_0_0/0.18)]",children:[n("header",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 border-b border-line/70 pb-4 text-[12.5px]",children:[t.model?n("span",{className:"flex shrink-0 items-center gap-2 font-medium text-dim",children:[e(st,{modelID:t.model,className:"size-4 rounded-xs",size:16}),e("span",{className:"whitespace-nowrap",children:Wi(t.model)})]}):e("span",{}),e("time",{className:"ml-auto shrink-0 text-faint tabular-nums",children:a})]}),e("div",{className:d("py-5 font-serif text-[15px] leading-[1.78] tracking-[0.005em] break-words text-ink/84 [font-optical-sizing:auto]","[&_pre]:break-words [&_pre]:whitespace-pre-wrap","[&_span.font-mono]:whitespace-nowrap","[&_div:has(>table)]:overflow-visible [&_table]:table-fixed [&_td]:break-words [&_th]:break-words","[&_td_code]:break-all [&_th_code]:break-all"),children:t.fragment?e("div",{ref:(c)=>{if(!c||!t.fragment)return;c.replaceChildren(t.fragment.cloneNode(!0)),Xve(c)}}):e(fi,{text:t.text})}),n("footer",{className:"flex items-center gap-2 border-t border-line/70 pt-4 text-[12px] text-faint",children:[e(Aa,{className:"size-4"}),e("span",{className:"font-medium tracking-wide",children:"Basalt"})]})]})})}function Xve(t){for(let a of t.querySelectorAll("svg[width][height]:not([viewBox])")){let c=Number.parseFloat(a.getAttribute("width")??""),u=Number.parseFloat(a.getAttribute("height")??"");if(!(c>0&&u>0))continue;if(a.setAttribute("viewBox",`0 0 ${c} ${u}`),a.removeAttribute("height"),a.setAttribute("width","100%"),a instanceof SVGElement)a.style.position="static";let f=a.parentElement;if(!f)continue;if(f.style.width="100%",f.style.height="auto",f.parentElement)f.parentElement.style.height="auto"}}async function Yve(t){await document.fonts.ready;let a=Date.now()+vK;while(t.querySelector('[data-render-pending="true"]')&&Date.now()<a)await gK(50);if(await Promise.all([...t.querySelectorAll("img")].map((c)=>(c.loading="eager",c.decode().catch(()=>{return})))),t.querySelector("canvas"))await gK(Kve);await xK(),await xK()}function Qve(t){return!(t instanceof Element&&t.matches("button[aria-label], [role=tablist], [role=toolbar]"))}async function Zve(t){let a=document.createElement("div");a.setAttribute("aria-hidden","true"),a.style.cssText="position:fixed;left:-100000px;top:0;pointer-events:none;",document.body.append(a);let c=()=>{return},u=lx(a,{onUncaughtError:(f)=>c(f)});try{let f=await new Promise((g,v)=>{c=v,setTimeout(()=>v(Error("回复卡片渲染超时")),vK),u.render(e(kv,{children:e(Je,{value:Yi,children:e(Wve,{...t,onMount:g})})}))});await Yve(f);let{domToBlob:m}=await (C("bvyjy17t"),import("./chunk-bvyjy17t.js")),p=await m(f,{scale:Math.min(3,Math.max(2,window.devicePixelRatio)),type:"image/png",filter:Qve});if(!p)throw Error("生成图片失败");return p}finally{u.unmount(),a.remove()}}function Jve(t){let a=URL.createObjectURL(t),c=document.createElement("a");c.href=a,c.download=`basalt-reply-${new Date().toISOString().replace(/[:.]/g,"-")}.png`,c.click(),setTimeout(()=>URL.revokeObjectURL(a),1e4)}async function ebe(t){let a=Zve(t);if(typeof ClipboardItem<"u"&&navigator.clipboard?.write)try{return await navigator.clipboard.write([new ClipboardItem({"image/png":a})]),"copied"}catch{}return Jve(await a),"downloaded"}function jS(t){let[a,c]=r("idle"),u=i(void 0);return o(()=>()=>clearTimeout(u.current),[]),e(j,{label:a==="done"?"已复制图片":a==="busy"?"正在生成图片…":"复制为图片",size:"icon",className:d("text-faint",t.className),disabled:a==="busy",onClick:()=>{c("busy"),ebe({text:t.text(),fragment:t.fragment,model:t.model,time:t.time}).then((f)=>{if(f==="downloaded")le.success("浏览器不支持复制图片,已下载 PNG");c("done"),clearTimeout(u.current),u.current=setTimeout(()=>c("idle"),1500)},(f)=>{c("idle"),V(f,"复制图片失败")})},children:e(de,{mode:"popLayout",initial:!1,children:e(H.span,{initial:{opacity:0,scale:0.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0.5},transition:Is,className:"flex",children:a==="done"?e(Z,{className:"size-4 text-success"}):a==="busy"?e(ie,{className:"size-[15px] animate-spin"}):e(Df,{className:"size-[15px]"})},a)})})}class GS{diff(t,a,c={}){let u;if(typeof c==="function")u=c,c={};else if("callback"in c)u=c.callback;let f=this.castInput(t,c),m=this.castInput(a,c),p=this.removeEmpty(this.tokenize(f,c)),g=this.removeEmpty(this.tokenize(m,c));return this.diffWithOptionsObj(p,g,c,u)}diffWithOptionsObj(t,a,c,u){var f;let m=(P)=>{if(P=this.postProcess(P,c),u){setTimeout(function(){u(P)},0);return}else return P},p=a.length,g=t.length,v=1,k=p+g;if(c.maxEditLength!=null)k=Math.min(k,c.maxEditLength);let S=(f=c.timeout)!==null&&f!==void 0?f:1/0,I=Date.now()+S,T=[{oldPos:-1,lastComponent:void 0}],L=this.extractCommon(T[0],a,t,0,c);if(T[0].oldPos+1>=g&&L+1>=p)return m(this.buildValues(T[0].lastComponent,a,t));let R=-1/0,A=1/0,E=()=>{for(let P=Math.max(R,-v);P<=Math.min(A,v);P+=2){let D,N=T[P-1],O=T[P+1];if(N)T[P-1]=void 0;let F=!1;if(O){let B=O.oldPos-P;F=O&&0<=B&&B<p}let z=N&&N.oldPos+1<g;if(!F&&!z){T[P]=void 0;continue}if(!z||F&&N.oldPos<O.oldPos)D=this.addToPath(O,!0,!1,0,c);else D=this.addToPath(N,!1,!0,1,c);if(L=this.extractCommon(D,a,t,P,c),D.oldPos+1>=g&&L+1>=p)return m(this.buildValues(D.lastComponent,a,t))||!0;else{if(T[P]=D,D.oldPos+1>=g)A=Math.min(A,P-1);if(L+1>=p)R=Math.max(R,P+1)}}v++};if(u)(function P(){setTimeout(function(){if(v>k||Date.now()>I)return u(void 0);if(!E())P()},0)})();else while(v<=k&&Date.now()<=I){let P=E();if(P)return P}}addToPath(t,a,c,u,f){let m=t.lastComponent;if(m&&!f.oneChangePerToken&&m.added===a&&m.removed===c)return{oldPos:t.oldPos+u,lastComponent:{count:m.count+1,added:a,removed:c,previousComponent:m.previousComponent}};else return{oldPos:t.oldPos+u,lastComponent:{count:1,added:a,removed:c,previousComponent:m}}}extractCommon(t,a,c,u,f){let m=a.length,p=c.length,g=t.oldPos,v=g-u,k=0;while(v+1<m&&g+1<p&&this.equals(c[g+1],a[v+1],f))if(v++,g++,k++,f.oneChangePerToken)t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1};if(k&&!f.oneChangePerToken)t.lastComponent={count:k,previousComponent:t.lastComponent,added:!1,removed:!1};return t.oldPos=g,v}equals(t,a,c){if(c.comparator)return c.comparator(t,a);else return t===a||!!c.ignoreCase&&t.toLowerCase()===a.toLowerCase()}removeEmpty(t){let a=[];for(let c=0;c<t.length;c++)if(t[c])a.push(t[c]);return a}castInput(t,a){return t}tokenize(t,a){return Array.from(t)}join(t){return t.join("")}postProcess(t,a){return t}get useLongestToken(){return!1}buildValues(t,a,c){let u=[],f;while(t)u.push(t),f=t.previousComponent,delete t.previousComponent,t=f;u.reverse();let m=u.length,p=0,g=0,v=0;for(;p<m;p++){let k=u[p];if(!k.removed){if(!k.added&&this.useLongestToken){let S=a.slice(g,g+k.count);S=S.map(function(I,T){let L=c[v+T];return L.length>I.length?L:I}),k.value=this.join(S)}else k.value=this.join(a.slice(g,g+k.count));if(g+=k.count,!k.added)v+=k.count}else k.value=this.join(c.slice(v,v+k.count)),v+=k.count}return u}}class bK extends GS{constructor(){super(...arguments);this.tokenize=tbe}equals(t,a,c){if(c.ignoreWhitespace){if(!c.newlineIsToken||!t.includes(`
1088
+ `))t=t.trim();if(!c.newlineIsToken||!a.includes(`
1089
+ `))a=a.trim()}else if(c.ignoreNewlineAtEof&&!c.newlineIsToken){if(t.endsWith(`
1090
+ `))t=t.slice(0,-1);if(a.endsWith(`
1091
+ `))a=a.slice(0,-1)}return super.equals(t,a,c)}}var yK=new bK;function NA(t,a,c){return yK.diff(t,a,c)}function tbe(t,a){if(a.stripTrailingCr)t=t.replace(/\r\n/g,`
1092
+ `);let c=[],u=t.split(/(\n|\r\n)/);if(!u[u.length-1])u.pop();for(let f=0;f<u.length;f++){let m=u[f];if(f%2&&!a.newlineIsToken)c[c.length-1]+=m;else c.push(m)}return c}function $S(t,a){let c=[],u=0,f=0;for(let m of NA(t,a)){let p=" ";if(m.added)p="+";else if(m.removed)p="-";let g=m.value.replace(/\n$/,"").split(`
1093
+ `);if(p==="+")u+=g.length;else if(p==="-")f+=g.length;for(let v of g)c.push({sign:p,text:v})}return{lines:c,added:u,removed:f}}function wK(t){return n("span",{className:d("shrink-0 font-mono text-[11.5px] tabular-nums",t.className),children:[t.added>0&&n("span",{className:"text-success",children:["+",t.added]}),t.added>0&&t.removed>0&&" ",t.removed>0&&n("span",{className:"text-danger",children:["−",t.removed]})]})}function nbe(t){if(t==="+")return"+";if(t==="-")return"−";return""}function OA(t){_();let{lines:a}=w(()=>$S(t.before,t.after),[t.before,t.after]);return e("div",{className:d("overflow-auto py-1.5 font-mono text-[12px] leading-[1.6]",t.className),children:e("div",{className:"min-w-fit",children:a.map((c,u)=>n("div",{className:d("flex pr-4 whitespace-pre",c.sign==="-"&&l("chat.diffRemove"),c.sign==="+"&&l("chat.diffAdd"),c.sign===" "&&"text-faint"),children:[e("span",{"aria-hidden":!0,className:"w-7 shrink-0 text-center opacity-70 select-none",children:nbe(c.sign)}),e("span",{children:c.text||" "})]},u))})})}function zl(t){switch(t.kind){case"archive":return t.projectID?`/archive?project=${encodeURIComponent(t.projectID)}`:"/archive";case"session":{let a=`/session/${encodeURIComponent(t.id)}`;if(!t.target)return a;let c=new URLSearchParams({seq:String(t.target.seq)});if(t.target.q)c.set("q",t.target.q);return`${a}?${c}`}case"page":{let a=Ae().find((c)=>c.id===t.pluginID)?.pageNav;if(a?.path&&(!t.viewID||a.viewID===t.viewID))return a.path;return`/p/${encodeURIComponent(t.pluginID)}${t.viewID?`/${encodeURIComponent(t.viewID)}`:""}`}case"settings":return t.tab?`/settings/${encodeURIComponent(t.tab)}`:"/settings";case"new":return t.projectID?`/?project=${encodeURIComponent(t.projectID)}`:"/"}}function gd(t,a,c){return{kind:"session",id:t,target:c?{seq:a,q:c}:{seq:a}}}function ab(t,a="",c=Ae()){let u=t.replace(/\/+$/,"")||"/";if(u==="/archive")return{kind:"archive",projectID:new URLSearchParams(a).get("project")??void 0};let f=/^\/session\/([^/]+)$/.exec(u);if(f?.[1]){let g=decodeURIComponent(f[1]),v=new URLSearchParams(a),k=Number(v.get("seq"));if(!v.has("seq")||!Number.isSafeInteger(k)||k<1)return{kind:"session",id:g};let S=v.get("q");return{kind:"session",id:g,target:S?{seq:k,q:S}:{seq:k}}}for(let g of c){let v=g.pageNav;if(v?.path&&u===v.path)return{kind:"page",pluginID:g.id,viewID:v.viewID}}let m=/^\/p\/([^/]+)(?:\/([^/]+))?$/.exec(u);if(m?.[1])return{kind:"page",pluginID:decodeURIComponent(m[1]),viewID:m[2]?decodeURIComponent(m[2]):void 0};let p=/^\/settings(?:\/([^/]+))?$/.exec(u);if(p)return{kind:"settings",tab:p[1]?decodeURIComponent(p[1]):void 0};if(u==="/"||u==="/new")return{kind:"new",projectID:new URLSearchParams(a).get("project")??void 0};return{kind:"new"}}function kK({result:t,partialOutput:a,header:c,copyAction:u,input:f}){_();let m=t?.output??a??t?.error;if(!t&&!a)return e(Ro,{className:"mt-1.5 mb-2.5",header:c,actions:u,children:e("div",{className:"px-4 py-3 text-xs text-faint",children:"等待结果…"})});if(!m?.trim())return e(Ro,{className:"mt-1.5 mb-2.5",header:c,actions:u,children:e("div",{className:"px-4 py-3 text-xs text-faint",children:"(无输出)"})});if(t?.isError)return e(Ro,{className:"mt-1.5 mb-2.5",header:c,actions:u,children:e("pre",{className:"max-h-80 overflow-auto px-4 py-3 font-mono text-[12.5px] leading-[1.65] text-danger whitespace-pre-wrap break-words",children:m})});let p=/共返回 (\d+) 条/.exec(m)?.[1],g=m.split(/\n\n|\n(?=\[(?:[^·\n]+ · [^·\n]+ · \d+|seq=\d+)\])/);return n(Ro,{className:"mt-1.5 mb-2.5",header:c,actions:u,children:[n("div",{className:"border-b border-line/60 px-3.5 py-1.5 text-xs text-faint",children:["历史搜索",p?` · ${p} 条命中`:""]}),e("div",{className:"max-h-96 overflow-y-auto divide-y divide-line/60",children:g.map((v)=>{let k=/^\[(.*?) · ([^\n·]+) · (\d+) · [^\n]+\]/.exec(v),S=/^\[seq=(\d+)\]/.exec(v),I=k?.[2]?.trim()??(typeof f.session==="string"?f.session.trim():void 0),T=Number(k?.[3]??S?.[1]);return I&&Number.isSafeInteger(T)?e("a",{className:"block whitespace-pre-wrap break-words px-3.5 py-2.5 font-mono text-[12.5px] leading-[1.65] text-ink/90 transition-colors hover:bg-raised/60 hover:text-ink",href:zl(gd(I,T,typeof f.query==="string"?f.query:void 0)),children:v},v):e("pre",{className:"whitespace-pre-wrap break-words px-3.5 py-2 font-mono text-[12px] leading-[1.65] text-faint",children:v},v)})})]})}var tn=(t)=>typeof t==="string"?t:"";function ib(t,a=3){let c=t.split("/").filter(Boolean);if(c.length>a)return`…/${c.slice(-a).join("/")}`;return t}function rbe(t){if(!Array.isArray(t))return"";return t.map((a)=>tn(a?.path).split("/").filter(Boolean).at(-1)??"").filter(Boolean).join(", ")}function obe(t){if(!Array.isArray(t))return"";let a=t.map((c)=>tn(c?.path).split("/").filter(Boolean).at(-1)??"").filter(Boolean);if(a.length===0)return t.length>0?`${t.length} 处`:"";return[...new Set(a)].join(", ")}function _A(t){let a=tn(t).trim();if(!a)return"";return a.split(/\r?\n/).map((u)=>u.trim()).filter(Boolean).at(-1)??""}var SK={database_search:{icon:Mf,active:"正在搜索历史",done:"搜索历史",summary:(t)=>tn(t.query)||`${tn(t.session)} #${t.seq??""}`,count:{verb:"搜索历史",unit:"次"},renderDetail:kK},read:{icon:xt,active:"正在读取",done:"读取",summary:(t)=>ib(tn(t.path))||rbe(t.paths),count:{verb:"读取",unit:"个文件"}},write:{icon:P0,active:"正在写入",done:"写入",summary:(t)=>ib(tn(t.path))||_A(t.content),count:{verb:"写入",unit:"个文件"}},edit:{icon:Nu,active:"正在编辑",done:"编辑",summary:(t)=>ib(tn(t.path))||obe(t.edits)||_A(t.new_string)||_A(t.old_string),count:{verb:"编辑",unit:"个文件"}},glob:{icon:D0,active:"正在查找文件",done:"查找文件",summary:(t)=>tn(t.pattern)||ib(tn(t.path)),count:{verb:"查找",unit:"次"}},grep:{icon:Pe,active:"正在搜索",done:"搜索",summary:(t)=>tn(t.pattern)||ib(tn(t.path)),count:{verb:"搜索",unit:"次"}},todo:{icon:B0,active:"正在更新待办",done:"更新待办",summary:(t)=>Array.isArray(t.todos)?`${t.todos.length} 项`:""},history_grep:{icon:Mf,active:"正在检索历史",done:"检索历史",summary:(t)=>tn(t.pattern),count:{verb:"检索历史",unit:"次"}},history_list:{icon:Mf,active:"正在读取历史",done:"读取历史",summary:(t)=>tn(t.chunk_id)||(t.seq?`#${t.seq}`:""),count:{verb:"读取历史",unit:"次"}},toolsearch:{icon:Pe,active:"正在检索工具",done:"检索工具",summary:(t)=>tn(t.query).replace(/^select:/,"").replace(/,/g,", "),count:{verb:"检索",unit:"个工具"}},tool_search:{icon:Pe,active:"正在检索工具",done:"检索工具",summary:(t)=>tn(t.query).replace(/^select:/,"").replace(/,/g,", "),count:{verb:"检索",unit:"个工具"}},tool_call:{icon:Ff,active:"正在调用工具",done:"调用工具",summary:(t)=>tn(t.name),count:{verb:"调用",unit:"次工具"}}},sb=new Map;function CK(){sb.clear();for(let t of Ae()){if(!t.tools)continue;for(let[a,c]of Object.entries(t.tools))sb.set(a,{icon:c.icon??Ff,active:c.active??`正在调用 ${a}`,done:c.done??a,summary:c.summary?(u)=>c.summary?.(u)??"":()=>"",count:c.count,hiddenInSteps:c.hiddenInSteps,renderDetail:c.renderDetail,status:c.status})}}CK();pn(CK);var lb=new Proxy(SK,{get(t,a){return t[a]??sb.get(a)},has(t,a){return a in t||sb.has(a)}});function Lm(t){let a=SK[t]??sb.get(t);if(a)return a;return{icon:Ff,active:`正在调用 ${t}`,done:t,summary:()=>""}}function KS(t){if(t&&typeof t==="object")return t;return{}}function IK(t,a=Ae()){let c=new Map,u=new Set;for(let f of a){let m=f.projectBackground?.(t);if(!m)continue;for(let[p,g]of m.cards)c.set(p,{...g});for(let p of m.consumed)u.add(p)}for(let f of t){if(f.type!=="extension"||f.namespace!=="basalt.notice"||f.kind!=="discarded"||f.schemaVersion!==1)continue;let m=f.payload;if(!m||typeof m!=="object"||!("sourceKind"in m)||!("sourceID"in m)||!("reason"in m)||typeof m.reason!=="string")continue;for(let p of c.values()){if(p.sourceKind!==m.sourceKind||p.id!==m.sourceID)continue;p.discarded=m.reason,u.add(f.seq)}}return{cards:c,consumed:u}}function TK(t,a){let c=[...t];for(let u of Ae()){if(a?.enabledPlugins&&!a.enabledPlugins.has(u.id))continue;if(u.projectEntries)c=u.projectEntries(c,{sessionID:a?.sessionID??""})}return abe(c)}function abe(t){let a=new Map,c=new Set;for(let u of t){if(u.type!=="extension"||u.namespace!==gc)continue;let f=u.payload,m=f!==null&&typeof f==="object"&&"id"in f&&typeof f.id==="string"?f.id:void 0;if(!m)continue;if(u.kind==="requested")a.set(m,"pending");else if(u.kind==="answered"||u.kind==="cancelled"){if(c.add(u.seq),a.get(m)==="pending"){let p=f.approved===!0;a.set(m,u.kind==="cancelled"?"cancelled":p?"approved":"denied")}}}if(a.size===0)return t;return t.filter((u)=>!c.has(u.seq)).map((u)=>{if(u.type!=="extension"||u.namespace!==gc||u.kind!=="requested")return u;let f=u.payload;if(f===null||typeof f!=="object"||!("id"in f)||typeof f.id!=="string")return u;return{...u,payload:{...f,state:a.get(f.id)??"pending"}}})}function zA(t,a){let c=TK(t,a),u=[],f=Ae().filter((R)=>!a?.enabledPlugins||a.enabledPlugins.has(R.id)),{cards:m,consumed:p}=IK(c,f),g=[...m.values()],v,k=!1,S=!1,I=[],T=()=>{if(I.length>0)u.push(...I);I=[]},L=()=>{for(let R=u.length-1;R>=0;R--){let A=u[R];if(!A)continue;if(A.kind==="extension"&&A.entry.namespace===gc)continue;return A.kind==="assistant"&&!A.end?A:void 0}return};for(let R of c){if(R.type==="run"&&R.state==="start"){v=R.time,k=!0,S=!1;continue}if(R.type==="extension"){if(R.namespace==="basalt.audit")continue;if(R.namespace==="session"&&R.kind==="stop_requested")continue;let E=m.get(R.seq);if(E){u.push({kind:"extension",key:R.seq,entry:R,background:E});continue}if(p.has(R.seq))continue}if(R.type==="user"&&R.notices?.length&&R.notices.every((E)=>g.some((P)=>P.sourceKind===E.sourceKind&&P.id===E.sourceID)))continue;if(R.type==="extension"&&R.namespace==="session"&&R.kind==="model_change"){let E=R.payload,P=typeof E?.to==="string"?E.to:"";if(P){let D=u.at(-1);if(D?.kind==="model_change")D.model=P,D.key=R.seq;else u.push({kind:"model_change",key:R.seq,model:P})}continue}let A=u.at(-1);if(R.type==="extension")u.push({kind:"extension",key:R.seq,entry:R});else if(R.type==="user"&&R.notices){if(v===void 0)v=R.time;u.push({kind:"notice",key:R.seq,text:R.text,notices:R.notices})}else if(R.type==="user"){if(v===void 0)v=R.time;let E=c.some((D)=>D.seq>R.seq&&D.type==="assistant");if(k&&S&&(a?.recallableSteers?a.recallableSteers.has(R.seq):!E)){I.push({kind:"user",key:R.seq,text:R.text,attachments:R.attachments,time:R.time,steer:!0});continue}if(k)S=!0;T(),u.push({kind:"user",key:R.seq,text:R.text,attachments:R.attachments,time:R.time})}else if(R.type==="assistant"){if(I.length>0){let P=(N)=>a?.recallableSteers?a.recallableSteers.has(N.key):!1,D=I.filter((N)=>!P(N));if(D.length>0)I=I.filter(P),u.push(...D.map((N)=>({...N,steer:void 0})))}let E=L();if(E){if(E.messages.push(R),E.startTime===void 0)E.startTime=v??R.time}else u.push({kind:"assistant",key:R.seq,messages:[R],startTime:v??R.time})}else if(R.type==="compaction")if(A?.kind==="fold")A.key=R.seq,A.through=R.through,A.partial=R.partial,A.saved=R.saved;else u.push({kind:"fold",key:R.seq,through:R.through,partial:R.partial,saved:R.saved});else if(R.type==="run"&&R.state==="end"){let E=L();if(E){E.end=R;let P=E.startTime??E.messages[0]?.time??v;if(P!==void 0&&R.time>=P)E.durationMs=R.time-P}else{let P=v??R.time;u.push({kind:"assistant",key:R.seq,messages:[],end:R,startTime:P,durationMs:Math.max(0,R.time-P)})}T(),v=void 0,k=!1,S=!1}}T();for(let R of u)if(R.kind==="assistant"&&R.durationMs===void 0){let A=R.end?.time??R.messages.at(-1)?.time,E=R.startTime??R.messages[0]?.time;if(A!==void 0&&E!==void 0&&A>=E)R.durationMs=A-E}return u}function LK(t,a){if(!a)return{turns:t};let c=t.length;while(c>0){let m=t.at(c-1);if(m?.kind==="user"&&m.steer||m?.kind==="extension"&&m.entry.namespace===gc)c--;else break}let u=t.at(c-1);if(u?.kind==="assistant"&&!u.end)return{turns:t,live:u};let f={kind:"assistant",key:-1,messages:[]};return{turns:[...t.slice(0,c),f,...t.slice(c)],live:f}}function RK(t){let a=[];for(let c of t){let u=a.at(-1);if(c.type==="text"){if(!c.text.trim())continue;if(u?.kind==="text")u.text=`${u.text}
1094
+
1095
+ ${c.text}`;else a.push({kind:"text",key:`t${a.length}`,text:c.text})}else if(u?.kind==="steps")u.parts.push(c);else a.push({kind:"steps",key:`s${a.length}`,parts:[c]})}return a}function EK(t,a){let c=new Map;for(let u of TK(t,a))if(u.type==="tool_result")c.set(u.callID,u);return c}function ibe(t,a,c){let u=new Set,f=t.flatMap((m)=>m.kind==="extension"?[m.entry]:[]);for(let m of Ae()){if(c?.enabledPlugins&&!c.enabledPlugins.has(m.id))continue;for(let p of m.handledToolCalls?.(f)??[])u.add(p)}for(let m of t){if(m.kind!=="assistant")continue;for(let p of m.messages)for(let g of p.parts){if(g.type!=="tool_call")continue;if(Lm(g.name).hiddenInSteps&&!a.get(g.id)?.isError)u.add(g.id)}}return u}function BA(t,a,c){let u=ibe(t,a,c),f=new Set;for(let m of Ae()){if(c?.enabledPlugins&&!c.enabledPlugins.has(m.id))continue;if(m.suppressNotices)for(let p of m.suppressNotices)f.add(p)}return t.flatMap((m,p)=>{if(m.kind==="assistant"){let g=m.messages.map((k)=>{let S=k.parts.filter((I)=>I.type!=="tool_call"||!u.has(I.id));return S.length===k.parts.length?k:{...k,parts:S}});if(g.every((k)=>!k.parts.length&&!k.error)&&(!m.end||m.end.reason==="done"||m.end.reason==="waiting_user")&&(p<t.length-1||m.end!==void 0))return[];return[g.every((k,S)=>k===m.messages[S])?m:{...m,messages:g}]}if(m.kind==="notice"&&m.notices.every((g)=>f.has(g.sourceKind)))return[];return[m]})}function WS(t,a,c){if(Object.is(t,a))return!0;if(c===0||typeof t!=="object"||typeof a!=="object"||!t||!a)return!1;if(Array.isArray(t)!==Array.isArray(a))return!1;let u=Object.keys(t);if(u.length!==Object.keys(a).length)return!1;return u.every((f)=>WS(t[f],a[f],c-1))}function PK(t,a){if(t.length===0)return a;let c=new Map;for(let u of t)c.set(`${u.kind}:${u.key}`,u);return a.map((u)=>{let f=c.get(`${u.kind}:${u.key}`);return f&&WS(f,u,3)?f:u})}function XS(t,a,c){if(a===c)return!0;for(let u of t.messages)for(let f of u.parts)if(f.type==="tool_call"&&a.get(f.id)!==c.get(f.id))return!1;return!0}function sbe(t,a,c){if(!c)return;let u=t.at(-1);if(u&&(u.type==="thinking"||!a.has(u.id)))return u;return t.find((f)=>f.type==="tool_call"&&!a.has(f.id))}function lbe(t,a,c){if(c)return;for(let u of t)if(u.type==="tool_call"){let f=a.get(u.id)?.images;if(f&&f.length>0)return f[0]}return}var cb=jt(new Set),qA=jt(null);function HA(t,a){let[c,u]=r(t||a),f=i(!1),m=i(t);return o(()=>{if(a)u(!0)},[a]),o(()=>{if(!f.current){if(!m.current&&t)u(!0);else if(m.current&&!t)u(!1)}m.current=t},[t]),{open:c,onOpenChange:(p)=>{f.current=!0,u(p)}}}function cbe(t){_();let a=M(cb),c=t.parts.some((S)=>a.has(S)),{open:u,onOpenChange:f}=HA(t.live,c);if(t.parts.length===1&&t.parts[0]?.type==="thinking"){let[S]=t.parts;return S?e(AK,{part:S,results:t.results,live:t.live}):null}let m=sbe(t.parts,t.results,t.live),p=t.parts.filter((S)=>S.type==="tool_call"&&t.results.get(S.id)?.isError).length,g=lbe(t.parts,t.results,u),v=m?ube(m):mbe(t.parts),k=t.parts.findLastIndex((S)=>S.type==="tool_call");return n(Oe,{open:u,onOpenChange:f,children:[n($e,{className:l("chat.stepRow","text-dim hover:text-ink"),children:[e("span",{className:"flex size-5 shrink-0 items-center justify-center",children:t.live?e(ie,{className:"size-4 animate-spin text-faint"}):e("span",{className:"size-1.5 rounded-full bg-line-strong"})}),e("span",{className:d("min-w-0 flex-1 truncate animate-fade",t.live&&"shimmer-text"),children:v},v),g&&e("img",{src:`data:${g.mimeType};base64,${g.data}`,alt:"步骤图片预览",className:"size-5 shrink-0 rounded border border-line object-cover"}),p>0&&n("span",{className:"shrink-0 text-xs text-danger",children:[p," 步失败"]}),n("span",{className:"shrink-0 text-xs text-faint tabular-nums",children:[t.parts.length," 步"]}),e(tt,{className:"text-faint"})]}),e(De,{className:"-mr-2 pr-2",children:e("ol",{className:"relative mt-0.5 ml-[9px] border-l border-line pl-3",children:t.parts.map((S,I)=>e("li",{children:e(AK,{part:S,results:t.results,live:t.live,isLatestPart:I===t.parts.length-1,isLastTool:I===k,nested:!0})},S.type==="tool_call"?S.id||`tool${I}`:`think${I}`))})})]})}function ube(t){if(t.type==="thinking")return"正在思考";let{verb:a,summary:c}=DK(t);return c?`${a} ${c}`:a}function DK(t){let a=Lm(t.name),c=KS(t.input),u=a.summary(c);if(t.generating)return{verb:lb[t.name]?`准备${a.done}`:`准备调用 ${t.name}`,summary:u};let f=tn(c.then_run);if(f)return{verb:"正在运行",summary:f};return{verb:a.active,summary:u}}function dbe(t){let a=JSON.stringify(t??{}).length;return a>=1000?`${(a/1000).toFixed(1)}k 字符`:`${a} 字符`}function fbe(t){let[a,c]=r(),[u,f]=r(Date.now);return o(()=>{if(!t){c(void 0);return}let m=Date.now();c(m),f(m);let p=setInterval(()=>f(Date.now()),1000);return()=>clearInterval(p)},[t]),a===void 0?0:Math.floor((u-a)/1000)}function NK(t,a){let c=i(null),u=i(!0),f=()=>{let m=c.current;if(m)u.current=m.scrollHeight-m.scrollTop-m.clientHeight<32};return o(()=>{let m=c.current;if(m&&a&&t&&u.current)m.scrollTop=m.scrollHeight},[t,a]),{ref:c,onScroll:f}}function FA(t){let a=NK(t.content,t.follow);return e("div",{ref:a.ref,onScroll:a.onScroll,className:d("overflow-y-auto",t.className),children:t.children})}function mbe(t){if(t.length===1){let f=t[0];if(f&&f.type==="tool_call"){let m=Lm(f.name),p=m.summary(KS(f.input));return p?`${m.done} ${p}`:m.done}}let a=new Map,c=0;for(let f of t)if(f.type==="thinking")c++;else{let m=lb[f.name]?.count,p=m?`${m.verb}\x00${m.unit}`:"调用工具\x00次";a.set(p,(a.get(p)??0)+1)}let u=[...a].map(([f,m])=>{let[p,g]=f.split("\x00");return`${p} ${m} ${g}`});if(u.length===0&&c>0)return"思考";return u.join("、")}function AK(t){if(t.part.type==="thinking")return e(gbe,{part:t.part,text:t.part.text,live:t.live&&(t.isLatestPart??!0),nested:t.nested??!1});return e(vbe,{part:t.part,result:t.results.get(t.part.id),live:t.live,isLast:t.isLastTool??!0})}var pbe=new Set(["","text","plaintext","txt","markdown","md"]);function hbe(t){let a=t.replace(/\r\n/g,`
1096
+ `).split(`
1097
+ `),c=[],u;for(let f of a){let m=/^[ \t]{0,3}(`{3,}|~{3,})(.*)$/.exec(f);if(m){let p=m[1]??"",g=p[0]??"",v=p.length,k=(m[2]??"").trim();if(u){if(g===u.char&&v>=u.length&&k===""){u=void 0,c.push(f);continue}}else if(g!=="`"||!k.includes("`")){let S=k.split(/\s+/)[0]?.toLowerCase()??"";if(pbe.has(S))continue;u={char:g,length:v}}}c.push(f)}return c.join(`
1098
+ `).replace(/\n{3,}/g,`
1099
+
1100
+ `).trim()}function gbe(t){_();let a=M(cb).has(t.part),{open:c,onOpenChange:u}=HA(t.live,a),f=HS(t.text,t.live),m=hbe(f.text),p=m?m.split(`
1101
+ `).filter((v)=>v.trim()):[],g="";if(!c&&m)g=(t.live?p.at(-1):p[0])??"";return n(Oe,{open:c,onOpenChange:u,className:d(t.live&&"animate-stream-block"),children:[n($e,{className:l("chat.stepRow"),children:[e(Ef,{className:"size-4 shrink-0 text-faint"}),e("span",{className:d("shrink-0 text-ink",t.live&&"shimmer-text"),children:t.live?"思考中":"思考"}),e("span",{className:"min-w-0 flex-1 truncate text-[13px] text-faint",children:g}),e(tt,{className:"text-faint opacity-0 transition-opacity group-hover/collapsible:opacity-100 group-data-[state=open]/collapsible:opacity-100"})]}),e(De,{children:m&&e("div",{"data-streaming":f.streaming?"":void 0,className:l("chat.thinkingBody",t.nested?"pl-1":"border-l-2 border-line/80 pl-3.5"),children:e(fi,{text:m,stream:f.streaming})})})]})}function OK(t){if(!Array.isArray(t.edits))return[];let a=tn(t.path);return t.edits.map((c)=>{let u=c&&typeof c==="object"?c:{};return{path:tn(u.path)||a,before:tn(u.old_string),after:tn(u.new_string)}})}function xbe(t){let a=tn(t.name)||tn(t.path)||tn(t.prompt)||tn(t.description)||tn(t.query)||tn(t.command);if(a)return a;if(Object.keys(t).length===0)return"";return JSON.stringify(t)}function vbe(t){_();let a=KS(t.part.input),c=Lm(t.part.name),u=c.icon,f=t.result,m=!f,p=Boolean(f?.images?.length),g=Boolean(p||t.live&&(m||t.isLast)),v=M(cb).has(t.part),{open:k,onOpenChange:S}=HA(g,v),I=f?c.status?.(f):void 0,T=m&&Boolean(t.part.generating),L=m?DK(t.part):void 0,R=L?L.verb:c.done,A=(L?L.summary:c.summary(a))||(lb[t.part.name]?"":xbe(a)),E=fbe(Boolean(t.live)&&m&&!T),P=t.part.name==="edit"?OK(a):[],D=P.length>0?P.some((F)=>F.before||F.after):Boolean(tn(a.old_string)||tn(a.new_string)),N;if(t.part.name==="edit"&&!f?.isError&&(f||D))if(P.length>0){let F=0,z=0;for(let B of P){let U=$S(B.before,B.after);F+=U.added,z+=U.removed}N={added:F,removed:z}}else N=$S(tn(a.old_string),tn(a.new_string));let O=!k?f?.images?.[0]:void 0;return n(Oe,{open:k,onOpenChange:S,className:d(t.live&&"animate-stream-block"),children:[n($e,{className:l("chat.stepRow"),title:tn(a.path)||tn(a.command)||void 0,children:[e(u,{className:d("size-4 shrink-0",f?.isError?"text-danger":"text-faint")}),e("span",{className:d("shrink-0 text-ink",m&&"shimmer-text"),children:R}),e("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px] text-faint",children:A}),O&&e("img",{src:`data:${O.mimeType};base64,${O.data}`,alt:A||t.part.name,className:"size-5 shrink-0 rounded border border-line object-cover"}),I&&e(it,{tone:I.tone,pulse:I.pulse,title:I.title,children:I.label}),N&&e(wK,{added:N.added,removed:N.removed}),T&&t.live&&n("span",{className:"shrink-0 text-[11.5px] text-faint tabular-nums",title:"模型正在生成这次调用的参数",children:["已生成 ",dbe(t.part.input)]}),E>=2&&n("span",{className:"shrink-0 text-[11.5px] text-faint tabular-nums",children:[E,"s"]}),m?e(ie,{className:"size-3.5 shrink-0 animate-spin text-faint"}):f.isError&&e(be,{className:"size-3.5 shrink-0 animate-pop text-danger"}),e(tt,{className:"text-faint opacity-0 transition-opacity group-hover/collapsible:opacity-100 group-data-[state=open]/collapsible:opacity-100"})]}),e(De,{children:e(wbe,{name:t.part.name,input:a,result:f,partialOutput:t.part.output})})]})}function VA(t){let a=t.trim();if(!(a.startsWith("{")&&a.endsWith("}")||a.startsWith("[")&&a.endsWith("]")))return;try{let c=JSON.parse(a);if(typeof c==="object"&&c!==null)return JSON.stringify(c,null,2)}catch{}return}function _K(t){return e("div",{className:"flex flex-wrap gap-3 p-3.5",children:t.images.map((a,c)=>{let u=`data:${a.mimeType};base64,${a.data}`,f=t.label||"工具输出图片",m=t.images.length>1?`${f} (${c+1})`:f;return e("button",{type:"button",onClick:()=>Nl({src:u,alt:m}),title:`${m}(点击放大预览)`,className:"cursor-zoom-in overflow-hidden rounded-lg border border-line bg-bg/50 transition-[transform,filter] hover:brightness-95 active:scale-[0.99] focus-visible:ring-2 focus-visible:ring-accent outline-none",children:e("img",{src:u,alt:m,className:"max-h-72 max-w-full object-contain"})},`${a.mimeType}:${a.data.length}:${a.data.slice(0,32)}:${a.data.slice(-32)}`)})})}function UA(t){_();let a=t.output??t.result?.output,c=NK(a??t.partialOutput,!0),{ref:u,onScroll:f}=c;if(!t.result){if(t.partialOutput?.trim()){let v=VA(t.partialOutput);if(v)return e(Ts,{code:v,lang:"json",className:"max-h-80 overflow-y-auto px-4 py-3"});return e("pre",{ref:u,onScroll:f,className:l("chat.toolOutput","text-ink/90"),children:t.partialOutput})}return e("div",{className:"px-4 py-3 text-xs text-faint",children:"等待结果…"})}let m=a??"",p=t.result.images;if(!m.trim()&&!p?.length)return e("div",{className:"px-4 py-3 text-xs text-faint",children:"(无输出)"});let g=!t.result.isError?VA(m):void 0;return n("div",{children:[p?.length?e(_K,{images:p,label:t.label}):null,m.trim()?g?e(Ts,{code:g,lang:"json",className:d("max-h-96 overflow-y-auto px-4 py-3",p?.length&&"border-t border-line/60")}):e("pre",{ref:u,onScroll:f,className:l("chat.toolOutput",Boolean(p?.length)&&"border-t border-line/60",t.result.isError?"text-danger":"text-ink/90"),children:m}):null]})}function bbe(t){if(_(),!t.result)return e("div",{className:"px-4 py-3 text-xs text-faint",children:"等待结果…"});let a=t.result.output,c=t.result.images;if(t.result.isError)return e("pre",{className:l("chat.toolOutput","text-danger"),children:a});if(c?.length)return n("div",{children:[e(_K,{images:c,label:t.path}),a.trim()&&e("div",{className:"border-t border-line/60 px-3.5 py-2 font-mono text-xs text-faint",children:a.trim()})]});if(!a.trim())return e("div",{className:"px-4 py-3 text-xs text-faint",children:"(无输出)"});let u=a.split(`
1102
+ `),f=[],m="";for(let p=0;p<u.length;p++){let g=u[p]??"",v=g.match(/^\s*(\d+)\t(.*)$/);if(v)f.push({num:v[1]??"",text:v[2]??""});else if(f.length>0&&g.startsWith("(Showing lines ")){m=u.slice(p).join(`
1103
+ `).trim();break}else if(f.length===0)return e("pre",{className:l("chat.toolOutput","text-ink/90"),children:a});else f.push({num:"",text:g})}return n("div",{className:"max-h-96 overflow-auto px-3.5 py-3 font-mono text-[12.5px] leading-[1.65]",children:[n("div",{className:"flex min-w-full w-fit",children:[e("pre",{className:"shrink-0 pr-3.5 text-right text-faint/60 tabular-nums select-none",children:f.map((p)=>p.num||" ").join(`
1104
+ `)}),e("div",{className:"min-w-0 flex-1",children:e(Ts,{code:f.map((p)=>p.text).join(`
1105
+ `),lang:t.path,className:"overflow-x-visible! [&_pre]:m-0 [&_pre]:p-0"})})]}),m&&e("div",{className:"mt-2 border-t border-line/60 pt-2 text-xs text-faint",children:m})]})}function MK(t,a){let c=`
1106
+
1107
+ $ ${a}
1108
+ `,u=t.indexOf(c);return u===-1?t:t.slice(u+c.length)}function ybe(t){let a=t.partialOutput?MK(t.partialOutput,t.command):void 0,c=t.result?MK(t.result.output,t.command):void 0;return n("div",{className:"border-t border-line/60",children:[e(Ts,{code:`$ ${t.command}`,lang:"bash",className:"px-4 pt-2.5 pb-0"}),!t.result&&!a?.trim()?e("div",{className:"px-4 py-2.5 text-xs text-faint",children:"运行中…"}):e(UA,{result:t.result,partialOutput:a,output:c,label:t.label})]})}function wbe(t){Se();let a=M(qA),{name:c,input:u,result:f,partialOutput:m}=t,p=tn(u.path),g=Lm(c),v=g.summary(u),k=p||v||c;if(p&&v&&!p.includes(v)&&!v.includes(p))k=`${v} · ${p}`;let S=e("span",{className:"truncate font-mono",children:k}),I=f?.output||m,L=(I&&!f?.isError?VA(I):void 0)||I||tn(u.content)||tn(u.command),R=L?e(Ot,{text:L,size:"icon-sm",label:"复制内容"}):void 0,A=tn(u.then_run),E=A?e(ybe,{command:A,result:f,partialOutput:m,label:k}):null;if(c==="edit"&&(!f?.isError||A)){let P=OK(u);if(P.length>0){let O=f?P:P.filter((z)=>z.before||z.after),F=new Set(O.map((z)=>z.path).filter(Boolean)).size>1;return n(Ro,{className:"mt-1.5 mb-2.5",header:S,actions:R,children:[O.length===0?e("div",{className:"px-4 py-3 text-xs text-faint",children:"正在生成修改内容…"}):e(FA,{content:O.map((z)=>z.after).join(`
1109
+ `),follow:!f,className:"max-h-[32rem]",children:O.map((z,B)=>n("div",{className:d(B>0&&"border-t border-line/60"),children:[F&&z.path&&e("div",{className:"px-4 pt-2 font-mono text-[11.5px] text-faint",children:z.path}),e(OA,{before:z.before,after:z.after})]},B))}),E]})}let D=tn(u.old_string),N=tn(u.new_string);return n(Ro,{className:"mt-1.5 mb-2.5",header:S,actions:R,children:[!f&&!D&&!N?e("div",{className:"px-4 py-3 text-xs text-faint",children:"正在生成修改内容…"}):e(FA,{content:N||D,follow:!f,className:"max-h-96",children:e(OA,{before:D,after:N,className:"overflow-y-visible"})}),E]})}if(c==="write"&&(!f?.isError||A)){let P=tn(u.content);return n(Ro,{className:"mt-1.5 mb-2.5",header:S,actions:R,children:[!f&&!P?e("div",{className:"px-4 py-3 text-xs text-faint",children:"正在生成文件内容…"}):e(FA,{content:P,follow:!f,className:"max-h-96",children:e(Ts,{code:P||"(空文件)",lang:p,className:"px-4 py-3"})}),E]})}if(g.renderDetail){let P=g.renderDetail;return e(aa,{pluginID:Ae().findLast((D)=>D.tools?.[c])?.id,resetKey:P,fallbackText:"插件工具详情渲染失败",children:e(Je.Provider,{value:Yi,children:e(P,{name:c,input:u,result:f,partialOutput:m,header:S,copyAction:R,sessionID:a?.sessionID,connection:a?xd(a.connection):void 0,onOpen:a?.onOpen})})})}if(c==="read")return e(Ro,{className:"mt-1.5 mb-2.5",header:S,actions:R,children:e(bbe,{path:p,result:f})});if(lb[c]&&c!=="todo")return e(Ro,{className:"mt-1.5 mb-2.5",header:S,actions:R,children:e(UA,{result:f,partialOutput:m,label:k})});return n(Ro,{className:"mt-1.5 mb-2.5",header:S,actions:R,children:[e(Ts,{code:JSON.stringify(u,null,2),lang:"json",className:"max-h-60 overflow-y-auto px-4 py-3"}),e("div",{className:"border-t border-line",children:e(UA,{result:f,partialOutput:m,label:k})})]})}var zK=q(cbe,(t,a)=>{if(t.live!==a.live||t.parts.length!==a.parts.length)return!1;return t.parts.every((c,u)=>{let f=a.parts[u];if(!f||!WS(c,f,3))return!1;return c.type!=="tool_call"||t.results.get(c.id)===a.results.get(c.id)})});function FK(t){let a=t.match(/<chunk-input([^>]*)>\n?([\s\S]*?)\n?<\/chunk-input>/);if(!a)return{messages:[],excerpt:!1};let c=a[1]??"",u=a[2]??"",f=/\bexcerpt="true"/.test(c),m=[...u.matchAll(/<user-message[^>]*>\n?([\s\S]*?)\n?<\/user-message>/g)];if(m.length>0){let g=m.map((v)=>(v[1]??"").trim()).filter(Boolean);return{messages:g.map((v,k)=>({key:`user-${k+1}-${v.slice(0,24)}`,label:g.length>1?`用户提问 #${k+1}`:"用户提问",text:v})),excerpt:f}}let p=u.replace(/\n?Use history_list with chunk_id="[^"]+" or history_grep to recover omitted details\.\s*$/,"").trim();return{messages:p?[{key:`user-1-${p.slice(0,24)}`,label:"用户提问",text:p}]:[],excerpt:f}}function jA(t){if(!t.includes("<conversation-checkpoint"))return null;let a=t.match(/^visible chunks:\s*(.+)$/m)?.[1]?.trim(),c=t.match(/^archived chunks:\s*(.+)$/m)?.[1]?.trim(),u=t.match(/^history budget:\s*(.+)$/m)?.[1]?.trim(),f=t.match(/archived requests, oldest first:\n([\s\S]*?)(?:\n<\/conversation-checkpoint>|$)/),m=[];if(f?.[1])for(let p of f[1].split(`
1110
+ `)){let g=p.trim();if(!g)continue;let v=g.match(/^-\s+(\S+)\s+\[([^\]]+)\]:\s*(.+)$/);if(v){let k=v[1]??"",S=v[2]??"",I=v[3]??"";m.push({key:`${k}-${I.slice(0,24)}`,id:k,status:S,text:I})}else{let k=g.replace(/^-\s*/,"");m.push({key:k.slice(0,32),id:"",status:"",text:k})}}return{visibleChunks:a,archivedChunks:c,historyBudget:u,archivedRequests:m}}var BK="This chunk did not complete. Recent tool outcomes below are historical evidence, not new tool calls. Check omitted outcomes before repeating side effects.";function VK(t){let a=t.match(/<chunk-summary([^>]*)>\n?([\s\S]*?)\n?<\/chunk-summary>/);if(!a)return null;let c=a[1]??"",u=a[2]??"",{messages:f,excerpt:m}=FK(t),p=c.match(/\bstatus="([^"]+)"/)?.[1]??"completed",g=Number(c.match(/\bfolded-messages="(\d+)"/)?.[1]??0),v=m||/\bexcerpt="true"/.test(c);u=u.replace(/\n?Use history_list with chunk_id="[^"]+" or history_grep to recover omitted details\.\s*$/,"").trim();let k=[],S=u.match(/(?:^|\n)Recorded file changes:\n([\s\S]*?)$/);if(S)k=(S[1]??"").split(`
1111
+ `).map((R)=>R.trim()).filter(Boolean),u=u.slice(0,S.index).trim();let I=[],T=[],L=u;if(u.includes(BK)){let[R,A=""]=u.split(BK);L=(R??"").trim();let E=A.replace(/^\s*Use history_list with chunk_id="[^"]+" or history_grep to recover omitted details\.\s*/m,"").trim(),P=E.match(/^(ASSISTANT|ASSISTANT_TOOL|TOOL_OUTPUT): /m),D=P?.index!==void 0?E.slice(0,P.index).trim():E,N=P?.index!==void 0?E.slice(P.index).trim():"";if(D.startsWith("Earlier steps, oldest first:"))for(let O of D.replace(/^Earlier steps, oldest first:\s*/,"").split(`
1112
+ `)){let F=O.trim();if(F)I.push(F.replace(/^-\s*/,""))}if(N){let O=[...N.matchAll(/^(ASSISTANT|ASSISTANT_TOOL|TOOL_OUTPUT): /gm)];O.forEach((F,z)=>{let B=F[1],U=(F.index??0)+F[0].length,Y=z+1<O.length?O[z+1]?.index??N.length:N.length,G=N.slice(U,Y).trim(),ce=B==="ASSISTANT_TOOL"?"call":B==="TOOL_OUTPUT"?"output":"assistant";if(G)T.push({key:`${ce}-${U}-${G.slice(0,20)}`,kind:ce,text:G})})}}if(L==="No final assistant response was recorded.")L="";return{status:p,foldedMessages:g,excerpt:v,userMessages:f,reply:L,earlierSteps:I,recentOutcomes:T,files:k}}function UK(t){let a=t.match(/<work-state([^>]*)>\n?([\s\S]*?)\n?<\/work-state>/);if(!a)return null;let c=a[1]??"",u=a[2]??"",f=c.match(/\bfolded-steps="([^"]+)"/)?.[1],{messages:m}=FK(t),p={foldedSteps:f,userMessages:m,modifiedFiles:[],errors:[],steps:[],filesRead:[],searches:[],commands:[],otherCalls:[]},g=u.split(/^## /m).slice(1);for(let v of g){let k=v.indexOf(`
1113
+ `),S=(k===-1?v:v.slice(0,k)).trim(),T=(k===-1?"":v.slice(k+1)).split(`
1114
+ `);if(S.startsWith("Modified files")){let L=null,R=null;for(let A of T){if(!A.trim())continue;if(A.startsWith("- ")){let E=A.match(/^-\s+(.+?):\s+(.+)$/);L={path:E?.[1]??A.slice(2),meta:E?.[2]??"",diffs:[]},p.modifiedFiles.push(L),R=null}else if(A.startsWith(" step ")&&L){let E=A.trim().replace(/:$/,"");R={key:`${L.path}-${E}-${L.diffs.length}`,step:E,lines:[]},L.diffs.push(R)}else if(A.startsWith(" ")&&R)R.lines.push(A.slice(4))}}else if(S.startsWith("Errors")){let L=null;for(let R of T){if(!R.trim())continue;if(R.startsWith("- step ")){let A=R.match(/^-\s+step\s+(\d+)\s+(.+?)\s+\((resolved at step \d+|UNRESOLVED)\)(?::\s*(.*))?$/);if(A){let E=A[1]??"",P=A[2]??"",D=A[3]??"";L={key:`err-${E}-${P}`,step:E,what:P,resolved:D!=="UNRESOLVED",statusText:D==="UNRESOLVED"?"未解决":D.replace("resolved at step ","已解决 #"),detail:A[4]??""},p.errors.push(L)}}else if(R.startsWith(" ")&&L)L.detail=L.detail?`${L.detail}
1115
+ ${R.slice(4)}`:R.slice(4)}}else if(S.startsWith("Steps"))for(let L of T){let R=L.trim();if(R)p.steps.push(R.replace(/^-\s*/,""))}else if(S.startsWith("Files read"))for(let L of T){let R=L.trim();if(!R.startsWith("- "))continue;let A=R.match(/^-\s+(.+?)\s+@\s+(.+)$/);p.filesRead.push({path:A?.[1]??R.slice(2),steps:A?.[2]??""})}else if(S.startsWith("Searches"))for(let L of T){let R=L.trim();if(!R.startsWith("- "))continue;let A=R.match(/^-\s+(.+?)\s+→\s+(.+?)\s+\(([^)]+)\)$/),E=A?.[1]??R.slice(2),P=A?.[3]??"";p.searches.push({key:`${E}-${P}`,query:E,head:A?.[2]??"",steps:P})}else if(S.startsWith("Commands")){let L=null;for(let R of T){if(!R.trim())continue;if(R.startsWith("- ")){let A=R.match(/^-\s+(\d+)\.\s+`(.+?)`\s+exit=(\S+),\s+(\d+)\s+output lines/),E=A?.[1]??"",P=A?.[2]??R.slice(2);L={key:`cmd-${E}-${P}`,step:E,command:P,exit:A?.[3]??"0",lines:A?.[4]??"0",tail:[]},p.commands.push(L)}else if(R.startsWith(" ")&&L)L.tail.push(R.slice(4))}}else if(S.startsWith("Other tool calls"))for(let L of T){let R=L.trim();if(R)p.otherCalls.push(R.replace(/^-\s*/,""))}}return p}function YS(t){if(t==="completed")return{label:"已完成",className:"bg-success/12 text-success"};if(t==="failed")return{label:"未完成",className:"bg-warning/15 text-warning"};if(t==="interrupted")return{label:"已中断",className:"bg-warning/15 text-warning"};return{label:t,className:"bg-raised text-faint"}}function qK(t){return t.messages.map((a)=>n("div",{className:l("surface.subtle","px-3 py-2"),children:[e("div",{className:"mb-0.5 text-[10.5px] font-medium text-faint",children:t.label??a.label}),e("div",{className:"whitespace-pre-wrap break-words text-xs leading-relaxed text-ink/90",children:a.text})]},a.key))}function HK(t){_();let{item:a,parsed:c}=t,u=YS(c.status);return n("div",{className:"space-y-2.5 p-3.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n("div",{className:"flex flex-wrap items-center gap-1.5",children:[e("span",{className:"font-mono text-[11.5px] font-semibold text-ink",children:a.label}),e("span",{className:d("rounded-md px-1.5 py-0.5 text-[10px] font-medium",u.className),children:u.label}),c.foldedMessages>0&&e("span",{className:l("control.badge","text-[10px]"),children:`已折叠 ${c.foldedMessages} 条过程消息`}),c.excerpt&&e("span",{className:l("control.badge","text-[10px]"),children:"摘录"})]}),e("span",{className:"font-mono text-[11px] tabular-nums text-faint",children:`${a.tokens.toLocaleString()} tokens`})]}),e(qK,{messages:c.userMessages}),c.reply&&n("div",{className:l("surface.subtle","px-3.5 py-2.5"),children:[e("div",{className:"mb-1 text-[10.5px] font-medium text-faint",children:"助手回复"}),e("div",{className:"text-xs leading-relaxed text-dim [&_p]:my-1.5 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0 [&_ul]:my-1.5 [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:my-1.5 [&_ol]:list-decimal [&_ol]:pl-4 [&_h1]:text-xs [&_h1]:font-semibold [&_h1]:text-ink [&_h2]:text-xs [&_h2]:font-semibold [&_h2]:text-ink [&_h3]:text-xs [&_h3]:font-semibold [&_h3]:text-ink",children:e(fi,{text:c.reply})})]}),c.earlierSteps.length>0&&n("div",{className:l("surface.subtle","px-3 py-2"),children:[e("div",{className:"mb-1 text-[10.5px] font-medium text-faint",children:"已执行步骤记录"}),e("ul",{className:"space-y-1 font-mono text-[11px] text-dim",children:c.earlierSteps.map((f)=>e("li",{className:"truncate",children:f},f))})]}),c.recentOutcomes.length>0&&n("div",{className:l("surface.subtle","space-y-1.5 px-3 py-2"),children:[e("div",{className:"text-[10.5px] font-medium text-faint",children:"最近工具执行现场"}),c.recentOutcomes.map((f)=>n("div",{className:"flex items-start gap-2 text-[11px]",children:[e("span",{className:d("mt-0.5 shrink-0 rounded px-1.5 py-0.2 font-mono text-[10px]",f.kind==="call"?"bg-accent/12 text-accent":f.kind==="output"?"bg-raised text-faint":"bg-raised text-dim"),children:f.kind==="call"?"调用":f.kind==="output"?"输出":"说明"}),e("div",{className:"min-w-0 flex-1 whitespace-pre-wrap break-words font-mono text-dim",children:f.text})]},f.key))]}),c.files.length>0&&n("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[e("span",{className:"text-[10.5px] text-faint",children:"修改文件:"}),c.files.map((f)=>n("span",{className:"inline-flex items-center gap-1 rounded-md border border-line/60 bg-raised/40 px-1.5 py-0.5 font-mono text-[11px] text-dim",children:[e(xt,{className:"size-3 shrink-0 text-faint"}),f]},f))]})]})}function jK(t){_();let{item:a,parsed:c}=t;return n("div",{className:"space-y-3 p-3.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-mono text-[11.5px] font-semibold text-ink",children:a.label}),c.foldedSteps&&e("span",{className:l("control.badge","font-mono text-[10px]"),children:`步骤 #${c.foldedSteps}`})]}),e("span",{className:"font-mono text-[11px] tabular-nums text-faint",children:`${a.tokens.toLocaleString()} tokens`})]}),e(qK,{messages:c.userMessages,label:"本轮用户提问"}),c.modifiedFiles.length>0&&n("div",{className:"space-y-1.5",children:[e("div",{className:"text-[11px] font-medium text-ink",children:`修改的文件 (${c.modifiedFiles.length})`}),e("div",{className:"space-y-2",children:c.modifiedFiles.map((u)=>n("div",{className:l("surface.subtle","overflow-hidden"),children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-line/50 bg-raised/30 px-3 py-1.5",children:[n("span",{className:"inline-flex items-center gap-1.5 font-mono text-[11px] font-medium text-ink",children:[e(xt,{className:"size-3 shrink-0 text-faint"}),u.path]}),u.meta&&e("span",{className:"font-mono text-[10.5px] text-faint",children:u.meta})]}),u.diffs.length>0&&e("div",{className:"divide-y divide-line/40 px-3 py-1.5 font-mono text-[11px]",children:u.diffs.map((f)=>n("div",{className:"py-1 first:pt-0 last:pb-0",children:[e("div",{className:"mb-0.5 text-[10px] text-faint",children:f.step}),e("div",{className:"space-y-0.5",children:f.lines.map((m)=>e("div",{className:d("truncate rounded px-1.5 py-0.2",m.startsWith("+ ")?l("chat.diffAdd"):m.startsWith("- ")?l("chat.diffRemove"):"text-faint"),children:m},`${f.key}-${m}`))})]},f.key))})]},u.path))})]}),c.errors.length>0&&n("div",{className:"space-y-1.5",children:[e("div",{className:"text-[11px] font-medium text-ink",children:`错误记录 (${c.errors.length})`}),e("div",{className:"space-y-1.5",children:c.errors.map((u)=>n("div",{className:l("surface.subtle","px-3 py-2 text-[11px]"),children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e("span",{className:"font-mono text-ink",children:`step ${u.step} · ${u.what}`}),e("span",{className:d("rounded px-1.5 py-0.5 text-[10px] font-medium",u.resolved?"bg-raised text-faint":"bg-danger/15 text-danger"),children:u.statusText})]}),u.detail&&e("div",{className:"mt-1 whitespace-pre-wrap break-words font-mono text-[10.5px] text-faint",children:u.detail})]},u.key))})]}),c.steps.length>0&&n("div",{className:"space-y-1",children:[e("div",{className:"text-[11px] font-medium text-ink",children:"步骤摘要"}),e("ul",{className:l("surface.subtle","space-y-1 px-3 py-2 text-xs text-dim"),children:c.steps.map((u)=>e("li",{className:"break-words",children:u},u))})]}),c.filesRead.length>0&&n("div",{className:"space-y-1.5",children:[e("div",{className:"text-[11px] font-medium text-ink",children:`读取的文件 (${c.filesRead.length})`}),e("div",{className:"flex flex-wrap gap-1.5",children:c.filesRead.map((u)=>n("span",{className:l("surface.subtle","inline-flex items-center gap-1.5 rounded-lg px-2 py-1 font-mono text-[11px] text-dim"),children:[e(xs,{className:"size-3 shrink-0 text-faint"}),e("span",{children:u.path}),u.steps&&e("span",{className:"text-[10px] text-faint",children:`@${u.steps}`})]},`${u.path}-${u.steps}`))})]}),c.searches.length>0&&n("div",{className:"space-y-1.5",children:[e("div",{className:"text-[11px] font-medium text-ink",children:`搜索记录 (${c.searches.length})`}),e("div",{className:l("surface.subtle","space-y-1 px-3 py-2 font-mono text-[11px]"),children:c.searches.map((u)=>n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n("span",{className:"inline-flex min-w-0 items-center gap-1.5 truncate text-dim",children:[e(Pe,{className:"size-3 shrink-0 text-faint"}),e("span",{className:"truncate",children:u.query}),u.head&&e("span",{className:"truncate text-faint",children:`→ ${u.head}`})]}),u.steps&&e("span",{className:"shrink-0 text-[10px] text-faint",children:u.steps})]},u.key))})]}),c.commands.length>0&&n("div",{className:"space-y-1.5",children:[e("div",{className:"text-[11px] font-medium text-ink",children:`命令执行 (${c.commands.length})`}),e("div",{className:"space-y-1.5",children:c.commands.map((u)=>n("div",{className:l("surface.subtle","px-3 py-2 font-mono text-[11px]"),children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n("span",{className:"inline-flex items-center gap-1.5 text-ink",children:[e(Pt,{className:"size-3 shrink-0 text-faint"}),e("span",{children:u.command})]}),e("span",{className:"text-[10px] text-faint",children:`step ${u.step} · exit=${u.exit} · ${u.lines} 行`})]}),u.tail.length>0&&e("div",{className:"mt-1 space-y-0.5 border-t border-line/40 pt-1 text-[10.5px] text-faint",children:u.tail.map((f)=>e("div",{className:"truncate",children:f},`${u.key}-${f}`))})]},u.key))})]}),c.otherCalls.length>0&&n("div",{className:"space-y-1",children:[e("div",{className:"text-[11px] font-medium text-ink",children:`其他工具调用 (${c.otherCalls.length})`}),e("ul",{className:l("surface.subtle","space-y-1 px-3 py-2 font-mono text-[11px] text-dim"),children:c.otherCalls.map((u)=>e("li",{className:"truncate",children:u},u))})]})]})}function GK(t){_();let{parsed:a,standalone:c}=t;if(!c&&a.archivedRequests.length===0)return null;return n("div",{className:"space-y-2 p-3.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e("span",{className:"text-[11.5px] font-medium text-ink",children:a.archivedRequests.length>0?"已归档的早期请求摘录":"历史检查点索引"}),a.historyBudget&&e("span",{className:"font-mono text-[10.5px] text-faint",children:`预算 ${a.historyBudget}`})]}),a.archivedRequests.length>0?e("div",{className:"space-y-1.5",children:a.archivedRequests.map((u)=>n("div",{className:l("surface.subtle","flex items-start gap-2 px-3 py-2 text-xs"),children:[u.id&&e("span",{className:"shrink-0 font-mono text-[11px] font-medium text-ink",children:u.id}),u.status&&e("span",{className:d("shrink-0 rounded px-1.5 py-0.2 text-[10px]",YS(u.status).className),children:YS(u.status).label}),e("span",{className:"min-w-0 flex-1 break-words text-dim",children:u.text})]},u.key))}):n("div",{className:"flex flex-wrap items-center gap-3 text-xs text-dim",children:[a.visibleChunks&&e("span",{children:`可见轮次:${a.visibleChunks}`}),a.archivedChunks&&e("span",{children:`已归档轮次:${a.archivedChunks}`})]})]})}var GA=new Map;function kbe(t){if(t>=1e4)return`${(t/1000).toFixed(1).replace(/\.0$/,"")}k`;return t.toLocaleString()}function Sbe(t,a){if(a){let f=t.filter((m)=>m.state==="folded");if(f.length>0)return f}let c=t.filter((f)=>f.state==="sealed"),u=t.filter((f)=>f.id==="index");return[...c,...u]}function $A(t){_();let[a,c]=r(t.defaultOpen??!1),u=t.conn&&t.sessionID?`${t.conn.server.url}:${t.sessionID}:${t.seq??"latest"}`:void 0,[f,m]=r(()=>u?GA.get(u):void 0),[p,g]=r(!1),[v,k]=r(0),S=t.items??f;o(()=>{if(!a||t.items||!t.conn||!t.sessionID||!u)return;let E=GA.get(u);if(E&&v===0){m(E);return}let P=new AbortController;g(!1);let D=t.seq!==void 0?`?at=${t.seq}`:"";return t.conn.request(`/api/sessions/${encodeURIComponent(t.sessionID)}/context${D}`,{signal:AbortSignal.any([P.signal,AbortSignal.timeout(15000)])}).then((N)=>{if(P.signal.aborted)return;let O=Sbe(N.items,t.partial);GA.set(u,O),m(O)},()=>{if(!P.signal.aborted)g(!0)}),()=>P.abort()},[a,t.items,t.conn,t.sessionID,t.seq,t.partial,u,v]);let I=S?.reduce((E,P)=>E+P.tokens,0)??0,T=S?.find((E)=>E.id==="index"),L=T?jA(T.detail):null,R=S?.some((E)=>E.state==="sealed")??!1,A=t.saved&&t.saved.before>t.saved.after?t.saved:void 0;return n(Oe,{open:a,onOpenChange:c,className:"animate-fade py-1",children:[n("div",{className:"flex items-center gap-3",children:[e("div",{className:"h-px flex-1 bg-gradient-to-r from-transparent to-line"}),e(ui,{label:a?"收起折叠详情":A?`节省约 ${(A.before-A.after).toLocaleString()} tokens(${A.before.toLocaleString()} → ${A.after.toLocaleString()}),原文仍可用历史工具检索`:"原文都还在:模型需要时会用历史工具检索回来",children:n($e,{className:l("chat.foldPill",a&&"border-accent/40 bg-raised/60 text-dim"),children:[e(M0,{className:d("size-3.5 shrink-0 transition-colors",a?"text-accent":"text-faint group-hover/fold:text-dim")}),e("span",{className:"font-medium",children:A?`上下文已折叠:节省 ~${kbe(A.before-A.after)} tokens`:"上下文已折叠"}),e("span",{className:"text-[11px] text-faint/80 group-hover/fold:text-dim",children:a?"收起":"查看细节"}),e(tt,{className:d("size-3 text-faint/80 transition-transform group-hover/fold:text-dim",a&&"text-accent")})]})}),e("div",{className:"h-px flex-1 bg-gradient-to-l from-transparent to-line"})]}),e(De,{children:n("div",{className:l("surface.card","my-2.5 overflow-hidden text-xs leading-5 text-dim shadow-xs"),children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-line/60 px-4 py-2.5",children:[n("div",{className:"flex flex-wrap items-center gap-2",children:[e("span",{className:"font-medium text-ink",children:t.partial?"本轮步骤索引":"历史对话要点"}),t.through!==void 0&&e("span",{className:"font-mono text-[11px] text-faint",children:`截至 #${t.through}`}),L?.visibleChunks&&e("span",{className:l("control.badge"),children:`保留 ${L.visibleChunks} 轮`}),L?.archivedChunks&&L.archivedChunks!=="0"&&e("span",{className:l("control.badge"),children:`归档 ${L.archivedChunks} 轮`})]}),n("div",{className:"flex items-center gap-2",children:[S&&S.length>0&&e("span",{className:"font-mono text-[11px] tabular-nums text-faint",children:`${I.toLocaleString()} tokens`}),t.onInspectContext&&n(b,{variant:"ghost",size:"sm",className:"h-6 px-2 text-[11px] text-faint hover:text-ink",onClick:t.onInspectContext,children:[e(wc,{className:"size-3"}),e("span",{children:"完整上下文"})]})]})]}),p&&!S?n("div",{role:"alert",className:"flex items-center justify-between px-4 py-3 text-xs text-danger",children:[e("span",{children:"无法加载折叠内容。"}),e(b,{size:"sm",variant:"ghost",onClick:()=>k((E)=>E+1),children:"重试"})]}):!S?e("div",{role:"status",className:"px-4 py-3 text-xs text-faint",children:"正在加载折叠内容…"}):S.length===0?e("div",{className:"px-4 py-3 text-xs text-faint",children:"暂无折叠内容"}):e("div",{className:"max-h-[32rem] divide-y divide-line/60 overflow-y-auto",children:S.map((E)=>{if(E.id==="index"){let P=jA(E.detail);if(P)return e(GK,{item:E,parsed:P,standalone:!R},E.id)}if(E.state==="sealed"){let P=VK(E.detail);if(P)return e(HK,{item:E,parsed:P},E.id)}if(E.state==="folded"){let P=UK(E.detail);if(P)return e(jK,{item:E,parsed:P},E.id)}return n("div",{className:"space-y-1.5 p-3.5",children:[n("div",{className:"flex items-center justify-between gap-2",children:[e("span",{className:"font-mono text-[11.5px] font-medium text-ink",children:E.label}),e("span",{className:"font-mono text-[11px] tabular-nums text-faint",children:`${E.tokens.toLocaleString()} tokens`})]}),e("div",{className:l("surface.subtle","px-3.5 py-2.5 text-xs leading-relaxed text-dim"),children:e(fi,{text:E.detail})})]},E.id)})})]})})]})}var $K=q(function(a){_();let c=a.attachments??[];return n("div",{className:d("group/user flex flex-col items-end gap-1.5",a.animate&&"animate-rise"),children:[c.length>0&&e("div",{className:"flex max-w-[85%] flex-wrap justify-end gap-2",children:c.map((u)=>u.kind==="image"?e("button",{type:"button",onClick:()=>Nl({src:`data:${u.mimeType};base64,${u.data}`,alt:u.name}),title:`${u.name}(点击放大预览)`,className:l("surface.card","cursor-zoom-in overflow-hidden transition-[transform,filter] hover:brightness-95 active:scale-[0.98] focus-visible:ring-2 focus-visible:ring-accent outline-none"),children:e("img",{src:`data:${u.mimeType};base64,${u.data}`,alt:u.name,className:"max-h-48 max-w-64 object-cover"})},`${u.name}:image:${u.data.slice(0,32)}`):u.kind==="path"?n("div",{title:u.data,className:l("chat.attachmentCard","max-w-64"),children:[e(xs,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"truncate font-mono font-medium text-ink",children:u.data})]},`${u.name}:path:${u.data}`):n("div",{title:u.name,className:l("chat.attachmentCard","max-w-56"),children:[e(xt,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"truncate font-medium text-ink",children:u.name})]},`${u.name}:text:${u.data.slice(0,32)}`))}),a.text&&e("button",{type:"button",disabled:!a.onDoubleClick,"aria-label":"编辑用户消息",onDoubleClick:a.onDoubleClick,onClick:(u)=>{if(u.detail===0)a.onDoubleClick?.()},className:l("chat.userBubble","max-w-[85%] cursor-text text-left select-text"),children:a.text}),n("div",{className:d("flex h-7 items-center gap-1 opacity-0 transition-opacity duration-200 group-hover/user:opacity-100 group-focus-within/user:opacity-100 has-data-[state=open]:opacity-100 max-sm:opacity-100 [@media(pointer:coarse)]:opacity-100",a.recallable&&"opacity-100"),children:[a.recallable&&e(ui,{label:"撤回引导消息(还没发给模型)",children:e(b,{size:"icon-sm",variant:"ghost","aria-label":"撤回引导消息",onClick:a.onRecall,children:e(Bf,{className:"size-4"})})}),e("time",{className:"px-1 text-[11.5px] text-faint",children:new Date(a.time).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})}),a.actions,a.text&&e(Ot,{text:a.text,size:"icon-sm"})]})]})},(t,a)=>t.text===a.text&&t.attachments===a.attachments&&t.time===a.time&&t.animate===a.animate&&t.recallable===a.recallable);function Cbe(t,a){if(!a?.length)return t;let c=new Map,u=[],f=new Set(t.flatMap((m)=>m.type==="tool_call"&&m.id?[m.id]:[]));for(let m of a)if(m.type==="tool_call"&&m.id&&f.has(m.id)){if(m.output!==void 0)c.set(m.id,m.output)}else if(m.type==="tool_call"){let p={...m,generating:!0};u.push(p)}else u.push(m);if(c.size===0)return[...t,...u];return[...t.map((m)=>m.type==="tool_call"&&c.has(m.id)?{...m,output:c.get(m.id)}:m),...u]}var WA=q(function(a){_();let c=a.turn.end,u=a.turn.messages.at(-1),f=c?.reason==="error",m=a.turn.messages.filter((R)=>R.error&&(!f||R!==u)).length,p=Cbe(a.turn.messages.filter((R)=>!R.error||f&&R===u).flatMap((R)=>R.parts),a.draft),g=RK(p),v=f?u?.error??c.error??"出错了":void 0,k=()=>p.flatMap((R)=>R.type==="text"?[R.text]:[]).join(`
1116
+
1117
+ `).trim(),S=g.some((R)=>R.kind==="text"),I=p.some((R)=>R.type==="tool_call"&&!a.results.has(R.id)),T=!a.draft?.length&&!I,L=a.turn.messages.at(-1)?.model;return n("div",{"data-chat-live":a.live?"":void 0,"data-reply":"","data-reply-model":L,"data-reply-time":u?.time,className:d("group/turn flex flex-col gap-3",a.animate&&"animate-fade"),children:[m>0&&e(KA,{children:`请求失败 ${m} 次,已自动重试`}),g.map((R,A)=>R.kind==="text"?e(Ibe,{text:R.text,live:a.live&&A===g.length-1,animateOnMount:a.live},R.key):e(zK,{parts:R.parts,results:a.results,live:a.live&&A===g.length-1},R.key)),v&&e(ba,{tone:"danger",children:v}),c?.reason==="aborted"&&e(KA,{children:"已停止"}),c?.reason==="interrupted"&&e(KA,{children:"服务器重启,这次运行被中断了"}),a.live?n("div",{className:"flex h-8 animate-fade items-center gap-2.5",children:[e(Aa,{className:"size-6",motion:"busy"}),T&&e("span",{className:"animate-fade shimmer-text text-[13.5px]",children:"思考中…"})]}):S&&n("div",{className:"-mt-1.5 -ml-1.5 flex min-h-8 animate-fade flex-wrap items-center gap-1 opacity-0 transition-opacity duration-200 group-last/turn:opacity-100 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100 has-data-[state=open]:opacity-100 max-sm:opacity-100 [@media(pointer:coarse)]:opacity-100",children:[a.actions,e(Ot,{text:k}),e(jS,{text:k,model:L,time:u?.time}),L&&e(ui,{label:L,children:n("span",{className:l("chat.metaBadge","shrink-0"),children:[e(st,{modelID:L,className:"size-3 rounded-xs",size:12}),Wi(L)]})}),a.turn.durationMs!==void 0&&a.turn.durationMs>=0&&e(ui,{label:`生成耗时 ${a.turn.durationMs>=1000?`${(a.turn.durationMs/1000).toFixed(2)}s`:`${a.turn.durationMs}ms`}`,children:n("span",{className:l("chat.metaBadge","tabular-nums"),children:["用时 ",qS(a.turn.durationMs)]})})]})]})},(t,a)=>t.turn===a.turn&&(t.live?t.results===a.results:XS(t.turn,t.results,a.results))&&t.draft===a.draft&&t.live===a.live&&t.animate===a.animate),Ibe=q(function(a){_();let c=HS(a.text,Boolean(a.live),Boolean(a.animateOnMount));return e("div",{"data-streaming":c.streaming?"":void 0,className:l("chat.prose",c.streaming&&"animate-stream-block"),children:e(fi,{text:c.text,stream:c.streaming})})});function KA(t){return e("div",{className:"animate-fade text-[13px] text-faint",children:t.children})}function KK(t){return n("div",{className:"flex animate-fade cursor-default select-none items-center gap-3 py-1 text-xs text-faint",children:[e("div",{className:"h-px flex-1 bg-gradient-to-r from-transparent to-line"}),e(st,{modelID:t.model,className:"size-3.5 rounded-xs"}),n("span",{children:["已切换模型至 ",e("span",{className:"font-medium text-dim",children:Wi(t.model)})]}),e("div",{className:"h-px flex-1 bg-gradient-to-l from-transparent to-line"})]})}function XA(t,a){if(t.kind==="notice"||t.kind==="extension")return!0;if(t.kind!=="assistant"||t===a)return!1;if(t.end&&t.end.reason!=="done"&&t.end.reason!=="waiting_user")return!1;return t.messages.every((c)=>!c.error&&c.parts.every((u)=>u.type!=="text"||!u.text.trim()))}function Tbe(t){let{turn:a,live:c,fresh:u}=t;if(a.kind==="notice")return e(aK,{text:a.text,notices:a.notices});if(a.kind==="user"){let m=t.editing?.seq===a.key?t.editing:void 0;return e(de,{mode:"wait",initial:!1,children:e(H.div,{initial:{opacity:0,scale:0.97},animate:{opacity:1,scale:1,transition:{duration:0.2,ease:[0.22,1,0.36,1]}},exit:{opacity:0,scale:0.97,transition:{duration:0.12,ease:"easeIn"}},style:{transformOrigin:"bottom right"},children:m?e(Rbe,{text:m.text,attachments:m.attachments,pending:t.pendingEdit,onChange:t.onChangeEdit,onChangeAttachments:t.onChangeAttachments,onCancel:t.onCancelEdit,onSubmit:t.onSubmitEdit}):e($K,{text:a.text,actions:t.actions(a.key,a),attachments:a.attachments,time:a.time,animate:u,recallable:a.steer===!0&&t.onRecallSteer!==void 0&&t.recallableSteers.has(a.key),onRecall:t.onRecallSteer?()=>t.onRecallSteer?.(a.key):void 0,onDoubleClick:()=>t.onStartEdit({seq:a.key,text:a.text,attachments:[...a.attachments??[]]})})},m?"edit":"view")})}if(a.kind==="extension"){if(a.background)return e(mK,{activity:a.background});if(a.entry.namespace===gc)return e(cK,{conn:t.conn,sessionID:t.sessionID,entry:a.entry});if(!t.enabledPlugins.has(a.entry.namespace))return e(MA,{entry:a.entry});return e(YK,{pluginID:a.entry.namespace,viewID:a.entry.kind??"card",connection:t.conn,sessionID:t.sessionID,payload:a.entry.payload,onOpen:t.onOpen,fallback:e(MA,{entry:a.entry})})}if(a.kind==="model_change")return e(KK,{model:a.model});if(a.kind==="fold")return e($A,{conn:t.conn,sessionID:t.sessionID,seq:a.key,partial:a.partial,through:a.through,saved:a.saved,onInspectContext:t.onInspectContext});let f=a.messages.length?t.actions(a.key):void 0;if(a===c)return e(Lbe,{conn:t.conn,sessionID:t.sessionID,turn:a,actions:f,results:t.results,animate:u});return e(WA,{turn:a,actions:f,results:t.results,draft:null,live:!1,animate:u})}var XK=q(Tbe,(t,a)=>{let{turn:c}=t;for(let u of Object.keys(t)){if(u==="results"||u==="actions"||u==="editing"||u==="pendingEdit")continue;let f=t[u],m=a[u];if(typeof f==="function"&&typeof m==="function")continue;if(!Object.is(f,m))return!1}if(c.kind==="assistant"){if(!(t.live===c?t.results===a.results:XS(c,t.results,a.results)))return!1}if(c.kind==="user"){let u=t.editing?.seq===c.key,f=a.editing?.seq===c.key;if(u!==f)return!1;if(f&&(t.editing!==a.editing||t.pendingEdit!==a.pendingEdit))return!1}return!0});function Lbe(t){let a=Et(t.conn.state,(c)=>c.views[t.sessionID]?.draft??null);return e(WA,{turn:t.turn,actions:t.actions,results:t.results,draft:a,live:!0,animate:t.animate})}function WK(t){return e("button",{type:"button","aria-label":`移除 ${t.name}`,onClick:t.onRemove,className:"flex size-4 shrink-0 items-center justify-center rounded-sm text-faint transition-colors hover:text-ink",children:e(oe,{className:"size-3"})})}function Rbe(t){_();let a=i(null);o(()=>{a.current?.focus()},[]);let c=(f)=>{t.onChangeAttachments?.(t.attachments.filter((m,p)=>p!==f))},u=async(f)=>{if(!t.onChangeAttachments)return;let m=Array.from(f);if(m.length===0)return;let p=[];for(let v of m)try{p.push(await OS(v))}catch{}if(p.length===0)return;let g=[...t.attachments];for(let v of p){if(g.length>=Zv)break;if(!g.some((k)=>k.kind===v.kind&&k.name===v.name&&k.data===v.data))g.push(v)}t.onChangeAttachments(g)};return n("fieldset",{"aria-label":"编辑用户消息",className:"ml-auto flex max-w-[85%] flex-col items-end gap-1.5",onDragOver:(f)=>{if(f.dataTransfer.types.includes("Files"))f.preventDefault(),f.dataTransfer.dropEffect="copy"},onDrop:(f)=>{if(f.dataTransfer.types.includes("Files"))f.preventDefault(),u(f.dataTransfer.files)},children:[t.attachments.length>0&&e("div",{className:"flex max-w-full flex-wrap justify-end gap-2",children:t.attachments.map((f,m)=>f.kind==="image"?n("div",{className:"group/att relative",children:[e("button",{type:"button",onClick:()=>Nl({src:`data:${f.mimeType};base64,${f.data}`,alt:f.name}),title:`${f.name}(点击放大预览)`,className:l("surface.card","cursor-zoom-in overflow-hidden transition-[transform,filter] hover:brightness-95 active:scale-[0.98] outline-none"),children:e("img",{src:`data:${f.mimeType};base64,${f.data}`,alt:f.name,className:"max-h-48 max-w-64 object-cover"})}),t.onChangeAttachments&&!t.pending&&e("button",{type:"button","aria-label":`移除 ${f.name}`,onClick:()=>c(m),className:"absolute top-1.5 right-1.5 flex size-5 items-center justify-center rounded-full bg-bg/85 text-dim opacity-0 backdrop-blur-xs transition-opacity group-hover/att:opacity-100 hover:text-ink focus-visible:opacity-100",children:e(oe,{className:"size-3"})})]},`${f.name}:image:${f.data.slice(0,32)}`):f.kind==="path"?n("div",{title:f.data,className:l("chat.attachmentCard","max-w-64"),children:[e(xs,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"truncate font-mono font-medium text-ink",children:f.data}),t.onChangeAttachments&&!t.pending&&e(WK,{name:f.name,onRemove:()=>c(m)})]},`${f.name}:path:${f.data}`):n("div",{title:f.name,className:l("chat.attachmentCard","max-w-56"),children:[e(xt,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"truncate font-medium text-ink",children:f.name}),t.onChangeAttachments&&!t.pending&&e(WK,{name:f.name,onRemove:()=>c(m)})]},`${f.name}:text:${f.data.slice(0,32)}`))}),e("textarea",{"aria-label":"编辑用户消息",ref:a,rows:Math.max(1,t.text.split(`
1118
+ `).length),value:t.text,disabled:t.pending,placeholder:t.attachments.length?"输入消息(可选)…":"输入消息…",className:l("chat.userBubble","w-full resize-none overflow-hidden outline-none border-0 ring-0 focus:ring-0"),style:{fieldSizing:"content"},onChange:(f)=>t.onChange(f.target.value),onPaste:(f)=>{if(f.clipboardData.files.length>0)f.preventDefault(),u(f.clipboardData.files)},onKeyDown:(f)=>{if(f.key==="Escape"&&!t.pending)t.onCancel();if(f.key==="Enter"&&!f.shiftKey&&!f.nativeEvent.isComposing)f.preventDefault(),t.onSubmit()}}),n("div",{className:"flex h-7 animate-rise items-center gap-1.5 text-xs [animation-delay:60ms]",children:[e("span",{className:"text-faint",children:"Enter 发送 · Esc 取消"}),e(b,{size:"sm",variant:"ghost",disabled:t.pending,onClick:t.onCancel,children:"取消"}),e(b,{size:"sm",variant:"primary",disabled:t.pending||!t.text.trim()&&!t.attachments.length,onClick:t.onSubmit,children:t.pending?"发送中…":"发送"})]})]})}function YA(t,a,c=0,u=t.length){let f=-1,m=-1;for(let p=c;p<u;p++){let g=t[p];if(!g||g.key<0)continue;let v=g.kind==="assistant"?g.messages[0]?.seq??g.end?.seq??g.key:g.key;if(v<=a&&v>m)f=p,m=v}return f===-1&&u>c?c:f}function QA(t){if(!t)return[];return t.split(/\s+/).filter((a)=>!a.startsWith("-")&&!/^[a-z]+:/i.test(a)&&a!=="OR").map((a)=>a.replace(/^"|"$/g,"")).filter(Boolean)}function QK(t,a){if(!a.length)return!1;let c=(typeof t==="string"?t:JSON.stringify(t)??"").toLowerCase();return a.some((u)=>c.includes(u.toLowerCase()))}function ZK(t,a,c){let u=new Set;if(t?.kind!=="assistant"||!a)return u;for(let f of t.messages)for(let m of f.parts){if(m.type==="text")continue;if(a.type==="tool_result"){if(m.type==="tool_call"&&m.id===a.callID)u.add(m);continue}if(f.seq!==a.seq)continue;if(m.type==="thinking"?QK(m.text,c):QK([m.name,m.input,m.output],c))u.add(m)}return u}function JK(t,a){if(!a.length)return[];let c=[],u=[],f="",m=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(let k=m.nextNode();k;k=m.nextNode())c.push(k),u.push(f.length),f+=k.nodeValue??"";let p=f.toLowerCase(),g=(k)=>{let S=0,I=c.length-1;while(S<I){let L=S+I+1>>1;if((u[L]??0)<=k)S=L;else I=L-1}let T=c[S];return T?[T,k-(u[S]??0)]:void 0},v=[];for(let k of a){let S=k.toLowerCase();for(let I=p.indexOf(S);I!==-1&&v.length<500;I=p.indexOf(S,I+S.length)){let T=g(I),L=g(I+S.length-1);if(!T||!L)continue;let R=document.createRange();R.setStart(T[0],T[1]),R.setEnd(L[0],L[1]+1),v.push(R)}}return v.sort((k,S)=>k.compareBoundaryPoints(Range.START_TO_START,S))}function Ebe(){return typeof CSS<"u"&&"highlights"in CSS&&typeof Highlight<"u"}function ZA(t){if(!Ebe())return;if(t.length)CSS.highlights.set("search-hit",new Highlight(...t));else CSS.highlights.delete("search-hit")}function JA(t,a,c){let u=t.getBoundingClientRect(),f=((c?.getClientRects().length)?c:a).getBoundingClientRect(),p=!c&&f.height>u.height*0.8?f.top-u.top-48:f.top+f.height/2-(u.top+u.height/2);if(Math.abs(p)>1)t.scrollTop+=p}var Pbe=1200,Abe=160,Mbe=20000,$h=new Map;function Dbe(t,a){if($h.delete(t),$h.set(t,a),$h.size>Mbe)$h.delete($h.keys().next().value)}function eW(t){let[a,c]=r(t.pinned),u=a||t.pinned,f=i(null),m=i(null);return K(()=>{let p=f.current;if(!p||!t.root)return;let g=new IntersectionObserver(([k])=>k&&Om(()=>c(k.isIntersecting)),{root:t.root,rootMargin:`${Pbe}px 0px`}),v=new IntersectionObserver(([k])=>k?.isIntersecting&&c(!0),{root:t.root});return g.observe(p),v.observe(p),()=>{g.disconnect(),v.disconnect()}},[t.root]),K(()=>{let p=m.current;if(!u||!p)return;let g=new ResizeObserver(([v])=>{if(v)Dbe(t.cacheKey,v.borderBoxSize[0]?.blockSize??p.offsetHeight)});return g.observe(p),()=>g.disconnect()},[u,t.cacheKey]),e("div",{ref:f,children:u?e("div",{ref:m,children:t.children}):e("div",{"aria-hidden":"true",style:{height:$h.get(t.cacheKey)??Abe}})})}var e4=36,tW=8,t4=8;function nW(t){return t instanceof Element?t:t.parentElement}function rW(){let t=window.getSelection();if(!t||t.isCollapsed||t.rangeCount===0)return null;let a=t.getRangeAt(0),c=nW(a.startContainer)?.closest("[data-reply]");if(!c||c!==nW(a.endContainer)?.closest("[data-reply]"))return null;if(c.hasAttribute("data-chat-live"))return null;let u=t.toString().trim();if(!u)return null;let f=a.getBoundingClientRect();if(f.bottom<0||f.top>window.innerHeight)return null;let m=f.top-e4-tW,p=m>=t4?m:f.bottom+tW,g=f.left+f.width/2-e4/2,v=Math.max(t4,Math.min(g,window.innerWidth-e4-t4)),k=Number(c.dataset.replyTime);return{text:u,model:c.dataset.replyModel,fragment:a.cloneContents(),time:Number.isFinite(k)&&k>0?k:void 0,top:p,left:v}}function oW(){let[t,a]=r(null);if(o(()=>{let c=0,u=()=>{cancelAnimationFrame(c),c=requestAnimationFrame(()=>a(rW()))},f=()=>{if(window.getSelection()?.isCollapsed)a(null)},m=()=>a((p)=>p?rW():p);return document.addEventListener("mouseup",u),document.addEventListener("keyup",u),document.addEventListener("selectionchange",f),document.addEventListener("scroll",m,!0),window.addEventListener("resize",m),()=>{cancelAnimationFrame(c),document.removeEventListener("mouseup",u),document.removeEventListener("keyup",u),document.removeEventListener("selectionchange",f),document.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m)}},[]),!t)return null;return Vt(e("div",{role:"toolbar","aria-label":"选中文本操作",style:{position:"fixed",top:t.top,left:t.left},onMouseDown:(c)=>c.preventDefault(),className:l("surface.toolbarFloating","z-50 animate-fade"),children:e(jS,{text:()=>t.text,fragment:t.fragment,model:t.model,time:t.time})}),document.body)}var Nbe=12,Obe=1500,_be=[],zbe=new Set,Bbe=[];function Fbe(t,a){let c=t.views[a];return{status:t.status,error:t.error,plugins:t.plugins,pluginsLoaded:t.pluginsLoaded,projects:t.projects,hasView:c!==void 0,entries:c?.entries??Bbe,island:t.islands?.[a]}}function QS(t){_();let a=Et(t.conn.state,(ze)=>Fbe(ze,t.session.id),Bw),c=Fh(t.conn),u=c?.models.find((ze)=>ze.id===t.session.model),f=ZG(t,a.plugins),{pending:m,editing:p,setEditing:g}=f,v=Cm(f.actions),k=w(()=>({}),[m,a.plugins,t.session.status,t.session.archivedAt,t.session.kind]),S=Cm(f.submitEdit),I=y(()=>g(void 0),[g]),T=Cm((ze)=>p&&g({...p,text:ze})),L=Cm((ze)=>p&&g({...p,attachments:ze})),R=Cm(t.onOpen),A=Cm(()=>t.onInspectContext?.()),[E,P]=r(!1);o(()=>{let ze=requestAnimationFrame(()=>{ze=requestAnimationFrame(()=>P(!0))});return()=>cancelAnimationFrame(ze)},[]);let D={entries:a.entries},N=E&&a.pluginsLoaded&&a.hasView,O=N?a.island:void 0,F=Se(),z=w(()=>({connection:t.conn,sessionID:t.session.id,onOpen:R}),[t.conn,t.session.id,R]),B=w(()=>new Set(a.plugins.filter((ze)=>ze.status==="enabled"&&F.some((lt)=>lt.id===ze.id)).map((ze)=>ze.id)),[a.plugins,F]),U=w(()=>{if(!N)return new Map;let ze=O?[...O.entries,...D.entries]:D.entries;return EK(ze,{sessionID:t.session.id,enabledPlugins:B})},[N,O,D.entries,t.session.id,B]),Y=t.session.status==="busy",G=w(()=>new Set(t.session.recallableSteers??[]),[t.session.recallableSteers]),ce=i([]),re=w(()=>{if(!N)return[];let ze=zA(D.entries,{sessionID:t.session.id,enabledPlugins:B,recallableSteers:G}),lt=PK(ce.current,BA(ze,U,{enabledPlugins:B}));return ce.current=lt,lt},[N,D.entries,B,U,t.session.id,G]),Q=w(()=>{if(!O)return _be;let ze=zA(O.entries,{sessionID:t.session.id,enabledPlugins:B});return BA(ze,U,{enabledPlugins:B})},[O,B,U,t.session.id]),ae=y((ze)=>{t.conn.unsteer(t.session.id,ze).catch((lt)=>V(lt,"撤回引导消息失败"))},[t.conn,t.session.id]),xe=N&&t.conn.hasEarlier(t.session.id),[Te,me]=r(!1),Ce=()=>{me(!0);let ze=Qe.current,lt=ze?.scrollHeight??0,Bt=ze?.scrollTop??0;t.conn.loadEarlier(t.session.id).then((vn)=>vn&&requestAnimationFrame(()=>requestAnimationFrame(()=>{if(ze)ze.scrollTop=Bt+(ze.scrollHeight-lt)}))).catch(()=>{}).finally(()=>me(!1))},{turns:Be,live:X}=w(()=>N?LK(re,Y):{turns:re},[N,Y,re]),He=w(()=>Q.length?[...Q,...Be]:Be,[Q,Be]),Le=O?Q.length:-1,J=(ze,lt)=>{if(lt.kind!=="assistant")return lt.key;let Bt=He[ze-1];return Bt?Bt.kind==="assistant"?Bt.end?.seq??Bt.key:Bt.key:0},Me=i(void 0);if(Me.current===void 0&&N){let ze=He.length-1,lt=He[ze];Me.current=lt?J(ze,lt):-1}let Ie=(ze,lt)=>Me.current!==void 0&&J(ze,lt)>Me.current,{containerRef:qe,scrollRef:Qe,contentRef:Re,scrollbarRef:Ne,isAtBottom:ut,scrollToBottom:kt,release:It,ready:Ee}=dK(JSON.stringify([t.conn.server.id,t.session.id]),He.length,N),[nt,Kt]=r();o(()=>{let ze=t.target;if(!ze||!N)return;let lt=!1;return t.conn.openAround(t.session.id,ze.seq,ze.q).then((Bt)=>!lt&&Bt&&Kt({...ze}),(Bt)=>!lt&&V(Bt,"定位到该消息失败")),()=>{lt=!0}},[t.target,N,t.conn,t.session.id]);let an=w(()=>{if(!nt)return-1;return O!==void 0&&nt.seq>=O.from&&nt.seq<=O.to?YA(He,nt.seq,0,Le):YA(He,nt.seq,Math.max(0,Le))},[nt,O,He,Le]),mn=He[an],br=mn?`${mn.kind}:${J(an,mn)}`:void 0,Ao=w(()=>{if(!nt)return new Set;let ze=O?.entries.find((lt)=>lt.seq===nt.seq)??D.entries.find((lt)=>lt.seq===nt.seq);return ZK(mn,ze,QA(nt.q))},[nt,O,D.entries,mn]);K(()=>{let ze=Qe.current;if(!nt||!Ee||!br||!ze)return;let lt=Re.current?.querySelector(`[data-turn-key="${CSS.escape(br)}"]`);if(!lt)return;It();let Bt=QA(nt.q),vn=performance.now(),wr=!1,hn=0,kr=()=>{let yb=JK(lt,Bt);return ZA(yb),yb[0]},ar=()=>{if(!wr&&performance.now()-vn<Obe)JA(ze,lt,kr());else kr()};JA(ze,lt,kr()),hn=requestAnimationFrame(()=>{ar(),hn=requestAnimationFrame(ar)});let Fo=setTimeout(ar,300),Fc=new MutationObserver(()=>{cancelAnimationFrame(hn),hn=requestAnimationFrame(ar)});Fc.observe(lt,{subtree:!0,childList:!0,characterData:!0});let Rr=()=>ar(),ir=()=>{wr=!0};ze.addEventListener("load",Rr,!0),ze.addEventListener("wheel",ir,{passive:!0}),ze.addEventListener("touchstart",ir,{passive:!0}),ze.addEventListener("keydown",ir),lt.removeAttribute("data-search-flash"),lt.offsetWidth,lt.setAttribute("data-search-flash","");let sa=setTimeout(()=>lt.removeAttribute("data-search-flash"),2000);return()=>{cancelAnimationFrame(hn),clearTimeout(Fo),clearTimeout(sa),Fc.disconnect(),ze.removeEventListener("load",Rr,!0),ze.removeEventListener("wheel",ir),ze.removeEventListener("touchstart",ir),ze.removeEventListener("keydown",ir),lt.removeAttribute("data-search-flash"),ZA([])}},[nt,Ee,br,It,Qe,Re]);let[Ba,Fl]=r(!1),or=()=>{Fl(!0),t.conn.loadLater(t.session.id).catch((ze)=>V(ze,"加载失败")).finally(()=>Fl(!1))},Vl=()=>{t.conn.closeIsland(t.session.id),Kt(void 0),requestAnimationFrame(kt)},mi=D.entries[0]?.seq,Ge=O?Math.max(0,(mi??O.to+1)-O.to-1):0,Tt=w(()=>{let ze=0;for(let lt of[...O?.entries??[],...D.entries])if(lt.type==="compaction")ze=Math.max(ze,lt.through);return ze},[O,D.entries]),he=O&&n("div",{"data-island-gap":"",className:"flex flex-col items-center gap-2 rounded-xl border border-dashed border-line px-4 py-4 text-[13px] text-faint",children:[n("span",{children:["跳过了 ",Ge.toLocaleString()," 条"]}),n("div",{className:"flex flex-wrap justify-center gap-2",children:[n(b,{size:"sm",variant:"ghost",disabled:Ba,onClick:or,children:[e(ge,{className:"size-4"}),Ba?"正在加载…":"加载更多"]}),n(b,{size:"sm",variant:"ghost",onClick:Vl,children:[e(m0,{className:"size-4"}),"回到最新"]})]})]},"island-gap"),ft=a.projects.find((ze)=>ze.id===t.session.projectID)?.directory;return e(ES.Provider,{value:ft,children:n("div",{ref:qe,className:"relative flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(oW,{}),e(de,{initial:!1,children:!Ee&&e(H.div,{role:"status",initial:{opacity:1},animate:{opacity:1},exit:{opacity:0,scale:0.96},transition:{duration:0.24,ease:[0.22,1,0.36,1]},className:"absolute inset-0 z-10 flex flex-col items-center justify-center bg-bg",children:e(hc,{size:"md",text:a.status==="open"?"正在加载会话…":a.error||(a.status==="offline"?"连接已断开,等待重连…":"正在加载会话…")})},"session-loading")}),n("div",{className:"relative min-h-0 flex-1",children:[e("div",{ref:Qe,"aria-busy":!Ee,style:{visibility:Ee?"visible":"hidden",overflowAnchor:!Ee||ut?"none":"auto"},className:"chat-scroll-area absolute inset-0 overflow-y-auto overscroll-y-contain scroll-auto [scrollbar-gutter:stable]",children:n("div",{ref:Re,className:"mx-auto flex max-w-3xl flex-col gap-7 px-4 pt-6 pb-12 sm:px-8",children:[e(Ol,{name:"chat:banner",sessionID:t.session.id,session:t.session,connection:t.conn,plugins:a.plugins,context:{session:t.session}}),xe&&e("div",{className:"flex justify-center",children:e(b,{size:"sm",variant:"ghost",disabled:Te,onClick:Ce,children:Te?"正在加载…":"加载更早的记录"})}),O&&O.from<=Tt&&e("div",{className:"text-center text-xs text-faint",children:"以下为已压缩的历史原文"}),e(qA.Provider,{value:z,children:He.map((ze,lt)=>{let Bt=lt===Le?void 0:He[lt-1],vn=XA(ze,X),wr=Bt?XA(Bt,X):!1,hn=`${ze.kind}:${J(lt,ze)}`,kr=e("div",{"data-turn-key":hn,className:d(vn&&wr?"-mt-5.5":vn&&Bt?.kind==="assistant"?"-mt-5":!vn&&ze.kind==="assistant"&&wr?"-mt-4":void 0),children:e(eW,{cacheKey:`${t.session.id}:${ze.kind}:${J(lt,ze)}`,root:Qe.current,pinned:lt>=He.length-Nbe||ze===X||lt===an||p!==void 0&&ze.kind==="user"&&ze.key===p.seq,children:e(cb.Provider,{value:lt===an?Ao:zbe,children:e(XK,{turn:ze,index:lt,live:X,fresh:Ie(lt,ze),conn:t.conn,sessionID:t.session.id,enabledPlugins:B,results:U,editing:p,pendingEdit:m,onStartEdit:g,onCancelEdit:I,onChangeEdit:T,onChangeAttachments:L,onSubmitEdit:S,onRecallSteer:Y&&t.session.kind!=="sub"?ae:void 0,recallableSteers:G,actions:v,actionsKey:k,onOpen:R,onInspectContext:t.onInspectContext?A:void 0})})})},hn);return lt===Le?[he,kr]:kr})}),Le===He.length&&he]})}),e("div",{ref:Ne,"aria-hidden":"true",style:{visibility:Ee?"visible":"hidden"},className:"chat-scrollbar-overlay"}),e("div",{style:{visibility:Ee?"visible":"hidden"},className:"pointer-events-none absolute inset-x-0 bottom-0 h-6 bg-gradient-to-t from-bg to-transparent"}),e(de,{children:!ut&&e(H.div,{initial:{opacity:0,y:8,scale:0.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:0.9},transition:Is,className:"absolute bottom-3 left-1/2 -translate-x-1/2",children:e(b,{size:"icon","aria-label":"回到底部",onClick:kt,className:l("chat.scrollBottomBtn"),children:e(p0,{className:"size-4"})})})})]}),e(uK,{conn:t.conn,session:t.session,entriesLength:D.entries.length,entries:D.entries,plugins:a.plugins,commands:t.commands,busy:Y,ready:Ee,models:c,currentModel:u,onOpen:t.onOpen,onInspectContext:t.onInspectContext,onConfigureModels:t.onConfigureModels,onScrollToBottom:kt,archived:t.archived})]})})}var Oi=jt(null);function ne(t){if(_(),M(Oi)&&!t.unboxed)return n("section",{className:"not-first:-mx-5 not-first:border-t not-first:border-line not-first:px-5 not-first:pt-5",children:[n("div",{className:"mb-1 flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[e("h2",{className:l("settings.groupTitle","font-semibold text-ink"),children:t.title}),t.description&&e("p",{className:l("settings.groupDesc"),children:t.description})]}),t.action]}),e("div",{children:t.children})]});return n("section",{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:l("settings.groupTitle"),children:t.title}),t.description&&e("p",{className:l("settings.groupDesc"),children:t.description})]}),t.action]}),e("div",{className:t.unboxed?"space-y-3":l("settings.groupBox"),children:t.children})]})}function W(t){_();let a=M(Oi);return n("div",{className:l("settings.row",a&&"gap-x-6 gap-y-2 px-0 py-2.5",t.vertical&&"block"),children:[n("div",{className:"min-w-0 flex-1 basis-56",children:[e("div",{className:l("settings.rowTitle",a&&"text-[13px] font-normal"),children:t.title}),t.description&&e("div",{className:l("settings.rowDesc",a&&"text-faint"),children:t.description})]}),t.children&&e("div",{className:t.vertical?"mt-3 min-w-0":"flex max-w-full shrink-0 flex-wrap items-center gap-2",children:t.children})]})}function is(t){let a=M(Oi);if(a?.footer)return Vt(t.children,a.footer);return e("div",{className:"flex flex-wrap items-center justify-end gap-2 px-0.5",children:t.children})}var n4=jt(null);function Vbe(t){let a=M(n4);if(!a)throw Error("SessionView 只能在宿主渲染的插件 card / page 视图内使用");let{connection:c,onOpen:u}=a,f=Et(c.state,(p)=>p.sessions.find((g)=>g.id===t.sessionID)),m=f===void 0;if(o(()=>c.subscribe(t.sessionID),[c,t.sessionID]),o(()=>{if(!m)return;c.loadSession(t.sessionID).catch((p)=>V(p,"会话不存在或已删除"))},[c,t.sessionID,m]),!f)return e("div",{className:"flex min-h-0 flex-1 items-center justify-center",children:e(hc,{size:"md",text:"正在加载会话…"})});return e(QS,{conn:c,session:f,onOpen:u},f.id)}var Yi={Input:te,Textarea:yr,Switch:_t,Select:Xt,Form:Zt,FormError:wt,Field:ue,Dialog:Yt,DialogFooter:im,confirm:Ke,promptText:hE,Button:b,cn:d,Code:Ts,Chevron:tt,DetailTitle:ts,DetailList:ns,DetailRow:qr,DetailFold:rs,DetailChip:ri,Collapsible:Oe,CollapsibleContent:De,CollapsibleTrigger:$e,CopyButton:Ot,Panel:Ro,ScrollArea:ai,CatalogRow:Mi,StatusChip:it,Tooltip:ui,Segmented:Pi,Markdown:fi,ModelSelector:Gh,ModelIcon:st,SettingGroup:ne,SettingRow:W,SettingActions:is,PageLayout:as,Composer:dd,SessionView:Vbe,highlightSync:_w,prepare:Ow,useColorScheme:()=>_().resolved,useTheme:_,style:l};function Kh(t){return new Map(Ae().map((a)=>[a.id,new Map(Object.entries(a.views??{}).filter(([,c])=>c.kind===t).map(([c,u])=>[c,u]))]))}var r4=Kh("tab"),iW=Kh("page"),sW=Kh("card");pn(()=>{r4=Kh("tab"),iW=Kh("page"),sW=Kh("card")});function o4(t){return kc(t,t.load)}function os(t,a){return r4.get(t)?.has(a)??!1}var aW=new WeakMap;function xd(t){let a=aW.get(t);if(a)return a;let c={request:(u,f)=>t.request(u,f),requestStream:(u,f)=>t.requestStream(u,f)};return aW.set(t,c),c}function ss({pluginID:t,viewID:a,connection:c,onClose:u}){Se();let f=r4.get(t)?.get(a),m=f?.kind==="tab"?o4(f):void 0;if(!m)return null;let p=xd(c);return e(aa,{pluginID:t,resetKey:m,fallbackText:"插件设置页面加载失败",children:e(Je,{value:Yi,children:e(qo,{fallback:e("p",{className:"p-3 text-xs text-faint",children:"正在加载插件配置…"}),children:e(m,{connection:p,onClose:u})})})})}function lW({pluginID:t,viewID:a,connection:c,onOpen:u}){Se();let f=iW.get(t)?.get(a),m=f?.kind==="page"?o4(f):void 0;if(!m)return null;let p=xd(c);return e(aa,{pluginID:t,resetKey:m,fallbackText:"插件页面加载失败",children:e(Je,{value:Yi,children:e(n4,{value:{connection:c,onOpen:u},children:e(qo,{fallback:e("div",{className:"flex flex-1 items-center justify-center text-xs text-dim",children:"正在加载插件页面…"}),children:e(m,{connection:p,onOpen:u})})})})})}function YK({pluginID:t,viewID:a,sessionID:c,payload:u,connection:f,onOpen:m,fallback:p}){Se();let g=sW.get(t)?.get(a),v=g?.kind==="card"?o4(g):void 0;if(!v)return p??null;let k=xd(f);return e(aa,{pluginID:t,resetKey:v,fallbackText:"插件卡片渲染失败",children:e(Je,{value:Yi,children:e(n4,{value:{connection:f,onOpen:m},children:e(qo,{fallback:e("p",{"data-render-pending":"true",className:"p-3 text-xs text-faint",children:"正在加载卡片…"}),children:e(v,{connection:k,sessionID:c,payload:u,onOpen:m})})})})})}function Tl(t){switch(t){case"Plug":return e(U0,{});case"FileText":return e(xt,{});case"Palette":return e(fa,{});case"Globe":return e(Ue,{});case"Keyboard":return e(pa,{});case"Cpu":return e(dr,{});case"Puzzle":return e(Mt,{});case"Database":return e(pr,{});case"Server":return e(Bn,{});case"ShieldCheck":return e(Fn,{});default:return e(Mt,{})}}function cW(){return Ae().filter((t)=>Boolean(t.pageNav)).map((t)=>({pluginID:t.id,...t.pageNav}))}var Rm=cW();pn(()=>{Rm=cW()});var Ube={request:async()=>{throw Error("Connection not available in this slot")}};function Ol(t){Se();let a=new Set(t.plugins.filter((m)=>m.status==="enabled").map((m)=>m.id)),c=Ae().filter((m)=>a.has(m.id)&&Boolean(m.slots?.[t.name]));if(!c.length)return t.children?t.children:null;let u=t.connection?xd(t.connection):Ube,f=t.children;for(let m of c){let p=m.slots?.[t.name];if(!p)continue;f=e(aa,{pluginID:m.id,resetKey:p,fallback:f,fallbackText:"插件插槽渲染失败",children:e(Je.Provider,{value:Yi,children:e(p,{connection:u,sessionID:t.sessionID,session:t.session,context:t.context,children:f})})},m.id)}return e(h,{children:f})}var qbe=[{label:"Cloudflare Access",names:["CF-Access-Client-Id","CF-Access-Client-Secret"]}],uW=(t="")=>({id:Vr(),name:t,value:""}),dW="h-9 min-w-0 bg-transparent px-3 font-mono text-[12.5px] text-ink outline-none placeholder:font-sans placeholder:text-faint focus:bg-accent-soft disabled:opacity-60",fW="inline-flex h-7 cursor-pointer items-center gap-1 rounded-full px-2.5 text-xs text-dim outline-none transition-colors hover:text-ink focus-visible:ring-2 focus-visible:ring-accent disabled:cursor-default disabled:opacity-50";function mW(t){let[a,c]=r(!1),u=t.rows.filter((m)=>m.name.trim()).length,f=(m,p)=>t.onChange(t.rows.map((g)=>g.id===m?{...g,...p}:g));return n(Oe,{children:[n("div",{className:"flex items-center gap-2",children:[n($e,{className:"group/collapsible -ml-1 flex min-w-0 flex-1 cursor-pointer items-center gap-1 rounded-md px-1 py-0.5 text-left text-[13px] font-medium text-dim outline-none transition-colors hover:text-ink focus-visible:ring-2 focus-visible:ring-accent",children:[e(tt,{className:"size-3.5"}),e("span",{children:"请求头"}),e("span",{className:"truncate font-normal text-faint",children:u?`· 已配置 ${u} 项`:"· 可选,用于穿过网关或隧道"})]}),t.rows.length>0&&e(j,{label:a?"隐藏值":"显示值",size:"icon-xs","aria-pressed":a,onClick:()=>c(!a),children:a?e(L0,{className:"size-3.5"}):e(R0,{className:"size-3.5"})})]}),e(De,{children:n("div",{className:"flex min-w-0 flex-col gap-2.5 pt-2.5",children:[t.rows.length>0&&e("div",{className:"divide-y divide-line overflow-hidden rounded-xl border border-line-strong",children:t.rows.map((m,p)=>n("div",{className:"flex min-w-0 items-center",children:[e("input",{"aria-label":`请求头 ${p+1} 名称`,placeholder:"名称",spellCheck:!1,autoCapitalize:"off",value:m.name,disabled:t.disabled,className:d(dW,"w-[52%] shrink-0 border-r border-line"),onChange:(g)=>f(m.id,{name:g.target.value})}),e("input",{"aria-label":`请求头 ${p+1} 值`,placeholder:"值",type:a?"text":"password",autoComplete:"off",spellCheck:!1,value:m.value,disabled:t.disabled,className:d(dW,"flex-1"),onChange:(g)=>f(m.id,{value:g.target.value})}),e(j,{label:`删除请求头 ${p+1}`,size:"icon-xs",disabled:t.disabled,className:"mx-1 shrink-0 text-faint hover:text-danger",onClick:()=>t.onChange(t.rows.filter((g)=>g.id!==m.id)),children:e(oe,{className:"size-3.5"})})]},m.id))}),n("div",{className:"flex flex-wrap items-center gap-1.5",children:[n("button",{type:"button",disabled:t.disabled,onClick:()=>t.onChange([...t.rows,uW()]),className:d(fW,"border border-dashed border-line-strong hover:border-accent hover:text-accent"),children:[e(we,{className:"size-3"}),"添加"]}),qbe.map((m)=>e("button",{type:"button",disabled:t.disabled,onClick:()=>t.onChange([...t.rows.filter((p)=>p.name||p.value),...m.names.filter((p)=>!t.rows.some((g)=>g.name.toLowerCase()===p.toLowerCase())).map(uW)]),className:d(fW,"bg-accent-soft hover:text-accent"),children:m.label},m.label))]}),e("p",{className:"text-xs leading-5 text-faint",children:"仅保存在本设备。认证和内容类型由应用管理,不能覆盖。"})]})})]})}var a4=[0.22,1,0.36,1],pW=[0,1,2,3,4,5,6,7],hW="pointer-events-none absolute -inset-px rounded-[inherit] p-px",gW={mask:"linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",maskComposite:"exclude",WebkitMask:"linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",WebkitMaskComposite:"xor"};function vW(t){let[a,c]=r(t.initialURL??""),[u,f]=r([]),[m,p]=r(()=>Dc(t.initialCode??"")),[g,v]=r(t.initialError),[k,S]=r(!1),[I,T]=r(!1),[L,R]=r(!1),[A,E]=r({status:"idle"}),P=i(null),D=Dc(m),N=A.status==="open",O=N?0:Math.round((1-D.length/8)*16),F=y(async(re,Q)=>{if(!re.trim())return;S(!0),v(void 0);try{let ae=Q?Dc(Q):void 0;t.onAdded(await rd(re,ae||void 0,yE(u)))}catch(ae){v(ot(ae))}finally{S(!1)}},[t.onAdded,u]);o(()=>{let re=a.trim();if(!re){E({status:"idle"});return}let Q=!1,ae=re===t.initialURL?0:280,xe=setTimeout(async()=>{let Te=Ls(re);if(!$be(Te)){if(!Q)E({status:"idle"});return}if(!Q)E({status:"checking"});try{let me=await nd(Te,yE(u));if(Q)return;E({status:!me.auth||me.localApproval?"open":"auth"})}catch{if(!Q)E({status:"offline"})}},ae);return()=>{Q=!0,clearTimeout(xe)}},[a,t.initialURL,u]);let z=y((re)=>{let Q=Sh(re);if(!Q)return!1;let ae=Q.server??a,xe=Q.code!==void 0?Q.code:D;if(Q.server)c(Q.server);if(Q.code!==void 0)p(Q.code);if(v(void 0),ae.trim()&&xe.length===8&&!k)F(ae,xe);return!0},[a,D,k,F]);o(()=>{function re(Q){let ae=Q.target;if(ae instanceof HTMLInputElement||ae instanceof HTMLTextAreaElement)return;let xe=Q.clipboardData?.getData("text")??"";if(z(xe))Q.preventDefault()}return window.addEventListener("paste",re),()=>window.removeEventListener("paste",re)},[z]);function B(re){let Q=Sh(re);if(Q?.server)c(Q.server);let ae=Dc(Q?.code??re);if(p(ae),v(void 0),ae.length===8&&(Q?.server??a).trim()&&!k)F(Q?.server??a,ae)}function U(re){let Q=re.clipboardData.getData("text"),ae=Sh(Q);if(ae&&(ae.server||ae.code))re.preventDefault(),z(Q)}async function Y(){try{let re=await navigator.clipboard.readText();if(!z(re)){let Q=Dc(re);if(Q)p(Q),P.current?.focus()}}catch{P.current?.focus()}}function G(re){if(re.pointerType==="touch")return;let Q=re.currentTarget.getBoundingClientRect();re.currentTarget.style.setProperty("--mx",`${re.clientX-Q.left}px`),re.currentTarget.style.setProperty("--my",`${re.clientY-Q.top}px`)}async function ce(re){re.preventDefault(),await F(a,D||void 0)}return n("div",{className:"relative flex min-h-full flex-1 flex-col items-center justify-center overflow-y-auto overscroll-y-contain px-4 py-8",children:[t.onCancel&&n(b,{variant:"ghost",size:"sm",onClick:t.onCancel,className:"absolute top-3 left-3 z-20",children:[e(tr,{className:"size-4"}),"返回"]}),n("div",{className:"relative my-auto flex w-full max-w-md flex-col items-center",children:[e(H.div,{initial:{opacity:0,scale:0.94},animate:{opacity:1,scale:1},transition:{duration:0.65,ease:a4},className:"pointer-events-none absolute -top-24 select-none sm:-top-28",children:e(Aa,{variant:"watermark",className:"size-64 text-ink sm:size-72",spread:O})}),n(H.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:0.55,delay:0.04,ease:a4},className:"relative z-10 mb-5 flex flex-col items-center text-center",children:[e("h1",{className:"font-serif text-[1.85rem] leading-tight tracking-[-0.02em]",children:"连接到 Basalt"}),n("p",{className:"mt-2 text-sm text-dim",children:["在终端运行 ",e("code",{className:"rounded bg-raised px-1.5 py-0.5 font-mono text-[0.88em] text-ink",children:"basalt"}),",输入配对码或粘贴配对链接。"]})]}),e(H.div,{initial:{opacity:0,y:14},animate:{opacity:1,y:0},transition:{duration:0.6,delay:0.08,ease:a4},className:"relative z-10 w-full",children:n(Zt,{onSubmit:ce,onPointerMove:G,className:d("group/composer relative min-w-0 rounded-[20px] border border-line bg-panel p-5 shadow-[inset_0_1px_0_oklch(1_0_0/0.045),var(--shadow-composer)] transition-[border-color,box-shadow] duration-300","focus-within:border-line-strong focus-within:shadow-[inset_0_1px_0_oklch(1_0_0/0.07),0_14px_38px_-10px_color-mix(in_oklch,var(--color-accent)_14%,transparent),var(--shadow-composer)]"),children:[e("div",{"aria-hidden":"true",style:{background:"radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklch, var(--color-accent) 6.5%, transparent), transparent 70%)"},className:"pointer-events-none absolute inset-0 rounded-[inherit] opacity-0 transition-opacity duration-300 group-hover/composer:opacity-100"}),e("div",{"aria-hidden":"true",style:{...gW,background:"radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklch, var(--color-accent) 75%, var(--color-line-strong)), transparent 75%)"},className:d(hW,"opacity-0 transition-opacity duration-300 group-hover/composer:opacity-100")}),k&&e("div",{"aria-hidden":"true",style:{...gW,backgroundImage:"linear-gradient(110deg, transparent 25%, color-mix(in oklch, var(--color-accent) 35%, transparent) 45%, var(--color-accent) 50%, color-mix(in oklch, var(--color-accent) 35%, transparent) 55%, transparent 75%)",backgroundSize:"200% 100%"},className:d(hW,"animate-shimmer")}),e(ue,{label:"地址",aside:e(jbe,{probe:A}),className:"relative",children:(re)=>n("div",{className:"relative flex items-center",children:[e(Bn,{className:"pointer-events-none absolute left-3 size-4 text-faint"}),e(te,{id:re,className:"pl-9 font-mono text-[13.5px]",placeholder:"https://my-box.tailnet.ts.net",autoComplete:"url",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,inputMode:"url",autoFocus:!t.initialURL,required:!0,value:a,onChange:(Q)=>c(Q.target.value),onPaste:U})]})}),e(ue,{label:N?"配对码(免密可留空)":"配对码",hint:"配对码使用一次后失效。",className:"relative",aside:n("div",{className:"flex items-center gap-2",children:[e("span",{className:d("font-mono text-[11px] transition-colors",D.length===8?"font-medium text-accent-strong":"text-faint"),children:D.length===8?"已就绪":`${D.length}/8`}),n("button",{type:"button",onClick:Y,className:"inline-flex items-center gap-1 rounded-md border border-line bg-bg px-1.5 py-0.5 text-[11px] text-dim transition-colors hover:border-line-strong hover:bg-raised hover:text-ink",title:"从剪贴板粘贴配对码或配对链接",children:[e(C0,{className:"size-3"}),e("span",{children:"粘贴"})]})]}),children:(re)=>n("div",{className:"relative pt-0.5",children:[e(te,{ref:P,id:re,value:L?m:Gbe(D),onChange:(Q)=>{if(L){p(Q.target.value);return}B(Q.target.value)},onCompositionStart:(Q)=>{p(Q.currentTarget.value),R(!0)},onCompositionEnd:(Q)=>{R(!1),B(Q.currentTarget.value)},onPaste:U,onFocus:()=>T(!0),onBlur:()=>T(!1),placeholder:"XXXX-XXXX",autoComplete:"one-time-code",autoCapitalize:"characters",autoCorrect:"off",spellCheck:!1,autoFocus:Boolean(t.initialURL),className:"absolute inset-0 z-10 h-full w-full cursor-text opacity-0 font-mono tracking-[0.2em] uppercase"}),n("div",{"aria-hidden":"true",className:"flex items-center justify-between gap-1.5 select-none sm:gap-2",children:[e(xW,{slots:pW.slice(0,4),code:D,focused:I}),e("div",{className:"flex flex-col items-center justify-center px-0.5",children:e("span",{className:d("h-0.5 w-2.5 rounded-full transition-colors duration-200",D.length>=4?"bg-accent":"bg-line-strong")})}),e(xW,{slots:pW.slice(4,8),code:D,focused:I})]})]})}),e(mW,{rows:u,onChange:f,disabled:k}),e(wt,{children:g}),e(b,{type:"submit",variant:"primary",size:"lg",loading:k,className:"relative mt-1 w-full",children:D.length===8?n(h,{children:[e(Z,{className:"size-4"}),e("span",{children:"验证并连接"})]}):"连接"})]})})]})]})}function xW(t){return e("div",{className:"grid flex-1 grid-cols-4 gap-1.5",children:t.slots.map((a)=>e(Hbe,{index:a,char:t.code[a],active:t.focused&&(a===t.code.length||t.code.length===8&&a===7),completed:t.code.length===8},a))})}function Hbe(t){let a=Boolean(t.char);return e("div",{className:d("relative flex h-11 items-center justify-center rounded-[11px] border font-mono text-[16px] font-semibold transition-[border-color,background-color,box-shadow,transform] duration-150 sm:h-11.5",t.active?"-translate-y-0.5 border-accent bg-bg text-ink shadow-[0_0_0_3px_var(--color-accent-soft)]":t.completed?"border-accent/55 bg-accent-soft/40 text-ink":a?"border-line-strong bg-bg text-ink shadow-2xs":"border-line bg-bg/55 text-faint"),children:e(de,{mode:"popLayout",initial:!1,children:t.char?e(H.span,{initial:{opacity:0,y:5,scale:0.75},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:0.75},transition:Is,children:t.char},`${t.index}-${t.char}`):t.active?e(H.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"h-4 w-0.5 animate-pulse rounded-full bg-accent"},"caret"):e("span",{className:"size-1 rounded-full bg-line-strong/80"},"dot")})})}function jbe({probe:t}){switch(t.status){case"checking":return e(it,{tone:"neutral",pulse:!0,children:"探测中"});case"open":return e(it,{tone:"success",pulse:!0,children:"在线 · 免密直连"});case"auth":return e(it,{tone:"success",pulse:!0,children:"在线 · 需配对"});case"offline":return e(it,{tone:"warning",children:"未响应"});default:return null}}function Gbe(t){if(t.length<=4)return t;return`${t.slice(0,4)}-${t.slice(4,8)}`}function $be(t){try{return Boolean(new URL(t).host)}catch{return!1}}var bW=["shift","alt","meta","mod","ctrl","control"];function Kbe(){return typeof navigator>"u"?!1:/mac/i.test(navigator.userAgent)&&!/iphone|ipad|ipod/i.test(navigator.userAgent)}var Wbe={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function vd(t){return(Wbe[t.trim()]||t.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function yW(t){return bW.includes(t)}function i4(t,a=","){return t.toLowerCase().split(a)}function s4(t,a="+",c=">",u=!1,f,m){let p=[],g=!1;t=t.trim(),t.includes(c)?(g=!0,p=t.toLocaleLowerCase().split(c).map((S)=>vd(S))):p=t.toLocaleLowerCase().split(a).map((S)=>vd(S));let v={alt:p.includes("alt"),ctrl:p.includes("ctrl")||p.includes("control"),shift:p.includes("shift"),meta:p.includes("meta"),mod:p.includes("mod"),useKey:u},k=p.filter((S)=>!bW.includes(S));return{...v,keys:k,description:f,isSequence:g,hotkey:t,metadata:m}}typeof document<"u"&&(document.addEventListener("keydown",(t)=>{t.code!==void 0&&wW([vd(t.code)])}),document.addEventListener("keyup",(t)=>{t.code!==void 0&&kW([vd(t.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Ps.clear()}),window.addEventListener("focus",()=>{Ps.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Ps.clear()},0)})),typeof document<"u"&&document.addEventListener("visibilitychange",()=>{Ps.clear()});var Ps=new Set;function l4(t){return Array.isArray(t)}function Xbe(t,a=","){return(l4(t)?t:t.split(a)).every((c)=>Ps.has(c.trim().toLowerCase()))}function wW(t){let a=Array.isArray(t)?t:[t];Ps.has("meta")&&Ps.forEach((c)=>{yW(c)||Ps.delete(c.toLowerCase())}),a.forEach((c)=>{Ps.add(c.toLowerCase())})}function kW(t){t==="meta"?Ps.clear():(Array.isArray(t)?t:[t]).forEach((a)=>{Ps.delete(a.toLowerCase())})}function Ybe(t,a,c){(typeof c=="function"&&c(t,a)||c===!0)&&t.preventDefault()}function Qbe(t,a,c){return typeof c=="function"?c(t,a):c===!0||c===void 0}var Zbe=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function Jbe(t){return SW(t,Zbe)}function SW(t,a=!1){let{target:c,composed:u}=t,f,m;return eye(c)&&u?(f=t.composedPath()[0]&&t.composedPath()[0].tagName,m=t.composedPath()[0]&&t.composedPath()[0].role):(f=c&&c.tagName,m=c&&c.role),l4(a)?!!(f&&a?.some((p)=>p.toLowerCase()===f.toLowerCase()||p===m)):!!(f&&a&&a)}function eye(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function tye(t,a){return t.length===0&&a?!1:a?t.some((c)=>a.includes(c))||t.includes("*"):!0}var nye=(t,a,c=!1)=>{let{alt:u,meta:f,mod:m,shift:p,ctrl:g,keys:v,useKey:k}=a,{code:S,key:I,ctrlKey:T,metaKey:L,shiftKey:R,altKey:A}=t,E=vd(S),P=typeof t.getModifierState=="function"&&t.getModifierState("AltGraph");if(!k&&!v?.includes(E)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(E))return!1;if(!c){if(u!==A&&E!=="alt"||p!==R&&E!=="shift")return!1;if(m){if(Kbe()?!L:!T)return!1}else if(f!==L&&E!=="meta"&&E!=="os"||g!==T&&E!=="ctrl"&&E!=="control")return!1;if(P&&!u&&!g&&!m&&!["alt","ctrl","control"].includes(E))return!1}return k&&v?.length===1&&v.includes(I.toLowerCase())||v&&v.length===1&&v.includes(E)?!0:v&&v.length>0?v.includes(E)?Xbe(v):!1:!v||v.length===0},rye=jt(void 0),oye=()=>M(rye);function CW(t,a){return t&&a&&typeof t=="object"&&typeof a=="object"?Object.keys(t).length===Object.keys(a).length&&Object.keys(t).reduce((c,u)=>c&&CW(t[u],a[u]),!0):t===a}var aye=jt({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),iye=()=>M(aye);function sye(t){let a=i(void 0);return CW(a.current,t)||(a.current=t),a.current}var lye=(t)=>{t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},cye=typeof window<"u"?K:o;function uye(t){if(!t)return;let{enabled:a,preventDefault:c,ignoreEventWhen:u,...f}=t;return typeof a=="function"?f:{...f,enabled:a}}function ub(t,a,c,u){let[f,m]=r(null),p=y((N)=>(m(N),()=>m(null)),[]),g=i(!1),v=Array.isArray(c)?Array.isArray(u)?void 0:u:c,k=l4(t)?t.join(v?.delimiter):t,S=Array.isArray(c)?c:Array.isArray(u)?u:void 0,I=y(a,S??[]),T=i(I);S?T.current=I:T.current=a;let L=sye(uye(v)),R=i(v?.enabled);R.current=v?.enabled;let A=i(v?.preventDefault);A.current=v?.preventDefault;let E=i(v?.ignoreEventWhen);E.current=v?.ignoreEventWhen;let{activeScopes:P}=iye(),D=oye();return cye(()=>{if(R.current===!1||!tye(P,L?.scopes))return;let N=[],O,F=(Y,G=!1)=>{if(!(Jbe(Y)&&!SW(Y,L?.enableOnFormTags))){if(f!==null){let ce=f.getRootNode();if((ce instanceof Document||ce instanceof ShadowRoot)&&ce.activeElement!==f&&!f.contains(ce.activeElement)){lye(Y);return}}Y.target?.isContentEditable&&!L?.enableOnContentEditable||i4(k,L?.delimiter).forEach((ce)=>{if(ce.includes(L?.splitKey??"+")&&ce.includes(L?.sequenceSplitKey??">")){console.warn(`Hotkey ${ce} contains both ${L?.splitKey??"+"} and ${L?.sequenceSplitKey??">"} which is not supported.`);return}let re=s4(ce,L?.splitKey,L?.sequenceSplitKey,L?.useKey,L?.description,L?.metadata);if(re.isSequence){O=setTimeout(()=>{N=[]},L?.sequenceTimeoutMs??1000);let Q=re.useKey?Y.key:vd(Y.code);if(yW(Q.toLowerCase()))return;if(N.push(Q),Q!==re.keys?.[N.length-1]){N=[],O&&clearTimeout(O);return}N.length===re.keys?.length&&(T.current(Y,re),O&&clearTimeout(O),N=[])}else if(nye(Y,re,L?.ignoreModifiers)||re.keys?.includes("*")){if(E.current?.(Y)||G&&g.current||(Ybe(Y,re,A.current),!Qbe(Y,re,R.current)))return;T.current(Y,re),G||(g.current=!0)}})}},z=(Y)=>{Y.code!==void 0&&(wW(vd(Y.code)),(L?.keydown===void 0&&L?.keyup!==!0||L?.keydown)&&F(Y))},B=(Y)=>{Y.code!==void 0&&(kW(vd(Y.code)),g.current=!1,L?.keyup&&F(Y,!0))},U=f||v?.document||document;return U.addEventListener("keyup",B,v?.eventListenerOptions),U.addEventListener("keydown",z,v?.eventListenerOptions),D&&i4(k,L?.delimiter).forEach((Y)=>{D.addHotkey(s4(Y,L?.splitKey,L?.sequenceSplitKey,L?.useKey,L?.description,L?.metadata))}),()=>{U.removeEventListener("keyup",B,v?.eventListenerOptions),U.removeEventListener("keydown",z,v?.eventListenerOptions),D&&i4(k,L?.delimiter).forEach((Y)=>{D.removeHotkey(s4(Y,L?.splitKey,L?.sequenceSplitKey,L?.useKey,L?.description,L?.metadata))}),N=[],O&&clearTimeout(O)}},[f,L,P,k]),p}var IW={};function TW(t){return t.views===IW&&!t.islands?t:{...t,views:IW,islands:void 0}}class ZS extends Error{constructor(t,a){super(t),this.name="ParseError",this.type=a.type,this.field=a.field,this.value=a.value,this.line=a.line}}var LW=10,dye=13,Em=32;function c4(t){}function PW(t){if(typeof t=="function")throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:a=c4,onError:c=c4,onRetry:u=c4,onComment:f,maxBufferSize:m}=t,p=[],g=0,v=!0,k,S="",I=0,T,L=!1;function R(F){if(L)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(v&&(v=!1,F.charCodeAt(0)===239&&F.charCodeAt(1)===187&&F.charCodeAt(2)===191&&(F=F.slice(3))),p.length===0){let U=E(F);U!==""&&(p.push(U),g=U.length),A();return}if(F.indexOf(`
1119
+ `)===-1&&F.indexOf("\r")===-1){p.push(F),g+=F.length,A();return}p.push(F);let z=p.join("");p.length=0,g=0;let B=E(z);B!==""&&(p.push(B),g=B.length),A()}function A(){m!==void 0&&(g+S.length<=m||(L=!0,p.length=0,g=0,k=void 0,S="",I=0,T=void 0,c(new ZS(`Buffered data exceeded max buffer size of ${m} characters`,{type:"max-buffer-size-exceeded"}))))}function E(F){let z=0;if(F.indexOf("\r")===-1){let B=F.indexOf(`
1120
+ `,z);for(;B!==-1;){if(z===B){I>0&&a({id:k,event:T,data:S}),k=void 0,S="",I=0,T=void 0,z=B+1,B=F.indexOf(`
1121
+ `,z);continue}let U=F.charCodeAt(z);if(RW(F,z,U)){let Y=F.charCodeAt(z+5)===Em?z+6:z+5,G=F.slice(Y,B);if(I===0&&F.charCodeAt(B+1)===LW){a({id:k,event:T,data:G}),k=void 0,S="",T=void 0,z=B+2,B=F.indexOf(`
1122
+ `,z);continue}S=I===0?G:`${S}
1123
+ ${G}`,I++}else EW(F,z,U)?T=F.slice(F.charCodeAt(z+6)===Em?z+7:z+6,B)||void 0:P(F,z,B);z=B+1,B=F.indexOf(`
1124
+ `,z)}return F.slice(z)}for(;z<F.length;){let B=F.indexOf("\r",z),U=F.indexOf(`
1125
+ `,z),Y=-1;if(B!==-1&&U!==-1?Y=B<U?B:U:B!==-1?B===F.length-1?Y=-1:Y=B:U!==-1&&(Y=U),Y===-1)break;P(F,z,Y),z=Y+1,F.charCodeAt(z-1)===dye&&F.charCodeAt(z)===LW&&z++}return F.slice(z)}function P(F,z,B){if(z===B){N();return}let U=F.charCodeAt(z);if(RW(F,z,U)){let ae=F.charCodeAt(z+5)===Em?z+6:z+5,xe=F.slice(ae,B);S=I===0?xe:`${S}
1126
+ ${xe}`,I++;return}if(EW(F,z,U)){T=F.slice(F.charCodeAt(z+6)===Em?z+7:z+6,B)||void 0;return}if(U===105&&F.charCodeAt(z+1)===100&&F.charCodeAt(z+2)===58){let ae=F.slice(F.charCodeAt(z+3)===Em?z+4:z+3,B);ae.includes("\x00")||(k=ae);return}if(U===58){if(f){let ae=F.slice(z,B);f(ae.slice(F.charCodeAt(z+1)===Em?2:1))}return}let Y=F.slice(z,B),G=Y.indexOf(":");if(G===-1){D(Y,"",Y);return}let ce=Y.slice(0,G),re=Y.charCodeAt(G+1)===Em?2:1,Q=Y.slice(G+re);D(ce,Q,Y)}function D(F,z,B){switch(F){case"event":T=z||void 0;break;case"data":S=I===0?z:`${S}
1127
+ ${z}`,I++;break;case"id":z.includes("\x00")||(k=z);break;case"retry":/^\d+$/.test(z)?u(parseInt(z,10)):c(new ZS(`Invalid \`retry\` value: "${z}"`,{type:"invalid-retry",value:z,line:B}));break;default:c(new ZS(`Unknown field "${F.length>20?`${F.slice(0,20)}…`:F}"`,{type:"unknown-field",field:F,value:z,line:B}));break}}function N(){I>0&&a({id:k,event:T,data:S}),k=void 0,S="",I=0,T=void 0}function O(F={}){if(F.consume&&p.length>0){let z=p.join("");P(z,0,z.length)}v=!0,k=void 0,S="",I=0,T=void 0,p.length=0,g=0,L=!1}return{feed:R,reset:O}}function RW(t,a,c){return c===100&&t.charCodeAt(a+1)===97&&t.charCodeAt(a+2)===116&&t.charCodeAt(a+3)===97&&t.charCodeAt(a+4)===58}function EW(t,a,c){return c===101&&t.charCodeAt(a+1)===118&&t.charCodeAt(a+2)===101&&t.charCodeAt(a+3)===110&&t.charCodeAt(a+4)===116&&t.charCodeAt(a+5)===58}function fye(t,a){if(a?.aborted)return!0;if(t instanceof DOMException&&t.name==="AbortError")return!0;if(t instanceof Error&&t.name==="AbortError")return!0;return!1}class u4{server;closed=!1;pluginRevision=0;constructor(t){this.server=t}models(){return this.request("/api/models")}modelProviders(){return this.request("/api/model-providers")}providerAuthStatus(t){return this.request("/api/provider-auth/openai",{signal:t?AbortSignal.any([t,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)})}startProviderAuth(t){return this.request("/api/provider-auth/openai/login",{method:"POST",signal:t?AbortSignal.any([t,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)})}completeProviderAuth(t,a){return this.request("/api/provider-auth/openai/manual",{...this.json("POST",t),signal:a?AbortSignal.any([a,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)})}async logoutProvider(t){await this.request("/api/provider-auth/openai/logout",{method:"POST",signal:t?AbortSignal.any([t,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)})}proxyConfiguration(t){return this.request("/api/proxy",{signal:t})}saveProxyConfiguration(t,a){return this.request("/api/proxy",{...this.json("PUT",t),signal:a})}saveModelProvider(t,a){return this.request(`/api/model-providers/${encodeURIComponent(t)}`,this.json("PUT",a))}discoverModelProvider(t){return this.request(`/api/model-providers/${encodeURIComponent(t)}/discover`,{method:"POST"})}async removeModelProvider(t){await this.request(`/api/model-providers/${encodeURIComponent(t)}`,{method:"DELETE"})}acceptPlugins(t){++this.pluginRevision,this.patch({plugins:t,pluginsLoaded:!0})}async plugins(){let t=++this.pluginRevision,a=await this.request("/api/plugins");if(!this.closed&&t===this.pluginRevision)this.patch({plugins:a,pluginsLoaded:!0});return a}async reloadPlugin(t){let a=++this.pluginRevision,c=await this.request(`/api/plugins/${encodeURIComponent(t)}/reload`,{method:"POST"});if(!this.closed&&a===this.pluginRevision)this.patch({plugins:c,pluginsLoaded:!0});return c}async enablePlugin(t,a){let c=++this.pluginRevision,u=await this.request(`/api/plugins/${encodeURIComponent(t)}`,this.json("PATCH",{enabled:a}));if(!this.closed&&c===this.pluginRevision)this.patch({plugins:u,pluginsLoaded:!0});return u}storage(){return this.request("/api/storage")}lastModelRequest(t){return this.request(`/api/sessions/${t}/last-model-request`)}lastModelResponse(t){return this.request(`/api/sessions/${t}/last-model-response`)}compactStorage(t){return this.request("/api/storage/compact",this.json("POST",t))}devices(){return this.request("/api/devices")}networkSettings(t){return this.request("/api/server/network",{signal:t})}saveNetworkSettings(t,a){return this.request("/api/server/network",{...this.json("PUT",t),signal:a})}pairingCode(){return this.request("/api/pair/current")}renewPairingCode(){return this.request("/api/pair/current",{method:"POST"})}async revokeDevice(t){await this.request(`/api/devices/${t}`,{method:"DELETE"})}async setServerShell(t){let a=await this.request("/api/server/shell",this.json("PATCH",{shell:t})),c=this.state.get().server;if(c)this.patch({server:{...c,shell:a.shell}});return a.shell}serverAutostart(){return this.request("/api/server/autostart")}setServerAutostart(t){return this.request("/api/server/autostart",this.json("PUT",{enabled:t}))}exportSession(t){return this.request(`/api/sessions/${t}/export`,{signal:AbortSignal.timeout(120000)})}tunnelStatus(){return this.request("/api/tunnel")}saveTunnel(t){return this.request("/api/tunnel",this.json("PUT",t))}tunnelLogin(){return this.request("/api/tunnel/login",{method:"POST"})}cancelTunnelLogin(){return this.request("/api/tunnel/login",{method:"DELETE"})}provisionTunnel(t){return this.request("/api/tunnel/provision",{...this.json("POST",t),signal:AbortSignal.timeout(120000)})}setTunnelAccess(t){return this.request("/api/tunnel/access",this.json("PUT",{access:t}))}removeTunnel(){return this.request("/api/tunnel",{method:"DELETE"})}updateStatus(){return this.request("/api/update")}checkUpdate(){return this.request("/api/update/check",{method:"POST"})}applyUpdate(){return this.request("/api/update/apply",{method:"POST"})}async restartServer(){await this.request("/api/server/restart",{method:"POST"})}json(t,a){return{method:t,body:JSON.stringify(a)}}async requestStream(t,a={}){let c=di(this.server,a.headers);if(a.body&&!c.has("content-type"))c.set("content-type","application/json");return this.fetchOk(t,{...a,headers:c})}async request(t,a={}){let c=di(this.server,a.headers);if(a.body)c.set("content-type","application/json");return(await this.fetchOk(t,{...a,headers:c,signal:a.signal??AbortSignal.timeout(15000)})).json()}async fetchOk(t,a){let c;try{c=await fetch(`${this.server.url}${t}`,a)}catch(u){if(fye(u,a.signal)&&!(u instanceof DOMException&&u.name==="TimeoutError"))throw u;let f=u instanceof DOMException&&u.name==="TimeoutError"?"请求超时,请检查服务器是否仍在运行":"无法连接服务器";if(this.state.get().status!=="open")this.patch({error:f});throw u}if(!c.ok){let u=await c.json().catch(()=>{return});if(c.status===401)this.patch({status:"unauthorized"});let f=u?.error.message??`请求失败(${c.status})`;this.patch({error:f});let m=Error(f);throw Object.assign(m,{status:c.status,details:u?.error.details}),m}return c}}var mye=1e4,JS=Tr(!1),Wh=Tr(null),db=Tr(pye());function pye(){if(typeof window>"u")return!1;if(typeof window.matchMedia==="function"&&window.matchMedia("(display-mode: standalone)").matches)return!0;return Boolean(navigator.standalone)}function AW(){if(typeof window>"u")return;let t=(c)=>document.documentElement.toggleAttribute("data-standalone",c);if(t(db.get()),db.subscribe(t),(typeof window.matchMedia==="function"?window.matchMedia("(display-mode: standalone)"):void 0)?.addEventListener("change",(c)=>{if(db.set(c.matches),c.matches)Wh.set(null)}),window.addEventListener("beforeinstallprompt",(c)=>{Wh.set(c)}),window.addEventListener("appinstalled",()=>{Wh.set(null),db.set(!0)}),"serviceWorker"in navigator){let c=location.protocol==="https:"||location.hostname==="127.0.0.1"||location.hostname==="localhost"||location.hostname==="[::1]";if(Boolean(document.querySelector("[data-bun-dev-server-script]")))navigator.serviceWorker.getRegistrations().then((f)=>Promise.all(f.map((m)=>m.unregister()))).catch(()=>{return});else if(c)window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js",{scope:"/"}).catch(()=>{return}),navigator.serviceWorker.ready.then((f)=>setTimeout(()=>f.active?.postMessage({type:"basalt-precache"}),mye)),navigator.serviceWorker.addEventListener("message",(f)=>{if(f.data?.type==="basalt-shell-updated")JS.set(!0)})},{once:!0})}}var MW="basalt.systemNotifications",e2="basalt:notification-open";function hye(){try{return typeof localStorage<"u"&&localStorage.getItem(MW)==="1"}catch{return!1}}var xa=Tr(hye());xa.subscribe((t)=>{try{localStorage.setItem(MW,t?"1":"0")}catch{}});function ii(){if(typeof window>"u"||window.isSecureContext===!1||!("Notification"in window))return"unsupported";return window.Notification.permission}async function El(t){if(!t)return xa.set(!1),ii();let a=ii();if(a==="unsupported"||a==="denied")return xa.set(!1),a;let c=a==="default"?await window.Notification.requestPermission():a;return xa.set(c==="granted"),c}function DW(t){if(t.entry.reason!=="done"&&t.entry.reason!=="error"||!xa.get()||ii()!=="granted")return;let a=t.entry.reason==="error",c=t.entry.error?.trim()||"请打开会话查看错误详情";try{let u=new window.Notification(a?"模型运行出错":"模型工作完成",{body:a?`${t.title}
1128
+ ${c}`:t.title,icon:"/icon-192.png",tag:`basalt:run:${t.serverID}:${t.sessionID}:${t.entry.seq}:${t.entry.time}`});u.onclick=()=>{u.close(),window.focus(),window.dispatchEvent(new CustomEvent(e2,{detail:{serverID:t.serverID,sessionID:t.sessionID}}))}}catch{}}function NW(t){if(typeof window>"u")return()=>{};let a=()=>{let c=Uk();if(c)t(c)};return window.addEventListener("hashchange",a),window.launchQueue?.setConsumer((c)=>{if(!c.targetURL)return;let u=Sh(c.targetURL);if(u?.server&&u.code)history.replaceState(null,"",location.pathname+location.search),t({server:u.server,code:u.code})}),()=>{window.removeEventListener("hashchange",a)}}function Al(){let t=se(Wh),a=se(db);return{canInstall:Boolean(t)&&!a,isStandalone:a,async install(){let c=Wh.get();if(!c)return!1;if(await c.prompt(),(await c.userChoice).outcome==="accepted")return Wh.set(null),!0;return!1}}}var OW=()=>({groups:[],loading:!1,terms:[]}),d4=new Map,_W=new Map;function en(t){let a=_W.get(t);if(!a)a=Tr(void 0),_W.set(t,a);return a}function Pm(t){return typeof t==="object"&&t!==null}function Am(t){return typeof t==="number"&&Number.isFinite(t)}function zW(t){return Pm(t)&&d7.includes(String(t.state))&&[t.indexed,t.total,t.lag,t.bytes,t.budget].every(Am)&&(t.etaSec===void 0||Am(t.etaSec))}function gye(t){if(!Pm(t))return!1;switch(t.type){case"groups":return Array.isArray(t.groups)&&t.groups.every((a)=>{if(!Pm(a)||!Pm(a.session)||typeof a.session.id!=="string"||typeof a.session.title!=="string"||!Am(a.more)||!Array.isArray(a.hits))return!1;return a.hits.every((c)=>{if(!Pm(c)||typeof c.sessionID!=="string"||!Number.isSafeInteger(c.seq)||!Am(c.time)||Math.abs(c.time)>8640000000000000||typeof c.field!=="string"||!Pm(c.flags)||![c.flags.archived,c.flags.compacted,c.flags.partial].every((u)=>typeof u==="boolean")||c.forks!==void 0&&(!Array.isArray(c.forks)||!c.forks.every((u)=>typeof u==="string"))||!Array.isArray(c.snippet))return!1;return c.snippet.every((u)=>Pm(u)&&typeof u.text==="string"&&Array.isArray(u.ranges)&&u.ranges.every((f)=>Array.isArray(f)&&f.length===2&&f.every(Am)))})});case"progress":return Am(t.scanned)&&Am(t.total);case"suggest":return Array.isArray(t.terms)&&t.terms.every((a)=>typeof a==="string");case"done":return zW(t.index)&&(t.cursor===void 0||typeof t.cursor==="string");case"error":return f7.includes(String(t.code))&&typeof t.message==="string";default:return!1}}async function xye(t,a,c){if(!t.body)throw Error("搜索响应为空,请重试");let u=t.body.getReader(),f=new TextDecoder,m="",p=()=>{u.cancel().catch(()=>{return})};a.addEventListener("abort",p,{once:!0});let g=(v)=>{if(!v.trim())return;let k=JSON.parse(v);if(!gye(k))throw Error("搜索响应格式无效,请重试");c(k)};try{while(!a.aborted){let v=await u.read();if(a.aborted)return;if(m+=f.decode(v.value,{stream:!v.done}),m.length>8388608)throw Error("搜索响应过大,请缩小范围");let k=m.indexOf(`
1129
+ `);while(k>=0)g(m.slice(0,k)),m=m.slice(k+1),k=m.indexOf(`
1130
+ `);if(v.done){g(m);return}}}finally{a.removeEventListener("abort",p),await u.cancel().catch(()=>{return}),u.releaseLock()}}function vye(t,a){let c=new Map(t.map((u)=>[u.session.id,u]));for(let u of a){let f=c.get(u.session.id),m=new Map(f?.hits.map((p)=>[`${p.seq}:${p.field}`,p]));for(let p of u.hits)m.set(`${p.seq}:${p.field}`,p);c.set(u.session.id,{...u,hits:[...m.values()]})}return[...c.values()]}class BW{server;fetcher;state=Tr(OW());controller;timer;generation=0;groupCursors=new Map;constructor(t,a=(c,u)=>fetch(c,u)){this.server=t;this.fetcher=a}cancel(t=!1){if(this.generation++,clearTimeout(this.timer),this.controller?.abort(),!t)this.state.set((a)=>({...a,loading:!1}))}schedule(t){if(this.cancel(!0),!t?.q.trim()){this.state.set(OW());return}this.state.set((a)=>({...a,loading:!0,error:void 0,code:void 0})),this.timer=setTimeout(()=>{this.search(t).catch(()=>{return})},120)}async refreshStatus(){let t=JSON.stringify(this.server),a=d4.get(t);if(a)return a;if(en(this.server.id).get())return;let c=this.loadStatus();d4.set(t,c);try{await c}finally{d4.delete(t)}}async loadStatus(){try{let t=await this.fetcher(`${this.server.url}/api/search/status`,{headers:this.headers(),signal:AbortSignal.timeout(15000)});if(t.status===404||t.status===503){this.disable();return}if(!t.ok)throw Error("无法读取搜索索引状态");let a=await t.json();if(!zW(a))throw Error("搜索索引状态格式无效");en(this.server.id).set(a)}catch{}}headers(){return di(this.server,{"content-type":"application/json"})}disable(){let t=en(this.server.id).get();if(t&&t.state!=="ready")return;en(this.server.id).set({state:"disabled",indexed:0,total:0,lag:0,bytes:0,budget:0})}async expandGroup(t,a){await this.search({...t,filters:{...t.filters,sessionID:[a]},cursor:this.groupCursors.get(a),limit:200},!0,a)}async search(t,a=!1,c){if(this.cancel(!0),!a)this.groupCursors.clear();let u=this.generation,f=new AbortController;this.controller=f;let m=AbortSignal.any([f.signal,AbortSignal.timeout(60000)]);this.state.set((S)=>({...S,...a?{}:{terms:[],cursor:void 0,progress:void 0},loading:!0,error:void 0,code:void 0}));let p=this.state.get().groups.find((S)=>S.session.id===c),g=p?p.hits.length+p.more:0,v=a,k=!1;try{let S=await this.fetcher(`${this.server.url}/api/search`,{method:"POST",headers:this.headers(),body:JSON.stringify(t),signal:m});if(u!==this.generation)return;if(S.status===404||S.status===503){this.disable();return}if(!S.ok)throw Error(`搜索失败(${S.status}),请重试`);if(await xye(S,m,(I)=>{if(u!==this.generation)return;switch(I.type){case"groups":this.state.set((T)=>({...T,groups:vye(v?T.groups:[],I.groups)})),v=!0;break;case"suggest":this.state.set((T)=>({...T,terms:I.terms}));break;case"progress":this.state.set((T)=>({...T,progress:I}));break;case"done":if(k=!0,!v)this.state.set((T)=>({...T,groups:[]}));if(en(this.server.id).set(I.index),c)this.groupCursors.set(c,I.cursor),this.state.set((T)=>({...T,groups:T.groups.map((L)=>L.session.id===c?{...L,more:I.cursor?Math.max(1,g-L.hits.length):0}:L)}));else this.state.set((T)=>({...T,cursor:I.cursor}));break;case"error":if(k=!0,I.code==="unavailable")this.disable();this.state.set((T)=>({...T,code:I.code,error:I.code==="unavailable"?void 0:I.message}))}}),m.aborted&&!f.signal.aborted)throw Error("搜索超时,请缩小范围后重试");if(!k&&!f.signal.aborted)throw Error("搜索已中断,已保留收到的结果,请重试")}catch(S){if(u===this.generation&&!f.signal.aborted){let I="搜索失败,请重试";if(m.aborted)I="搜索超时,请缩小范围后重试";else if(S instanceof SyntaxError)I="搜索响应格式无效,已保留收到的结果,请重试";else if(S instanceof Error)I=S.message;this.state.set((T)=>({...T,error:I}))}}finally{if(u===this.generation)this.state.set((S)=>({...S,loading:!1}))}}}function t2(t,a){let c=w(()=>new BW(t),[t]),u=JSON.stringify(a);return o(()=>(c.schedule(u?JSON.parse(u):void 0),()=>c.cancel(!0)),[c,u]),o(()=>{c.refreshStatus().catch(()=>{return})},[c]),{client:c,...se(c.state),status:se(en(t.id))}}function fe(t){return t.title||(t.projectID?"新会话":"新聊天")}function n2(t){let a=[],c=new Map;for(let u of t){let f=xc(u);if(!f){a.push({kind:"session",session:u});continue}let m=c.get(f.id);if(m){m.sessions.push(u);continue}let p={kind:"group",group:f,sessions:[u]};c.set(f.id,p),a.push(p)}return a}function fb(t){return t.kind==="group"?t.sessions.some((a)=>a.status==="busy"):t.session.status==="busy"}function r2(t,a){try{sessionStorage.setItem(Ja,a.id)}catch{}return gd(t,a.parentSeq)}function Xh(t){return t.filter((a)=>a.archivedAt===null)}function $i(t,a="all",c=""){let u=c.trim().toLocaleLowerCase();return t.filter((f)=>{if(f.archivedAt===null||f.parentID)return!1;if(a==="chat"&&f.projectID!==null)return!1;if(a!=="all"&&a!=="chat"&&f.projectID!==a)return!1;return fe(f).toLocaleLowerCase().includes(u)}).sort((f,m)=>(m.archivedAt??0)-(f.archivedAt??0))}var bye={entries:[],draft:null},yye=300,f4=300,FW=150,wye=12,kye=200,Sye=3000,Cye=500,VW=1;class mb extends u4{static reconnectBaseMs=1000;static snapshots=sm;state=Tr({status:"connecting",plugins:[],pluginsLoaded:!1,sessions:[],projects:[],views:{},islands:{},unseen:new Set});indexSync;stream;connectionID;posts=Promise.resolve();retry=0;timer;subscribed=new Set;subscriptionCounts=new Map;epochs=new Map;notifiedRuns=new Map;replay=new Map;jumps=new Map;recent=[];stopSnapshots;firstSession;constructor(t,a){super(t);this.firstSession=a;let c=mb.snapshots;if(!c){this.connect();return}let u;Promise.race([c.get(Lv(t.id)),new Promise((f)=>{u=setTimeout(()=>f(void 0),Cye)})]).then((f)=>{if(clearTimeout(u),this.closed)return;if(f?.version===VW&&f.url===t.url)this.hydrate(f);this.connect(),this.watchSnapshots(c)})}view(t){return this.state.get().views[t]??bye}subscribe(t){if(this.recent=[t,...this.recent.filter((u)=>u!==t)].slice(0,wye),this.subscriptionCounts.set(t,(this.subscriptionCounts.get(t)??0)+1),!this.subscribed.has(t))this.subscribed.add(t),this.sendSubscribe(t);let a=this.state.get().sessions.filter((u)=>u.parentID===t&&xc(u)).map((u)=>u.id);this.markSeen([t,...a]);let c=!1;return()=>{if(c)return;c=!0;let u=(this.subscriptionCounts.get(t)??1)-1;if(u>0){this.subscriptionCounts.set(t,u);return}if(this.subscriptionCounts.delete(t),this.subscribed.delete(t),!this.replay.has(t))this.sendSubscription("unsubscribe",{sessionID:t})}}async createSession(t){let a=await this.request("/api/sessions",{method:"POST",body:JSON.stringify(t)});return this.upsert(a),a}async copySession(t,a){let c=await this.request(`/api/sessions/${t}/${a===void 0?"duplicate":"fork"}`,this.json("POST",a===void 0?{}:{seq:a}));return this.upsert(c.session),c}async editSession(t,a,c,u){let f=await this.request(`/api/sessions/${t}/edit`,this.json("POST",{seq:a,text:c,attachments:u}));return this.upsert(f),f}async replaySession(t,a,c){this.upsert(await this.request(`/api/sessions/${t}/replay`,this.json("POST",{seq:a,model:c,confirm:!0})))}async sessionCommand(t,a,c){let u=`/api/plugins/${encodeURIComponent(t)}/commands/${encodeURIComponent(a.id)}`;if(a.sessionAction==="duplicate"||a.sessionAction==="fork"){let m=await this.request(u,this.json("POST",{args:c}));return this.upsert(m.session),m}let f=await this.request(u,this.json("POST",{args:c}));return this.upsert(f),{session:f}}async updateSession(t,a){let c=await this.request(`/api/sessions/${t}`,this.json("PATCH",a));return this.upsert(c),c}async renameSession(t,a){await this.updateSession(t,{title:a})}async setSessionModel(t,a){await this.updateSession(t,{model:a})}async setSessionThinking(t,a){await this.updateSession(t,{thinking:a})}async deleteSession(t){await this.request(`/api/sessions/${t}`,{method:"DELETE"}),this.remove("session",t)}async importSession(t,a){let c=a?`?projectID=${encodeURIComponent(a)}`:"",u=await this.request(`/api/sessions/import${c}`,{method:"POST",body:t,signal:AbortSignal.timeout(120000)});return this.upsert(u),u}async createProject(t){let a=await this.request("/api/projects",this.json("POST",t));return this.put("projects",a),a}async browseDirectory(t){let a=t?`?path=${encodeURIComponent(t)}`:"";return this.request(`/api/directories${a}`)}async updateProject(t,a){let c=await this.request(`/api/projects/${t}`,this.json("PATCH",a));return this.put("projects",c),c}async reorderProjects(t){this.applyProjectOrder(t);try{await this.request("/api/projects/order",this.json("PUT",{ids:t}))}catch(a){throw this.refreshIndex(),a}}async deleteProject(t){await this.request(`/api/projects/${t}`,{method:"DELETE"}),this.remove("project",t)}async prompt(t,a,c){await this.request(`/api/sessions/${t}/prompt`,{method:"POST",body:JSON.stringify({text:a,...c?.length?{attachments:c}:{}})})}async steer(t,a,c){await this.request(`/api/sessions/${t}/steer`,{method:"POST",body:JSON.stringify({text:a,...c?.length?{attachments:c}:{}})})}async unsteer(t,a){await this.request(`/api/sessions/${t}/unsteer`,{method:"POST",body:JSON.stringify({seq:a})})}postJson(t,a,c){return this.request(t,{...this.json("POST",a),signal:c})}async loadSession(t){this.upsert(await this.request(`/api/sessions/${encodeURIComponent(t)}`))}async abort(t){await this.request(`/api/sessions/${t}/abort`,{method:"POST"})}close(){this.closed=!0,this.stopSnapshots?.(),clearTimeout(this.timer),this.replay.clear(),this.notifiedRuns.clear(),this.flushDrafts(),this.stream?.abort()}hydrate(t){for(let[a,c]of Object.entries(t.epochs))this.epochs.set(a,c);this.recent=t.recent,this.patch({server:t.server,sessions:t.sessions,projects:t.projects,plugins:t.plugins,pluginsLoaded:!0,views:Object.fromEntries(Object.entries(t.views).map(([a,c])=>[a,{entries:c,draft:null}]))})}watchSnapshots(t){let a,c=()=>{clearTimeout(a),a=void 0;let m=this.snapshot();if(m&&go.get().some((p)=>p.id===this.server.id))t.set(Lv(this.server.id),m)},u=this.state.subscribe(()=>{a??=setTimeout(c,Sye)}),f=()=>{if(document.visibilityState==="hidden"&&a)c()};if(typeof document<"u")document.addEventListener("visibilitychange",f);this.stopSnapshots=()=>{if(u(),typeof document<"u")document.removeEventListener("visibilitychange",f);if(a)c()}}snapshot(){let t=this.state.get();if(!t.server)return;let a=Object.fromEntries(this.recent.flatMap((c)=>{let u=t.views[c];return u?[[c,u.entries.slice(-kye)]]:[]}));return{version:VW,url:this.server.url,server:t.server,sessions:t.sessions,projects:t.projects,plugins:t.plugins,recent:this.recent.filter((c)=>(c in a)),views:a,epochs:Object.fromEntries(Object.keys(a).flatMap((c)=>{let u=this.epochs.get(c);return u===void 0?[]:[[c,u]]}))}}connect(){if(this.closed)return;this.indexSync=void 0,this.connectionID=void 0,this.posts=Promise.resolve(),this.patch({status:"connecting"});let t=new AbortController;this.stream=t,this.readEvents(t).catch((a)=>{if(!this.closed&&this.stream===t)this.patch({error:a instanceof Error?a.message:"服务器事件流中断"})}).finally(()=>{if(t.abort(),this.closed||this.stream!==t)return;this.connectionID=void 0,this.flushDrafts(),this.replay.clear();let a=this.state.get().status;if(a==="unauthorized"||a==="mismatch")return;this.patch({status:"offline"}),this.timer=setTimeout(()=>this.connect(),Math.min(mb.reconnectBaseMs*2**this.retry++,15000))})}async readEvents(t){let a=setTimeout(()=>t.abort(),45000),c=new Set([...this.subscribed,...this.firstSession?[this.firstSession]:[]]);this.firstSession=void 0;let u=[...c].filter((m)=>!this.replay.has(m)).map((m)=>this.subscription(m)),f=u.length?`&subscribe=${encodeURIComponent(JSON.stringify(u))}`:"";try{let m=await fetch(`${this.server.url}/api/events?protocol=${m7}&index=1${f}`,{headers:di(this.server,{accept:"text/event-stream"}),signal:t.signal});if(t.signal.aborted)return;if(m.status===401){this.patch({status:"unauthorized"});return}if(m.status===400){if((await m.json()).error?.code==="protocol_mismatch"){this.patch({status:"mismatch"});return}}if(!m.ok||!m.body)throw Error(`事件流连接失败(HTTP ${m.status})`);let p=PW({onEvent:(k)=>{if(t.signal.aborted)return;let S=JSON.parse(k.data);if(S.type==="welcome"){if(typeof S.connectionID!=="string"||!S.connectionID)throw Error("服务器未提供事件流连接标识");this.connectionID=S.connectionID}else if(!this.connectionID)throw Error("服务器在欢迎消息前发送了事件");this.handle(S)}}),g=m.body.getReader(),v=new TextDecoder;try{while(!t.signal.aborted){let k=await g.read();if(k.done)break;clearTimeout(a),a=setTimeout(()=>t.abort(),45000),p.feed(v.decode(k.value,{stream:!0}))}}finally{await g.cancel(),g.releaseLock()}}finally{clearTimeout(a)}}sendSubscription(t,a){let c=this.connectionID,u=this.stream;if(!c||!u||u.signal.aborted)return;this.posts=this.posts.then(async()=>{for(let f=0;f<2;f++){if(u.signal.aborted||this.stream!==u)return;try{let m=await fetch(`${this.server.url}/api/events/${encodeURIComponent(c)}/${t}`,{method:"POST",headers:di(this.server,{"content-type":"application/json"}),body:JSON.stringify(a),signal:AbortSignal.any([u.signal,AbortSignal.timeout(15000)])});if(m.status!==204)throw Error(`订阅请求失败(HTTP ${m.status})`);return}catch(m){if(u.signal.aborted)return;if(f===1)this.patch({error:m instanceof Error?m.message:"订阅请求失败"}),u.abort()}}})}refreshIndex(){this.patch({indexLoading:!0,indexError:void 0});let t={updates:new Map};return this.indexSync=t,Promise.all([this.request("/api/sessions?archive=all&includeChildren=true"),this.request("/api/projects"),this.plugins()]).then(([a,c])=>{if(this.closed||this.indexSync!==t)return;let u=new Map(a.map((f)=>[f.id,f]));for(let[f,m]of t.updates)if(m)u.set(f,m);else u.delete(f);this.indexSync=void 0,this.patch({sessions:[...u.values()].sort((f,m)=>m.updated-f.updated),projects:c,indexError:void 0,indexLoading:!1})}).catch((a)=>{if(!this.closed&&this.indexSync===t)this.indexSync=void 0,this.patch({indexLoading:!1,indexError:a instanceof Error?a.message:"刷新会话列表失败"})})}acceptIndex(t){this.indexSync=void 0,this.patch({sessions:[...t.sessions].sort((a,c)=>c.updated-a.updated),projects:t.projects,indexError:void 0,indexLoading:!1}),this.acceptPlugins(t.plugins)}pendingDrafts=new Map;draftFrame;flushDrafts(){if(this.draftFrame!==void 0)cancelAnimationFrame(this.draftFrame);this.draftFrame=void 0;let t=this.pendingDrafts;if(t.size===0)return;this.pendingDrafts=new Map;for(let[a,c]of t){let u=this.view(a);if(u.draft!==c)this.setView(a,{...u,draft:c})}}handle(t){if(t.type!=="draft")this.flushDrafts();switch(t.type){case"plugins_changed":this.plugins().catch((a)=>{if(!this.closed)this.patch({error:a instanceof Error?a.message:String(a)})});return;case"search_status":en(this.server.id).set(t.status);break;case"welcome":{if(this.retry=0,this.patch({status:"open",error:void 0,server:t.server}),t.index)this.acceptIndex(t.index);else this.refreshIndex();let a=new Set(t.subscribed??[]);for(let c of[...this.replay.keys()])if(!a.has(c))this.replay.delete(c);for(let c of this.subscribed)if(!a.has(c))this.sendSubscribe(c);return}case"error":if(t.code==="protocol_mismatch")this.patch({status:"mismatch",error:t.message});else this.patch({error:t.message});return;case"session":{let a;if(t.truncationEpoch!==void 0){this.epochs.set(t.session.id,t.truncationEpoch);let c=this.replay.get(t.session.id);if(c){let u=[...c.entries.values()].sort((m,p)=>m.seq-p.seq),f=this.state.get().views[t.session.id];if(a=f&&f.draft===c.draft&&f.entries.length===u.length&&f.entries.every((m,p)=>m===u[p])?f:{entries:u,draft:c.draft},this.replay.delete(t.session.id),!this.subscribed.has(t.session.id))this.sendSubscription("unsubscribe",{sessionID:t.session.id})}}if(this.upsert(t.session,a),a)this.joinIsland(t.session.id);return}case"project":this.put("projects",t.project);return;case"project_order":this.applyProjectOrder(t.ids);return;case"removed":if(t.kind==="session")this.indexSync?.updates.set(t.id,null);this.remove(t.kind,t.id);return;case"truncated":{this.notifiedRuns.delete(t.sessionID);let a=this.replay.get(t.sessionID);if(!a&&t.truncationEpoch!==void 0)this.epochs.set(t.sessionID,t.truncationEpoch);let c=a?[...a.entries.values()]:this.view(t.sessionID).entries;this.dropIsland(t.sessionID),this.setView(t.sessionID,{entries:c.filter((u)=>u.seq<=t.after&&(u.type!=="compaction"||u.through<=t.after)&&u.type!=="notice_pending"),draft:null});return}case"run_end":this.notifyRunEnd(t.sessionID,t.entry);return;case"entry":{let a=this.replay.get(t.sessionID);if(a){if(a.entries.set(t.entry.seq,t.entry),t.entry.type==="assistant"||t.entry.type==="tool_result")a.draft=null;return}let c=this.view(t.sessionID),u=c.entries.filter((m)=>m.seq!==t.entry.seq);u.push(t.entry),u.sort((m,p)=>m.seq-p.seq);let f=t.entry.type==="assistant"||t.entry.type==="tool_result"?null:c.draft;if(this.setView(t.sessionID,{entries:u,draft:f}),t.entry.type==="run"&&t.entry.state==="end")this.notifyRunEnd(t.sessionID,t.entry);return}case"entry_removed":{let a=this.replay.get(t.sessionID);if(a){a.entries.delete(t.seq);return}let c=this.view(t.sessionID);if(!c.entries.some((u)=>u.seq===t.seq))return;this.setView(t.sessionID,{entries:c.entries.filter((u)=>u.seq!==t.seq),draft:c.draft});return}case"draft":{let a=this.replay.get(t.sessionID);if(a){a.draft=t.parts;return}if(typeof requestAnimationFrame!=="function"){let c=this.view(t.sessionID);if(c.draft!==t.parts)this.setView(t.sessionID,{...c,draft:t.parts});return}this.pendingDrafts.set(t.sessionID,t.parts),this.draftFrame??=requestAnimationFrame(()=>{this.draftFrame=void 0,this.flushDrafts()})}}}notifyRunEnd(t,a){let c=`${a.seq}:${a.time}`;if(this.notifiedRuns.get(t)===c)return;this.notifiedRuns.set(t,c);let u=a.reason==="done"||a.reason==="error"||a.reason==="waiting_user",f=this.state.get().sessions.find((v)=>v.id===t),m=f?xc(f):void 0,p=f?.parentID&&m&&this.subscribed.has(f.parentID),g=this.state.get().unseen;if(u&&!this.subscribed.has(t)&&!p&&!g?.has(t))this.patch({unseen:new Set(g).add(t)});if(!m)DW({serverID:this.server.id,sessionID:t,title:f?fe(f):"Basalt 会话",entry:a})}upsert(t,a){this.indexSync?.updates.set(t.id,t);let c=this.state.get(),u=c.sessions.findIndex((v)=>v.id===t.id),f=u!==-1?c.sessions[u]:void 0,m=f!==void 0&&f.title===t.title&&f.projectID===t.projectID&&f.model===t.model&&f.thinking===t.thinking&&f.created===t.created&&f.updated===t.updated&&f.archivedAt===t.archivedAt&&f.status===t.status&&f.parentID===t.parentID&&f.forkedFrom?.id===t.forkedFrom?.id&&f.forkedFrom?.seq===t.forkedFrom?.seq&&JSON.stringify(f.metadata)===JSON.stringify(t.metadata)&&f.forkThroughSeq===t.forkThroughSeq&&f.kind===t.kind&&f.todos.length===t.todos.length&&f.todos.every((v,k)=>v.content===t.todos[k]?.content&&v.status===t.todos[k]?.status)&&(f.recallableSteers??[]).join(",")===(t.recallableSteers??[]).join(","),p=a===void 0||c.views[t.id]===a;if(t.status==="busy")this.markSeen([t.id]);if(m&&p)return;let g=m?c.sessions:u!==-1?f&&f.updated!==t.updated?[...c.sessions.filter((v)=>v.id!==t.id),t].sort((v,k)=>k.updated-v.updated):c.sessions.map((v,k)=>k===u?t:v):[t,...c.sessions].sort((v,k)=>k.updated-v.updated);this.patch({sessions:g,...!p&&a&&{views:{...c.views,[t.id]:a}}})}markSeen(t){let a=this.state.get().unseen;if(!a||!t.some((u)=>a.has(u)))return;let c=new Set(a);for(let u of t)c.delete(u);this.patch({unseen:c})}put(t,a){this.state.set((c)=>{let u=c[t],f=u.findIndex((p)=>p.id===a.id),m=f===-1?[...u,a]:u.map((p,g)=>g===f?a:p);return{...c,[t]:m}})}applyProjectOrder(t){let a=new Map(t.map((c,u)=>[c,u]));this.state.set((c)=>{let u=[...c.projects].sort((f,m)=>(a.get(f.id)??Number.MAX_SAFE_INTEGER)-(a.get(m.id)??Number.MAX_SAFE_INTEGER));return{...c,projects:u}})}remove(t,a){this.state.set((c)=>{if(t==="session"){this.replay.delete(a),this.recent=this.recent.filter((v)=>v!==a),this.notifiedRuns.delete(a),this.subscribed.delete(a),this.subscriptionCounts.delete(a);let{[a]:u,...f}=c.views,{[a]:m,...p}=c.islands??{},g=new Set(c.unseen);return g.delete(a),{...c,sessions:c.sessions.filter((v)=>v.id!==a),views:f,islands:p,unseen:g}}if(t==="project")return{...c,projects:c.projects.filter((u)=>u.id!==a),sessions:c.sessions.filter((u)=>u.projectID!==a)};return c})}sendSubscribe(t){if(!this.connectionID||this.state.get().status!=="open")return;if(this.replay.has(t))return;this.sendSubscription("subscribe",this.subscription(t))}subscription(t){let a=this.view(t),c=a.entries.at(-1)?.seq??0;return this.replay.set(t,{entries:new Map(a.entries.map((u)=>[u.seq,u])),draft:null}),{sessionID:t,after:c,truncationEpoch:this.epochs.get(t),...c===0?{tail:yye}:{}}}hasEarlier(t){let a=this.island(t);if(a)return a.hasBefore&&a.from>1;let c=this.view(t).entries[0];return c!==void 0&&c.seq>1}async loadEarlier(t){if(this.island(t))return this.extendIslandUp(t);let a=this.view(t).entries[0]?.seq;if(a===void 0||a<=1)return!1;let c=await this.request(`/api/sessions/${encodeURIComponent(t)}/entries?before=${a}&limit=${f4}`),u=this.view(t);if(this.closed||u.entries[0]?.seq!==a||c.length===0)return!1;return this.setView(t,{...u,entries:[...c.filter((f)=>f.seq<a),...u.entries]}),!0}island(t){return this.state.get().islands?.[t]}async openAround(t,a,c){let u=(this.jumps.get(t)??0)+1;this.jumps.set(t,u);let f=c?{seq:a,q:c}:{seq:a},m=this.view(t).entries[0]?.seq;if(m!==void 0&&a>=m)return"tail";let p=this.island(t);if(p&&a>=p.from&&a<=p.to)return this.setIsland(t,{...p,target:f}),"island";let g=await this.request(`/api/sessions/${encodeURIComponent(t)}/entries?around=${a}&before=${FW}&after=${FW}`);if(this.closed||this.jumps.get(t)!==u)return;let v=this.view(t).entries[0]?.seq;if(v!==void 0&&a>=v)return"tail";return this.setIsland(t,{...g,target:f}),this.joinIsland(t)?"tail":"island"}async loadLater(t){let a=this.island(t);if(!a)return!1;if(!a.hasAfter)return this.joinIsland(t);let c=await this.request(`/api/sessions/${encodeURIComponent(t)}/entries?from=${a.to+1}&limit=${f4}`);if(this.closed||this.island(t)!==a)return!1;return this.setIsland(t,{...a,entries:[...a.entries,...c.entries.filter((u)=>u.seq>a.to)],to:Math.max(a.to,c.to),hasAfter:c.hasAfter}),this.joinIsland(t),c.entries.length>0}closeIsland(t){this.jumps.set(t,(this.jumps.get(t)??0)+1),this.dropIsland(t)}async extendIslandUp(t){let a=this.island(t);if(!a||a.from<=1)return!1;let c=await this.request(`/api/sessions/${encodeURIComponent(t)}/entries?before=${a.from}&limit=${f4}`);if(this.closed||this.island(t)!==a||c.length===0)return!1;let u=c.filter((m)=>m.seq<a.from),f=u[0]?.seq??a.from;return this.setIsland(t,{...a,entries:[...u,...a.entries],from:f,hasBefore:f>1}),u.length>0}joinIsland(t){let a=this.island(t);if(!a||this.replay.has(t))return!1;let c=this.state.get().views[t];if(!c)return!1;let u=c.entries[0]?.seq;if(u===void 0?a.hasAfter:a.to+1<u)return!1;let f=u===void 0?a.entries:a.entries.filter((m)=>m.seq<u);return this.state.set((m)=>{let{[t]:p,...g}=m.islands??{};return{...m,islands:g,views:{...m.views,[t]:{...c,entries:[...f,...c.entries]}}}}),!0}setIsland(t,a){this.state.set((c)=>({...c,islands:{...c.islands,[t]:a}}))}dropIsland(t){if(!this.island(t))return;this.state.set((a)=>{let{[t]:c,...u}=a.islands??{};return{...a,islands:u}})}setView(t,a){if(this.replay.has(t)){this.replay.set(t,{entries:new Map(a.entries.map((c)=>[c.seq,c])),draft:a.draft});return}this.state.set((c)=>({...c,views:{...c.views,[t]:a}}))}async fetchPluginWebBundle(t,a){let c=di(this.server),u=await fetch(`${this.server.url}/api/plugins/${encodeURIComponent(t)}/web.js`,{headers:c,signal:a?AbortSignal.any([a,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)});if(!u.ok)throw Error(`插件脚本加载失败: HTTP ${u.status}`);return u.text()}async fetchPluginWebCSS(t,a){let c=await this.requestStream(`/api/plugins/${encodeURIComponent(t)}/web.css`,{signal:a?AbortSignal.any([a,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)});if(c.status===204)return;return c.text()}patch(t){this.state.set((a)=>({...a,...t}))}}var o2=new Map;function m4(t,a){let c=o2.get(t.id);if(c&&c.server.token===t.token&&c.server.url===t.url&&JSON.stringify(c.server.headers)===JSON.stringify(t.headers))return c;c?.close();let u=new mb(t,a);return o2.set(t.id,u),u}go.subscribe((t)=>{for(let[a,c]of o2){let u=t.find((f)=>f.id===a);if(u){m4(u);continue}c.close(),o2.delete(a)}});var Iye=Symbol.for("react.fragment");var UW=Iye,qW=void 0;var HW={react:Ct,"react-dom":ql,"react/jsx-runtime":kT,"react/jsx-dev-runtime":p4,"@basalt/plugin/web":yL,"@basalt/ui":h4};function Tye(t,a){let c=`window.__BASALT_RUNTIME__[${JSON.stringify(t)}]`;return Object.keys(a).map((u,f)=>`const e${f} = ${c}[${JSON.stringify(u)}]; export { e${f} as ${u} };`).join(`
1131
+ `)}var pb;function Lye(){if(pb)return pb;window.__BASALT_RUNTIME__=HW,pb=new Map(Object.entries(HW).map(([a,c])=>[a,URL.createObjectURL(new Blob([Tye(a,c)],{type:"text/javascript"}))]));let t=document.createElement("script");return t.type="importmap",t.textContent=JSON.stringify({imports:Object.fromEntries(pb)}),document.head.append(t),pb}function Rye(t,a){let c=t.default;if(c&&typeof c==="object"&&"apiVersion"in c)return c;let u={},f=t.views??(c&&typeof c==="object"?Reflect.get(c,"views"):void 0);for(let m of a.web??[]){if(m.kind!=="sidebar"||!m.view)continue;let p=f&&typeof f==="object"?Reflect.get(f,m.view):void 0;if(p?.kind&&p.kind!=="sidebar")continue;let g=p?.Component??c;if(typeof g!=="function"&&(typeof g!=="object"||!g))continue;let v=g;u[m.view]={kind:"sidebar",load:async()=>({default:v})}}return{id:a.id,apiVersion:1,views:u}}async function jW(t,a,c){let{source:u,css:f}=await Eye(t,a,c);c?.throwIfAborted(),Lye();let m=URL.createObjectURL(new Blob([u],{type:"text/javascript"}));try{let p=await import(m);return{module:Rye(p,a),css:f}}finally{URL.revokeObjectURL(m)}}async function Eye(t,a,c){let u=a.webRevision&&`${a.version}:${a.webRevision}`,f=RU(t.server.id,a.id),m=u?await sm?.get(f):void 0;if(m&&m.revision===u)return m;let[p,g]=await Promise.all([t.fetchPluginWebBundle(a.id,c),t.fetchPluginWebCSS(a.id,c)]);if(u)sm?.set(f,{revision:u,source:p,css:g});return{source:p,css:g}}var Pye="(max-width: 767px)",Aye=24,GW=10,Mye=-40,Dye=["transition","translate","opacity"];function $W(t,a,c){let[u,f]=r(!1),m=i({open:t,onOpenChange:a});m.current={open:t,onOpenChange:a};let{root:p,stage:g,drawer:v,overlay:k}=c;return o(()=>{let S=p.current;if(!S)return;let I;function T(D,N){for(let O=D;O&&O!==S;O=O.parentElement){if(O.scrollWidth<=O.clientWidth)continue;let F=getComputedStyle(O).overflowX;if(F!=="auto"&&F!=="scroll")continue;if(N>0&&O.scrollLeft>0)return!0;if(N<0&&O.scrollLeft+O.clientWidth<O.scrollWidth-1)return!0}return!1}function L(D,N){let O=D/N;g.current?.style.setProperty("transition","none"),g.current?.style.setProperty("translate",`${D}px 0`),v.current?.style.setProperty("transition","none"),v.current?.style.setProperty("translate",`${Mye*(1-O)}px 0`),v.current?.style.setProperty("opacity",String(O)),k.current?.style.setProperty("transition","none"),k.current?.style.setProperty("opacity",String(O))}function R(){for(let D of[g.current,v.current,k.current])for(let N of Dye)D?.style.removeProperty(N)}let A=(D)=>{I=void 0;let N=D.touches[0],O=D.target;if(D.touches.length!==1||!N||!(O instanceof Node))return;if(!matchMedia(Pye).matches)return;let F=m.current.open;if(!(F?[v.current,k.current]:[g.current]).some((U)=>U?.contains(O)))return;if(!F&&N.clientX<Aye)return;let B=v.current?.offsetWidth??0;if(B===0)return;I={startX:N.clientX,startY:N.clientY,fromOpen:F,width:B,mode:"pending",originX:N.clientX,offset:F?B:0,samples:[]}},E=(D)=>{let N=D.touches[0];if(!I||!N)return;if(I.mode==="pending"){let F=N.clientX-I.startX,z=N.clientY-I.startY;if(Math.abs(F)<GW&&Math.abs(z)<GW)return;let B=I.fromOpen?-1:1,U=D.cancelable&&Math.abs(F)>Math.abs(z)*1.2,Y=D.target instanceof Element&&T(D.target,B);if(!U||Math.sign(F)!==B||Y){I=void 0;return}I.mode="drag",I.originX=N.clientX,f(!0)}D.preventDefault();let O=I.fromOpen?I.width:0;if(I.offset=Math.min(I.width,Math.max(0,O+N.clientX-I.originX)),I.samples.push({x:N.clientX,t:D.timeStamp}),I.samples.length>5)I.samples.shift();L(I.offset,I.width)},P=(D)=>{let N=I;if(I=void 0,N?.mode!=="drag")return;let O=N.samples[0],F=N.samples[N.samples.length-1],z=0;if(O&&F&&F.t>O.t)z=(F.x-O.x)/(F.t-O.t)*1000;let B=N.offset+z*0.2,U=D.type==="touchcancel"?N.fromOpen:B>N.width/2;R(),f(!1),m.current.onOpenChange(U)};return S.addEventListener("touchstart",A,{passive:!0}),S.addEventListener("touchmove",E,{passive:!1}),S.addEventListener("touchend",P),S.addEventListener("touchcancel",P),()=>{S.removeEventListener("touchstart",A),S.removeEventListener("touchmove",E),S.removeEventListener("touchend",P),S.removeEventListener("touchcancel",P),R()}},[p,g,v,k]),u}function Nye(t){return t.type==="application/json"||t.name.toLowerCase().endsWith(".json")}async function a2(t,a,c){if(!Nye(a)){le.error("不是会话文件",{description:"请选择 Basalt 导出或 opencode 迁移文件(.json)"});return}try{let u=await t.importSession(await a.text(),c?.id);return le.success("已导入会话",{description:c?`放进了项目 ${c.name}`:"作为聊天导入"}),u}catch(u){V(u,"导入会话失败");return}}var i2="data-drop-project",g4="data-drop-over";function KW(t){let[a,c]=r(),u=i(t);return u.current=t,o(()=>{let f=null,m=(T)=>T.dataTransfer?.types.includes("Files")===!0,p=(T)=>T.target instanceof Element&&T.target.closest("[data-composer]");function g(T){let L=T.target instanceof Element?T.target.closest(`[${i2}]`):null,R=L?.getAttribute(i2);return{project:R?u.current.projects.find((E)=>E.id===R):u.current.current,group:L}}function v(){f?.removeAttribute(g4),f=null,c(void 0)}function k(T){if(!m(T)||p(T))return v();if(T.preventDefault(),T.dataTransfer)T.dataTransfer.dropEffect="copy";let{project:L,group:R}=g(T);if(f!==R)f?.removeAttribute(g4),R?.setAttribute(g4,""),f=R;c((A)=>A&&A.project?.id===L?.id?A:{project:L})}function S(T){if(!m(T)||p(T))return;T.preventDefault();let{project:L}=g(T);v();let R=T.dataTransfer?.files[0];if(!R)return;a2(u.current.conn,R,L).then((A)=>{if(A)u.current.onImported(A)})}function I(T){if(!T.relatedTarget)v()}return window.addEventListener("dragover",k),window.addEventListener("drop",S),window.addEventListener("dragleave",I),()=>{window.removeEventListener("dragover",k),window.removeEventListener("drop",S),window.removeEventListener("dragleave",I),v()}},[]),{over:a}}function WW(t){return _(),n("div",{role:"status",className:l("chat.dockBanner"),children:[e(Dt,{className:"size-4 shrink-0 text-faint"}),n("div",{className:"min-w-0 flex-1",children:[e("div",{className:"text-sm text-ink",children:"此会话已归档"}),e("div",{className:"text-xs text-dim",children:"恢复后才能继续对话"})]}),t.onBack&&e(b,{size:"sm",variant:"ghost",onClick:t.onBack,children:"返回归档"}),e(b,{size:"sm",loading:t.pending,disabled:t.pending,onClick:t.onRestore,children:"恢复会话"})]})}function s2(t){_();let[a,c]=r(()=>matchMedia("(max-width: 767px)").matches),u=bh({media:"(max-width: 767px)",expandable:!0,open:a,onClose:t.onClose});o(()=>{let m=matchMedia("(max-width: 767px)"),p=()=>c(m.matches);return m.addEventListener("change",p),()=>m.removeEventListener("change",p)},[]),o(()=>{let m=(p)=>{if(p.key==="Escape")t.onClose()};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[t.onClose]);let f=n("header",{className:l("workspace.header","justify-between border-b-0 pt-0"),children:[n("div",{className:"flex items-center gap-2",children:[e(wc,{className:"size-4 text-dim"}),e("h2",{className:"text-sm font-medium text-ink",children:t.title})]}),!a&&e(j,{label:`关闭${t.title}`,shortcut:"esc",onClick:t.onClose,children:e(oe,{className:"size-4"})})]});if(a)return n("div",{className:"fixed inset-0 z-50 md:hidden",children:[e(H.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:0.2},className:"fixed inset-0 bg-overlay backdrop-blur-[2px]",onClick:t.onClose}),n(H.aside,{ref:u.ref,"aria-label":t.title,style:u.style,exit:{y:"110%"},transition:fE,className:"sheet-surface z-50 flex min-h-0 flex-col outline-none",children:[n("div",{"data-sheet-handle":!0,className:"shrink-0 cursor-grab touch-none select-none active:cursor-grabbing",children:[e(am,{}),f]}),e("div",{className:t.fill?"flex min-h-0 flex-1 flex-col":"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:t.children})]})]});return e(H.aside,{"aria-label":t.title,initial:{width:0,opacity:0,marginRight:0},animate:{width:384,opacity:1,marginRight:8},exit:{width:0,opacity:0,marginRight:0},transition:{duration:0.24,ease:[0.22,1,0.36,1]},className:l("sidebar.rightShell","relative hidden shrink-0 overflow-hidden will-change-[width,opacity] md:flex md:flex-col md:my-2 md:h-auto md:max-h-none md:rounded-2xl md:border md:border-line md:shadow-composer"),children:n("div",{className:"flex h-full w-96 min-w-96 flex-col overflow-hidden",children:[f,t.children]})})}var XW="basalt.bottomPanel.height",Oye=320,l2=160;function YW(t){_();let[a,c]=r(()=>matchMedia("(max-width: 767px)").matches),[u,f]=r(()=>{try{let k=Number(localStorage.getItem(XW));if(Number.isFinite(k)&&k>=l2)return k}catch{}return Oye}),m=i(null),[p,g]=r(!1);if(o(()=>{let k=matchMedia("(max-width: 767px)"),S=()=>c(k.matches);return k.addEventListener("change",S),()=>k.removeEventListener("change",S)},[]),a)return e(s2,{title:t.title,onClose:t.onClose,fill:!0,children:t.children});let v=(k)=>{let S=m.current,I=S?.parentElement;if(!S||!I)return;k.preventDefault(),g(!0);let T=k.currentTarget;T.setPointerCapture(k.pointerId);let L=k.clientY,R=S.offsetHeight,A=Math.max(l2,I.clientHeight*0.7),E=R,P=(N)=>{E=Math.min(A,Math.max(l2,R+L-N.clientY)),f(E)},D=()=>{T.removeEventListener("pointermove",P),T.removeEventListener("pointerup",D),T.removeEventListener("pointercancel",D),g(!1);try{localStorage.setItem(XW,String(Math.round(E)))}catch{}};T.addEventListener("pointermove",P),T.addEventListener("pointerup",D),T.addEventListener("pointercancel",D)};return e(H.section,{ref:m,"aria-label":t.title,initial:{height:0,opacity:0,marginTop:0},animate:{height:u,opacity:1,marginTop:8},exit:{height:0,opacity:0,marginTop:0},transition:p?{duration:0}:{duration:0.24,ease:[0.22,1,0.36,1]},className:"relative shrink-0 overflow-hidden rounded-2xl border border-line bg-bg shadow-composer will-change-[height,opacity]",children:n("div",{style:{height:u-2},className:"relative flex flex-col",children:[e("button",{type:"button","aria-label":`调整${t.title}高度`,onPointerDown:v,onKeyDown:(k)=>{if(k.key!=="ArrowUp"&&k.key!=="ArrowDown")return;k.preventDefault(),f((S)=>Math.max(l2,S+(k.key==="ArrowUp"?24:-24)))},className:"group absolute inset-x-0 top-0 z-10 flex h-2.5 cursor-row-resize justify-center pt-1 outline-none",children:e("span",{"aria-hidden":!0,className:d("h-1 w-10 rounded-full bg-line-strong opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",p&&"opacity-100")})}),e("h2",{className:"sr-only",children:t.title}),e("div",{className:"absolute top-2 right-2 z-10",children:e(j,{label:`关闭${t.title}`,onClick:t.onClose,children:e(oe,{className:"size-4"})})}),t.children]})})}function QW(){return new Map(Ae().map((t)=>[t.id,new Map(Object.entries(t.views??{}).filter(([,a])=>a.kind==="sidebar").map(([a,c])=>{let u=kc(c,c.load);return[a,{kind:c.kind,Component:u}]}))]))}var ZW=QW();pn(()=>{ZW=QW()});function c2(t,a=Ae()){let c=[];for(let u of t){if(u.status!=="enabled")continue;for(let f of u.web??[]){if(f.kind!=="sidebar"||!f.view)continue;if(a.find((m)=>m.id===u.id)?.views?.[f.view]?.kind!=="sidebar")continue;c.push({...f,id:`${u.id}/${f.id}`,localID:f.id,pluginID:u.id,kind:"sidebar",view:f.view,placement:f.placement==="bottom"?"bottom":"right"})}}return c}function x4(t){Se();let a=ZW.get(t.contribution.pluginID)?.get(t.contribution.view)?.Component;if(!a)return null;let c=e(aa,{pluginID:t.contribution.pluginID,resetKey:a,fallbackText:"插件侧栏渲染失败",children:e(Je,{value:Yi,children:e(qo,{fallback:e("p",{role:"status",className:"p-3 text-xs text-faint",children:"正在加载插件视图..."}),children:e(a,{connection:t.connection,session:t.session,entries:t.entries,onClose:t.onClose},t.session.id)})})});if(t.contribution.placement==="bottom")return e(YW,{title:t.contribution.title,onClose:t.onClose,children:c});return e(s2,{title:t.contribution.title,onClose:t.onClose,children:c})}var _ye={user:{label:"用户",badge:"text-ink"},assistant:{label:"助手",badge:"text-accent-strong"},thinking:{label:"思考",badge:"text-dim"},tool_input:{label:"工具调用",badge:"text-dim"},tool_output:{label:"工具输出",badge:"text-dim"},error:{label:"报错",badge:"text-danger"},attachment:{label:"附件",badge:"text-dim"},notice:{label:"通知",badge:"text-dim"},extension:{label:"扩展",badge:"text-dim"},title:{label:"标题",badge:"text-dim"}};function Yh(t){return _ye[t]??{label:t,badge:"text-dim"}}var zye=["tool_input","tool_output","error"],nX=(t)=>Array.from(t,(a,c)=>({char:a,src:c})),Bye=(t)=>t.map((a)=>a.char).join(""),hb=(t)=>!t?.char.trim();function Fye(t){if(/^\s*\|?[\s:|-]{3,}\|?\s*$/.test(t)&&t.includes("-"))return[];if(/^\s*(```|~~~)/.test(t))return[];let a=nX(t),c=/^\s*(?:#{1,6}\s+|>\s?|[-*+]\s+|\d+[.)]\s+)/.exec(t);if(c)a=a.slice(c[0].length);if(/^\s*\|.*\|\s*$/.test(t)){let m=[];for(let p of a)if(p.char!=="|")m.push(p);else if(m.length)m.push({char:"·",src:p.src});a=m;while(hb(a[0]))a=a.slice(1);while(hb(a[a.length-1])||a[a.length-1]?.char==="·")a=a.slice(0,-1)}let u=(m,p)=>{let g=new Set;for(let v of Bye(a).matchAll(m))for(let[k,S]of p(v))for(let I=k;I<S;I++)g.add(I);if(g.size)a=a.filter((v,k)=>!g.has(k))},f=(m)=>(p)=>[[p.index,p.index+m],[p.index+p[0].length-m,p.index+p[0].length]];return u(/\[([^\]]+)\]\(([^)]*)\)/g,(m)=>[[m.index,m.index+1],[m.index+1+(m[1]?.length??0),m.index+m[0].length]]),u(/(\*\*|__|~~)(?=\S)(.+?)(?<=\S)\1/g,f(2)),u(/(?<![\w*])\*(?=[^\s*])([^*]+?)(?<=[^\s*])\*(?![\w*])/g,f(1)),u(/`([^`]+)`/g,f(1)),a}function JW(t){let a=t.map((u)=>u.findIndex((f)=>!hb(f))).filter((u)=>u>=0),c=a.length?Math.min(...a):0;return c?t.map((u)=>u.slice(c)):t}function eX(t,a,c,u){if(t.length<=c)return t;let f=a.length?t.findIndex((g)=>g.src>=(a[0]?.[0]??0)):0,m=Math.max(0,Math.min(f-u,t.length-c)),p=t.slice(m,m+c);if(m>0)p.unshift({char:"…",src:-1});return p}function Vye(t){let a=[],c=0;for(let[u,f]of[...t.ranges].sort((m,p)=>m[0]-p[0])){if(u<c||f<=u||u<0||f>t.text.length)continue;a.push([u,f]),c=f}return a}function v4(t,a,c){let u=[],f="",m=!1,p=()=>{if(!f)return;let g=`${c}:${u.length}`;u.push(m?e("mark",{className:l("search.highlight"),children:f},g):e(Xe,{children:f},g)),f=""};for(let g of t){let v=g.src>=0&&a.some(([k,S])=>g.src>=k&&g.src<S);if(v!==m)p(),m=v;f+=g.char}return p(),u}var tX=(t)=>t.filter((a,c)=>!(a.char===" "&&t[c-1]?.char===" "));function u2({lines:t,field:a,variant:c="card"}){_();let u=a!==void 0&&!zye.includes(a),m=t.map((T,L)=>({id:L,items:u?Fye(T.text):nX(T.text),ranges:Vye(T),line:T.line})).filter((T)=>T.items.some((L)=>!hb(L)));if(c==="inline"){let T=m.find((R)=>R.ranges.length)??m[0];if(!T)return null;let L=tX(JW([T.items])[0]??[]);while(hb(L[0]))L=L.slice(1);return e("span",{className:"block truncate",children:v4(eX(L,T.ranges,90,28),T.ranges,"i")})}let p=Math.max(0,m.findIndex((T)=>T.ranges.length)),g=Math.max(0,Math.min(p-1,m.length-3)),v=m.slice(g,g+3);if(u)return e("span",{className:"line-clamp-3 text-[13.5px] leading-[1.55] break-words text-ink",children:v.flatMap((T,L)=>[...v4(tX(T.items),T.ranges,`p${L}`)," "])});let k=JW(v.map((T)=>T.items)),S=t.length>1,I=g>0||m.length>g+3;return n("span",{className:"block font-mono text-[12px] leading-[1.65] text-dim",children:[v.map((T,L)=>n("span",{className:"flex gap-3",children:[S&&T.line!==void 0&&e("span",{className:"w-6 shrink-0 text-right text-faint/70 tabular-nums select-none",children:T.line}),e("span",{className:"min-w-0 flex-1 truncate",children:v4(eX(k[L]??[],T.ranges,80,20),T.ranges,`c${L}`)})]},T.id)),I&&e("span",{className:"block text-faint",children:"…"})]})}function rX({hit:t}){return n(h,{children:[t.isError&&t.field!=="error"&&e(it,{tone:"danger",children:"报错"}),t.flags.archived&&e(it,{tone:"neutral",children:"归档"}),t.flags.compacted&&e(it,{tone:"neutral",children:"已压缩"}),t.flags.partial&&e(it,{tone:"warning",children:"部分内容仅可深度搜索"}),!!t.forks?.length&&n(it,{tone:"neutral",children:["分叉 ×",t.forks.length]})]})}var Uye={ready:"bg-success",backfilling:"animate-pulse bg-warning",rebuilding:"animate-pulse bg-warning",degraded:"bg-warning",disabled:"bg-faint"};function qye(t,a=!1){if(!t)return"正在获取索引状态…";switch(t.state){case"ready":return`索引就绪${t.lag?` · 待更新 ${t.lag} 条`:""}`;case"disabled":return"历史搜索未启用";case"degraded":return a?"索引降级 · 扫描搜索":"索引降级 · 使用扫描搜索(较慢)";default:{let c=t.total?Math.min(100,Math.floor(t.indexed/t.total*100)):0;if(a)return`索引中 ${c}%`;return`索引中 ${c}% · 较旧的会话可能缺失${t.etaSec!==void 0?` · 约 ${t.etaSec} 秒`:""}`}}}function oi({status:t,onEnable:a,showEnable:c=!0,compact:u=!1,className:f}){return n("div",{role:"status",className:d("flex min-w-0 items-center gap-1.5 py-1 text-xs text-dim",f),children:[t&&e("span",{"aria-hidden":!0,className:d("size-1.5 shrink-0 rounded-full",Uye[t.state])}),e("span",{className:"truncate",children:qye(t,u)}),c&&t?.state==="disabled"&&e("a",{className:"shrink-0 text-accent-strong underline decoration-accent-strong/40 underline-offset-2 hover:decoration-accent-strong",href:zl({kind:"settings",tab:"database"}),onClick:(m)=>{if(a)m.preventDefault(),a()},children:"去设置开启"})]})}var Qh="[&:not(:has([cmdk-item]))]:hidden";function oX(t){Se();let[a,c]=r(""),u=t2(t.server,t.open&&a.trim().length>=2?{q:a,limit:5}:void 0),[f,m]=r(""),p=u.groups.flatMap((P)=>P.hits.map((D)=>({group:P,hit:D}))).slice(0,5),g=u.groups[0]?.hits[0],v=g?`hit:${g.sessionID}:${g.seq}:${g.field}`:void 0;o(()=>{if(v)m(v)},[v]);let k=a.trim().length>=2&&(p.length>0||u.loading||!!u.error||!!u.status&&u.status.state!=="ready"),S=new Map(t.projects.map((P)=>[P.id,P])),I=new Map(t.sessions.map((P)=>[P.id,P])),T=Xh(t.sessions),L=(P)=>!a.trim()||P.toLocaleLowerCase().includes(a.trim().toLocaleLowerCase()),R=T.filter((P)=>!P.parentID&&L(fe(P))),A=T.filter((P)=>Boolean(P.parentID)&&L(fe(P))),E=(P)=>()=>{t.onOpenChange(!1),P()};return e(Hu,{open:t.open,onOpenChange:t.onOpenChange,children:n(ju,{children:[e(Gu,{className:td}),n($u,{"aria-describedby":void 0,className:d("fixed top-[12dvh] left-1/2 z-50 w-[min(36rem,calc(100vw-1.5rem))] -translate-x-1/2 overflow-hidden rounded-2xl border border-line bg-panel shadow-float outline-none","data-[state=closed]:animate-dialog-out data-[state=open]:animate-dialog-in"),children:[e(ph,{className:"sr-only",children:"搜索"}),n(md,{loop:!0,shouldFilter:!1,value:f,onValueChange:m,children:[e(pd,{value:a,onValueChange:c,placeholder:"搜索历史或操作…",onFocus:(P)=>P.currentTarget.select(),autoFocus:!0}),n(hd,{className:"max-h-[min(26rem,60dvh)]",children:[k&&n(Xi,{heading:n("span",{className:"flex items-center justify-between gap-3",children:["消息",u.status&&u.status.state!=="ready"&&e(oi,{compact:!0,status:u.status,className:"py-0 font-normal",onEnable:E(()=>t.onPlace({kind:"settings",tab:"database"}))})]}),forceMount:!0,children:[p.map(({group:P,hit:D})=>n(BS,{forceMount:!0,value:`hit:${D.sessionID}:${D.seq}:${D.field}`,className:"items-center",onSelect:E(()=>t.onPlace(D.seq===0?{kind:"session",id:D.sessionID}:gd(D.sessionID,D.seq,a))),children:[n("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block truncate text-[13.5px] leading-5 font-medium",children:P.session.title||"新会话"}),e("span",{className:"block text-[12.5px] leading-5 text-dim",children:e(u2,{lines:D.snippet,field:D.field,variant:"inline"})})]}),n("span",{className:"shrink-0 self-start pt-0.5 text-[11px] text-faint",children:[e("span",{className:Yh(D.field).badge,children:Yh(D.field).label})," ·"," ",mt(D.time)]})]},`${D.sessionID}:${D.seq}:${D.field}`)),!p.length&&u.loading&&e("div",{role:"status","aria-label":"搜索中",className:"animate-pulse space-y-2.5 px-2.5 py-2",children:[0,1].map((P)=>n("div",{className:"flex items-center gap-3",children:[e("span",{className:"size-7 shrink-0 rounded-lg bg-raised"}),n("span",{className:"flex-1 space-y-1.5",children:[e("span",{className:"block h-3 w-1/3 rounded bg-raised"}),e("span",{className:"block h-3 w-3/4 rounded bg-raised"})]})]},P))}),u.error&&e("p",{role:"status",className:"px-2.5 py-1.5 text-xs text-dim",children:"搜索暂时中断,可在搜索面板重试"}),n("button",{type:"button",className:"mt-0.5 flex h-8 w-full items-center gap-2 rounded-lg px-2.5 text-left text-[12.5px] text-dim transition-colors hover:bg-raised hover:text-ink max-sm:h-10",onClick:E(()=>t.onGlobalSearch(a)),children:[e("span",{className:"flex-1",children:"在全部历史消息中查看更多"}),e(je,{className:"max-sm:hidden",children:"mod+shift+f"})]})]}),!g&&e(jh,{children:"没有找到"}),n(Xi,{heading:"操作",className:Qh,children:[L("新聊天")&&e(Po,{icon:e(Or,{}),onSelect:E(()=>t.onPlace({kind:"new"})),children:"新聊天"}),L("添加项目")&&e(Po,{icon:e(Af,{}),onSelect:E(t.onAddProject),children:"添加项目"}),Rm.filter((P)=>L(P.title)).map((P)=>{let D=P.icon;return e(Po,{icon:e(D,{}),onSelect:E(()=>t.onPlace({kind:"page",pluginID:P.pluginID,viewID:P.viewID})),children:P.title},P.pluginID)}),L("设置")&&e(Po,{icon:e(pt,{}),onSelect:E(()=>t.onPlace({kind:"settings"})),children:"设置"})]}),!!t.commands?.length&&e(Xi,{heading:"当前会话",className:Qh,children:t.commands.filter((P)=>L(P.title)).map((P)=>e(Po,{value:`plugin ${P.id} ${P.title}`,disabled:P.disabled,onSelect:E(P.execute),children:P.title},P.id))}),t.projects.length>0&&n(h,{children:[e(tb,{}),e(Xi,{heading:"项目",className:Qh,children:t.projects.filter((P)=>L(`${P.name} ${P.directory}`)).map((P)=>e(Po,{value:`project ${P.name} ${P.directory}`,icon:e(dt,{}),onSelect:E(()=>t.onPlace({kind:"new",projectID:P.id})),trailing:e("span",{className:"max-w-48 truncate font-mono text-[11px] text-faint",children:P.directory}),children:P.name},P.id))})]}),R.length>0&&n(h,{children:[e(tb,{}),e(Xi,{heading:"会话",className:Qh,children:R.map((P)=>{let D=P.projectID?S.get(P.projectID):void 0;return e(Po,{value:`session ${P.id} ${fe(P)} ${D?.name??""}`,icon:D?e(dt,{}):e(Br,{}),onSelect:E(()=>t.onPlace({kind:"session",id:P.id})),trailing:n("span",{className:"shrink-0 text-[11px] text-faint",children:[D?`${D.name} · `:"",mt(P.updated)]}),children:fe(P)},P.id)})})]}),A.length>0&&n(h,{children:[e(tb,{}),e(Xi,{heading:"子代理",className:Qh,children:A.map((P)=>{let D=P.parentID?I.get(P.parentID):void 0;return e(Po,{value:`subagent ${P.id} ${fe(P)} ${D?fe(D):""}`,icon:e(at,{}),onSelect:E(()=>t.onPlace({kind:"session",id:P.id})),trailing:n("span",{className:"shrink-0 text-[11px] text-faint",children:[D?`${fe(D)} · `:"",mt(P.updated)]}),children:fe(P)},P.id)})})]}),e(tb,{}),n(Xi,{heading:"外观",className:Qh,children:[L("theme system 跟随系统")&&e(Po,{icon:e(fr,{}),value:"theme system 跟随系统",onSelect:E(()=>jr("system")),children:"跟随系统"}),L("theme light 浅色")&&e(Po,{icon:e(ha,{}),value:"theme light 浅色",onSelect:E(()=>jr("light")),children:"浅色"}),L("theme dark 深色")&&e(Po,{icon:e(ma,{}),value:"theme dark 深色",onSelect:E(()=>jr("dark")),children:"深色"})]})]})]})]})]})})}var aX=new WeakMap;function iX(t){return`basalt.modelOnboardingDismissed.${t.server.id}`}function b4(t){let a=aX.get(t);if(!a){let c=!1;try{c=localStorage.getItem(iX(t))==="1"}catch{}a=Tr({kind:c?"done":"model"}),aX.set(t,a)}return a}function ls(t){return se(b4(t))}function Gr(t,a,c){let u=b4(t);if(u.get().kind===a)u.set(c)}function Zh(t){let a=b4(t);if(a.get().kind==="done")return;a.set({kind:"done"});try{localStorage.setItem(iX(t),"1")}catch{}}var sX=[0.22,1,0.36,1],y4="basalt.lastModel",w4="basalt.lastThinking";function lX(t){let a=se(t.conn.state),c=a.projects.find((E)=>E.id===t.projectID),u=Fh(t.conn),[f,m]=r(()=>{try{return localStorage.getItem(y4)??""}catch{return""}}),p=w(()=>{if(!u||u.models.length===0)return f;if(f&&u.models.some((E)=>E.id===f))return f;return u.models[0]?.id??""},[f,u]),g=Xh(a.sessions).filter((E)=>!E.parentID&&(E.projectID??void 0)===c?.id).slice(0,3),v=$i(a.sessions,c?.id??"chat").length,[k,S]=r(()=>{try{return localStorage.getItem(w4)??void 0}catch{return}}),I=w(()=>u?.models.find((E)=>E.id===p),[u,p]);function T(E){m(E);try{if(E)localStorage.setItem(y4,E);else localStorage.removeItem(y4)}catch{}}function L(E){S(E);try{if(E)localStorage.setItem(w4,E);else localStorage.removeItem(w4)}catch{}}async function R(E,P){let D=await t.conn.createSession({projectID:c?.id,model:p||void 0,thinking:k||void 0});t.onOpen(D.id),Zh(t.conn),await t.conn.prompt(D.id,E,P)}async function A(E){let P=await a2(t.conn,E,c);if(P)t.onOpen(P.id)}return e("div",{className:"flex min-h-0 flex-1 flex-col items-center overflow-x-hidden overflow-y-auto overscroll-y-contain px-4",children:n("div",{className:"flex w-full max-w-2xl flex-1 flex-col pt-6 max-sm:pt-2 sm:justify-center sm:pb-[14vh]",children:[e(H.div,{initial:{opacity:0,scale:0.94},animate:{opacity:1,scale:1},transition:{duration:0.65,ease:sX},className:"mx-auto -mb-10 select-none max-sm:mt-[6vh] sm:-mb-20",children:e(Aa,{variant:"watermark",className:"size-40 text-ink sm:size-80"})}),c&&n(H.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:0.1},className:"relative z-10 mb-3 flex min-w-0 items-center justify-center gap-1.5 text-sm text-dim",children:[e(dt,{className:"size-4 shrink-0 text-faint"}),e("span",{className:"truncate font-medium sm:hidden",title:c.directory,children:c.name}),e("span",{className:"truncate font-mono text-[12.5px] max-sm:hidden",title:c.directory,children:c.directory}),e(j,{label:"项目设置",size:"icon-sm",onClick:()=>t.onEditProject(c),children:e(_f,{className:"size-3.5"})})]}),e(H.div,{initial:{opacity:0,y:14},animate:{opacity:1,y:0},transition:{duration:0.6,delay:0.08,ease:sX},className:"relative z-10 max-sm:order-last max-sm:mt-auto max-sm:pt-4 max-sm:pb-[max(0.75rem,env(safe-area-inset-bottom))]","data-tour":"composer",children:e(dd,{conn:t.conn,projectID:c?.id,draftKey:`new:${c?.id??""}`,placeholder:c?`在 ${c.name} 里做点什么?`:"今天想聊点什么?",autoFocus:!0,onSend:R,aside:u&&n("div",{className:"flex min-w-0 items-center gap-1",children:[e("div",{"data-tour":"model-picker",className:"flex min-w-0",children:e(Gh,{models:u,value:p,onChange:T,onConfigure:t.onConfigureModels})}),e(US,{value:k,levels:I?.thinkingLevels,onChange:L})]})})}),g.length>0?e(Hye,{sessions:g,archivedCount:v,onOpen:t.onOpen,onArchive:t.onArchive,onImport:A}):n(H.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:0.5,delay:0.25},className:"mt-8 flex justify-center gap-1",children:[t.onArchive&&n("button",{type:"button",onClick:t.onArchive,className:"flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs text-faint transition-colors hover:bg-raised/70 hover:text-ink",children:[e(Dt,{className:"size-3.5 text-faint"}),n("span",{children:["已归档的",c?"项目":"","会话",v>0?`(${v})`:""]})]}),e(cX,{onFile:A,className:"rounded-lg px-3 py-1.5 text-xs"})]})]})})}function Hye(t){return n(H.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:0.5,delay:0.25},className:"mt-8 max-sm:mt-6",children:[n("div",{className:"mb-1.5 flex items-center justify-between gap-3 px-1 text-xs font-medium text-faint",children:[e("span",{children:"最近"}),n("div",{className:"flex items-center gap-3",children:[e(cX,{onFile:t.onImport}),t.onArchive&&n("button",{type:"button",onClick:t.onArchive,className:"flex items-center gap-1 transition-colors hover:text-ink",children:[e(Dt,{className:"size-3 text-faint"}),n("span",{children:["已归档",t.archivedCount>0?`(${t.archivedCount})`:""]})]})]})]}),e("ul",{className:"grid grid-cols-1 gap-px",children:t.sessions.map((a)=>e("li",{className:"min-w-0",children:n("button",{type:"button",onClick:()=>t.onOpen(a.id),className:"flex w-full items-center gap-3 rounded-lg px-2.5 py-2 text-left text-[14px] transition-colors hover:bg-raised/70 active:bg-raised/70 max-sm:rounded-xl max-sm:px-3 max-sm:py-2.5",children:[e("span",{className:"min-w-0 flex-1 truncate text-dim",children:fe(a)}),e("span",{className:"shrink-0 text-xs text-faint",children:mt(a.updated)})]})},a.id))})]})}function cX(t){let a=i(null);return n(h,{children:[e("input",{ref:a,type:"file",accept:"application/json,.json",className:"hidden",onChange:(c)=>{let u=c.target.files?.[0];if(c.target.value="",u)t.onFile(u)}}),n("button",{type:"button",title:"导入 Basalt 或 OpenCode 导出的会话文件",onClick:()=>a.current?.click(),className:d("flex items-center gap-1 text-faint transition-colors hover:bg-raised/70 hover:text-ink",t.className),children:[e(A0,{className:"size-3 text-faint"}),e("span",{children:"导入会话"})]})]})}var jye=700,gb=6,Gye=4;function $ye(t){let[a,c]=r(),[u,f]=r(),[m,p]=r();o(()=>{if(!t){c(void 0);return}let v=()=>{let S=[...document.querySelectorAll(t)].find((I)=>I.getClientRects().length>0);c(S)};v();let k=new MutationObserver(v);return k.observe(document.body,{childList:!0,subtree:!0}),()=>k.disconnect()},[t]),o(()=>{if(!a)return;let v=setTimeout(()=>f(a),jye);return()=>clearTimeout(v)},[a]);let g=a!==void 0&&u===a;return K(()=>{if(!g||!a){p(void 0);return}let v=()=>p(a.getBoundingClientRect());v();let k=new ResizeObserver(v);return k.observe(a),k.observe(document.body),window.addEventListener("resize",v),window.addEventListener("scroll",v,!0),()=>{k.disconnect(),window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0)}},[g,a]),g?{element:a,rect:m}:{}}function uX(t){_();let a=ls(t.conn),c=Et(t.conn.state,(T)=>T.status==="open"),u=Fh(t.conn),f=c&&u!==void 0&&!u.models.some((T)=>T.available!==!1),m;if((a.kind==="model"||a.kind==="provider")&&f)m='[data-tour="model-picker"], [data-tour="add-provider"]';else if(a.kind==="saved")m=`[data-tour-provider="${CSS.escape(a.providerID)}"]`;else if(a.kind==="chat")m='[data-tour="composer"]';let{element:p,rect:g}=$ye(m),v=w(()=>({current:p??null}),[p]);if(!p||!g)return null;let k=e(b,{size:"sm",variant:"ghost",onClick:()=>Zh(t.conn),children:"跳过"}),S;if(a.kind==="saved")S={title:"接入成功",body:a.models>0?`获取到 ${a.models} 个模型,回到首页就能开始对话。`:"提供方已保存,回到首页就能开始对话。",step:4,side:"bottom",align:"start",actions:e(b,{size:"sm",variant:"primary",onClick:()=>{Gr(t.conn,"saved",{kind:"chat"}),t.onHome()},children:"开始对话"})};else if(a.kind==="chat")S={title:"开始第一段对话",body:"模型已经选好,在输入框里说点什么试试。",side:"top",align:"center",actions:e(b,{size:"sm",variant:"primary",onClick:()=>Zh(t.conn),children:"知道了"})};else if(p.dataset.tour==="add-provider")S={title:"添加模型提供方",body:"点这里,填上服务商的地址和 API key。",step:2,side:"bottom",align:"end",actions:k};else S={title:"先添加一个模型",body:"这台服务器还没有可用的模型,接入一个服务商就能开始对话。",step:1,side:"top",align:"end",actions:n(h,{children:[k,e(b,{size:"sm",variant:"primary",onClick:()=>{Gr(t.conn,"model",{kind:"provider"}),t.onModels()},children:"添加模型"})]})};let I={left:g.left-gb,top:g.top-gb,width:g.width+gb*2,height:g.height+gb*2};return n(h,{children:[Vt(n(h,{children:[e("div",{className:"fixed inset-x-0 top-0 z-40",style:{height:Math.max(0,I.top)}}),e("div",{className:"fixed inset-x-0 bottom-0 z-40",style:{top:I.top+I.height}}),e("div",{className:"fixed left-0 z-40",style:{top:I.top,height:I.height,width:Math.max(0,I.left)}}),e("div",{className:"fixed right-0 z-40",style:{top:I.top,height:I.height,left:I.left+I.width}}),e("div",{"aria-hidden":"true",className:"pointer-events-none fixed z-40 animate-fade rounded-xl shadow-[0_0_0_100vmax_oklch(0.18_0_0/0.55)] ring-2 ring-accent/70 transition-[left,top,width,height] duration-300 ease-out-quint",style:I})]}),document.body),n(WV,{open:!0,children:[e(Gue,{virtualRef:v}),e(XV,{children:n(YV,{side:S.side,align:S.align,sideOffset:gb+10,collisionPadding:12,onInteractOutside:(T)=>T.preventDefault(),onEscapeKeyDown:()=>Zh(t.conn),onOpenAutoFocus:(T)=>T.preventDefault(),className:d(xE,"w-[min(18rem,calc(100vw-2rem))] origin-(--radix-popover-content-transform-origin) overflow-visible px-4 pt-3.5 pb-3 shadow-float"),children:[n("div",{className:l("surface.subtle","border-line bg-raised/35 p-3.5"),children:[n("div",{className:"flex items-baseline justify-between gap-3",children:[e("div",{className:"text-[14px] font-medium text-ink",children:S.title}),S.step&&n("div",{className:"shrink-0 text-xs text-faint tabular-nums",children:[S.step," / ",Gye]})]}),e("p",{className:"mt-1 text-xs leading-5 text-dim",children:S.body})]}),e("div",{className:"mt-3 flex justify-end gap-1.5",children:S.actions}),e(Kue,{width:14,height:7,className:"fill-panel"})]},S.title)})]})]})}function dX(t){let[a,c]=r(),[u,f]=r(t.value),[m,p]=r(""),[g,v]=r(!0),[k,S]=r(),I=i(t.value),T=a?Kye(a.path):[],L=y(async(A)=>{v(!0),S(void 0);try{let E=await t.conn.browseDirectory(A);c(E),f(E.path),p("")}catch(E){S(E instanceof Error?E.message:"无法读取远程目录")}finally{v(!1)}},[t.conn]);o(()=>{L(I.current||void 0)},[L]);function R(){if(!a)return;t.onChange(a.path)}return n("div",{className:"flex flex-col gap-2.5",children:[n("div",{className:"flex items-center gap-2",children:[n("div",{className:"relative min-w-0 flex-1",children:[e(yc,{className:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-accent"}),e("input",{value:u,onChange:(A)=>f(A.target.value),onKeyDown:(A)=>{if(A.key!=="Enter")return;A.preventDefault(),L(u)},placeholder:"输入服务器绝对路径","aria-label":"服务器目录路径",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,className:d(Sv,"h-10 pl-9 font-mono text-[12px]")})]}),e(b,{type:"button",size:"icon",variant:"secondary",onClick:()=>void L(u),"aria-label":"打开路径",children:e(zu,{className:"size-4 rotate-90"})}),e(j,{label:"刷新目录",size:"icon",variant:"secondary",onClick:()=>void L(a?.path||u||void 0),disabled:g,children:e(ye,{className:d("size-4",g&&"animate-spin")})})]}),n("div",{className:"flex min-w-0 items-center gap-1 overflow-x-auto rounded-lg border border-line bg-raised/45 px-2 py-1.5 text-xs",children:[e(bc,{className:"ml-1 size-3.5 shrink-0 text-faint"}),a?T.map((A,E)=>n("span",{className:"flex min-w-0 shrink-0 items-center gap-1",children:[e(Nt,{className:"size-3 text-faint"}),e("button",{type:"button",className:d("max-w-44 truncate rounded px-1.5 py-0.5 font-mono text-faint transition-colors hover:bg-panel hover:text-ink",E===T.length-1&&"bg-panel text-ink"),onClick:()=>void L(A.path),title:A.path,children:A.name})]},A.path)):e("span",{className:"px-1.5 text-faint",children:"连接服务器中…"})]}),n("div",{className:"grid gap-3 sm:grid-cols-[9.5rem_minmax(0,1fr)]",children:[n("aside",{className:"flex gap-1 overflow-x-auto sm:flex-col",children:[e("p",{className:"hidden px-2 text-[11px] font-medium text-faint sm:block",children:"快捷位置"}),a?.shortcuts.map((A)=>n("button",{type:"button",onClick:()=>void L(A.path),className:d("flex shrink-0 items-center gap-2 rounded-lg px-2.5 py-2 text-left text-xs text-dim transition-colors hover:bg-raised hover:text-ink",a.path===A.path&&"bg-accent-soft text-ink"),children:[e(bc,{className:"size-3.5 text-accent"}),e("span",{className:"truncate",children:A.name})]},A.path))]}),e("div",{className:"min-w-0 overflow-hidden rounded-xl border border-line bg-bg",children:n(md,{loop:!0,shouldFilter:!0,value:m,onValueChange:p,children:[e(pd,{placeholder:"筛选当前目录…",onKeyDown:(A)=>{if(A.key!=="Backspace"||m||!a?.parent)return;A.preventDefault(),L(a.parent)}}),n(hd,{className:"h-[min(18rem,38dvh)] max-h-none",children:[a?.parent&&!m&&n(Po,{value:".. 返回上一级",onSelect:()=>void L(a.parent??void 0),icon:e(T0,{className:"size-4 text-faint"}),children:["返回上一级",e("span",{className:"ml-auto font-mono text-[10px] text-faint",children:"Backspace"})]}),g?n("div",{className:"flex h-36 items-center justify-center gap-2 text-xs text-faint",children:[e(ie,{className:"size-4 animate-spin"}),"正在读取服务器目录…"]}):k?n("div",{className:"flex h-36 flex-col items-center justify-center gap-2 px-6 text-center",children:[e("p",{className:"text-xs text-danger",children:k}),e(b,{type:"button",size:"sm",onClick:()=>void L(u||void 0),children:"重试"})]}):n(h,{children:[e(jh,{children:"当前目录没有匹配的子目录"}),a?.entries.map((A)=>e(Po,{value:`${A.name} ${A.path}`,onSelect:()=>void L(A.path),icon:e(dt,{className:"size-4 text-accent"}),trailing:e(Nt,{className:"size-3.5 text-faint"}),children:A.name},A.path))]})]})]})})]}),n("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-line bg-raised/35 px-3 py-2.5",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e("div",{className:d("flex size-7 shrink-0 items-center justify-center rounded-lg",t.value?"bg-accent-soft":"bg-panel"),children:t.value?e(Z,{className:"size-3.5 text-accent"}):e(dt,{className:"size-3.5 text-faint"})}),n("div",{className:"min-w-0",children:[e("p",{className:"text-[11px] text-faint",children:t.value?"已选择目录":"尚未选择目录"}),e("p",{className:"truncate font-mono text-[11px] text-dim",title:t.value,children:t.value||"选择当前目录后,项目会在服务器上使用它"})]})]}),e(b,{type:"button",size:"sm",variant:t.value===a?.path?"primary":"secondary",onClick:R,disabled:!a||g,children:t.value===a?.path?"已选择":"选择此目录"})]})]})}function Kye(t){let a=t.replaceAll("\\","/"),c=a.split("/").filter(Boolean),u=a.startsWith("/")?"/":"";return c.map((f)=>{if(!u&&/^[A-Za-z]:$/.test(f))u=`${f}/`;else if(u==="/")u=`/${f}`;else if(u.endsWith("/"))u=`${u}${f}`;else u=u?`${u}/${f}`:f;return{name:f,path:u}})}function fX(t){let a=ee(),[c,u]=r(!1),f=t.project;return e(Yt,{open:t.open,onOpenChange:t.onOpenChange,title:f?"项目设置":"添加项目",description:f?void 0:"连接服务器上的目录,浏览文件、运行命令,并让每个会话共享项目上下文。",size:f?"lg":"xl",footer:n(h,{children:[f&&e(Yye,{...t,project:f}),f&&e(Xye,{...t,project:f}),e("div",{className:"flex-1 max-sm:hidden"}),e(b,{onClick:()=>t.onOpenChange(!1),children:"取消"}),e(b,{type:"submit",form:a,variant:"primary",loading:c,children:f?"保存":"添加"})]}),children:e(Wye,{...t,formID:a,onSaving:u})})}function Wye(t){let a=t.project,[c,u]=r(""),[f,m]=r(a?.name??""),[p,g]=r(a?.instructions??""),[v,k]=r();async function S(I){if(I.preventDefault(),!a&&!c){k("请选择一个服务器目录");return}t.onSaving(!0),k(void 0);try{let T=a?await t.conn.updateProject(a.id,{name:f,instructions:p}):await t.conn.createProject({directory:c,name:f||void 0,instructions:p});t.onSaved?.(T),t.onOpenChange(!1)}catch(T){k(ot(T))}finally{t.onSaving(!1)}}return n(Zt,{id:t.formID,onSubmit:S,children:[a?n("div",{className:"flex items-center gap-2 rounded-[10px] bg-raised/60 px-3 py-2 font-mono text-xs text-dim",children:[e(yc,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"min-w-0 break-all",children:a.directory})]}):e(ue,{label:"服务器目录",hint:"只显示服务器上真实存在的目录;也可以直接粘贴绝对路径后按 Enter。",children:()=>e(dX,{conn:t.conn,value:c,onChange:u})}),e(ue,{label:"名称",children:(I)=>e(te,{id:I,value:f,onChange:(T)=>m(T.target.value),placeholder:a?"":"默认取目录名"})}),e(ue,{label:"项目说明",children:(I)=>e(yr,{id:I,value:p,onChange:(T)=>g(T.target.value),rows:4})}),e(wt,{children:v})]})}function Xye(t){let[a,c]=r(!1);async function u(){c(!0);try{await t.conn.updateProject(t.project.id,{closed:!0}),le(`已关闭项目「${t.project.name}」`,{description:"会话均已保留,重新添加该目录即可恢复。"}),t.onClosed?.(),t.onOpenChange(!1)}catch(f){V(f,"关闭失败")}finally{c(!1)}}return n(b,{variant:"ghost",onClick:u,loading:a,className:"max-sm:order-last",children:[e(N0,{className:"size-4"}),"关闭项目"]})}function Yye(t){let[a,c]=r(!1);async function u(){if(!await Ke({title:`删除项目「${t.project.name}」?`,description:"项目下的所有会话(含已归档和子会话)及自动化会一起永久删除,目录里的文件不受影响。",action:"删除项目",danger:!0}))return;c(!0);try{await t.conn.deleteProject(t.project.id),t.onDeleted?.(),t.onOpenChange(!1)}catch(m){V(m,"删除失败")}finally{c(!1)}}return n(b,{variant:"danger-ghost",onClick:u,loading:a,className:"-ml-2 max-sm:order-last",children:[e(pe,{className:"size-4"}),"删除项目"]})}var Qye=["project","session","role","tool","is","after","before","date"];function k4(t){let a=[],c=/(?:[^\s"\\]|\\.|"(?:\\.|[^"\\])*")+/g;for(let u of t.matchAll(c)){let f=u[0],m=f.search(/[::]/),p=f.startsWith("-"),g=f.slice(p?1:0,m).toLowerCase();if(!Qye.some((S)=>S===g))continue;let v=f.slice(m+1);if(!v)continue;let k=v;if(v.startsWith('"'))try{k=JSON.parse(v)}catch{continue}a.push({key:g,value:k,negated:p,token:f,start:u.index,end:u.index+f.length})}return a}function d2(t,a){return`${t.slice(0,a.start)}${t.slice(a.end)}`.trim()}function mX(t,a,c){let u=t;for(let m of k4(t).reverse())if(m.key===a)u=d2(u,m);if(!c)return u;let f=/\s|"|\\/.test(c)?JSON.stringify(c):c;return`${u.trim()} ${a}:${f}`.trim()}var Zye={user:"用户",assistant:"助手"};function Jye(t,a,c){let u=t.negated?"非 ":"";switch(t.key){case"project":return`${u}项目 · ${a.find((f)=>f.id===t.value)?.name??t.value}`;case"session":return`${u}会话 · ${c.find((f)=>f.id===t.value)?.title||t.value}`;case"role":return`${u}${Zye[t.value]??t.value}消息`;case"tool":return`${u}工具 · ${t.value}`;case"after":return`${t.value} 起`;case"before":return`${t.value} 前`;case"date":return`日期 · ${t.value}`;case"is":if(t.value==="error")return t.negated?"不含报错":"仅报错";if(t.value==="archived")return t.negated?"不含归档":"仅归档";if(t.value==="compacted")return t.negated?"不含已压缩":"仅已压缩";return t.token}}function e1e(t){return _(),n("span",{className:l("search.filterChipActive"),children:[e("span",{className:"truncate",children:t.label}),e("button",{type:"button","aria-label":`移除 ${t.token}`,className:"ml-0.5 grid size-4 shrink-0 place-items-center rounded-full transition-colors hover:bg-accent/15",onClick:t.onRemove,children:e(oe,{className:"size-3"})})]})}function t1e(t){return _(),n("button",{type:"button",className:l("search.filterChip"),children:[e(F0,{className:"size-3.5"}),t.label]})}function pX(t){_();let a=k4(t.query),c=(v)=>a.find((k)=>k.key===v&&!k.negated)?.value??"all",u=(v,k)=>t.onQuery(mX(t.query,v,k==="all"?void 0:k)),f=(v)=>a.find((k)=>k.key==="is"&&k.value===v),m=(v,k)=>{let S=f(v),I=S?d2(t.query,S):t.query;t.onQuery(k?`${I} ${v==="error"?"is:error":`-is:${v}`}`.trim():I)},p=[{value:"error",label:"只看报错",on:!!f("error")&&!f("error")?.negated},{value:"archived",label:"排除已归档",on:!!f("archived")?.negated},{value:"compacted",label:"排除已压缩",on:!!f("compacted")?.negated}],g=(v,k,S)=>e(ue,{label:k,children:(I)=>e(Xt,{id:I,className:"max-sm:h-10",value:c(v),onValueChange:(T)=>u(v,T),groups:[{options:[{value:"all",label:"不限"},...S]}]})});return n("div",{className:"flex items-start gap-2",children:[n("div",{className:"-mx-4 flex min-w-0 flex-1 items-center gap-2 overflow-x-auto px-4 py-0.5 [scrollbar-width:none] sm:mx-0 sm:flex-wrap sm:overflow-visible sm:px-0 [&::-webkit-scrollbar]:hidden",children:[a.map((v)=>e(e1e,{label:Jye(v,t.projects,t.sessions),token:v.token,onRemove:()=>t.onQuery(d2(t.query,v))},v.start)),e(Tm,{align:"start",className:"flex max-h-[min(34rem,var(--radix-popover-content-available-height,34rem))] w-[min(22rem,calc(100vw-1.5rem))] flex-col",trigger:e(t1e,{label:a.length?"过滤":"添加过滤"}),children:n("div",{className:"grid min-h-0 gap-3.5 overflow-y-auto p-3.5",children:[g("project","项目",t.projects.map((v)=>({value:v.id,label:v.name}))),g("session","会话",t.sessions.map((v)=>({value:v.id,label:v.title||"新会话"}))),g("role","角色",[{value:"user",label:"用户"},{value:"assistant",label:"助手"}]),e(ue,{label:"工具",children:(v)=>e(te,{id:v,className:"max-sm:h-10",placeholder:"例如 bash、read",value:c("tool")==="all"?"":c("tool"),onChange:(k)=>u("tool",k.target.value||"all")})}),e("div",{className:"grid grid-cols-2 gap-2.5",children:["after","before"].map((v)=>e(ue,{label:v==="after"?"开始日期":"结束日期(不含)",children:(k)=>e(te,{id:k,className:"min-w-0 max-sm:h-10",type:"date",value:c(v)==="all"?"":c(v),onChange:(S)=>u(v,S.target.value||"all")})},v))}),e("div",{className:"grid gap-0.5 border-t border-line pt-2.5",children:p.map((v)=>n("div",{className:"flex min-h-9 items-center justify-between gap-3 text-[13.5px]",children:[v.label,e(_t,{label:v.label,checked:v.on,onCheckedChange:(k)=>m(v.value,k)})]},v.value))})]})})]}),n(Jt,{trigger:n(b,{size:"sm",variant:"ghost",className:"text-dim max-sm:h-10 max-sm:px-3","aria-label":"排序",children:[e(g0,{className:"size-3.5"}),t.sort==="best"?"最佳匹配":"最新优先",e(ge,{className:"size-3.5 text-faint"})]}),children:[e(Uh,{checked:t.sort==="best",onSelect:()=>t.onSort("best"),children:"最佳匹配"}),e(Uh,{checked:t.sort==="recent",onSelect:()=>t.onSort("recent"),children:"最新优先"})]})]})}function hX(t){let a=i(null);return e(Hu,{open:t.open,onOpenChange:t.onOpenChange,children:n(ju,{children:[e(Gu,{className:td}),e($u,{ref:a,"aria-describedby":void 0,onOpenAutoFocus:(c)=>Bk(c,a.current),className:d(yh,"overflow-hidden sm:h-[min(88dvh,50rem)] sm:max-h-none sm:max-w-3xl","max-sm:inset-0 max-sm:h-dvh max-sm:max-h-dvh max-sm:rounded-none max-sm:border-0 max-sm:pt-[env(safe-area-inset-top)]"),children:t.open&&e(s1e,{...t})})]})})}function S4(t){return e(j,{label:t.label,size:"icon-sm","aria-pressed":t.pressed,onClick:t.onPress,className:"text-faint aria-pressed:bg-accent-soft aria-pressed:text-accent-strong max-sm:size-10 max-sm:rounded-lg [&_svg]:size-4.5",children:t.children})}function f2(t){return n("div",{className:"flex h-full min-h-64 animate-rise flex-col items-center justify-center px-6 py-10 text-center",children:[e("div",{className:d("mb-4 grid size-12 place-items-center rounded-2xl [&_svg]:size-5.5",t.tone==="danger"?"bg-danger/10 text-danger":"bg-raised text-dim"),children:t.icon}),e("h3",{className:"font-serif text-[17px] font-semibold tracking-[-0.01em]",children:t.title}),t.children&&e("div",{className:"mt-1.5 max-w-sm text-[13.5px] leading-6 text-dim",children:t.children}),t.actions&&e("div",{className:"mt-4 flex flex-wrap items-center justify-center gap-2",children:t.actions})]})}var n1e=[{id:"a",cards:2},{id:"b",cards:2},{id:"c",cards:1}],r1e=["x","y"];function o1e(){let t=(a)=>e("div",{className:d("rounded-md bg-raised",a)});return e("div",{role:"status","aria-label":"搜索中",className:"animate-pulse space-y-5 px-2.5 pt-2",children:n1e.map(({id:a,cards:c})=>n("div",{className:"space-y-3",children:[n("div",{className:"flex items-center gap-2.5",children:[t("size-7 rounded-lg"),n("div",{className:"space-y-1.5",children:[t("h-3.5 w-44"),t("h-3 w-28")]})]}),e("div",{className:"ml-6 space-y-3.5 border-l border-line pl-2.5",children:r1e.slice(0,c).map((u)=>n("div",{className:"flex gap-3",children:[t("size-7 shrink-0 rounded-lg"),n("div",{className:"min-w-0 flex-1 space-y-2 pt-0.5",children:[t("h-3 w-24"),t("h-3.5 w-full"),t("h-3.5 w-2/3")]})]},u))})]},a))})}function a1e({group:t,project:a}){let c=t.hits.length+t.more;return n("div",{className:"flex items-center gap-2.5 bg-panel px-2.5 py-2",children:[n("div",{className:"min-w-0 flex-1",children:[e("div",{className:"truncate text-[14px] leading-5 font-semibold text-ink",children:t.session.title||"新会话"}),n("div",{className:"flex items-center gap-1.5 truncate text-xs leading-4 text-faint",children:[a&&n(h,{children:[e("span",{className:"truncate",children:a.name}),e("span",{"aria-hidden":!0,children:"·"})]}),e("time",{className:"shrink-0",dateTime:new Date(t.session.updated).toISOString(),children:mt(t.session.updated)})]})]}),n("span",{className:"shrink-0 rounded-full bg-raised px-2 py-1 text-[11px] leading-none font-medium text-dim tabular-nums",children:[c," 条命中"]})]})}var C4=(t)=>`${t.sessionID}:${t.seq}:${t.field}`,i1e=[{token:"role:user",hint:"只搜我说的话"},{token:"tool:bash",hint:"只搜某个工具"},{token:"is:error",hint:"只看报错"},{token:"after:2026-01-01",hint:"限定时间"}];function s1e(t){let[a,c]=r(t.initialQuery??""),[u,f]=r("text"),[m,p]=r(!1),[g,v]=r(),[k,S]=r("best"),[I,T]=r(""),L={q:a,mode:u,wholeWord:m,caseSensitive:g,sort:k,group:"session"},R=t2(t.server,L),A=R.groups.flatMap((Q)=>Q.hits),E=new Map(t.projects.map((Q)=>[Q.id,Q])),P=a.trim().length>0,D=R.status?.state,N=i(0),[O,F]=r();o(()=>{if(R.loading)N.current=performance.now(),F(void 0);else if(N.current)F(performance.now()-N.current),N.current=0},[R.loading]);let z=(Q,ae=!1)=>{let xe=Q.seq===0?{kind:"session",id:Q.sessionID}:gd(Q.sessionID,Q.seq,a);if(ae)window.open(zl(xe),"_blank","noopener,noreferrer");else t.onOpenChange(!1),t.onPlace(xe)},B=()=>{t.onOpenChange(!1),t.onPlace({kind:"settings",tab:"database"})},U=()=>{R.client.search({...L,deep:!0}).catch(()=>{return})},Y=D==="backfilling"||D==="rebuilding",G=R.groups.reduce((Q,ae)=>Q+ae.hits.length+ae.more,0),ce;if(D==="disabled")ce=e(f2,{icon:e(th,{}),title:"历史搜索未启用",actions:e(b,{variant:"primary",onClick:B,children:"去设置开启"}),children:"开启后会为历史消息建立本地索引,之后就能按关键词、正则和过滤条件检索所有会话。"});else if(R.error&&!R.groups.length){let Q=R.code==="bad_regex";ce=e(f2,{icon:e(er,{}),tone:"danger",title:Q?"正则表达式无效":R.code==="too_broad"?"查询范围太大":"搜索出错了",actions:R.code==="too_broad"?e(b,{variant:"secondary",onClick:U,children:"深度扫描"}):Q?void 0:e(b,{variant:"secondary",onClick:()=>R.client.search(L).catch(()=>{return}),children:"重试"}),children:e("span",{role:"alert",className:"break-words",children:Q?R.error.replace(/^正则表达式无效[::]\s*/,""):R.error})})}else if(R.loading&&!R.groups.length)ce=e(o1e,{});else if(!R.groups.length&&!P)ce=n(f2,{icon:e(H0,{}),title:"搜索全部历史消息",children:["输入关键词,或用过滤语法缩小范围:",e("span",{className:"mt-3.5 flex flex-wrap justify-center gap-2",children:i1e.map((Q)=>e("button",{type:"button",title:Q.hint,onClick:()=>c(`${a.trim()} ${Q.token}`.trim()),className:"rounded-full border border-line bg-panel px-3 py-1.5 font-mono text-xs text-dim shadow-xs transition-colors hover:border-line-strong hover:bg-raised hover:text-ink max-sm:py-2.5",children:Q.token},Q.token))})]});else if(!R.groups.length)ce=n(f2,{icon:e(th,{}),title:"没有找到匹配的消息",actions:R.terms.map((Q)=>n(b,{size:"sm",variant:"secondary",onClick:()=>c(Q),children:[e(ua,{className:"size-3.5 text-faint"}),Q]},Q)),children:["换个关键词,或减少过滤条件再试试。",R.terms.length>0&&e("span",{className:"block",children:"你是不是要找:"})]});else ce=n("div",{className:d("pb-2 transition-opacity",R.loading&&"opacity-60"),children:[R.groups.map((Q)=>n(Xi,{heading:e(a1e,{group:Q,project:Q.session.projectID?E.get(Q.session.projectID):void 0}),className:"mb-1 [&_[cmdk-group-heading]]:sticky [&_[cmdk-group-heading]]:top-0 [&_[cmdk-group-heading]]:z-10 [&_[cmdk-group-heading]]:p-0 [&_[cmdk-group-heading]]:text-inherit [&_[cmdk-group-items]]:mb-2 [&_[cmdk-group-items]]:ml-6 [&_[cmdk-group-items]]:space-y-0.5 [&_[cmdk-group-items]]:border-l [&_[cmdk-group-items]]:border-line [&_[cmdk-group-items]]:pl-1.5",children:[Q.hits.map((ae)=>e(BS,{value:C4(ae),onSelect:()=>z(ae),children:n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"mb-1 flex min-h-5 items-center gap-1.5 text-xs text-faint",children:[e("span",{className:d("font-medium",Yh(ae.field).badge),children:Yh(ae.field).label}),ae.tool&&e("span",{className:"truncate rounded bg-raised px-1.5 py-0.5 font-mono text-[11px] leading-none text-dim",children:ae.tool}),e(rX,{hit:ae}),e("time",{className:"ml-auto shrink-0",dateTime:new Date(ae.time).toISOString(),children:mt(ae.time)})]}),e(u2,{lines:ae.snippet,field:ae.field}),!!ae.forks?.length&&e("div",{className:"mt-1 text-xs text-faint",children:ae.forks.join(" · ")})]})},C4(ae))),Q.more>0&&n(b,{size:"sm",variant:"ghost",className:"ml-1 w-fit text-dim max-sm:h-10",disabled:R.loading,onClick:()=>{R.client.expandGroup(L,Q.session.id).catch(()=>{return})},children:[e(ge,{className:"size-3.5"}),"展开其余 ",Q.more," 条"]})]},Q.session.id)),R.cursor&&e("div",{className:"flex justify-center pt-2",children:e(b,{size:"sm",variant:"secondary",className:"max-sm:h-10",disabled:R.loading,onClick:()=>{R.client.search({...L,cursor:R.cursor},!0).catch(()=>{return})},children:"加载更多会话"})})]});let re=null;if(R.loading)re=n("span",{role:"status",className:"flex items-center gap-1.5",children:[e(ie,{className:"size-3.5 animate-spin"}),R.progress?`深度扫描 ${R.progress.scanned} / ${R.progress.total}`:"搜索中…",e("button",{type:"button",className:"rounded px-1 text-accent-strong underline decoration-accent-strong/40 underline-offset-2 hover:decoration-accent-strong",onClick:()=>R.client.cancel(),children:"停止"})]});else if(P&&!R.error&&D!=="disabled")re=n("span",{className:"tabular-nums",children:[R.groups.length?`${R.groups.length}${R.cursor?"+":""} 个会话 · ${G} 条命中`:"无命中",O!==void 0&&` · ${qS(O)}`]});return n(md,{shouldFilter:!1,loop:!0,value:I,onValueChange:T,onKeyDownCapture:(Q)=>{if(Q.key==="Enter"&&(Q.metaKey||Q.ctrlKey)){Q.preventDefault(),Q.stopPropagation();let ae=A.find((xe)=>C4(xe)===I)??A[0];if(ae)z(ae,!0)}},children:[n("header",{className:"flex shrink-0 flex-col gap-3 border-b border-line px-4 pt-3 pb-3 sm:pt-4",children:[n("div",{className:"flex items-center justify-between sm:contents",children:[e(ph,{className:"font-serif text-[19px] leading-7 font-semibold tracking-[-0.01em] sm:sr-only",children:"历史搜索"}),e(hh,{asChild:!0,children:e(j,{label:"关闭",size:"icon",className:"-mr-2 sm:hidden max-sm:size-10",children:e(oe,{className:"size-5"})})})]}),n("div",{className:"flex items-center gap-2",children:[e(pd,{"aria-label":"搜索历史消息","aria-invalid":R.code==="bad_regex",placeholder:u==="regex"?"输入正则表达式…":"搜索历史消息…",autoFocus:!0,value:a,onValueChange:c,className:"h-full text-[15px]",wrapperClassName:d("h-12 min-w-0 flex-1 gap-2.5 rounded-xl border border-line-strong/70 bg-bg pr-2 pl-3.5 transition-[border-color,box-shadow] duration-150 focus-within:border-accent/60 focus-within:shadow-[0_0_0_3px_var(--color-accent-soft)] max-sm:h-13 max-sm:pr-1.5",R.code==="bad_regex"&&"border-danger/60 focus-within:border-danger/60 focus-within:shadow-none"),trailing:n("div",{className:"flex shrink-0 items-center gap-0.5",children:[a&&e(j,{label:"清除",size:"icon-xs",className:"mr-0.5 text-faint max-sm:size-8",onClick:()=>c(""),children:e(oe,{className:"size-3.5"})}),e(S4,{label:"正则表达式",pressed:u==="regex",onPress:()=>f(u==="regex"?"text":"regex"),children:e(q0,{})}),e(S4,{label:"区分大小写",pressed:g===!0,onPress:()=>v(g!==!0),children:e(w0,{})}),e(S4,{label:"整词匹配",pressed:m,onPress:()=>p(!m),children:e(j0,{})})]})}),e(hh,{asChild:!0,children:e(j,{label:"关闭",shortcut:"esc",size:"icon",className:"max-sm:hidden",children:e(oe,{className:"size-4.5"})})})]}),e(pX,{query:a,onQuery:c,projects:t.projects,sessions:t.sessions,sort:k,onSort:S})]}),n("div",{className:"relative flex min-h-0 flex-1 flex-col",children:[R.loading&&R.progress&&R.progress.total>0&&e("div",{className:"absolute inset-x-0 top-0 z-20 h-0.5 bg-raised",children:e("div",{className:"h-full bg-accent transition-[width] duration-300",style:{width:`${Math.min(100,R.progress.scanned/R.progress.total*100)}%`}})}),n(hd,{"aria-label":"历史搜索结果",className:"scroll-pt-14 px-1.5 py-1 sm:px-2",children:[(Y||D==="degraded")&&e(ba,{className:"mx-1 mt-1.5 mb-1",action:e(b,{size:"sm",variant:"secondary",disabled:R.loading||!P,onClick:U,children:"深度扫描"}),children:D==="degraded"?"索引已降级,当前使用较慢的扫描搜索,结果可能不全。":"较旧的会话可能尚未建入索引,结果可能不全。"}),ce]})]}),n("footer",{className:"flex shrink-0 items-center gap-3 border-t border-line px-4 py-2.5 text-xs text-dim max-sm:pb-3",children:[e(oi,{status:R.status,compact:!0,showEnable:!1,className:"shrink-0 py-0"}),re&&n(h,{children:[e("span",{"aria-hidden":!0,className:"h-3 w-px shrink-0 bg-line-strong"}),e("div",{className:"min-w-0 truncate",children:re})]}),n("div",{className:"ml-auto flex shrink-0 items-center gap-3 text-faint max-md:hidden",children:[n("span",{className:"flex items-center gap-1",children:[e(je,{children:"↑"}),e(je,{children:"↓"}),"选择"]}),n("span",{className:"flex items-center gap-1",children:[e(je,{children:"enter"}),"跳转"]}),n("span",{className:"flex items-center gap-1",children:[e(je,{children:"mod+enter"}),"新标签页"]}),n("span",{className:"flex items-center gap-1",children:[e(je,{children:"esc"}),"关闭"]})]})]})]})}function gX(){return new Map(Ae().filter((t)=>Boolean(t.commands)).map((t)=>[t.id,t.commands]))}var xX=gX();pn(()=>{xX=gX()});function vX(t,a,c,u){Se();let[f,m]=r(!1),p=i(!1),g=i({connection:t,revision:0});o(()=>(g.current.connection=t,p.current=!1,m(!1),()=>{g.current.revision++}),[t]);async function v(k,S){if(!a||p.current||a.archivedAt!==null&&S.sessionAction!=="duplicate")return;let I=xX.get(k)?.[S.id];if(I){try{await I({connection:xd(t),session:a})}catch(L){V(L,"会话操作失败")}return}let T=g.current.revision;p.current=!0,m(!0);try{let L=[a.id];if(g.current.revision!==T||g.current.connection!==t)return;let R=await t.sessionCommand(k,S,L);if(g.current.revision!==T)return;if(R.draft)Vh(R.session.id,{text:R.draft.text,attachments:R.draft.attachments??[]});u(R.session.id)}catch(L){if(g.current.revision===T)V(L,"会话操作失败")}finally{if(g.current.revision===T)p.current=!1,m(!1)}}if(!a||a.kind==="sub")return[];return c.flatMap((k)=>(k.web??[]).filter((S)=>S.kind==="command").map((S)=>({id:`${k.id}/${S.id}`,name:S.id,title:S.commandTitle??S.title,group:"指令",disabled:f||a.archivedAt!==null&&S.sessionAction!=="duplicate",execute:()=>{v(k.id,S)}})))}var l1e=1800000;async function c1e(t){try{return await t.updateStatus()}catch{return}}function bX(t){let a=Et(t.state,(f)=>f.status==="open"),[c,u]=r();return o(()=>{if(!a)return;let f=!1,m=()=>void c1e(t).then((g)=>!f&&u(g));m();let p=setInterval(m,l1e);return()=>{f=!0,clearInterval(p)}},[t,a]),[c,u]}function u1e(t){if(t.applying)return`正在通过 ${t.manager??"包管理器"} 安装新版本…`;if(t.error)return t.error;if(t.available)return`发现新版本 v${t.latest},安装与重启都会等所有对话空闲,不会中断进行中的对话`;if(t.installed)return`v${t.installed} 已安装,等所有对话空闲后自动重启生效`;if(t.checkedAt)return`已是最新版本 · ${mt(t.checkedAt)}检查`;return"启动后会自动检查 npm 上的最新版本"}function Rl(t){_();let[a,c]=bX(t.conn),[u,f]=r();if(!a)return null;async function m(){f("check");try{let g=await t.conn.checkUpdate();if(c(g),!g.error&&!g.available&&!g.installed&&!g.disabled)le("已是最新版本")}catch(g){V(g)}finally{f(void 0)}}async function p(){f("apply");try{let g=await t.conn.applyUpdate();c(g),le(`已安装 v${g.installed??g.latest}`,{description:"所有对话空闲后服务会自动重启,稍后自动重新连接"})}catch(g){V(g,"更新失败")}finally{f(void 0)}}return n(W,{title:"版本更新",description:a.disabled?"当前运行方式的版本更新途径":n("div",{children:[u1e(a),a.available&&n("div",{className:l("surface.subtle","mt-2 border-line p-3 text-xs leading-relaxed text-dim"),children:["发现新版本 ",n("code",{className:l("markdown.inlineCode"),children:["v",a.latest]}),a.manager?`,将通过 ${a.manager} 安装`:"",",安装后服务会在对话空闲时自动重启。"]})]}),children:[a.disabled&&e("span",{className:"max-w-xs text-right text-xs text-dim",children:a.disabled}),a.url&&a.available&&e(b,{size:"sm",variant:"ghost",asChild:!0,children:n("a",{href:a.url,target:"_blank",rel:"noreferrer",children:["版本页",e(mr,{className:"size-3.5"})]})}),!a.disabled&&e(b,{size:"sm",loading:u==="check",disabled:u!==void 0,onClick:m,children:"检查更新"}),a.available&&a.canApply&&e(b,{size:"sm",variant:"primary",loading:u==="apply",disabled:u!==void 0,onClick:p,children:"立即更新"})]})}function yX(t,a){let[c]=bX(t),u=c?.available?c.latest:void 0;o(()=>{if(!u)return;let f=`basalt.updateNotified.${t.server.id}`;try{if(localStorage.getItem(f)===u)return;localStorage.setItem(f,u)}catch{}le(`Basalt v${u} 已发布`,{description:"可以在设置里一键更新服务端",duration:1e4,action:{label:"查看",onClick:a}})},[t,u,a])}var d1e=400,f1e=5;class I4{upgrades=new Map;idleQueue=new Set;observers;idleHandle;constructor(t){let a=(c,u)=>new IntersectionObserver((f)=>{for(let m of f)if(m.isIntersecting)u(m.target)},{root:t,rootMargin:`${c}px 0px`});this.observers=[a(0,(c)=>this.upgrade(c,!1)),a(d1e,(c)=>this.upgrade(c,!0))]}watch(t,a){this.upgrades.set(t,a),this.idleQueue.add(t);for(let c of this.observers)c.observe(t);return this.scheduleIdle(),()=>this.forget(t)}dispose(){for(let t of this.observers)t.disconnect();if(this.idleHandle!==void 0)p1e(this.idleHandle);this.upgrades.clear(),this.idleQueue.clear()}upgrade(t,a){let c=this.upgrades.get(t);if(!c)return;if(this.forget(t),a)Om(c);else c()}forget(t){this.upgrades.delete(t),this.idleQueue.delete(t);for(let a of this.observers)a.unobserve(t)}scheduleIdle(){if(this.idleHandle!==void 0||this.idleQueue.size===0)return;this.idleHandle=m1e(()=>{this.idleHandle=void 0;for(let t of[...this.idleQueue].slice(0,f1e))this.upgrade(t,!0);this.scheduleIdle()})}}var m1e=(t)=>typeof requestIdleCallback==="function"?requestIdleCallback(t,{timeout:1000}):window.setTimeout(t,50),p1e=(t)=>typeof cancelIdleCallback==="function"?cancelIdleCallback(t):window.clearTimeout(t);function xb(t){let[a,c]=r(!1),[u,f]=r(""),m=i(null),p=i(!1),g=()=>{if(t.canStart===!1)return;p.current=!1,f(t.title),c(!0)},v=()=>{p.current=!0,c(!1),f(t.title)},k=()=>{if(p.current||!a)return;p.current=!0,c(!1);let I=u.trim();if(!I||I===t.title||!t.onRename){f(t.title);return}t.onRename(I)},S=(I)=>{if(I.nativeEvent.isComposing)return;if(I.key==="Escape"){I.preventDefault(),v();return}if(I.key==="Enter")I.preventDefault(),k()};return o(()=>{if(a&&m.current){let I=m.current;I.focus();let T=I.value.length;I.setSelectionRange(T,T),requestAnimationFrame(()=>{I.setSelectionRange(T,T)})}},[a]),o(()=>{if(t.resetKey)p.current=!1,c(!1)},[t.resetKey]),o(()=>{if(!a)f(t.title)},[a,t.title]),{isEditing:a,startEditing:g,inputProps:{ref:m,type:"text",value:u,onPointerDown:(I)=>I.stopPropagation(),onChange:(I)=>f(I.target.value),onKeyDown:S,onBlur:k}}}function Jh(t){return t.closest('[data-slot="collapsible-content"][data-state="closed"], [data-exiting="true"], [data-dragging]')!==null}function m2(t,a){let c=a.getBoundingClientRect(),u=t.getBoundingClientRect(),{top:f,bottom:m}=u,p=t.closest('[data-slot="collapsible-content"]');while(p){let g=p.getBoundingClientRect();if(g.width>0||g.height>0)f=Math.max(f,g.top),m=Math.min(m,g.bottom);p=p.parentElement?.closest('[data-slot="collapsible-content"]')??null}return{x:Math.round(u.left-c.left),y:Math.round(f-c.top),w:Math.round(u.width),h:Math.max(0,Math.round(m-f)),clipped:u.height>0&&m-f<=0}}function Bl(t,a,c,u){let f=t.activeKey,m=f?t.rows.get(f):void 0;if(!a||!c||!m||Jh(m)){if(a)a.style.transition="none",a.style.opacity="0";t.activeWarm=!1,t.activeGlideUntil=0,t.lastActiveX=void 0,t.lastActiveY=void 0,t.lastActiveW=void 0,t.lastActiveH=void 0;return}let{x:p,y:g,w:v,h:k,clipped:S}=m2(m,c);if(S){a.style.transition="none",a.style.opacity="0",t.lastActiveX=void 0,t.lastActiveY=void 0,t.lastActiveW=void 0,t.lastActiveH=void 0;return}if(u&&t.activeWarm)t.activeGlideUntil=performance.now()+220,a.style.transition="transform 210ms cubic-bezier(0.22, 1, 0.36, 1), height 190ms cubic-bezier(0.22, 1, 0.36, 1), opacity 140ms ease";else if(performance.now()>=t.activeGlideUntil)a.style.transition=t.activeWarm?"none":"opacity 140ms cubic-bezier(0.22, 1, 0.36, 1)";a.style.transform=`translate3d(${p}px, ${g}px, 0)`,a.style.width=`${v}px`,a.style.height=`${k}px`,a.style.opacity="1",t.activeWarm=!0,t.lastActiveX=p,t.lastActiveY=g,t.lastActiveW=v,t.lastActiveH=k}function Bc(t,a,c,u){let f=t.hoveredKey??t.menuOpenKey,m=f?t.rows.get(f):void 0;if(!a||!c||!m||!f||Jh(m)){if(m&&Jh(m)){if(t.hoveredKey===f)t.hoveredKey=void 0;if(t.menuOpenKey===f)t.menuOpenKey=void 0}eg(t,a,!0);return}let{x:p,y:g,w:v,h:k,clipped:S}=m2(m,c);if(S){a.style.transition="none",a.style.opacity="0";return}if(u&&t.hoverWarm)t.hoverGlideUntil=performance.now()+190,a.style.transition="transform 175ms cubic-bezier(0.22, 1, 0.36, 1), height 170ms cubic-bezier(0.22, 1, 0.36, 1), opacity 130ms cubic-bezier(0.22, 1, 0.36, 1)";else if(performance.now()>=t.hoverGlideUntil)a.style.transition=t.hoverWarm?"none":"opacity 130ms cubic-bezier(0.22, 1, 0.36, 1)";a.style.transform=`translate3d(${p}px, ${g}px, 0)`,a.style.width=`${v}px`,a.style.height=`${k}px`,a.style.opacity="1",t.hoverWarm=!0}function eg(t,a,c=!1){if(clearTimeout(t.leaveTimer),clearTimeout(t.rowLeaveTimer),a)a.style.transition=c?"none":"opacity 150ms ease-out",a.style.opacity="0";if(c){t.hoverWarm=!1,t.hoverGlideUntil=0;return}t.leaveTimer=setTimeout(()=>{if(!t.hoveredKey&&!t.menuOpenKey)t.hoverWarm=!1},150)}var bb=jt(null);function L4(t,a){return{ref:t?.bindRow(a),onPointerEnter:(c)=>t?.onRowEnter(a,c.pointerType),onPointerLeave:(c)=>t?.onRowLeave(a,c.pointerType)}}function SX(t,a,c,u){return{onPointerDown:(f)=>{if(f.button===0)t?.onRowPress(a),c()},onClick:(f)=>{if(f.detail===0)c();else f.preventDefault()},onDoubleClick:(f)=>{f.preventDefault(),f.stopPropagation(),window.getSelection()?.removeAllRanges(),u()}}}function CX(t){let a=t.state==="busy";return n("span",{role:"img","aria-label":a?"运行中":"已完成,未查看",title:a?"运行中":"已完成,未查看",className:d("relative flex size-2 shrink-0",t.className),children:[a&&e("span",{className:"pointer-events-none absolute inset-0 animate-ping rounded-full bg-accent/60"}),e("span",{className:d("relative size-2 rounded-full",a?"bg-accent":"bg-warning")})]})}function IX(t){_();let a=i(null),c=i(null),u=i(null),f=i(null),m=i(null),p=i({rows:new Map,callbacks:new Map,activeKey:t.activeKey,lastActiveKey:void 0,pressedKey:void 0,hoveredKey:void 0,menuOpenKey:void 0,activeWarm:!1,hoverWarm:!1,activeGlideUntil:0,hoverGlideUntil:0,lastActiveX:void 0,lastActiveY:void 0,lastActiveW:void 0,lastActiveH:void 0,layoutRaf:0,leaveTimer:void 0,rowLeaveTimer:void 0});p.current.activeKey=t.activeKey,K(()=>{let v=p.current,k=v.lastActiveKey!==t.activeKey,S=v.pressedKey!==void 0&&v.pressedKey===t.activeKey;if(v.pressedKey=void 0,v.activeKey=t.activeKey,v.lastActiveKey=t.activeKey,k){if(!S)Bl(v,m.current,c.current,!0)}else{let I=v.activeKey,T=I?v.rows.get(I):void 0,L=c.current;if(T&&L&&!Jh(T)){let{x:R,y:A,w:E,h:P,clipped:D}=m2(T,L);if(!D&&(R!==v.lastActiveX||A!==v.lastActiveY||E!==v.lastActiveW||P!==v.lastActiveH))Bl(v,m.current,c.current,!0)}else Bl(v,m.current,c.current,!1)}if(v.hoveredKey||v.menuOpenKey)Bc(v,f.current,c.current,!1)}),o(()=>{let v=c.current,k=p.current;if(!v)return;let S=new ResizeObserver(()=>{if(Bl(k,m.current,c.current,!1),k.hoveredKey||k.menuOpenKey)Bc(k,f.current,c.current,!1)});return S.observe(v),()=>{S.disconnect(),cancelAnimationFrame(k.layoutRaf),clearTimeout(k.leaveTimer),clearTimeout(k.rowLeaveTimer)}},[]);let g=w(()=>({bindRow:(A)=>{let E=p.current,P=E.callbacks.get(A);if(!P)P=function D(N){if(N){if(E.callbacks.set(A,D),E.rows.set(A,N),A===E.activeKey)Bl(E,m.current,c.current,!1);if(A===E.hoveredKey||A===E.menuOpenKey)Bc(E,f.current,c.current,!1)}else{if(E.rows.delete(A),E.callbacks.delete(A),A===E.activeKey)Bl(E,m.current,c.current,!1);if(A===E.hoveredKey)E.hoveredKey=void 0,eg(E,f.current,!0)}},E.callbacks.set(A,P);return P},onRowEnter:(A,E)=>{if(E==="touch")return;if(c.current?.querySelector("[data-dragging]"))return;let P=p.current,D=P.rows.get(A);if(!D||Jh(D))return;clearTimeout(P.leaveTimer),clearTimeout(P.rowLeaveTimer);let N=P.hoveredKey;P.hoveredKey=A,Bc(P,f.current,c.current,N!==A)},onRowLeave:(A,E)=>{if(E==="touch")return;let P=p.current;if(P.hoveredKey!==A||P.menuOpenKey===A)return;clearTimeout(P.rowLeaveTimer),P.rowLeaveTimer=setTimeout(()=>{if(P.hoveredKey===A&&P.menuOpenKey!==A)P.hoveredKey=void 0,eg(P,f.current)},32)},onRowPress:(A)=>{let E=p.current;if(E.activeKey===A)return;E.pressedKey=A,E.activeKey=A,Bl(E,m.current,c.current,!0)},onRowMenuChange:(A,E)=>{let P=p.current;if(E)clearTimeout(P.leaveTimer),clearTimeout(P.rowLeaveTimer),P.menuOpenKey=A,P.hoveredKey=A,Bc(P,f.current,c.current,!1);else if(P.menuOpenKey===A)if(P.menuOpenKey=void 0,!P.hoveredKey)eg(P,f.current);else Bc(P,f.current,c.current,!1)},onLayoutChange:()=>{let A=p.current;if(A.activeGlideUntil=0,A.hoverGlideUntil=0,Bl(A,m.current,c.current,!1),A.hoveredKey||A.menuOpenKey)Bc(A,f.current,c.current,!1);cancelAnimationFrame(A.layoutRaf);let E=performance.now()+260,P=()=>{if(Bl(A,m.current,c.current,!1),A.hoveredKey||A.menuOpenKey)Bc(A,f.current,c.current,!1);if(performance.now()<E)A.layoutRaf=requestAnimationFrame(P)};A.layoutRaf=requestAnimationFrame(P)},watchUpgrade:(A,E)=>{let P=a.current;if(!P)return()=>{};return u.current??=new I4(P),u.current.watch(A,E)}}),[]);return o(()=>()=>u.current?.dispose(),[]),e(bb.Provider,{value:g,children:e("div",{ref:a,onPointerLeave:()=>{let v=p.current;if(clearTimeout(v.rowLeaveTimer),v.hoveredKey=void 0,!v.menuOpenKey)eg(v,f.current)},className:d("min-h-0 flex-1 overflow-y-auto overscroll-y-contain px-2 pb-3 [mask-image:linear-gradient(to_bottom,transparent,black_12px,black_calc(100%-16px),transparent)]",t.className),children:n("div",{ref:c,className:"relative",children:[e("span",{ref:f,"aria-hidden":!0,className:l("sidebar.hoverPill")}),e("span",{ref:m,"aria-hidden":!0,className:l("sidebar.activePill")}),t.children]})})})}var T4=5,vb=5;function wX(t){try{return localStorage.getItem(`basalt.project_collapsed:${t}`)==="1"}catch{return!1}}function h1e(t,a){try{if(a)localStorage.setItem(`basalt.project_collapsed:${t}`,"1");else localStorage.removeItem(`basalt.project_collapsed:${t}`)}catch{}}function TX(t){let a=t.project,[c,u]=r(()=>!wX(a.id)),[f,m]=r(!1),[p,g]=r(!1),v=mL(),k=i(!1),S=t0(),I=M(bb),T=`project:${a.id}`,L=f?t.sessions:t.sessions.slice(0,T4);o(()=>{u(!wX(a.id))},[a.id]);let R=(A)=>{u(A),h1e(a.id,!A)};return K(()=>{I?.onLayoutChange({expanded:c&&f&&S,dragging:p})},[c,f,S,p,I]),e(Uz,{value:a,...va,transition:{...va.transition,layout:wU},dragListener:!1,dragControls:v,"data-dragging":p||void 0,onDragStart:()=>{k.current=!0,g(!0)},onDragEnd:()=>{g(!1),t.onDragEnd()},onLayoutAnimationStart:()=>I?.onLayoutChange(),onLayoutAnimationComplete:()=>I?.onLayoutChange(),onDragTransitionEnd:()=>I?.onLayoutChange(),whileDrag:{scale:1.015},className:d("relative overflow-hidden rounded-lg transition-[background-color,box-shadow] duration-150",p&&"z-10 cursor-grabbing bg-[color-mix(in_oklch,var(--color-raised)_50%,var(--color-sidebar))] shadow-float"),children:n(Oe,{open:c,onOpenChange:R,...{[i2]:a.id},className:"rounded-lg data-[drop-over]:bg-accent-soft",children:[n("div",{...L4(I,T),"data-exiting":!S||void 0,onPointerDown:(A)=>{if(k.current=!1,A.pointerType==="touch"||A.button!==0)return;if(A.target instanceof Element&&A.target.closest("[data-project-actions]"))return;v.start(A,{distanceThreshold:4})},onClickCapture:(A)=>{if(!k.current)return;k.current=!1,A.preventDefault(),A.stopPropagation()},className:d("group/project relative flex h-8.5 items-center rounded-lg max-md:h-10 max-md:rounded-xl",!I&&(t.here?"bg-raised":"hover:bg-raised/60")),children:[n($e,{title:a.directory,className:"relative flex h-full min-w-0 flex-1 items-center gap-2 pl-2.5 text-left text-[13.5px] text-ink max-md:text-[15px]",children:[c?e(yc,{className:"size-4 shrink-0 text-faint transition-colors duration-150 group-hover/project:text-dim"}):e(dt,{className:"size-4 shrink-0 text-faint transition-colors duration-150 group-hover/project:text-dim"}),e("span",{className:"min-w-0 flex-1 truncate",children:a.name})]}),n("span",{"data-project-actions":!0,className:"pointer-events-none relative flex shrink-0 translate-x-1 scale-95 pr-1 opacity-0 transition-[opacity,translate,scale] duration-180 ease-out-quint group-hover/project:pointer-events-auto group-hover/project:translate-x-0 group-hover/project:scale-100 group-hover/project:opacity-100 has-focus-visible:pointer-events-auto has-focus-visible:translate-x-0 has-focus-visible:scale-100 has-focus-visible:opacity-100 max-md:pointer-events-auto max-md:translate-x-0 max-md:scale-100 max-md:opacity-100",children:[e(j,{label:"已归档会话",size:"icon-sm",onClick:t.onArchived,children:e(Dt,{className:"size-3.5"})}),e(j,{label:"项目设置",size:"icon-sm",onClick:t.onEdit,children:e(_f,{className:"size-3.5"})}),e(j,{label:"在项目里新建会话",size:"icon-sm",onClick:t.onNew,children:e(Or,{className:"size-3.5"})})]})]}),e(De,{children:n("ul",{className:"flex flex-col gap-0.5 pt-0.5",children:[e(de,{initial:!1,children:L.map((A)=>t.row(A,!0))}),t.sessions.length>T4&&e("li",{children:e("button",{type:"button",onClick:()=>m(!f),className:"w-full rounded-lg py-1 pl-6 text-left text-xs text-faint transition-colors hover:text-ink",children:f?"收起":`还有 ${t.sessions.length-T4} 个会话`})}),t.sessions.length===0&&e("li",{className:"py-1 pl-6 text-xs text-faint",children:"还没有会话"})]})})]})})}var LX=q(function(a){let c=M(bb),[u,f]=r(!1),[m,p]=r(null),g=a.active||a.tasks.some((S)=>S.id===a.activeId),v=!c||u||g,k=i(!1);if(!v)k.current=!0;return o(()=>m&&c&&!v?c.watchUpgrade(m,()=>f(!0)):void 0,[m,c,v]),v?e(x1e,{...a,observe:p,skipEnter:k.current}):e(g1e,{...a,observe:p})});function g1e(t){let a=fe(t.session);return e("li",{ref:t.observe,title:a,className:"relative",children:n("div",{className:d("flex h-8.5 items-center gap-2 pr-1.5 text-[13.5px] text-dim max-md:h-10 max-md:text-[15px]",t.nested?"pl-6":"pl-2.5"),children:[e("span",{className:"size-4 shrink-0"}),e("span",{className:"min-w-0 flex-1 truncate",children:a})]})})}function x1e(t){let a=t.session,[c,u]=r(!1),f=t0(),m=M(bb),p=`session:${a.id}`,g=a.status==="busy",v=g?"busy":t.unseen?"unseen":void 0,k=t.tasks.length>0,S=n2(t.tasks),I=(z)=>z.kind==="group"?z.sessions.some((B)=>B.id===t.activeId):z.session.id===t.activeId,T=S.filter(fb).length,L=t.tasks.some((z)=>z.id===t.activeId),[R,A]=r(L),[E,P]=r(vb),D=S.filter((z,B)=>B<E||fb(z)||I(z)),N=S.length-D.length,O=xb({title:fe(a),resetKey:a.id,onRename:t.onRename});o(()=>{if(L)A(!0)},[L]),K(()=>{m?.onLayoutChange(R&&f)},[R,f,m]);let F=(z)=>{u(z),m?.onRowMenuChange(p,z)};return e(Oe,{open:R,onOpenChange:A,asChild:!0,children:n(H.li,{...va,initial:t.skipEnter?!1:va.initial,ref:t.observe,"data-exiting":!f||void 0,className:"relative",children:[n("div",{...L4(m,p),className:d("group/row relative flex h-8.5 items-center rounded-lg pr-1 max-md:h-10 max-md:rounded-xl",!m&&(t.active?"bg-raised":"hover:bg-raised/60")),children:[O.isEditing?n("div",{className:d("relative flex h-full min-w-0 flex-1 items-center gap-2 rounded-lg pr-1.5 text-left text-[13.5px]",t.nested?"pl-6":"pl-2.5"),children:[e(st,{modelID:a.model,className:"size-4 shrink-0 text-ink opacity-100"}),e("input",{...O.inputProps,className:"min-w-0 flex-1 bg-transparent px-0 text-[13.5px] text-ink outline-none border-none ring-0 shadow-none focus:outline-none focus:ring-0","aria-label":"重命名会话"})]}):n("button",{type:"button",...SX(m,p,t.onOpen,O.startEditing),title:fe(a),className:d("relative flex h-full min-w-0 flex-1 items-center gap-2 rounded-lg pr-1.5 text-left text-[13.5px] select-none transition-colors duration-150 max-md:text-[15px]",t.nested?"pl-6":"pl-2.5",t.active?"font-medium text-ink":"text-dim group-hover/row:text-ink",c&&"text-ink"),children:[e(st,{modelID:a.model,className:d("size-4 shrink-0 transition-[scale,opacity,color] duration-180 ease-out-quint",t.active||c?"text-ink opacity-100":"text-dim opacity-75 group-hover/row:scale-105 group-hover/row:text-ink group-hover/row:opacity-100")}),e(Ol,{name:"session:badge",sessionID:a.id,session:a,plugins:t.plugins??[],context:{session:a}}),e("span",{className:"min-w-0 flex-1 truncate",children:fe(a)})]}),n("span",{className:"relative flex shrink-0 items-center gap-0.5",children:[k&&e($e,{asChild:!0,children:n("button",{type:"button",className:"z-10 flex shrink-0 cursor-pointer items-center gap-0.5 rounded-md px-1.5 py-0.5 text-[10.5px] font-medium whitespace-nowrap text-faint transition-colors duration-150 hover:bg-raised/90 hover:text-ink",title:R?"收起子代理列表":T>0?`展开查看所有子代理(共 ${S.length} 个,${T} 个运行中)`:`展开查看所有子代理(共 ${S.length} 个)`,children:[T>0&&n("span",{children:[T," 子任务"]}),e(ge,{className:d("size-3 shrink-0 transition-transform duration-260 ease-out-quint",R&&"rotate-180")})]})}),v&&e(CX,{state:v,className:d("mr-1 transition-[scale,opacity,width,margin] duration-150 ease-out-quint",!k&&(c?"mr-0 w-0 scale-0 opacity-0":"md:group-hover/row:mr-0 md:group-hover/row:w-0 md:group-hover/row:scale-0 md:group-hover/row:opacity-0 md:group-has-focus-visible/row:mr-0 md:group-has-focus-visible/row:w-0 md:group-has-focus-visible/row:scale-0 md:group-has-focus-visible/row:opacity-0"))}),e("span",{className:d("flex shrink-0 items-center justify-end overflow-hidden transition-[width] duration-180 ease-out-quint",c?"w-7":v&&!k?"w-0 md:group-hover/row:w-7 md:group-has-focus-visible/row:w-7":"w-7 md:w-0 md:group-hover/row:w-7 md:group-has-focus-visible/row:w-7"),children:n(Jt,{open:c,onOpenChange:F,align:"start",trigger:e(b,{size:"icon-sm",variant:"ghost","aria-label":"会话操作",className:d("shrink-0 transition-[opacity,scale,background-color,color] duration-150 ease-out-quint",c?"pointer-events-auto scale-100 opacity-100":"pointer-events-none scale-90 opacity-0 group-hover/row:pointer-events-auto group-hover/row:scale-100 group-hover/row:opacity-100 focus-visible:pointer-events-auto focus-visible:scale-100 focus-visible:opacity-100 max-md:pointer-events-auto max-md:scale-100 max-md:opacity-100",v&&!k&&!c&&"max-md:pointer-events-none max-md:opacity-0"),children:e(Gt,{className:"size-4"})}),children:[e(ke,{icon:e(et,{}),onSelect:O.startEditing,children:"重命名"}),e(ke,{icon:e(Dt,{}),disabled:g||t.pending||T>0,onSelect:t.onArchive,children:"归档"}),e(rr,{}),k&&e(ke,{icon:e(Pf,{}),disabled:t.pending,onSelect:t.onCleanChildren,children:"清理子代理"}),e(ke,{icon:e(pe,{}),danger:!0,disabled:g||t.pending,onSelect:t.onDelete,children:"删除"})]})})]})]}),k&&e(De,{children:n("ul",{className:"relative mt-0.5 flex flex-col gap-0.5",children:[e(de,{initial:!1,children:D.map((z)=>z.kind==="group"?e(kX,{rowKey:`group:${z.group.id}`,title:z.group.title,icon:(B)=>e(il,{className:B}),busy:z.sessions.some((B)=>B.status==="busy"),unseen:z.sessions.some((B)=>t.unseenTasks?.has(B.id)),nested:t.nested,active:z.sessions.some((B)=>B.id===t.activeId),onOpen:()=>t.onOpenGroup?.(z.group),onDelete:()=>t.onDeleteGroup?.(z.group,z.sessions)},`group:${z.group.id}`):e(kX,{rowKey:`session:${z.session.id}`,title:fe(z.session),icon:(B)=>e(st,{modelID:z.session.model,size:14,className:B}),busy:z.session.status==="busy",unseen:t.unseenTasks?.has(z.session.id)??!1,nested:t.nested,active:t.activeId===z.session.id,onOpen:()=>t.onOpenChild?.(z.session.id),onRename:(B)=>t.onRenameChild?.(z.session,B),onArchive:()=>t.onArchiveChild?.(z.session),onDelete:()=>t.onDeleteChild?.(z.session)},z.session.id))}),S.length>vb&&(N>0||E>vb)&&e("li",{children:e("button",{type:"button",onClick:()=>{P(N>0?E+vb:vb),m?.onLayoutChange()},className:d("w-full rounded-lg py-1 text-left text-xs text-faint transition-colors hover:text-ink",t.nested?"pl-10.5":"pl-7"),children:N>0?`还有 ${N} 个子任务`:"收起"})})]})})]})})}function kX(t){let[a,c]=r(!1),u=t0(),f=M(bb),{rowKey:m,busy:p,onRename:g}=t,v=p?"busy":t.unseen?"unseen":void 0,k=t.title,S=xb({title:k,resetKey:m,canStart:Boolean(g),onRename:g});K(()=>{if(!u)f?.onLayoutChange()},[u,f]);let I=(T)=>{c(T),f?.onRowMenuChange(m,T)};return e(H.li,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:0.15},"data-exiting":!u||void 0,className:"relative",children:n("div",{...L4(f,m),className:d("group/child relative rounded-lg",!f&&(t.active?"bg-raised":"hover:bg-raised/60")),children:[S.isEditing?n("div",{className:d("flex h-7.5 w-full items-center gap-2 pr-7 text-left text-[12.5px]",t.nested?"pl-10.5":"pl-7"),children:[t.icon("size-3.5 shrink-0 opacity-100"),e("input",{...S.inputProps,className:"min-w-0 flex-1 bg-transparent px-0 text-[12.5px] text-ink outline-none border-none ring-0 shadow-none focus:outline-none focus:ring-0","aria-label":"重命名子代理会话"})]}):n("button",{type:"button",...SX(f,m,t.onOpen,S.startEditing),title:k,className:d("relative flex h-7.5 w-full items-center gap-2 rounded-lg pr-7 text-left text-[12.5px] select-none transition-colors duration-150",t.nested?"pl-10.5":"pl-7",t.active?"font-medium text-ink":"text-dim group-hover/child:text-ink",a&&"text-ink"),children:[t.icon(d("size-3.5 shrink-0 transition-[scale,opacity] duration-180 ease-out-quint",t.active||a||p?"opacity-100":"opacity-75 group-hover/child:scale-105 group-hover/child:opacity-100")),e("span",{className:"min-w-0 flex-1 truncate",children:k}),v&&e(CX,{state:v,className:d("transition-opacity duration-150",a?"opacity-0":"group-hover/child:opacity-0")})]}),e("span",{className:"absolute top-1/2 right-1 flex -translate-y-1/2 items-center",children:n(Jt,{open:a,onOpenChange:I,align:"start",trigger:e(b,{size:"icon-sm",variant:"ghost","aria-label":"子代理会话操作",className:d("transition-[opacity,translate,scale,background-color,color] duration-160 ease-out-quint",a?"pointer-events-auto translate-x-0 scale-100 opacity-100":"pointer-events-none translate-x-1 scale-90 opacity-0 group-hover/child:pointer-events-auto group-hover/child:translate-x-0 group-hover/child:scale-100 group-hover/child:opacity-100 focus-visible:pointer-events-auto focus-visible:translate-x-0 focus-visible:scale-100 focus-visible:opacity-100 max-md:pointer-events-auto max-md:translate-x-0 max-md:scale-100 max-md:opacity-100",v&&!a&&"max-md:pointer-events-none max-md:opacity-0"),children:e(Gt,{className:"size-3.5"})}),children:[g&&n(h,{children:[e(ke,{icon:e(et,{}),onSelect:S.startEditing,children:"重命名"}),e(rr,{})]}),t.onArchive&&e(ke,{icon:e(Dt,{}),disabled:p,onSelect:t.onArchive,children:"归档"}),e(ke,{icon:e(pe,{}),danger:!0,disabled:p,onSelect:t.onDelete,children:"删除"})]})})]})})}var Bi={connecting:{label:"连接中",dot:"bg-faint animate-pulse"},open:{label:"已连接",dot:"bg-success"},offline:{label:"重连中",dot:"bg-warning animate-pulse"},unauthorized:{label:"需重新配对",dot:"bg-danger"},mismatch:{label:"版本不兼容",dot:"bg-danger"}},v1e={checking:"bg-faint animate-pulse",online:"bg-success",offline:"bg-danger"},b1e=1e4,y1e=5000,w1e=[];function k1e(t){let a=i(t);K(()=>{a.current=t});let c=i(new Map);return(u)=>{let f=c.current.get(u);if(f?.onCleanChildren)return f;let m=(g)=>()=>{let v=a.current.sessions.find((k)=>k.id===u);if(v)g(v)},p={onOpen:()=>a.current.onPlace({kind:"session",id:u}),onOpenChild:(g)=>a.current.onPlace({kind:"session",id:g}),onOpenGroup:(g)=>a.current.onPlace(r2(u,g)),onArchive:m((g)=>a.current.onArchiveSession(g)),onRename:(g)=>m((v)=>a.current.onRenameSession(v,g))(),onRenameChild:(g,v)=>a.current.onRenameSession(g,v),onArchiveChild:(g)=>a.current.onArchiveSession(g),onCleanChildren:m((g)=>a.current.onCleanChildSessions(g)),onDelete:m((g)=>a.current.onDeleteSession(g)),onDeleteChild:(g)=>a.current.onDeleteSession(g),onDeleteGroup:(g,v)=>a.current.onDeleteSessionGroup(g,v)};return c.current.set(u,p),p}}var EX=q(function(a){_(),Se();let c=Xh(a.sessions),u=c.filter((R)=>!R.parentID&&!R.projectID),f=new Map,m=new Map;for(let R of c){if(R.parentID){let A=m.get(R.parentID)??[];A.push(R),m.set(R.parentID,A)}if(!R.parentID&&R.projectID){let A=f.get(R.projectID)??[];A.push(R),f.set(R.projectID,A)}}let[p,g]=r(),v=p??a.projects,k=new Map;for(let R of u){let A=fK(R.updated),E=k.get(A)??[];E.push(R),k.set(A,E)}let S=a.place.kind==="session"?a.place.id:void 0,I;if(a.place.kind==="session"){let R=a.place.id,A=c.find((P)=>P.id===R),E=A?.parentID?xc(A):void 0;I=E?`group:${E.id}`:`session:${R}`}else if(a.place.kind==="new"&&a.place.projectID)I=`project:${a.place.projectID}`;let T=k1e(a),L=(R,A)=>{let E=m.get(R.id);return e(LX,{session:R,tasks:E??w1e,plugins:a.plugins,nested:A,active:R.id===S,unseen:a.unseen?.has(R.id)??!1,unseenTasks:E?a.unseen:void 0,activeId:E?S:void 0,pending:a.pendingSessions.has(R.id),...T(R.id)},R.id)};return n("nav",{className:l("sidebar.shell"),children:[n("div",{className:"flex h-13 shrink-0 items-center gap-2.5 pr-2 pl-4 max-md:h-15",children:[e(Aa,{className:"size-5.5",motion:"hover"}),e("span",{className:"flex-1 font-serif text-[18px] font-semibold tracking-[-0.01em] max-md:text-[20px]",children:"Basalt"}),e(j,{label:"收起侧栏",shortcut:"alt+1",onClick:a.onCollapse,className:"max-md:hidden",children:e(Ou,{className:"size-4.5"})})]}),n("div",{className:"flex flex-col gap-px px-2 pb-3",children:[n("button",{type:"button",onClick:()=>a.onPlace({kind:"new"}),className:"group flex h-9 w-full items-center gap-2.5 rounded-lg px-2 text-left text-sm font-medium text-ink transition-colors hover:bg-raised/70 max-md:hidden",children:[e("span",{className:"flex size-6 items-center justify-center rounded-full bg-accent text-accent-ink shadow-[inset_0_1px_0_oklch(1_0_0/0.15)] transition-transform duration-300 ease-spring group-hover:scale-110 group-active:scale-90",children:e(we,{className:"size-4 transition-transform duration-300 ease-out-quint group-hover:rotate-90",strokeWidth:2.5})}),"新聊天"]}),e(RX,{icon:e(Pe,{className:"size-4.5"}),onClick:a.onSearch,trailing:e(je,{children:"mod+k"}),children:"搜索"}),Rm.filter((R)=>!a.plugins?.some((A)=>A.id===R.pluginID&&A.status==="disabled")).map((R)=>{let A=a.place.kind==="page"&&a.place.pluginID===R.pluginID,E=R.icon;return e(RX,{icon:e(E,{className:"size-4.5"}),active:A,onClick:()=>a.onPlace({kind:"page",pluginID:R.pluginID,viewID:R.viewID}),children:R.title},R.pluginID)})]}),n(IX,{activeKey:I,children:[e(R4,{label:"项目",action:e(j,{label:"添加项目",size:"icon-xs",onClick:a.onAddProject,children:e(Af,{className:"size-3.5"})})}),n(zz,{axis:"y",values:v,onReorder:g,className:"mb-4 flex flex-col gap-0.5",children:[e(de,{initial:!1,children:v.map((R)=>e(TX,{project:R,sessions:f.get(R.id)??[],here:a.place.kind==="new"&&a.place.projectID===R.id,row:L,onNew:()=>a.onPlace({kind:"new",projectID:R.id}),onEdit:()=>a.onEditProject(R),onArchived:()=>a.onPlace({kind:"archive",projectID:R.id}),onDragEnd:()=>{g(void 0);let A=v.map((P)=>P.id),E=A.every((P,D)=>a.projects[D]?.id===P);if(p&&!E)a.onReorderProjects(A)}},R.id))}),v.length===0&&a.status==="open"&&e("li",{children:e("button",{type:"button",onClick:a.onAddProject,className:"w-full rounded-lg px-2.5 py-1.5 text-left text-[13px] leading-5 text-faint transition-colors hover:bg-raised/60 hover:text-dim",children:"绑定工作目录"})})]}),[...k].map(([R,A])=>n("div",{className:"mb-3",children:[e(R4,{label:R}),e("ul",{className:"flex flex-col gap-0.5",children:e(de,{initial:!1,presenceAffectsLayout:!1,children:A.map((E)=>L(E,!1))})})]},R)),u.length===0&&a.status==="open"&&n(h,{children:[e(R4,{label:"聊天"}),e("p",{className:"animate-fade px-2.5 py-1.5 text-[13px] text-faint",children:"还没有聊天"})]})]}),e(S1e,{...a})]})},(t,a)=>t.servers===a.servers&&t.server===a.server&&t.status===a.status&&t.sessions===a.sessions&&t.unseen===a.unseen&&t.pendingSessions===a.pendingSessions&&t.projects===a.projects&&t.plugins===a.plugins&&t.place===a.place);function RX(t){return _(),n("button",{type:"button",onPointerDown:(a)=>{if(a.button===0)t.onClick()},onClick:(a)=>{if(a.detail===0)t.onClick();else a.preventDefault()},className:l("sidebar.navItem",t.active?"bg-raised text-ink":"text-dim hover:bg-raised/60 hover:text-ink"),children:[e("span",{className:"flex size-6 items-center justify-center text-faint transition-[color,scale] duration-180 ease-out-quint group-hover:scale-105 group-hover:text-dim",children:t.icon}),e("span",{className:"flex-1",children:t.children}),t.trailing&&e("span",{className:"translate-x-1 opacity-0 transition-[opacity,translate] duration-180 ease-out-quint group-hover:translate-x-0 group-hover:opacity-100 max-md:hidden",children:t.trailing})]})}function R4(t){return _(),n("div",{className:"flex h-7 items-center pr-1 pl-2.5",children:[e("span",{className:l("sidebar.sectionTitle"),children:t.label}),t.action]})}function S1e(t){let a=Bi[t.status],c=t.place.kind==="settings",u=zn(t.server).slice(0,1).toUpperCase(),[f,m]=r(!1),[p,g]=r({});return o(()=>{if(!f)return;let v=t.servers.filter((T)=>T.id!==t.server.id);g(Object.fromEntries(v.map((T)=>[T.id,"checking"])));let k=!1,S=()=>{for(let T of v)nd(T.url,T.headers,y1e).then(()=>!k&&g((L)=>({...L,[T.id]:"online"})),()=>!k&&g((L)=>({...L,[T.id]:"offline"})))};S();let I=setInterval(S,b1e);return()=>{k=!0,clearInterval(I)}},[f,t.servers,t.server.id]),n("div",{className:"flex items-center gap-1 p-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] max-md:gap-2 max-md:px-3 max-md:pb-[max(0.75rem,env(safe-area-inset-bottom))]",children:[n(Jt,{side:"top",align:"start",className:"w-(--radix-dropdown-menu-trigger-width)",open:f,onOpenChange:m,trigger:n("button",{type:"button","aria-label":`服务器:${zn(t.server)},${a.label}`,className:"group flex h-9 min-w-0 flex-1 items-center gap-2.5 rounded-lg px-2.5 text-left text-[13px] text-dim transition-colors hover:bg-raised/60 hover:text-ink data-[state=open]:bg-raised/60 data-[state=open]:text-ink max-md:relative max-md:size-10 max-md:flex-none max-md:justify-center max-md:rounded-full max-md:border max-md:border-line max-md:bg-raised/60 max-md:px-0",children:[e("span",{className:d("size-2 shrink-0 rounded-full transition-colors duration-500 max-md:absolute max-md:top-0 max-md:right-0 max-md:ring-2 max-md:ring-sidebar",a.dot)}),e("span",{className:"text-[15px] font-medium text-ink md:hidden",children:u}),e("span",{className:"min-w-0 flex-1 truncate max-md:hidden",children:zn(t.server)}),t.status!=="open"&&e("span",{className:"shrink-0 text-xs text-faint max-md:hidden",children:a.label}),e(S0,{className:"size-3.5 shrink-0 text-faint transition-colors group-hover:text-dim max-md:hidden"})]}),children:[e(vA,{children:"服务器"}),t.servers.map((v)=>{let k=v.id===t.server.id,S=k?a.dot:v1e[p[v.id]??"checking"],I=k?a.label:{checking:"检测中",online:"在线",offline:"无法连接"}[p[v.id]??"checking"];return n(Uh,{icon:e(Bn,{}),checked:k,onSelect:()=>t.onServer(v.id),children:[e("span",{className:d("mr-2 inline-block size-2 rounded-full align-middle",S)}),n("span",{className:"sr-only",children:[I,":"]}),zn(v)]},v.id)}),e(ke,{icon:e(we,{}),onSelect:t.onAddServer,children:"添加服务器"}),e(rr,{}),e(ke,{icon:e(pe,{}),danger:!0,onSelect:t.onRemoveServer,children:"移除当前服务器"})]}),e(j,{label:"设置",onClick:()=>t.onPlace({kind:"settings"}),className:d("size-9 rounded-lg max-md:size-10 max-md:rounded-full max-md:border max-md:border-line max-md:bg-raised/60",c&&"bg-raised text-ink"),children:e(pt,{className:"size-4"})}),n("button",{type:"button",onClick:()=>t.onPlace({kind:"new"}),className:"ml-auto flex h-10 items-center gap-1.5 rounded-full bg-ink pr-4 pl-3 text-sm font-medium text-bg shadow-float transition-transform duration-150 active:scale-95 md:hidden",children:[e(we,{className:"size-4.5",strokeWidth:2.25}),"新建对话"]})]})}function p2(t,a){let c=new Blob([JSON.stringify(a,null,2)],{type:"application/json"}),u=URL.createObjectURL(c),f=document.createElement("a");f.href=u,f.download=t,document.body.appendChild(f),f.click(),f.remove(),URL.revokeObjectURL(u)}function PX(t){try{return JSON.parse(t)}catch{}if(t.includes("data:")){let a=t.split(/\r?\n/),c=[],u="",f=()=>{let m=u.trim();if(!m)return;if(m==="[DONE]")c.push("[DONE]");else try{c.push(JSON.parse(m))}catch{c.push(m)}u=""};for(let m of a)if(m.startsWith("data:")){let p=m.slice(5).trim();if(u)u+=`
1132
+ `;u+=p}else if(m.trim()==="")f();if(f(),c.length>0)return c}return t}function C1e(t){let a=t.body;try{a=JSON.parse(t.body)}catch{}p2(`basalt-request-${new Date(t.at).toISOString().replace(/[:.]/g,"-")}.json`,{...t,body:a})}function I1e(t){let a=PX(t.body);p2(`basalt-response-${new Date(t.at).toISOString().replace(/[:.]/g,"-")}.json`,{...t,body:a})}function AX({conn:t,state:a,session:c,project:u,go:f,renameSession:m,cleanChildSessions:p,deleteSession:g,archiveSession:v,pendingSessions:k,openSession:S,activeSidebar:I,activeBottomPanel:T,onToggleSidebar:L,setDrawer:R}){_();let[A,E]=r(!1),[P,D]=r(!1),[N,O]=r(!1),[F,z]=r(!1),B=a.plugins.flatMap((Ce)=>Ce.web??[]).find((Ce)=>Ce.sessionAction==="duplicate"),U=Se(),Y=w(()=>c2(a.plugins,U),[a.plugins,U]),G=c?.parentID?a.sessions.find((Ce)=>Ce.id===c.parentID):void 0,ce=G&&c?xc(c):void 0,re=c?a.sessions.filter((Ce)=>Ce.parentID===c.id):[],Q=re.some((Ce)=>Ce.status==="busy"),ae=xb({title:c?fe(c):"",resetKey:c?.id,canStart:c!==void 0&&c.archivedAt===null,onRename:c&&((Ce)=>m(c,Ce).catch((Be)=>V(Be,"重命名失败")))}),xe="h-14 md:h-11";if(!c)xe="h-14 md:hidden";else if(c.forkedFrom)xe="min-h-16";let Te=ce?.title??(G?fe(G):u?.name),me="max-md:size-9 max-md:rounded-full";return n("header",{className:l("workspace.header",xe,"max-md:gap-1 max-md:border-b-0 max-md:px-2"),children:[e(j,{label:"打开侧栏",onClick:()=>R(!0),className:"size-10 rounded-full md:hidden",children:e(V0,{className:"size-5"})}),n("div",{className:"min-w-0 flex-1 px-1.5 max-md:px-0",children:[e(de,{mode:"wait",initial:!1,children:c&&n(H.div,{initial:{opacity:0,y:3},animate:{opacity:1,y:0},exit:{opacity:0,y:-3},transition:{duration:0.18},className:"flex min-w-0 items-center gap-1.5 text-sm",children:[G&&n(h,{children:[n("button",{type:"button",title:`返回父会话: ${fe(G)}`,onClick:()=>S(G.id),className:"flex shrink-0 items-center gap-1 truncate text-faint transition-colors hover:text-ink max-sm:hidden",children:[e(at,{className:"size-3 text-faint"}),e("span",{children:fe(G)})]}),e("span",{className:"text-line-strong max-sm:hidden",children:"/"})]}),G&&ce&&n(h,{children:[n("button",{type:"button",title:`返回${ce.title}`,onClick:()=>f(r2(G.id,ce)),className:"flex min-w-0 shrink items-center gap-1 text-faint transition-colors hover:text-ink max-sm:hidden",children:[e(il,{className:"size-3 shrink-0 text-faint"}),e("span",{className:"truncate",children:ce.title})]}),e("span",{className:"text-line-strong max-sm:hidden",children:"/"})]}),u&&!G&&n(h,{children:[e("button",{type:"button",title:u.directory,onClick:()=>f({kind:"new",projectID:u.id}),className:"shrink-0 truncate text-faint transition-colors hover:text-ink max-sm:hidden",children:u.name}),e("span",{className:"text-line-strong max-sm:hidden",children:"/"})]}),c.archivedAt!==null&&n(h,{children:[e("button",{type:"button",title:"返回归档列表",onClick:()=>f({kind:"archive",projectID:c.projectID??void 0}),className:"shrink-0 text-faint transition-colors hover:text-ink max-sm:hidden",children:"归档"}),e("span",{className:"text-line-strong max-sm:hidden",children:"/"})]}),ae.isEditing?e("input",{...ae.inputProps,className:"min-w-0 max-w-xs sm:max-w-sm rounded-md bg-transparent px-1 py-0.5 text-sm text-ink outline-none border-none ring-0 shadow-none focus:outline-none focus:ring-0 max-md:text-[15px]","aria-label":"重命名会话"}):e("button",{type:"button",disabled:c.archivedAt!==null,onClick:ae.startEditing,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-ink transition-colors hover:bg-raised max-md:text-[15px] max-md:font-medium max-md:leading-snug",title:"点击重命名会话",children:fe(c)}),c.archivedAt!==null&&e("span",{className:l("status.base",l("status.neutral"),"py-0.5 font-medium"),children:"只读"})]},c.id)}),c&&Te&&!ae.isEditing&&e("div",{className:"truncate px-1 text-xs leading-tight text-faint sm:hidden",children:Te}),c?.forkedFrom&&n(b,{variant:"ghost",size:"sm",className:"max-w-full truncate",disabled:!a.sessions.some((Ce)=>Ce.id===c.forkedFrom?.id),onClick:()=>{if(c.forkedFrom)S(c.forkedFrom.id)},children:["分叉自"," ",a.sessions.find((Ce)=>Ce.id===c.forkedFrom?.id)?.title??"来源会话已删除"]})]}),n("div",{className:"flex shrink-0 items-center gap-2 max-md:h-10 max-md:gap-0 max-md:rounded-full max-md:border max-md:border-line/70 max-md:bg-panel/60 max-md:px-0.5 max-md:backdrop-blur-md",children:[c&&Y.map((Ce)=>{let Be=Ce.placement==="bottom"?T===Ce.id:I===Ce.id,X=U.find((He)=>He.id===Ce.pluginID)?.metadata?.icon??wc;return e(j,{label:Be?`关闭${Ce.title}`:`打开${Ce.title}`,"aria-pressed":Be,onClick:()=>L?.(Ce.id),className:d(me,Be&&"bg-raised text-ink"),children:e(X,{className:"size-4.5"})},Ce.id)}),c&&n(Jt,{trigger:e(b,{size:"icon",variant:"ghost","aria-label":"会话操作",className:me,children:e(Gt,{className:"size-4.5"})}),children:[e(ke,{disabled:c.archivedAt!==null||k.has(c.id),icon:e(et,{}),onSelect:ae.startEditing,children:"重命名"}),c.kind!=="sub"&&B&&e(ke,{icon:e(Cn,{}),disabled:A,onSelect:()=>{E(!0),t.copySession(c.id).then((Ce)=>S(Ce.session.id)).catch((Ce)=>V(Ce,"复制失败")).finally(()=>E(!1))},children:A?"复制中…":B.title}),e(ke,{icon:e(E0,{}),disabled:F,onSelect:()=>{z(!0),t.exportSession(c.id).then((Ce)=>{p2(`basalt-${c.id}.json`,Ce),le.success("已导出会话",{description:"文件包含完整对话内容,可在另一台 Basalt 里导入"})}).catch((Ce)=>V(Ce,"导出会话失败")).finally(()=>z(!1))},children:F?"导出中…":"导出会话"}),e(ke,{icon:e(bt,{}),disabled:P,onSelect:()=>{D(!0),t.lastModelRequest(c.id).then((Ce)=>{C1e(Ce),le.success("已导出最近一次模型请求",{description:"凭据请求头已脱敏为 ***"})}).catch((Ce)=>V(Ce,"导出请求失败")).finally(()=>D(!1))},children:P?"导出中…":"导出最近请求"}),e(ke,{icon:e(f0,{}),disabled:N,onSelect:()=>{O(!0),t.lastModelResponse(c.id).then((Ce)=>{I1e(Ce),le.success("已导出最近一次模型响应")}).catch((Ce)=>V(Ce,"导出响应失败")).finally(()=>O(!1))},children:N?"导出中…":"导出最近响应"}),!c.parentID&&e(ke,{icon:c.archivedAt===null?e(Dt,{}):e(d0,{}),disabled:c.status==="busy"||k.has(c.id)||Q,onSelect:()=>{v(c,c.archivedAt===null)},children:c.archivedAt===null?"归档":"恢复"}),e(rr,{}),re.length>0&&e(ke,{icon:e(Pf,{}),disabled:k.has(c.id),onSelect:()=>void p(c),children:"清理子代理"}),e(ke,{icon:e(pe,{}),danger:!0,disabled:c.status==="busy"||k.has(c.id),onSelect:()=>void g(c),children:"删除"})]}),e(j,{label:u?"在项目里新建会话":"新聊天",onClick:()=>f({kind:"new",projectID:u?.id}),className:d(me,"md:hidden"),children:e(Or,{className:"size-4.5"})})]})]})}function MX(t){return Se(),n("div",{inert:t.hidden,className:d("absolute inset-y-0 left-0 flex w-14 flex-col items-center gap-1 py-2.5 transition-opacity duration-200",t.hidden?"opacity-0":"opacity-100 delay-150"),children:[n(j,{label:"展开侧栏",shortcut:"alt+1",tooltipSide:"right",onClick:t.onExpand,className:"group mb-2",children:[e(Aa,{className:"size-5.5 group-hover:hidden"}),e(_u,{className:"hidden size-4.5 group-hover:block"})]}),e(j,{label:"新聊天",shortcut:"mod+shift+o",tooltipSide:"right",variant:"primary",onClick:t.onNew,className:"rounded-full",children:e(Or,{className:"size-4"})}),e(j,{label:"搜索",shortcut:"mod+k",tooltipSide:"right",onClick:t.onSearch,children:e(Pe,{className:"size-4.5"})}),Rm.map((a)=>{let c=a.icon,u=t.place.kind==="page"&&t.place.pluginID===a.pluginID;return e(j,{label:a.title,tooltipSide:"right",onClick:()=>t.onPage(a.pluginID,a.viewID),className:d(u&&"bg-raised text-ink"),children:e(c,{className:"size-4.5"})},a.pluginID)}),e(j,{label:"设置",tooltipSide:"right",onClick:t.onSettings,className:d("mt-auto",t.place.kind==="settings"&&"bg-raised text-ink"),children:e(pt,{className:"size-4.5"})})]})}function E4(t){return n("div",{className:"flex flex-1 animate-fade flex-col items-center justify-center gap-4 p-6 pb-[15vh] text-center text-[15px] text-dim",children:[e(Aa,{className:"size-10 opacity-60"}),e("p",{children:t.children}),t.action&&e(b,{variant:"primary",onClick:t.onAction,children:t.action})]})}var NX="basalt.sidebarCollapsed";function T1e(){try{return localStorage.getItem(NX)==="1"}catch{return!1}}var L1e=kc({},async()=>{let{ArchivePage:t}=await (C("yssx5a5q"),import("./chunk-yssx5a5q.js"));return{default:t}}),R1e=kc({},async()=>{let{Settings:t}=await (C("kxyws7q7"),import("./chunk-kxyws7q7.js"));return{default:t}}),DX=e("div",{className:"flex flex-1 items-center justify-center",children:e(hc,{size:"md"})});function OX(t){_();let a=m4(t.server,E1e()),c=Et(a.state,TW,Bw),u=Se();o(()=>{ve.clear();let Ge,Tt=()=>{let Fe=a.state.get().plugins;if(Fe===Ge)return;Ge=Fe,ve.sync(Fe,(ft,ze)=>jW(a,ft,ze)).catch((ft)=>V(ft,"插件加载失败"))},he=a.state.subscribe(Tt);return Tt(),()=>{he(),ve.clear()}},[a]),o(()=>{let Ge=ab(window.location.pathname,window.location.search,u);m(Ge)},[u]);let[f,m]=r(()=>ab(window.location.pathname,window.location.search)),[p,g]=r(!1),v=i(null),k=i(null),S=i(null),I=i(null),T=$W(p,g,{root:k,stage:S,drawer:v,overlay:I}),[L,R]=r(!1),[A,E]=r(!1),[P,D]=r(""),[N,O]=r(new Set),F=i(new Set),[z,B]=r(T1e),U=w(()=>c2(c.plugins,u),[c.plugins,u]),[Y,G]=r(()=>{try{return localStorage.getItem("basalt.sessionSidebar.active")}catch{return null}}),[ce,re]=r(()=>{try{return localStorage.getItem("basalt.bottomPanel.active")}catch{return null}}),[Q,ae]=r(),[xe,Te]=r(!1),me=f.kind==="session"?c.sessions.find((Ge)=>Ge.id===f.id):void 0,Ce=me?.projectID??(f.kind==="new"?f.projectID:void 0),Be=Ce?c.projects.find((Ge)=>Ge.id===Ce):void 0,X=w(()=>c.projects.filter((Ge)=>Ge.closedAt===null),[c.projects]),He=y((Ge,Tt=!1)=>{m(Ge),g(!1);let he=zl(Ge),Fe=window.location.pathname+window.location.search;if(he!==Fe)if(Tt)window.history.replaceState(null,"",he);else window.history.pushState(null,"",he)},[]);yX(a,y(()=>He({kind:"settings",tab:"server"}),[He]));let Le=i(null);if(me)Le.current=me.id;let J=f.kind==="session"&&c.status==="open"&&Le.current===f.id&&!me,Me=f.kind==="new"&&f.projectID!==void 0&&c.projects.length>0&&!Be;o(()=>{if(J||Me)Le.current=null,He({kind:"new"},!0)},[J,Me,He]);let Ie=f.kind==="session"?f.id:void 0;o(()=>{if(Ie)return a.subscribe(Ie)},[a,Ie]),o(()=>{if(f.kind!=="session"||me)return;let Ge=!1;return a.loadSession(f.id).catch((Tt)=>{if(Ge)return;if(c.status==="open")V(Tt,"会话不存在或已删除"),He({kind:"new"},!0)}),()=>{Ge=!0}},[a,f,me,c.status,He]),o(()=>{let Ge=window.history.scrollRestoration;window.history.scrollRestoration="manual";let Tt=()=>{m(ab(window.location.pathname,window.location.search)),g(!1)};return window.addEventListener("popstate",Tt),()=>{window.removeEventListener("popstate",Tt),window.history.scrollRestoration=Ge}},[]),o(()=>{if(!p)return;v.current?.focus();let Ge=(Tt)=>{if(Tt.key==="Escape")g(!1)};return window.addEventListener("keydown",Ge),()=>window.removeEventListener("keydown",Ge)},[p]),o(()=>{try{localStorage.setItem(NX,z?"1":"0")}catch{}},[z]);let qe=f.kind==="page"?f.pluginID:void 0;o(()=>{document.title=me?`${fe(me)} · Basalt`:qe?`${u.find((Ge)=>Ge.id===qe)?.pageNav?.title??qe} · Basalt`:f.kind==="settings"?"设置 · Basalt":"Basalt"},[me,f.kind,qe,u]);let Qe={enableOnFormTags:!0,preventDefault:!0};ub("mod+shift+f",()=>{R(!1),E((Ge)=>!Ge)},Qe),ub("mod+k",()=>{E(!1),R((Ge)=>!Ge)},Qe),ub("alt+1",()=>B((Ge)=>!Ge),Qe),ub("mod+shift+o",()=>He({kind:"new"}),Qe);let Re=y((Ge)=>{let Tt=U.find((ft)=>ft.id===Ge)?.placement==="bottom",he=Tt?"basalt.bottomPanel.active":"basalt.sessionSidebar.active";(Tt?re:G)((ft)=>{let ze=ft===Ge?null:Ge;try{if(ze)localStorage.setItem(he,ze);else localStorage.removeItem(he)}catch{}return ze})},[U]),Ne=me?U.find((Ge)=>Ge.id===Y&&Ge.placement==="right"):void 0,ut=me?U.find((Ge)=>Ge.id===ce&&Ge.placement==="bottom"):void 0;o(()=>{if(!Y||U.some((he)=>he.id===Y))return;let Ge=U.filter((he)=>he.localID===Y),Tt=Ge.length===1?Ge[0]:void 0;if(!Tt)return;G(Tt.id);try{localStorage.setItem("basalt.sessionSidebar.active",Tt.id),localStorage.removeItem("basalt.contextSidebar.open")}catch{}},[Y,U]);let kt=(Ge)=>{He({kind:"session",id:Ge})},It=KW({conn:a,projects:c.projects,current:Be,onImported:(Ge)=>kt(Ge.id)}),Ee=vX(a,me,c.plugins,kt),nt=(Ge)=>{ae(Ge),Te(!0)},Kt=async(Ge,Tt)=>{let he=Tt.trim();if(!he||he===fe(Ge))return;try{await a.renameSession(Ge.id,he)}catch(Fe){V(Fe,"重命名失败")}},an=async(Ge,Tt)=>{if(F.current.has(Ge.id))return;F.current.add(Ge.id),O(new Set(F.current));try{if(await a.updateSession(Ge.id,{archived:Tt}),Tt)le("已归档",{action:{label:"撤销",onClick:()=>{an(Ge,!1)}}});else le("已恢复会话")}catch(he){if(V(he,Tt?"归档失败":"恢复失败"),!Tt)le("会话仍处于归档状态",{action:{label:"重试恢复",onClick:()=>{an(Ge,!1)}}})}finally{F.current.delete(Ge.id),O(new Set(F.current))}},mn=async(Ge)=>{if(F.current.has(Ge.id))return;F.current.add(Ge.id),O(new Set(F.current));try{if(await Ke({title:`删除「${fe(Ge)}」?`,description:"本会话及所有子会话的记录会被永久删除,无法恢复。",action:"删除",danger:!0}))await a.deleteSession(Ge.id)}catch(Tt){V(Tt,"删除失败")}finally{F.current.delete(Ge.id),O(new Set(F.current))}},br=async(Ge)=>{if(F.current.has(Ge.id))return;let Tt=c.sessions.filter((hn)=>hn.parentID===Ge.id&&hn.archivedAt===null),he=n2(Tt),Fe=he.filter((hn)=>!fb(hn)),ft=Fe.flatMap((hn)=>hn.kind==="group"?hn.sessions:[hn.session]).map((hn)=>hn.id).filter((hn)=>!F.current.has(hn));if(ft.length===0){le("该会话下暂无可清理的已结束子代理");return}let ze=fe(Ge),lt=ze.length>24?`${ze.slice(0,24)}…`:ze,Bt=he.length-Fe.length,vn=Bt>0?`(${Bt} 个运行中的子代理不会被影响)`:"",wr=await pE({title:"清理子代理",description:`针对会话「${lt}」下的 ${Fe.length} 个已结束子代理:归档后移出侧栏并在归档中保留,彻底删除将永久移除记录${vn}。父会话本身保留。`,choices:[{label:"归档",value:"archive",variant:"secondary"},{label:"彻底删除",value:"delete",danger:!0}]});if(!wr)return;for(let hn of ft)F.current.add(hn);O(new Set(F.current));try{if(wr==="archive"){let kr=(await Promise.allSettled(ft.map((ar)=>a.updateSession(ar,{archived:!0})))).find((ar)=>ar.status==="rejected");if(kr?.status==="rejected")V(kr.reason,"部分子代理归档失败");else le(`已归档 ${Fe.length} 个子代理`)}else{if(f.kind==="session"&&ft.includes(f.id))He({kind:"session",id:Ge.id},!0);let kr=(await Promise.allSettled(ft.map((ar)=>a.deleteSession(ar)))).find((ar)=>ar.status==="rejected");if(kr?.status==="rejected")V(kr.reason,"部分子代理删除失败");else le(`已彻底删除 ${Fe.length} 个子代理`)}}finally{for(let hn of ft)F.current.delete(hn);O(new Set(F.current))}},Ao=async(Ge,Tt)=>{let he=Tt.map((ft)=>ft.id).filter((ft)=>!F.current.has(ft));if(he.length===0)return;if(!await Ke({title:`删除「${Ge}」?`,description:`${he.length} 个成员子会话的记录会被永久删除,无法恢复。`,action:"删除",danger:!0}))return;for(let ft of he)F.current.add(ft);O(new Set(F.current));try{let ze=(await Promise.allSettled(he.map((lt)=>a.deleteSession(lt)))).find((lt)=>lt.status==="rejected");if(ze?.status==="rejected")V(ze.reason,"部分成员会话删除失败")}finally{for(let ft of he)F.current.delete(ft);O(new Set(F.current))}},Ba=async(Ge)=>{if(Ge.length===0)return;let Tt=Ge.map((Fe)=>Fe.id);if(!await Ke({title:`彻底删除 ${Ge.length} 个会话?`,description:"所有选中的会话及其子会话记录将被永久彻底删除,无法恢复。",action:"彻底删除",danger:!0}))return;for(let Fe of Tt)F.current.add(Fe);O(new Set(F.current));try{await Promise.allSettled(Tt.map((Fe)=>a.deleteSession(Fe))),le(`已彻底删除 ${Ge.length} 个会话`)}catch(Fe){V(Fe,"批量删除失败")}finally{for(let Fe of Tt)F.current.delete(Fe);O(new Set(F.current))}},Fl=async(Ge)=>{if(Ge.length===0)return;let Tt=Ge.map((he)=>he.id);for(let he of Tt)F.current.add(he);O(new Set(F.current));try{await Promise.allSettled(Tt.map((he)=>a.updateSession(he,{archived:!1}))),le(`已恢复 ${Ge.length} 个会话`)}catch(he){V(he,"批量恢复失败")}finally{for(let he of Tt)F.current.delete(he);O(new Set(F.current))}},or=async()=>{if(await Ke({title:`移除 ${zn(t.server)}?`,description:"只是从这台设备上移除,服务器和上面的数据不受影响。之后可以重新配对。",action:"移除",danger:!0}))AU(t.server.id)},Vl=(Ge)=>e(EX,{servers:t.servers,server:t.server,status:c.status,sessions:c.sessions,unseen:c.unseen,projects:X,plugins:c.plugins,place:f,onServer:t.onServer,onAddServer:t.onAddServer,onRemoveServer:or,onPlace:He,onSearch:()=>{E(!1),g(!1),R(!0)},onAddProject:()=>nt(null),onEditProject:nt,onReorderProjects:(Tt)=>{let he=c.projects.filter((Fe)=>Fe.closedAt!==null).map((Fe)=>Fe.id);a.reorderProjects([...Tt,...he]).catch((Fe)=>V(Fe,"项目排序保存失败"))},pendingSessions:N,onArchiveSession:(Tt)=>{an(Tt,!0)},onRenameSession:Kt,onCleanChildSessions:(Tt)=>void br(Tt),onDeleteSession:mn,onDeleteSessionGroup:(Tt,he)=>void Ao(Tt.title,he),onCollapse:()=>Ge?g(!1):B(!0)});function mi(){if(c.status==="unauthorized")return e(E4,{action:"重新配对",onAction:t.onRepair,children:"这台设备的令牌已失效或被吊销。"});if(c.status==="mismatch")return e(E4,{children:"Web 与服务器的协议版本不一致,请把两边升级到同一版本。"});if(me)return e(QS,{conn:a,session:me,target:f.kind==="session"?f.target:void 0,commands:Ee,onOpen:kt,onConfigureModels:()=>He({kind:"settings",tab:"models"}),onInspectContext:()=>Re("context/context"),archived:me.archivedAt!==null&&e(WW,{pending:N.has(me.parentID??me.id),onRestore:()=>{let Ge=c.sessions.find((Tt)=>Tt.id===(me.parentID??me.id));if(Ge)an(Ge,!1)},onBack:()=>He({kind:"archive",projectID:me.projectID??void 0})})},me.id);if(f.kind==="session")return e("div",{className:"flex flex-1 items-center justify-center",children:e(hc,{size:"md",text:"正在加载会话…"})});if(f.kind==="archive")return e(aa,{fallbackText:"页面加载失败",resetKey:f.kind,children:e(qo,{fallback:DX,children:e(L1e,{conn:a,sessions:c.sessions,projects:c.projects,projectID:f.projectID,pending:N,onOpen:kt,onRestore:(Ge)=>{an(Ge,!1)},onDelete:mn,onBatchRestore:Fl,onBatchDelete:Ba})})});if(f.kind==="page")return e(lW,{pluginID:f.pluginID,viewID:f.viewID??"page",connection:a,onOpen:kt});if(f.kind==="settings")return e(aa,{fallbackText:"页面加载失败",resetKey:f.kind,children:e(qo,{fallback:DX,children:e(R1e,{conn:a,servers:t.servers,server:t.server,initialTab:f.tab,onTabChange:(Ge,Tt)=>He({kind:"settings",tab:Ge},!Tt),onServer:t.onServer,onAddServer:t.onAddServer,onRemoveServer:()=>void or()})})});return e(lX,{conn:a,projectID:Be?.id,onProject:(Ge)=>He({kind:"new",projectID:Ge}),onAddProject:()=>nt(null),onEditProject:nt,onOpen:kt,onConfigureModels:()=>He({kind:"settings",tab:"models"}),onArchive:()=>He({kind:"archive",projectID:Be?.id})},f.kind==="new"?f.projectID??"chat":"chat")}return n("div",{ref:k,className:"relative flex h-full min-h-0 overflow-hidden bg-sidebar",children:[n("aside",{className:d("relative hidden shrink-0 overflow-hidden bg-sidebar transition-[width] duration-300 ease-out-quint md:block",z?"w-14":"w-68"),children:[e("div",{inert:z,className:d("absolute inset-y-0 left-0 w-68 transition-opacity",z?"pointer-events-none opacity-0 duration-100":"opacity-100 delay-100 duration-200"),children:Vl(!1)}),e(MX,{hidden:!z,place:f,onExpand:()=>B(!1),onNew:()=>He({kind:"new"}),onSearch:()=>R(!0),onPage:(Ge,Tt)=>He({kind:"page",pluginID:Ge,viewID:Tt}),onSettings:()=>He({kind:"settings"})})]}),e("div",{ref:v,role:"dialog","aria-label":"侧栏",tabIndex:-1,inert:!p,className:d(l("sidebar.drawer"),p?"translate-x-0 opacity-100":"pointer-events-none -translate-x-10 opacity-0"),children:Vl(!0)}),n("div",{ref:S,className:d("relative z-10 flex min-h-0 min-w-0 flex-1 flex-col transition-[translate,border-radius,box-shadow] duration-380 ease-out-quint md:my-2 md:mr-2 max-md:bg-bg",(p||T)&&"max-md:overflow-hidden max-md:rounded-l-[28px] max-md:shadow-float",p&&"max-md:translate-x-[min(86vw,24rem)]"),children:[e("button",{ref:I,type:"button","aria-label":"关闭侧栏",tabIndex:p?0:-1,onClick:()=>g(!1),className:d("absolute inset-0 z-50 bg-bg/40 transition-opacity duration-380 md:hidden",p?"opacity-100":"pointer-events-none opacity-0")}),n("main",{inert:p,className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-bg md:rounded-2xl md:border md:border-line md:shadow-composer",children:[e(AX,{conn:a,state:c,session:me,project:Be,go:He,archiveSession:an,pendingSessions:N,renameSession:Kt,cleanChildSessions:br,deleteSession:mn,openSession:kt,activeSidebar:Y,activeBottomPanel:ce,onToggleSidebar:Re,setDrawer:g}),mi()]}),e(de,{children:me&&ut&&e(x4,{contribution:ut,connection:a,session:me,entries:a.view(me.id).entries,onClose:()=>Re(ut.id)},`bottom-${ut.id}`)})]}),It.over&&e("div",{"aria-hidden":"true",className:"pointer-events-none fixed inset-2 z-50 flex items-center justify-center rounded-2xl border-2 border-dashed border-accent/60 bg-accent-soft/50",children:n("span",{className:"rounded-full bg-panel px-4 py-2 text-sm font-medium text-ink shadow-composer",children:["松开导入会话 · ",It.over.project?`项目 ${It.over.project.name}`:"聊天"]})}),e(uX,{conn:a,onModels:()=>He({kind:"settings",tab:"models"}),onHome:()=>He({kind:"new"})}),e(de,{children:me&&Ne&&e(x4,{contribution:Ne,connection:a,session:me,entries:a.view(me.id).entries,onClose:()=>Re(Ne.id)},`sidebar-${Ne.id}`)}),e(hX,{open:A,onOpenChange:E,server:t.server,projects:c.projects,sessions:c.sessions,initialQuery:P,onPlace:He}),e(oX,{server:t.server,onGlobalSearch:(Ge)=>{D(Ge),E(!0)},open:L,onOpenChange:R,sessions:c.sessions,projects:X,onPlace:He,onAddProject:()=>nt(null),commands:Ee}),Q!==void 0&&e(fX,{open:xe,onOpenChange:Te,conn:a,project:Q??void 0,onSaved:(Ge)=>{if(!Q)He({kind:"new",projectID:Ge.id})},onDeleted:()=>He({kind:"new"}),onClosed:()=>He({kind:"new"})},Q?.id??"new")]})}function E1e(){let t=ab(window.location.pathname,window.location.search);return t.kind==="session"?t.id:void 0}var zX="basalt.lastServer";function _X(){if(typeof location<"u"&&kh(location.origin))return location.origin;return Du}function P1e(){try{return localStorage.getItem(zX)??void 0}catch{return}}function BX(){return e($5,{reducedMotion:"user",children:e(kv,{children:n(Je,{value:Yi,children:[e(A1e,{}),e(kE,{}),e(gE,{}),e(UG,{})]})})})}function A1e(){let t=Tb(NU),a=se(go),[c,u]=r(t.selected??P1e()),[f,m]=r(t.prompt),p=i(new Map);o(()=>{if(!c)return;try{localStorage.setItem(zX,c)}catch{}},[c]),o(()=>{let k=(S)=>{if(S)le("新版本已就绪",{id:"shell-updated",description:"刷新后使用新版本",duration:Number.POSITIVE_INFINITY,action:{label:"刷新",onClick:()=>location.reload()}})};return k(JS.get()),JS.subscribe(k)},[]),o(()=>NW((k)=>{if(!kh(k.server)){m({url:k.server,code:k.code});return}let S=go.get().find((I)=>I.url===Ls(k.server));if(S?.token){u(S.id),m(void 0);return}rd(k.server,k.code).then((I)=>{u(I.id),m(void 0)}).catch((I)=>{m({url:k.server,error:ot(I)})})}),[]);let g=a.find((k)=>k.id===c)??a[0];o(()=>{let k=(S)=>{let I=S.detail;if(!I?.serverID||!I.sessionID)return;if(!go.get().some((L)=>L.id===I.serverID))return;let T=zl({kind:"session",id:I.sessionID});if(T!==window.location.pathname+window.location.search)window.history.pushState(null,"",T);if(m(void 0),I.serverID===g?.id)window.dispatchEvent(new Event("popstate"));else u(I.serverID)};return window.addEventListener(e2,k),()=>window.removeEventListener(e2,k)},[g?.id]);let v=(k)=>{if(!g||k===g.id)return;p.current.set(g.id,window.location.pathname+window.location.search),window.history.replaceState(null,"",p.current.get(k)??"/"),u(k)};if(!g||f)return e(vW,{initialURL:f?.url??_X(),initialError:f?.error,initialCode:f?.code,onAdded:(k)=>{window.history.replaceState(null,"","/"),u(k.id),m(void 0)},onCancel:g?()=>m(void 0):void 0});return e(OX,{servers:a,server:g,onServer:v,onAddServer:()=>m({url:_X()}),onRepair:()=>m({url:g.url,error:"令牌已失效或被吊销,请用新的配对码重新配对。"})},g.id)}var FX="./inter-latin-wght-normal-an0py913.woff2";var VX="./jetbrains-mono-latin-wght-normal-hj2e42wt.woff2";var UX="./source-serif-4-latin-wght-italic-ta5tqqvz.woff2";var qX="./source-serif-4-latin-wght-normal-1yyvbhsz.woff2";var _1e=[["Inter Variable",FX,{weight:"100 900"}],["Source Serif 4 Variable",qX,{weight:"200 900"}],["Source Serif 4 Variable",UX,{weight:"200 900",style:"italic"}],["JetBrains Mono Variable",VX,{weight:"100 800"}]];function HX(){if(typeof FontFace>"u")return;for(let[t,a,c]of _1e)document.fonts.add(new FontFace(t,`url(${a}) format("woff2")`,{display:"swap",...c}))}var jX=window.ResizeObserver;if(typeof jX==="function")window.ResizeObserver=class extends jX{constructor(a){super((c,u)=>{requestAnimationFrame(()=>{a(c,u)})})}};HX();AW();var GX=document.getElementById("root");if(!GX)throw Error("#root missing");lx(GX).render(e(Cb,{children:e(qo,{fallback:e("div",{role:"status",className:"flex h-full items-center justify-center bg-bg",children:e(hc,{size:"md",text:"正在加载会话…"})}),children:e(BX,{})})}));export{Ye,Ze,wn,C,Xe,q,y,M,o,ee,K,w,i,r,Vt,h,e,n,de,H,d,Je,x,yl,vl,Qa,Wt,Vs,Ja,bl,xl,s,be,Qn,Gt,Jn,ie,kn,$n,dn,er,Dt,tr,bt,Ht,nr,Z,ge,Nt,ca,Cn,ua,dr,pr,da,mr,xt,dt,at,Ue,pa,Br,fr,ma,fa,et,hr,we,Mt,ye,Pe,Bn,pt,Fr,Fn,ha,Pt,pe,oe,Ri,Vo,zr,ei,Wo,Go,gr,se,Et,Ho,Yo,ga,Zo,Li,_l,Ii,Xo,wl,Ws,ti,ya,kl,Gs,Cl,Di,Ni,Ur,Ko,Qo,Hs,Sl,ve,Ae,pn,Se,jr,Jo,_,es,l,je,b,j,_t,Mi,va,Ot,Oe,$e,De,tt,Yt,te,yr,Zt,ue,wt,Ke,ts,ns,qr,rs,ni,ri,ai,as,Xt,it,Pi,le,Vr,zn,ot,V,Wr,Ys,Jt,ke,rr,st,mt,ba,Oi,ne,W,is,os,ss,Tl,xa,ii,El,Al,en,fe,$i,oi,ls,Gr,Rl,Bi};