most-box 0.1.5 → 0.1.7

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 (389) hide show
  1. package/README.md +31 -19
  2. package/out/404/index.html +3 -3
  3. package/out/404.html +3 -3
  4. package/out/__next.__PAGE__.txt +6 -6
  5. package/out/__next._full.txt +16 -16
  6. package/out/__next._head.txt +3 -3
  7. package/out/__next._index.txt +8 -8
  8. package/out/__next._tree.txt +5 -5
  9. package/out/_next/static/chunks/0-c8h4u1i2f78.js +1 -0
  10. package/out/_next/static/chunks/02j6ojja7vzp8.js +1 -0
  11. package/out/_next/static/chunks/06im3as4nwfil.js +1 -0
  12. package/out/_next/static/chunks/0nwdp-n94owg0.css +1 -0
  13. package/out/_next/static/chunks/0sq_0pwxnhby2.js +1 -0
  14. package/out/_next/static/chunks/1ei8b9nw-ea8p.css +1 -0
  15. package/out/_next/static/chunks/1h-f81ddyfcmx.css +1 -0
  16. package/out/_next/static/chunks/{02jvyg27pp0mz.js → 1v-molv0hbcjl.js} +1 -1
  17. package/out/_next/static/chunks/22h69_zwmttt4.js +1 -0
  18. package/out/_next/static/chunks/23zlmarf-go2x.js +1 -0
  19. package/out/_next/static/chunks/24k_4-y4ym0df.js +1 -0
  20. package/out/_next/static/chunks/258tyt1xt34p4.css +1 -0
  21. package/out/_next/static/chunks/2693fczty5yr8.js +1 -0
  22. package/out/_next/static/chunks/26hcvxjw9do9d.js +1 -0
  23. package/out/_next/static/chunks/2_i1b78h0yiu_.js +1 -0
  24. package/out/_next/static/chunks/2fmkcw8ui5xp3.js +5 -0
  25. package/out/_next/static/chunks/2uget3ephe4e3.js +736 -0
  26. package/out/_next/static/chunks/2va-v1iiap4zv.js +1 -0
  27. package/out/_next/static/chunks/2vm9uslik2wfi.css +5 -0
  28. package/out/_next/static/chunks/3e9ia0hs-pqvs.css +1 -0
  29. package/out/_next/static/chunks/3ejz1mdljwwqf.css +1 -0
  30. package/out/_next/static/chunks/3fea100s764m-.js +1 -0
  31. package/out/_next/static/chunks/3g0c367tk4esf.js +1 -0
  32. package/out/_next/static/chunks/3mccxoa60ley8.js +1 -0
  33. package/out/_next/static/chunks/{0gcsdf57gcm6h.js → 3oe03qxgd_rid.js} +1 -1
  34. package/out/_next/static/chunks/3r5wf57k0gys9.js +1 -0
  35. package/out/_next/static/chunks/3yc_zd5vxq0j7.css +1 -0
  36. package/out/_next/static/chunks/418_591yp64lx.css +23 -0
  37. package/out/_next/static/chunks/43l72x-2z3zxb.js +1 -0
  38. package/out/_next/static/chunks/{turbopack-05qngmxam3ar~.js → turbopack-026p0g9v9_pva.js} +1 -1
  39. package/out/_not-found/__next._full.txt +13 -13
  40. package/out/_not-found/__next._head.txt +3 -3
  41. package/out/_not-found/__next._index.txt +8 -8
  42. package/out/_not-found/__next._not-found.__PAGE__.txt +4 -4
  43. package/out/_not-found/__next._not-found.txt +3 -3
  44. package/out/_not-found/__next._tree.txt +3 -3
  45. package/out/_not-found/index.html +3 -3
  46. package/out/_not-found/index.txt +13 -13
  47. package/out/admin/__next._full.txt +15 -15
  48. package/out/admin/__next._head.txt +3 -3
  49. package/out/admin/__next._index.txt +8 -8
  50. package/out/admin/__next._tree.txt +4 -4
  51. package/out/admin/__next.admin.__PAGE__.txt +4 -4
  52. package/out/admin/__next.admin.txt +4 -4
  53. package/out/admin/index.html +3 -3
  54. package/out/admin/index.txt +15 -15
  55. package/out/app/__next._full.txt +14 -14
  56. package/out/app/__next._head.txt +3 -3
  57. package/out/app/__next._index.txt +8 -8
  58. package/out/app/__next._tree.txt +3 -3
  59. package/out/app/__next.app.__PAGE__.txt +4 -4
  60. package/out/app/__next.app.txt +3 -3
  61. package/out/app/index.html +3 -3
  62. package/out/app/index.txt +14 -14
  63. package/out/chat/__next._full.txt +15 -15
  64. package/out/chat/__next._head.txt +3 -3
  65. package/out/chat/__next._index.txt +8 -8
  66. package/out/chat/__next._tree.txt +4 -4
  67. package/out/chat/__next.chat.__PAGE__.txt +4 -4
  68. package/out/chat/__next.chat.txt +4 -4
  69. package/out/chat/index.html +3 -3
  70. package/out/chat/index.txt +15 -15
  71. package/out/chat/join/__next._full.txt +15 -15
  72. package/out/chat/join/__next._head.txt +3 -3
  73. package/out/chat/join/__next._index.txt +8 -8
  74. package/out/chat/join/__next._tree.txt +4 -4
  75. package/out/chat/join/__next.chat.join.__PAGE__.txt +4 -4
  76. package/out/chat/join/__next.chat.join.txt +3 -3
  77. package/out/chat/join/__next.chat.txt +4 -4
  78. package/out/chat/join/index.html +3 -3
  79. package/out/chat/join/index.txt +15 -15
  80. package/out/demo/__next._full.txt +27 -0
  81. package/out/demo/__next._head.txt +5 -0
  82. package/out/demo/__next._index.txt +9 -0
  83. package/out/demo/__next._tree.txt +7 -0
  84. package/out/demo/__next.demo.__PAGE__.txt +12 -0
  85. package/out/demo/__next.demo.txt +5 -0
  86. package/out/demo/index.html +17 -0
  87. package/out/demo/index.txt +27 -0
  88. package/out/download/__next._full.txt +37 -35
  89. package/out/download/__next._head.txt +3 -3
  90. package/out/download/__next._index.txt +8 -8
  91. package/out/download/__next._tree.txt +5 -5
  92. package/out/download/__next.download.__PAGE__.txt +7 -7
  93. package/out/download/__next.download.txt +3 -3
  94. package/out/download/index.html +3 -3
  95. package/out/download/index.txt +37 -35
  96. package/out/game/__next._full.txt +13 -13
  97. package/out/game/__next._head.txt +3 -3
  98. package/out/game/__next._index.txt +8 -8
  99. package/out/game/__next._tree.txt +4 -4
  100. package/out/game/__next.game.__PAGE__.txt +2 -2
  101. package/out/game/__next.game.txt +4 -4
  102. package/out/game/gandengyan/__next._full.txt +16 -16
  103. package/out/game/gandengyan/__next._head.txt +3 -3
  104. package/out/game/gandengyan/__next._index.txt +8 -8
  105. package/out/game/gandengyan/__next._tree.txt +5 -5
  106. package/out/game/gandengyan/__next.game.gandengyan.__PAGE__.txt +5 -5
  107. package/out/game/gandengyan/__next.game.gandengyan.txt +3 -3
  108. package/out/game/gandengyan/__next.game.txt +4 -4
  109. package/out/game/gandengyan/index.html +3 -3
  110. package/out/game/gandengyan/index.txt +16 -16
  111. package/out/game/index.html +1 -1
  112. package/out/game/index.txt +13 -13
  113. package/out/game/zhajinhua/__next._full.txt +16 -15
  114. package/out/game/zhajinhua/__next._head.txt +3 -3
  115. package/out/game/zhajinhua/__next._index.txt +8 -8
  116. package/out/game/zhajinhua/__next._tree.txt +5 -4
  117. package/out/game/zhajinhua/__next.game.txt +4 -4
  118. package/out/game/zhajinhua/__next.game.zhajinhua.__PAGE__.txt +5 -4
  119. package/out/game/zhajinhua/__next.game.zhajinhua.txt +3 -3
  120. package/out/game/zhajinhua/index.html +3 -3
  121. package/out/game/zhajinhua/index.txt +16 -15
  122. package/out/index.html +3 -3
  123. package/out/index.txt +16 -16
  124. package/out/note/__next._full.txt +14 -14
  125. package/out/note/__next._head.txt +3 -3
  126. package/out/note/__next._index.txt +8 -8
  127. package/out/note/__next._tree.txt +3 -3
  128. package/out/note/__next.note.__PAGE__.txt +4 -4
  129. package/out/note/__next.note.txt +3 -3
  130. package/out/note/index.html +3 -3
  131. package/out/note/index.txt +14 -14
  132. package/out/ping/__next._full.txt +16 -16
  133. package/out/ping/__next._head.txt +3 -3
  134. package/out/ping/__next._index.txt +8 -8
  135. package/out/ping/__next._tree.txt +5 -5
  136. package/out/ping/__next.ping.__PAGE__.txt +5 -5
  137. package/out/ping/__next.ping.txt +4 -4
  138. package/out/ping/index.html +3 -3
  139. package/out/ping/index.txt +16 -16
  140. package/out/web3/__next._full.txt +15 -15
  141. package/out/web3/__next._head.txt +3 -3
  142. package/out/web3/__next._index.txt +8 -8
  143. package/out/web3/__next._tree.txt +4 -4
  144. package/out/web3/__next.web3.__PAGE__.txt +4 -4
  145. package/out/web3/__next.web3.txt +4 -4
  146. package/out/web3/ed25519/__next._full.txt +13 -13
  147. package/out/web3/ed25519/__next._head.txt +3 -3
  148. package/out/web3/ed25519/__next._index.txt +8 -8
  149. package/out/web3/ed25519/__next._tree.txt +4 -4
  150. package/out/web3/ed25519/__next.web3.ed25519.__PAGE__.txt +2 -2
  151. package/out/web3/ed25519/__next.web3.ed25519.txt +3 -3
  152. package/out/web3/ed25519/__next.web3.txt +4 -4
  153. package/out/web3/ed25519/index.html +1 -1
  154. package/out/web3/ed25519/index.txt +13 -13
  155. package/out/web3/index.html +3 -3
  156. package/out/web3/index.txt +15 -15
  157. package/out/web3/tools/__next._full.txt +13 -13
  158. package/out/web3/tools/__next._head.txt +3 -3
  159. package/out/web3/tools/__next._index.txt +8 -8
  160. package/out/web3/tools/__next._tree.txt +4 -4
  161. package/out/web3/tools/__next.web3.tools.__PAGE__.txt +2 -2
  162. package/out/web3/tools/__next.web3.tools.txt +3 -3
  163. package/out/web3/tools/__next.web3.txt +4 -4
  164. package/out/web3/tools/index.html +1 -1
  165. package/out/web3/tools/index.txt +13 -13
  166. package/package.json +23 -23
  167. package/server/src/core/gameRoom.js +12 -0
  168. package/server/src/core/mostLink.js +1 -1
  169. package/server/src/core/zhajinhua.js +82 -14
  170. package/server/src/games/gandengyan.js +79 -14
  171. package/server/src/http/app.js +25 -2
  172. package/server/src/http/nodeStatus.js +37 -0
  173. package/server/src/index.js +160 -25
  174. package/out/_next/static/chunks/0.4ov9319fecg.css +0 -1
  175. package/out/_next/static/chunks/0._8s6pbfw.xk.js +0 -1
  176. package/out/_next/static/chunks/06lttvu7563zo.css +0 -1
  177. package/out/_next/static/chunks/09h7l4i38xc7q.css +0 -24
  178. package/out/_next/static/chunks/09hqx79-jkvm_.css +0 -1
  179. package/out/_next/static/chunks/09vcm1ku9k7o8.js +0 -1
  180. package/out/_next/static/chunks/0c6e_d2jq179x.js +0 -1
  181. package/out/_next/static/chunks/0ccalho416.d7.js +0 -1
  182. package/out/_next/static/chunks/0exj_tg.ew-t3.js +0 -1
  183. package/out/_next/static/chunks/0f-wz5d~tv-r4.js +0 -1
  184. package/out/_next/static/chunks/0f0jhsujtf-61.js +0 -1
  185. package/out/_next/static/chunks/0h4r.qtmpa6eh.js +0 -1
  186. package/out/_next/static/chunks/0hyds~bp.auvh.js +0 -1
  187. package/out/_next/static/chunks/0iq1h7g4dudg8.js +0 -1
  188. package/out/_next/static/chunks/0knnzo9aih48r.js +0 -1
  189. package/out/_next/static/chunks/0nzyk~sg_tn._.js +0 -1
  190. package/out/_next/static/chunks/0o9ce4cyf76by.js +0 -736
  191. package/out/_next/static/chunks/0t_3xxx4zkerp.js +0 -5
  192. package/out/_next/static/chunks/0w~2fjq86t7c7.css +0 -1
  193. package/out/_next/static/chunks/0xdwau5k2augv.css +0 -4
  194. package/out/_next/static/chunks/0xrqerhosrp9~.js +0 -1
  195. package/out/_next/static/chunks/0xx_10jns1.s7.css +0 -1
  196. package/out/_next/static/chunks/14-fm9r_mom81.js +0 -1
  197. package/out/_next/static/chunks/14jhy~xia8lh8.js +0 -1
  198. /package/out/_next/static/chunks/{0bld2u_ld~va2.js → 0-jy8rfo075fy.js} +0 -0
  199. /package/out/_next/static/chunks/{0bliugh5lxw55.js → 0-kczrcxjk7lc.js} +0 -0
  200. /package/out/_next/static/chunks/{00d9h1tddnnnd.js → 012yllpioyi-k.js} +0 -0
  201. /package/out/_next/static/chunks/{00tkdqwxch-3s.js → 02f7w-ybfnvpd.js} +0 -0
  202. /package/out/_next/static/chunks/{01l3o90g~1z42.js → 04_v8i3c2y4ni.js} +0 -0
  203. /package/out/_next/static/chunks/{01xlw8hd842-c.js → 05-c3ty_6dwfk.js} +0 -0
  204. /package/out/_next/static/chunks/{01mfky9camw6i.js → 052vp9tk7oqx6.js} +0 -0
  205. /package/out/_next/static/chunks/{01r.v-pqs1vrm.js → 05k6874y7n0cw.js} +0 -0
  206. /package/out/_next/static/chunks/{02zzxfop_k6tl.css → 09g8c9-u_uh1z.css} +0 -0
  207. /package/out/_next/static/chunks/{03edqrb4zdj~g.js → 0az8vxg2gfuhm.js} +0 -0
  208. /package/out/_next/static/chunks/{03h_6oo-gqkhz.js → 0b899y85ei3i_.js} +0 -0
  209. /package/out/_next/static/chunks/{03~yq9q893hmn.js → 0cz1d0mv5g_q7.js} +0 -0
  210. /package/out/_next/static/chunks/{04hcgsanv1hhu.js → 0eg1osglq6nq7.js} +0 -0
  211. /package/out/_next/static/chunks/{05g2q0w5b34.g.js → 0hlvocunlbrjs.js} +0 -0
  212. /package/out/_next/static/chunks/{05of77xycbt8~.js → 0i9k23rx749fx.js} +0 -0
  213. /package/out/_next/static/chunks/{05zwemzfjx3sh.js → 0j6wiyqf1637r.js} +0 -0
  214. /package/out/_next/static/chunks/{06dpc5df94.v1.js → 0knzyzd1jvley.js} +0 -0
  215. /package/out/_next/static/chunks/{06e1~1-z_ic9a.js → 0kp8ujaqwut11.js} +0 -0
  216. /package/out/_next/static/chunks/{075s7sn.ns~u5.js → 0n92y9hb-ta0u.js} +0 -0
  217. /package/out/_next/static/chunks/{07dynrbvd3.f4.js → 0nybb-z3ufrbx.js} +0 -0
  218. /package/out/_next/static/chunks/{07r9nn-pzlgg1.js → 0o-o9af-grvj8.js} +0 -0
  219. /package/out/_next/static/chunks/{07p~uva5pwgwe.js → 0oxr0r0aewn99.js} +0 -0
  220. /package/out/_next/static/chunks/{08576xhv~~jck.js → 0qh3b90ouc9bd.js} +0 -0
  221. /package/out/_next/static/chunks/{08qqf0rsi3oot.js → 0s7i7nfr9j3b1.js} +0 -0
  222. /package/out/_next/static/chunks/{08u211~k~qu52.js → 0sh_jm8siqvek.js} +0 -0
  223. /package/out/_next/static/chunks/{08.72abkgwy9g.js → 0t86ducxkqweb.js} +0 -0
  224. /package/out/_next/static/chunks/{098.p.2-zm4p7.js → 0u0j5i6-n4oqd.js} +0 -0
  225. /package/out/_next/static/chunks/{09ngvtajm7e5y.js → 0v73vfxjds7sj.js} +0 -0
  226. /package/out/_next/static/chunks/{09ps~-43n5qyo.js → 0ve8ixremhwy0.js} +0 -0
  227. /package/out/_next/static/chunks/{09v7_0gclxr46.js → 0vv5cwj6kr506.js} +0 -0
  228. /package/out/_next/static/chunks/{09yql86dir9c4.js → 0w3wf8o-ewec9.js} +0 -0
  229. /package/out/_next/static/chunks/{09zmlfljowj1~.js → 0w6o4o76scrb2.js} +0 -0
  230. /package/out/_next/static/chunks/{0n4t80gjc3q5h.js → 1-88dio6azz54.js} +0 -0
  231. /package/out/_next/static/chunks/{0cn9a7aimbdzq.js → 12zg24u7mbv4z.js} +0 -0
  232. /package/out/_next/static/chunks/{0d3f-nk3c.2re.js → 14lsse587-ccf.js} +0 -0
  233. /package/out/_next/static/chunks/{0dtohpf7~3d12.js → 16qtikqm_sate.js} +0 -0
  234. /package/out/_next/static/chunks/{0e531nije_ln2.js → 17_ly1mk2z3q8.js} +0 -0
  235. /package/out/_next/static/chunks/{0e5zvj_rh0z3m.js → 181421-y2xzj7.js} +0 -0
  236. /package/out/_next/static/chunks/{0myp4sjagr~h0.js → 1_e-vuvfsntao.js} +0 -0
  237. /package/out/_next/static/chunks/{0e-3e8h7g99yf.js → 1aljc62wfhqhr.js} +0 -0
  238. /package/out/_next/static/chunks/{0f4y~rkk-n81e.js → 1b7mbzsylsn-m.js} +0 -0
  239. /package/out/_next/static/chunks/{0fk~0~p7ivfn1.js → 1cjakikh0o1tm.js} +0 -0
  240. /package/out/_next/static/chunks/{0fw6juc~lsj3z.js → 1dfzez629llzh.js} +0 -0
  241. /package/out/_next/static/chunks/{0g0u7785a73vo.js → 1e4ilit3ave6c.js} +0 -0
  242. /package/out/_next/static/chunks/{0gze5uso1mbe9.js → 1gzgcv355ziff.js} +0 -0
  243. /package/out/_next/static/chunks/{0g_fpgh7drfda.js → 1h0o6fj73le9_.js} +0 -0
  244. /package/out/_next/static/chunks/{0hf.aosc-7172.js → 1in766ibz5l-p.js} +0 -0
  245. /package/out/_next/static/chunks/{0hgz35c1ejbs9.js → 1ip_c70si4tj2.js} +0 -0
  246. /package/out/_next/static/chunks/{0hrw-r.xmvmsq.js → 1jlu197-yog_n.js} +0 -0
  247. /package/out/_next/static/chunks/{0hzg4al.v~8~m.js → 1k788fny29y_j.js} +0 -0
  248. /package/out/_next/static/chunks/{0ig8a4sazk3~2.css → 1lxjpnw925-0p.css} +0 -0
  249. /package/out/_next/static/chunks/{0ip9xrols_83o.js → 1mnhfyfn52md5.js} +0 -0
  250. /package/out/_next/static/chunks/{0j4-d0qf.v~kn.js → 1o8brm8yipzn4.js} +0 -0
  251. /package/out/_next/static/chunks/{0jhdeq.j9_02m.js → 1p8oa39bqu6ed.js} +0 -0
  252. /package/out/_next/static/chunks/{0jy63h3i-y69i.js → 1qmnmb_dutuw8.js} +0 -0
  253. /package/out/_next/static/chunks/{0kdnx_u-60k9s.js → 1s6rdcw0q185p.js} +0 -0
  254. /package/out/_next/static/chunks/{0kq~edq42o1-c.js → 1ta0w8zc7tae7.js} +0 -0
  255. /package/out/_next/static/chunks/{0l682p362d-5w.js → 1uvi_hie0s3z5.js} +0 -0
  256. /package/out/_next/static/chunks/{0m68p9txef5rs.js → 1y36s6sv2z7r4.js} +0 -0
  257. /package/out/_next/static/chunks/{0mme-fm5d2oz2.js → 1zf4i-oj7n-ll.js} +0 -0
  258. /package/out/_next/static/chunks/{0y.li-~3oybew.js → 2-vtwv8h_uokj.js} +0 -0
  259. /package/out/_next/static/chunks/{0n.qlfk~z7o.6.js → 2227enga_0c-6.js} +0 -0
  260. /package/out/_next/static/chunks/{0oz3yl6_-716p.js → 24zr4q96g-eii.js} +0 -0
  261. /package/out/_next/static/chunks/{0pqt~8bl3ukh4.js → 27jktro2p5rq9.js} +0 -0
  262. /package/out/_next/static/chunks/{0yl2t7cs-n_ng.js → 2_cqphhur0a6t.js} +0 -0
  263. /package/out/_next/static/chunks/{0yq3kh.hchtm_.js → 2_s88st3j0tql.js} +0 -0
  264. /package/out/_next/static/chunks/{0ys0l5au.9c2c.js → 2_y6edbaubqrt.js} +0 -0
  265. /package/out/_next/static/chunks/{0qqupeexg83u7.js → 2at8y3pbt5cue.js} +0 -0
  266. /package/out/_next/static/chunks/{0rb-ri481.kc9.js → 2cv1zex4has67.js} +0 -0
  267. /package/out/_next/static/chunks/{0rsnmahfd.59p.js → 2e6j5h4ftd4jd.js} +0 -0
  268. /package/out/_next/static/chunks/{0rt6rgnvr-s_p.js → 2e8b26r0td7ou.js} +0 -0
  269. /package/out/_next/static/chunks/{0runh28p_gg6..js → 2ecppdrjm9cs4.js} +0 -0
  270. /package/out/_next/static/chunks/{0shy.t1fwqcev.js → 2gl0wusc9zf3d.js} +0 -0
  271. /package/out/_next/static/chunks/{0t2xr05rlu96l.js → 2im7c515bo69p.js} +0 -0
  272. /package/out/_next/static/chunks/{0t6h56rhg1y5i.js → 2ixaku9ie8hym.js} +0 -0
  273. /package/out/_next/static/chunks/{0tdqd1zunusgk.js → 2jhnrjgj_k2-z.js} +0 -0
  274. /package/out/_next/static/chunks/{0ujbnp38x63ek.js → 2n6pb94vmohgf.js} +0 -0
  275. /package/out/_next/static/chunks/{0ukyg~tkm~h2m.css → 2nbju8t9-ux58.css} +0 -0
  276. /package/out/_next/static/chunks/{0v68pdrp54lb-.js → 2pdxw43rsbho0.js} +0 -0
  277. /package/out/_next/static/chunks/{0vsm0m5sxrb.3.js → 2r6z3vlfw0ppd.js} +0 -0
  278. /package/out/_next/static/chunks/{0vzlz.iboqo3c.js → 2rskzmv3skmq3.js} +0 -0
  279. /package/out/_next/static/chunks/{0w87vbpkf-ogd.js → 2stoe6xiau1b3.js} +0 -0
  280. /package/out/_next/static/chunks/{0xgg0~kmf3gd-.js → 2wqoc60afpg_5.js} +0 -0
  281. /package/out/_next/static/chunks/{0xj24-70ptdzp.js → 2wyvwsayrr98o.js} +0 -0
  282. /package/out/_next/static/chunks/{0xxlx772fr3x4.js → 2y3o2mnyfnx68.js} +0 -0
  283. /package/out/_next/static/chunks/{16i.qbk8t8gf_.js → 3-7y7sjol3yto.js} +0 -0
  284. /package/out/_next/static/chunks/{0z48pmi6buytt.js → 3089gugfv3ov9.js} +0 -0
  285. /package/out/_next/static/chunks/{0zapnvgy89mg..js → 30s3_0brd77ky.js} +0 -0
  286. /package/out/_next/static/chunks/{0_s~ebb-7b2hr.js → 35idql3ziq0wz.js} +0 -0
  287. /package/out/_next/static/chunks/{0_w-0-2z5oqd_.js → 35unmm4isvqg5.js} +0 -0
  288. /package/out/_next/static/chunks/{0-n3pg7th.zza.js → 389wmv2b6x2nn.js} +0 -0
  289. /package/out/_next/static/chunks/{0~4f5p6tvn1lq.js → 39-oy5n969lo6.js} +0 -0
  290. /package/out/_next/static/chunks/{0~3ik-hfp9s-7.js → 39yvee40syj70.js} +0 -0
  291. /package/out/_next/static/chunks/{0~_0ys.2whxbw.js → 3clhij8e1eul0.js} +0 -0
  292. /package/out/_next/static/chunks/{0~_ui9l7.2sxf.js → 3cnsdzbvm3q7p.js} +0 -0
  293. /package/out/_next/static/chunks/{0~.-vxi5oc.r0.js → 3cxmalqqghdac.js} +0 -0
  294. /package/out/_next/static/chunks/{0.4j.0k5a64vg.js → 3d9p88evh2scq.js} +0 -0
  295. /package/out/_next/static/chunks/{0.ozi1_x2.m.~.js → 3eyprczj7yrg6.js} +0 -0
  296. /package/out/_next/static/chunks/{0.t5wlt51zou5.js → 3f9v_gtppe4hs.js} +0 -0
  297. /package/out/_next/static/chunks/{0.w4hkvap~bva.js → 3fj0amtzqae6f.js} +0 -0
  298. /package/out/_next/static/chunks/{1037jlyw5~7ht.js → 3gf98e08a-l_e.js} +0 -0
  299. /package/out/_next/static/chunks/{1045hfzu533z0.js → 3gi6og9m_yaak.js} +0 -0
  300. /package/out/_next/static/chunks/{104e5nmc.c-pl.js → 3giw7r1lii84y.js} +0 -0
  301. /package/out/_next/static/chunks/{109taw1pbh-0b.js → 3gzhy1cs_f2oi.js} +0 -0
  302. /package/out/_next/static/chunks/{10ynz1dy483wf.js → 3i_ceknny1oqt.js} +0 -0
  303. /package/out/_next/static/chunks/{10x7~onqwp338.js → 3iw0815ssih3b.js} +0 -0
  304. /package/out/_next/static/chunks/{11hds.mg~4_r-.js → 3kun-vwr7nzd4.js} +0 -0
  305. /package/out/_next/static/chunks/{11ibzaklcauw~.js → 3kxm1e-b1er3_.js} +0 -0
  306. /package/out/_next/static/chunks/{11z.0s6.42b.p.js → 3mc8fynmv71yg.js} +0 -0
  307. /package/out/_next/static/chunks/{126enaq~f7scl.js → 3n6cor2n9zyn7.js} +0 -0
  308. /package/out/_next/static/chunks/{12pep-2t-qg4n.css → 3or2h8swxfxyj.css} +0 -0
  309. /package/out/_next/static/chunks/{12-9n56l0y3yr.js → 3ppt04b6xqz29.js} +0 -0
  310. /package/out/_next/static/chunks/{1380op_pfk.qo.js → 3ql2pi_m5_5p_.js} +0 -0
  311. /package/out/_next/static/chunks/{14a4fwbiq.l3z.js → 3t-6u8caafiu9.js} +0 -0
  312. /package/out/_next/static/chunks/{146oiw1bggtn4.js → 3tqdzb_n12tdm.js} +0 -0
  313. /package/out/_next/static/chunks/{14cowsqn95m1k.js → 3u6zpg943kpst.js} +0 -0
  314. /package/out/_next/static/chunks/{14dtd3l03v.kx.js → 3uaedu2hf291z.js} +0 -0
  315. /package/out/_next/static/chunks/{14tm3qa-v9o-4.js → 3vladx3wh0d4k.js} +0 -0
  316. /package/out/_next/static/chunks/{14_inksek_rth.js → 3w4o9hklow6fg.js} +0 -0
  317. /package/out/_next/static/chunks/{14_po2rb_arn4.js → 3w56w25z6u89b.js} +0 -0
  318. /package/out/_next/static/chunks/{157z7bowux3xj.js → 3x1y_gkazt6kx.js} +0 -0
  319. /package/out/_next/static/chunks/{15m1_677az2cm.js → 3y7r1h96dtcov.js} +0 -0
  320. /package/out/_next/static/chunks/{15v.~.ne6ogkk.js → 3z0hydntmwg19.js} +0 -0
  321. /package/out/_next/static/chunks/{15-o4kb-evqd7.js → 3zhu1svjr0bc5.js} +0 -0
  322. /package/out/_next/static/chunks/{16u9f35gylw8l.js → 404orp1erq__7.js} +0 -0
  323. /package/out/_next/static/chunks/{17ajyb5ogk5yj.js → 41talcs-dc2tc.js} +0 -0
  324. /package/out/_next/static/chunks/{17dyfxbq8yz8n.js → 421pn8weymo-b.js} +0 -0
  325. /package/out/_next/static/chunks/{180zln9pcq9ih.js → 44987pmr20now.js} +0 -0
  326. /package/out/_next/static/chunks/{1814izi5gh.kp.js → 449ygeh62gitc.js} +0 -0
  327. /package/out/_next/static/{2smv1H9Y4Z2Ri-SL-UFgR → eXddCOt9eyz0j78b1m4Ex}/_buildManifest.js +0 -0
  328. /package/out/_next/static/{2smv1H9Y4Z2Ri-SL-UFgR → eXddCOt9eyz0j78b1m4Ex}/_clientMiddlewareManifest.js +0 -0
  329. /package/out/_next/static/{2smv1H9Y4Z2Ri-SL-UFgR → eXddCOt9eyz0j78b1m4Ex}/_ssgManifest.js +0 -0
  330. /package/out/_next/static/media/{KaTeX_AMS-Regular.0b~8ki5y928w2.woff → KaTeX_AMS-Regular.10y3kupq4t663.woff} +0 -0
  331. /package/out/_next/static/media/{KaTeX_AMS-Regular.0p1vbqd84i2~o.woff2 → KaTeX_AMS-Regular.25ieegmnh38ts.woff2} +0 -0
  332. /package/out/_next/static/media/{KaTeX_AMS-Regular.173t6ktr7uf-w.ttf → KaTeX_AMS-Regular.418dr7cz3fo2x.ttf} +0 -0
  333. /package/out/_next/static/media/{KaTeX_Caligraphic-Bold.01-pzluls4zgb.woff2 → KaTeX_Caligraphic-Bold.06b-ya9t43ioz.woff2} +0 -0
  334. /package/out/_next/static/media/{KaTeX_Caligraphic-Bold.0x2v1lwn~880f.woff → KaTeX_Caligraphic-Bold.2vmk2hva4ctha.woff} +0 -0
  335. /package/out/_next/static/media/{KaTeX_Caligraphic-Bold.16zv5fax0h0ka.ttf → KaTeX_Caligraphic-Bold.40ltxhe834pns.ttf} +0 -0
  336. /package/out/_next/static/media/{KaTeX_Caligraphic-Regular.02i3z7wig438t.ttf → KaTeX_Caligraphic-Regular.07-7u27-nhn_r.ttf} +0 -0
  337. /package/out/_next/static/media/{KaTeX_Caligraphic-Regular.0rysu1t-ncjq8.woff2 → KaTeX_Caligraphic-Regular.2eph4dlhid_m9.woff2} +0 -0
  338. /package/out/_next/static/media/{KaTeX_Caligraphic-Regular.10927swgekwun.woff → KaTeX_Caligraphic-Regular.3gxeetazf831f.woff} +0 -0
  339. /package/out/_next/static/media/{KaTeX_Fraktur-Bold.0et27v~3~4uhe.ttf → KaTeX_Fraktur-Bold.19yqa_tc9d_gx.ttf} +0 -0
  340. /package/out/_next/static/media/{KaTeX_Fraktur-Bold.0e-16u10iuyyf.woff → KaTeX_Fraktur-Bold.1alcy76__wdj2.woff} +0 -0
  341. /package/out/_next/static/media/{KaTeX_Fraktur-Bold.0w23i72~hprpq.woff2 → KaTeX_Fraktur-Bold.2sasz-d-jtw8y.woff2} +0 -0
  342. /package/out/_next/static/media/{KaTeX_Fraktur-Regular.0b.riegzdfue2.woff → KaTeX_Fraktur-Regular.110oo81prr9n5.woff} +0 -0
  343. /package/out/_next/static/media/{KaTeX_Fraktur-Regular.0rekyoa-52fj_.woff2 → KaTeX_Fraktur-Regular.2d10y4xmjvzlf.woff2} +0 -0
  344. /package/out/_next/static/media/{KaTeX_Fraktur-Regular.0vjwa15znhk~4.ttf → KaTeX_Fraktur-Regular.2qhy34r6a05dn.ttf} +0 -0
  345. /package/out/_next/static/media/{KaTeX_Main-Bold.09i7~607shf-h.ttf → KaTeX_Main-Bold.0us_n0tnxlxu7.ttf} +0 -0
  346. /package/out/_next/static/media/{KaTeX_Main-Bold.09lmynrorhcbw.woff → KaTeX_Main-Bold.0v1esh257kqpe.woff} +0 -0
  347. /package/out/_next/static/media/{KaTeX_Main-Bold.16pfc63_du6mx.woff2 → KaTeX_Main-Bold.3-rowy8o6_4ky.woff2} +0 -0
  348. /package/out/_next/static/media/{KaTeX_Main-BoldItalic.0cp37g7x1q8h6.woff → KaTeX_Main-BoldItalic.13355ck5zr48q.woff} +0 -0
  349. /package/out/_next/static/media/{KaTeX_Main-BoldItalic.0d54rk08rx11s.woff2 → KaTeX_Main-BoldItalic.14r2naom8mrec.woff2} +0 -0
  350. /package/out/_next/static/media/{KaTeX_Main-BoldItalic.15j6k~hix2t_0.ttf → KaTeX_Main-BoldItalic.3x_u9cepaced0.ttf} +0 -0
  351. /package/out/_next/static/media/{KaTeX_Main-Italic.0382gqciexmbu.woff → KaTeX_Main-Italic.0afv392dj4w59.woff} +0 -0
  352. /package/out/_next/static/media/{KaTeX_Main-Italic.06o5nq0_91v60.woff2 → KaTeX_Main-Italic.0lig0v9j0700p.woff2} +0 -0
  353. /package/out/_next/static/media/{KaTeX_Main-Italic.0su4i6mm18-wo.ttf → KaTeX_Main-Italic.2hkw3230mfwcv.ttf} +0 -0
  354. /package/out/_next/static/media/{KaTeX_Main-Regular.08zh8z.7shijf.ttf → KaTeX_Main-Regular.0symfa7dqj6jd.ttf} +0 -0
  355. /package/out/_next/static/media/{KaTeX_Main-Regular.0diheg01zyoph.woff → KaTeX_Main-Regular.15u8r3b2y7fv4.woff} +0 -0
  356. /package/out/_next/static/media/{KaTeX_Main-Regular.0kaf-ag2_wkm-.woff2 → KaTeX_Main-Regular.1ryvsdzh2w1_e.woff2} +0 -0
  357. /package/out/_next/static/media/{KaTeX_Math-BoldItalic.0ajzxypnbx1h1.ttf → KaTeX_Math-BoldItalic.0y5w36a5aq__2.ttf} +0 -0
  358. /package/out/_next/static/media/{KaTeX_Math-BoldItalic.0ck1myuerwyqw.woff → KaTeX_Math-BoldItalic.12pl58orkw9rg.woff} +0 -0
  359. /package/out/_next/static/media/{KaTeX_Math-BoldItalic.0ja97dn.cpc87.woff2 → KaTeX_Math-BoldItalic.1oopuu636h4il.woff2} +0 -0
  360. /package/out/_next/static/media/{KaTeX_Math-Italic.09xkhecjcn5r9.woff → KaTeX_Math-Italic.0w0b1ugh62cfr.woff} +0 -0
  361. /package/out/_next/static/media/{KaTeX_Math-Italic.0x23a-bmp-5tg.ttf → KaTeX_Math-Italic.2vkekfblmz5nb.ttf} +0 -0
  362. /package/out/_next/static/media/{KaTeX_Math-Italic.0zrha2c4sl2je.woff2 → KaTeX_Math-Italic.32405s1aq8vas.woff2} +0 -0
  363. /package/out/_next/static/media/{KaTeX_SansSerif-Bold.05a9.pc1j_zx9.woff2 → KaTeX_SansSerif-Bold.0h3wi2z_eouyg.woff2} +0 -0
  364. /package/out/_next/static/media/{KaTeX_SansSerif-Bold.0jcl-ayi1uun0.woff → KaTeX_SansSerif-Bold.1ovw5p-yjp56g.woff} +0 -0
  365. /package/out/_next/static/media/{KaTeX_SansSerif-Bold.0re8y.dm7.mt5.ttf → KaTeX_SansSerif-Bold.2d03q85pwxpti.ttf} +0 -0
  366. /package/out/_next/static/media/{KaTeX_SansSerif-Italic.0a0234dc3s62j.woff2 → KaTeX_SansSerif-Italic.0wkjc4dm2kcit.woff2} +0 -0
  367. /package/out/_next/static/media/{KaTeX_SansSerif-Italic.0judofdln9731.woff → KaTeX_SansSerif-Italic.1qavw__2zz8gk.woff} +0 -0
  368. /package/out/_next/static/media/{KaTeX_SansSerif-Italic.10z1iap9pfus8.ttf → KaTeX_SansSerif-Italic.3i-q087b23-m8.ttf} +0 -0
  369. /package/out/_next/static/media/{KaTeX_SansSerif-Regular.0h9yjlugq4q_e.woff → KaTeX_SansSerif-Regular.1i4afx8nk8n4r.woff} +0 -0
  370. /package/out/_next/static/media/{KaTeX_SansSerif-Regular.0v6gcj32-czft.woff2 → KaTeX_SansSerif-Regular.2peiewu59z3d-.woff2} +0 -0
  371. /package/out/_next/static/media/{KaTeX_SansSerif-Regular.0zm18kga42ebc.ttf → KaTeX_SansSerif-Regular.31pbu25feko_c.ttf} +0 -0
  372. /package/out/_next/static/media/{KaTeX_Script-Regular.0c4.h-mer83d_.woff2 → KaTeX_Script-Regular.11h14300o9pd0.woff2} +0 -0
  373. /package/out/_next/static/media/{KaTeX_Script-Regular.0q14y6zkzlpob.ttf → KaTeX_Script-Regular.28p_x7iz71ofe.ttf} +0 -0
  374. /package/out/_next/static/media/{KaTeX_Script-Regular.0ze6v4r_-99oy.woff → KaTeX_Script-Regular.3110jb9c-bxna.woff} +0 -0
  375. /package/out/_next/static/media/{KaTeX_Size1-Regular.013x6a4ierotp.woff2 → KaTeX_Size1-Regular.03lhvx36ekcou.woff2} +0 -0
  376. /package/out/_next/static/media/{KaTeX_Size1-Regular.0kidw0oi.m68o.woff → KaTeX_Size1-Regular.1slf4bh0hc6vm.woff} +0 -0
  377. /package/out/_next/static/media/{KaTeX_Size1-Regular.0m6y-i6wfokni.ttf → KaTeX_Size1-Regular.1y57-ck23ey8c.ttf} +0 -0
  378. /package/out/_next/static/media/{KaTeX_Size2-Regular.0blpmluwilgbg.woff → KaTeX_Size2-Regular.0-kwyvx03omo8.woff} +0 -0
  379. /package/out/_next/static/media/{KaTeX_Size2-Regular.0d5inmyp-tyv3.woff2 → KaTeX_Size2-Regular.14s5gg-puz6h-.woff2} +0 -0
  380. /package/out/_next/static/media/{KaTeX_Size2-Regular.0wnhnvj-.k9d5.ttf → KaTeX_Size2-Regular.2u0s-b07k2o9m.ttf} +0 -0
  381. /package/out/_next/static/media/{KaTeX_Size3-Regular.01h0xm_sfctj3.woff → KaTeX_Size3-Regular.04o9a_02gu_e8.woff} +0 -0
  382. /package/out/_next/static/media/{KaTeX_Size3-Regular.0iukctyhw5j56.woff2 → KaTeX_Size3-Regular.1n1rgzz84z8r9.woff2} +0 -0
  383. /package/out/_next/static/media/{KaTeX_Size3-Regular.0jl8mqyf4gzpn.ttf → KaTeX_Size3-Regular.1pkn-dge4q0fv.ttf} +0 -0
  384. /package/out/_next/static/media/{KaTeX_Size4-Regular.0w3.rb_c4stzk.woff2 → KaTeX_Size4-Regular.2sgotkdv3dcyv.woff2} +0 -0
  385. /package/out/_next/static/media/{KaTeX_Size4-Regular.0wr_9l81-mu06.ttf → KaTeX_Size4-Regular.2uelkfk2yna5e.ttf} +0 -0
  386. /package/out/_next/static/media/{KaTeX_Size4-Regular.12tvaesf3.zl3.woff → KaTeX_Size4-Regular.3p2r1l7xmebxv.woff} +0 -0
  387. /package/out/_next/static/media/{KaTeX_Typewriter-Regular.0c4zdxz~8frhm.woff2 → KaTeX_Typewriter-Regular.11gr2d2wuwz77.woff2} +0 -0
  388. /package/out/_next/static/media/{KaTeX_Typewriter-Regular.0cgrzn5l3kao5.woff → KaTeX_Typewriter-Regular.12f8myjij3617.woff} +0 -0
  389. /package/out/_next/static/media/{KaTeX_Typewriter-Regular.128~qc3858otl.ttf → KaTeX_Typewriter-Regular.3nee9kjfy6nm8.ttf} +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return d}};for(var n in r)Object.defineProperty(a,n,{enumerable:!0,get:r[n]});let s=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:a}=e,r=e.protocol||"",n=e.pathname||"",l=e.hash||"",d=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:a&&(c=t+(~a.indexOf(":")?`[${a}]`:a),e.port&&(c+=":"+e.port)),d&&"object"==typeof d&&(d=String(s.urlQueryToSearchParams(d)));let o=e.search||d&&`?${d}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||i.test(r))&&!1!==c?(c="//"+(c||""),n&&"/"!==n[0]&&(n="/"+n)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),o&&"?"!==o[0]&&(o="?"+o),n=n.replace(/[?#]/g,encodeURIComponent),o=o.replace("#","%23"),`${r}${c}${n}${o}${l}`}let d=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},18581,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useMergedRef",{enumerable:!0,get:function(){return n}});let r=e.r(71645);function n(e,t){let a=(0,r.useRef)(null),n=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=a.current;e&&(a.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(a.current=s(e,r)),t&&(n.current=s(t,r))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let a=e(t);return"function"==typeof a?a:()=>e(null)}}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},73668,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"isLocalURL",{enumerable:!0,get:function(){return s}});let r=e.r(18967),n=e.r(52817);function s(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),a=new URL(e,t);return a.origin===t&&(0,n.hasBasePath)(a.pathname)}catch(e){return!1}}},84508,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},22016,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r={default:function(){return v},useLinkStatus:function(){return x}};for(var n in r)Object.defineProperty(a,n,{enumerable:!0,get:r[n]});let s=e.r(90809),i=e.r(18050),l=s._(e.r(71645)),d=e.r(95057),c=e.r(8372),o=e.r(18581),u=e.r(18967),h=e.r(5550);e.r(33525);let f=e.r(88540),p=e.r(91949),m=e.r(73668),y=e.r(9396);function v(t){var a,r;let n,s,v,[x,g]=(0,l.useOptimistic)(p.IDLE_LINK_STATUS),b=(0,l.useRef)(null),{href:M,as:$,children:w,prefetch:S=null,passHref:k,replace:_,shallow:N,scroll:D,onClick:C,onMouseEnter:O,onTouchStart:z,legacyBehavior:T=!1,onNavigate:L,transitionTypes:Y,ref:A,unstable_dynamicOnHover:B,...P}=t;n=w,T&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let H=l.default.useContext(c.AppRouterContext),I=!1!==S,E=!1!==S?null===(r=S)||"auto"===r?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,F="string"==typeof(a=$||M)?a:(0,d.formatUrl)(a);if(T){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=l.default.Children.only(n)}let U=T?s&&"object"==typeof s&&s.ref:A,R=l.default.useCallback(e=>(null!==H&&(b.current=(0,p.mountLinkInstance)(e,F,H,E,I,g)),()=>{b.current&&((0,p.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,p.unmountPrefetchableInstance)(e)}),[I,F,H,E,g]),V={ref:(0,o.useMergedRef)(R,U),onClick(t){T||"function"!=typeof C||C(t),T&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!H||t.defaultPrevented||function(t,a,r,n,s,i,d){if("u">typeof window){let c,{nodeName:o}=t.currentTarget;if("A"===o.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(a)){n&&(t.preventDefault(),location.replace(a));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(99781);l.default.startTransition(()=>{u(a,n?"replace":"push",!1===s?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,r.current,d)})}}(t,F,b,_,D,L,Y)},onMouseEnter(e){T||"function"!=typeof O||O(e),T&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),H&&I&&(0,p.onNavigationIntent)(e.currentTarget,!0===B)},onTouchStart:function(e){T||"function"!=typeof z||z(e),T&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),H&&I&&(0,p.onNavigationIntent)(e.currentTarget,!0===B)}};return(0,u.isAbsoluteUrl)(F)?V.href=F:T&&!k&&("a"!==s.type||"href"in s.props)||(V.href=(0,h.addBasePath)(F)),v=T?l.default.cloneElement(s,V):(0,i.jsx)("a",{...P,...V,children:n}),(0,i.jsx)(j.Provider,{value:x,children:v})}e.r(84508);let j=(0,l.createContext)(p.IDLE_LINK_STATUS),x=()=>(0,l.useContext)(j);("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},66627,e=>{"use strict";let t=(0,e.i(56420).default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);e.s(["Wifi",0,t],66627)},50285,e=>{"use strict";let t=(0,e.i(56420).default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);e.s(["HardDrive",0,t],50285)},22315,(e,t,a)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",a="minute",r="hour",n="week",s="month",i="quarter",l="year",d="date",c="Invalid Date",o=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=function(e,t,a){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(a)+e},f="en",p={};p[f]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],a=e%100;return"["+e+(t[(a-20)%10]||t[a]||t[0])+"]"}};var m="$isDayjsObject",y=function(e){return e instanceof g||!(!e||!e[m])},v=function e(t,a,r){var n;if(!t)return f;if("string"==typeof t){var s=t.toLowerCase();p[s]&&(n=s),a&&(p[s]=a,n=s);var i=t.split("-");if(!n&&i.length>1)return e(i[0])}else{var l=t.name;p[l]=t,n=l}return!r&&n&&(f=n),n||!r&&f},j=function(e,t){if(y(e))return e.clone();var a="object"==typeof t?t:{};return a.date=e,a.args=arguments,new g(a)},x={s:h,z:function(e){var t=-e.utcOffset(),a=Math.abs(t);return(t<=0?"+":"-")+h(Math.floor(a/60),2,"0")+":"+h(a%60,2,"0")},m:function e(t,a){if(t.date()<a.date())return-e(a,t);var r=12*(a.year()-t.year())+(a.month()-t.month()),n=t.clone().add(r,s),i=a-n<0,l=t.clone().add(r+(i?-1:1),s);return+(-(r+(a-n)/(i?n-l:l-n))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(c){return({M:s,y:l,w:n,d:"day",D:d,h:r,m:a,s:t,ms:e,Q:i})[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};x.l=v,x.i=y,x.w=function(e,t){return j(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var g=function(){function h(e){this.$L=v(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[m]=!0}var f=h.prototype;return f.parse=function(e){this.$d=function(e){var t=e.date,a=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(o);if(r){var n=r[2]-1||0,s=(r[7]||"0").substring(0,3);return a?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(t)}(e),this.init()},f.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},f.$utils=function(){return x},f.isValid=function(){return this.$d.toString()!==c},f.isSame=function(e,t){var a=j(e);return this.startOf(t)<=a&&a<=this.endOf(t)},f.isAfter=function(e,t){return j(e)<this.startOf(t)},f.isBefore=function(e,t){return this.endOf(t)<j(e)},f.$g=function(e,t,a){return x.u(e)?this[t]:this.set(a,e)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(e,i){var c=this,o=!!x.u(i)||i,u=x.p(e),h=function(e,t){var a=x.w(c.$u?Date.UTC(c.$y,t,e):new Date(c.$y,t,e),c);return o?a:a.endOf("day")},f=function(e,t){return x.w(c.toDate()[e].apply(c.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(t)),c)},p=this.$W,m=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(u){case l:return o?h(1,0):h(31,11);case s:return o?h(1,m):h(0,m+1);case n:var j=this.$locale().weekStart||0,g=(p<j?p+7:p)-j;return h(o?y-g:y+(6-g),m);case"day":case d:return f(v+"Hours",0);case r:return f(v+"Minutes",1);case a:return f(v+"Seconds",2);case t:return f(v+"Milliseconds",3);default:return this.clone()}},f.endOf=function(e){return this.startOf(e,!1)},f.$set=function(n,i){var c,o=x.p(n),u="set"+(this.$u?"UTC":""),h=((c={}).day=u+"Date",c[d]=u+"Date",c[s]=u+"Month",c[l]=u+"FullYear",c[r]=u+"Hours",c[a]=u+"Minutes",c[t]=u+"Seconds",c[e]=u+"Milliseconds",c)[o],f="day"===o?this.$D+(i-this.$W):i;if(o===s||o===l){var p=this.clone().set(d,1);p.$d[h](f),p.init(),this.$d=p.set(d,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](f);return this.init(),this},f.set=function(e,t){return this.clone().$set(e,t)},f.get=function(e){return this[x.p(e)]()},f.add=function(e,i){var d,c=this;e=Number(e);var o=x.p(i),u=function(t){var a=j(c);return x.w(a.date(a.date()+Math.round(t*e)),c)};if(o===s)return this.set(s,this.$M+e);if(o===l)return this.set(l,this.$y+e);if("day"===o)return u(1);if(o===n)return u(7);var h=((d={})[a]=6e4,d[r]=36e5,d[t]=1e3,d)[o]||1,f=this.$d.getTime()+e*h;return x.w(f,this)},f.subtract=function(e,t){return this.add(-1*e,t)},f.format=function(e){var t=this,a=this.$locale();if(!this.isValid())return a.invalidDate||c;var r=e||"YYYY-MM-DDTHH:mm:ssZ",n=x.z(this),s=this.$H,i=this.$m,l=this.$M,d=a.weekdays,o=a.months,h=a.meridiem,f=function(e,a,n,s){return e&&(e[a]||e(t,r))||n[a].slice(0,s)},p=function(e){return x.s(s%12||12,e,"0")},m=h||function(e,t,a){var r=e<12?"AM":"PM";return a?r.toLowerCase():r};return r.replace(u,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return x.s(t.$y,4,"0");case"M":return l+1;case"MM":return x.s(l+1,2,"0");case"MMM":return f(a.monthsShort,l,o,3);case"MMMM":return f(o,l);case"D":return t.$D;case"DD":return x.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(a.weekdaysMin,t.$W,d,2);case"ddd":return f(a.weekdaysShort,t.$W,d,3);case"dddd":return d[t.$W];case"H":return String(s);case"HH":return x.s(s,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return m(s,i,!0);case"A":return m(s,i,!1);case"m":return String(i);case"mm":return x.s(i,2,"0");case"s":return String(t.$s);case"ss":return x.s(t.$s,2,"0");case"SSS":return x.s(t.$ms,3,"0");case"Z":return n}return null}(e)||n.replace(":","")})},f.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},f.diff=function(e,d,c){var o,u=this,h=x.p(d),f=j(e),p=(f.utcOffset()-this.utcOffset())*6e4,m=this-f,y=function(){return x.m(u,f)};switch(h){case l:o=y()/12;break;case s:o=y();break;case i:o=y()/3;break;case n:o=(m-p)/6048e5;break;case"day":o=(m-p)/864e5;break;case r:o=m/36e5;break;case a:o=m/6e4;break;case t:o=m/1e3;break;default:o=m}return c?o:x.a(o)},f.daysInMonth=function(){return this.endOf(s).$D},f.$locale=function(){return p[this.$L]},f.locale=function(e,t){if(!e)return this.$L;var a=this.clone(),r=v(e,t,!0);return r&&(a.$L=r),a},f.clone=function(){return x.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},h}(),b=g.prototype;return j.prototype=b,[["$ms",e],["$s",t],["$m",a],["$H",r],["$W","day"],["$M",s],["$y",l],["$D",d]].forEach(function(e){b[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),j.extend=function(e,t){return e.$i||(e(t,g,j),e.$i=!0),j},j.locale=v,j.isDayjs=y,j.unix=function(e){return j(1e3*e)},j.en=p[f],j.Ls=p,j.p={},j}()},11241,e=>{"use strict";let t=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],11241)},62368,e=>{"use strict";let t=(0,e.i(56420).default)("download",[["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"}]]);e.s(["Download",0,t],62368)},26091,e=>{"use strict";let t=(0,e.i(56420).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],26091)},73474,e=>{"use strict";let t=(0,e.i(56420).default)("trash-2",[["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"}]]);e.s(["Trash2",0,t],73474)},53138,51757,e=>{"use strict";var t=e.i(56420);let a=(0,t.default)("triangle-alert",[["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"}]]);e.s(["AlertTriangle",0,a],53138);let r=(0,t.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,r],51757)},56522,e=>{"use strict";let t=(0,e.i(56420).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",0,t],56522)},72856,(e,t,a)=>{e.e,t.exports=function(e,t,a){e=e||{};var r=t.prototype,n={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function s(e,t,a,n){return r.fromToBase(e,t,a,n)}a.en.relativeTime=n,r.fromToBase=function(t,r,s,i,l){for(var d,c,o,u=s.$locale().relativeTime||n,h=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],f=h.length,p=0;p<f;p+=1){var m=h[p];m.d&&(d=i?a(t).diff(s,m.d,!0):s.diff(t,m.d,!0));var y=(e.rounding||Math.round)(Math.abs(d));if(o=d>0,y<=m.r||!m.r){y<=1&&p>0&&(m=h[p-1]);var v=u[m.l];l&&(y=l(""+y)),c="string"==typeof v?v.replace("%d",y):v(y,r,m.l,o);break}}if(r)return c;var j=o?u.future:u.past;return"function"==typeof j?j(c):j.replace("%s",c)},r.to=function(e,t){return s(e,t,this,!0)},r.from=function(e,t){return s(e,t,this)};var i=function(e){return e.$u?a.utc():a()};r.toNow=function(e){return this.to(i(this),e)},r.fromNow=function(e){return this.from(i(this),e)}}},56331,(e,t,a)=>{e.e,t.exports=function(e){"use strict";var t={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,t){return"W"===t?e+"周":e+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,t){var a=100*e+t;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return(e&&"object"==typeof e&&"default"in e?e:{default:e}).default.locale(t,null,!0),t}(e.r(22315))},23261,e=>{"use strict";var t=e.i(18050),a=e.i(71645),r=e.i(22016),n=e.i(22315),s=e.i(72856);e.i(56331);var i=e.i(56420);let l=(0,i.default)("activity",[["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"}]]);var d=e.i(53138),c=e.i(11241),o=e.i(51757);let u=(0,i.default)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]),h=(0,i.default)("database",[["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"}]]);var f=e.i(62368),p=e.i(26091),m=e.i(50285);let y=(0,i.default)("refresh-cw",[["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"}]]);var v=e.i(56522),j=e.i(41220);let x=(0,i.default)("shield-check",[["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"}]]);var g=e.i(73474),b=e.i(66627),M=e.i(26913),$=e.i(3593);function w(e){return!Number.isFinite(e)||e<=0?"0 B":e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:e<0x40000000?`${(e/1048576).toFixed(1)} MB`:`${(e/0x40000000).toFixed(2)} GB`}function S(e){return Number.isFinite(e)?String(Math.round(e/0x40000000*100)/100):"0"}function k(e){let t=Number(e);return!Number.isFinite(t)||t<0?0:Math.round(1024*t*1048576)}function _(e,t=12,a=8){return e?e.length<=t+a+3?e:`${e.slice(0,t)}...${e.slice(-a)}`:"-"}n.default.extend(s.default),n.default.locale("zh-cn");let N=[{label:"做种中",tone:"active",desc:"已加入 CID topic,可被其他节点发现并提供完整副本。"},{label:"队列中 / 加入中",tone:"pending",desc:"正在等待或重连 topic,通常会自动进入做种中。"},{label:"已暂停 / 未 join",tone:"muted",desc:"本机仍持有文件,但当前不会对外提供下载。"},{label:"错误",tone:"error",desc:"加入或做种失败,请查看下方节点日志里的 seed 事件。"}],D=[{value:"all",label:"全部"},{value:"join",label:"Join"},{value:"pull",label:"Pull"},{value:"verify",label:"Verify"},{value:"serve",label:"Serve"},{value:"error",label:"Error"}],C={join:["join","joined","topic"],pull:["pull","p2p"],verify:["verify","verified","integrity","download:success"],serve:["seed","seeding","holding","publish:success","topic:joined"],error:["error","failed","fail"]};e.s(["default",0,function(){let e,s,i,O,z=(0,$.useAppStore)(e=>e.hasBackend),T=(0,$.useAppStore)(e=>e.addToast),[L,Y]=(0,a.useState)(null),[A,B]=(0,a.useState)([]),[P,H]=(0,a.useState)(""),[I,E]=(0,a.useState)(!1),[F,U]=(0,a.useState)(!1),[R,V]=(0,a.useState)(!1),[W,G]=(0,a.useState)("all"),[K,J]=(0,a.useState)([]),[q,Z]=(0,a.useState)(""),[Q,X]=(0,a.useState)({dataPath:"",capacityGiB:"100",maxFileSizeGiB:"10",remoteInvites:""}),ee=!0===z;function et(){return!!ee||(T(null===z?"正在检测后端连接,请稍后再试":"未连接后端","warning"),!1)}let ea=(0,a.useMemo)(()=>!L||L.capacity.configuredBytes<=0?0:Math.min(100,Math.round(L.capacity.usedBytes/L.capacity.configuredBytes*100)),[L]),er=(0,a.useMemo)(()=>(L?.holdings||[]).slice(0,100),[L]),en=Math.max(0,(L?.holdings.length||0)-100),es=(0,M.getBackendUrlExport)(),ei=!!es&&!es.includes("localhost")&&!es.includes("127.0.0.1"),el=async()=>{if(!ee)return!1;try{let e=await M.api.get("/api/node/status").json(),t=await M.api.get("/api/node/config").json();return Y(e),X({dataPath:t.dataPath||e.dataPath||"",capacityGiB:S(t.capacityBytes),maxFileSizeGiB:S(t.maxFileSizeBytes),remoteInvites:(t.remoteInvites||[]).join("\n")}),H(""),!0}catch(t){let e=await (0,M.getApiErrorMessage)(t,"无法读取节点状态");return H(e),T(e,"error"),!1}},ed=async()=>{et()&&await el()&&T("节点状态已刷新","success")},ec=async(e=W)=>{if(ee)try{let t=new URLSearchParams({limit:"80",filter:e}),a=await M.api.get(`/api/node/logs?${t.toString()}`).json();B(a.logs||[])}catch{}},eo=async()=>{if(ee)try{let e=await M.api.get("/api/admin/users").json();J(e.users||[])}catch{}},eu=async()=>{if(et()){E(!0);try{var e;await M.api.post("/api/node/config",{json:{dataPath:Q.dataPath,capacityBytes:k(Q.capacityGiB),maxFileSizeBytes:k(Q.maxFileSizeGiB),remoteInvites:(e=Q.remoteInvites,Array.from(new Set(String(e||"").split(/[\n,]/).map(e=>e.trim()).filter(Boolean))))}}).json();let t=Q.dataPath!==(L?.dataPath||"");T(t?"节点配置已保存。修改了数据目录,需要重启 daemon 生效。":"节点配置已保存","success"),await el(),await ec()}catch(t){let e=await (0,M.getApiErrorMessage)(t,"保存配置失败");T(e,"error"),H(e)}finally{E(!1)}}},eh=async()=>{L?.nodeId&&(await navigator.clipboard.writeText(L.nodeId),T("节点 ID 已复制","success"))},ef=async()=>{if(et()){U(!0);try{await M.api.delete("/api/node/logs").json(),B([]),T("节点日志已清空","success")}catch(t){let e=await (0,M.getApiErrorMessage)(t,"清空日志失败");T(e,"error"),H(e)}finally{U(!1)}}},ep=async()=>{if(et()){V(!0);try{let e=await M.api.get("/api/node/diagnostics").json(),t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),a=URL.createObjectURL(t),r=document.createElement("a"),n=new Date().toISOString().replace(/[:.]/g,"-");r.href=a,r.download=`mostbox-diagnostics-${n}.json`,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(a),T("诊断已导出","success")}catch(t){let e=await (0,M.getApiErrorMessage)(t,"导出诊断失败");T(e,"error"),H(e)}finally{V(!1)}}},em=async e=>{if(et()&&window.confirm(`确定清除用户 ${e.slice(0,6)}...${e.slice(-4)} 的文件记录和回收站吗?无人引用的副本也会被清理。`)){Z(e);try{await M.api.delete(`/api/admin/users/${e}/data`).json(),T("用户数据已清除","success"),await eo(),await el()}catch(t){let e=await (0,M.getApiErrorMessage)(t,"清除用户数据失败");T(e,"error"),H(e)}finally{Z("")}}};return(0,a.useEffect)(()=>{if(!ee||ei)return;el(),ec(),eo();let e=null,t=!1;return(async()=>{if(e=new WebSocket(await (0,M.getAuthenticatedWebSocketUrl)("/ws")),t)return e.close();e.onmessage=e=>{try{let t=JSON.parse(e.data);"node:status"===t.event&&Y(t.data),"node:log"===t.event&&function(e,t){let a=String(t||"all").trim().toLowerCase();if(!a||"all"===a)return!0;let r=function(e){let t="";try{t=JSON.stringify(e.data||{})}catch{}return[e.level,e.event,e.message,t].map(e=>String(e||"").toLowerCase()).join(" ")}(e);return"error"===a?"error"===e.level||C.error.some(e=>r.includes(e)):(C[a]||[a]).some(e=>r.includes(e))}(t.data,W)&&B(e=>[t.data,...e].slice(0,80)),"node:logs:cleared"===t.event&&B([]),("publish:success"===t.event||"download:success"===t.event||"network:status"===t.event)&&el()}catch{}}})(),()=>{t=!0,e?.close()}},[ee,ei,W]),(0,t.jsxs)("main",{className:"admin-page",children:[(0,t.jsxs)("header",{className:"admin-topbar",children:[(0,t.jsxs)("div",{className:"admin-title-group",children:[(0,t.jsx)(r.default,{href:"/",className:"btn btn-icon","aria-label":"返回首页",children:(0,t.jsx)(c.ArrowLeft,{size:16})}),(0,t.jsx)("div",{children:(0,t.jsx)("h1",{children:"节点管理"})})]}),(0,t.jsxs)("div",{className:"admin-topbar-actions",children:[(0,t.jsxs)("span",{className:`admin-status-pill ${L?.status==="online"?"online":""}`,children:[(0,t.jsx)(l,{size:14}),L?.status==="online"?"在线":"等待"]}),(0,t.jsxs)("button",{className:"btn btn-secondary",onClick:ed,children:[(0,t.jsx)(y,{size:16}),"刷新"]})]})]}),!1===z&&(0,t.jsxs)("section",{className:"admin-panel admin-error",children:[(0,t.jsx)(j.Server,{size:20}),(0,t.jsx)("span",{children:"未连接本地 daemon"})]}),ei&&(0,t.jsxs)("section",{className:"admin-panel admin-error",children:[(0,t.jsx)(d.AlertTriangle,{size:18}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{children:"远程节点管理不可用"}),(0,t.jsx)("p",{children:"当前连接的是别人部署的远程节点,普通邀请码不能查看或修改节点管理数据。"})]})]}),!ei&&P&&(0,t.jsxs)("section",{className:"admin-panel admin-error",children:[(0,t.jsx)(p.FileText,{size:20}),(0,t.jsx)("span",{children:P})]}),!ei&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"admin-overview",children:[(0,t.jsxs)("div",{className:"admin-metric",children:[(0,t.jsx)("div",{className:"admin-metric-icon",children:(0,t.jsx)(x,{size:18})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"节点 ID"}),(0,t.jsx)("strong",{children:_(L?.nodeId||"")})]}),(0,t.jsx)("button",{className:"btn btn-icon admin-metric-action",onClick:eh,"aria-label":"复制节点 ID",children:(0,t.jsx)(u,{size:15})})]}),(0,t.jsxs)("div",{className:"admin-metric",children:[(0,t.jsx)("div",{className:"admin-metric-icon",children:(0,t.jsx)(b.Wifi,{size:18})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"连接"}),(0,t.jsx)("strong",{children:L?`${L.network.peers} peers`:"-"})]})]}),(0,t.jsxs)("div",{className:"admin-metric",children:[(0,t.jsx)("div",{className:"admin-metric-icon",children:(0,t.jsx)(m.HardDrive,{size:18})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"容量"}),(0,t.jsxs)("strong",{children:[ea,"%"]})]})]}),(0,t.jsxs)("div",{className:"admin-metric",children:[(0,t.jsx)("div",{className:"admin-metric-icon",children:(0,t.jsx)(j.Server,{size:18})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"运行"}),(0,t.jsx)("strong",{children:L?(s=Math.floor((e=Math.max(0,Number(L.uptimeSeconds)||0))/86400),i=Math.floor(e%86400/3600),O=Math.floor(e%3600/60),s>0?`${s} 天 ${i} 小时`:i>0?`${i} 小时 ${O} 分钟`:`${O} 分钟`):"-"})]})]})]}),(0,t.jsxs)("section",{className:"admin-grid",children:[(0,t.jsxs)("div",{className:"admin-panel admin-span-2",children:[(0,t.jsxs)("div",{className:"admin-panel-header",children:[(0,t.jsx)("div",{children:(0,t.jsx)("h2",{children:"节点状态"})}),(0,t.jsx)(o.CheckCircle2,{size:18})]}),(0,t.jsxs)("div",{className:"admin-status-grid",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"版本"}),(0,t.jsx)("strong",{children:L?.version||"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"监听"}),(0,t.jsx)("strong",{children:L?`${L.host}:${L.port}`:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"数据目录"}),(0,t.jsx)("strong",{children:L?.dataPath||"-"})]})]}),(0,t.jsx)("div",{className:"admin-address-list",children:(L?.listen.addresses||[]).map(e=>(0,t.jsxs)("span",{children:[e.label,": ",e.ip,":",L?.port]},`${e.type}-${e.ip}`))})]}),(0,t.jsxs)("div",{className:"admin-panel admin-span-2",children:[(0,t.jsxs)("div",{className:"admin-panel-header",children:[(0,t.jsx)("div",{children:(0,t.jsx)("h2",{children:"用户数据"})}),(0,t.jsx)(h,{size:18})]}),(0,t.jsxs)("div",{className:"admin-table",children:[(0,t.jsxs)("div",{className:"admin-table-row admin-table-head",children:[(0,t.jsx)("span",{children:"用户"}),(0,t.jsx)("span",{children:"文件"}),(0,t.jsx)("span",{children:"回收站"}),(0,t.jsx)("span",{children:"操作"})]}),K.map(e=>(0,t.jsxs)("div",{className:"admin-table-row",children:[(0,t.jsx)("span",{title:e.address,children:_(e.address)}),(0,t.jsx)("span",{children:e.fileCount}),(0,t.jsx)("span",{children:e.trashCount}),(0,t.jsx)("span",{children:(0,t.jsxs)("button",{className:"btn btn-ghost",onClick:()=>em(e.address),disabled:q===e.address,children:[(0,t.jsx)(g.Trash2,{size:16}),"清除"]})})]},e.address)),0===K.length&&(0,t.jsx)("div",{className:"admin-empty-row",children:"暂无用户数据"})]})]}),(0,t.jsxs)("div",{className:"admin-panel admin-span-2",children:[(0,t.jsxs)("div",{className:"admin-panel-header",children:[(0,t.jsx)("div",{children:(0,t.jsx)("h2",{children:"节点设置"})}),(0,t.jsx)(h,{size:18})]}),(0,t.jsxs)("div",{className:"admin-settings-fields",children:[(0,t.jsxs)("label",{className:"admin-field admin-field-wide",children:[(0,t.jsx)("span",{children:"数据目录"}),(0,t.jsx)("input",{className:"input",value:Q.dataPath,onChange:e=>X(t=>({...t,dataPath:e.target.value}))})]}),(0,t.jsxs)("label",{className:"admin-field",children:[(0,t.jsx)("span",{children:"容量上限 GiB"}),(0,t.jsx)("input",{className:"input",type:"number",min:"0",step:"1",value:Q.capacityGiB,onChange:e=>X(t=>({...t,capacityGiB:e.target.value}))})]}),(0,t.jsxs)("label",{className:"admin-field",children:[(0,t.jsx)("span",{children:"单文件最大 GiB"}),(0,t.jsx)("input",{className:"input",type:"number",min:"0",step:"1",value:Q.maxFileSizeGiB,onChange:e=>X(t=>({...t,maxFileSizeGiB:e.target.value}))})]}),(0,t.jsxs)("label",{className:"admin-field admin-field-wide",children:[(0,t.jsx)("span",{children:"远程访问邀请码"}),(0,t.jsx)("textarea",{className:"input admin-textarea",value:Q.remoteInvites,placeholder:"每行一个,或用英文逗号分隔",onChange:e=>X(t=>({...t,remoteInvites:e.target.value}))})]})]}),(0,t.jsx)("p",{className:"admin-field-hint",children:"数据目录变更保存后需要重启 daemon。修改邀请码后新请求立即生效。 发布和下载成功后会固定做种;MostBox 不设同时做种数或传输限速。"}),(0,t.jsxs)("button",{className:"btn btn-primary btn-full",onClick:eu,disabled:I,children:[(0,t.jsx)(v.Save,{size:16}),"保存配置"]})]}),(0,t.jsxs)("div",{className:"admin-panel admin-span-2",children:[(0,t.jsxs)("div",{className:"admin-panel-header",children:[(0,t.jsx)("div",{children:(0,t.jsx)("h2",{children:"持有副本"})}),(0,t.jsx)(m.HardDrive,{size:18})]}),(0,t.jsxs)("div",{className:"admin-capacity-row",children:[(0,t.jsx)("progress",{value:ea,max:"100"}),(0,t.jsxs)("span",{children:[w(L?.capacity.usedBytes||0)," /"," ",w(L?.capacity.configuredBytes||0)]})]}),(0,t.jsx)("div",{className:"admin-seed-help","aria-label":"做种状态说明",children:N.map(e=>(0,t.jsxs)("div",{className:"admin-seed-help-item",children:[(0,t.jsx)("span",{className:`admin-seed-dot ${e.tone}`}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:e.label}),(0,t.jsx)("span",{children:e.desc})]})]},e.label))}),en>0&&(0,t.jsxs)("p",{className:"admin-table-note",children:["当前仅展示前 100 个副本,另有 ",en," ","个仍在后台做种。"]}),(0,t.jsxs)("div",{className:"admin-table",children:[(0,t.jsxs)("div",{className:"admin-table-row admin-table-head",children:[(0,t.jsx)("span",{children:"文件"}),(0,t.jsx)("span",{children:"CID"}),(0,t.jsx)("span",{children:"大小"}),(0,t.jsx)("span",{children:"Peer"}),(0,t.jsx)("span",{children:"最近服务"}),(0,t.jsx)("span",{children:"状态"})]}),er.map(e=>(0,t.jsxs)("div",{className:"admin-table-row",children:[(0,t.jsx)("span",{children:e.fileName||"-"}),(0,t.jsx)("span",{title:e.cid,children:_(e.cid)}),(0,t.jsx)("span",{children:w(e.size)}),(0,t.jsx)("span",{children:e.peerCount??0}),(0,t.jsx)("span",{title:e.lastServedAt||"",children:function(e){if(!e)return"从未";let t=(0,n.default)(e);return t.isValid()?t.isAfter((0,n.default)())?"刚刚":t.fromNow():"从未"}(e.lastServedAt)}),(0,t.jsx)("span",{className:`admin-seed-pill ${"error"===e.seedStatus?"error":"active"===e.seedStatus||e.joined?"active":""}`,children:function(e){switch(e.seedStatus){case"queued":return"队列中";case"joining":return"加入中";case"active":return"做种中";case"paused":return"已暂停";case"error":return e.seedError?`错误:${e.seedError}`:"错误";default:return e.joined?"做种中":"未 join"}}(e)})]},e.cid)),(!L||0===L.holdings.length)&&(0,t.jsx)("div",{className:"admin-empty-row",children:"暂无持有副本"})]})]}),(0,t.jsxs)("div",{className:"admin-panel admin-span-2",children:[(0,t.jsxs)("div",{className:"admin-panel-header",children:[(0,t.jsx)("div",{children:(0,t.jsx)("h2",{children:"节点日志"})}),(0,t.jsxs)("div",{className:"admin-panel-actions",children:[(0,t.jsxs)("button",{className:"btn btn-secondary",onClick:ep,disabled:R,children:[(0,t.jsx)(f.Download,{size:16}),"导出诊断"]}),(0,t.jsxs)("button",{className:"btn btn-ghost",onClick:ef,disabled:F||0===A.length,children:[(0,t.jsx)(g.Trash2,{size:16}),"清空日志"]}),(0,t.jsx)(p.FileText,{size:18})]})]}),(0,t.jsx)("div",{className:"admin-log-filter","aria-label":"日志筛选",children:D.map(e=>(0,t.jsx)("button",{type:"button",className:W===e.value?"active":"",onClick:()=>{G(e.value),ec(e.value)},children:e.label},e.value))}),(0,t.jsxs)("div",{className:"admin-log-list",children:[A.map(e=>(0,t.jsxs)("div",{className:"admin-log-row",children:[(0,t.jsx)("time",{children:new Date(e.ts).toLocaleTimeString("zh-CN")}),(0,t.jsx)("span",{className:`admin-log-level ${e.level}`,children:e.level}),(0,t.jsx)("strong",{children:e.event}),(0,t.jsx)("span",{children:e.message})]},e.id)),0===A.length&&(0,t.jsx)("div",{className:"admin-empty-row",children:"暂无日志"})]})]})]})]})]})}],23261)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89664,e=>{"use strict";let a=(0,e.i(56420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,a],89664)},8734,e=>{"use strict";let a=(0,e.i(56420).default)("copy",[["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"}]]);e.s(["Copy",0,a],8734)},51921,e=>{"use strict";let a=(0,e.i(56420).default)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);e.s(["Music",0,a],51921)},15170,80796,e=>{"use strict";var a=e.i(56420);let s=(0,a.default)("image",[["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"}]]);e.s(["Image",0,s],15170);let t=(0,a.default)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);e.s(["Film",0,t],80796)},79490,e=>{"use strict";let a=(0,e.i(56420).default)("pen",[["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"}]]);e.s(["Edit2",0,a],79490)},12796,11028,6933,e=>{"use strict";let a=(0,e.i(56420).default)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);e.s(["Loader",0,a],12796);var s=e.i(18050),t=e.i(71645),i=e.i(26091),r=e.i(51921),l=e.i(63676),n=e.i(26913);e.s(["default",0,function({item:e,isBackendReady:o,getFileDownloadUrl:c,onClose:d}){let[u,m]=(0,t.useState)(""),[h,p]=(0,t.useState)(!1),[f,x]=(0,t.useState)(""),[j,g]=(0,t.useState)("");return(0,t.useEffect)(()=>{if("text"!==e.subtype)return;let a=!1;return(m(""),g(""),o)?(p(!0),(async()=>{try{let s=await fetch(c(e.cid),{headers:{...await (0,n.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`),Range:"bytes=0-9999"}});if(!s.ok)throw Error("加载失败");let t=await s.text();a||m(t||"(文件为空)")}catch{a||m("加载失败")}finally{a||p(!1)}})(),()=>{a=!0}):void m("加载失败")},[c,o,e.cid,e.subtype]),(0,t.useEffect)(()=>{var a;if("image"!==(a=e.subtype)&&"video"!==a&&"audio"!==a)return void x("");if(x(""),g(""),!o)return void g("加载失败");let s="",t=!1;return(async()=>{try{let a=await fetch(c(e.cid),{headers:await (0,n.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`)});if(!a.ok)throw Error("加载失败");let i=URL.createObjectURL(await a.blob());s=i,t||x(i)}catch{t||g("加载失败")}})(),()=>{t=!0,s&&URL.revokeObjectURL(s)}},[c,o,e.cid,e.subtype]),(0,s.jsxs)("div",{className:"preview-overlay",onClick:d,children:[(0,s.jsx)("button",{type:"button",className:"preview-close",onClick:d,"aria-label":"关闭预览",children:(0,s.jsx)(l.X,{size:20})}),(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),children:["image"===e.subtype&&(0,s.jsx)("div",{className:"preview-media-wrapper",children:f?(0,s.jsx)("img",{src:f,alt:e.fileName}):j?(0,s.jsxs)("div",{className:"preview-unsupported",children:[(0,s.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,s.jsx)("p",{children:e.fileName}),(0,s.jsx)("p",{className:"preview-unsupported-hint",children:j})]}):(0,s.jsx)("div",{className:"preview-loading",children:(0,s.jsx)("div",{className:"preview-loading-spinner"})})}),"video"===e.subtype&&(0,s.jsx)("div",{className:"preview-media-wrapper",children:f?(0,s.jsx)("video",{src:f,controls:!0}):j?(0,s.jsxs)("div",{className:"preview-unsupported",children:[(0,s.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,s.jsx)("p",{children:e.fileName}),(0,s.jsx)("p",{className:"preview-unsupported-hint",children:j})]}):(0,s.jsx)("div",{className:"preview-loading",children:(0,s.jsx)("div",{className:"preview-loading-spinner"})})}),"audio"===e.subtype&&(0,s.jsxs)("div",{className:"preview-audio",children:[(0,s.jsx)("div",{className:"preview-audio-icon",children:(0,s.jsx)(r.Music,{size:36,color:"var(--accent)"})}),(0,s.jsx)("p",{className:"preview-audio-filename",children:e.fileName}),f?(0,s.jsx)("audio",{className:"preview-audio-player",src:f,controls:!0}):(0,s.jsx)("div",{className:"preview-text-loading",children:j?(0,s.jsx)("p",{children:j}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{size:24,className:"preview-text-spinner"}),(0,s.jsx)("p",{children:"正在加载音频预览..."})]})})]}),"file"===e.subtype&&(0,s.jsxs)("div",{className:"preview-unsupported",children:[(0,s.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,s.jsx)("p",{children:e.fileName}),(0,s.jsx)("p",{className:"preview-unsupported-hint",children:"无法预览"})]}),"text"===e.subtype&&(0,s.jsxs)("div",{className:"preview-text-container",children:[(0,s.jsx)("div",{className:"preview-text-header",children:(0,s.jsx)("span",{children:e.fileName})}),h?(0,s.jsxs)("div",{className:"preview-text-loading",children:[(0,s.jsx)(a,{size:24,className:"preview-text-spinner"}),(0,s.jsx)("p",{children:"正在加载文本预览..."}),(0,s.jsx)("p",{className:"preview-text-loading-hint",children:"如果是初次预览,可能需要等待 P2P 网络同步"})]}):(0,s.jsx)("pre",{className:"preview-text",children:u||"(文件为空)"})]})]})]})}],11028),e.s(["getFileSubtype",0,function(e){let a=String(e||"").split(".").pop()?.toLowerCase()||"";return["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","heic","heif"].includes(a)?"image":["mp4","webm","mov","avi","mkv","flv","wmv","m4v","mpeg","3gp"].includes(a)?"video":["mp3","wav","ogg","flac","aac","m4a","wma","opus"].includes(a)?"audio":["txt","md","js","ts","jsx","tsx","css","scss","less","json","xml","html","htm","yaml","yml","toml","ini","cfg","conf","log","sh","bash","py","rb","go","rs","java","c","cpp","h","hpp","cs","php","sql","graphql","env","gitignore","dockerfile","readme"].includes(a)?"text":"file"}],6933)},35965,e=>{"use strict";let a=(0,e.i(56420).default)("sun",[["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"}]]);e.s(["Sun",0,a],35965)},96699,e=>{"use strict";let a=(0,e.i(56420).default)("moon",[["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"}]]);e.s(["Moon",0,a],96699)},11241,e=>{"use strict";let a=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,a],11241)},59665,5142,e=>{"use strict";var a=e.i(18050),s=e.i(71645);let t=(0,e.i(56420).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);function i(e=!1,a={}){let[t,r]=(0,s.useState)(e),l=(0,s.useCallback)(()=>{r(e=>e||(a.onOpen?.(),!0))},[a.onOpen]),n=(0,s.useCallback)(()=>{r(e=>e?(a.onClose?.(),!1):e)},[a.onClose]);return[t,{open:l,close:n,toggle:(0,s.useCallback)(()=>{t?n():l()},[n,l,t]),set:r}]}e.s(["useDisclosure",0,i],5142);let r=(0,s.createContext)(null);e.s(["default",0,function({sidebar:e,headerTitle:l,headerRight:n,children:o}){let[c,d]=i(!1),[u,m]=(0,s.useState)(!1),h=function(e,{getInitialValueInEffect:a}={getInitialValueInEffect:!0}){let[t,i]=(0,s.useState)(a?void 0:!!("u">typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches);return(0,s.useEffect)(()=>{try{if("matchMedia"in window){let a=window.matchMedia(e);i(a.matches);let s=e=>i(e.matches);return a.addEventListener("change",s),()=>{a.removeEventListener("change",s)}}}catch(e){return}},[e]),t||!1}("(max-width: 768px)"),p=()=>{h?d.open():m(!1)};return(0,a.jsx)(r.Provider,{value:{closeSidebar:d.close,openSidebar:p,isSidebarVisible:h?c:!u},children:(0,a.jsxs)("div",{className:"app-layout",children:[(0,a.jsx)("div",{className:`sidebar-overlay ${c?"visible":""}`,onClick:()=>d.close()}),(0,a.jsx)("div",{className:`sidebar ${c?"open":""} ${u?"collapsed":""}`,children:e({closeSidebar:d.close,openSidebar:p})}),(0,a.jsxs)("div",{className:"main-content",children:[(0,a.jsxs)("header",{className:"app-header",children:[(0,a.jsxs)("div",{className:"header-left",children:[(0,a.jsx)("button",{onClick:()=>{h?d.toggle():m(!u)},className:"btn btn-icon sidebar-toggle-btn","aria-label":h?"打开菜单":u?"展开侧边栏":"收起侧边栏",children:(0,a.jsx)(t,{size:16})}),l]}),(0,a.jsx)("div",{className:"header-right",children:n})]}),o]})]})})},"useAppShell",0,function(){let e=(0,s.useContext)(r);if(!e)throw Error("useAppShell must be used within AppShell");return e}],59665)},27648,e=>{"use strict";var a=e.i(18050),s=e.i(93957),t=e.i(71192);e.s(["default",0,function({className:e=""}){let i=(0,t.useUserStore)(e=>e.identity),r=(0,t.useUserStore)(e=>e.openLoginModal),l=(0,t.useUserStore)(e=>e.logoutUser);return(0,a.jsxs)("div",{className:`chat-sidebar-footer sidebar-account ${e}`,children:[(0,a.jsxs)("div",{className:"user-info",children:[(0,a.jsx)("img",{className:"user-avatar-img",src:(0,s.generateAvatar)(i?.address,i?.avatar),alt:"avatar"}),(0,a.jsx)("span",{className:"user-name",title:i?.address,children:i?.displayName||"未登录"})]}),i?(0,a.jsx)("button",{className:"btn btn-ghost logout-btn",onClick:l,children:"退出"}):(0,a.jsx)("button",{className:"btn btn-primary login-btn",onClick:r,children:"登录"})]})}])},39626,e=>{"use strict";var a=e.i(18050);let s=(0,e.i(56420).default)("panel-left-open",[["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"}]]);var t=e.i(59665);e.s(["default",0,function({label:e="打开侧边栏",className:i="",variant:r="primary"}){let{isSidebarVisible:l,openSidebar:n}=(0,t.useAppShell)();return l?null:(0,a.jsxs)("button",{type:"button",className:`btn ${"primary"===r?"btn-primary":""} sidebar-open-hint ${i}`.trim(),onClick:n,children:[(0,a.jsx)(s,{size:16}),e]})}],39626)},62368,e=>{"use strict";let a=(0,e.i(56420).default)("download",[["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"}]]);e.s(["Download",0,a],62368)},26091,e=>{"use strict";let a=(0,e.i(56420).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,a],26091)},73474,e=>{"use strict";let a=(0,e.i(56420).default)("trash-2",[["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"}]]);e.s(["Trash2",0,a],73474)},66595,e=>{"use strict";let a=(0,e.i(56420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,a],66595)},25981,e=>{"use strict";let a=(0,e.i(56420).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,a],25981)},26067,e=>{"use strict";let a=(0,e.i(56420).default)("folder",[["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"}]]);e.s(["Folder",0,a],26067)},67927,e=>{"use strict";let a=(0,e.i(56420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,a],67927)},27627,e=>{"use strict";var a=e.i(18050),s=e.i(71645),t=e.i(25981),i=e.i(35965),r=e.i(96699),l=e.i(15170),n=e.i(73474),o=e.i(26067),c=e.i(80796),d=e.i(51921),u=e.i(67927),m=e.i(26091),h=e.i(63676),p=e.i(89664),f=e.i(8734),x=e.i(62368),j=e.i(56420);let g=(0,j.default)("arrow-up-down",[["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"}]]),v=(0,j.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),b=(0,j.default)("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]);var y=e.i(66595),w=e.i(79490),N=e.i(12796),k=e.i(11241);let C=(0,j.default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var M=e.i(59665),S=e.i(39626),$=e.i(27648),z=e.i(11028);e.i(4121);var F=e.i(57667),E=e.i(88361),L=e.i(47910),D=e.i(26913),T=e.i(64621);let I="链接格式不正确,请粘贴完整的 most://<cid>?filename=... 分享链接。",A="暂时没有发现在线种子。请确认分享者或其他下载者仍在线做种,稍后再检测。",R={"Link must be a valid most:// URL":"链接无法解析,请粘贴完整的 most://<cid>?filename=... 分享链接。","Link must use most:// protocol":"链接协议不正确,应以 most:// 开头。","Link path is not supported":"链接里不应包含路径,请使用 most://<cid>?filename=... 格式。","Invalid CID format":"CID 无效,请确认 most:// 后面的内容没有缺失或被截断。","Invalid CID format: CID v1 required":"CID 格式不符合 MostBox 要求,请确认分享链接完整。","CID digest must be 32 bytes":"CID 格式不符合 MostBox 要求,请确认分享链接完整。","filename is required":"链接缺少 filename 参数,请复制完整分享链接后再检测。"};function U(e=""){let a=String(e||"").trim();if(!a)return"请先粘贴 most:// 分享链接。";let s=function(e){let a;if(!e||"string"!=typeof e)return{cid:"",error:"Link must be a non-empty string"};try{a=new URL(e)}catch{return{cid:"",error:"Link must be a valid most:// URL"}}if("most:"!==a.protocol)return{cid:"",error:"Link must use most:// protocol"};if(a.pathname&&"/"!==a.pathname)return{cid:"",error:"Link path is not supported"};let s=a.hostname,t=a.searchParams.get("filename"),i=[...a.searchParams.keys()].find(e=>"filename"!==e),r=function(e){let a;if(!e||"string"!=typeof e)return{valid:!1,error:"CID must be a non-empty string"};try{a=T.CID.parse(e)}catch{return{valid:!1,error:"Invalid CID format"}}return 1!==a.version?{valid:!1,error:"Invalid CID format: CID v1 required"}:32!==a.multihash.digest.length?{valid:!1,error:"CID digest must be 32 bytes"}:{valid:!0}}(s);return r.valid?t?i?{cid:"",error:`Unsupported query parameter: ${i}`}:{cid:s,fileName:t}:{cid:"",error:"filename is required"}:{cid:"",error:r.error}}(a);if(!s.error)return s.fileName?.trim()?null:R["filename is required"];if(s.error.startsWith("Unsupported query parameter: ")){let e=s.error.slice(29);return`链接包含暂不支持的参数 ${e},请只保留 filename。`}return R[s.error]||I}var O=e.i(3593),P=e.i(71192),q=e.i(5142),B=e.i(6933);async function V(e){return function(e={},a=""){if("TimeoutError"===a)return"检测等待超时,暂时没有等到在线种子响应。请确认分享者或其他下载者仍在线做种,稍后再检测。";if(!e.status)return"无法连接本地节点,请确认 MostBox 后端正在运行后再检测。";if(404===e.status)return"当前后端还没有检测接口,请重启 MostBox 后端后再试。";switch(e.code){case"VALIDATION_ERROR":return I;case"CONFLICT":return e.error?`${e.error},请先处理同名文件后再下载。`:"下载目录已有同名文件,请先重命名或移走后再检测。";case"PEER_NOT_FOUND":return A;case"PERMISSION_ERROR":return e.error?`下载目录不可写:${e.error}`:"下载目录不可写,请检查目录权限后再检测。";case"ENGINE_NOT_INITIALIZED":return"本地节点还没有启动完成,请稍等几秒后重新检测。"}return 503===e.status?A:e.status>=500?"本地节点检测时出错,请稍后重试或查看节点日志。":e.error?`检测未通过:${e.error}`:"检测未通过,请确认链接完整、发布者在线且本机网络正常。"}(await (0,D.getApiErrorPayload)(e),e&&"object"==typeof e&&"name"in e?String(e.name):"")}let H={listPublishedFiles:()=>D.api.get("/api/files").json(),listTrashFiles:()=>D.api.get("/api/trash").json(),deletePublishedFile:e=>D.api.delete(`/api/files/${e}`).json(),restoreTrashFile:e=>D.api.post(`/api/trash/${e}/restore`).json(),permanentDeleteTrashFile:e=>D.api.delete(`/api/trash/${e}`).json(),emptyTrash:()=>D.api.delete("/api/trash").json(),toggleStar:e=>D.api.post(`/api/files/${e}/star`).json(),getConfig:()=>D.api.get("/api/config").json(),getDataPath:()=>D.api.get("/api/config/data-path").json(),getNetworkAddresses:()=>D.api.get("/api/network").json(),saveConfig:e=>D.api.post("/api/config",{json:e}).json(),async publishFile(e,a){let s=new FormData;s.append("file",e,a||e.name);let t=await D.api.post("/api/publish",{body:s});if(!t.ok)throw Error((await t.json().catch(()=>({error:t.statusText}))).error||"Request failed");return t.json()},checkDownload:e=>D.api.post("/api/download/check",{json:{link:e},timeout:15e3}).json(),downloadFile:e=>D.api.post("/api/download",{json:{link:e}}).json(),cancelDownload:e=>D.api.post("/api/download/cancel",{json:{taskId:e}}).json(),getFileDownloadUrl:e=>(0,D.getApiUrl)(`/api/files/${e}/download`),moveFile:(e,a)=>D.api.post("/api/move",{json:{cid:e,newFileName:a}}).json(),renameFolder:(e,a)=>D.api.post("/api/folder/rename",{json:{oldPath:e,newPath:a}}).json()};function _(e){return!e||e<=0?"0 B":e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:e<0x40000000?`${(e/1048576).toFixed(1)} MB`:`${(e/0x40000000).toFixed(2)} GB`}function W(e){let a=e.lastIndexOf("/");return -1===a?{folder:"",name:e}:{folder:e.substring(0,a),name:e.substring(a+1)}}function X(e){return e?[{path:"",name:"全部内容"},...e.split("/").filter(Boolean).map((e,a,s)=>({path:s.slice(0,a+1).join("/"),name:e}))]:[]}function G({file:e,isSelected:s,onSelect:t,onPreview:i}){let r=(0,B.getFileSubtype)(e.fileName),n=(0,a.jsx)(m.FileText,{size:24,color:"#fff"});return"image"===r?n=(0,a.jsx)(l.Image,{size:24,color:"#fff"}):"video"===r?n=(0,a.jsx)(c.Film,{size:24,color:"#fff"}):"audio"===r&&(n=(0,a.jsx)(d.Music,{size:24,color:"#fff"})),(0,a.jsxs)("div",{"data-id":e.cid,onClick:()=>t(e.cid),onDoubleClick:()=>i(e),className:`card ${s?"selected":""}`,children:[(0,a.jsx)("div",{className:`card-icon ${e.starred?"starred":"file"}`,children:n}),(0,a.jsx)("p",{className:"card-name",children:W(e.fileName).name})]})}function K({folder:e,onClick:s}){return(0,a.jsxs)("div",{onClick:s,className:"card",children:[(0,a.jsx)("div",{className:"card-icon folder",children:(0,a.jsx)(o.Folder,{size:28,color:"#fff"})}),(0,a.jsx)("p",{className:"card-name",children:e.name})]})}function Z({items:e,allFolders:t,currentPath:i,onMove:r,onClose:l}){let[n,c]=(0,s.useState)(""),[d,u]=(0,s.useState)(i),m=X(n);return(0,a.jsx)(F.ModalOverlay,{onClose:l,children:(0,a.jsxs)("div",{className:"move-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{children:"移动到"}),(0,a.jsx)("button",{onClick:l,className:"btn btn-icon",children:(0,a.jsx)(h.X,{size:18})})]}),(0,a.jsxs)("p",{className:"move-modal-desc",children:["已选 ",e.length," 个项目"]}),(0,a.jsx)("div",{className:"move-new-folder",children:(0,a.jsx)("input",{type:"text",className:"input",value:d,onChange:e=>u(e.target.value),placeholder:"输入路径创建嵌套文件夹"})}),(0,a.jsx)("p",{className:"move-modal-hint",children:"如 图片/壁纸"}),(0,a.jsx)("div",{className:"move-breadcrumb",children:m.map((e,t)=>(0,a.jsxs)(s.default.Fragment,{children:[t>0&&(0,a.jsx)("span",{className:"breadcrumb-separator",children:"/"}),(0,a.jsx)("button",{onClick:()=>{c(e.path),u(e.path)},className:`move-breadcrumb-btn ${n===e.path&&!d?"active":""}`,children:e.name},e.path)]},e.path))}),(0,a.jsxs)("div",{className:"move-folder-list",children:[0===t.filter(e=>{if(""===n)return!e.path.includes("/");let a=n+"/";return!!e.path.startsWith(a)&&!e.path.substring(a.length).includes("/")}).length&&(0,a.jsx)("p",{className:"move-modal-empty",children:"该目录下没有子文件夹"}),t.filter(e=>{if(""===n)return!e.path.includes("/");let a=n+"/";return!!e.path.startsWith(a)&&!e.path.substring(a.length).includes("/")}).map(e=>(0,a.jsxs)("button",{onClick:()=>c(e.path),className:`move-folder-item ${n===e.path&&!d?"selected":""}`,children:[(0,a.jsx)(o.Folder,{size:16}),(0,a.jsx)("span",{children:e.name})]},e.path))]}),(0,a.jsxs)("div",{className:"modal-actions",children:[(0,a.jsx)("button",{onClick:l,className:"btn btn-secondary",children:"取消"}),(0,a.jsx)("button",{onClick:()=>{r(n||d.trim())},className:"btn btn-primary",children:"移动"})]})]})})}e.s(["default",0,function(){let e,l,o,c=(0,O.useAppStore)(e=>e.isDarkMode),d=(0,O.useAppStore)(e=>e.setIsDarkMode),j=(0,O.useAppStore)(e=>e.addToast),T=(0,O.useAppStore)(e=>e.hasBackend),I=(0,O.useAppStore)(e=>e.openConnectModal),A=(0,P.useUserStore)(e=>e.identity),R=(0,P.useUserStore)(e=>e.openLoginModal),[J,Q]=(0,s.useState)([]),[Y,ee]=(0,s.useState)([]),[ea,es]=(0,s.useState)(null),[et,ei]=(0,s.useState)("all"),[er,el]=(0,s.useState)(!1),[en,eo]=(0,s.useState)([]),[ec,ed]=(0,s.useState)(null),[eu,em]=(0,s.useState)(null),[eh,ep]=(0,q.useDisclosure)(!1),[ef,ex]=(0,s.useState)(""),[ej,eg]=(0,s.useState)(null),[ev,eb]=(0,s.useState)(!1),[ey,ew]=(0,s.useState)([]),[eN,ek]=(0,q.useDisclosure)(!1),[eC,eM]=(0,s.useState)(""),{copy:eS,copied:e$}=function(e={}){let a=e.timeout??2e3,[t,i]=(0,s.useState)(null),[r,l]=(0,s.useState)(!1),n=(0,s.useRef)(null);return(0,s.useEffect)(()=>()=>{window.clearTimeout(n.current)},[]),{copy:e=>{"clipboard"in navigator?navigator.clipboard.writeText(e).then(()=>{i(null),window.clearTimeout(n.current),n.current=window.setTimeout(()=>l(!1),a),l(!0)}).catch(e=>i(e)):i(Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{l(!1),i(null),window.clearTimeout(n.current)},error:t,copied:r}}({timeout:2e3}),[ez,eF]=(0,q.useDisclosure)(!1),[eE,eL]=(0,s.useState)(null),[eD,eT]=(0,s.useState)(null),[eI,eA]=(0,s.useState)(!1),eR=!0===T,eU=ea||"",eO=(e=new Set,J.forEach(a=>{let{folder:s}=W(a.fileName),t=s.split("/").filter(Boolean),i="";for(let a of t)i+=(i?"/":"")+a,e.add(i)}),[...e].sort()),{folders:eP,files:eq}={folders:(l=eU?eU+"/":"",eO.filter(e=>{let a=e.toLowerCase().startsWith(l.toLowerCase()),s=e.substring(l.length);return a&&!s.includes("/")}).map(e=>({name:e.substring(l.length),path:e}))),files:J.filter(e=>W(e.fileName).folder===eU)};function eB(){return!!eR||(I(),!1)}function eV(){return!!A||(R(),!1)}let eH=eC?J.filter(e=>W(e.fileName).name.toLowerCase().includes(eC.toLowerCase())):eq,e_=async()=>{if(!eR||!A)return void Q([]);try{let e=await H.listPublishedFiles();Q(e||[])}catch{Q([])}},eW=async()=>{if(!eR||!A)return void ee([]);try{let e=await H.listTrashFiles();ee(e||[])}catch{ee([])}},eX=e=>{eo(a=>a.includes(e)?a.filter(a=>a!==e):[...a,e])},eG=async e=>{if(eV()&&eB())try{await H.restoreTrashFile(e),j("已恢复","success"),e_(),eW()}catch(e){j(await (0,D.getApiErrorMessage)(e,"恢复失败"),"error")}},eK=async()=>{!eV()||eB()&&eL({title:"清空回收站",message:"确定要清空回收站吗?此操作不可恢复!",confirmText:"清空",danger:!0,onConfirm:async()=>{eL(null);try{await H.emptyTrash(),j("回收站已清空","success"),eW()}catch(e){j(await (0,D.getApiErrorMessage)(e,"清空失败"),"error")}}})},eZ=async e=>{if(eV()&&eB())try{let a=await H.toggleStar(e);Q(s=>s.map(s=>s.cid===e?{...s,starred:a.starred}:s)),j(a.starred?"已收藏":"已取消收藏","success")}catch(e){j(await (0,D.getApiErrorMessage)(e,"操作失败"),"error")}},eJ=async()=>{if(!eV()||!eB())return;let e="trash"===et;eL({title:e?"永久删除":"批量删除",message:e?`确定要永久删除选中的 ${en.length} 个项目吗?此操作不可恢复!`:`确定要删除选中的 ${en.length} 个项目吗?`,confirmText:e?"永久删除":"删除",danger:!0,onConfirm:async()=>{eL(null);try{for(let a of en)e?await H.permanentDeleteTrashFile(a):a.startsWith("__")||await H.deletePublishedFile(a);eo([]),j(e?"已永久删除":"已删除","success"),e_(),eW()}catch(e){j(await (0,D.getApiErrorMessage)(e,"删除失败"),"error")}}})},eQ=async e=>{if(eV()&&eB())try{for(let a of en){let s=J.find(e=>e.cid===a);if(!s)continue;let{name:t}=W(s.fileName),i=e?`${e}/${t}`:t;s.fileName!==i&&await H.moveFile(a,i)}eo([]),eF.close(),j("已移动","success"),e_()}catch(e){j(await (0,D.getApiErrorMessage)(e,"移动失败"),"error")}},eY=e=>{let a=!!e.path,s=a?e.name:W(e.fileName).name;eT({title:a?"重命名文件夹":"重命名文件",placeholder:"请输入新名称",defaultValue:s,confirmText:"重命名",onConfirm:async t=>{if(t!==s&&eV()&&eB()){eA(!0);try{if(a){let a=e.path.lastIndexOf("/"),s=-1!==a?e.path.substring(0,a):"",i=s?`${s}/${t}`:t;await H.renameFolder(e.path,i),j("已重命名","success"),e_(),ae(i)}else{let{folder:a}=W(e.fileName),s=a?`${a}/${t}`:t;await H.moveFile(e.cid,s),j("已重命名","success"),e_()}eT(null)}catch(e){j(await (0,D.getApiErrorMessage)(e,"重命名失败"),"error")}finally{eA(!1)}}}})},e0=async e=>{if(!A){R(),j("请先登录后发布文件","warning");return}if(!eB())return;let a=eU?eU+"/":"",s=[];for(let t of Array.from(e)){let e=a+t.name;if(J.some(a=>a.fileName===e)){j(`${t.name} 已存在`,"warning");continue}let i=`upload_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,r={id:i,fileName:t.name,progress:0,type:"upload",status:"uploading"};s.push(r),ew(e=>[...e,r]),s.length>0&&ek.open();try{(await H.publishFile(t,e)).alreadyExists?(ew(e=>e.map(e=>e.id===i?{...e,status:"completed"}:e)),j(`${t.name} 已存在`,"warning")):(ew(e=>e.map(e=>e.id===i?{...e,progress:100,status:"completed"}:e)),j(`${t.name} 已添加到本地`,"success"))}catch(e){ew(e=>e.map(e=>e.id===i?{...e,status:"error"}:e)),j(await (0,D.getApiErrorMessage)(e,`发布失败: ${t.name}`),"error")}}setTimeout(()=>{ew(e=>e.filter(e=>"completed"!==e.status&&"error"!==e.status&&"cancelled"!==e.status))},3e3),e_()},[e1,e2]=(0,s.useState)(!1),e6=ef.trim(),e4=ej?.status==="success"&&ej.link===e6,e5=()=>{ep.close(),eg(null)},e9=async()=>{let e=U(e6);if(e){eg({status:"error",link:e6,message:e}),j(e,"warning");return}if(!ev&&!e1&&eV()&&eB()){eb(!0),eg(null);try{let e=await H.checkDownload(e6),a=e.alreadyExists?`${e.fileName} 已在本机`:`${e.fileName} 可下载`;eg({status:"success",link:e6,message:a}),j(e.alreadyExists?`${e.fileName} 已存在`:"检测通过",e.alreadyExists?"warning":"success")}catch(a){let e=await V(a);eg({status:"error",link:e6,message:e}),j(e,"error")}finally{eb(!1)}}},e3=async()=>{if(!A){R(),j("请先登录后下载文件","warning");return}if(!eB())return;let e=U(e6);if(e)return void j(e,"warning");if(!e4)return void j("请先检测链接可用性","warning");if(!e1){e2(!0);try{let e=await H.downloadFile(e6);if(ex(""),eg(null),e5(),e.alreadyExists)j(`${e.fileName} 已存在`,"warning");else{let a={id:e.taskId,fileName:"下载文件",progress:0,type:"download",status:"downloading"};ew(e=>[...e,a]),ek.open(),j("下载已开始","info")}}catch(e){j(await (0,D.getApiErrorMessage)(e,"下载失败"),"error")}finally{e2(!1)}}},e7=async e=>{if(eV()&&eB()&&"download"===e.type&&"downloading"===e.status){ew(a=>a.map(a=>a.id===e.id?{...a,status:"cancelling"}:a));try{await H.cancelDownload(e.id)}catch(a){ew(a=>a.map(a=>a.id===e.id?{...a,status:"downloading"}:a)),j(await (0,D.getApiErrorMessage)(a,"取消失败"),"error")}}},e8=async e=>{if(eV()&&eB())try{let a=await fetch(H.getFileDownloadUrl(e.cid),{headers:await (0,D.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`)});if(!a.ok)throw Error("获取文件失败");let s=await a.blob(),t=window.showSaveFilePicker;if(t){let a=await t({suggestedName:e.fileName}),i=await a.createWritable();await i.write(s),await i.close(),j("文件已保存","success")}else{let a=URL.createObjectURL(s),t=document.createElement("a");t.href=a,t.download=e.fileName,document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(a),j("文件已下载","success")}}catch(e){"AbortError"!==e.name&&j("保存失败: "+e.message,"error")}},ae=e=>{es(e||null),eo([])};(0,s.useEffect)(()=>{if(!0!==T)return;let e=null,a=!1;return(async()=>{if(e=new WebSocket(await (0,D.getAuthenticatedWebSocketUrl)("/ws")),a)return e.close();e.onmessage=e=>{try{let{event:a,data:s}=JSON.parse(e.data);if("publish:success"===a||"download:success"===a){e_();let e=s.taskId||s.fileName;ew(a=>a.map(a=>a.id===e||a.fileName===s.fileName?{...a,progress:100,status:"completed"}:a)),"download:success"===a&&(s.alreadyExists?j(`${s.fileName} 已存在`,"warning"):j(`${s.fileName} 下载完成`,"success"),setTimeout(()=>{ew(a=>a.filter(a=>a.id!==e||"completed"!==a.status))},3e3))}"publish:progress"===a&&ew(e=>e.map(e=>{if(s.file&&e.fileName===s.file&&"upload"===e.type){let a=50;return"calculating-cid"===s.stage?a=25:"uploading"===s.stage?a=75:"complete"===s.stage&&(a=100),{...e,progress:a}}return e})),"download:progress"===a&&ew(e=>e.map(e=>e.id===s.taskId?{...e,progress:s.percent||0,loaded:s.loaded,total:s.total}:e)),"download:error"===a&&(ew(e=>e.map(e=>e.id===s.taskId?{...e,status:"error"}:e)),j(`下载失败: ${s.error}`,"error")),"download:status"===a&&ew(e=>e.map(e=>e.id===s.taskId?{...e,fileName:s.file||e.fileName}:e)),"download:cancelled"===a&&(ew(e=>e.map(e=>e.id===s.taskId?{...e,status:"cancelled"}:e)),j("下载已取消","warning"))}catch(e){console.warn("[App WS] Failed to parse message:",e.message)}}})(),()=>{a=!0,e?.close()}},[T,A?.address]),(0,s.useEffect)(()=>{if(!0===T&&A){e_(),eW();return}!1===T&&(Q([]),ee([]))},[T,A?.address]),(0,s.useEffect)(()=>{A||(eo([]),ed(null),em(null),ex(""),eg(null),ew([]),eM(""),es(null),ei("all"))},[A?.address]);let aa="all"===et?eH:"starred"===et?J.filter(e=>e.starred&&W(e.fileName).name.toLowerCase().includes(eC.toLowerCase())):Y.filter(e=>W(e.fileName).name.toLowerCase().includes(eC.toLowerCase())),as="starred"===et?[]:eP.filter(e=>e.name.toLowerCase().includes(eC.toLowerCase())),at=X(eU);return(0,a.jsxs)(M.default,{sidebar:({closeSidebar:e})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"sidebar-header sidebar-header-link",onClick:()=>window.location.href="/",children:[(0,a.jsx)(k.ArrowLeft,{size:18}),(0,a.jsx)("h1",{children:"MOST PEOPLE"})]}),(0,a.jsx)("nav",{className:"sidebar-nav",children:[{id:"all",icon:(0,a.jsx)(b,{size:18}),label:"本地"},{id:"starred",icon:(0,a.jsx)(v,{size:18}),label:"收藏"},{id:"trash",icon:(0,a.jsx)(n.Trash2,{size:18}),label:"回收站"}].map(s=>(0,a.jsxs)("button",{onClick:()=>{ei(s.id),es(null),eo([]),eM(""),e()},className:`sidebar-nav-btn ${et===s.id?"active":""}`,children:[s.icon,(0,a.jsx)("span",{children:s.label})]},s.id))}),(0,a.jsx)($.default,{})]}),headerTitle:(0,a.jsx)("h2",{className:"header-title",children:"all"===et?"本地":"starred"===et?"收藏":"回收站"}),headerRight:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"search-box",children:[(0,a.jsx)(y.Search,{size:14}),(0,a.jsx)("input",{type:"text",value:eC,onChange:e=>eM(e.target.value),placeholder:"搜索..."}),eC&&(0,a.jsx)("button",{onClick:()=>eM(""),children:(0,a.jsx)(h.X,{size:12})})]}),"trash"===et&&Y.length>0&&(0,a.jsx)("button",{onClick:eK,className:"btn btn-sm btn-empty-trash",children:"清空回收站"}),(0,a.jsx)("button",{onClick:()=>ek.open(),className:"btn btn-icon",children:(0,a.jsx)(g,{size:16})}),(0,a.jsx)("button",{onClick:()=>d(!c),className:"btn btn-icon",children:c?(0,a.jsx)(i.Sun,{size:16}):(0,a.jsx)(r.Moon,{size:16})})]}),children:["all"===et&&(0,a.jsxs)("div",{className:"action-grid",children:[(0,a.jsxs)("div",{className:`action-card upload ${er?"drag-over":""}`,onDragOver:e=>{e.preventDefault(),el(!0)},onDragLeave:()=>el(!1),onDrop:e=>{e.preventDefault(),el(!1),eV()&&eB()&&e0(e.dataTransfer.files)},children:[(0,a.jsx)("input",{type:"file",multiple:!0,onClick:e=>{eV()&&eB()||e.preventDefault()},onChange:e=>e0(e.target.files),className:"action-card-input"}),(0,a.jsx)(t.Upload,{size:20,className:"action-grid-icon"}),(0,a.jsx)("p",{children:"发布文件"})]}),(0,a.jsxs)("div",{className:"action-card action-card-download",onClick:()=>{eV()&&eB()&&ep.open()},children:[(0,a.jsx)(x.Download,{size:20,className:"action-grid-icon"}),(0,a.jsx)("p",{children:"下载文件"})]})]}),"all"===et&&(0,a.jsx)("div",{className:"breadcrumb",children:eU?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>ae(""),children:"全部内容"}),at.slice(1).map((e,t)=>(0,a.jsxs)(s.default.Fragment,{children:[(0,a.jsx)(u.ChevronRight,{size:12}),(0,a.jsx)("button",{onClick:()=>ae(e.path),className:t===at.length-2?"current":"",children:e.name}),t===at.length-2&&(0,a.jsx)("button",{onClick:()=>eY(e),className:"breadcrumb-edit-btn",children:(0,a.jsx)(w.Edit2,{size:12})})]},e.path))]}):null}),(0,a.jsxs)("div",{className:"content-grid",children:["trash"===et&&(0===aa.length?(0,a.jsxs)("div",{className:"empty-state app-empty-state",children:[(0,a.jsx)("p",{children:eC?"未找到相关文件":"回收站是空的"}),(0,a.jsx)(S.default,{label:"打开文件导航"})]}):(0,a.jsx)("div",{className:"file-grid",children:aa.map(e=>{var s;return(0,a.jsxs)("div",{onClick:()=>eo(a=>a.includes(e.cid)?a.filter(a=>a!==e.cid):[...a,e.cid]),onDoubleClick:()=>eG(e.cid),className:`card ${en.includes(e.cid)?"selected":""}`,children:[(0,a.jsx)("div",{className:"card-icon trash",children:(0,a.jsx)(m.FileText,{size:24,color:"#fff"})}),(0,a.jsx)("p",{className:"card-name",children:W(e.fileName).name}),(0,a.jsxs)("p",{className:"card-date",children:["删除于 ",(s=e.deletedAt)?new Date(s).toLocaleDateString("zh-CN"):""]})]},e.cid)})})),"trash"!==et&&(0===aa.length&&0===as.length?(0,a.jsxs)("div",{className:"empty-state app-empty-state",children:[(0,a.jsx)("p",{children:eC?"未找到相关文件":"starred"===et?"暂无的收藏":"暂无本地文件"}),(0,a.jsx)(S.default,{label:"打开文件导航"})]}):(0,a.jsxs)("div",{className:"file-grid",children:[as.map(e=>(0,a.jsx)(K,{folder:e,onClick:()=>ae(e.path)},e.path)),aa.map(e=>(0,a.jsx)(G,{file:e,isSelected:en.includes(e.cid),onSelect:eX,onPreview:e=>ed({...e,subtype:(0,B.getFileSubtype)(e.fileName)})},e.cid))]}))]}),eE&&(0,a.jsx)(E.ConfirmModal,{title:eE.title,message:eE.message,confirmText:eE.confirmText,danger:eE.danger,closeOnOverlayClick:eE.danger,onConfirm:eE.onConfirm,onClose:()=>eL(null)}),eD&&(0,a.jsx)(L.InputModal,{title:eD.title,placeholder:eD.placeholder,defaultValue:eD.defaultValue,confirmText:eD.confirmText,isLoading:eI,onConfirm:eD.onConfirm,onClose:()=>eT(null)}),ez&&(0,a.jsx)(Z,{items:en.map(e=>J.find(a=>a.cid===e)).filter(Boolean),allFolders:eO.map(e=>({path:e,name:e.split("/").pop()})),currentPath:eU,onMove:eQ,onClose:()=>eF.close()}),eu&&(0,a.jsx)(F.ModalOverlay,{onClose:()=>em(null),children:(0,a.jsxs)("div",{className:"share-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{children:"分享链接"}),(0,a.jsx)("button",{onClick:()=>em(null),className:"btn btn-icon",children:(0,a.jsx)(h.X,{size:18})})]}),(0,a.jsxs)("div",{className:"share-link-box",children:[(0,a.jsx)("div",{className:"share-link-text",children:`most://${eu.cid}?filename=${encodeURIComponent(eu.fileName)}`}),(0,a.jsx)("button",{onClick:()=>{eS(`most://${eu.cid}?filename=${encodeURIComponent(eu.fileName)}`)},className:`btn btn-circle btn-primary ${e$?"copied":""}`,children:e$?(0,a.jsx)(p.Check,{size:18}):(0,a.jsx)(f.Copy,{size:18})})]}),(0,a.jsx)("div",{className:"share-storage-note",children:(0,a.jsx)("span",{children:"本机在线时可下载;下载者完成后会默认继续做种。"})})]})}),eh&&(0,a.jsx)(F.ModalOverlay,{onClose:e5,children:(0,a.jsxs)("div",{className:"download-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{children:"下载文件"}),(0,a.jsx)("button",{onClick:e5,className:"btn btn-icon",children:(0,a.jsx)(h.X,{size:18})})]}),(0,a.jsxs)("div",{className:"download-link-row",children:[(0,a.jsx)("input",{type:"text",className:"input",value:ef,onChange:e=>{ex(e.target.value),eg(null)},placeholder:"输入 most:// 链接"}),(0,a.jsxs)("button",{type:"button",onClick:e9,disabled:!e6||ev||e1,className:"btn btn-secondary download-check-btn",children:[ev?(0,a.jsx)(N.Loader,{size:14,className:"spin"}):e4?(0,a.jsx)(p.Check,{size:14}):(0,a.jsx)(y.Search,{size:14}),ev?"检测中...":e4?"已通过":"检测"]})]}),ej&&(0,a.jsxs)("div",{className:`download-check-status ${ej.status}`,children:["success"===ej.status?(0,a.jsx)(p.Check,{size:14}):(0,a.jsx)(C,{size:14}),(0,a.jsx)("span",{children:ej.message})]}),(0,a.jsxs)("button",{onClick:e3,disabled:!e4||e1||ev,className:"btn btn-info btn-full",children:[e1?(0,a.jsx)(N.Loader,{size:14,className:"spin"}):(0,a.jsx)(x.Download,{size:14}),e1?"下载中...":"开始下载"]})]})}),ec&&(0,a.jsx)(z.default,{item:ec,isBackendReady:eR,getFileDownloadUrl:H.getFileDownloadUrl,onClose:()=>ed(null)}),en.length>0&&(0,a.jsxs)("div",{className:"batch-bar",children:[(0,a.jsxs)("span",{className:"batch-info",children:["已选 ",en.length," 项"]}),(0,a.jsx)("button",{onClick:()=>eo([]),className:"batch-dismiss",children:(0,a.jsx)(h.X,{size:16})}),(0,a.jsx)("div",{className:"batch-divider"}),"trash"===et?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:async()=>{!eV()||eB()&&(await Promise.all(en.map(e=>H.restoreTrashFile(e))),eo([]),j("已恢复","success"),e_(),eW())},className:"btn btn-sm",children:"恢复"}),(0,a.jsx)("button",{onClick:eJ,className:"btn btn-sm btn-danger",children:"永久删除"})]}):(0,a.jsxs)(a.Fragment,{children:[1===en.length&&(o=J.find(e=>e.cid===en[0]))&&"file"!==(0,B.getFileSubtype)(o.fileName)&&(0,a.jsx)("button",{onClick:()=>{let e=J.find(e=>e.cid===en[0]);if(e){let a=(0,B.getFileSubtype)(e.fileName);ed({...e,subtype:a})}},className:"btn btn-sm",children:"预览"}),(0,a.jsx)("button",{onClick:()=>{let e=en.some(e=>{let a=J.find(a=>a.cid===e);return a&&!a.starred});en.forEach(a=>{let s=J.find(e=>e.cid===a);s&&(e?!s.starred:s.starred)&&eZ(a)})},className:"btn btn-sm btn-star",children:"收藏"}),1===en.length&&(0,a.jsx)("button",{onClick:()=>{let e=J.find(e=>e.cid===en[0]);e&&eY(e)},className:"btn btn-sm",children:"重命名"}),(0,a.jsx)("button",{onClick:()=>eF.open(),className:"btn btn-sm btn-move",children:"移动"}),(0,a.jsx)("button",{onClick:eJ,className:"btn btn-sm btn-danger",children:"删除"}),1===en.length&&(0,a.jsx)("button",{onClick:()=>em(J.find(e=>e.cid===en[0])),className:"btn btn-sm",children:"分享"}),1===en.length&&(0,a.jsx)("button",{onClick:()=>{let e=J.find(e=>e.cid===en[0]);e&&e8(e)},className:"btn btn-sm",children:"另存为"})]})]}),eN&&(0,a.jsx)(F.ModalOverlay,{onClose:()=>ek.close(),closeOnOverlayClick:!0,children:(0,a.jsxs)("div",{className:"transfer-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{children:"传输"}),(0,a.jsx)("button",{onClick:()=>ek.close(),className:"btn btn-icon",children:(0,a.jsx)(h.X,{size:18})})]}),0===ey.length?(0,a.jsx)("div",{className:"empty-transfer",children:"暂无传输"}):ey.map(e=>(0,a.jsxs)("div",{className:"transfer-item",children:[(0,a.jsxs)("div",{className:"transfer-item-header",children:["upload"===e.type?(0,a.jsx)(t.Upload,{size:14}):(0,a.jsx)(x.Download,{size:14}),(0,a.jsx)("span",{className:"transfer-item-name",children:e.fileName}),"downloading"===e.status&&"download"===e.type&&(0,a.jsx)("button",{onClick:()=>e7(e),className:"transfer-item-cancel",children:(0,a.jsx)(h.X,{size:14})})]}),(0,a.jsxs)("div",{className:"transfer-progress-row",children:[(0,a.jsx)("progress",{className:`transfer-progress-meter ${"download"===e.type?"download":""} ${"error"===e.status?"error":""} ${"cancelled"===e.status?"cancelled":""}`,value:Math.max(0,Math.min(100,e.progress)),max:100,"aria-label":`${e.fileName} 传输进度`}),(0,a.jsx)("span",{className:"transfer-progress-text",children:"completed"===e.status?"完成":"error"===e.status?"失败":"cancelled"===e.status?"已取消":"cancelling"===e.status?"取消中":e.loaded&&e.total?`${_(e.loaded)}/${_(e.total)}`:`${e.progress}%`})]})]},e.id))]})})]})}],27627)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56379,s=>{s.v(t=>Promise.all(["static/chunks/14cowsqn95m1k.js","static/chunks/1814izi5gh.kp.js"].map(t=>s.l(t))).then(()=>t(14711)))},96001,s=>{s.v(t=>Promise.all(["static/chunks/09yql86dir9c4.js"].map(t=>s.l(t))).then(()=>t(73840)))},44955,s=>{s.v(t=>Promise.all(["static/chunks/0zapnvgy89mg..js"].map(t=>s.l(t))).then(()=>t(42379)))},65698,s=>{s.v(t=>Promise.all(["static/chunks/0bld2u_ld~va2.js","static/chunks/0tdqd1zunusgk.js","static/chunks/09yql86dir9c4.js"].map(t=>s.l(t))).then(()=>t(24433)))},15213,s=>{s.v(t=>Promise.all(["static/chunks/11z.0s6.42b.p.js"].map(t=>s.l(t))).then(()=>t(64853)))},71071,s=>{s.v(t=>Promise.all(["static/chunks/14cowsqn95m1k.js","static/chunks/0tdqd1zunusgk.js"].map(t=>s.l(t))).then(()=>t(37153)))},10898,s=>{s.v(t=>Promise.all(["static/chunks/0z48pmi6buytt.js","static/chunks/0tdqd1zunusgk.js","static/chunks/09yql86dir9c4.js"].map(t=>s.l(t))).then(()=>t(25771)))},65781,s=>{s.v(t=>Promise.all(["static/chunks/098.p.2-zm4p7.js"].map(t=>s.l(t))).then(()=>t(49989)))},63544,s=>{s.v(t=>Promise.all(["static/chunks/16u9f35gylw8l.js","static/chunks/09yql86dir9c4.js"].map(t=>s.l(t))).then(()=>t(69575)))},41372,s=>{s.v(t=>Promise.all(["static/chunks/0y.li-~3oybew.js","static/chunks/0tdqd1zunusgk.js","static/chunks/09yql86dir9c4.js"].map(t=>s.l(t))).then(()=>t(47235)))},73016,s=>{s.v(t=>Promise.all(["static/chunks/0bld2u_ld~va2.js","static/chunks/0l682p362d-5w.js","static/chunks/09yql86dir9c4.js","static/chunks/0tdqd1zunusgk.js"].map(t=>s.l(t))).then(()=>t(88854)))},10007,s=>{s.v(t=>Promise.all(["static/chunks/0bld2u_ld~va2.js","static/chunks/09yql86dir9c4.js","static/chunks/00tkdqwxch-3s.js","static/chunks/0tdqd1zunusgk.js"].map(t=>s.l(t))).then(()=>t(29636)))},15314,s=>{s.v(t=>Promise.all(["static/chunks/08576xhv~~jck.js"].map(t=>s.l(t))).then(()=>t(73103)))},72431,s=>{s.v(t=>Promise.all(["static/chunks/14cowsqn95m1k.js","static/chunks/0shy.t1fwqcev.js"].map(t=>s.l(t))).then(()=>t(54976)))},83206,s=>{s.v(t=>Promise.all(["static/chunks/0hf.aosc-7172.js","static/chunks/09yql86dir9c4.js"].map(t=>s.l(t))).then(()=>t(70259)))},92742,s=>{s.v(t=>Promise.all(["static/chunks/10ynz1dy483wf.js"].map(t=>s.l(t))).then(()=>t(85023)))},72460,s=>{s.v(t=>Promise.all(["static/chunks/0.4j.0k5a64vg.js"].map(t=>s.l(t))).then(()=>t(90705)))},52350,s=>{s.v(t=>Promise.all(["static/chunks/0.ozi1_x2.m.~.js"].map(t=>s.l(t))).then(()=>t(65415)))},15482,s=>{s.v(t=>Promise.all(["static/chunks/14a4fwbiq.l3z.js"].map(t=>s.l(t))).then(()=>t(35420)))},23151,s=>{s.v(t=>Promise.all(["static/chunks/0xgg0~kmf3gd-.js"].map(t=>s.l(t))).then(()=>t(6321)))},26042,s=>{s.v(t=>Promise.all(["static/chunks/06e1~1-z_ic9a.js"].map(t=>s.l(t))).then(()=>t(2494)))},70385,s=>{s.v(t=>Promise.all(["static/chunks/0ip9xrols_83o.js"].map(t=>s.l(t))).then(()=>t(76028)))},22966,s=>{s.v(t=>Promise.all(["static/chunks/07p~uva5pwgwe.js"].map(t=>s.l(t))).then(()=>t(43546)))},3802,s=>{s.v(t=>Promise.all(["static/chunks/14tm3qa-v9o-4.js"].map(t=>s.l(t))).then(()=>t(74761)))},81866,s=>{s.v(t=>Promise.all(["static/chunks/0hrw-r.xmvmsq.js"].map(t=>s.l(t))).then(()=>t(10666)))},12396,s=>{s.v(t=>Promise.all(["static/chunks/0jhdeq.j9_02m.js"].map(t=>s.l(t))).then(()=>t(87080)))},83703,s=>{s.v(t=>Promise.all(["static/chunks/0d3f-nk3c.2re.js"].map(t=>s.l(t))).then(()=>t(26949)))},40138,s=>{s.v(t=>Promise.all(["static/chunks/14dtd3l03v.kx.js"].map(t=>s.l(t))).then(()=>t(84668)))},624,s=>{s.v(t=>Promise.all(["static/chunks/0rt6rgnvr-s_p.js"].map(t=>s.l(t))).then(()=>t(19672)))},86124,s=>{s.v(t=>Promise.all(["static/chunks/01l3o90g~1z42.js"].map(t=>s.l(t))).then(()=>t(18453)))},27745,s=>{s.v(t=>Promise.all(["static/chunks/0hzg4al.v~8~m.js"].map(t=>s.l(t))).then(()=>t(95545)))},82028,s=>{s.v(t=>Promise.all(["static/chunks/0yl2t7cs-n_ng.js"].map(t=>s.l(t))).then(()=>t(97181)))},76263,s=>{s.v(t=>Promise.all(["static/chunks/14_po2rb_arn4.js"].map(t=>s.l(t))).then(()=>t(19416)))},45328,s=>{s.v(t=>Promise.all(["static/chunks/10x7~onqwp338.js"].map(t=>s.l(t))).then(()=>t(72346)))},55191,s=>{s.v(t=>Promise.all(["static/chunks/0dtohpf7~3d12.js"].map(t=>s.l(t))).then(()=>t(89467)))},55899,s=>{s.v(t=>Promise.all(["static/chunks/0_s~ebb-7b2hr.js"].map(t=>s.l(t))).then(()=>t(38546)))},91148,s=>{s.v(t=>Promise.all(["static/chunks/0fk~0~p7ivfn1.js"].map(t=>s.l(t))).then(()=>t(85605)))},15889,s=>{s.v(t=>Promise.all(["static/chunks/16i.qbk8t8gf_.js"].map(t=>s.l(t))).then(()=>t(16499)))},12656,s=>{s.v(t=>Promise.all(["static/chunks/04hcgsanv1hhu.js"].map(t=>s.l(t))).then(()=>t(22460)))},70055,s=>{s.v(t=>Promise.all(["static/chunks/0w87vbpkf-ogd.js"].map(t=>s.l(t))).then(()=>t(6299)))},45593,s=>{s.v(t=>Promise.all(["static/chunks/0kdnx_u-60k9s.js"].map(t=>s.l(t))).then(()=>t(24477)))},74464,s=>{s.v(t=>Promise.all(["static/chunks/01r.v-pqs1vrm.js"].map(t=>s.l(t))).then(()=>t(39534)))},50270,s=>{s.v(t=>Promise.all(["static/chunks/0hgz35c1ejbs9.js"].map(t=>s.l(t))).then(()=>t(78687)))},40172,s=>{s.v(t=>Promise.all(["static/chunks/1380op_pfk.qo.js"].map(t=>s.l(t))).then(()=>t(24936)))},63431,s=>{s.v(t=>Promise.all(["static/chunks/05of77xycbt8~.js"].map(t=>s.l(t))).then(()=>t(10671)))},93792,s=>{s.v(t=>Promise.all(["static/chunks/17ajyb5ogk5yj.js"].map(t=>s.l(t))).then(()=>t(94754)))},29975,s=>{s.v(t=>Promise.all(["static/chunks/15v.~.ne6ogkk.js"].map(t=>s.l(t))).then(()=>t(69694)))},91487,s=>{s.v(t=>Promise.all(["static/chunks/0vzlz.iboqo3c.js"].map(t=>s.l(t))).then(()=>t(5419)))},4218,s=>{s.v(t=>Promise.all(["static/chunks/0fw6juc~lsj3z.js"].map(t=>s.l(t))).then(()=>t(24279)))},38790,s=>{s.v(t=>Promise.all(["static/chunks/0_w-0-2z5oqd_.js"].map(t=>s.l(t))).then(()=>t(4100)))},41167,s=>{s.v(t=>Promise.all(["static/chunks/09v7_0gclxr46.js"].map(t=>s.l(t))).then(()=>t(18561)))},85488,s=>{s.v(t=>Promise.all(["static/chunks/09ngvtajm7e5y.js"].map(t=>s.l(t))).then(()=>t(12289)))},98039,s=>{s.v(t=>Promise.all(["static/chunks/0oz3yl6_-716p.js"].map(t=>s.l(t))).then(()=>t(12112)))},64198,s=>{s.v(t=>Promise.all(["static/chunks/0vsm0m5sxrb.3.js"].map(t=>s.l(t))).then(()=>t(74854)))},68434,s=>{s.v(t=>Promise.all(["static/chunks/180zln9pcq9ih.js"].map(t=>s.l(t))).then(()=>t(80496)))},40958,s=>{s.v(t=>Promise.all(["static/chunks/0~_ui9l7.2sxf.js"].map(t=>s.l(t))).then(()=>t(26719)))},24125,s=>{s.v(t=>Promise.all(["static/chunks/12-9n56l0y3yr.js"].map(t=>s.l(t))).then(()=>t(85412)))},83715,s=>{s.v(t=>Promise.all(["static/chunks/11hds.mg~4_r-.js"].map(t=>s.l(t))).then(()=>t(86834)))},66264,s=>{s.v(t=>Promise.all(["static/chunks/0~4f5p6tvn1lq.js"].map(t=>s.l(t))).then(()=>t(98369)))},37340,s=>{s.v(t=>Promise.all(["static/chunks/15m1_677az2cm.js"].map(t=>s.l(t))).then(()=>t(42763)))},78509,s=>{s.v(t=>Promise.all(["static/chunks/0n.qlfk~z7o.6.js"].map(t=>s.l(t))).then(()=>t(44612)))},43287,s=>{s.v(t=>Promise.all(["static/chunks/0n4t80gjc3q5h.js"].map(t=>s.l(t))).then(()=>t(52660)))},61918,s=>{s.v(t=>Promise.all(["static/chunks/11ibzaklcauw~.js"].map(t=>s.l(t))).then(()=>t(94007)))},5319,s=>{s.v(t=>Promise.all(["static/chunks/0e531nije_ln2.js"].map(t=>s.l(t))).then(()=>t(84179)))},12416,s=>{s.v(t=>Promise.all(["static/chunks/0xxlx772fr3x4.js"].map(t=>s.l(t))).then(()=>t(42107)))},39007,s=>{s.v(t=>Promise.all(["static/chunks/0t6h56rhg1y5i.js"].map(t=>s.l(t))).then(()=>t(80267)))},80949,s=>{s.v(t=>Promise.all(["static/chunks/00d9h1tddnnnd.js"].map(t=>s.l(t))).then(()=>t(68046)))},44248,s=>{s.v(t=>Promise.all(["static/chunks/0myp4sjagr~h0.js"].map(t=>s.l(t))).then(()=>t(8638)))},98773,s=>{s.v(t=>Promise.all(["static/chunks/03h_6oo-gqkhz.js"].map(t=>s.l(t))).then(()=>t(59560)))},85529,s=>{s.v(t=>Promise.all(["static/chunks/0~3ik-hfp9s-7.js"].map(t=>s.l(t))).then(()=>t(49807)))},89579,s=>{s.v(t=>Promise.all(["static/chunks/05zwemzfjx3sh.js"].map(t=>s.l(t))).then(()=>t(58980)))},86460,s=>{s.v(t=>Promise.all(["static/chunks/09ps~-43n5qyo.js"].map(t=>s.l(t))).then(()=>t(46066)))},22405,s=>{s.v(t=>Promise.all(["static/chunks/06dpc5df94.v1.js"].map(t=>s.l(t))).then(()=>t(72409)))},68761,s=>{s.v(t=>Promise.all(["static/chunks/109taw1pbh-0b.js"].map(t=>s.l(t))).then(()=>t(24848)))},23211,s=>{s.v(t=>Promise.all(["static/chunks/0mme-fm5d2oz2.js"].map(t=>s.l(t))).then(()=>t(49223)))},60722,s=>{s.v(t=>Promise.all(["static/chunks/01mfky9camw6i.js"].map(t=>s.l(t))).then(()=>t(38179)))},17435,s=>{s.v(t=>Promise.all(["static/chunks/075s7sn.ns~u5.js"].map(t=>s.l(t))).then(()=>t(7883)))},34862,s=>{s.v(t=>Promise.all(["static/chunks/17dyfxbq8yz8n.js"].map(t=>s.l(t))).then(()=>t(46565)))},75415,s=>{s.v(t=>Promise.all(["static/chunks/157z7bowux3xj.js"].map(t=>s.l(t))).then(()=>t(20172)))},92345,s=>{s.v(t=>Promise.all(["static/chunks/146oiw1bggtn4.js"].map(t=>s.l(t))).then(()=>t(92777)))},52375,s=>{s.v(t=>Promise.all(["static/chunks/08u211~k~qu52.js"].map(t=>s.l(t))).then(()=>t(5952)))},95841,s=>{s.v(t=>Promise.all(["static/chunks/0-n3pg7th.zza.js"].map(t=>s.l(t))).then(()=>t(8488)))},32140,s=>{s.v(t=>Promise.all(["static/chunks/0ujbnp38x63ek.js"].map(t=>s.l(t))).then(()=>t(12295)))},98424,s=>{s.v(t=>Promise.all(["static/chunks/0rb-ri481.kc9.js"].map(t=>s.l(t))).then(()=>t(57087)))},44545,s=>{s.v(t=>Promise.all(["static/chunks/15-o4kb-evqd7.js"].map(t=>s.l(t))).then(()=>t(57069)))},47020,s=>{s.v(t=>Promise.all(["static/chunks/0e-3e8h7g99yf.js"].map(t=>s.l(t))).then(()=>t(3032)))},38160,s=>{s.v(t=>Promise.all(["static/chunks/0j4-d0qf.v~kn.js"].map(t=>s.l(t))).then(()=>t(81124)))},59676,s=>{s.v(t=>Promise.all(["static/chunks/0yq3kh.hchtm_.js"].map(t=>s.l(t))).then(()=>t(64439)))},42116,s=>{s.v(t=>Promise.all(["static/chunks/126enaq~f7scl.js"].map(t=>s.l(t))).then(()=>t(17804)))},86237,s=>{s.v(t=>Promise.all(["static/chunks/08.72abkgwy9g.js"].map(t=>s.l(t))).then(()=>t(60730)))},46786,s=>{s.v(t=>Promise.all(["static/chunks/104e5nmc.c-pl.js"].map(t=>s.l(t))).then(()=>t(55509)))},43377,s=>{s.v(t=>Promise.all(["static/chunks/0rsnmahfd.59p.js"].map(t=>s.l(t))).then(()=>t(93816)))},14920,s=>{s.v(t=>Promise.all(["static/chunks/07dynrbvd3.f4.js"].map(t=>s.l(t))).then(()=>t(85335)))},68269,s=>{s.v(t=>Promise.all(["static/chunks/0runh28p_gg6..js"].map(t=>s.l(t))).then(()=>t(93042)))},8241,s=>{s.v(t=>Promise.all(["static/chunks/1045hfzu533z0.js"].map(t=>s.l(t))).then(()=>t(40889)))},47519,s=>{s.v(t=>Promise.all(["static/chunks/0g0u7785a73vo.js"].map(t=>s.l(t))).then(()=>t(22456)))},87078,s=>{s.v(t=>Promise.all(["static/chunks/0kq~edq42o1-c.js"].map(t=>s.l(t))).then(()=>t(23082)))},1390,s=>{s.v(t=>Promise.all(["static/chunks/0~_0ys.2whxbw.js"].map(t=>s.l(t))).then(()=>t(83621)))},12614,s=>{s.v(t=>Promise.all(["static/chunks/1037jlyw5~7ht.js"].map(t=>s.l(t))).then(()=>t(59931)))},18349,s=>{s.v(t=>Promise.all(["static/chunks/0cn9a7aimbdzq.js"].map(t=>s.l(t))).then(()=>t(61600)))},7291,s=>{s.v(t=>Promise.all(["static/chunks/0gze5uso1mbe9.js"].map(t=>s.l(t))).then(()=>t(21839)))},65691,s=>{s.v(t=>Promise.all(["static/chunks/09zmlfljowj1~.js"].map(t=>s.l(t))).then(()=>t(32678)))},3129,s=>{s.v(t=>Promise.all(["static/chunks/0xj24-70ptdzp.js"].map(t=>s.l(t))).then(()=>t(16504)))},52651,s=>{s.v(t=>Promise.all(["static/chunks/05g2q0w5b34.g.js"].map(t=>s.l(t))).then(()=>t(78851)))},31029,s=>{s.v(t=>Promise.all(["static/chunks/0e5zvj_rh0z3m.js"].map(t=>s.l(t))).then(()=>t(40853)))},40947,s=>{s.v(t=>Promise.all(["static/chunks/0g_fpgh7drfda.js"].map(t=>s.l(t))).then(()=>t(22015)))},44709,s=>{s.v(t=>Promise.all(["static/chunks/0f4y~rkk-n81e.js"].map(t=>s.l(t))).then(()=>t(83064)))},7543,s=>{s.v(t=>Promise.all(["static/chunks/0v68pdrp54lb-.js"].map(t=>s.l(t))).then(()=>t(85711)))},77836,s=>{s.v(t=>Promise.all(["static/chunks/0qqupeexg83u7.js"].map(t=>s.l(t))).then(()=>t(22575)))},29630,s=>{s.v(t=>Promise.all(["static/chunks/0ys0l5au.9c2c.js"].map(t=>s.l(t))).then(()=>t(17253)))},92030,s=>{s.v(t=>Promise.all(["static/chunks/0bliugh5lxw55.js"].map(t=>s.l(t))).then(()=>t(68540)))},63880,s=>{s.v(t=>Promise.all(["static/chunks/0m68p9txef5rs.js"].map(t=>s.l(t))).then(()=>t(78194)))},53289,s=>{s.v(t=>Promise.all(["static/chunks/0.t5wlt51zou5.js","static/chunks/0tdqd1zunusgk.js","static/chunks/09yql86dir9c4.js"].map(t=>s.l(t))).then(()=>t(97999)))},83704,s=>{s.v(t=>Promise.all(["static/chunks/0jy63h3i-y69i.js","static/chunks/0tdqd1zunusgk.js","static/chunks/09yql86dir9c4.js"].map(t=>s.l(t))).then(()=>t(5567)))},92486,s=>{s.v(t=>Promise.all(["static/chunks/0~.-vxi5oc.r0.js"].map(t=>s.l(t))).then(()=>t(39099)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67585,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return a}});let s=e.r(32061);function a({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new s.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,n)=>{"use strict";function s(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return s}})},52157,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return o}});let s=e.r(18050),a=e.r(74080),r=e.r(63599),i=e.r(9885),l=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=r.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let s=t.reactLoadableManifest;for(let t of e){if(!s[t])continue;let e=s[t].files;n.push(...e)}}if(0===n.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,s.jsx)(s.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,s.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,a.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return c}});let s=e.r(18050),a=e.r(71645),r=e.r(67585),i=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},n=(0,a.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,s.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?a.Suspense:a.Fragment,u=t.ssr?(0,s.jsxs)(s.Fragment,{children:["u"<typeof window?(0,s.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,s.jsx)(n,{...e})]}):(0,s.jsx)(r.BailoutToCSR,{reason:"next/dynamic",children:(0,s.jsx)(n,{...e})});return(0,s.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},70703,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a}});let s=e.r(55682)._(e.r(69093));function a(e,t){let n={};"function"==typeof e&&(n.loader=e);let a={...n,...t};return(0,s.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},58559,e=>{"use strict";var t=e.i(18050),n=e.i(71645),s=e.i(70703),a=e.i(18566),r=e.i(16327),i=e.i(67927),l=e.i(56420);let o=(0,l.default)("pencil-ruler",[["path",{d:"M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13",key:"orapub"}],["path",{d:"m8 6 2-2",key:"115y1s"}],["path",{d:"m18 16 2-2",key:"ee94s4"}],["path",{d:"m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17",key:"cfq27r"}],["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"}]]);var c=e.i(72382),d=e.i(26091),u=e.i(26067);let h=(0,l.default)("move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]);var p=e.i(6537),m=e.i(96699),f=e.i(10566),x=e.i(77071),j=e.i(56522),b=e.i(66595),y=e.i(35965),g=e.i(73474),N=e.i(63676),v=e.i(59665),w=e.i(39626);e.i(4121);var S=e.i(88361),k=e.i(47910),C=e.i(57667),P=e.i(3593),z=e.i(71192),M=e.i(66112),$=e.i(77816),E=e.i(3789),T=e.i(53138),A=e.i(51757),R=e.i(31214),O=e.i(62368);let L=(0,l.default)("ellipsis",[["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"}]]);var U=e.i(25981);function _({sync:e}){let s=(0,n.useRef)(null),[a,r]=(0,n.useState)(!1),i=(0,z.useUserStore)(e=>e.wallet),l=null!==e.action;async function o(e){r(!1),await e()}return(0,n.useEffect)(()=>{if(a)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){s.current?.contains(e.target)||r(!1)}},[a]),(0,t.jsxs)("div",{className:"note-more",ref:s,children:[(0,t.jsx)("button",{className:"btn btn-icon note-more-trigger",onClick:()=>r(e=>!e),title:"更多","aria-label":"更多",children:(0,t.jsx)(L,{size:16})}),a&&(0,t.jsxs)("div",{className:"note-more-menu",children:[(0,t.jsxs)("div",{className:`note-sync-status ${e.hasConflict?"conflict":""}`,children:[(0,t.jsx)("span",{className:"note-sync-status-icon",children:e.hasConflict?(0,t.jsx)(T.AlertTriangle,{size:16}):"synced"===e.status?(0,t.jsx)(A.CheckCircle2,{size:16}):(0,t.jsx)(R.Cloud,{size:16})}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"云同步"}),(0,t.jsx)("small",{children:e.statusLabel})]})]}),(0,t.jsxs)("button",{className:"note-more-item",onClick:()=>o(e.exportLocalBackup),disabled:!i||l,children:[(0,t.jsx)(U.Upload,{size:16}),"本地导出"]}),(0,t.jsxs)("button",{className:"note-more-item",onClick:()=>o(e.importLocalBackup),disabled:!i||l,children:[(0,t.jsx)(O.Download,{size:16}),"本地导入"]})]})]})}var D=e.i(11241),F=e.i(27648);function B({children:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"sidebar-header sidebar-header-link",onClick:()=>{window.location.href="/"},children:[(0,t.jsx)(D.ArrowLeft,{size:18}),(0,t.jsx)("h1",{children:"MOST PEOPLE"})]}),e,(0,t.jsx)(F.default,{})]})}let W="https://api.most.box/auth/backup";async function I(e,t){let n=await e.clone().json().catch(()=>null);return n?.error||t}function G(e,t){return(0,M.mostEncode)(JSON.stringify({notes:e||[]}),t)}function J(e,t){if(!String(e||"").startsWith("mp://1"))throw Error("无效的备份数据格式");let n=(0,M.mostDecode)(e,t);if(!n)throw Error("解密失败,请确认当前 Web3 登录账号正确");let s=JSON.parse(n);if(!Array.isArray(s.notes))throw Error("备份数据缺少 notes");return s}async function K(e){return(0,E.calculateNoteCid)(JSON.stringify({notes:e||[]}))}async function X(e,t,n=W){let s=Date.now().toString(),a=new URL(n).pathname,r=`${s}:${String(t).toUpperCase()}:${a}`,{address:i,signature:l}=await (0,M.mostSignMessage)(e.danger,r);return{Authorization:`${i},${s},${l}`}}async function V(e,t){let n=JSON.stringify({notes:t||[]}),s=await (0,E.calculateNoteCid)(n);return{cid:s,body:G(t,e.danger),headers:{"Content-Type":"text/plain","x-backup-cid":s,...await X(e,"PUT",W)}}}async function q(e,t,n=W){let s=await V(e,t),a=await fetch(n,{method:"PUT",headers:s.headers,body:s.body});if(!a.ok)throw Error(await I(a,"云备份失败"));return{cid:s.cid}}async function Q(e,t=W){let n=await fetch(t,{method:"GET",headers:await X(e,"GET",t)});if(404===n.status)return{found:!1,cid:"",time:0,notes:[]};if(!n.ok)throw Error(await I(n,"云端恢复失败"));let s=await n.text();if(!s)throw Error("云端无备份数据");let a=J(s,e.danger);return{found:!0,cid:n.headers.get("x-backup-cid")||"",time:Number(n.headers.get("x-backup-time")||0),notes:a.notes}}let H=!1,Y="",Z="";function ee(e,t){return e instanceof Error?e.message:t}let et=(0,s.default)(()=>e.A(71504).then(e=>e.MilkdownEditor),{loadableGenerated:{modules:[36975]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"note-editor-loading",children:"加载编辑器..."})});function en(e,t){return e instanceof Error?e.message:t}function es(e){return"directory"===e.type?(0,E.normalizeNotePath)(e.path?`${e.path}/${e.name}`:e.name):(0,E.getNoteFullPath)(e)}function ea(){let e=(0,a.useRouter)(),s=(0,a.useSearchParams)(),r=(0,n.useRef)(null),i=function(){let e=(0,z.useUserStore)(e=>e.wallet),t=(0,z.useUserStore)(e=>e.openLoginModal),s=(0,P.useAppStore)(e=>e.addToast),a=(0,P.useAppStore)(e=>e.notes),r=(0,P.useAppStore)(e=>e.importNotes),i=(0,P.useAppStore)(e=>e.localDataReady),[l,o]=(0,n.useState)(null),[c,d]=(0,n.useState)(e?"idle":"disabled"),[u,h]=(0,n.useState)(H),[p,m]=(0,n.useState)(!1),f=(0,n.useRef)(0),x=(0,n.useCallback)(e=>{H=e,h(e)},[]),j=(0,n.useCallback)((e=!1)=>{let n=z.useUserStore.getState().wallet;return n||(e||t(),null)},[s,t]),b=(0,n.useCallback)(async(e={})=>{let{silent:t=!1,confirmConflict:n=!0}=e,a=j(t);if(!a)return d("disabled"),!1;if(H&&n&&!window.confirm("本地数据与云端不一致,本地修改将会覆盖云端数据,是否继续?"))return t||s("已取消同步","info"),d("conflict"),!1;o("save"),d("uploading");try{let e=P.useAppStore.getState().notes;return Y=(await q(a,e)).cid,Z=a.address,x(!1),d("synced"),t||s("云端备份已更新","success"),!0}catch(e){return d("error"),t?console.info(ee(e,"云备份失败")):s(ee(e,"云备份失败"),"error"),!1}finally{o(null)}},[s,j,x]),y=(0,n.useCallback)(async(e={})=>{let{manual:t=!1,uploadWhenMissing:n=!1}=e,a=j(!t);if(!a)return d("disabled"),!1;o(t?"restore":"sync"),d(t?"restoring":"checking");try{let e=await Q(a),i=P.useAppStore.getState().notes;if(!e.found){if(x(!1),Z=a.address,n&&i.length>0)return o(null),b({silent:!0,confirmConflict:!1});return d(i.length>0?"idle":"synced"),t&&s("云端暂无备份","info"),!1}let l=e.notes||[],c=await K(i),u=e.cid||await K(l);if(i.length>0&&c!==u&&!window.confirm("云端备份与本地笔记不一致。恢复会覆盖本地笔记,是否继续?"))return x(!0),d("conflict"),t&&s("已取消恢复","info"),!1;return c!==u&&r(l),Y=u,Z=a.address,x(!1),d("synced"),t&&s("已从云端恢复","success"),!0}catch(e){return d("error"),t?s(ee(e,"云端恢复失败"),"error"):console.info(ee(e,"云端恢复失败")),!1}finally{o(null)}},[s,r,j,x,b]),g=(0,n.useCallback)(()=>{let e=j(!1);if(e)try{let t=P.useAppStore.getState().notes,n=G(t,e.danger),a=new Blob([n],{type:"text/plain"}),r=URL.createObjectURL(a),i=document.createElement("a");i.href=r,i.download=`${e.address.slice(-4)}-most-notes-${new Date().toISOString().slice(0,10)}.txt`,i.click(),URL.revokeObjectURL(r),s("笔记已导出到本地","success")}catch(e){s(ee(e,"导出失败"),"error")}},[s,j]),N=(0,n.useCallback)(()=>{let e=j(!1);if(!e)return;let t=document.createElement("input");t.type="file",t.accept=".txt",t.onchange=t=>{let n=t.target.files?.[0];if(!n)return;let a=new FileReader;a.onload=async()=>{try{let t=a.result,n=J(t,e.danger);if(P.useAppStore.getState().notes.length>0&&!window.confirm("恢复将覆盖当前本地笔记,是否继续?"))return void s("已取消恢复","info");r(n.notes),s("已从本地恢复笔记","success"),await b({silent:!0})}catch(e){s(ee(e,"导入失败"),"error")}},a.readAsText(n)},t.click()},[s,r,j,b]);(0,n.useEffect)(()=>{if(!i)return;if(!e){Z="",Y="",m(!1),x(!1),d("disabled");return}if(Z===e.address){m(!0),d(H?"conflict":"synced");return}let t=!1;return m(!1),y({manual:!1,uploadWhenMissing:!0}).finally(()=>{t||m(!0)}),()=>{t=!0}},[i,y,x,e]),(0,n.useEffect)(()=>{if(!e||!i||!p||(f.current+=1,f.current<=1))return;let t=window.setTimeout(async()=>{let e=P.useAppStore.getState().notes;await K(e)!==Y&&await b({silent:!0})},900);return()=>window.clearTimeout(t)},[p,i,a,b,e]);let v=(0,n.useMemo)(()=>(function(e){switch(e){case"disabled":return"未登录";case"checking":return"检查中";case"uploading":return"同步中";case"restoring":return"恢复中";case"synced":return"已同步";case"conflict":return"有冲突";case"error":return"同步失败";default:return"待同步"}})(c),[c]);return{action:l,status:c,statusLabel:v,hasConflict:u,uploadNow:b,restoreFromCloud:y,exportLocalBackup:g,importLocalBackup:N}}(),l=(0,P.useAppStore)(e=>e.addToast),C=(0,P.useAppStore)(e=>e.isDarkMode),T=(0,P.useAppStore)(e=>e.setIsDarkMode),A=(0,z.useUserStore)(e=>e.wallet),R=(0,z.useUserStore)(e=>e.openLoginModal),O=(0,P.useAppStore)(e=>e.notes),L=(0,P.useAppStore)(e=>e.notesPath),U=(0,P.useAppStore)(e=>e.setNotesPath),D=(0,P.useAppStore)(e=>e.saveNote),F=(0,P.useAppStore)(e=>e.deleteNote),W=(0,P.useAppStore)(e=>e.renameNote),I=(0,P.useAppStore)(e=>e.localDataReady),X=s.get("cid")||"",V=O.find(e=>e.cid===X),ea=!!X,ei=ea&&"edit"===s.get("mode"),[el,eo]=(0,n.useState)(""),[ec,ed]=(0,n.useState)(null),[eu,eh]=(0,n.useState)(null),[ep,em]=(0,n.useState)(null),[ef,ex]=(0,n.useState)(""),[ej,eb]=(0,n.useState)(""),[ey,eg]=(0,n.useState)(""),[eN,ev]=(0,n.useState)(""),[ew,eS]=(0,n.useState)(""),[ek,eC]=(0,n.useState)(""),[eP,ez]=(0,n.useState)(!1),[eM,e$]=(0,n.useState)(""),[eE,eT]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(!X){ex(""),eb("");return}if(!V){ex(""),eb(I?"笔记不存在":"");return}if(V.content.startsWith("mp://1")){if(!A){ex(""),eb("请先登录 Web3 账号以解密此笔记");return}let e=(0,M.mostDecode)(V.content,A.danger);if(!e){ex(""),eb("无法解密,请确认当前 Web3 账号正确");return}ex(e),eb("");return}ex(V.content||""),eb("")},[X,I,V,A]),(0,n.useEffect)(()=>{if(!ei)return void eT(!1);if(!X||!V){ev(""),eS(""),eC(""),ez(!1),e$(I?"笔记不存在":"");return}if(ev(V.name),eS(V.path||""),ez(!0===V.isSecret||V.content.startsWith("mp://1")),V.content.startsWith("mp://1")){if(!A){eC(""),e$("请先登录 Web3 账号以解密此笔记");return}let e=(0,M.mostDecode)(V.content,A.danger);if(!e){eC(""),e$("无法解密,请确认当前 Web3 账号正确");return}eC(e),e$("");return}eC(V.content||""),e$("")},[X,ei,I,V,A]),(0,n.useEffect)(()=>{eg(V?.name||"")},[V?.cid,V?.name]);let eA=(0,n.useMemo)(()=>(0,E.filterNotesByPath)(O,L,el),[O,L,el]),eR=eA.filter(e=>"file"===e.type).length,eO=V?.isSecret===!0||V?.content.startsWith("mp://1")===!0,eL=(0,n.useMemo)(()=>{let e=L.split("/").filter(Boolean);return[{label:"全部笔记",path:""},...e.map((t,n)=>({label:t,path:e.slice(0,n+1).join("/")}))]},[L]),eU=(0,n.useMemo)(()=>(function(e){let t=new Set;for(let n of e){let e=(0,E.normalizeNotePath)(n.path).split("/").filter(Boolean);for(let n=0;n<e.length;n+=1)t.add(e.slice(0,n+1).join("/"))}return Array.from(t).sort((e,t)=>e.localeCompare(t,"zh-CN")).map(e=>{let t=e.split("/");return{path:e,name:t[t.length-1]||e,parentPath:t.slice(0,-1).join("/"),depth:Math.max(t.length-1,0)}})})(O),[O]);function e_(){return!!A||(R(),!1)}async function eD(){if(e_()){if(!V)return void l("笔记不存在","error");if(!eN.trim())return void l("请输入笔记名称","warning");eT(!0);try{let t=r.current?.getMarkdown()??ek,n=eP?(0,M.mostEncode)(t,A.danger):t,s=await D({cid:V.cid,name:eN,path:ew,content:n,isSecret:eP});eC(t),l("笔记已保存","success"),await i.uploadNow({silent:!0}),e.replace(`/note/?cid=${encodeURIComponent(s)}`)}catch(e){l(en(e,"保存失败"),"error")}finally{eT(!1)}}}async function eF(){if(!e_()||!V)return;let e=ey.trim();if(!e){eg(V.name),l("请输入笔记名称","warning");return}if(e!==V.name)try{W((0,E.getNoteFullPath)(V),V.path,e),l("已重命名","success"),await i.uploadNow({silent:!0})}catch(e){eg(V.name),l(en(e,"重命名失败"),"error")}}async function eB(e){if(ep)try{W(es(ep),e,ep.name),em(null),l("已移动","success"),await i.uploadNow({silent:!0})}catch(e){l(en(e,"移动失败"),"error")}}let eW=(0,t.jsxs)("div",{className:"note-header-title",children:[(0,t.jsx)("h2",{className:"header-title",children:"笔记"}),(0,t.jsxs)("span",{children:[O.length," 篇"]})]}),eI=(0,t.jsxs)("div",{className:"note-theme-wrap",children:[(0,t.jsx)("button",{className:"btn btn-icon",onClick:()=>T(!C),title:"切换主题","aria-label":"切换主题",children:C?(0,t.jsx)(y.Sun,{size:16}):(0,t.jsx)(m.Moon,{size:16})}),(0,t.jsx)(_,{sync:i})]}),eG=(0,t.jsxs)("section",{className:"note-list-panel note-sidebar-list","aria-label":"笔记列表",children:[(0,t.jsxs)("div",{className:"note-list-header",children:[(0,t.jsx)("div",{className:"note-current-location",children:(0,t.jsx)("div",{className:"note-breadcrumbs",children:eL.map((e,s)=>(0,t.jsxs)(n.default.Fragment,{children:[s>0&&(0,t.jsx)("span",{children:"/"}),(0,t.jsx)("button",{onClick:()=>U(e.path),children:e.label})]},e.path||"root"))})}),(0,t.jsxs)("span",{className:"note-count",children:[eR," 篇"]})]}),(0,t.jsxs)("div",{className:"note-search",children:[(0,t.jsx)(b.Search,{size:16}),(0,t.jsx)("input",{className:"input input-flex",value:el,onChange:e=>eo(e.target.value),placeholder:"搜索笔记"})]}),0===eA.length?(0,t.jsxs)("div",{className:"note-empty-state",children:[(0,t.jsx)(f.NotebookPen,{size:32}),(0,t.jsx)("p",{children:el?"未找到笔记":"还没有笔记"})]}):(0,t.jsx)("div",{className:"note-list",children:eA.map(n=>(0,t.jsx)("article",{className:`note-list-item ${"file"===n.type&&n.cid===X?"active":""}`,children:(0,t.jsxs)("button",{className:`note-list-item-main ${"directory"===n.type?"folder":""}`,onClick:()=>{if("directory"===n.type)U((0,E.normalizeNotePath)(n.path?`${n.path}/${n.name}`:n.name));else e.push(`/note/?cid=${encodeURIComponent(n.cid)}`)},children:[(0,t.jsx)("span",{className:"note-list-icon",children:"directory"===n.type?(0,t.jsx)(u.Folder,{size:18}):n.isSecret?(0,t.jsx)(p.Lock,{size:18}):(0,t.jsx)(d.FileText,{size:18})}),(0,t.jsxs)("span",{className:"note-list-copy",children:[(0,t.jsx)("span",{className:"note-list-name",children:n.name}),"file"===n.type?(0,t.jsx)("span",{className:"note-list-preview",children:n.isSecret||n.content.startsWith("mp://1")?"私密内容已加密":String(n.content||"").replace(/```[\s\S]*?```/g," ").replace(/!\[[^\]]*]\([^)]*\)/g," ").replace(/\[([^\]]+)]\([^)]*\)/g,"$1").replace(/[#>*_`~|-]/g," ").replace(/\s+/g," ").trim()||"空白笔记"}):(0,t.jsx)("span",{className:"note-list-preview",children:"文件夹"})]}),"file"===n.type&&(0,t.jsx)("span",{className:"note-list-date",children:(0,$.formatDate)(n.updated_at)})]})},`${n.cid}:${n.path}:${n.name}`))}),(0,t.jsx)("div",{className:"note-create-btn",children:(0,t.jsxs)("button",{className:"btn",onClick:function(){e_()&&ed({title:"新建笔记",placeholder:"笔记名称",confirmText:"创建",onConfirm:async t=>{if(e_())try{let n=await D({name:t,path:L,content:"",isSecret:!1});ed(null),l("笔记已创建","success"),await i.uploadNow({silent:!0}),e.push(`/note/?cid=${encodeURIComponent(n)}&mode=edit`)}catch(e){l(en(e,"创建失败"),"error")}}})},children:[(0,t.jsx)(x.Plus,{size:16}),"新笔记"]})})]});return(0,t.jsxs)(v.default,{sidebar:()=>(0,t.jsx)(B,{children:eG}),headerTitle:eW,headerRight:eI,children:[(0,t.jsx)("main",{className:`note-page note-browser-page ${ea?"has-editor":""}`,children:(0,t.jsx)("section",{className:"note-workspace",children:(0,t.jsx)("section",{className:"note-editor-panel","aria-label":ei?"笔记编辑器":"笔记阅读器",children:ea?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"note-editor-panel-header",children:[(0,t.jsxs)("div",{className:"note-editor-title-area",children:[ei?(0,t.jsx)("input",{className:"note-title-input",value:eN,onChange:e=>ev(e.target.value),placeholder:"笔记名称",disabled:!V}):V?(0,t.jsx)("input",{className:"note-title-input",value:ey,onBlur:eF,onChange:e=>eg(e.target.value),onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur(),"Escape"===e.key&&(eg(V.name),e.currentTarget.blur())},placeholder:"笔记名称",title:"重命名"}):(0,t.jsx)("h3",{children:"未命名笔记"}),V&&(0,t.jsxs)("div",{className:"note-editor-info",children:[(0,t.jsx)("span",{children:ei?"编辑模式":"阅读模式"}),(0,t.jsx)("span",{children:ei?eP?"私密":"公开":eO?"私密":"公开"}),(0,t.jsx)("span",{children:(0,$.formatDate)(V.updated_at)})]})]}),(0,t.jsxs)("div",{className:"note-editor-actions",children:[(0,t.jsx)("button",{type:"button",className:"btn btn-icon",onClick:ei?function(){e.push(V?`/note/?cid=${encodeURIComponent(V.cid)}`:"/note/")}:()=>e.push("/note/"),title:ei?"取消":"关闭","aria-label":ei?"取消":"关闭",children:(0,t.jsx)(N.X,{size:16})}),ei?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{className:`btn btn-sm ${eP?"btn-warning":"btn-secondary"}`,onClick:()=>ez(!eP),disabled:!V,children:[eP?(0,t.jsx)(p.Lock,{size:16}):(0,t.jsx)(c.Eye,{size:16}),eP?"私密":"公开"]}),(0,t.jsxs)("button",{className:"btn btn-sm btn-primary",onClick:eD,disabled:eE||!!eM||!V,children:[(0,t.jsx)(j.Save,{size:16}),eE?"保存中":"保存"]})]}):V&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"btn btn-icon",onClick:()=>{e_()&&em(V)},title:"移动","aria-label":"移动",children:(0,t.jsx)(h,{size:16})}),(0,t.jsx)("button",{type:"button",className:"btn btn-icon note-editor-action-danger",onClick:()=>(function(t){if(!e_())return;let n="directory"===t.type;eh({title:n?"删除文件夹":"删除笔记",message:`确定要删除「${t.name}」吗?此操作不可撤销。`,confirmText:"删除",onConfirm:async()=>{F(n?void 0:t.cid,t.path,t.name),eh(null),l("已删除","success"),await i.uploadNow({silent:!0}),"file"===t.type&&t.cid===X&&e.push("/note/")}})})(V),title:"删除","aria-label":"删除",children:(0,t.jsx)(g.Trash2,{size:16})}),(0,t.jsxs)("button",{type:"button",className:"btn btn-sm btn-primary",onClick:()=>{e.push(`/note/?cid=${encodeURIComponent(V.cid)}&mode=edit`)},disabled:!!ej,title:"编辑","aria-label":"编辑",children:[(0,t.jsx)(o,{size:16}),"编辑"]})]})]})]}),ei?eM?(0,t.jsxs)("div",{className:"note-empty-state editor-error",children:[(0,t.jsx)(p.Lock,{size:36}),(0,t.jsx)("p",{children:eM})]}):V?(0,t.jsx)("div",{className:"note-editor-frame editing",children:(0,t.jsx)(et,{ref:r,content:ek,onChange:eC,className:"milkdown-editor"})}):(0,t.jsxs)("div",{className:"note-empty-state editor-error",children:[(0,t.jsx)(f.NotebookPen,{size:36}),(0,t.jsx)("p",{children:I?"笔记不存在":"加载中..."})]}):ej?(0,t.jsxs)("div",{className:"note-empty-state editor-error",children:[(0,t.jsx)(p.Lock,{size:36}),(0,t.jsx)("p",{children:ej})]}):V?(0,t.jsx)("div",{className:"note-editor-frame reading",children:(0,t.jsx)(et,{content:ef,readOnly:!0,className:"milkdown-editor"})}):(0,t.jsxs)("div",{className:"note-empty-state editor-error",children:[(0,t.jsx)(f.NotebookPen,{size:36}),(0,t.jsx)("p",{children:I?"笔记不存在":"加载中..."})]})]}):(0,t.jsxs)("div",{className:"note-editor-empty",children:[(0,t.jsx)("div",{className:"note-editor-empty-icon",children:(0,t.jsx)(f.NotebookPen,{size:32})}),(0,t.jsx)("h3",{children:"没有打开的笔记"}),(0,t.jsx)("p",{children:O.length>0?"选择一篇笔记继续":"创建第一篇笔记"}),(0,t.jsx)(w.default,{label:"打开笔记列表",variant:"default"})]})})})}),ec&&(0,t.jsx)(k.InputModal,{title:ec.title,placeholder:ec.placeholder,defaultValue:ec.defaultValue,confirmText:ec.confirmText,onConfirm:ec.onConfirm,onClose:()=>ed(null)}),eu&&(0,t.jsx)(S.ConfirmModal,{title:eu.title,message:eu.message,confirmText:eu.confirmText,danger:!0,onConfirm:eu.onConfirm,onClose:()=>eh(null)}),ep&&(0,t.jsx)(er,{target:ep,directories:eU,onMove:eB,onClose:()=>em(null)})]})}function er({target:e,directories:s,onMove:a,onClose:l}){let o=(0,E.normalizeNotePath)(e.path||""),c=es(e),d=s.filter(t=>"directory"!==e.type||t.path!==c&&!t.path.startsWith(`${c}/`)),[h,p]=(0,n.useState)(o),[m,f]=(0,n.useState)(""),[x,j]=(0,n.useState)(new Set),b=(0,E.normalizeNotePath)(m),y=m.trim()?b:h,g=(0,E.normalizeNotePath)(y)===o,v=new Map;for(let e of d){let t=v.get(e.parentPath)||[];t.push(e),v.set(e.parentPath,t)}let w=d.filter(e=>{if(!e.parentPath)return!0;let t=e.parentPath.split("/").filter(Boolean);return t.every((e,n)=>x.has(t.slice(0,n+1).join("/")))}),S=[{label:"全部笔记",path:""},...h.split("/").filter(Boolean).map((e,t,n)=>({label:e,path:n.slice(0,t+1).join("/")}))];function k(e){p((0,E.normalizeNotePath)(e)),f("")}return(0,t.jsx)(C.ModalOverlay,{onClose:l,children:(0,t.jsxs)("div",{className:"note-move-modal",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"modal-header",children:[(0,t.jsx)("h3",{children:"移动笔记"}),(0,t.jsx)("button",{className:"btn btn-icon",onClick:l,children:(0,t.jsx)(N.X,{size:18})})]}),(0,t.jsxs)("div",{className:"note-move-target",children:[(0,t.jsx)("span",{children:"正在移动"}),(0,t.jsx)("strong",{children:e.name})]}),(0,t.jsx)("div",{className:"note-move-path",children:S.map((e,s)=>(0,t.jsxs)(n.default.Fragment,{children:[s>0&&(0,t.jsx)("span",{children:"/"}),(0,t.jsx)("button",{type:"button",onClick:()=>k(e.path),children:e.label})]},e.path||"root"))}),(0,t.jsxs)("div",{className:"note-move-folder-list",children:[(0,t.jsxs)("button",{type:"button",className:`note-move-folder-item ${""===h?"selected":""}`,onClick:()=>k(""),children:[(0,t.jsx)("span",{className:"note-move-folder-spacer"}),(0,t.jsx)(u.Folder,{className:"note-move-folder-icon",size:16}),(0,t.jsx)("span",{children:"全部笔记"})]}),0===d.length?(0,t.jsx)("p",{className:"note-move-empty",children:"还没有可选文件夹"}):w.map(e=>{let n=v.has(e.path),s=x.has(e.path);return(0,t.jsxs)("button",{type:"button",className:`note-move-folder-item note-move-depth-${Math.min(e.depth,4)} ${h===e.path?"selected":""}`,onClick:()=>{var t;k(t=e.path),v.has(t)&&j(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},children:[n?s?(0,t.jsx)(r.ChevronDown,{className:"note-move-expander",size:14}):(0,t.jsx)(i.ChevronRight,{className:"note-move-expander",size:14}):(0,t.jsx)("span",{className:"note-move-folder-spacer"}),(0,t.jsx)(u.Folder,{className:"note-move-folder-icon",size:16}),(0,t.jsx)("span",{children:e.name}),e.parentPath&&(0,t.jsx)("small",{children:e.parentPath})]},e.path)})]}),(0,t.jsx)("input",{className:"input input-compact",value:m,onChange:e=>f(e.target.value),placeholder:"或输入新目录路径,如 文章/摘录"}),(0,t.jsxs)("div",{className:"note-move-destination",children:["目标位置:",y||"全部笔记"]}),(0,t.jsxs)("div",{className:"modal-actions",children:[(0,t.jsx)("button",{className:"btn btn-secondary",onClick:l,children:"取消"}),(0,t.jsx)("button",{className:"btn btn-primary",onClick:function(){g||a(y)},disabled:g,children:"移动"})]})]})})}e.s(["default",0,function(){return(0,t.jsx)(n.Suspense,{fallback:(0,t.jsx)("div",{className:"note-editor-loading",children:"加载中..."}),children:(0,t.jsx)(ea,{})})}],58559)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return o}};for(var r in n)Object.defineProperty(a,r,{enumerable:!0,get:n[r]});let s=e.r(90809)._(e.r(98183)),l=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:a}=e,n=e.protocol||"",r=e.pathname||"",i=e.hash||"",o=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:a&&(u=t+(~a.indexOf(":")?`[${a}]`:a),e.port&&(u+=":"+e.port)),o&&"object"==typeof o&&(o=String(s.urlQueryToSearchParams(o)));let d=e.search||o&&`?${o}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==u?(u="//"+(u||""),r&&"/"!==r[0]&&(r="/"+r)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),d&&"?"!==d[0]&&(d="?"+d),r=r.replace(/[?#]/g,encodeURIComponent),d=d.replace("#","%23"),`${n}${u}${r}${d}${i}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},18581,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useMergedRef",{enumerable:!0,get:function(){return r}});let n=e.r(71645);function r(e,t){let a=(0,n.useRef)(null),r=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=a.current;e&&(a.current=null,e());let t=r.current;t&&(r.current=null,t())}else e&&(a.current=s(e,n)),t&&(r.current=s(t,n))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let a=e(t);return"function"==typeof a?a:()=>e(null)}}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},73668,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"isLocalURL",{enumerable:!0,get:function(){return s}});let n=e.r(18967),r=e.r(52817);function s(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),a=new URL(e,t);return a.origin===t&&(0,r.hasBasePath)(a.pathname)}catch(e){return!1}}},84508,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n={default:function(){return b},useLinkStatus:function(){return v}};for(var r in n)Object.defineProperty(a,r,{enumerable:!0,get:n[r]});let s=e.r(90809),l=e.r(18050),i=s._(e.r(71645)),o=e.r(95057),u=e.r(8372),d=e.r(18581),c=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),h=e.r(91949),m=e.r(73668),g=e.r(9396);function b(t){var a,n;let r,s,b,[v,_]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),S=(0,i.useRef)(null),{href:j,as:x,children:C,prefetch:k=null,passHref:w,replace:N,shallow:M,scroll:A,onClick:R,onMouseEnter:$,onTouchStart:O,legacyBehavior:G=!1,onNavigate:P,transitionTypes:E,ref:H,unstable_dynamicOnHover:I,...B}=t;r=C,G&&("string"==typeof r||"number"==typeof r)&&(r=(0,l.jsx)("a",{children:r}));let L=i.default.useContext(u.AppRouterContext),T=!1!==k,U=!1!==k?null===(n=k)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,W="string"==typeof(a=x||j)?a:(0,o.formatUrl)(a);if(G){if(r?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=i.default.Children.only(r)}let z=G?s&&"object"==typeof s&&s.ref:H,J=i.default.useCallback(e=>(null!==L&&(S.current=(0,h.mountLinkInstance)(e,W,L,U,T,_)),()=>{S.current&&((0,h.unmountLinkForCurrentNavigation)(S.current),S.current=null),(0,h.unmountPrefetchableInstance)(e)}),[T,W,L,U,_]),q={ref:(0,d.useMergedRef)(J,z),onClick(t){G||"function"!=typeof R||R(t),G&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!L||t.defaultPrevented||function(t,a,n,r,s,l,o){if("u">typeof window){let u,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(a)){r&&(t.preventDefault(),location.replace(a));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:c}=e.r(99781);i.default.startTransition(()=>{c(a,r?"replace":"push",!1===s?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,o)})}}(t,W,S,N,A,P,E)},onMouseEnter(e){G||"function"!=typeof $||$(e),G&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),L&&T&&(0,h.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){G||"function"!=typeof O||O(e),G&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),L&&T&&(0,h.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,c.isAbsoluteUrl)(W)?q.href=W:G&&!w&&("a"!==s.type||"href"in s.props)||(q.href=(0,p.addBasePath)(W)),b=G?i.default.cloneElement(s,q):(0,l.jsx)("a",{...B,...q,children:r}),(0,l.jsx)(y.Provider,{value:v,children:b})}e.r(84508);let y=(0,i.createContext)(h.IDLE_LINK_STATUS),v=()=>(0,i.useContext)(y);("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},8734,e=>{"use strict";let t=(0,e.i(56420).default)("copy",[["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"}]]);e.s(["Copy",0,t],8734)},30274,e=>{"use strict";let t=(0,e.i(56420).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);e.s(["Send",0,t],30274)},96699,e=>{"use strict";let t=(0,e.i(56420).default)("moon",[["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"}]]);e.s(["Moon",0,t],96699)},35965,e=>{"use strict";let t=(0,e.i(56420).default)("sun",[["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"}]]);e.s(["Sun",0,t],35965)},11241,e=>{"use strict";let t=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],11241)},59665,5142,e=>{"use strict";var t=e.i(18050),a=e.i(71645);let n=(0,e.i(56420).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);function r(e=!1,t={}){let[n,s]=(0,a.useState)(e),l=(0,a.useCallback)(()=>{s(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),i=(0,a.useCallback)(()=>{s(e=>e?(t.onClose?.(),!1):e)},[t.onClose]);return[n,{open:l,close:i,toggle:(0,a.useCallback)(()=>{n?i():l()},[i,l,n]),set:s}]}e.s(["useDisclosure",0,r],5142);let s=(0,a.createContext)(null);e.s(["default",0,function({sidebar:e,headerTitle:l,headerRight:i,children:o}){let[u,d]=r(!1),[c,p]=(0,a.useState)(!1),f=function(e,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){let[n,r]=(0,a.useState)(t?void 0:!!("u">typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches);return(0,a.useEffect)(()=>{try{if("matchMedia"in window){let t=window.matchMedia(e);r(t.matches);let a=e=>r(e.matches);return t.addEventListener("change",a),()=>{t.removeEventListener("change",a)}}}catch(e){return}},[e]),n||!1}("(max-width: 768px)"),h=()=>{f?d.open():p(!1)};return(0,t.jsx)(s.Provider,{value:{closeSidebar:d.close,openSidebar:h,isSidebarVisible:f?u:!c},children:(0,t.jsxs)("div",{className:"app-layout",children:[(0,t.jsx)("div",{className:`sidebar-overlay ${u?"visible":""}`,onClick:()=>d.close()}),(0,t.jsx)("div",{className:`sidebar ${u?"open":""} ${c?"collapsed":""}`,children:e({closeSidebar:d.close,openSidebar:h})}),(0,t.jsxs)("div",{className:"main-content",children:[(0,t.jsxs)("header",{className:"app-header",children:[(0,t.jsxs)("div",{className:"header-left",children:[(0,t.jsx)("button",{onClick:()=>{f?d.toggle():p(!c)},className:"btn btn-icon sidebar-toggle-btn","aria-label":f?"打开菜单":c?"展开侧边栏":"收起侧边栏",children:(0,t.jsx)(n,{size:16})}),l]}),(0,t.jsx)("div",{className:"header-right",children:i})]}),o]})]})})},"useAppShell",0,function(){let e=(0,a.useContext)(s);if(!e)throw Error("useAppShell must be used within AppShell");return e}],59665)},27648,e=>{"use strict";var t=e.i(18050),a=e.i(93957),n=e.i(71192);e.s(["default",0,function({className:e=""}){let r=(0,n.useUserStore)(e=>e.identity),s=(0,n.useUserStore)(e=>e.openLoginModal),l=(0,n.useUserStore)(e=>e.logoutUser);return(0,t.jsxs)("div",{className:`chat-sidebar-footer sidebar-account ${e}`,children:[(0,t.jsxs)("div",{className:"user-info",children:[(0,t.jsx)("img",{className:"user-avatar-img",src:(0,a.generateAvatar)(r?.address,r?.avatar),alt:"avatar"}),(0,t.jsx)("span",{className:"user-name",title:r?.address,children:r?.displayName||"未登录"})]}),r?(0,t.jsx)("button",{className:"btn btn-ghost logout-btn",onClick:l,children:"退出"}):(0,t.jsx)("button",{className:"btn btn-primary login-btn",onClick:s,children:"登录"})]})}])},87884,e=>{"use strict";var t=e.i(26913);e.s(["channelApi",0,{getChannels(e={}){let a=new URLSearchParams;e.type&&a.set("type",e.type),e.excludeType&&a.set("excludeType",e.excludeType);let n=a.toString();return t.api.get(n?`/api/channels?${n}`:"/api/channels").json()},createChannel:(e,a="personal")=>t.api.post("/api/channels",{json:{name:e,type:a}}).json(),leaveChannel:e=>t.api.delete(`/api/channels/${encodeURIComponent(e)}`).json(),getChannelMessages:(e,a=100,n=0)=>t.api.get(`/api/channels/${encodeURIComponent(e)}/messages?limit=${a}&offset=${n}`).json(),sendChannelMessage:({channelName:e,content:a,author:n,authorName:r,attachment:s})=>t.api.post(`/api/channels/${encodeURIComponent(e)}/messages`,{json:s?{content:a,author:n,authorName:r,attachment:s}:{content:a,author:n,authorName:r}}).json(),getChannelPeers:e=>t.api.get(`/api/channels/${encodeURIComponent(e)}/peers`).json(),setChannelRemark:(e,a)=>t.api.put(`/api/channels/${encodeURIComponent(e)}/remark`,{json:{remark:a}}).json()}])},23952,e=>{"use strict";var t=e.i(71645),a=e.i(87884),n=e.i(26913);function r(e){return String(e.id||`${e.author||""}-${e.timestamp||""}-${e.content||""}`)}e.s(["useChannelMessages",0,function({isReady:e,enabled:s=!0,channelName:l="",peerId:i="",waitForPeerId:o=!1,limit:u=100,reconnectBaseDelay:d=2500,acceptMessage:c,getMessageKey:p=r,onSyncError:f,onSocketEvent:h}){let[m,g]=(0,t.useState)([]),[b,y]=(0,t.useState)(!1),v=(0,t.useRef)(null),_=(0,t.useRef)(l),S=(0,t.useRef)(null),j=(0,t.useRef)(0),x=(0,t.useRef)(c),C=(0,t.useRef)(p),k=(0,t.useRef)(h),w=(0,t.useRef)(f),N=(0,t.useRef)(i);(0,t.useEffect)(()=>{x.current=c},[c]),(0,t.useEffect)(()=>{C.current=p},[p]),(0,t.useEffect)(()=>{k.current=h},[h]),(0,t.useEffect)(()=>{w.current=f},[f]);let M=(0,t.useCallback)(e=>{let t=x.current;return t?e.filter(t):e},[]),A=(0,t.useCallback)((e,t,a=!0)=>{let n=[...e];for(let e of M(t)){let t=C.current(e);if(a){let a=n.findIndex(t=>t.pending&&t.author?.toLowerCase()===e.author?.toLowerCase()&&t.content===e.content);if(-1!==a){n[a]={...e,id:e.id||t};continue}}n.some(e=>C.current(e)===t)||n.push({...e,id:e.id||t})}return n},[M]),R=(0,t.useCallback)((e,t)=>{v.current?.readyState===WebSocket.OPEN&&v.current.send(JSON.stringify({event:e,data:t}))},[]),$=(0,t.useCallback)(e=>{e&&R("channel:subscribe",{channel:e})},[R]),O=(0,t.useCallback)(e=>{e&&R("channel:unsubscribe",{channel:e})},[R]),G=(0,t.useCallback)(async(t=_.current,n={})=>{if(!t||!e)return[];try{let e=M(await a.channelApi.getChannelMessages(t,u));return g(t=>n.replace?e:A(t,e,!1)),e}catch(e){return n.replace&&g([]),await w.current?.(e),[]}},[M,e,u,A]);(0,t.useEffect)(()=>{N.current=i,i&&(R("register",{peerId:i}),o&&_.current&&($(_.current),G(_.current,{replace:!0})))},[i,$,G,o,R]);let P=(0,t.useCallback)(()=>{g([])},[]),E=(0,t.useCallback)(async({channelName:e=_.current,content:t,author:n,authorName:r,attachment:s,optimisticId:l})=>{let i=t.trim();if(!e||!i)return null;let o={id:l||`${n}-${Date.now()}-${Math.random().toString(36).slice(2)}`,author:n,authorName:r,content:i,timestamp:Date.now(),pending:!0,attachment:s};g(e=>[...e,o]);try{let t=await a.channelApi.sendChannelMessage({channelName:e,content:i,author:n,authorName:r,attachment:s});return g(e=>e.map(e=>e.id===o.id?{...t.message,id:t.message.id||C.current(t.message)}:e)),t.message}catch(e){throw g(e=>e.filter(e=>e.id!==o.id)),e}},[]);return(0,t.useEffect)(()=>{let t=_.current;if(_.current=l,t&&t!==l&&O(t),l&&e&&s)return G(l,{replace:!0}),(!o||N.current)&&$(l),()=>O(l)},[l,s,e,$,G,O,o]),(0,t.useEffect)(()=>{if(!e||!s)return void y(!1);let t=!1;async function a(){let e=new WebSocket(await (0,n.getAuthenticatedWebSocketUrl)("/ws"));t?e.close():(e.onopen=()=>{y(!0),j.current=0,N.current&&e.send(JSON.stringify({event:"register",data:{peerId:N.current}})),_.current&&(!o||N.current)&&($(_.current),G(_.current,{replace:!0}))},e.onmessage=e=>{try{let t=JSON.parse(e.data);k.current?.(t.event,t.data),"channel:message"===t.event&&t.data?.channel===_.current&&t.data?.message&&g(e=>A(e,[t.data.message]))}catch{}},e.onclose=()=>{if(y(!1),t)return;let e=j.current;if(e>=20)return;let n=Math.min(d*Math.pow(2,e),3e4);j.current=e+1,S.current=setTimeout(a,n)},e.onerror=()=>e.close(),v.current=e)}return j.current=0,a(),()=>{t=!0,S.current&&clearTimeout(S.current),v.current?.close(),v.current=null}},[s,e,A,d,$,G,o]),{clearMessages:P,connected:b,messages:m,sendMessage:E,setMessages:g,syncMessages:G}}])},21357,e=>{"use strict";let t=(0,e.i(56420).default)("play",[["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"}]]);e.s(["Play",0,t],21357)},53881,53751,99591,34471,e=>{"use strict";var t=e.i(18050),a=e.i(22016),n=e.i(11241),r=e.i(56420);let s=(0,r.default)("spade",[["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"M2 14.499a5.5 5.5 0 0 0 9.591 3.675.6.6 0 0 1 .818.001A5.5 5.5 0 0 0 22 14.5c0-2.29-1.5-4-3-5.5l-5.492-5.312a2 2 0 0 0-3-.02L5 8.999c-1.5 1.5-3 3.2-3 5.5",key:"1aw2pz"}]]);e.s(["Spade",0,s],53751);let l=(0,r.default)("swords",[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]]);var i=e.i(27648);let o=[{id:"gandengyan",label:"干瞪眼",href:"/game/gandengyan/",icon:(0,t.jsx)(l,{size:16})},{id:"zhajinhua",label:"炸金花",href:"/game/zhajinhua/",icon:(0,t.jsx)(s,{size:16})}];e.s(["default",0,function({activeGame:e,closeSidebar:r}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.default,{href:"/",className:"sidebar-header sidebar-header-link",children:[(0,t.jsx)(n.ArrowLeft,{size:18}),(0,t.jsx)("h1",{children:"MOST PEOPLE"})]}),(0,t.jsx)("nav",{className:"sidebar-nav",children:o.map(n=>(0,t.jsxs)(a.default,{href:n.href,className:`sidebar-nav-btn ${e===n.id?"active":""}`,onClick:r,children:[n.icon,(0,t.jsx)("span",{children:n.label})]},n.id))}),(0,t.jsx)(i.default,{})]})}],53881);var u=e.i(71645);let d="game",c="mostbox.game.event",p=["gandengyan","zhajinhua"],f="ABCDEFGHJKLMNPQRSTUVWXYZ23456789";function h(e){let t=String(e||"").trim().toLowerCase();return p.includes(t)?t:""}function m(e){return String(e||"").trim().toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,8)}function g(e){return/^[A-Z0-9]{4,8}$/.test(String(e||""))}function b(){let e="";for(let t=0;t<6;t++)e+=f[function(e){if(globalThis.crypto?.getRandomValues){let t=new Uint32Array(1);return globalThis.crypto.getRandomValues(t),t[0]%e}return Math.floor(Math.random()*e)}(f.length)];return e}function y(e,t){let a=h(e),n=m(t);return a&&g(n)?`game-${a}-${n.toLowerCase()}`:""}function v({gameId:e,roomCode:t,event:a,payload:n}){var r;let s=h(e);return{kind:c,version:1,gameId:s,roomCode:m(t),event:String(a||""),eventId:(r=s||"game",`${r}_${Date.now()}_${function(){let e=new Uint8Array(4);if(globalThis.crypto?.getRandomValues)globalThis.crypto.getRandomValues(e);else for(let t=0;t<e.length;t++)e[t]=Math.floor(256*Math.random());return[...e].map(e=>e.toString(16).padStart(2,"0")).join("")}()}`),payload:n||{}}}function _(e,t={}){try{let a=JSON.parse(String(e||""));if(!a||a.kind!==c||1!==a.version||"string"!=typeof a.event||"string"!=typeof a.eventId)return null;let n=h(a.gameId),r=m(a.roomCode);if(!n||!g(r)||t.gameId&&n!==h(t.gameId)||t.roomCode&&r!==m(t.roomCode))return null;return{...a,gameId:n,roomCode:r,payload:a.payload&&"object"==typeof a.payload?a.payload:{}}}catch{return null}}function S(e,t){var a;if(!e||"object"!=typeof e)return null;let n=j(e.address||t);if(!n||j(t)!==n)return null;let r=String(e.name||"").trim().slice(0,50)||((a=n)?`${a.slice(0,6)}...${a.slice(-4)}`:"");return{address:n,name:r,publicKey:String(e.publicKey||"").trim(),joinedAt:Number(e.joinedAt||Date.now())}}function j(e){let t=String(e||"").trim();return/^0x[a-fA-F0-9]{40}$/.test(t)?t.toLowerCase():""}function x(e,t,a){let n=t.get(a.address);n?Object.assign(n,a):(e.push(a),t.set(a.address,a))}function C(e){return[...e].sort((e,t)=>Number(e.timestamp||0)-Number(t.timestamp||0))}e.s(["GAME_CHANNEL_TYPE",0,d,"createGameEvent",0,v,"createGameRoomCode",0,b,"deriveGameRoomLobby",0,function(e=[],t={}){let a=[],n=new Map,r="";for(let s of C(e)){let e=_(s.content,t);if(e){if("room:create"===e.event){let t=S(e.payload?.player,s.author);if(!t)continue;r||(r=t.address),x(a,n,t);continue}if("player:join"===e.event){let t=S(e.payload?.player,s.author);t&&x(a,n,t)}}}return{gameId:h(t.gameId),roomCode:m(t.roomCode),hostAddress:r,players:a}},"gameRoomCodeToChannelName",0,y,"getLatestGameState",0,function(e=[],t={}){let a=null;for(let n of C(e)){let e=_(n.content,t);if(!e||"room:state"!==e.event)continue;let r=Number(e.payload?.seq||0);(!a||r>=Number(a.payload?.seq||0))&&(a=e)}return a},"normalizeGameRoomCode",0,m,"parseGameEvent",0,_],99591);var k=e.i(87884),w=e.i(23952),N=e.i(26913),M=e.i(3593),A=e.i(71192);async function R(e,t,a,n,r,s){let l=v({gameId:a,roomCode:n,event:r,payload:s});await k.channelApi.sendChannelMessage({channelName:e,content:JSON.stringify(l),author:t.address,authorName:$(t)})}function $(e){return e.displayName||e.username}e.s(["useGameRoom",0,function({gameId:e,onError:t,getPlayerPayload:a}){let n=(0,M.useAppStore)(e=>e.hasBackend),r=(0,M.useAppStore)(e=>e.checkBackend),s=(0,M.useAppStore)(e=>e.openConnectModal),l=(0,A.useUserStore)(e=>e.identity),i=(0,A.useUserStore)(e=>e.openLoginModal),[o,c]=(0,u.useState)(""),[p,f]=(0,u.useState)(""),[h,g]=(0,u.useState)(!1),S=!0===n,j=(0,u.useCallback)(async(e,a)=>{let n=await (0,N.getApiErrorMessage)(e,a);t&&t(n)},[t]),x=(0,u.useCallback)(t=>!!_(t.content,{gameId:e,roomCode:o}),[e,o]),C=(0,u.useCallback)(t=>{let a=_(t.content,{gameId:e,roomCode:o});return a?`${t.author}-${a.eventId}`:`${t.author}-${t.timestamp}-${t.content}`},[e,o]),{clearMessages:O,connected:G,messages:P,sendMessage:E,syncMessages:H}=(0,w.useChannelMessages)({isReady:S,enabled:!!l,channelName:p,limit:500,acceptMessage:x,getMessageKey:C,onSyncError:e=>j(e,"无法读取房间记录")}),I=(0,u.useMemo)(()=>P.map(t=>({message:t,event:_(t.content,{gameId:e,roomCode:o})})).filter(e=>e.event),[e,P,o]),B=(0,u.useCallback)(()=>l?!!S||(s(),!1):(i(),!1),[S,s,i,l]);(0,u.useEffect)(()=>{null===n&&r()},[r,n]);let L=(0,u.useCallback)(async(n,r=!1)=>{if(!B()||!l)return!1;let s=r?b():m(n),i=y(e,s);if(!i)return t&&t("请输入 4-8 位房间码"),!1;g(!0);try{var o;return await k.channelApi.createChannel(i,d),await R(i,l,e,s,r?"room:create":"player:join",{player:a?a(l):{address:(o=l).address,name:$(o),publicKey:"",joinedAt:Date.now()}}),c(s),f(i),O(),!0}catch(e){return await j(e,r?"创建房间失败":"进入房间失败"),!1}finally{g(!1)}},[B,e,a,t,j,O,l]),T=(0,u.useCallback)(()=>L("",!0),[L]),U=(0,u.useCallback)(e=>L(e),[L]),W=(0,u.useCallback)(async(t,a={})=>{if(!B()||!l||!p||!o)return!1;let n=v({gameId:e,roomCode:o,event:t,payload:a}),r=JSON.stringify(n);try{return await E({channelName:p,content:r,author:l.address,authorName:$(l),optimisticId:`${l.address}-${n.eventId}`}),!0}catch(e){return await j(e,"发送房间事件失败"),!1}},[p,B,e,j,o,E,l]);return{channelName:p,connected:G,createRoom:T,ensureReady:B,isBackendReady:S,joinRoom:U,joining:h,messages:P,roomCode:o,roomEvents:I,sendRoomEvent:W,setRoomCode:c,syncMessages:H,userIdentity:l}}],34471)},45309,e=>{e.v({accountLine:"page-module__bH9uOG__accountLine",actions:"page-module__bH9uOG__actions",active:"page-module__bH9uOG__active",avatar:"page-module__bH9uOG__avatar",badges:"page-module__bH9uOG__badges",black:"page-module__bH9uOG__black",card:"page-module__bH9uOG__card",cardButton:"page-module__bH9uOG__cardButton",cardMark:"page-module__bH9uOG__cardMark",centerTable:"page-module__bH9uOG__centerTable",dangerBadge:"page-module__bH9uOG__dangerBadge",deckBox:"page-module__bH9uOG__deckBox",entry:"page-module__bH9uOG__entry",entryBrand:"page-module__bH9uOG__entryBrand",entryPanel:"page-module__bH9uOG__entryPanel",gameGrid:"page-module__bH9uOG__gameGrid",hand:"page-module__bH9uOG__hand",handPanel:"page-module__bH9uOG__handPanel",headerActions:"page-module__bH9uOG__headerActions",joinForm:"page-module__bH9uOG__joinForm",logPanel:"page-module__bH9uOG__logPanel",notice:"page-module__bH9uOG__notice",page:"page-module__bH9uOG__page",panel:"page-module__bH9uOG__panel",picked:"page-module__bH9uOG__picked",playedBox:"page-module__bH9uOG__playedBox",playedCards:"page-module__bH9uOG__playedCards",player:"page-module__bH9uOG__player",preview:"page-module__bH9uOG__preview",red:"page-module__bH9uOG__red",roomBar:"page-module__bH9uOG__roomBar",scoreMeta:"page-module__bH9uOG__scoreMeta",scoreRow:"page-module__bH9uOG__scoreRow",seats:"page-module__bH9uOG__seats",sidePanel:"page-module__bH9uOG__sidePanel",small:"page-module__bH9uOG__small",status:"page-module__bH9uOG__status",tablePanel:"page-module__bH9uOG__tablePanel",valid:"page-module__bH9uOG__valid",winner:"page-module__bH9uOG__winner"})},31678,e=>{"use strict";var t=e.i(18050),a=e.i(71645),n=e.i(8734),r=e.i(96699),s=e.i(21357);let l=(0,e.i(56420).default)("rotate-ccw",[["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"}]]);var i=e.i(30274),o=e.i(35965),u=e.i(59665),d=e.i(53881),c=e.i(34471),p=e.i(3593),f=e.i(71192);let h=["S","H","C","D"],m=["3","4","5","6","7","8","9","10","J","Q","K","A","2"],g=m.filter(e=>"2"!==e),b=new Map(m.map((e,t)=>[e,t+3]));function y(e){return e?{id:e.id,ownerAddress:e.ownerAddress,status:e.status,seq:Number(e.seq||1),deckCount:e.deck?.length||Number(e.deckCount||0),discardCount:e.discard?.length||Number(e.discardCount||0),currentSeat:Number(e.currentSeat||0),lastWinnerSeat:null===e.lastWinnerSeat||void 0===e.lastWinnerSeat?null:Number(e.lastWinnerSeat),previousWinnerSeat:null===e.previousWinnerSeat||void 0===e.previousWinnerSeat?null:Number(e.previousWinnerSeat),baseScore:Number(e.baseScore||1),bombCount:Number(e.bombCount||0),diceRolls:Array.isArray(e.diceRolls)?e.diceRolls:[],roundResult:e.roundResult||null,table:e.table?{...e.table,cards:e.table.cards.map(E)}:null,passSeats:Array.isArray(e.passSeats)?e.passSeats:[],winnerSeat:null===e.winnerSeat||void 0===e.winnerSeat?null:Number(e.winnerSeat),log:Array.isArray(e.log)?e.log.slice(0,18):[],players:M(e).map(e=>({address:e.address,name:e.name,seat:e.seat,handCount:e.hand?.length??e.handCount??0,score:Number(e.score??1e3),playedCards:Number(e.playedCards||0),hand:Array.isArray(e.hand)?e.hand.map(E):[]}))}:null}function v(e){return e&&"object"==typeof e?{id:String(e.id||"").toUpperCase(),ownerAddress:T(e.ownerAddress),status:"playing"===e.status||"finished"===e.status?e.status:"lobby",seq:Number(e.seq||1),players:Array.isArray(e.players)?e.players.map(x).filter(Boolean):[],deck:Array.isArray(e.deck)?e.deck.map(C).filter(Boolean):[],discard:Array.isArray(e.discard)?e.discard.map(C).filter(Boolean):[],table:e.table&&"object"==typeof e.table?{...e.table,cards:Array.isArray(e.table.cards)?e.table.cards.map(C).filter(Boolean):[]}:null,currentSeat:Number(e.currentSeat||0),lastWinnerSeat:null===e.lastWinnerSeat||void 0===e.lastWinnerSeat?null:Number(e.lastWinnerSeat),previousWinnerSeat:null===e.previousWinnerSeat||void 0===e.previousWinnerSeat?null:Number(e.previousWinnerSeat),passSeats:Array.isArray(e.passSeats)?e.passSeats.map(Number):[],baseScore:Number(e.baseScore||1),bombCount:Number(e.bombCount||0),diceRolls:Array.isArray(e.diceRolls)?e.diceRolls:[],roundResult:e.roundResult||null,log:Array.isArray(e.log)?e.log.map(String):[],winnerSeat:null===e.winnerSeat||void 0===e.winnerSeat?null:Number(e.winnerSeat)}:null}function _(e){if(!e?.length)return null;let t=e.filter(G).length,a=e.filter(e=>!G(e));if(0===a.length)return null;let n=function(e,t,a){if(e.length<3||!R(t,a))return null;let n=function(e){return O(e[0])}(t);return S("bomb",n,e.length,Array(e.length).fill(n),0===a)}(e,a,t);if(n)return n;if(1===e.length&&0===t)return S("single",O(e[0]),1,[O(e[0])]);if(2===e.length&&R(a,t)){let e=O(a[0]);return S("pair",e,2,[e,e])}return function(e){if(e.length<3)return null;for(let t=0;t<=g.length-e.length;t+=1){let a=g.slice(t,t+e.length).map(e=>b.get(e));if(e.every((e,t)=>G(e)||O(e)===a[t]))return S("straight",a.at(-1),e.length,a)}return null}(e)||function(e){if(e.length<4||e.length%2!=0)return null;let t=e.length/2;for(let a=0;a<=g.length-t;a+=1){let n=g.slice(a,a+t).map(e=>b.get(e)),r=n.flatMap(e=>[e,e]);if(e.every((e,t)=>G(e)||O(e)===r[t]))return S("pairStraight",n.at(-1),e.length,r)}return null}(e)}function S(e,t,a,n,r=!0){var s;let l;return{type:e,value:t,length:a,resolvedValues:n,pure:r,label:(s={type:e,value:t,length:a,resolvedValues:n,pure:r},l=s.resolvedValues?.length?`(${s.resolvedValues.map(B).join(" ")})`:"",`${({single:"单张",pair:"对子",straight:"顺子",pairStraight:"连对",bomb:s.pure?"纯炸弹":"带王炸弹"})[s.type]}${l}`)}}function j(e){let t=new Set;return e.map(e=>({address:T(e.address),name:U(e.name),publicKey:String(e.publicKey||"")})).filter(e=>!(!e.address||t.has(e.address))&&(t.add(e.address),!0))}function x(e){let t=T(e.address);return t?{address:t,name:U(e.name),seat:Number(e.seat||0),hand:Array.isArray(e.hand)?e.hand.map(C).filter(Boolean):[],handCount:Number(e.handCount||0),score:Number(e.score??1e3),playedCards:Number(e.playedCards||0)}:null}function C(e){if(!e||"object"!=typeof e)return null;let t=String(e.rank||""),a=String(e.suit||"");return(b.has(t)||"SJ"===t||"BJ"===t)&&(h.includes(a)||"Joker"===a)?{id:String(e.id||`${a}-${t}`),suit:a,rank:t,label:e.label||H({suit:a,rank:t}),color:e.color||I({suit:a,rank:t})}:null}function k(e,t){return e.deck.splice(0,t)}function w(e){return e.players.find(t=>t.seat===e.currentSeat)}function N(e){return M(e).filter(e=>e.hand.length>0)}function M(e){return[...e?.players||[]].sort((e,t)=>e.seat-t.seat)}function A(e){let t=N(e).map(e=>e.seat),a=t.indexOf(e.currentSeat);e.currentSeat=t[(a+1)%t.length]}function R(e,t=0){if(0===e.length)return!1;let a=e[0].rank;return e.every(e=>e.rank===a)&&e.length+t>=2}function $(e,t){return O(e)-O(t)||P(e.suit)-P(t.suit)}function O(e){return b.get(e.rank)||99}function G(e){return"SJ"===e.rank||"BJ"===e.rank}function P(e){return({D:0,C:1,H:2,S:3,Joker:4})[e]||0}function E(e){return{id:e.id,suit:e.suit,rank:e.rank,label:H(e),color:I(e)}}function H(e){return"SJ"===e.rank?"小王":"BJ"===e.rank?"大王":`${({S:"♠",H:"♥",C:"♣",D:"♦"})[e.suit]||""}${e.rank}`}function I(e){return"H"===e.suit||"D"===e.suit||"BJ"===e.rank?"red":"black"}function B(e){return m.find(t=>b.get(t)===e)||String(e)}function L(e){let t=m.findIndex(t=>b.get(t)===e);return -1===t||t>=m.length-1?null:b.get(m[t+1])}function T(e){let t=String(e||"").trim();return/^0x[a-fA-F0-9]{40}$/.test(t)?t.toLowerCase():""}function U(e){return String(e||"玩家").trim().slice(0,16)||"玩家"}var W=e.i(99591),z=e.i(45309);let J="gandengyan";function q(...e){return e.filter(Boolean).join(" ")}function D(e,t){return String(e||"").toLowerCase()===String(t||"").toLowerCase()}function K({player:e,active:a,winner:n,relation:r=""}){return e?(0,t.jsxs)("div",{className:q(z.default.player,a&&z.default.active,n&&z.default.winner),children:[(0,t.jsx)("div",{className:z.default.avatar,children:e.name.slice(0,1)}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:e.name}),(0,t.jsxs)("span",{children:[r,r?" · ":"",e.handCount," 张"]})]})]}):null}function F({card:e,small:a=!1}){return(0,t.jsxs)("div",{className:q(z.default.card,z.default[e.color],a&&z.default.small),children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsx)("i",{children:"Joker"===e.suit?"*":e.label.slice(0,1)})]})}e.s(["default",0,function(){let e=(0,p.useAppStore)(e=>e.isDarkMode),g=(0,p.useAppStore)(e=>e.setIsDarkMode),S=(0,p.useAppStore)(e=>e.addToast),x=(0,f.useUserStore)(e=>e.initializeUser),[C,R]=(0,a.useState)(""),[O,G]=(0,a.useState)([]),[P,I]=(0,a.useState)(!1),B=(0,c.useGameRoom)({gameId:J,onError:e=>S(e,"error")});(0,a.useEffect)(()=>{x()},[x]),(0,a.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("room")?.toUpperCase();e&&R(e)},[]),(0,a.useEffect)(()=>{if(!B.roomCode)return;let e=`/game/gandengyan?room=${B.roomCode}`;`${window.location.pathname}${window.location.search}`!==e&&window.history.replaceState(null,"",e)},[B.roomCode]);let V=(0,a.useMemo)(()=>(0,W.deriveGameRoomLobby)(B.messages,B.roomCode?{gameId:J,roomCode:B.roomCode}:{gameId:J}),[B.messages,B.roomCode]),Q=(0,a.useMemo)(()=>(0,W.getLatestGameState)(B.messages,{gameId:J,roomCode:B.roomCode}),[B.messages,B.roomCode]),X=Q?.payload?.state,Z=X?.players.find(e=>D(e.address,B.userIdentity?.address)),Y=D(X?.ownerAddress||V.hostAddress,B.userIdentity?.address),ee=X?.status==="playing"&&X.currentSeat===Z?.seat,et=(0,a.useMemo)(()=>O.map(e=>Z?.hand.find(t=>t.id===e)).filter(Boolean),[O,Z]),ea=(0,a.useMemo)(()=>_(et),[et]),en=B.roomCode&&1?`${window.location.origin}/game/gandengyan?room=${B.roomCode}`:"",er=!!(X&&"playing"===X.status&&X.deckCount<3);async function es(){await B.createRoom()&&S("房间已创建","success")}async function el(e){e.preventDefault(),await B.joinRoom(C)&&S("已进入房间","success")}async function ei(){en&&(await navigator.clipboard.writeText(en),I(!0),setTimeout(()=>I(!1),1400))}async function eo(e){await B.sendRoomEvent("room:state",{state:e,seq:e.seq})}async function eu(){if(X&&Y)try{await eo(function(e,t=Math.random){let a=v(e);if(!a||a.players.length<2)throw Error("至少需要 2 名玩家");for(let e of(a.deck=function(e,t){let a=[...e];for(let e=a.length-1;e>0;e-=1){let n=Math.floor(t()*(e+1));[a[e],a[n]]=[a[n],a[e]]}return a}(function(){let e=[];for(let t of h)for(let a of m)e.push({id:`${t}-${a}`,suit:t,rank:a});return e.push({id:"SJ",suit:"Joker",rank:"SJ"}),e.push({id:"BJ",suit:"Joker",rank:"BJ"}),e.map(E)}(),t),a.discard=[],a.table=null,a.passSeats=[],a.winnerSeat=null,a.roundResult=null,a.baseScore=1,a.bombCount=0,a.status="playing",M(a)))e.hand=k(a,5),e.handCount=e.hand.length,e.playedCards=0,e.hand.sort($);let n=function(e,t){if(null!==e.previousWinnerSeat)return e.diceRolls=[],M(e).find(t=>t.seat===e.previousWinnerSeat)||M(e)[0];let a=M(e),n=[];for(;a.length>1;){let r=Math.max(...(n=a.map(e=>{var a;return{seat:e.seat,name:e.name,value:(a=t,Math.floor(6*a())+1)}})).map(e=>e.value)),s=n.filter(e=>e.value===r);if(1===s.length)return e.diceRolls=n,a.find(e=>e.seat===s[0].seat);a=a.filter(e=>s.some(t=>t.seat===e.seat))}return e.diceRolls=n,a[0]}(a,t);return a.currentSeat=n.seat,a.lastWinnerSeat=null,a.log=[`新一局开始,${n.name} 先出牌`],a.diceRolls.length>0&&a.log.unshift(`骰子结果:${a.diceRolls.map(e=>`${e.name} ${e.value}`).join(",")}`),a.seq+=1,y(a)}(X))}catch(e){S(e instanceof Error?e.message:"开局失败","error")}}async function ed(){await eu()}async function ec(){if(!X||!B.userIdentity)return;let e=function(e,t,a){var n,r;let s=v(e),l=w(s),i=T(t);if(!l||l.address!==i)return{ok:!1,error:"还没轮到你",state:y(s)};let o=a.map(e=>l.hand.find(t=>t.id===e));if(0===o.length||o.some(e=>!e))return{ok:!1,error:"手牌不存在",state:y(s)};let u=_(o);return u?(n=u,r=s.table?.combo,n&&(!r||"bomb"===n.type&&"bomb"!==r.type||n.type===r.type&&("bomb"===n.type?n.length!==r.length?n.length>r.length:n.value!==r.value?n.value>r.value:n.pure&&!r.pure:n.length===r.length&&("single"===n.type||"pair"===n.type?n.value===L(r.value)||n.value===b.get("2")&&r.value!==b.get("2"):n.value===L(r.value)))))?(l.hand=l.hand.filter(e=>!a.includes(e.id)),l.handCount=l.hand.length,l.playedCards+=o.length,s.discard.push(...o),s.table={seat:l.seat,playerName:l.name,cards:o,combo:u},s.passSeats=[],s.lastWinnerSeat=l.seat,"bomb"===u.type&&(s.bombCount+=1,s.baseScore*=2),s.log.unshift(`${l.name} 出 ${u.label} ${o.map(H).join(" ")}${"bomb"===u.type?`,底分 ${s.baseScore}`:""}`),0===l.hand.length?function(e,t){e.status="finished",e.winnerSeat=t.seat,e.previousWinnerSeat=t.seat;let a=[],n=0;for(let r of M(e)){if(r.seat===t.seat)continue;let s=0===r.playedCards,l=s?15:r.hand.length*e.baseScore;r.score-=l,n+=l,a.push({seat:r.seat,name:r.name,loss:l,sealed:s,cardsLeft:r.hand.length})}t.score+=n,e.roundResult={winnerSeat:t.seat,winnerName:t.name,winnerGain:n,baseScore:e.baseScore,bombCount:e.bombCount,losers:a},e.log.unshift(`${t.name} 获胜,赢 ${n} 分`)}(s,l):A(s),s.seq+=1,{ok:!0,state:y(s)}):{ok:!1,error:"出的牌压不过上一手",state:y(s)}:{ok:!1,error:"这个牌型不合法",state:y(s)}}(X,B.userIdentity.address,O);e.ok?await eo(e.state):S(e.error||"出牌失败","error")}async function ep(){var e;let t,a,n;if(!X||!B.userIdentity)return;let r=(e=B.userIdentity.address,a=w(t=v(X)),n=T(e),a&&a.address===n?t.table?(t.passSeats.includes(a.seat)||t.passSeats.push(a.seat),t.log.unshift(`${a.name} 不要`),N(t).map(e=>e.seat).filter(e=>e!==t.lastWinnerSeat).every(e=>t.passSeats.includes(e))?(function(e){for(let t of N(e)){if(0===e.deck.length)break;t.hand.push(...k(e,1)),t.handCount=t.hand.length,t.hand.sort($)}}(t),t.currentSeat=t.lastWinnerSeat,t.table=null,t.passSeats=[],t.log.unshift("本轮结束,所有玩家各补 1 张,重新领出")):A(t),t.seq+=1,{ok:!0,state:y(t)}):{ok:!1,error:"领出时不能不要",state:y(t)}:{ok:!1,error:"还没轮到你",state:y(t)});r.ok?await eo(r.state):S(r.error||"操作失败","error")}return(0,a.useEffect)(()=>{G([])},[X?.seq]),(0,a.useEffect)(()=>{if(!Y||!B.roomCode||!B.userIdentity||Q||0===V.players.length)return;let e=function({roomCode:e,ownerAddress:t,ownerName:a,players:n=[],random:r=Math.random}){let s=j(n);return s.some(e=>e.address===T(t))||s.unshift({address:T(t),name:U(a)}),y({id:String(e||"").toUpperCase(),ownerAddress:T(t),status:"lobby",seq:1,players:s.slice(0,6).map((e,t)=>({address:e.address,name:U(e.name),seat:t,hand:[],handCount:0,score:1e3,playedCards:0})),deck:[],discard:[],table:null,currentSeat:0,lastWinnerSeat:null,previousWinnerSeat:null,passSeats:[],baseScore:1,bombCount:0,diceRolls:[],roundResult:null,log:["房间已创建"],winnerSeat:null,random:r})}({roomCode:B.roomCode,ownerAddress:B.userIdentity.address,ownerName:B.userIdentity.displayName||B.userIdentity.username,players:V.players});B.sendRoomEvent("room:state",{state:e,seq:e.seq})},[B,Y,Q,V.players]),(0,a.useEffect)(()=>{if(!X||!Y||"lobby"!==X.status)return;let e=function(e,t=[]){let a=v(e);if(!a||"lobby"!==a.status)return a;let n=new Map(a.players.map(e=>[e.address,e.score]));return a.players=j(t).slice(0,6).map((e,t)=>({address:e.address,name:U(e.name),seat:t,hand:[],handCount:0,score:n.get(e.address)??1e3,playedCards:0})),a.seq+=1,y(a)}(X,V.players);e&&e.players.length!==X.players.length&&B.sendRoomEvent("room:state",{state:e,seq:e.seq})},[B,Y,V.players,X]),(0,t.jsx)(u.default,{sidebar:({closeSidebar:e})=>(0,t.jsx)(d.default,{activeGame:"gandengyan",closeSidebar:e}),headerTitle:(0,t.jsx)("h2",{className:"header-title",children:"游戏 · 干瞪眼"}),headerRight:(0,t.jsxs)("div",{className:z.default.headerActions,children:[X&&(0,t.jsxs)("button",{className:"btn btn-sm",onClick:ei,children:[(0,t.jsx)(n.Copy,{size:14}),P?"已复制":"分享房间"]}),(0,t.jsx)("button",{className:"btn btn-icon",onClick:()=>g(!e),title:"切换主题",children:e?(0,t.jsx)(o.Sun,{size:16}):(0,t.jsx)(r.Moon,{size:16})})]}),children:(0,t.jsx)("main",{className:z.default.page,children:X?(0,t.jsxs)("section",{className:z.default.gameGrid,children:[(0,t.jsxs)("div",{className:z.default.tablePanel,children:[(0,t.jsxs)("div",{className:z.default.roomBar,children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("strong",{children:["房间 ",X.id]}),(0,t.jsx)("span",{children:"lobby"===X.status?"等待开局":"finished"===X.status?"本局结束":"进行中"})]}),(0,t.jsxs)("div",{className:z.default.badges,children:[er&&(0,t.jsx)("span",{className:z.default.dangerBadge,children:"牌堆不足 3 张"}),(0,t.jsx)("span",{children:B.connected?"在线":"离线"})]})]}),(0,t.jsx)("div",{className:z.default.seats,children:X.players.map(e=>(0,t.jsx)(K,{player:e,active:X.currentSeat===e.seat,winner:X.winnerSeat===e.seat,relation:function(e,t,a){if(!e)return`座位 ${t.seat+1}`;let n=(t.seat-e.seat+a)%a;return 0===n?"我":2===a?"对手位":3===a?1===n?"下家/对手位":"上家/对手位":4===a?1===n?"下家/对手位":2===n?"对家/队友位":"上家/对手位":n%2==0?`座位 ${t.seat+1}/队友位`:`座位 ${t.seat+1}/对手位`}(Z,e,X.players.length)},e.seat))}),(0,t.jsxs)("div",{className:z.default.centerTable,children:[(0,t.jsxs)("div",{className:z.default.deckBox,children:[(0,t.jsx)("span",{children:"牌堆"}),(0,t.jsx)("strong",{children:X.deckCount})]}),(0,t.jsx)("div",{className:z.default.playedBox,children:X.table?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("strong",{children:[X.table.playerName," 出 ",X.table.combo?.label||"牌"]}),(0,t.jsx)("div",{className:z.default.playedCards,children:X.table.cards.map(e=>(0,t.jsx)(F,{card:e,small:!0},e.id))})]}):(0,t.jsx)("span",{children:"等待领出"})}),(0,t.jsxs)("div",{className:z.default.deckBox,children:[(0,t.jsx)("span",{children:"底分"}),(0,t.jsx)("strong",{children:X.baseScore})]})]}),(0,t.jsx)("div",{className:z.default.notice,children:"finished"===X.status?`${X.players.find(e=>e.seat===X.winnerSeat)?.name} 获胜`:ee?"轮到你出牌":`等待 ${X.players.find(e=>e.seat===X.currentSeat)?.name||"玩家"}`})]}),(0,t.jsxs)("aside",{className:z.default.sidePanel,children:[(0,t.jsxs)("section",{className:z.default.panel,children:[(0,t.jsx)("h3",{children:"牌局"}),Y&&"lobby"===X.status&&(0,t.jsxs)("button",{className:"btn btn-primary",disabled:X.players.length<2,onClick:eu,children:[(0,t.jsx)(s.Play,{size:16}),"开始游戏"]}),Y&&"finished"===X.status&&(0,t.jsxs)("button",{className:"btn btn-primary",onClick:ed,children:[(0,t.jsx)(l,{size:16}),"再来一局"]}),!Y&&(0,t.jsx)("p",{className:z.default.status,children:"等待房主操作。"})]}),(0,t.jsxs)("section",{className:z.default.panel,children:[(0,t.jsx)("h3",{children:"分数"}),(0,t.jsxs)("div",{className:z.default.scoreMeta,children:[(0,t.jsxs)("span",{children:["炸弹 ",X.bombCount," 次"]}),(0,t.jsxs)("span",{children:["弃牌 ",X.discardCount," 张"]})]}),X.players.map(e=>(0,t.jsxs)("div",{className:z.default.scoreRow,children:[(0,t.jsx)("span",{children:e.name}),(0,t.jsx)("strong",{children:e.score})]},e.seat))]}),(0,t.jsxs)("section",{className:q(z.default.panel,z.default.logPanel),children:[(0,t.jsx)("h3",{children:"牌局记录"}),X.log.map((e,a)=>(0,t.jsx)("p",{children:e},`${e}-${a}`))]})]}),(0,t.jsxs)("div",{className:z.default.handPanel,children:[(0,t.jsx)(K,{player:Z,active:ee,winner:X.winnerSeat===Z?.seat}),(0,t.jsx)("div",{className:z.default.hand,children:Z?.hand.map(e=>(0,t.jsx)("button",{className:q(z.default.cardButton,O.includes(e.id)&&z.default.picked),onClick:()=>{var t;return t=e.id,void G(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},children:(0,t.jsx)(F,{card:e})},e.id))}),(0,t.jsxs)("div",{className:z.default.actions,children:[(0,t.jsxs)("div",{className:q(z.default.preview,ea&&z.default.valid),children:[(0,t.jsx)("strong",{children:ea?ea.label:O.length?"牌型不合法":"先选牌"}),(0,t.jsx)("span",{children:et.map(e=>e.label).join(" ")||"按选择顺序解释大小王"})]}),(0,t.jsxs)("button",{className:"btn btn-primary",disabled:!ee||0===O.length||!ea,onClick:ec,children:[(0,t.jsx)(i.Send,{size:16}),"出牌"]}),(0,t.jsx)("button",{className:"btn",disabled:!ee||!X.table,onClick:ep,children:"不要"})]})]})]}):(0,t.jsxs)("section",{className:z.default.entry,children:[(0,t.jsxs)("div",{className:z.default.entryBrand,children:[(0,t.jsx)("div",{className:z.default.cardMark,children:"干"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{children:"干瞪眼牌桌"}),(0,t.jsx)("p",{children:"创建房间码邀请朋友加入,房间状态通过 MostBox P2P 频道同步。"})]})]}),(0,t.jsxs)("div",{className:z.default.entryPanel,children:[(0,t.jsxs)("div",{className:z.default.accountLine,children:[(0,t.jsx)("span",{children:"当前账号"}),(0,t.jsx)("strong",{children:B.userIdentity?.displayName||"未登录"})]}),(0,t.jsxs)("button",{className:"btn btn-primary",disabled:B.joining,onClick:es,children:[(0,t.jsx)(s.Play,{size:16}),"创建房间"]}),(0,t.jsxs)("form",{onSubmit:el,className:z.default.joinForm,children:[(0,t.jsxs)("label",{children:["房间号",(0,t.jsx)("input",{value:C,maxLength:8,onChange:e=>R(e.target.value.toUpperCase()),placeholder:"输入房间号"})]}),(0,t.jsx)("button",{className:"btn",disabled:B.joining||!C,children:"加入房间"})]}),(0,t.jsx)("p",{className:z.default.status,children:B.isBackendReady?"节点已连接":"正在连接节点..."})]})]})})})}],31678)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return s}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=e.r(90809)._(e.r(98183)),l=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:n}=e,r=e.protocol||"",i=e.pathname||"",o=e.hash||"",s=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:n&&(c=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(c+=":"+e.port)),s&&"object"==typeof s&&(s=String(a.urlQueryToSearchParams(s)));let u=e.search||s&&`?${s}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||l.test(r))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),i=i.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${r}${c}${i}${u}${o}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return i}});let r=e.r(71645);function i(e,t){let n=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(n.current=a(e,r)),t&&(i.current=a(t,r))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},73668,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return a}});let r=e.r(18967),i=e.r(52817);function a(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,i.hasBasePath)(n.pathname)}catch(e){return!1}}},84508,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},22016,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return y},useLinkStatus:function(){return x}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let a=e.r(90809),l=e.r(18050),o=a._(e.r(71645)),s=e.r(95057),c=e.r(8372),u=e.r(18581),f=e.r(18967),d=e.r(5550);e.r(33525);let h=e.r(88540),p=e.r(91949),g=e.r(73668),m=e.r(9396);function y(t){var n,r;let i,a,y,[x,k]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:j,as:w,children:M,prefetch:S=null,passHref:E,replace:O,shallow:T,scroll:N,onClick:C,onMouseEnter:z,onTouchStart:P,legacyBehavior:_=!1,onNavigate:L,transitionTypes:I,ref:A,unstable_dynamicOnHover:F,...R}=t;i=M,_&&("string"==typeof i||"number"==typeof i)&&(i=(0,l.jsx)("a",{children:i}));let $=o.default.useContext(c.AppRouterContext),U=!1!==S,D=!1!==S?null===(r=S)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,H="string"==typeof(n=w||j)?n:(0,s.formatUrl)(n);if(_){if(i?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(i)}let q=_?a&&"object"==typeof a&&a.ref:A,V=o.default.useCallback(e=>(null!==$&&(v.current=(0,p.mountLinkInstance)(e,H,$,D,U,k)),()=>{v.current&&((0,p.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,H,$,D,k]),B={ref:(0,u.useMergedRef)(V,q),onClick(t){_||"function"!=typeof C||C(t),_&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!$||t.defaultPrevented||function(t,n,r,i,a,l,s){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(n)){i&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);o.default.startTransition(()=>{f(n,i?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,r.current,s)})}}(t,H,v,O,N,L,I)},onMouseEnter(e){_||"function"!=typeof z||z(e),_&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),$&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)},onTouchStart:function(e){_||"function"!=typeof P||P(e),_&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),$&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)}};return(0,f.isAbsoluteUrl)(H)?B.href=H:_&&!E&&("a"!==a.type||"href"in a.props)||(B.href=(0,d.addBasePath)(H)),y=_?o.default.cloneElement(a,B):(0,l.jsx)("a",{...R,...B,children:i}),(0,l.jsx)(b.Provider,{value:x,children:y})}e.r(84508);let b=(0,o.createContext)(p.IDLE_LINK_STATUS),x=()=>(0,o.useContext)(b);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},31214,e=>{"use strict";let t=(0,e.i(56420).default)("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);e.s(["Cloud",0,t],31214)},66595,e=>{"use strict";let t=(0,e.i(56420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,t],66595)},30274,e=>{"use strict";let t=(0,e.i(56420).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);e.s(["Send",0,t],30274)},21357,e=>{"use strict";let t=(0,e.i(56420).default)("play",[["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"}]]);e.s(["Play",0,t],21357)},96699,e=>{"use strict";let t=(0,e.i(56420).default)("moon",[["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"}]]);e.s(["Moon",0,t],96699)},35965,e=>{"use strict";let t=(0,e.i(56420).default)("sun",[["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"}]]);e.s(["Sun",0,t],35965)},62368,e=>{"use strict";let t=(0,e.i(56420).default)("download",[["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"}]]);e.s(["Download",0,t],62368)},51921,e=>{"use strict";let t=(0,e.i(56420).default)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);e.s(["Music",0,t],51921)},66627,e=>{"use strict";let t=(0,e.i(56420).default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);e.s(["Wifi",0,t],66627)},68590,e=>{"use strict";let t=(0,e.i(56420).default)("message-square",[["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"}]]);e.s(["MessageSquare",0,t],68590)},40983,e=>{"use strict";var t=e.i(18050),n=e.i(71645),r=e.i(22016),i=e.i(62368),a=e.i(96699),l=e.i(35965);function o({size:e=24}){return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.4"}),(0,t.jsx)("rect",{x:"14",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,t.jsx)("rect",{x:"2",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,t.jsx)("rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)"})]})}function s(){let[e,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=localStorage.getItem("theme"),t=window.matchMedia("(prefers-color-scheme: dark)").matches;("dark"===e||!e&&t)&&s(!0)},[]),(0,n.useEffect)(()=>{document.documentElement.setAttribute("data-theme",e?"dark":"light"),localStorage.setItem("theme",e?"dark":"light")},[e]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("nav",{className:"mkt-nav",children:(0,t.jsxs)("div",{className:"mkt-nav-inner",children:[(0,t.jsxs)(r.default,{href:"/",className:"mkt-nav-logo",children:[(0,t.jsx)(o,{}),"MOST PEOPLE"]}),(0,t.jsxs)("div",{className:"mkt-nav-cta",children:[(0,t.jsx)("button",{className:"mkt-theme-toggle",onClick:()=>s(!e),"aria-label":"切换主题",children:e?(0,t.jsx)(l.Sun,{size:16}):(0,t.jsx)(a.Moon,{size:16})}),(0,t.jsxs)(r.default,{href:"/download/",className:"btn btn-secondary mkt-nav-preview",children:[(0,t.jsx)(i.Download,{size:16}),"下载客户端"]}),(0,t.jsx)(r.default,{href:"/app/",className:"btn btn-primary",children:"开始使用"})]})]})})})}let c=[{href:"/",label:"关于"},{href:"/ping/",label:"网络"},{href:"https://github.com/most-people/most",label:"GitHub",external:!0}];function u(){return(0,t.jsx)("footer",{className:"mkt-footer",children:(0,t.jsx)("div",{className:"mkt-container",children:(0,t.jsxs)("div",{className:"mkt-footer-inner",children:[(0,t.jsx)("div",{className:"mkt-footer-links",children:c.map(e=>(0,t.jsx)(r.default,{href:e.href,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},children:e.label},e.href))}),(0,t.jsxs)("span",{className:"mkt-footer-copy",children:["© ",new Date().getFullYear()," MOST PEOPLE · MIT License"]})]})})})}e.s(["MarketingLayout",0,function({children:e}){return(0,t.jsxs)("div",{className:"mkt-layout",children:[(0,t.jsx)(s,{}),(0,t.jsx)("main",{className:"mkt-layout-main",children:e}),(0,t.jsx)(u,{})]})}],40983)},23449,e=>{"use strict";let t;var n,r=e.i(18050),i=e.i(71645);let a=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...a,...l}),s=Object.freeze({...o,body:"",hidden:!1});function c(e,t){let n,r,i=(n={},!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0),(r=((e.rotate||0)+(t.rotate||0))%4)&&(n.rotate=r),n);for(let n in s)n in l?n in e&&!(n in i)&&(i[n]=l[n]):n in t?i[n]=t[n]:n in e&&(i[n]=e[n]);return i}function u(e,t){let n,r,i,a=[];if("object"!=typeof e||"object"!=typeof e.icons)return a;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),a.push(e)});let l=(n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null),Object.keys(n).concat(Object.keys(r)).forEach(function e(t){if(n[t])return i[t]=[];if(!(t in i)){i[t]=null;let n=r[t]&&r[t].parent,a=n&&e(n);a&&(i[t]=[n].concat(a))}return i[t]}),i);for(let n in l){let r=l[n];r&&(t(n,function(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function l(e){a=c(r[e]||i[e],a)}return l(t),n.forEach(l),c(e,a)}(e,n,r)),a.push(n))}return a}let f={provider:"",aliases:{},not_found:{},...a};function d(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function h(e){if("object"!=typeof e||null===e||"string"!=typeof e.prefix||!e.icons||"object"!=typeof e.icons||!d(e,f))return null;let t=e.icons;for(let e in t){let n=t[e];if(!e||"string"!=typeof n.body||!d(n,s))return null}let n=e.aliases||Object.create(null);for(let e in n){let r=n[e],i=r.parent;if(!e||"string"!=typeof i||!t[i]&&!n[i]||!d(r,s))return null}return e}let p=Object.create(null);function g(e,t){let n=p[e]||(p[e]=Object.create(null));return n[t]||(n[t]={provider:e,prefix:t,icons:Object.create(null),missing:new Set})}function m(e,t){return h(t)?u(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}let y=/^[a-z0-9]+(-[a-z0-9]+)*$/,b=(e,t,n,r="")=>{let i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!x(a)?null:a}let a=i[0],l=a.split("-");if(l.length>1){let e={provider:r,prefix:l.shift(),name:l.join("-")};return t&&!x(e)?null:e}if(n&&""===r){let e={provider:r,prefix:"",name:a};return t&&!x(e,n)?null:e}return null},x=(e,t)=>!!e&&!!((t&&""===e.prefix||e.prefix)&&e.name),k=!1;function v(e){return"boolean"==typeof e&&(k=e),k}function j(e){let t="string"==typeof e?b(e,!0,k):e;if(t){let e=g(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}let w=Object.freeze({width:null,height:null}),M=Object.freeze({...w,...l}),S=/(-?[0-9.]*[0-9]+[0-9.]*)/g,E=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function O(e,t,n){if(1===t)return e;if(n=n||100,"number"==typeof e)return Math.ceil(e*t*n)/n;if("string"!=typeof e)return e;let r=e.split(S);if(null===r||!r.length)return e;let i=[],a=r.shift(),l=E.test(a);for(;;){if(l){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(void 0===(a=r.shift()))return i.join("");l=!l}}let T=/\sid="(\S+)"/g,N="IconifyId"+Date.now().toString(16)+(0x1000000*Math.random()|0).toString(16),C=0,z=Object.create(null);function P(e){return z[e]||z[""]}function _(e){let t;if("string"==typeof e.resources)t=[e.resources];else if(!((t=e.resources)instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}let L=Object.create(null),I=["https://api.simplesvg.com","https://api.unisvg.com"],A=[];for(;I.length>0;)1===I.length||Math.random()>.5?A.push(I.shift()):A.push(I.pop());L[""]=_({resources:["https://api.iconify.design"].concat(A)});let F=(()=>{let e;try{if(e=fetch,"function"==typeof e)return e}catch(e){}})();function R(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}let $=0,U={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function D(e){let t={...U,...e},n=[];function r(){n=n.filter(e=>"pending"===e().status)}return{query:function(e,i,a){let l=function(e,t,n,r){let i,a,l=e.resources.length,o=e.random?Math.floor(Math.random()*l):e.index;if(e.random){let t=e.resources.slice(0);for(i=[];t.length>1;){let e=Math.floor(Math.random()*t.length);i.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}i=i.concat(t)}else i=e.resources.slice(o).concat(e.resources.slice(0,o));let s=Date.now(),c="pending",u=0,f=null,d=[],h=[];function p(){f&&(clearTimeout(f),f=null)}function g(){"pending"===c&&(c="aborted"),p(),d.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),d=[]}function m(e,t){t&&(h=[]),"function"==typeof e&&h.push(e)}function y(){c="failed",h.forEach(e=>{e(void 0,a)})}function b(){d.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),d=[]}return"function"==typeof r&&h.push(r),setTimeout(function r(){if("pending"!==c)return;p();let l=i.shift();if(void 0===l){if(d.length){f=setTimeout(()=>{p(),"pending"===c&&(b(),y())},e.timeout);return}y();return}let o={status:"pending",resource:l,callback:(t,n)=>{!function(t,n,l){let o="success"!==n;switch(d=d.filter(e=>e!==t),c){case"pending":break;case"failed":if(o||!e.dataAfterTimeout)return;break;default:return}if("abort"===n){a=l,y();return}if(o){a=l,d.length||(i.length?r():y());return}if(p(),b(),!e.random){let n=e.resources.indexOf(t.resource);-1!==n&&n!==e.index&&(e.index=n)}c="completed",h.forEach(e=>{e(l)})}(o,t,n)}};d.push(o),u++,f=setTimeout(r,e.rotate),n(l,t,o.callback)}),function(){return{startTime:s,payload:t,status:c,queriesSent:u,queriesPending:d.length,subscribe:m,abort:g}}}(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(l),l},find:function(e){return n.find(t=>e(t))||null},setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}let H=Object.create(null);function q(){}function V(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&"object"==typeof n)try{if(!m(e,n).length)return void r()}catch(e){console.error(e)}r(),e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,l=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let l=t.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else{if(!e.missing.has(l))return n=!0,!0;a.missing.push({provider:r,prefix:i,name:l})}return!1}),a.pending.length!==l&&(n||R([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}))}function B(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}let K=/[\s,]+/,W={...M,inline:!1},G={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Q={display:"inline-block"},X={backgroundColor:"currentColor"},J={backgroundColor:"transparent"},Y={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Z={WebkitMask:X,mask:X,background:J};for(let e in Z){let t=Z[e];for(let n in Y)t[e+n]=Y[n]}let ee={...W,inline:!0};function et(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}if(v(!0),n={prepare:(e,t,n)=>{let r=[],i=function(e,t){let n,r=L[e];if(!r)return 0;if(r.maxURL){let e=0;r.resources.forEach(t=>{e=Math.max(e,t.length)}),n=r.maxURL-e-r.path.length-(t+".json?icons=").length}else n=0;return n}(e,t),a="icons",l={type:a,provider:e,prefix:t,icons:[]},o=0;return n.forEach((n,s)=>{(o+=n.length+1)>=i&&s>0&&(r.push(l),l={type:a,provider:e,prefix:t,icons:[]},o=n.length),l.icons.push(n)}),r.push(l),r},send:(e,t,n)=>{if(!F)return void n("abort",424);let r=function(e){if("string"==typeof e){let t=L[e];if(t)return t.path}return"/"}(t.provider);switch(t.type){case"icons":r+=t.prefix+".json?"+new URLSearchParams({icons:t.icons.join(",")}).toString();break;case"custom":{let e=t.uri;r+="/"===e.slice(0,1)?e.slice(1):e;break}default:n("abort",400);return}let i=503;F(e+r).then(e=>{let t=e.status;return 200!==t?void setTimeout(()=>{n(404===t?"abort":"next",t)}):(i=501,e.json())}).then(e=>{"object"!=typeof e||null===e?setTimeout(()=>{404===e?n("abort",e):n("next",i)}):setTimeout(()=>{n("success",e)})}).catch(()=>{n("next",i)})}},z[""]=n,"u">typeof document&&"u">typeof window){let e=window;if(void 0!==e.IconifyPreload){let t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof t&&null!==t&&(t instanceof Array?t:[t]).forEach(e=>{try{("object"!=typeof e||null===e||e instanceof Array||"object"!=typeof e.icons||"string"!=typeof e.prefix||!function(e,t){if("object"!=typeof e)return!1;if("string"!=typeof t&&(t=e.provider||""),k&&!t&&!e.prefix){let t=!1;return h(e)&&(e.prefix="",u(e,(e,n)=>{(function(e,t){let n=b(e,!0,k);if(!n)return!1;let r=g(n.provider,n.prefix);if(!t)return r.missing.add(n.name),!0;var i=n.name;try{if("string"==typeof t.body)return r.icons[i]={...t},!0}catch(e){}return!1})(e,n)&&(t=!0)})),t}let n=e.prefix;return!!x({prefix:n,name:"a"})&&!!m(g(t,n),e)}(e))&&console.error(n)}catch(e){console.error(n)}})}if(void 0!==e.IconifyProviders){let t=e.IconifyProviders;if("object"==typeof t&&null!==t)for(let e in t){let n="IconifyProviders["+e+"] is invalid.";try{let r=t[e];if("object"!=typeof r||!r||void 0===r.resources)continue;!function(e,t){let n=_(t);return null!==n&&(L[e]=n,!0)}(e,r)&&console.error(n)}catch(e){console.error(n)}}}}function en(e){let[n,r]=(0,i.useState)(!!e.ssr),[a,l]=(0,i.useState)({}),[s,c]=(0,i.useState)(function(t){if(t){let t=e.icon;if("object"==typeof t)return{name:"",data:t};let n=j(t);if(n)return{name:t,data:n}}return{name:""}}(!!e.ssr));function u(){let e=a.callback;e&&(e(),l({}))}function f(e){if(JSON.stringify(s)!==JSON.stringify(e))return u(),c(e),!0}(0,i.useEffect)(()=>(r(!0),u),[]),(0,i.useEffect)(()=>{n&&function t(){var n;let r=e.icon;if("object"==typeof r)return void f({name:"",data:r});let i=j(r);f({name:r,data:i})&&(void 0===i?l({callback:((e,t)=>{var n;let r,i,a,l,o,s=(n=function(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i="string"==typeof e?b(e,t,n):e;i&&r.push(i)}),r}(e,!0,v()),a={loaded:[],missing:[],pending:[]},l=Object.create(null),n.sort((e,t)=>e.provider!==t.provider?e.provider.localeCompare(t.provider):e.prefix!==t.prefix?e.prefix.localeCompare(t.prefix):e.name.localeCompare(t.name)),o={provider:"",prefix:"",name:""},n.forEach(e=>{if(o.name===e.name&&o.prefix===e.prefix&&o.provider===e.provider)return;o=e;let t=e.provider,n=e.prefix,r=e.name,i=l[t]||(l[t]=Object.create(null)),s=i[n]||(i[n]=g(t,n));(r in s.icons?a.loaded:""===n||s.missing.has(r)?a.missing:a.pending).push({provider:t,prefix:n,name:r})}),a);if(!s.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(s.loaded,s.missing,s.pending,q)}),()=>{e=!1}}let c=Object.create(null),u=[];return s.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===i&&t===r)return;r=t,i=n,u.push(g(t,n));let a=c[t]||(c[t]=Object.create(null));a[n]||(a[n]=[])}),s.pending.forEach(e=>{let{provider:t,prefix:n,name:r}=e,i=g(t,n),a=i.pendingIcons||(i.pendingIcons=new Set);a.has(r)||(a.add(r),c[t][n].push(r))}),u.forEach(e=>{let t=c[e.provider][e.prefix];t.length&&(e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{let t,n;e.iconsQueueFlag=!1;let{provider:r,prefix:i}=e,a=e.iconsToLoad;if(delete e.iconsToLoad,!a||!a.length)return;let l=e.loadIcon;if(e.loadIcons&&(a.length>1||!l))return void B(e.loadIcons(a,i,r),t=>{V(e,a,t)});if(l)return void a.forEach(t=>{B(l(t,i,r),n=>{let r=n?{prefix:i,icons:{[t]:n}}:null;V(e,[t],r)})});let{valid:o,invalid:s}=(t=[],n=[],a.forEach(e=>{(e.match(y)?t:n).push(e)}),{valid:t,invalid:n});if(s.length&&V(e,s,null),!o.length)return;let c=i.match(y)?P(r):null;c?c.prepare(r,i,o).forEach(t=>{!function(e,t,n){let r,i;if("string"==typeof e){let t=P(e);if(!t)return n(void 0,424);i=t.send;let a=function(e){if(!H[e]){let t=L[e];if(!t)return;let n=D(t);H[e]={config:t,redundancy:n}}return H[e]}(e);a&&(r=a.redundancy)}else{let t=_(e);if(t){r=D(t);let n=P(e.resources?e.resources[0]:"");n&&(i=n.send)}}r&&i?r.query(t,i,n)().abort:n(void 0,424)}(r,t,n=>{V(e,t.icons,n)})}):V(e,o,null)})))}),t?function(e,t,n){let r=$++,i=R.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(a)}),i}(t,s,u):q})([r],t)}):i&&(null==(n=e.onLoad)||n.call(e,r)))}()},[e.icon,n]);let{name:d,data:h}=s;return h?((e,n,r)=>{var a;let l,s,c,u,f,d,h,p,g,m,y,x,k,v=n.inline?ee:W,j=function(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in w?(null===r||r&&("string"===i||"number"===i))&&(n[e]=r):i===typeof n[e]&&(n[e]="rotate"===e?r%4:r)}return n}(v,n),S=n.mode||"svg",E={},z=n.style||{},P={..."svg"===S?G:{}};if(r){let e=b(r,!1,!0);if(e){let t=["iconify"];for(let n of["provider","prefix"])e[n]&&t.push("iconify--"+e[n]);P.className=t.join(" ")}}for(let e in n){let t=n[e];if(void 0!==t)switch(e){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":P.ref=t;break;case"className":P[e]=(P[e]?P[e]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":j[e]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&function(e,t){t.split(K).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}})}(j,t);break;case"color":E.color=t;break;case"rotate":"string"==typeof t?j[e]=function(e,t=0){let n=e.replace(/^-?[0-9.]*/,"");function r(e){for(;e<0;)e+=4;return e%4}if(""===n){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case"%":t=25;break;case"deg":t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t)%1==0?r(i):0}}return t}(t):"number"==typeof t&&(j[e]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete P["aria-hidden"];break;default:void 0===v[e]&&(P[e]=t)}}let _=(c={...o,...e},u={...M,...j},f={left:c.left,top:c.top,width:c.width,height:c.height},d=c.body,[c,u].forEach(e=>{var t,n,r,i;let a,l,o=[],s=e.hFlip,c=e.vFlip,u=e.rotate;switch(s?c?u+=2:(o.push("translate("+(f.width+f.left).toString()+" "+(0-f.top).toString()+")"),o.push("scale(-1 1)"),f.top=f.left=0):c&&(o.push("translate("+(0-f.left).toString()+" "+(f.height+f.top).toString()+")"),o.push("scale(1 -1)"),f.top=f.left=0),u<0&&(u-=4*Math.floor(u/4)),u%=4){case 1:o.unshift("rotate(90 "+(a=f.height/2+f.top).toString()+" "+a.toString()+")");break;case 2:o.unshift("rotate(180 "+(f.width/2+f.left).toString()+" "+(f.height/2+f.top).toString()+")");break;case 3:o.unshift("rotate(-90 "+(a=f.width/2+f.left).toString()+" "+a.toString()+")")}u%2==1&&(f.left!==f.top&&(a=f.left,f.left=f.top,f.top=a),f.width!==f.height&&(a=f.width,f.width=f.height,f.height=a)),o.length&&(t=d,n='<g transform="'+o.join(" ")+'">',r=(l=function(e,t="defs"){let n="",r=e.indexOf("<"+t);for(;r>=0;){let i=e.indexOf(">",r),a=e.indexOf("</"+t);if(-1===i||-1===a)break;let l=e.indexOf(">",a);if(-1===l)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(l+1)}return{defs:n,content:e}}(t)).defs,i=n+l.content+"</g>",d=r?"<defs>"+r+"</defs>"+i:i)}),h=u.width,p=u.height,g=f.width,m=f.height,null===h?l=O(s=null===p?"1em":"auto"===p?m:p,g/m):(l="auto"===h?g:h,s=null===p?O(l,m/g):"auto"===p?m:p),y={},(x=(e,t)=>{"unset"!==t&&"undefined"!==t&&"none"!==t&&(y[e]=t.toString())})("width",l),x("height",s),y.viewBox=(k=[f.left,f.top,g,m]).join(" "),{attributes:y,viewBox:k,body:d}),L=_.attributes;if(j.inline&&(E.verticalAlign="-0.125em"),"svg"===S){P.style={...E,...z},Object.assign(P,L);let e=0,r=n.id;return"string"==typeof r&&(r=r.replace(/-/g,"_")),P.dangerouslySetInnerHTML={__html:(a=function(e,t=N){let n,r=[];for(;n=T.exec(e);)r.push(n[1]);if(!r.length)return e;let i="suffix"+(0x1000000*Math.random()|Date.now()).toString(16);return r.forEach(n=>{let r="function"==typeof t?t(n):t+(C++).toString(),a=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),e=e.replace(RegExp(i,"g"),"")}(_.body,r?()=>r+"ID"+e++:"iconifyReact"),void 0===t&&function(){try{t=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(e){t=null}}(),t?t.createHTML(a):a)},(0,i.createElement)("svg",P)}let{body:I,width:A,height:F}=e,R="mask"===S||"bg"!==S&&-1!==I.indexOf("currentColor"),$=function(e,t){let n=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let e in t)n+=" "+e+'="'+t[e]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}(I,{...L,width:A+"",height:F+""});return P.style={...E,"--svg":'url("data:image/svg+xml,'+$.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")+'")',width:et(L.width),height:et(L.height),...Q,...R?X:J,...z},(0,i.createElement)("span",P)})({...o,...h},e,d):e.children?e.children:e.fallback?e.fallback:(0,i.createElement)("span",{})}let er=(0,i.forwardRef)((e,t)=>en({...e,_ref:t}));(0,i.forwardRef)((e,t)=>en({inline:!0,...e,_ref:t}));var ei=e.i(66595),ea=e.i(31214),el=e.i(21357),eo=e.i(56420);let es=(0,eo.default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]),ec=(0,eo.default)("bot",[["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"}]]),eu=(0,eo.default)("at-sign",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]),ef=(0,eo.default)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);var ed=e.i(68590);let eh=(0,eo.default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),ep=(0,eo.default)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);var eg=e.i(30274);let em=(0,eo.default)("messages-square",[["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"}]]);var ey=e.i(51921);let eb=(0,eo.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),ex=(0,eo.default)("triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]]),ek=(0,eo.default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);var ev=e.i(66627);let ej=[{name:"Google",host:"google.com",icon:"simple-icons:google",fallback:(0,r.jsx)(ei.Search,{size:20})},{name:"Cloudflare",host:"cloudflare.com",icon:"simple-icons:cloudflare",fallback:(0,r.jsx)(ea.Cloud,{size:20})},{name:"YouTube",host:"youtube.com",icon:"simple-icons:youtube",fallback:(0,r.jsx)(el.Play,{size:20})},{name:"GitHub",host:"github.com",icon:"simple-icons:github",fallback:(0,r.jsx)(es,{size:20})},{name:"ChatGPT",host:"chatgpt.com",icon:"simple-icons:openai",fallback:(0,r.jsx)(ec,{size:20})},{name:"X",host:"x.com",icon:"simple-icons:x",fallback:(0,r.jsx)(eu,{size:20})},{name:"Instagram",host:"instagram.com",icon:"simple-icons:instagram",fallback:(0,r.jsx)(ef,{size:20})},{name:"Reddit",host:"reddit.com",icon:"simple-icons:reddit",fallback:(0,r.jsx)(ed.MessageSquare,{size:20})},{name:"Wikipedia",host:"wikipedia.org",icon:"simple-icons:wikipedia",fallback:(0,r.jsx)(eh,{size:20})},{name:"Apple",host:"apple.com",icon:"simple-icons:apple",fallback:(0,r.jsx)(ep,{size:20})},{name:"Telegram",host:"telegram.org",icon:"simple-icons:telegram",fallback:(0,r.jsx)(eg.Send,{size:20})},{name:"Discord",host:"discord.com",icon:"simple-icons:discord",fallback:(0,r.jsx)(em,{size:20})},{name:"TikTok",host:"tiktok.com",icon:"simple-icons:tiktok",fallback:(0,r.jsx)(ey.Music,{size:20})},{name:"npm",host:"npmjs.com",icon:"simple-icons:npm",fallback:(0,r.jsx)(eb,{size:20})},{name:"Vercel",host:"vercel.com",icon:"simple-icons:vercel",fallback:(0,r.jsx)(ex,{size:20})}];function ew({icon:e,fallback:t}){let[n,a]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let t=new Image;t.onload=()=>a(!0),t.onerror=()=>a(!1),t.src=`https://api.iconify.design/${e.replace(":","/")}.svg`},[e]),(0,r.jsxs)("span",{className:"brand-icon-wrap",children:[(0,r.jsx)("span",{className:`brand-icon-fallback ${n?"hidden":""}`,children:t}),(0,r.jsx)("span",{className:`brand-icon-real ${n?"visible":""}`,children:(0,r.jsx)(er,{icon:e,width:20,height:20})})]})}function eM(){let[e,t]=(0,i.useState)(new Map),[n,a]=(0,i.useState)(!1),l=(0,i.useRef)(new Map),o=(0,i.useCallback)(e=>{t(t=>{let n=new Map(t);return n.set(e,{status:"pending",latency:0}),n});let n=new AbortController;l.current.set(e,n);let r=performance.now(),i=(n,r)=>{t(t=>{let i=new Map(t);return i.set(e,{status:n,latency:r}),i})},a=setTimeout(()=>{n.abort()},5e3);fetch(`https://${e}/`,{method:"HEAD",mode:"no-cors",cache:"no-store",signal:n.signal}).then(()=>{clearTimeout(a),i("ok",Math.round(performance.now()-r))}).catch(()=>{clearTimeout(a),i("timeout",0)})},[]),s=(0,i.useCallback)(()=>{a(!0);let e=new Map;ej.forEach(t=>{e.set(t.host,{status:"pending",latency:0})}),t(e);let n=new Set(ej.map(e=>e.host));ej.forEach(e=>{let r=new AbortController;l.current.set(e.host,r);let i=performance.now(),o=(r,i)=>{n.has(e.host)&&(n.delete(e.host),t(t=>{let n=new Map(t);return n.set(e.host,{status:r,latency:i}),n}),0===n.size&&a(!1))},s=setTimeout(()=>{r.abort()},5e3);fetch(`https://${e.host}/`,{method:"HEAD",mode:"no-cors",cache:"no-store",signal:r.signal}).then(()=>{clearTimeout(s),o("ok",Math.round(performance.now()-i))}).catch(()=>{clearTimeout(s),o("timeout",0)})})},[]);return(0,i.useEffect)(()=>(s(),()=>{l.current.forEach(e=>e.abort()),l.current.clear()}),[s]),(0,r.jsxs)("div",{className:"ping-page",children:[(0,r.jsxs)("div",{className:"ping-header",children:[(0,r.jsxs)("div",{className:"ping-title-wrap",children:[(0,r.jsx)(ev.Wifi,{size:28,className:"ping-title-icon"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"ping-title",children:"网络连通性"}),(0,r.jsx)("p",{className:"ping-subtitle",children:"通过向对应网站发送请求进行测试,延迟值仅供参考。"})]})]}),(0,r.jsx)("button",{className:"btn btn-icon",onClick:s,disabled:n,"aria-label":"重新测试全部",title:"重新测试全部",children:(0,r.jsx)(ek,{size:18,className:n?"ping-spin":""})})]}),(0,r.jsx)("div",{className:"ping-grid",children:ej.map(t=>{let n=e.get(t.host),i=!n||"pending"===n.status,a=n?.status==="timeout";return(0,r.jsxs)("div",{className:`ping-card ${i?"pending":""}`,children:[(0,r.jsxs)("div",{className:"ping-card-top",children:[(0,r.jsx)("span",{className:"ping-card-icon",children:(0,r.jsx)(ew,{icon:t.icon,fallback:t.fallback})}),(0,r.jsx)("a",{href:`https://${t.host}`,target:"_blank",rel:"noreferrer",className:"ping-card-name",children:t.name}),(0,r.jsx)("button",{className:"ping-card-refresh",onClick:()=>o(t.host),disabled:i,"aria-label":`重新测试 ${t.name}`,title:"重新测试",children:(0,r.jsx)(ek,{size:13,className:i?"ping-spin":""})})]}),(0,r.jsxs)("div",{className:"ping-card-bottom",children:[i?(0,r.jsx)("span",{className:"ping-pulse-dot"}):(0,r.jsx)("span",{className:`ping-status-label ${a?"is-error":"is-success"}`,children:a?"不可用":"可用"}),(0,r.jsx)("span",{className:`ping-latency ${i?"is-muted":a?"is-error":"is-success"}`,children:i?"--":a?"超时":`${n.latency} ms`})]})]},t.host)})})]})}var eS=e.i(40983);e.s(["default",0,function(){return(0,r.jsx)(eS.MarketingLayout,{children:(0,r.jsx)(eM,{})})}],23449)}]);