most-box 0.1.0 → 0.1.2

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 (390) hide show
  1. package/README.md +24 -16
  2. package/electron/main.js +72 -8
  3. package/electron/preload.js +6 -0
  4. package/out/404/index.html +2 -2
  5. package/out/404.html +2 -2
  6. package/out/__next.__PAGE__.txt +6 -6
  7. package/out/__next._full.txt +23 -20
  8. package/out/__next._head.txt +3 -3
  9. package/out/__next._index.txt +8 -6
  10. package/out/__next._tree.txt +6 -4
  11. package/out/_next/static/chunks/0-n3pg7th.zza.js +1 -0
  12. package/out/_next/static/chunks/0.4j.0k5a64vg.js +1 -0
  13. package/out/_next/static/chunks/0.e2avjgna_b2.js +1 -0
  14. package/out/_next/static/chunks/0.ozi1_x2.m.~.js +1 -0
  15. package/out/_next/static/chunks/0.t5wlt51zou5.js +1 -0
  16. package/out/_next/static/chunks/0.w4hkvap~bva.js +1 -0
  17. package/out/_next/static/chunks/00d9h1tddnnnd.js +1 -0
  18. package/out/_next/static/chunks/00tkdqwxch-3s.js +1 -0
  19. package/out/_next/static/chunks/01l3o90g~1z42.js +1 -0
  20. package/out/_next/static/chunks/01mfky9camw6i.js +1 -0
  21. package/out/_next/static/chunks/01r.v-pqs1vrm.js +1 -0
  22. package/out/_next/static/chunks/03edqrb4zdj~g.js +31 -0
  23. package/out/_next/static/chunks/03h_6oo-gqkhz.js +1 -0
  24. package/out/_next/static/chunks/{0ho~log~~-jwp.css → 03h~nhgj0hv3p.css} +1 -1
  25. package/out/_next/static/chunks/04hcgsanv1hhu.js +1 -0
  26. package/out/_next/static/chunks/05g2q0w5b34.g.js +1 -0
  27. package/out/_next/static/chunks/05of77xycbt8~.js +1 -0
  28. package/out/_next/static/chunks/05zwemzfjx3sh.js +1 -0
  29. package/out/_next/static/chunks/06dpc5df94.v1.js +1 -0
  30. package/out/_next/static/chunks/06e1~1-z_ic9a.js +1 -0
  31. package/out/_next/static/chunks/075s7sn.ns~u5.js +1 -0
  32. package/out/_next/static/chunks/07dynrbvd3.f4.js +1 -0
  33. package/out/_next/static/chunks/07p~uva5pwgwe.js +1 -0
  34. package/out/_next/static/chunks/07r9nn-pzlgg1.js +1 -0
  35. package/out/_next/static/chunks/07td.jq7xff84.css +1 -0
  36. package/out/_next/static/chunks/08.72abkgwy9g.js +1 -0
  37. package/out/_next/static/chunks/08576xhv~~jck.js +1 -0
  38. package/out/_next/static/chunks/08u211~k~qu52.js +1 -0
  39. package/out/_next/static/chunks/098.p.2-zm4p7.js +1 -0
  40. package/out/_next/static/chunks/09ngvtajm7e5y.js +1 -0
  41. package/out/_next/static/chunks/09ps~-43n5qyo.js +1 -0
  42. package/out/_next/static/chunks/09v7_0gclxr46.js +1 -0
  43. package/out/_next/static/chunks/09yql86dir9c4.js +1 -0
  44. package/out/_next/static/chunks/09zmlfljowj1~.js +1 -0
  45. package/out/_next/static/chunks/0_s~ebb-7b2hr.js +1 -0
  46. package/out/_next/static/chunks/0_w-0-2z5oqd_.js +1 -0
  47. package/out/_next/static/chunks/0adx~d-j05c9d.css +24 -0
  48. package/out/_next/static/chunks/0ao1lbi4b.sfa.js +1 -0
  49. package/out/_next/static/chunks/0aq.rc9woa2nz.js +1 -0
  50. package/out/_next/static/chunks/0bld2u_ld~va2.js +1 -0
  51. package/out/_next/static/chunks/0bliugh5lxw55.js +1 -0
  52. package/out/_next/static/chunks/0cn9a7aimbdzq.js +1 -0
  53. package/out/_next/static/chunks/0d3f-nk3c.2re.js +1 -0
  54. package/out/_next/static/chunks/0dtohpf7~3d12.js +1 -0
  55. package/out/_next/static/chunks/0e-3e8h7g99yf.js +1 -0
  56. package/out/_next/static/chunks/0e531nije_ln2.js +1 -0
  57. package/out/_next/static/chunks/0e5zvj_rh0z3m.js +1 -0
  58. package/out/_next/static/chunks/0etes81d_cihn.js +1 -0
  59. package/out/_next/static/chunks/0f4y~rkk-n81e.js +1 -0
  60. package/out/_next/static/chunks/0fk~0~p7ivfn1.js +1 -0
  61. package/out/_next/static/chunks/0fw6juc~lsj3z.js +1 -0
  62. package/out/_next/static/chunks/0g0u7785a73vo.js +1 -0
  63. package/out/_next/static/chunks/0g_a~e050bgzg.css +1 -0
  64. package/out/_next/static/chunks/0g_fpgh7drfda.js +1 -0
  65. package/out/_next/static/chunks/{0n~dq4kpx9xxx.js → 0gcsdf57gcm6h.js} +1 -1
  66. package/out/_next/static/chunks/0gwian.hp3-92.js +1 -0
  67. package/out/_next/static/chunks/0gze5uso1mbe9.js +1 -0
  68. package/out/_next/static/chunks/0h4r.qtmpa6eh.js +1 -0
  69. package/out/_next/static/chunks/0hf.aosc-7172.js +1 -0
  70. package/out/_next/static/chunks/0hgz35c1ejbs9.js +1 -0
  71. package/out/_next/static/chunks/0hpev4am9jpmu.css +1 -0
  72. package/out/_next/static/chunks/0hrw-r.xmvmsq.js +1 -0
  73. package/out/_next/static/chunks/0hzg4al.v~8~m.js +1 -0
  74. package/out/_next/static/chunks/0ip9xrols_83o.js +1 -0
  75. package/out/_next/static/chunks/0j4-d0qf.v~kn.js +1 -0
  76. package/out/_next/static/chunks/0jhdeq.j9_02m.js +1 -0
  77. package/out/_next/static/chunks/0jy63h3i-y69i.js +1 -0
  78. package/out/_next/static/chunks/0kdnx_u-60k9s.js +1 -0
  79. package/out/_next/static/chunks/0kq~edq42o1-c.js +1 -0
  80. package/out/_next/static/chunks/0l5_.uqb-uqb8.js +1 -0
  81. package/out/_next/static/chunks/0l682p362d-5w.js +1 -0
  82. package/out/_next/static/chunks/0m68p9txef5rs.js +1 -0
  83. package/out/_next/static/chunks/0mex8svsiv-2l.js +1 -0
  84. package/out/_next/static/chunks/0mme-fm5d2oz2.js +1 -0
  85. package/out/_next/static/chunks/0myp4sjagr~h0.js +1 -0
  86. package/out/_next/static/chunks/0myq9gs8szydh.js +1 -0
  87. package/out/_next/static/chunks/0n.qlfk~z7o.6.js +1 -0
  88. package/out/_next/static/chunks/0n4t80gjc3q5h.js +1 -0
  89. package/out/_next/static/chunks/0o9ce4cyf76by.js +736 -0
  90. package/out/_next/static/chunks/0oz3yl6_-716p.js +1 -0
  91. package/out/_next/static/chunks/0p0sv~fuddvgr.js +1 -0
  92. package/out/_next/static/chunks/0pt.5cg1t09qs.js +1 -0
  93. package/out/_next/static/chunks/0q0ksgxg98xgd.js +1 -0
  94. package/out/_next/static/chunks/0qgx9t4jx16ua.css +1 -0
  95. package/out/_next/static/chunks/0qqupeexg83u7.js +1 -0
  96. package/out/_next/static/chunks/0rb-ri481.kc9.js +1 -0
  97. package/out/_next/static/chunks/0rsnmahfd.59p.js +1 -0
  98. package/out/_next/static/chunks/0rt6rgnvr-s_p.js +1 -0
  99. package/out/_next/static/chunks/0runh28p_gg6..js +1 -0
  100. package/out/_next/static/chunks/0shy.t1fwqcev.js +1 -0
  101. package/out/_next/static/chunks/{0d3shmwh5_nmn.js → 0t2xr05rlu96l.js} +1 -1
  102. package/out/_next/static/chunks/0t6h56rhg1y5i.js +1 -0
  103. package/out/_next/static/chunks/0tdqd1zunusgk.js +1 -0
  104. package/out/_next/static/chunks/0ujbnp38x63ek.js +1 -0
  105. package/out/_next/static/chunks/0ukyg~tkm~h2m.css +1 -0
  106. package/out/_next/static/chunks/0v68pdrp54lb-.js +1 -0
  107. package/out/_next/static/chunks/0vsm0m5sxrb.3.js +1 -0
  108. package/out/_next/static/chunks/0vzlz.iboqo3c.js +1 -0
  109. package/out/_next/static/chunks/0w87vbpkf-ogd.js +1 -0
  110. package/out/_next/static/chunks/0wtf0xsiicxx6.js +1 -0
  111. package/out/_next/static/chunks/0xdwau5k2augv.css +4 -0
  112. package/out/_next/static/chunks/0xgg0~kmf3gd-.js +1 -0
  113. package/out/_next/static/chunks/0xj24-70ptdzp.js +1 -0
  114. package/out/_next/static/chunks/0xxlx772fr3x4.js +1 -0
  115. package/out/_next/static/chunks/0y.li-~3oybew.js +1 -0
  116. package/out/_next/static/chunks/0yl2t7cs-n_ng.js +1 -0
  117. package/out/_next/static/chunks/0yq3kh.hchtm_.js +1 -0
  118. package/out/_next/static/chunks/0ys0l5au.9c2c.js +1 -0
  119. package/out/_next/static/chunks/0z48pmi6buytt.js +1 -0
  120. package/out/_next/static/chunks/0zapnvgy89mg..js +1 -0
  121. package/out/_next/static/chunks/0~.-vxi5oc.r0.js +1 -0
  122. package/out/_next/static/chunks/0~3ik-hfp9s-7.js +1 -0
  123. package/out/_next/static/chunks/0~4f5p6tvn1lq.js +1 -0
  124. package/out/_next/static/chunks/0~_0ys.2whxbw.js +1 -0
  125. package/out/_next/static/chunks/0~_ui9l7.2sxf.js +1 -0
  126. package/out/_next/static/chunks/1037jlyw5~7ht.js +1 -0
  127. package/out/_next/static/chunks/1045hfzu533z0.js +1 -0
  128. package/out/_next/static/chunks/104e5nmc.c-pl.js +1 -0
  129. package/out/_next/static/chunks/109taw1pbh-0b.js +1 -0
  130. package/out/_next/static/chunks/10x7~onqwp338.js +1 -0
  131. package/out/_next/static/chunks/10ynz1dy483wf.js +1 -0
  132. package/out/_next/static/chunks/11hds.mg~4_r-.js +1 -0
  133. package/out/_next/static/chunks/11ibzaklcauw~.js +1 -0
  134. package/out/_next/static/chunks/11z.0s6.42b.p.js +1 -0
  135. package/out/_next/static/chunks/12-9n56l0y3yr.js +1 -0
  136. package/out/_next/static/chunks/126enaq~f7scl.js +1 -0
  137. package/out/_next/static/chunks/12nr19.nnn6s3.js +5 -0
  138. package/out/_next/static/chunks/{0qub_r0x_r-e9.css → 12pep-2t-qg4n.css} +1 -1
  139. package/out/_next/static/chunks/1380op_pfk.qo.js +1 -0
  140. package/out/_next/static/chunks/146oiw1bggtn4.js +1 -0
  141. package/out/_next/static/chunks/14_inksek_rth.js +2 -0
  142. package/out/_next/static/chunks/14_po2rb_arn4.js +1 -0
  143. package/out/_next/static/chunks/14a4fwbiq.l3z.js +1 -0
  144. package/out/_next/static/chunks/14cowsqn95m1k.js +1 -0
  145. package/out/_next/static/chunks/14dtd3l03v.kx.js +1 -0
  146. package/out/_next/static/chunks/14tm3qa-v9o-4.js +1 -0
  147. package/out/_next/static/chunks/15-o4kb-evqd7.js +1 -0
  148. package/out/_next/static/chunks/153-sz7s.qml2.js +1 -0
  149. package/out/_next/static/chunks/157z7bowux3xj.js +1 -0
  150. package/out/_next/static/chunks/15m1_677az2cm.js +1 -0
  151. package/out/_next/static/chunks/15v.~.ne6ogkk.js +1 -0
  152. package/out/_next/static/chunks/16i.qbk8t8gf_.js +1 -0
  153. package/out/_next/static/chunks/16u9f35gylw8l.js +1 -0
  154. package/out/_next/static/chunks/16xls5tt_68lx.js +1 -0
  155. package/out/_next/static/chunks/17ajyb5ogk5yj.js +1 -0
  156. package/out/_next/static/chunks/17dyfxbq8yz8n.js +1 -0
  157. package/out/_next/static/chunks/180zln9pcq9ih.js +1 -0
  158. package/out/_next/static/chunks/1814izi5gh.kp.js +1 -0
  159. package/out/_next/static/chunks/turbopack-0xta0kqwzkf28.js +1 -0
  160. package/out/_next/static/media/KaTeX_AMS-Regular.0b~8ki5y928w2.woff +0 -0
  161. package/out/_next/static/media/KaTeX_AMS-Regular.0p1vbqd84i2~o.woff2 +0 -0
  162. package/out/_next/static/media/KaTeX_AMS-Regular.173t6ktr7uf-w.ttf +0 -0
  163. package/out/_next/static/media/KaTeX_Caligraphic-Bold.01-pzluls4zgb.woff2 +0 -0
  164. package/out/_next/static/media/KaTeX_Caligraphic-Bold.0x2v1lwn~880f.woff +0 -0
  165. package/out/_next/static/media/KaTeX_Caligraphic-Bold.16zv5fax0h0ka.ttf +0 -0
  166. package/out/_next/static/media/KaTeX_Caligraphic-Regular.02i3z7wig438t.ttf +0 -0
  167. package/out/_next/static/media/KaTeX_Caligraphic-Regular.0rysu1t-ncjq8.woff2 +0 -0
  168. package/out/_next/static/media/KaTeX_Caligraphic-Regular.10927swgekwun.woff +0 -0
  169. package/out/_next/static/media/KaTeX_Fraktur-Bold.0e-16u10iuyyf.woff +0 -0
  170. package/out/_next/static/media/KaTeX_Fraktur-Bold.0et27v~3~4uhe.ttf +0 -0
  171. package/out/_next/static/media/KaTeX_Fraktur-Bold.0w23i72~hprpq.woff2 +0 -0
  172. package/out/_next/static/media/KaTeX_Fraktur-Regular.0b.riegzdfue2.woff +0 -0
  173. package/out/_next/static/media/KaTeX_Fraktur-Regular.0rekyoa-52fj_.woff2 +0 -0
  174. package/out/_next/static/media/KaTeX_Fraktur-Regular.0vjwa15znhk~4.ttf +0 -0
  175. package/out/_next/static/media/KaTeX_Main-Bold.09i7~607shf-h.ttf +0 -0
  176. package/out/_next/static/media/KaTeX_Main-Bold.09lmynrorhcbw.woff +0 -0
  177. package/out/_next/static/media/KaTeX_Main-Bold.16pfc63_du6mx.woff2 +0 -0
  178. package/out/_next/static/media/KaTeX_Main-BoldItalic.0cp37g7x1q8h6.woff +0 -0
  179. package/out/_next/static/media/KaTeX_Main-BoldItalic.0d54rk08rx11s.woff2 +0 -0
  180. package/out/_next/static/media/KaTeX_Main-BoldItalic.15j6k~hix2t_0.ttf +0 -0
  181. package/out/_next/static/media/KaTeX_Main-Italic.0382gqciexmbu.woff +0 -0
  182. package/out/_next/static/media/KaTeX_Main-Italic.06o5nq0_91v60.woff2 +0 -0
  183. package/out/_next/static/media/KaTeX_Main-Italic.0su4i6mm18-wo.ttf +0 -0
  184. package/out/_next/static/media/KaTeX_Main-Regular.08zh8z.7shijf.ttf +0 -0
  185. package/out/_next/static/media/KaTeX_Main-Regular.0diheg01zyoph.woff +0 -0
  186. package/out/_next/static/media/KaTeX_Main-Regular.0kaf-ag2_wkm-.woff2 +0 -0
  187. package/out/_next/static/media/KaTeX_Math-BoldItalic.0ajzxypnbx1h1.ttf +0 -0
  188. package/out/_next/static/media/KaTeX_Math-BoldItalic.0ck1myuerwyqw.woff +0 -0
  189. package/out/_next/static/media/KaTeX_Math-BoldItalic.0ja97dn.cpc87.woff2 +0 -0
  190. package/out/_next/static/media/KaTeX_Math-Italic.09xkhecjcn5r9.woff +0 -0
  191. package/out/_next/static/media/KaTeX_Math-Italic.0x23a-bmp-5tg.ttf +0 -0
  192. package/out/_next/static/media/KaTeX_Math-Italic.0zrha2c4sl2je.woff2 +0 -0
  193. package/out/_next/static/media/KaTeX_SansSerif-Bold.05a9.pc1j_zx9.woff2 +0 -0
  194. package/out/_next/static/media/KaTeX_SansSerif-Bold.0jcl-ayi1uun0.woff +0 -0
  195. package/out/_next/static/media/KaTeX_SansSerif-Bold.0re8y.dm7.mt5.ttf +0 -0
  196. package/out/_next/static/media/KaTeX_SansSerif-Italic.0a0234dc3s62j.woff2 +0 -0
  197. package/out/_next/static/media/KaTeX_SansSerif-Italic.0judofdln9731.woff +0 -0
  198. package/out/_next/static/media/KaTeX_SansSerif-Italic.10z1iap9pfus8.ttf +0 -0
  199. package/out/_next/static/media/KaTeX_SansSerif-Regular.0h9yjlugq4q_e.woff +0 -0
  200. package/out/_next/static/media/KaTeX_SansSerif-Regular.0v6gcj32-czft.woff2 +0 -0
  201. package/out/_next/static/media/KaTeX_SansSerif-Regular.0zm18kga42ebc.ttf +0 -0
  202. package/out/_next/static/media/KaTeX_Script-Regular.0c4.h-mer83d_.woff2 +0 -0
  203. package/out/_next/static/media/KaTeX_Script-Regular.0q14y6zkzlpob.ttf +0 -0
  204. package/out/_next/static/media/KaTeX_Script-Regular.0ze6v4r_-99oy.woff +0 -0
  205. package/out/_next/static/media/KaTeX_Size1-Regular.013x6a4ierotp.woff2 +0 -0
  206. package/out/_next/static/media/KaTeX_Size1-Regular.0kidw0oi.m68o.woff +0 -0
  207. package/out/_next/static/media/KaTeX_Size1-Regular.0m6y-i6wfokni.ttf +0 -0
  208. package/out/_next/static/media/KaTeX_Size2-Regular.0blpmluwilgbg.woff +0 -0
  209. package/out/_next/static/media/KaTeX_Size2-Regular.0d5inmyp-tyv3.woff2 +0 -0
  210. package/out/_next/static/media/KaTeX_Size2-Regular.0wnhnvj-.k9d5.ttf +0 -0
  211. package/out/_next/static/media/KaTeX_Size3-Regular.01h0xm_sfctj3.woff +0 -0
  212. package/out/_next/static/media/KaTeX_Size3-Regular.0iukctyhw5j56.woff2 +0 -0
  213. package/out/_next/static/media/KaTeX_Size3-Regular.0jl8mqyf4gzpn.ttf +0 -0
  214. package/out/_next/static/media/KaTeX_Size4-Regular.0w3.rb_c4stzk.woff2 +0 -0
  215. package/out/_next/static/media/KaTeX_Size4-Regular.0wr_9l81-mu06.ttf +0 -0
  216. package/out/_next/static/media/KaTeX_Size4-Regular.12tvaesf3.zl3.woff +0 -0
  217. package/out/_next/static/media/KaTeX_Typewriter-Regular.0c4zdxz~8frhm.woff2 +0 -0
  218. package/out/_next/static/media/KaTeX_Typewriter-Regular.0cgrzn5l3kao5.woff +0 -0
  219. package/out/_next/static/media/KaTeX_Typewriter-Regular.128~qc3858otl.ttf +0 -0
  220. package/out/_not-found/__next._full.txt +21 -19
  221. package/out/_not-found/__next._head.txt +3 -3
  222. package/out/_not-found/__next._index.txt +8 -6
  223. package/out/_not-found/__next._not-found.__PAGE__.txt +4 -4
  224. package/out/_not-found/__next._not-found.txt +3 -3
  225. package/out/_not-found/__next._tree.txt +3 -2
  226. package/out/_not-found/index.html +2 -2
  227. package/out/_not-found/index.txt +21 -19
  228. package/out/admin/__next._full.txt +23 -0
  229. package/out/admin/__next._head.txt +5 -0
  230. package/out/admin/__next._index.txt +9 -0
  231. package/out/admin/__next._tree.txt +5 -0
  232. package/out/admin/__next.admin.__PAGE__.txt +9 -0
  233. package/out/admin/__next.admin.txt +5 -0
  234. package/out/admin/index.html +15 -0
  235. package/out/admin/index.txt +23 -0
  236. package/out/app/__next._full.txt +15 -13
  237. package/out/app/__next._head.txt +3 -3
  238. package/out/app/__next._index.txt +8 -6
  239. package/out/app/__next._tree.txt +4 -2
  240. package/out/app/__next.app.__PAGE__.txt +4 -4
  241. package/out/app/__next.app.txt +3 -4
  242. package/out/app/index.html +2 -2
  243. package/out/app/index.txt +15 -13
  244. package/out/chat/__next._full.txt +16 -14
  245. package/out/chat/__next._head.txt +3 -3
  246. package/out/chat/__next._index.txt +8 -6
  247. package/out/chat/__next._tree.txt +5 -3
  248. package/out/chat/__next.chat.__PAGE__.txt +4 -4
  249. package/out/chat/__next.chat.txt +4 -5
  250. package/out/chat/index.html +2 -2
  251. package/out/chat/index.txt +16 -14
  252. package/out/chat/join/__next._full.txt +25 -0
  253. package/out/chat/join/__next._head.txt +5 -0
  254. package/out/chat/join/__next._index.txt +9 -0
  255. package/out/chat/join/__next._tree.txt +5 -0
  256. package/out/chat/join/__next.chat.join.__PAGE__.txt +9 -0
  257. package/out/chat/join/__next.chat.join.txt +5 -0
  258. package/out/chat/join/__next.chat.txt +5 -0
  259. package/out/chat/join/index.html +15 -0
  260. package/out/chat/join/index.txt +25 -0
  261. package/out/download/__next._full.txt +34 -33
  262. package/out/download/__next._head.txt +3 -3
  263. package/out/download/__next._index.txt +8 -6
  264. package/out/download/__next._tree.txt +6 -4
  265. package/out/download/__next.download.__PAGE__.txt +13 -14
  266. package/out/download/__next.download.txt +3 -3
  267. package/out/download/index.html +2 -2
  268. package/out/download/index.txt +34 -33
  269. package/out/index.html +2 -2
  270. package/out/index.txt +23 -20
  271. package/out/note/__next._full.txt +24 -0
  272. package/out/{changelog → note}/__next._head.txt +3 -3
  273. package/out/note/__next._index.txt +9 -0
  274. package/out/note/__next._tree.txt +4 -0
  275. package/out/note/__next.note.__PAGE__.txt +9 -0
  276. package/out/note/__next.note.txt +5 -0
  277. package/out/note/index.html +15 -0
  278. package/out/note/index.txt +24 -0
  279. package/out/ping/__next._full.txt +23 -20
  280. package/out/ping/__next._head.txt +3 -3
  281. package/out/ping/__next._index.txt +8 -6
  282. package/out/ping/__next._tree.txt +6 -4
  283. package/out/ping/__next.ping.__PAGE__.txt +5 -5
  284. package/out/ping/__next.ping.txt +4 -4
  285. package/out/ping/index.html +2 -2
  286. package/out/ping/index.txt +23 -20
  287. package/out/web3/__next._full.txt +16 -14
  288. package/out/web3/__next._head.txt +3 -3
  289. package/out/web3/__next._index.txt +8 -6
  290. package/out/web3/__next._tree.txt +5 -3
  291. package/out/web3/__next.web3.__PAGE__.txt +4 -4
  292. package/out/web3/__next.web3.txt +4 -5
  293. package/out/web3/ed25519/__next._full.txt +14 -12
  294. package/out/web3/ed25519/__next._head.txt +3 -3
  295. package/out/web3/ed25519/__next._index.txt +8 -6
  296. package/out/web3/ed25519/__next._tree.txt +5 -3
  297. package/out/web3/ed25519/__next.web3.ed25519.__PAGE__.txt +2 -2
  298. package/out/web3/ed25519/__next.web3.ed25519.txt +3 -3
  299. package/out/web3/ed25519/__next.web3.txt +4 -5
  300. package/out/web3/ed25519/index.html +1 -1
  301. package/out/web3/ed25519/index.txt +14 -12
  302. package/out/web3/index.html +2 -2
  303. package/out/web3/index.txt +16 -14
  304. package/out/web3/tools/__next._full.txt +14 -12
  305. package/out/web3/tools/__next._head.txt +3 -3
  306. package/out/web3/tools/__next._index.txt +8 -6
  307. package/out/web3/tools/__next._tree.txt +5 -3
  308. package/out/web3/tools/__next.web3.tools.__PAGE__.txt +2 -2
  309. package/out/web3/tools/__next.web3.tools.txt +3 -3
  310. package/out/web3/tools/__next.web3.txt +4 -5
  311. package/out/web3/tools/index.html +1 -1
  312. package/out/web3/tools/index.txt +14 -12
  313. package/package.json +30 -13
  314. package/server/index.js +188 -901
  315. package/server/src/config.js +5 -1
  316. package/server/src/core/channelAttachment.js +68 -0
  317. package/server/src/core/cid.js +6 -71
  318. package/server/src/core/cidTopic.js +29 -0
  319. package/server/src/core/mostLink.js +88 -0
  320. package/server/src/http/access.js +123 -0
  321. package/server/src/http/app.js +1095 -0
  322. package/server/src/http/errors.js +35 -0
  323. package/server/src/http/nodeLogs.js +53 -0
  324. package/server/src/http/nodeStatus.js +146 -0
  325. package/server/src/http/staticFiles.js +84 -0
  326. package/server/src/http/uploads.js +114 -0
  327. package/server/src/index.js +1539 -301
  328. package/server/src/node/config.js +191 -0
  329. package/server/src/node/logs.js +94 -0
  330. package/server/src/utils/api.js +359 -8
  331. package/server/src/utils/auth.js +63 -0
  332. package/server/src/utils/dateTime.js +30 -0
  333. package/server/src/utils/downloadMessages.js +89 -0
  334. package/server/src/utils/errors.js +14 -0
  335. package/server/src/utils/mostWallet.js +185 -1
  336. package/server/src/utils/mp.js +2 -26
  337. package/server/src/utils/noteBackup.js +116 -0
  338. package/server/src/utils/noteUtils.js +128 -0
  339. package/server/src/utils/userIdentity.js +8 -61
  340. package/out/_next/static/chunks/003jnm.v5tzw5.js +0 -1
  341. package/out/_next/static/chunks/00re8v.gbcywn.js +0 -1
  342. package/out/_next/static/chunks/00s106sbq8t9v.js +0 -1
  343. package/out/_next/static/chunks/012hi627qrdnn.js +0 -1
  344. package/out/_next/static/chunks/0174xh3wfsjm1.js +0 -2
  345. package/out/_next/static/chunks/02~o2nmo5pmy1.js +0 -1
  346. package/out/_next/static/chunks/07t.dhhokszz5.css +0 -1
  347. package/out/_next/static/chunks/0_wia9ofmsi1c.css +0 -2
  348. package/out/_next/static/chunks/0ah8fihozo2_u.js +0 -5
  349. package/out/_next/static/chunks/0bzupvr5gt3k9.js +0 -31
  350. package/out/_next/static/chunks/0e_h0d3ekzks8.css +0 -1
  351. package/out/_next/static/chunks/0gdluj423gso1.js +0 -1
  352. package/out/_next/static/chunks/0gmoiq06srjay.css +0 -1
  353. package/out/_next/static/chunks/0imkasy7kb67u.js +0 -1
  354. package/out/_next/static/chunks/0jjc_b9q_ldi2.js +0 -1
  355. package/out/_next/static/chunks/0jl~j62iz2uvr.js +0 -1
  356. package/out/_next/static/chunks/0lqslm813wk_h.js +0 -1
  357. package/out/_next/static/chunks/0q782fxxd0lx~.js +0 -1
  358. package/out/_next/static/chunks/0slwj0c46k5cu.js +0 -1
  359. package/out/_next/static/chunks/0sorqk.oc6b7j.css +0 -1
  360. package/out/_next/static/chunks/0tapzqc6hgvx-.js +0 -1
  361. package/out/_next/static/chunks/0xsc7z5x8n7wg.js +0 -1
  362. package/out/_next/static/chunks/0zm~gys2jwl0g.js +0 -1
  363. package/out/_next/static/chunks/turbopack-0a_g3u0ud~jb8.js +0 -1
  364. package/out/changelog/__next._full.txt +0 -22
  365. package/out/changelog/__next._index.txt +0 -7
  366. package/out/changelog/__next._tree.txt +0 -3
  367. package/out/changelog/__next.changelog.__PAGE__.txt +0 -10
  368. package/out/changelog/__next.changelog.txt +0 -5
  369. package/out/changelog/index.html +0 -15
  370. package/out/changelog/index.txt +0 -22
  371. package/out/docs/__next._full.txt +0 -22
  372. package/out/docs/__next._head.txt +0 -5
  373. package/out/docs/__next._index.txt +0 -7
  374. package/out/docs/__next._tree.txt +0 -3
  375. package/out/docs/__next.docs.__PAGE__.txt +0 -10
  376. package/out/docs/__next.docs.txt +0 -5
  377. package/out/docs/getting-started/__next._full.txt +0 -22
  378. package/out/docs/getting-started/__next._head.txt +0 -5
  379. package/out/docs/getting-started/__next._index.txt +0 -7
  380. package/out/docs/getting-started/__next._tree.txt +0 -3
  381. package/out/docs/getting-started/__next.docs.getting-started.__PAGE__.txt +0 -10
  382. package/out/docs/getting-started/__next.docs.getting-started.txt +0 -5
  383. package/out/docs/getting-started/__next.docs.txt +0 -5
  384. package/out/docs/getting-started/index.html +0 -15
  385. package/out/docs/getting-started/index.txt +0 -22
  386. package/out/docs/index.html +0 -15
  387. package/out/docs/index.txt +0 -22
  388. /package/out/_next/static/{iOB2EBwOGZ0iYW7Lbg9u_ → t7ZIeQpVvjz4a7-5Tt-VK}/_buildManifest.js +0 -0
  389. /package/out/_next/static/{iOB2EBwOGZ0iYW7Lbg9u_ → t7ZIeQpVvjz4a7-5Tt-VK}/_clientMiddlewareManifest.js +0 -0
  390. /package/out/_next/static/{iOB2EBwOGZ0iYW7Lbg9u_ → t7ZIeQpVvjz4a7-5Tt-VK}/_ssgManifest.js +0 -0
@@ -1,58 +1,15 @@
1
- import { randomBytes } from 'node:crypto'
2
- import {
3
- pbkdf2,
4
- sha256,
5
- getBytes,
6
- Mnemonic,
7
- HDNodeWallet,
8
- toUtf8Bytes,
9
- hexlify,
10
- } from 'ethers'
11
-
12
- const SALT_PREFIX = '/most.box/'
13
- const PBKDF2_ITERATIONS = 3
14
- const PBKDF2_KEY_LENGTH = 32
15
-
16
- function generateAddressAndSeed(username, password) {
17
- const salt = toUtf8Bytes(SALT_PREFIX + username)
18
- const p = toUtf8Bytes(password)
19
- const kdf = pbkdf2(p, salt, PBKDF2_ITERATIONS, PBKDF2_KEY_LENGTH, 'sha512')
20
- const seed = getBytes(sha256(getBytes(kdf)))
21
- const mnemonic = Mnemonic.entropyToPhrase(seed)
22
- const account = HDNodeWallet.fromPhrase(mnemonic)
23
- return {
24
- address: account.address,
25
- danger: hexlify(seed),
26
- }
27
- }
28
-
29
- export function createGuestIdentity(password) {
30
- const username = '匿名'
31
- const { address, danger } = generateAddressAndSeed(username, password)
32
- return {
33
- username,
34
- password,
35
- address,
36
- danger,
37
- displayName: `匿名#${address.slice(2, 8)}`,
38
- }
39
- }
1
+ import { mostWallet } from './mostWallet.js'
40
2
 
41
3
  export function createLoginIdentity(username, password) {
42
- const { address, danger } = generateAddressAndSeed(username, password)
4
+ const { address, danger } = mostWallet(username, password)
43
5
  return {
44
6
  username,
45
- password,
46
7
  address,
47
8
  danger,
48
9
  displayName: `${username}#${address.slice(-4).toUpperCase()}`,
49
10
  }
50
11
  }
51
12
 
52
- export function generateGuestPassword() {
53
- return randomBytes(32).toString('hex')
54
- }
55
-
56
13
  export function loadIdentity() {
57
14
  if (typeof localStorage === 'undefined') return null
58
15
  try {
@@ -69,25 +26,15 @@ export function saveIdentity(identity) {
69
26
  localStorage.setItem('mostbox_identity', JSON.stringify(identity))
70
27
  }
71
28
 
72
- export function saveGuestIdentity(guestIdentity) {
29
+ export function clearIdentity() {
73
30
  if (typeof localStorage === 'undefined') return
74
- localStorage.setItem('mostbox_guest_identity', JSON.stringify(guestIdentity))
75
- }
76
-
77
- export function loadGuestIdentity() {
78
- if (typeof localStorage === 'undefined') return null
79
- try {
80
- const data = localStorage.getItem('mostbox_guest_identity')
81
- if (!data) return null
82
- return JSON.parse(data)
83
- } catch {
84
- return null
85
- }
31
+ localStorage.removeItem('mostbox_identity')
32
+ localStorage.removeItem('mostbox_guest_identity')
86
33
  }
87
34
 
88
- export function getDisplayName(address, username = '匿名') {
89
- if (username === '匿名') {
90
- return `匿名#${address.slice(2, 8)}`
35
+ export function getDisplayName(address, username) {
36
+ if (!username) {
37
+ return address ? `${address.slice(0, 6)}...${address.slice(-4)}` : ''
91
38
  }
92
39
  return `${username}#${address.slice(-4).toUpperCase()}`
93
40
  }
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35965,96699,93583,e=>{"use strict";var t=e.i(56420);let s=(0,t.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,s],35965);let r=(0,t.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,r],96699);let a=(0,t.default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);e.s(["Menu",0,a],93583)},89664,e=>{"use strict";let t=(0,e.i(56420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],89664)},68877,26913,e=>{"use strict";let t=(0,e.i(56420).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],68877);class s extends Error{name="KyError";get isKyError(){return!0}}class r extends s{name="HTTPError";response;request;options;data;constructor(e,t,s){const r=e.status||0===e.status?e.status:"",a=e.statusText??"",o=`${r} ${a}`.trim(),i=o?`status code ${o}`:"an unknown error";super(`Request failed with ${i}: ${t.method} ${t.url}`),this.response=e,this.request=t,this.options=s}}class a extends s{name="NetworkError";request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}}class o extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}}class i extends s{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new o(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}}class n extends Error{name="SchemaValidationError";issues;constructor(e){super("Response schema validation failed"),this.issues=e}}class l extends s{name="TimeoutError";request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}}let c=(()=>{let e=!1,t=!1,s="function"==typeof globalThis.Request;if("function"==typeof globalThis.ReadableStream&&s)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(e){if(e instanceof Error&&"unsupported BodyInit type"===e.message)return!1;throw e}return e&&!t})(),d="function"==typeof globalThis.AbortController,h="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,u="function"==typeof globalThis.ReadableStream,p="function"==typeof globalThis.FormData,m=["get","post","put","patch","head","delete"],f={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},y=Symbol("stop");class g{options;constructor(e){this.options=e}}let b=e=>new g(e),w={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},x={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},j=new TextEncoder,v=(e,t,s)=>{let r,a=0;return e.pipeThrough(new TransformStream({transform(e,o){if(o.enqueue(e),r){a+=r.byteLength;let e=0===t?0:a/t;e>=1&&(e=1-Number.EPSILON),s?.({percent:e,totalBytes:Math.max(t,a),transferredBytes:a},r)}r=e},flush(){r&&(a+=r.byteLength,s?.({percent:1,totalBytes:Math.max(t,a),transferredBytes:a},r))}}))},k=e=>null!==e&&"object"==typeof e,N=Symbol("replaceOption"),R=e=>k(e)&&!0===e[N]?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},T=(...e)=>{for(let t of e)if((!k(t)||Array.isArray(t))&&void 0!==t)throw TypeError("The `options` argument must be an object");return $({},...e)},C=(e={},t={})=>{let s=new globalThis.Headers(e),r=t instanceof globalThis.Headers;for(let[e,a]of new globalThis.Headers(t).entries())r&&"undefined"===a||void 0===a?s.delete(e):s.set(e,a);return s},S=e=>{if(!k(e)||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},q=e=>{if(e instanceof URLSearchParams){let t=new URLSearchParams(e),s=e[z];return s&&(t[z]=new Set(s)),t}return e instanceof globalThis.Headers?new globalThis.Headers(e):Array.isArray(e)?[...e]:S(e)?{...e}:e},E=(e,t)=>S(e)&&S(t)?Object.fromEntries(Object.entries({...e,...t}).filter(e=>void 0!==e[1])):C(e,t);function M(e,t,s){return Object.hasOwn(t,s)&&void 0===t[s]?[]:$(e[s]??[],t[s]??[])}let P=(e={},t={})=>({init:M(e,t,"init"),beforeRequest:M(e,t,"beforeRequest"),beforeRetry:M(e,t,"beforeRetry"),beforeError:M(e,t,"beforeError"),afterResponse:M(e,t,"afterResponse")}),z=Symbol("deletedParameters"),L=(e,t)=>{let s=new URLSearchParams,r=new Set;for(let a of[e,t])if(void 0!==a)if(a instanceof URLSearchParams){for(let[e,t]of a.entries())s.append(e,t),r.delete(e);let e=a[z];if(e)for(let t of e)s.delete(t),r.add(t)}else if(Array.isArray(a))for(let e of a){if(!Array.isArray(e)||2!==e.length)throw TypeError("Array search parameters must be provided in [[key, value], ...] format");s.append(String(e[0]),String(e[1])),r.delete(String(e[0]))}else if(k(a))for(let[e,t]of Object.entries(a))void 0===t?(s.delete(e),r.add(e)):(s.append(e,String(t)),r.delete(e));else for(let[e,t]of new URLSearchParams(a).entries())s.append(e,t),r.delete(e);return r.size>0&&(s[z]=r),s},$=(...e)=>{let t,s={},r={},a={},o=[];for(let i of e)if(Array.isArray(i))Array.isArray(s)||(s=[]),s=[...s,...i];else if(k(i)){for(let[e,r]of Object.entries(i)){if("signal"===e&&r instanceof globalThis.AbortSignal){o.push(r);continue}let a=R(r),{isReplace:i}=a;if(r=a.value,"context"===e){if(null!=r&&(!k(r)||Array.isArray(r)))throw TypeError("The `context` option must be an object");s={...s,context:null==r?{}:i?{...r}:{...s.context,...r}};continue}if("searchParams"===e){t=null==r?void 0:i||void 0===t?r:L(t,r);continue}k(r)&&!i&&e in s&&(r=$(s[e],r)),s={...s,[e]:r}}if(k(i.hooks)){let{value:e,isReplace:t}=R(i.hooks);a=t?P({},e):P(a,e),s.hooks=a}if(k(i.headers)){let{value:e,isReplace:t}=R(i.headers);r=t?q(e):E(r,e),s.headers=r}}return void 0!==t&&(s.searchParams=t),o.length>0&&(1===o.length?s.signal=o[0]:h?s.signal=AbortSignal.any(o):s.signal=o.at(-1)),s},A={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1};async function D(e,t,s,r){return new Promise((a,o)=>{let i=setTimeout(()=>{s&&s.abort(),o(new l(e))},r.timeout);r.fetch(e,t).then(a).catch(o).then(()=>{clearTimeout(i)})})}async function O(e,{signal:t}){return new Promise((s,r)=>{function a(){clearTimeout(o),r(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",a,{once:!0}));let o=setTimeout(()=>{t?.removeEventListener("abort",a),s()},e)})}let F=Object.prototype.toString,U=new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]),B=(e,t)=>e instanceof t||e?.name===t.name,H=Symbol("timedOutResponseData"),I="The `schema` argument must follow the Standard Schema specification",J=Object.prototype.toString,W=e=>e instanceof globalThis.Request||"[object Request]"===J.call(e),V=e=>e instanceof globalThis.Response||"[object Response]"===J.call(e),X=async(e,t)=>{if("object"!=typeof t&&"function"!=typeof t||null===t)throw TypeError(I);let s=t["~standard"];if("object"!=typeof s||null===s||"function"!=typeof s.validate)throw TypeError(I);let r=await s.validate(e);if(r.issues)throw new n(r.issues);return r.value};class _{static create(e,t){var s,a;let o,n=t.hooks?.init??[],l=n.length>0?(o={...t,json:q(t.json),context:q(t.context),headers:q(t.headers),searchParams:Array.isArray(s=t.searchParams)?s.map(e=>[...e]):q(s)},void 0!==t.retry&&(o.retry="object"!=typeof(a=t.retry)?a:{...a,...a.methods&&{methods:[...a.methods]},...a.statusCodes&&{statusCodes:[...a.statusCodes]},...a.afterStatusCodes&&{afterStatusCodes:[...a.afterStatusCodes]}}),o):t;for(let e of n)e(l);let c=new _(e,l),d=async()=>{if("number"==typeof c.#e.timeout&&c.#e.timeout>0x7fffffff)throw RangeError("The `timeout` option cannot be greater than 2147483647");if("number"==typeof c.#e.totalTimeout&&c.#e.totalTimeout>0x7fffffff)throw RangeError("The `totalTimeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await c.#t(),t=e??await c.#s(async()=>c.#r()),s=void 0!==e||c.#a();for(;;){if(void 0===t)return t;if(V(t))try{t=await c.#o(t)}catch(r){if(!(r instanceof i))throw r;let e=await c.#i(r,async()=>c.#r());if(void 0===e)return e;t=e,s=c.#a();continue}let e=t;if(!e.ok&&"opaque"!==e.type&&("function"==typeof c.#e.throwHttpErrors?c.#e.throwHttpErrors(e.status):c.#e.throwHttpErrors)){let a=new r(e,c.#n(e),c.#l());if(a.data=await c.#c(e),s)throw a;let o=await c.#i(a,async()=>c.#r());if(void 0===o)return o;t=o,s=c.#a();continue}break}if(!V(t))return t;if(c.#d(t),c.#e.onDownloadProgress){if("function"!=typeof c.#e.onDownloadProgress)throw TypeError("The `onDownloadProgress` option must be a function");if(!u)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let e=t.clone();c.#h(t);var a=c.#e.onDownloadProgress;if(!e.body)return e;let s={status:e.status,statusText:e.statusText,headers:e.headers};if(204===e.status)return new Response(null,s);let r=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(v(e.body,r,a),s)}return t},h=(async()=>{try{return await d()}catch(t){if(!(t instanceof Error)||c.#u.has(t))throw t;let e=t;for(let t of c.#e.hooks.beforeError){let s=await t({request:c.request,options:c.#l(),error:e,retryCount:c.#p});s instanceof Error&&(e=s)}throw e}finally{let e=c.#m;c.#f(e?.body??void 0),c.request!==e&&c.#f(c.request.body??void 0)}})();for(let[e,t]of Object.entries(f))("bytes"!==e||"function"==typeof globalThis.Response?.prototype?.bytes)&&(h[e]=async s=>{c.request.headers.set("accept",c.request.headers.get("accept")||t);let r=await h;if("json"!==e)return r[e]();let a=await r.text();if(""===a)return void 0!==s?X(void 0,s):JSON.parse(a);let o=l.parseJson?await l.parseJson(a,{request:c.#n(r),response:r}):JSON.parse(a);return void 0===s?o:X(o,s)});return h}static #y(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#g;#p=0;#b;#e;#m;#w;#u=new WeakSet;#x;#j;#v=!1;#k=new WeakMap;constructor(e,t={}){if(this.#b=e,Object.hasOwn(t,"prefixUrl"))throw Error("The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl");if(this.#e={...t,headers:C(this.#b.headers,t.headers),hooks:P({},t.hooks),method:(e=>m.includes(e)?e.toUpperCase():e)(t.method??this.#b.method??"GET"),prefix:String(t.prefix||""),retry:((e={})=>{if("number"==typeof e)return{...A,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw Error("retry.statusCodes must be an array");let t=Object.fromEntries(Object.entries({...e,methods:e.methods?.map(e=>e.toLowerCase())}).filter(([,e])=>void 0!==e));return{...A,...t}})(t.retry),throwHttpErrors:t.throwHttpErrors??!0,timeout:t.timeout??1e4,totalTimeout:t.totalTimeout??!1,fetch:t.fetch??globalThis.fetch.bind(globalThis),context:t.context??{}},"string"!=typeof this.#b&&!(this.#b instanceof URL||this.#b instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if("string"==typeof this.#b){if(this.#e.prefix){const e=this.#e.prefix.replace(/\/+$/,""),t=this.#b.replace(/^\/+/,"");this.#b=`${e}/${t}`}if(this.#e.baseUrl){let e;try{e=new URL(this.#b)}catch{}e||(this.#b=new URL(this.#b,new Request(this.#e.baseUrl).url))}}d&&h&&(this.#w=this.#e.signal??this.#b.signal,this.#g=new globalThis.AbortController,this.#e.signal=this.#N()),c&&(this.#e.duplex="half"),void 0!==this.#e.json&&(this.#e.body=this.#e.stringifyJson?.(this.#e.json)??JSON.stringify(this.#e.json),this.#e.headers.set("content-type",this.#e.headers.get("content-type")??"application/json"));const s=t.headers&&new globalThis.Headers(t.headers).has("content-type");if(this.#b instanceof globalThis.Request&&(p&&this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)&&!s&&this.#e.headers.delete("content-type"),this.request=new globalThis.Request(this.#b,this.#e),(e=>void 0!==e&&(Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0||!!e[z]?.size:"object"==typeof e?Object.keys(e).length>0:"string"==typeof e?e.trim().length>0:!!e))(this.#e.searchParams)){const e=new URL(this.request.url),t=this.#e.searchParams?.[z];if(t)for(const s of t)e.searchParams.delete(s);if("string"==typeof this.#e.searchParams){const t=this.#e.searchParams.replace(/^\?/,"");""!==t&&(e.search=e.search?`${e.search}&${t}`:`?${t}`)}else for(const[t,s]of new URLSearchParams(_.#y(this.#e.searchParams)).entries())e.searchParams.append(t,s);if(this.#e.searchParams&&"object"==typeof this.#e.searchParams&&!Array.isArray(this.#e.searchParams)&&!(this.#e.searchParams instanceof URLSearchParams))for(const[t,s]of Object.entries(this.#e.searchParams))void 0===s&&e.searchParams.delete(t);this.request=new globalThis.Request(e,this.#e)}if(this.#e.onUploadProgress&&"function"!=typeof this.#e.onUploadProgress)throw TypeError("The `onUploadProgress` option must be a function");this.#j="number"==typeof this.#e.totalTimeout?this.#R():void 0}#T(){let e=this.#e.retry.delay(this.#p+1),t=e;return!0===this.#e.retry.jitter?t=Math.random()*e:"function"==typeof this.#e.retry.jitter&&(!Number.isFinite(t=this.#e.retry.jitter(e))||t<0)&&(t=e),Math.min(this.#e.retry.backoffLimit,t)}async #C(e){if(this.#p>=this.#e.retry.limit)throw e;let t=e instanceof Error?e:new o(e);if(t instanceof i)return t.customDelay??this.#T();if(!this.#e.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#e.retry.shouldRetry){let s=await this.#e.retry.shouldRetry({error:t,retryCount:this.#p+1});if(!1===s)throw e;if(!0===s)return this.#T()}if(B(e,l)){if(!this.#e.retry.retryOnTimeout)throw e;return this.#T()}if(B(e,r)){if(!this.#e.retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(t&&this.#e.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);return(Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now()),Number.isFinite(e))?(e=Math.max(0,e),Math.min(this.#e.retry.maxRetryAfter,e)):Math.min(this.#e.retry.maxRetryAfter,this.#T())}if(413===e.response.status)throw e;return this.#T()}if(!B(e,a))throw e;return this.#T()}#d(e){let t=this.#n(e);return this.#e.parseJson&&(e.json=async()=>{let s=await e.text();return""===s?JSON.parse(s):this.#e.parseJson(s,{request:t,response:e})}),e}async #c(e){let t=await this.#S(e,this.#q());if(t===H)return void this.#E();if(!t)return;if(!this.#M(e.headers.get("content-type")??""))return t;let s=await this.#P(t,e,this.#q(),this.#n(e));return s===H?void this.#E():s}#q(){let e=!1===this.#e.timeout?1e4:this.#e.timeout,t=this.#z();if(void 0===t)return e;if(t<=0)throw new l(this.request);return Math.min(e,t)}#M(e){let t=(e.split(";",1)[0]??"").trim().toLowerCase();return/\/(?:.*[.+-])?json$/.test(t)}async #S(e,t){let s,{body:r}=e;if(!r)try{return await e.text()}catch{return}try{s=r.getReader()}catch{return}let a=(e=>{let t=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec(e),s=t?.[1]??t?.[2];if(s)try{return new TextDecoder(s)}catch{}return new TextDecoder})(e.headers.get("content-type")??""),o=[],i=0,n=(async()=>{try{for(;;){let{done:e,value:t}=await s.read();if(e)break;if((i+=t.byteLength)>0xa00000)return void s.cancel().catch(()=>void 0);o.push(a.decode(t,{stream:!0}))}}catch{return}return o.push(a.decode()),o.join("")})(),l=new Promise(e=>{let s=setTimeout(()=>{e(H)},t);n.finally(()=>{clearTimeout(s)})}),c=await Promise.race([n,l]);return c===H&&s.cancel().catch(()=>void 0),c}async #P(e,t,s,r){let a;try{return await Promise.race([Promise.resolve().then(()=>this.#e.parseJson?this.#e.parseJson(e,{request:r,response:t}):JSON.parse(e)),new Promise(e=>{a=setTimeout(()=>{e(H)},s)})])}catch{return}finally{clearTimeout(a)}}#f(e){e&&e.cancel().catch(()=>void 0)}#h(e){this.#f(e.body??void 0)}#N(){return this.#w?AbortSignal.any([this.#w,this.#g.signal]):this.#g.signal}#E(){let e=this.#z();if(void 0!==e&&e<=0)throw new l(this.request)}async #t(){for(let e of this.#e.hooks.beforeRequest){let t=await e({request:this.request,options:this.#l(),retryCount:0});if(W(t))this.#L(t);else if(V(t))return t}}async #o(e){let t=this.#n(e);for(let s of this.#e.hooks.afterResponse){let r,a=this.#$(e.clone(),t);this.#d(a);try{r=await s({request:this.request,options:this.#l(),response:a,retryCount:this.#p})}catch(t){throw a!==e&&this.#h(a),this.#h(e),t}if(r instanceof g)throw a!==e&&this.#h(a),this.#h(e),new i(r.options);let o=V(r)?this.#$(r,t):e;a!==e&&a!==o&&a.body!==o.body&&this.#h(a),e!==o&&e.body!==o.body&&this.#h(e),e=o}return e}async #s(e){try{return await e()}catch(t){return this.#i(t,e)}}async #i(e,t){this.#v=!1;let s=Math.min(await this.#C(e),0x7fffffff),r={signal:this.#w},a=this.#z();if(void 0!==a){if(a<=0)throw new l(this.request);if(s>=a)throw await O(a,r),new l(this.request)}if(await O(s,r),this.#E(),e instanceof i&&e.customRequest){let t=new globalThis.Request(e.customRequest,this.#e.signal?{signal:this.#e.signal}:void 0);this.#L(t)}for(let t of this.#e.hooks.beforeRetry){let s;try{s=await t({request:this.request,options:this.#l(),error:e,retryCount:this.#p+1})}catch(t){throw t instanceof Error&&t!==e&&this.#u.add(t),t}if(W(s)){this.#L(s);break}if(V(s))return this.#v=!0,this.#p++,s;if(s===y)return}return this.#E(),this.#p++,this.#s(t)}#a(){let e=this.#v;return this.#v=!1,e}async #r(){this.#g?.signal.aborted&&(this.#g=new globalThis.AbortController,this.#e.signal=this.#N(),this.request=new globalThis.Request(this.request,{signal:this.#e.signal}));let e=(e=>{let t={};for(let s in e)Object.hasOwn(e,s)&&(s in x||s in w||(t[s]=e[s]));return t})(this.#e),t=this.#e.retry.limit>0?this.request.clone():void 0,s=this.#A(this.request,this.#e.body??void 0);this.#m=s,t&&(this.request=t);try{let t=this.#z();if(void 0!==t&&t<=0)throw new l(this.request);let r=!1===this.#e.timeout?t:void 0===t?this.#e.timeout:Math.min(this.#e.timeout,t),a=void 0===r?await this.#e.fetch(s,e):await D(s,e,this.#g,{timeout:r,fetch:this.#e.fetch});return this.#$(a,s)}catch(e){if(function(e){if(!(e&&"[object Error]"===F.call(e)&&"TypeError"===e.name&&"string"==typeof e.message))return!1;let{message:t,stack:s}=e;return"Load failed"===t?void 0===s||"__sentry_captured__"in e:!!(t.startsWith("error sending request for url")||"Failed to fetch"===t||t.startsWith("Failed to fetch (")&&t.endsWith(")"))||U.has(t)}(e))throw new a(this.request,{cause:e});throw e}}#z(){if(void 0===this.#j)return;let e=this.#R()-this.#j;return Math.max(0,this.#e.totalTimeout-e)}#R(){return globalThis.performance?.now()??Date.now()}#l(){if(!this.#x){let{hooks:e,json:t,parseJson:s,stringifyJson:r,searchParams:a,timeout:o,totalTimeout:i,throwHttpErrors:n,fetch:l,...c}=this.#e;this.#x=Object.freeze(c)}return this.#x}#L(e){this.#x=void 0,this.request=e}#n(e){return this.#k.get(e)??this.request}#$(e,t){return this.#k.set(e,t),e}#A(e,t){return this.#e.onUploadProgress&&e.body&&c?((e,t,s)=>{if(!e.body)return e;let r=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[s,r]of e)t+=40,t+=j.encode(`Content-Disposition: form-data; name="${s}"`).byteLength,t+="string"==typeof r?j.encode(r).byteLength:r.size;return t}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:"string"==typeof e?j.encode(e).byteLength:e instanceof URLSearchParams?j.encode(e.toString()).byteLength:0})(s??e.body);return new Request(e,{duplex:"half",body:v(e.body,r,t)})})(e,this.#e.onUploadProgress,t??this.#e.body??void 0):e}}let K=e=>{let t=(t,s)=>_.create(t,T(e,s));for(let s of m)t[s]=(t,r)=>_.create(t,T(e,r,{method:s}));return t.create=e=>K(T(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),K(T(e,t))),t.stop=y,t.retry=b,t},G=K(),Z="mostbox_backend_url";function Q(){let e=localStorage.getItem(Z)||"";return G.create({prefix:e})}let Y=Q();async function ee(){try{return(await fetch("/api/node-id",{method:"GET",signal:AbortSignal.timeout(2e3)})).ok}catch{return!1}}async function et(){try{return(await fetch("http://localhost:1976/api/node-id",{method:"GET",signal:AbortSignal.timeout(2e3)})).ok}catch{return!1}}e.s(["api",()=>Y,"detectLocalhostBackend",0,et,"detectSameOriginBackend",0,ee,"setBackendUrl",0,function(e){let t=(e||"").trim().replace(/\/+$/,"");t?localStorage.setItem(Z,t):localStorage.removeItem(Z),Y=Q()}],26913)},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)},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)},59665,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(93583),a=e.i(5142);let o=(0,s.createContext)(null);e.s(["default",0,function({sidebar:e,headerTitle:i,headerRight:n,children:l}){let[c,d]=(0,a.useDisclosure)(!1),[h,u]=(0,s.useState)(!1),p=function(e,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){let[r,a]=(0,s.useState)(t?void 0:!!("u">typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches);return(0,s.useEffect)(()=>{try{if("matchMedia"in window){let t=window.matchMedia(e);a(t.matches);let s=e=>a(e.matches);return t.addEventListener("change",s),()=>{t.removeEventListener("change",s)}}}catch(e){return}},[e]),r||!1}("(max-width: 768px)");return(0,t.jsx)(o.Provider,{value:{closeSidebar:d.close},children:(0,t.jsxs)("div",{className:"app-layout",children:[(0,t.jsx)("div",{className:`sidebar-overlay ${c?"visible":""}`,onClick:()=>d.close()}),(0,t.jsx)("div",{className:`sidebar ${c?"open":""} ${h?"collapsed":""}`,children:e({closeSidebar:d.close})}),(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:()=>{p?d.toggle():u(!h)},className:"icon-btn sidebar-toggle-btn","aria-label":p?"打开菜单":h?"展开侧边栏":"收起侧边栏",children:(0,t.jsx)(r.Menu,{size:16})}),i]}),(0,t.jsx)("div",{className:"header-right",children:n})]}),l]})]})})}],59665)},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)},27627,e=>{"use strict";e.i(47167);var t=e.i(43476),s=e.i(71645),r=e.i(56420);let a=(0,r.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"}]]);var o=e.i(35965),i=e.i(96699);let n=(0,r.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"}]]),l=(0,r.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"}]]),c=(0,r.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"}]]),d=(0,r.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"}]]);var h=e.i(51921);let u=(0,r.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),p=(0,r.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"}]]);var m=e.i(63676),f=e.i(89664),y=e.i(8734),g=e.i(62368);let b=(0,r.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"}]]),w=(0,r.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"}]]),x=(0,r.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"}]]),j=(0,r.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"}]]);var v=e.i(66595);let k=(0,r.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"}]]),N=(0,r.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"}]]),R=(0,r.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"}]]);var T=e.i(68877),C=e.i(59665);e.i(4121);var S=e.i(57667),q=e.i(88361),E=e.i(47910),M=e.i(26913),P=e.i(9817),z=e.i(5142),L=e.i(22016);let $={listPublishedFiles:()=>M.api.get("/api/files").json(),listTrashFiles:()=>M.api.get("/api/trash").json(),deletePublishedFile:e=>M.api.delete(`/api/files/${e}`).json(),restoreTrashFile:e=>M.api.post(`/api/trash/${e}/restore`).json(),permanentDeleteTrashFile:e=>M.api.delete(`/api/trash/${e}`).json(),emptyTrash:()=>M.api.delete("/api/trash").json(),toggleStar:e=>M.api.post(`/api/files/${e}/star`).json(),getStorageStats:()=>M.api.get("/api/storage").json(),getConfig:()=>M.api.get("/api/config").json(),getDataPath:()=>M.api.get("/api/config/data-path").json(),getNetworkAddresses:()=>M.api.get("/api/network").json(),saveConfig:e=>M.api.post("/api/config",{json:e}).json(),async publishFile(e,t){let s=new FormData;s.append("file",e,t||e.name);let r=await M.api.post("/api/publish",{body:s});if(!r.ok)throw Error((await r.json().catch(()=>({error:r.statusText}))).error||"Request failed");return r.json()},downloadFile:e=>M.api.post("/api/download",{json:{link:e}}).json(),cancelDownload:e=>M.api.post("/api/download/cancel",{json:{taskId:e}}).json(),getFileDownloadUrl:e=>`/api/files/${e}/download`,moveFile:(e,t)=>M.api.post("/api/move",{json:{cid:e,newFileName:t}}).json(),renameFolder:(e,t)=>M.api.post("/api/folder/rename",{json:{oldPath:e,newPath:t}}).json()},A={total:0x1900000000,used:0x1e0000000,free:0x1720000000,fileCount:42,trashCount:3};function D(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 O(e){let t=e.lastIndexOf("/");return -1===t?{folder:"",name:e}:{folder:e.substring(0,t),name:e.substring(t+1)}}function F(e){let t=e.split(".").pop().toLowerCase();return["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","heic","heif"].includes(t)?"image":["mp4","webm","mov","avi","mkv","flv","wmv","m4v","mpeg","3gp"].includes(t)?"video":["mp3","wav","ogg","flac","aac","m4a","wma","opus"].includes(t)?"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(t)?"text":"file"}function U(e){return e?[{path:"",name:"全部内容"},...e.split("/").filter(Boolean).map((e,t,s)=>({path:s.slice(0,t+1).join("/"),name:e}))]:[]}let B=(e,t)=>async()=>{try{e(await t())}catch(e){console.info(e)}};function H({file:e,isSelected:s,isDarkMode:r,onSelect:a,onPreview:o}){let i=F(e.fileName);return(0,t.jsxs)("div",{"data-id":e.cid,onClick:()=>a(e.cid),onDoubleClick:()=>o(e),className:`card ${s?"selected":""}`,children:[(0,t.jsxs)("div",{className:`card-icon ${e.starred?"starred":"file"}`,children:["image"===i&&(0,t.jsx)(n,{size:24,color:"#fff"}),"video"===i&&(0,t.jsx)(d,{size:24,color:"#fff"}),"audio"===i&&(0,t.jsx)(h.Music,{size:24,color:"#fff"}),"file"===i&&(0,t.jsx)(p,{size:24,color:"#fff"})]}),(0,t.jsx)("p",{className:"card-name",children:O(e.fileName).name})]})}function I({folder:e,isDarkMode:s,onClick:r}){return(0,t.jsxs)("div",{onClick:r,className:"card",children:[(0,t.jsx)("div",{className:"card-icon folder",children:(0,t.jsx)(c,{size:28,color:"#fff"})}),(0,t.jsx)("p",{className:"card-name",children:e.name})]})}function J({items:e,allFolders:r,currentPath:a,onMove:o,onClose:i}){let[n,l]=(0,s.useState)(""),[d,h]=(0,s.useState)(a),u=U(n);return(0,t.jsx)(S.ModalOverlay,{onClose:i,children:(0,t.jsxs)("div",{className:"move-modal",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"modal-header",children:[(0,t.jsx)("h3",{children:"移动到"}),(0,t.jsx)("button",{onClick:i,className:"modal-close-btn",children:(0,t.jsx)(m.X,{size:18})})]}),(0,t.jsxs)("p",{className:"move-modal-desc",children:["已选 ",e.length," 个项目"]}),(0,t.jsx)("div",{className:"move-new-folder",children:(0,t.jsx)("input",{type:"text",value:d,onChange:e=>h(e.target.value),placeholder:"输入路径创建嵌套文件夹"})}),(0,t.jsx)("p",{className:"move-modal-hint",children:"如 图片/壁纸"}),(0,t.jsx)("div",{className:"move-breadcrumb",children:u.map((e,r)=>(0,t.jsxs)(s.default.Fragment,{children:[r>0&&(0,t.jsx)("span",{className:"breadcrumb-separator",children:"/"}),(0,t.jsx)("button",{onClick:()=>{l(e.path),h(e.path)},className:`move-breadcrumb-btn ${n===e.path&&!d?"active":""}`,children:e.name},e.path)]},e.path))}),(0,t.jsxs)("div",{className:"move-folder-list",children:[0===r.filter(e=>{if(""===n)return!e.path.includes("/");let t=n+"/";return!!e.path.startsWith(t)&&!e.path.substring(t.length).includes("/")}).length&&(0,t.jsx)("p",{className:"move-modal-empty",children:"该目录下没有子文件夹"}),r.filter(e=>{if(""===n)return!e.path.includes("/");let t=n+"/";return!!e.path.startsWith(t)&&!e.path.substring(t.length).includes("/")}).map(e=>(0,t.jsxs)("button",{onClick:()=>l(e.path),className:`move-folder-item ${n===e.path&&!d?"selected":""}`,children:[(0,t.jsx)(c,{size:16}),(0,t.jsx)("span",{children:e.name})]},e.path))]}),(0,t.jsxs)("div",{className:"modal-actions",children:[(0,t.jsx)("button",{onClick:i,className:"btn secondary",children:"取消"}),(0,t.jsx)("button",{onClick:()=>{o(n||d.trim())},className:"btn primary",children:"移动"})]})]})})}e.s(["default",0,function(){let e,r,n,{isDarkMode:c,setIsDarkMode:d,addToast:M,openSettings:W}=(0,P.useApp)(),[V,X]=(0,s.useState)([]),[_,K]=(0,s.useState)([]),[G,Z]=(0,s.useState)(null),[Q,Y]=(0,s.useState)("all"),[ee,et]=(0,s.useState)(!1),[es,er]=(0,s.useState)([]),[ea,eo]=(0,s.useState)(null),[ei,en]=(0,s.useState)(null),[el,ec]=(0,z.useDisclosure)(!1),[ed,eh]=(0,s.useState)(""),[eu,ep]=(0,s.useState)([]),[em,ef]=(0,z.useDisclosure)(!1),[ey,eg]=(0,s.useState)(""),{copy:eb,copied:ew}=function(e={}){let t=e.timeout??2e3,[r,a]=(0,s.useState)(null),[o,i]=(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(()=>{a(null),window.clearTimeout(n.current),n.current=window.setTimeout(()=>i(!1),t),i(!0)}).catch(e=>a(e)):a(Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{i(!1),a(null),window.clearTimeout(n.current)},error:r,copied:o}}({timeout:2e3}),[ex,ej]=(0,s.useState)(0),[ev,ek]=(0,s.useState)({total:0,used:0,free:0}),[eN,eR]=(0,z.useDisclosure)(!1),[eT,eC]=(0,s.useState)(null),[eS,eq]=(0,s.useState)(null),[eE,eM]=(0,s.useState)(!1),[eP,ez]=(0,s.useState)(null),[eL,e$]=(0,s.useState)(""),[eA,eD]=(0,s.useState)(!1),[eO,eF]=(0,s.useState)(!1),[eU,eB]=(0,s.useState)(!1),eH=(0,s.useRef)(null);(0,s.useRef)(null),(0,s.useEffect)(()=>{ea&&("image"===ea.subtype||"video"===ea.subtype)&&(eF(!0),eB(!1)),ea&&"text"===ea.subtype&&(e$(""),e3(ea.cid))},[ea?.cid]),(0,s.useEffect)(()=>{let e=eH.current;if(!e)return;let t=()=>eF(!1),s=()=>eF(!1);return ea?.subtype==="image"?e.complete?eF(!1):(e.addEventListener("load",t),e.addEventListener("error",s)):ea?.subtype==="video"&&(e.addEventListener("canplay",t),e.addEventListener("error",s)),()=>{e.removeEventListener("load",t),e.removeEventListener("error",s),e.removeEventListener("canplay",t)}},[ea]);let eI=G||"",eJ=(e=new Set,V.forEach(t=>{let{folder:s}=O(t.fileName),r=s.split("/").filter(Boolean),a="";for(let t of r)a+=(a?"/":"")+t,e.add(a)}),[...e].sort()),{folders:eW,files:eV}={folders:(r=eI?eI+"/":"",eJ.filter(e=>{let t=e.toLowerCase().startsWith(r.toLowerCase()),s=e.substring(r.length);return t&&!s.includes("/")}).map(e=>({name:e.substring(r.length),path:e}))),files:V.filter(e=>O(e.fileName).folder===eI)},eX=ey?V.filter(e=>O(e.fileName).name.toLowerCase().includes(ey.toLowerCase())):eV,e_=B(X,()=>$.listPublishedFiles().then(e=>e||[]).catch(e=>[])),eK=B(K,()=>$.listTrashFiles().then(e=>e||[]).catch(()=>[])),eG=B(ek,()=>$.getStorageStats().catch(e=>({total:0,used:0,free:0,fileCount:0,trashCount:0}))),eZ=e=>{er(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eQ=async e=>{try{await $.restoreTrashFile(e),M("已恢复","success"),e_(),eK(),eG()}catch{M("恢复失败","error")}},eY=async()=>{eC({title:"清空回收站",message:"确定要清空回收站吗?此操作不可恢复!",confirmText:"清空",danger:!0,onConfirm:async()=>{eC(null);try{await $.emptyTrash(),M("回收站已清空","success"),eK(),eG()}catch{M("清空失败","error")}}})},e0=async e=>{try{let t=await $.toggleStar(e);X(s=>s.map(s=>s.cid===e?{...s,starred:t.starred}:s)),M(t.starred?"已收藏":"已取消收藏","success")}catch{M("操作失败","error")}},e1=async()=>{let e="trash"===Q;eC({title:e?"永久删除":"批量删除",message:e?`确定要永久删除选中的 ${es.length} 个项目吗?此操作不可恢复!`:`确定要删除选中的 ${es.length} 个项目吗?`,confirmText:e?"永久删除":"删除",danger:!0,onConfirm:async()=>{eC(null);try{for(let t of es)e?await $.permanentDeleteTrashFile(t):t.startsWith("__")||await $.deletePublishedFile(t);er([]),M(e?"已永久删除":"已删除","success"),e_(),eK(),eG()}catch{M("删除失败","error")}}})},e2=async e=>{try{for(let t of es){let s=V.find(e=>e.cid===t);if(!s)continue;let{name:r}=O(s.fileName),a=e?`${e}/${r}`:r;s.fileName!==a&&await $.moveFile(t,a)}er([]),eR.close(),M("已移动","success"),e_()}catch{M("移动失败","error")}},e4=e=>{let t=!!e.path,s=t?e.name:O(e.fileName).name;eq({title:t?"重命名文件夹":"重命名文件",placeholder:"请输入新名称",defaultValue:s,confirmText:"重命名",onConfirm:async r=>{if(r!==s){eM(!0);try{if(t){let t=e.path.lastIndexOf("/"),s=-1!==t?e.path.substring(0,t):"",a=s?`${s}/${r}`:r;await $.renameFolder(e.path,a),M("已重命名","success"),e_(),tt(a)}else{let{folder:t}=O(e.fileName),s=t?`${t}/${r}`:r;await $.moveFile(e.cid,s),M("已重命名","success"),e_()}eq(null)}catch{M("重命名失败","error")}finally{eM(!1)}}}})},e6=async e=>{let t=eI?eI+"/":"",s=[];for(let r of Array.from(e)){let e=t+r.name;if(V.some(t=>t.fileName===e)){M(`${r.name} 已存在`,"warning");continue}let a=`upload_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,o={id:a,fileName:r.name,progress:0,type:"upload",status:"uploading"};s.push(o),ep(e=>[...e,o]),s.length>0&&ef.open();try{(await $.publishFile(r,e)).alreadyExists?(ep(e=>e.map(e=>e.id===a?{...e,status:"completed"}:e)),M(`${r.name} 已存在`,"warning")):(ep(e=>e.map(e=>e.id===a?{...e,progress:100,status:"completed"}:e)),M(`${r.name} 上传成功`,"success"))}catch(e){ep(e=>e.map(e=>e.id===a?{...e,status:"error"}:e)),M(`上传失败: ${r.name}`,"error")}}setTimeout(()=>{ep(e=>e.filter(e=>"completed"!==e.status&&"error"!==e.status&&"cancelled"!==e.status))},3e3),e_(),eG()},e3=async e=>{eD(!0);try{let t=await fetch(`/api/files/${e}/download`,{headers:{Range:"bytes=0-9999"}});if(!t.ok)throw Error("加载失败");let s=await t.text();e$(s||"(文件为空)")}catch{e$("加载失败")}eD(!1)},[e5,e8]=(0,s.useState)(!1),e7=async()=>{if(!ed.trim()||!ed.startsWith("most://"))return void M("链接格式应为 most://<cid>","warning");if(!e5){e8(!0);try{let e=await $.downloadFile(ed);if(eh(""),ec.close(),e.alreadyExists)M(`${e.fileName} 已存在`,"warning");else{let t={id:e.taskId,fileName:"下载文件",progress:0,type:"download",status:"downloading"};ep(e=>[...e,t]),ef.open(),M("下载已开始","info")}}catch(e){M("下载失败","error")}finally{e8(!1)}}},e9=async e=>{if("download"===e.type&&"downloading"===e.status)try{await $.cancelDownload(e.id)}catch(e){M("取消失败","error")}},te=async e=>{try{let t=await fetch($.getFileDownloadUrl(e.cid));if(!t.ok)throw Error("获取文件失败");let s=await t.blob(),r=window.showSaveFilePicker;if(r){let t=await r({suggestedName:e.fileName}),a=await t.createWritable();await a.write(s),await a.close(),M("文件已保存","success")}else{let t=URL.createObjectURL(s),r=document.createElement("a");r.href=t,r.download=e.fileName,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(t),M("文件已下载","success")}}catch(e){"AbortError"!==e.name&&M("保存失败: "+e.message,"error")}},tt=e=>{Z(e||null),er([])};(0,s.useEffect)(()=>{location.protocol;let e=new WebSocket(`${"https:"===location.protocol?"wss:":"ws:"}//${location.host}/ws`);return e.onmessage=e=>{try{let{event:t,data:s}=JSON.parse(e.data);if("publish:success"===t||"download:success"===t){e_(),eG();let e=s.taskId||s.fileName;ep(t=>t.map(t=>t.id===e||t.fileName===s.fileName?{...t,progress:100,status:"completed"}:t)),"download:success"===t&&(s.alreadyExists?M(`${s.fileName} 已存在`,"warning"):M(`${s.fileName} 下载完成`,"success"),setTimeout(()=>{ep(t=>t.filter(t=>t.id!==e||"completed"!==t.status))},3e3))}"publish:progress"===t&&ep(e=>e.map(e=>{if(s.file&&e.fileName===s.file&&"upload"===e.type){let t=50;return"calculating-cid"===s.stage?t=25:"uploading"===s.stage?t=75:"complete"===s.stage&&(t=100),{...e,progress:t}}return e})),"download:progress"===t&&ep(e=>e.map(e=>e.id===s.taskId?{...e,progress:s.percent||0,loaded:s.loaded,total:s.total}:e)),"download:error"===t&&(ep(e=>e.map(e=>e.id===s.taskId?{...e,status:"error"}:e)),M(`下载失败: ${s.error}`,"error")),"network:status"===t&&ej(s.peers||0),"download:status"===t&&ep(e=>e.map(e=>e.id===s.taskId?{...e,fileName:s.file||e.fileName}:e)),"download:cancelled"===t&&(ep(e=>e.map(e=>e.id===s.taskId?{...e,status:"cancelled"}:e)),M("下载已取消","warning"))}catch(e){console.warn("[App WS] Failed to parse message:",e.message)}},()=>e.close()},[]),(0,s.useEffect)(()=>{e_(),eK(),eG(),$.getStorageStats().then(e=>ek(e)).catch(()=>ek(A))},[]);let ts="all"===Q?eX:"starred"===Q?V.filter(e=>e.starred&&O(e.fileName).name.toLowerCase().includes(ey.toLowerCase())):_.filter(e=>O(e.fileName).name.toLowerCase().includes(ey.toLowerCase())),tr="starred"===Q?[]:eW.filter(e=>e.name.toLowerCase().includes(ey.toLowerCase())),ta=U(eI);return(0,t.jsxs)(C.default,{sidebar:({closeSidebar:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"sidebar-header",onClick:()=>window.location.href="/",style:{cursor:"pointer"},children:(0,t.jsx)("h1",{children:"MOST PEOPLE"})}),(0,t.jsx)("nav",{className:"sidebar-nav",children:[{id:"all",icon:(0,t.jsx)(x,{size:18}),label:"全部内容"},{id:"starred",icon:(0,t.jsx)(w,{size:18}),label:"收藏"},{id:"trash",icon:(0,t.jsx)(l,{size:18}),label:"回收站"}].map(s=>(0,t.jsxs)("button",{onClick:()=>{Y(s.id),Z(null),er([]),eg(""),e()},className:`sidebar-nav-btn ${Q===s.id?"active":""}`,children:[s.icon,(0,t.jsx)("span",{children:s.label})]},s.id))}),(0,t.jsxs)("div",{className:"sidebar-footer",children:[(0,t.jsxs)("div",{className:"sidebar-footer-label",children:[(0,t.jsx)(j,{size:14}),(0,t.jsx)("span",{children:"存储空间"})]}),(0,t.jsx)("div",{className:"storage-bar",children:(0,t.jsx)("div",{className:"storage-bar-fill",style:{width:`${ev.total>0?ev.used/ev.total*100:0}%`}})}),(0,t.jsxs)("div",{className:"storage-info",children:[(0,t.jsx)("span",{children:D(ev.used)}),(0,t.jsx)("span",{children:ev.total>0?D(ev.total):"-"})]})]})]}),headerTitle:(0,t.jsx)("h2",{className:"header-title",children:"all"===Q?"全部内容":"starred"===Q?"收藏":"回收站"}),headerRight:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"search-box",children:[(0,t.jsx)(v.Search,{size:14}),(0,t.jsx)("input",{type:"text",value:ey,onChange:e=>eg(e.target.value),placeholder:"搜索..."}),ey&&(0,t.jsx)("button",{onClick:()=>eg(""),children:(0,t.jsx)(m.X,{size:12})})]}),"trash"===Q&&_.length>0&&(0,t.jsx)("button",{onClick:eY,className:"btn small btn-empty-trash",children:"清空回收站"}),(0,t.jsxs)("button",{onClick:()=>ef.open(),className:"icon-btn",children:[(0,t.jsx)(b,{size:16}),eu.length>0&&(0,t.jsx)("span",{className:"icon-btn-badge",children:eu.length})]}),(0,t.jsx)("button",{onClick:()=>d(!c),className:"icon-btn theme-toggle",children:c?(0,t.jsx)(o.Sun,{size:16}):(0,t.jsx)(i.Moon,{size:16})}),(0,t.jsx)("button",{onClick:()=>W(),className:"icon-btn",children:(0,t.jsx)(k,{size:16})})]}),children:[(0,t.jsxs)("div",{className:"download-banner",children:[(0,t.jsx)("span",{children:"Web 端仅用于界面展示,下载桌面客户端获得完整功能"}),(0,t.jsxs)(L.default,{href:"/download",className:"download-banner-btn",children:[(0,t.jsx)(g.Download,{size:14}),"下载客户端",(0,t.jsx)(T.ArrowRight,{size:12})]})]}),"all"===Q&&(0,t.jsxs)("div",{className:"action-grid",children:[(0,t.jsxs)("div",{className:`action-card upload ${ee?"drag-over":""}`,onDragOver:e=>{e.preventDefault(),et(!0)},onDragLeave:()=>et(!1),onDrop:e=>{e.preventDefault(),et(!1),e6(e.dataTransfer.files)},children:[(0,t.jsx)("input",{type:"file",multiple:!0,onChange:e=>e6(e.target.files),className:"action-card-input"}),(0,t.jsx)(a,{size:20,className:"action-grid-icon"}),(0,t.jsx)("p",{children:"上传文件"})]}),(0,t.jsxs)("div",{className:"action-card action-card-download",onClick:()=>ec.open(),children:[(0,t.jsx)(g.Download,{size:20,className:"action-grid-icon"}),(0,t.jsx)("p",{children:"下载文件"})]})]}),"all"===Q&&(0,t.jsx)("div",{className:"breadcrumb",children:eI?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>tt(""),children:"全部内容"}),ta.slice(1).map((e,r)=>(0,t.jsxs)(s.default.Fragment,{children:[(0,t.jsx)(u,{size:12}),(0,t.jsx)("button",{onClick:()=>tt(e.path),className:r===ta.length-2?"current":"",children:e.name}),r===ta.length-2&&(0,t.jsx)("button",{onClick:()=>e4(e),className:"breadcrumb-edit-btn",children:(0,t.jsx)(N,{size:12})})]},e.path))]}):null}),(0,t.jsxs)("div",{className:"content-grid",children:["trash"===Q&&(0===ts.length?(0,t.jsx)("div",{className:"empty-state",children:ey?"未找到相关文件":"回收站是空的"}):(0,t.jsx)("div",{className:"file-grid",children:ts.map(e=>{var s;return(0,t.jsxs)("div",{onClick:()=>er(t=>t.includes(e.cid)?t.filter(t=>t!==e.cid):[...t,e.cid]),onDoubleClick:()=>eQ(e.cid),className:`card ${es.includes(e.cid)?"selected":""}`,children:[(0,t.jsx)("div",{className:"card-icon trash",children:(0,t.jsx)(p,{size:24,color:"#fff"})}),(0,t.jsx)("p",{className:"card-name",children:O(e.fileName).name}),(0,t.jsxs)("p",{className:"card-date",children:["删除于 ",(s=e.deletedAt)?new Date(s).toLocaleDateString("zh-CN"):""]})]},e.cid)})})),"trash"!==Q&&(0===ts.length&&0===tr.length?(0,t.jsx)("div",{className:"empty-state",children:ey?"未找到相关文件":"starred"===Q?"暂无的收藏":"暂无文件"}):(0,t.jsxs)("div",{className:"file-grid",children:[tr.map(e=>(0,t.jsx)(I,{folder:e,isDarkMode:c,onClick:()=>tt(e.path)},e.path)),ts.map(e=>(0,t.jsx)(H,{file:e,isSelected:es.includes(e.cid),isDarkMode:c,onSelect:eZ,onPreview:e=>eo({...e,subtype:F(e.fileName)})},e.cid))]}))]}),eT&&(0,t.jsx)(q.ConfirmModal,{title:eT.title,message:eT.message,confirmText:eT.confirmText,danger:eT.danger,closeOnOverlayClick:eT.danger,onConfirm:eT.onConfirm,onClose:()=>eC(null)}),eS&&(0,t.jsx)(E.InputModal,{title:eS.title,placeholder:eS.placeholder,defaultValue:eS.defaultValue,confirmText:eS.confirmText,isLoading:eE,onConfirm:eS.onConfirm,onClose:()=>eq(null)}),eN&&(0,t.jsx)(J,{items:es.map(e=>V.find(t=>t.cid===e)).filter(Boolean),allFolders:eJ.map(e=>({path:e,name:e.split("/").pop()})),currentPath:eI,onMove:e2,onClose:()=>eR.close()}),ei&&(0,t.jsx)(S.ModalOverlay,{onClose:()=>en(null),children:(0,t.jsxs)("div",{className:"share-modal",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"modal-header",children:[(0,t.jsx)("h3",{children:"分享链接"}),(0,t.jsx)("button",{onClick:()=>en(null),className:"modal-close-btn",children:(0,t.jsx)(m.X,{size:18})})]}),(0,t.jsxs)("div",{className:"share-link-box",children:[(0,t.jsxs)("div",{className:"share-link-text",children:["most://",ei.cid,"?filename=",ei.fileName]}),(0,t.jsx)("button",{onClick:()=>{eb(`most://${ei.cid}?filename=${ei.fileName}`)},className:`share-copy-btn ${ew?"copied":""}`,children:ew?(0,t.jsx)(f.Check,{size:18}):(0,t.jsx)(y.Copy,{size:18})})]})]})}),el&&(0,t.jsx)(S.ModalOverlay,{onClose:()=>ec.close(),children:(0,t.jsxs)("div",{className:"download-modal",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"modal-header",children:[(0,t.jsx)("h3",{children:"下载文件"}),(0,t.jsx)("button",{onClick:()=>ec.close(),className:"modal-close-btn",children:(0,t.jsx)(m.X,{size:18})})]}),(0,t.jsx)("input",{type:"text",value:ed,onChange:e=>eh(e.target.value),placeholder:"most://...",onKeyDown:e=>"Enter"===e.key&&e7(),className:"download-input"}),(0,t.jsx)("button",{onClick:e7,disabled:!ed.trim()||e5,className:"download-btn",children:e5?"下载中...":"开始下载"})]})}),ea&&(0,t.jsxs)("div",{className:"preview-overlay",onClick:()=>{eo(null),e$(""),eF(!1)},children:[(0,t.jsx)("button",{className:"preview-close",children:(0,t.jsx)(m.X,{size:20})}),(0,t.jsxs)("div",{onClick:e=>e.stopPropagation(),children:["image"===ea.subtype&&(0,t.jsx)("div",{className:"preview-media-wrapper",children:(0,t.jsx)("img",{ref:eH,src:$.getFileDownloadUrl(ea.cid),alt:""})}),"video"===ea.subtype&&(0,t.jsx)("div",{className:"preview-media-wrapper",children:(0,t.jsx)("video",{ref:eH,src:$.getFileDownloadUrl(ea.cid),controls:!0})}),"audio"===ea.subtype&&(0,t.jsxs)("div",{className:"preview-audio",children:[(0,t.jsx)("div",{className:"preview-audio-icon",children:(0,t.jsx)(h.Music,{size:36,color:"var(--accent)"})}),(0,t.jsx)("p",{className:"preview-audio-filename",children:ea.fileName}),(0,t.jsx)("audio",{className:"preview-audio-player",src:$.getFileDownloadUrl(ea.cid),controls:!0})]}),"file"===ea.subtype&&(0,t.jsxs)("div",{className:"preview-unsupported",children:[(0,t.jsx)(p,{size:48,className:"preview-file-icon"}),(0,t.jsx)("p",{children:ea.fileName}),(0,t.jsx)("p",{className:"preview-unsupported-hint",children:"无法预览"})]}),"text"===ea.subtype&&(0,t.jsxs)("div",{className:"preview-text-container",children:[(0,t.jsx)("div",{className:"preview-text-header",children:(0,t.jsx)("span",{children:ea.fileName})}),eA?(0,t.jsxs)("div",{className:"preview-text-loading",children:[(0,t.jsx)(R,{size:24,className:"preview-text-spinner"}),(0,t.jsx)("p",{children:"正在加载文本预览..."}),(0,t.jsx)("p",{className:"preview-text-loading-hint",children:"如果是初次预览,可能需要等待 P2P 网络同步"})]}):(0,t.jsx)("pre",{className:"preview-text",children:eL||"(文件为空)"})]})]})]}),es.length>0&&(0,t.jsxs)("div",{className:"batch-bar",children:[(0,t.jsxs)("span",{className:"batch-info",children:["已选 ",es.length," 项"]}),(0,t.jsx)("button",{onClick:()=>er([]),className:"batch-dismiss",children:(0,t.jsx)(m.X,{size:16})}),(0,t.jsx)("div",{className:"batch-divider"}),"trash"===Q?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:async()=>{await Promise.all(es.map(e=>$.restoreTrashFile(e))),er([]),M("已恢复","success"),e_(),eK(),eG()},className:"btn small",children:"恢复"}),(0,t.jsx)("button",{onClick:e1,className:"btn small danger",children:"永久删除"})]}):(0,t.jsxs)(t.Fragment,{children:[1===es.length&&(n=V.find(e=>e.cid===es[0]))&&"file"!==F(n.fileName)&&(0,t.jsx)("button",{onClick:()=>{let e=V.find(e=>e.cid===es[0]);if(e){let t=F(e.fileName);eo({...e,subtype:t}),e$(""),"text"===t&&e3(e.cid)}},className:"btn small",children:"预览"}),(0,t.jsx)("button",{onClick:()=>{let e=es.some(e=>{let t=V.find(t=>t.cid===e);return t&&!t.starred});es.forEach(t=>{let s=V.find(e=>e.cid===t);s&&(e?!s.starred:s.starred)&&e0(t)})},className:"btn small btn-star",children:"收藏"}),1===es.length&&(0,t.jsx)("button",{onClick:()=>{let e=V.find(e=>e.cid===es[0]);e&&e4(e)},className:"btn small",children:"重命名"}),(0,t.jsx)("button",{onClick:()=>eR.open(),className:"btn small btn-move",children:"移动"}),(0,t.jsx)("button",{onClick:e1,className:"btn small danger",children:"删除"}),1===es.length&&(0,t.jsx)("button",{onClick:()=>en(V.find(e=>e.cid===es[0])),className:"btn small",children:"分享"}),1===es.length&&(0,t.jsx)("button",{onClick:()=>{let e=V.find(e=>e.cid===es[0]);e&&te(e)},className:"btn small",children:"另存为"})]})]}),em&&(0,t.jsx)(S.ModalOverlay,{onClose:()=>ef.close(),closeOnOverlayClick:!0,children:(0,t.jsxs)("div",{className:"transfer-modal",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"modal-header",children:[(0,t.jsx)("h3",{children:"传输"}),(0,t.jsx)("button",{onClick:()=>ef.close(),className:"modal-close-btn",children:(0,t.jsx)(m.X,{size:18})})]}),0===eu.length?(0,t.jsx)("div",{className:"empty-transfer",children:"暂无传输"}):eu.map(e=>(0,t.jsxs)("div",{className:"transfer-item",children:[(0,t.jsxs)("div",{className:"transfer-item-header",children:["upload"===e.type?(0,t.jsx)(a,{size:14}):(0,t.jsx)(g.Download,{size:14}),(0,t.jsx)("span",{className:"transfer-item-name",children:e.fileName}),"downloading"===e.status&&"download"===e.type&&(0,t.jsx)("button",{onClick:()=>e9(e),className:"transfer-item-cancel",children:(0,t.jsx)(m.X,{size:14})})]}),(0,t.jsxs)("div",{className:"transfer-progress-row",children:[(0,t.jsx)("div",{className:"transfer-progress-bar",children:(0,t.jsx)("div",{className:`transfer-progress-fill ${"download"===e.type?"download":""} ${"error"===e.status?"error":""} ${"cancelled"===e.status?"cancelled":""}`,style:{width:`${e.progress}%`}})}),(0,t.jsx)("span",{className:"transfer-progress-text",children:"completed"===e.status?"完成":"error"===e.status?"失败":"cancelled"===e.status?"已取消":e.loaded&&e.total?`${D(e.loaded)}/${D(e.total)}`:`${e.progress}%`})]})]},e.id))]})})]})}],27627)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35965,96699,93583,e=>{"use strict";var t=e.i(56420);let r=(0,t.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,r],35965);let o=(0,t.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,o],96699);let s=(0,t.default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);e.s(["Menu",0,s],93583)},59665,e=>{"use strict";var t=e.i(43476),r=e.i(71645),o=e.i(93583),s=e.i(5142);let i=(0,r.createContext)(null);e.s(["default",0,function({sidebar:e,headerTitle:n,headerRight:a,children:h}){let[l,u]=(0,s.useDisclosure)(!1),[c,d]=(0,r.useState)(!1),p=function(e,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){let[o,s]=(0,r.useState)(t?void 0:!!("u">typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches);return(0,r.useEffect)(()=>{try{if("matchMedia"in window){let t=window.matchMedia(e);s(t.matches);let r=e=>s(e.matches);return t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}}}catch(e){return}},[e]),o||!1}("(max-width: 768px)");return(0,t.jsx)(i.Provider,{value:{closeSidebar:u.close},children:(0,t.jsxs)("div",{className:"app-layout",children:[(0,t.jsx)("div",{className:`sidebar-overlay ${l?"visible":""}`,onClick:()=>u.close()}),(0,t.jsx)("div",{className:`sidebar ${l?"open":""} ${c?"collapsed":""}`,children:e({closeSidebar:u.close})}),(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:()=>{p?u.toggle():d(!c)},className:"icon-btn sidebar-toggle-btn","aria-label":p?"打开菜单":c?"展开侧边栏":"收起侧边栏",children:(0,t.jsx)(o.Menu,{size:16})}),n]}),(0,t.jsx)("div",{className:"header-right",children:a})]}),h]})]})})}],59665)},68877,26913,e=>{"use strict";let t=(0,e.i(56420).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],68877);class r extends Error{name="KyError";get isKyError(){return!0}}class o extends r{name="HTTPError";response;request;options;data;constructor(e,t,r){const o=e.status||0===e.status?e.status:"",s=e.statusText??"",i=`${o} ${s}`.trim(),n=i?`status code ${i}`:"an unknown error";super(`Request failed with ${n}: ${t.method} ${t.url}`),this.response=e,this.request=t,this.options=r}}class s extends r{name="NetworkError";request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}}class i extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}}class n extends r{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new i(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}}class a extends Error{name="SchemaValidationError";issues;constructor(e){super("Response schema validation failed"),this.issues=e}}class h extends r{name="TimeoutError";request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}}let l=(()=>{let e=!1,t=!1,r="function"==typeof globalThis.Request;if("function"==typeof globalThis.ReadableStream&&r)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(e){if(e instanceof Error&&"unsupported BodyInit type"===e.message)return!1;throw e}return e&&!t})(),u="function"==typeof globalThis.AbortController,c="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,d="function"==typeof globalThis.ReadableStream,p="function"==typeof globalThis.FormData,f=["get","post","put","patch","head","delete"],y={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},m=Symbol("stop");class g{options;constructor(e){this.options=e}}let b=e=>new g(e),w={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},R={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},T=new TextEncoder,v=(e,t,r)=>{let o,s=0;return e.pipeThrough(new TransformStream({transform(e,i){if(i.enqueue(e),o){s+=o.byteLength;let e=0===t?0:s/t;e>=1&&(e=1-Number.EPSILON),r?.({percent:e,totalBytes:Math.max(t,s),transferredBytes:s},o)}o=e},flush(){o&&(s+=o.byteLength,r?.({percent:1,totalBytes:Math.max(t,s),transferredBytes:s},o))}}))},q=e=>null!==e&&"object"==typeof e,x=Symbol("replaceOption"),S=e=>q(e)&&!0===e[x]?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},k=(...e)=>{for(let t of e)if((!q(t)||Array.isArray(t))&&void 0!==t)throw TypeError("The `options` argument must be an object");return D({},...e)},E=(e={},t={})=>{let r=new globalThis.Headers(e),o=t instanceof globalThis.Headers;for(let[e,s]of new globalThis.Headers(t).entries())o&&"undefined"===s||void 0===s?r.delete(e):r.set(e,s);return r},P=e=>{if(!q(e)||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},j=e=>{if(e instanceof URLSearchParams){let t=new URLSearchParams(e),r=e[L];return r&&(t[L]=new Set(r)),t}return e instanceof globalThis.Headers?new globalThis.Headers(e):Array.isArray(e)?[...e]:P(e)?{...e}:e},A=(e,t)=>P(e)&&P(t)?Object.fromEntries(Object.entries({...e,...t}).filter(e=>void 0!==e[1])):E(e,t);function C(e,t,r){return Object.hasOwn(t,r)&&void 0===t[r]?[]:D(e[r]??[],t[r]??[])}let O=(e={},t={})=>({init:C(e,t,"init"),beforeRequest:C(e,t,"beforeRequest"),beforeRetry:C(e,t,"beforeRetry"),beforeError:C(e,t,"beforeError"),afterResponse:C(e,t,"afterResponse")}),L=Symbol("deletedParameters"),N=(e,t)=>{let r=new URLSearchParams,o=new Set;for(let s of[e,t])if(void 0!==s)if(s instanceof URLSearchParams){for(let[e,t]of s.entries())r.append(e,t),o.delete(e);let e=s[L];if(e)for(let t of e)r.delete(t),o.add(t)}else if(Array.isArray(s))for(let e of s){if(!Array.isArray(e)||2!==e.length)throw TypeError("Array search parameters must be provided in [[key, value], ...] format");r.append(String(e[0]),String(e[1])),o.delete(String(e[0]))}else if(q(s))for(let[e,t]of Object.entries(s))void 0===t?(r.delete(e),o.add(e)):(r.append(e,String(t)),o.delete(e));else for(let[e,t]of new URLSearchParams(s).entries())r.append(e,t),o.delete(e);return o.size>0&&(r[L]=o),r},D=(...e)=>{let t,r={},o={},s={},i=[];for(let n of e)if(Array.isArray(n))Array.isArray(r)||(r=[]),r=[...r,...n];else if(q(n)){for(let[e,o]of Object.entries(n)){if("signal"===e&&o instanceof globalThis.AbortSignal){i.push(o);continue}let s=S(o),{isReplace:n}=s;if(o=s.value,"context"===e){if(null!=o&&(!q(o)||Array.isArray(o)))throw TypeError("The `context` option must be an object");r={...r,context:null==o?{}:n?{...o}:{...r.context,...o}};continue}if("searchParams"===e){t=null==o?void 0:n||void 0===t?o:N(t,o);continue}q(o)&&!n&&e in r&&(o=D(r[e],o)),r={...r,[e]:o}}if(q(n.hooks)){let{value:e,isReplace:t}=S(n.hooks);s=t?O({},e):O(s,e),r.hooks=s}if(q(n.headers)){let{value:e,isReplace:t}=S(n.headers);o=t?j(e):A(o,e),r.headers=o}}return void 0!==t&&(r.searchParams=t),i.length>0&&(1===i.length?r.signal=i[0]:c?r.signal=AbortSignal.any(i):r.signal=i.at(-1)),r},B={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1};async function M(e,t,r,o){return new Promise((s,i)=>{let n=setTimeout(()=>{r&&r.abort(),i(new h(e))},o.timeout);o.fetch(e,t).then(s).catch(i).then(()=>{clearTimeout(n)})})}async function U(e,{signal:t}){return new Promise((r,o)=>{function s(){clearTimeout(i),o(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",s,{once:!0}));let i=setTimeout(()=>{t?.removeEventListener("abort",s),r()},e)})}let H=Object.prototype.toString,z=new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]),F=(e,t)=>e instanceof t||e?.name===t.name,$=Symbol("timedOutResponseData"),J="The `schema` argument must follow the Standard Schema specification",I=Object.prototype.toString,W=e=>e instanceof globalThis.Request||"[object Request]"===I.call(e),_=e=>e instanceof globalThis.Response||"[object Response]"===I.call(e),K=async(e,t)=>{if("object"!=typeof t&&"function"!=typeof t||null===t)throw TypeError(J);let r=t["~standard"];if("object"!=typeof r||null===r||"function"!=typeof r.validate)throw TypeError(J);let o=await r.validate(e);if(o.issues)throw new a(o.issues);return o.value};class V{static create(e,t){var r,s;let i,a=t.hooks?.init??[],h=a.length>0?(i={...t,json:j(t.json),context:j(t.context),headers:j(t.headers),searchParams:Array.isArray(r=t.searchParams)?r.map(e=>[...e]):j(r)},void 0!==t.retry&&(i.retry="object"!=typeof(s=t.retry)?s:{...s,...s.methods&&{methods:[...s.methods]},...s.statusCodes&&{statusCodes:[...s.statusCodes]},...s.afterStatusCodes&&{afterStatusCodes:[...s.afterStatusCodes]}}),i):t;for(let e of a)e(h);let l=new V(e,h),u=async()=>{if("number"==typeof l.#e.timeout&&l.#e.timeout>0x7fffffff)throw RangeError("The `timeout` option cannot be greater than 2147483647");if("number"==typeof l.#e.totalTimeout&&l.#e.totalTimeout>0x7fffffff)throw RangeError("The `totalTimeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await l.#t(),t=e??await l.#r(async()=>l.#o()),r=void 0!==e||l.#s();for(;;){if(void 0===t)return t;if(_(t))try{t=await l.#i(t)}catch(o){if(!(o instanceof n))throw o;let e=await l.#n(o,async()=>l.#o());if(void 0===e)return e;t=e,r=l.#s();continue}let e=t;if(!e.ok&&"opaque"!==e.type&&("function"==typeof l.#e.throwHttpErrors?l.#e.throwHttpErrors(e.status):l.#e.throwHttpErrors)){let s=new o(e,l.#a(e),l.#h());if(s.data=await l.#l(e),r)throw s;let i=await l.#n(s,async()=>l.#o());if(void 0===i)return i;t=i,r=l.#s();continue}break}if(!_(t))return t;if(l.#u(t),l.#e.onDownloadProgress){if("function"!=typeof l.#e.onDownloadProgress)throw TypeError("The `onDownloadProgress` option must be a function");if(!d)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let e=t.clone();l.#c(t);var s=l.#e.onDownloadProgress;if(!e.body)return e;let r={status:e.status,statusText:e.statusText,headers:e.headers};if(204===e.status)return new Response(null,r);let o=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(v(e.body,o,s),r)}return t},c=(async()=>{try{return await u()}catch(t){if(!(t instanceof Error)||l.#d.has(t))throw t;let e=t;for(let t of l.#e.hooks.beforeError){let r=await t({request:l.request,options:l.#h(),error:e,retryCount:l.#p});r instanceof Error&&(e=r)}throw e}finally{let e=l.#f;l.#y(e?.body??void 0),l.request!==e&&l.#y(l.request.body??void 0)}})();for(let[e,t]of Object.entries(y))("bytes"!==e||"function"==typeof globalThis.Response?.prototype?.bytes)&&(c[e]=async r=>{l.request.headers.set("accept",l.request.headers.get("accept")||t);let o=await c;if("json"!==e)return o[e]();let s=await o.text();if(""===s)return void 0!==r?K(void 0,r):JSON.parse(s);let i=h.parseJson?await h.parseJson(s,{request:l.#a(o),response:o}):JSON.parse(s);return void 0===r?i:K(i,r)});return c}static #m(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#g;#p=0;#b;#e;#f;#w;#d=new WeakSet;#R;#T;#v=!1;#q=new WeakMap;constructor(e,t={}){if(this.#b=e,Object.hasOwn(t,"prefixUrl"))throw Error("The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl");if(this.#e={...t,headers:E(this.#b.headers,t.headers),hooks:O({},t.hooks),method:(e=>f.includes(e)?e.toUpperCase():e)(t.method??this.#b.method??"GET"),prefix:String(t.prefix||""),retry:((e={})=>{if("number"==typeof e)return{...B,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw Error("retry.statusCodes must be an array");let t=Object.fromEntries(Object.entries({...e,methods:e.methods?.map(e=>e.toLowerCase())}).filter(([,e])=>void 0!==e));return{...B,...t}})(t.retry),throwHttpErrors:t.throwHttpErrors??!0,timeout:t.timeout??1e4,totalTimeout:t.totalTimeout??!1,fetch:t.fetch??globalThis.fetch.bind(globalThis),context:t.context??{}},"string"!=typeof this.#b&&!(this.#b instanceof URL||this.#b instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if("string"==typeof this.#b){if(this.#e.prefix){const e=this.#e.prefix.replace(/\/+$/,""),t=this.#b.replace(/^\/+/,"");this.#b=`${e}/${t}`}if(this.#e.baseUrl){let e;try{e=new URL(this.#b)}catch{}e||(this.#b=new URL(this.#b,new Request(this.#e.baseUrl).url))}}u&&c&&(this.#w=this.#e.signal??this.#b.signal,this.#g=new globalThis.AbortController,this.#e.signal=this.#x()),l&&(this.#e.duplex="half"),void 0!==this.#e.json&&(this.#e.body=this.#e.stringifyJson?.(this.#e.json)??JSON.stringify(this.#e.json),this.#e.headers.set("content-type",this.#e.headers.get("content-type")??"application/json"));const r=t.headers&&new globalThis.Headers(t.headers).has("content-type");if(this.#b instanceof globalThis.Request&&(p&&this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)&&!r&&this.#e.headers.delete("content-type"),this.request=new globalThis.Request(this.#b,this.#e),(e=>void 0!==e&&(Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0||!!e[L]?.size:"object"==typeof e?Object.keys(e).length>0:"string"==typeof e?e.trim().length>0:!!e))(this.#e.searchParams)){const e=new URL(this.request.url),t=this.#e.searchParams?.[L];if(t)for(const r of t)e.searchParams.delete(r);if("string"==typeof this.#e.searchParams){const t=this.#e.searchParams.replace(/^\?/,"");""!==t&&(e.search=e.search?`${e.search}&${t}`:`?${t}`)}else for(const[t,r]of new URLSearchParams(V.#m(this.#e.searchParams)).entries())e.searchParams.append(t,r);if(this.#e.searchParams&&"object"==typeof this.#e.searchParams&&!Array.isArray(this.#e.searchParams)&&!(this.#e.searchParams instanceof URLSearchParams))for(const[t,r]of Object.entries(this.#e.searchParams))void 0===r&&e.searchParams.delete(t);this.request=new globalThis.Request(e,this.#e)}if(this.#e.onUploadProgress&&"function"!=typeof this.#e.onUploadProgress)throw TypeError("The `onUploadProgress` option must be a function");this.#T="number"==typeof this.#e.totalTimeout?this.#S():void 0}#k(){let e=this.#e.retry.delay(this.#p+1),t=e;return!0===this.#e.retry.jitter?t=Math.random()*e:"function"==typeof this.#e.retry.jitter&&(!Number.isFinite(t=this.#e.retry.jitter(e))||t<0)&&(t=e),Math.min(this.#e.retry.backoffLimit,t)}async #E(e){if(this.#p>=this.#e.retry.limit)throw e;let t=e instanceof Error?e:new i(e);if(t instanceof n)return t.customDelay??this.#k();if(!this.#e.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#e.retry.shouldRetry){let r=await this.#e.retry.shouldRetry({error:t,retryCount:this.#p+1});if(!1===r)throw e;if(!0===r)return this.#k()}if(F(e,h)){if(!this.#e.retry.retryOnTimeout)throw e;return this.#k()}if(F(e,o)){if(!this.#e.retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(t&&this.#e.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);return(Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now()),Number.isFinite(e))?(e=Math.max(0,e),Math.min(this.#e.retry.maxRetryAfter,e)):Math.min(this.#e.retry.maxRetryAfter,this.#k())}if(413===e.response.status)throw e;return this.#k()}if(!F(e,s))throw e;return this.#k()}#u(e){let t=this.#a(e);return this.#e.parseJson&&(e.json=async()=>{let r=await e.text();return""===r?JSON.parse(r):this.#e.parseJson(r,{request:t,response:e})}),e}async #l(e){let t=await this.#P(e,this.#j());if(t===$)return void this.#A();if(!t)return;if(!this.#C(e.headers.get("content-type")??""))return t;let r=await this.#O(t,e,this.#j(),this.#a(e));return r===$?void this.#A():r}#j(){let e=!1===this.#e.timeout?1e4:this.#e.timeout,t=this.#L();if(void 0===t)return e;if(t<=0)throw new h(this.request);return Math.min(e,t)}#C(e){let t=(e.split(";",1)[0]??"").trim().toLowerCase();return/\/(?:.*[.+-])?json$/.test(t)}async #P(e,t){let r,{body:o}=e;if(!o)try{return await e.text()}catch{return}try{r=o.getReader()}catch{return}let s=(e=>{let t=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec(e),r=t?.[1]??t?.[2];if(r)try{return new TextDecoder(r)}catch{}return new TextDecoder})(e.headers.get("content-type")??""),i=[],n=0,a=(async()=>{try{for(;;){let{done:e,value:t}=await r.read();if(e)break;if((n+=t.byteLength)>0xa00000)return void r.cancel().catch(()=>void 0);i.push(s.decode(t,{stream:!0}))}}catch{return}return i.push(s.decode()),i.join("")})(),h=new Promise(e=>{let r=setTimeout(()=>{e($)},t);a.finally(()=>{clearTimeout(r)})}),l=await Promise.race([a,h]);return l===$&&r.cancel().catch(()=>void 0),l}async #O(e,t,r,o){let s;try{return await Promise.race([Promise.resolve().then(()=>this.#e.parseJson?this.#e.parseJson(e,{request:o,response:t}):JSON.parse(e)),new Promise(e=>{s=setTimeout(()=>{e($)},r)})])}catch{return}finally{clearTimeout(s)}}#y(e){e&&e.cancel().catch(()=>void 0)}#c(e){this.#y(e.body??void 0)}#x(){return this.#w?AbortSignal.any([this.#w,this.#g.signal]):this.#g.signal}#A(){let e=this.#L();if(void 0!==e&&e<=0)throw new h(this.request)}async #t(){for(let e of this.#e.hooks.beforeRequest){let t=await e({request:this.request,options:this.#h(),retryCount:0});if(W(t))this.#N(t);else if(_(t))return t}}async #i(e){let t=this.#a(e);for(let r of this.#e.hooks.afterResponse){let o,s=this.#D(e.clone(),t);this.#u(s);try{o=await r({request:this.request,options:this.#h(),response:s,retryCount:this.#p})}catch(t){throw s!==e&&this.#c(s),this.#c(e),t}if(o instanceof g)throw s!==e&&this.#c(s),this.#c(e),new n(o.options);let i=_(o)?this.#D(o,t):e;s!==e&&s!==i&&s.body!==i.body&&this.#c(s),e!==i&&e.body!==i.body&&this.#c(e),e=i}return e}async #r(e){try{return await e()}catch(t){return this.#n(t,e)}}async #n(e,t){this.#v=!1;let r=Math.min(await this.#E(e),0x7fffffff),o={signal:this.#w},s=this.#L();if(void 0!==s){if(s<=0)throw new h(this.request);if(r>=s)throw await U(s,o),new h(this.request)}if(await U(r,o),this.#A(),e instanceof n&&e.customRequest){let t=new globalThis.Request(e.customRequest,this.#e.signal?{signal:this.#e.signal}:void 0);this.#N(t)}for(let t of this.#e.hooks.beforeRetry){let r;try{r=await t({request:this.request,options:this.#h(),error:e,retryCount:this.#p+1})}catch(t){throw t instanceof Error&&t!==e&&this.#d.add(t),t}if(W(r)){this.#N(r);break}if(_(r))return this.#v=!0,this.#p++,r;if(r===m)return}return this.#A(),this.#p++,this.#r(t)}#s(){let e=this.#v;return this.#v=!1,e}async #o(){this.#g?.signal.aborted&&(this.#g=new globalThis.AbortController,this.#e.signal=this.#x(),this.request=new globalThis.Request(this.request,{signal:this.#e.signal}));let e=(e=>{let t={};for(let r in e)Object.hasOwn(e,r)&&(r in R||r in w||(t[r]=e[r]));return t})(this.#e),t=this.#e.retry.limit>0?this.request.clone():void 0,r=this.#B(this.request,this.#e.body??void 0);this.#f=r,t&&(this.request=t);try{let t=this.#L();if(void 0!==t&&t<=0)throw new h(this.request);let o=!1===this.#e.timeout?t:void 0===t?this.#e.timeout:Math.min(this.#e.timeout,t),s=void 0===o?await this.#e.fetch(r,e):await M(r,e,this.#g,{timeout:o,fetch:this.#e.fetch});return this.#D(s,r)}catch(e){if(function(e){if(!(e&&"[object Error]"===H.call(e)&&"TypeError"===e.name&&"string"==typeof e.message))return!1;let{message:t,stack:r}=e;return"Load failed"===t?void 0===r||"__sentry_captured__"in e:!!(t.startsWith("error sending request for url")||"Failed to fetch"===t||t.startsWith("Failed to fetch (")&&t.endsWith(")"))||z.has(t)}(e))throw new s(this.request,{cause:e});throw e}}#L(){if(void 0===this.#T)return;let e=this.#S()-this.#T;return Math.max(0,this.#e.totalTimeout-e)}#S(){return globalThis.performance?.now()??Date.now()}#h(){if(!this.#R){let{hooks:e,json:t,parseJson:r,stringifyJson:o,searchParams:s,timeout:i,totalTimeout:n,throwHttpErrors:a,fetch:h,...l}=this.#e;this.#R=Object.freeze(l)}return this.#R}#N(e){this.#R=void 0,this.request=e}#a(e){return this.#q.get(e)??this.request}#D(e,t){return this.#q.set(e,t),e}#B(e,t){return this.#e.onUploadProgress&&e.body&&l?((e,t,r)=>{if(!e.body)return e;let o=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[r,o]of e)t+=40,t+=T.encode(`Content-Disposition: form-data; name="${r}"`).byteLength,t+="string"==typeof o?T.encode(o).byteLength:o.size;return t}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:"string"==typeof e?T.encode(e).byteLength:e instanceof URLSearchParams?T.encode(e.toString()).byteLength:0})(r??e.body);return new Request(e,{duplex:"half",body:v(e.body,o,t)})})(e,this.#e.onUploadProgress,t??this.#e.body??void 0):e}}let G=e=>{let t=(t,r)=>V.create(t,k(e,r));for(let r of f)t[r]=(t,o)=>V.create(t,k(e,o,{method:r}));return t.create=e=>G(k(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),G(k(e,t))),t.stop=m,t.retry=b,t},X=G(),Q="mostbox_backend_url";function Y(){let e=localStorage.getItem(Q)||"";return X.create({prefix:e})}let Z=Y();async function ee(){try{return(await fetch("/api/node-id",{method:"GET",signal:AbortSignal.timeout(2e3)})).ok}catch{return!1}}async function et(){try{return(await fetch("http://localhost:1976/api/node-id",{method:"GET",signal:AbortSignal.timeout(2e3)})).ok}catch{return!1}}e.s(["api",()=>Z,"detectLocalhostBackend",0,et,"detectSameOriginBackend",0,ee,"setBackendUrl",0,function(e){let t=(e||"").trim().replace(/\/+$/,"");t?localStorage.setItem(Q,t):localStorage.removeItem(Q),Z=Y()}],26913)},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)},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)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(90809)._(e.r(98183)),l=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",a=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(u.urlQueryToSearchParams(i)));let s=e.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==c?(c="//"+(c||""),o&&"/"!==o[0]&&(o="/"+o)):c||(c=""),a&&"#"!==a[0]&&(a="#"+a),s&&"?"!==s[0]&&(s="?"+s),o=o.replace(/[?#]/g,encodeURIComponent),s=s.replace("#","%23"),`${n}${c}${o}${s}${a}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return a(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=u(e,n)),t&&(o.current=u(t,n))},[e,t])}function u(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return u}});let n=e.r(18967),o=e.r(52817);function u(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},useLinkStatus:function(){return v}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(90809),l=e.r(43476),a=u._(e.r(71645)),i=e.r(95057),c=e.r(8372),s=e.r(18581),f=e.r(18967),p=e.r(5550);e.r(33525);let d=e.r(88540),h=e.r(91949),y=e.r(73668),g=e.r(9396);function b(t){var r,n;let o,u,b,[v,_]=(0,a.useOptimistic)(h.IDLE_LINK_STATUS),P=(0,a.useRef)(null),{href:j,as:C,children:O,prefetch:S=null,passHref:T,replace:R,shallow:k,scroll:w,onClick:E,onMouseEnter:L,onTouchStart:x,legacyBehavior:A=!1,onNavigate:M,transitionTypes:U,ref:N,unstable_dynamicOnHover:I,...B}=t;o=O,A&&("string"==typeof o||"number"==typeof o)&&(o=(0,l.jsx)("a",{children:o}));let K=a.default.useContext(c.AppRouterContext),$=!1!==S,D=!1!==S?null===(n=S)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,W="string"==typeof(r=C||j)?r:(0,i.formatUrl)(r);if(A){if(o?.$$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});u=a.default.Children.only(o)}let F=A?u&&"object"==typeof u&&u.ref:N,z=a.default.useCallback(e=>(null!==K&&(P.current=(0,h.mountLinkInstance)(e,W,K,D,$,_)),()=>{P.current&&((0,h.unmountLinkForCurrentNavigation)(P.current),P.current=null),(0,h.unmountPrefetchableInstance)(e)}),[$,W,K,D,_]),q={ref:(0,s.useMergedRef)(z,F),onClick(t){A||"function"!=typeof E||E(t),A&&u.props&&"function"==typeof u.props.onClick&&u.props.onClick(t),!K||t.defaultPrevented||function(t,r,n,o,u,l,i){if("u">typeof window){let c,{nodeName:s}=t.currentTarget;if("A"===s.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,y.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);a.default.startTransition(()=>{f(r,o?"replace":"push",!1===u?d.ScrollBehavior.NoScroll:d.ScrollBehavior.Default,n.current,i)})}}(t,W,P,R,w,M,U)},onMouseEnter(e){A||"function"!=typeof L||L(e),A&&u.props&&"function"==typeof u.props.onMouseEnter&&u.props.onMouseEnter(e),K&&$&&(0,h.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){A||"function"!=typeof x||x(e),A&&u.props&&"function"==typeof u.props.onTouchStart&&u.props.onTouchStart(e),K&&$&&(0,h.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,f.isAbsoluteUrl)(W)?q.href=W:A&&!T&&("a"!==u.type||"href"in u.props)||(q.href=(0,p.addBasePath)(W)),b=A?a.default.cloneElement(u,q):(0,l.jsx)("a",{...B,...q,children:o}),(0,l.jsx)(m.Provider,{value:v,children:b})}e.r(84508);let m=(0,a.createContext)(h.IDLE_LINK_STATUS),v=()=>(0,a.useContext)(m);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},71987,88973,e=>{"use strict";e.s(["default",0,{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}],71987),e.s(["hasA11yProp",0,e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1}],88973)},96661,e=>{"use strict";e.s(["mergeClasses",0,(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()])},5014,e=>{"use strict";var t=e.i(71645),r=e.i(71987),n=e.i(88973),o=e.i(96661);let u=(0,t.createContext)({}),l=(0,t.forwardRef)(({color:e,size:l,strokeWidth:a,absoluteStrokeWidth:i,className:c="",children:s,iconNode:f,...p},d)=>{let{size:h=24,strokeWidth:y=2,absoluteStrokeWidth:g=!1,color:b="currentColor",className:m=""}=(0,t.useContext)(u)??{},v=i??g?24*Number(a??y)/Number(l??h):a??y;return(0,t.createElement)("svg",{ref:d,...r.default,width:l??h??r.default.width,height:l??h??r.default.height,stroke:e??b,strokeWidth:v,className:(0,o.mergeClasses)("lucide",m,c),...!s&&!(0,n.hasA11yProp)(p)&&{"aria-hidden":"true"},...p},[...f.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(s)?s:[s]])});e.s(["default",0,l],5014)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35965,96699,93583,e=>{"use strict";var t=e.i(56420);let a=(0,t.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);let s=(0,t.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,s],96699);let i=(0,t.default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);e.s(["Menu",0,i],93583)},82022,e=>{"use strict";let t=(0,e.i(56420).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],82022)},70904,e=>{"use strict";let t=(0,e.i(56420).default)("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);e.s(["Wallet",0,t],70904)},59665,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(93583),i=e.i(5142);let l=(0,a.createContext)(null);e.s(["default",0,function({sidebar:e,headerTitle:d,headerRight:c,children:h}){let[n,r]=(0,i.useDisclosure)(!1),[o,u]=(0,a.useState)(!1),p=function(e,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){let[s,i]=(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);i(t.matches);let a=e=>i(e.matches);return t.addEventListener("change",a),()=>{t.removeEventListener("change",a)}}}catch(e){return}},[e]),s||!1}("(max-width: 768px)");return(0,t.jsx)(l.Provider,{value:{closeSidebar:r.close},children:(0,t.jsxs)("div",{className:"app-layout",children:[(0,t.jsx)("div",{className:`sidebar-overlay ${n?"visible":""}`,onClick:()=>r.close()}),(0,t.jsx)("div",{className:`sidebar ${n?"open":""} ${o?"collapsed":""}`,children:e({closeSidebar:r.close})}),(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:()=>{p?r.toggle():u(!o)},className:"icon-btn sidebar-toggle-btn","aria-label":p?"打开菜单":o?"展开侧边栏":"收起侧边栏",children:(0,t.jsx)(s.Menu,{size:16})}),d]}),(0,t.jsx)("div",{className:"header-right",children:c})]}),h]})]})})}],59665)},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)}]);