most-box 0.1.3 → 0.1.4

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 (171) hide show
  1. package/out/404/index.html +2 -2
  2. package/out/404.html +2 -2
  3. package/out/__next.__PAGE__.txt +5 -5
  4. package/out/__next._full.txt +13 -13
  5. package/out/__next._head.txt +3 -3
  6. package/out/__next._index.txt +6 -6
  7. package/out/__next._tree.txt +2 -2
  8. package/out/_next/static/chunks/02zzxfop_k6tl.css +1 -0
  9. package/out/_next/static/chunks/03gsbg0fr00ey.js +1 -0
  10. package/out/_next/static/chunks/06lttvu7563zo.css +1 -0
  11. package/out/_next/static/chunks/0fo9-h4knidcz.js +1 -0
  12. package/out/_next/static/chunks/0hyds~bp.auvh.js +1 -0
  13. package/out/_next/static/chunks/0i9sfdypwuw8~.js +1 -0
  14. package/out/_next/static/chunks/{0_0oph_z1az14.js → 0puk.7e.tr2zy.js} +1 -1
  15. package/out/_next/static/chunks/0s1k6rlwy02c2.js +1 -0
  16. package/out/_next/static/chunks/0sgltmtk_9s8p.css +1 -0
  17. package/out/_next/static/chunks/0snehvtvu1n4q.js +1 -0
  18. package/out/_next/static/chunks/{12nr19.nnn6s3.js → 0t_3xxx4zkerp.js} +2 -2
  19. package/out/_next/static/chunks/0u38kke9vhobe.js +1 -0
  20. package/out/_next/static/chunks/0vd4_a5x-wpdh.js +1 -0
  21. package/out/_next/static/chunks/0xx_10jns1.s7.css +1 -0
  22. package/out/_next/static/chunks/{0m_5nb6x8qy._.js → 10f-t2n4y1zx8.js} +1 -1
  23. package/out/_next/static/chunks/13jdyag9a-~kk.js +1 -0
  24. package/out/_not-found/__next._full.txt +11 -11
  25. package/out/_not-found/__next._head.txt +3 -3
  26. package/out/_not-found/__next._index.txt +6 -6
  27. package/out/_not-found/__next._not-found.__PAGE__.txt +4 -4
  28. package/out/_not-found/__next._not-found.txt +3 -3
  29. package/out/_not-found/__next._tree.txt +1 -1
  30. package/out/_not-found/index.html +2 -2
  31. package/out/_not-found/index.txt +11 -11
  32. package/out/admin/__next._full.txt +12 -12
  33. package/out/admin/__next._head.txt +3 -3
  34. package/out/admin/__next._index.txt +6 -6
  35. package/out/admin/__next._tree.txt +1 -1
  36. package/out/admin/__next.admin.__PAGE__.txt +4 -4
  37. package/out/admin/__next.admin.txt +3 -3
  38. package/out/admin/index.html +2 -2
  39. package/out/admin/index.txt +12 -12
  40. package/out/app/__next._full.txt +12 -12
  41. package/out/app/__next._head.txt +3 -3
  42. package/out/app/__next._index.txt +6 -6
  43. package/out/app/__next._tree.txt +1 -1
  44. package/out/app/__next.app.__PAGE__.txt +4 -4
  45. package/out/app/__next.app.txt +3 -3
  46. package/out/app/index.html +2 -2
  47. package/out/app/index.txt +12 -12
  48. package/out/chat/__next._full.txt +12 -12
  49. package/out/chat/__next._head.txt +3 -3
  50. package/out/chat/__next._index.txt +6 -6
  51. package/out/chat/__next._tree.txt +1 -1
  52. package/out/chat/__next.chat.__PAGE__.txt +4 -4
  53. package/out/chat/__next.chat.txt +3 -3
  54. package/out/chat/index.html +2 -2
  55. package/out/chat/index.txt +12 -12
  56. package/out/chat/join/__next._full.txt +12 -12
  57. package/out/chat/join/__next._head.txt +3 -3
  58. package/out/chat/join/__next._index.txt +6 -6
  59. package/out/chat/join/__next._tree.txt +1 -1
  60. package/out/chat/join/__next.chat.join.__PAGE__.txt +4 -4
  61. package/out/chat/join/__next.chat.join.txt +3 -3
  62. package/out/chat/join/__next.chat.txt +3 -3
  63. package/out/chat/join/index.html +2 -2
  64. package/out/chat/join/index.txt +12 -12
  65. package/out/download/__next._full.txt +16 -16
  66. package/out/download/__next._head.txt +3 -3
  67. package/out/download/__next._index.txt +6 -6
  68. package/out/download/__next._tree.txt +2 -2
  69. package/out/download/__next.download.__PAGE__.txt +6 -6
  70. package/out/download/__next.download.txt +3 -3
  71. package/out/download/index.html +2 -2
  72. package/out/download/index.txt +16 -16
  73. package/out/game/__next._full.txt +20 -0
  74. package/out/game/__next._head.txt +5 -0
  75. package/out/{gandengyan → game}/__next._index.txt +6 -6
  76. package/out/game/__next._tree.txt +5 -0
  77. package/out/game/__next.game.__PAGE__.txt +6 -0
  78. package/out/game/__next.game.txt +5 -0
  79. package/out/game/gandengyan/__next._full.txt +26 -0
  80. package/out/game/gandengyan/__next._head.txt +5 -0
  81. package/out/game/gandengyan/__next._index.txt +9 -0
  82. package/out/game/gandengyan/__next._tree.txt +6 -0
  83. package/out/game/gandengyan/__next.game.gandengyan.__PAGE__.txt +10 -0
  84. package/out/game/gandengyan/__next.game.gandengyan.txt +5 -0
  85. package/out/game/gandengyan/__next.game.txt +5 -0
  86. package/out/game/gandengyan/index.html +15 -0
  87. package/out/game/gandengyan/index.txt +26 -0
  88. package/out/game/index.html +1 -0
  89. package/out/game/index.txt +20 -0
  90. package/out/game/zhajinhua/__next._full.txt +25 -0
  91. package/out/game/zhajinhua/__next._head.txt +5 -0
  92. package/out/game/zhajinhua/__next._index.txt +9 -0
  93. package/out/game/zhajinhua/__next._tree.txt +5 -0
  94. package/out/game/zhajinhua/__next.game.txt +5 -0
  95. package/out/game/zhajinhua/__next.game.zhajinhua.__PAGE__.txt +9 -0
  96. package/out/game/zhajinhua/__next.game.zhajinhua.txt +5 -0
  97. package/out/game/zhajinhua/index.html +15 -0
  98. package/out/game/zhajinhua/index.txt +25 -0
  99. package/out/index.html +2 -2
  100. package/out/index.txt +13 -13
  101. package/out/note/__next._full.txt +12 -12
  102. package/out/note/__next._head.txt +3 -3
  103. package/out/note/__next._index.txt +6 -6
  104. package/out/note/__next._tree.txt +1 -1
  105. package/out/note/__next.note.__PAGE__.txt +4 -4
  106. package/out/note/__next.note.txt +3 -3
  107. package/out/note/index.html +2 -2
  108. package/out/note/index.txt +12 -12
  109. package/out/ping/__next._full.txt +12 -12
  110. package/out/ping/__next._head.txt +3 -3
  111. package/out/ping/__next._index.txt +6 -6
  112. package/out/ping/__next._tree.txt +1 -1
  113. package/out/ping/__next.ping.__PAGE__.txt +4 -4
  114. package/out/ping/__next.ping.txt +3 -3
  115. package/out/ping/index.html +2 -2
  116. package/out/ping/index.txt +12 -12
  117. package/out/web3/__next._full.txt +12 -12
  118. package/out/web3/__next._head.txt +3 -3
  119. package/out/web3/__next._index.txt +6 -6
  120. package/out/web3/__next._tree.txt +1 -1
  121. package/out/web3/__next.web3.__PAGE__.txt +4 -4
  122. package/out/web3/__next.web3.txt +3 -3
  123. package/out/web3/ed25519/__next._full.txt +10 -10
  124. package/out/web3/ed25519/__next._head.txt +3 -3
  125. package/out/web3/ed25519/__next._index.txt +6 -6
  126. package/out/web3/ed25519/__next._tree.txt +1 -1
  127. package/out/web3/ed25519/__next.web3.ed25519.__PAGE__.txt +2 -2
  128. package/out/web3/ed25519/__next.web3.ed25519.txt +3 -3
  129. package/out/web3/ed25519/__next.web3.txt +3 -3
  130. package/out/web3/ed25519/index.html +1 -1
  131. package/out/web3/ed25519/index.txt +10 -10
  132. package/out/web3/index.html +2 -2
  133. package/out/web3/index.txt +12 -12
  134. package/out/web3/tools/__next._full.txt +10 -10
  135. package/out/web3/tools/__next._head.txt +3 -3
  136. package/out/web3/tools/__next._index.txt +6 -6
  137. package/out/web3/tools/__next._tree.txt +1 -1
  138. package/out/web3/tools/__next.web3.tools.__PAGE__.txt +2 -2
  139. package/out/web3/tools/__next.web3.tools.txt +3 -3
  140. package/out/web3/tools/__next.web3.txt +3 -3
  141. package/out/web3/tools/index.html +1 -1
  142. package/out/web3/tools/index.txt +10 -10
  143. package/package.json +2 -1
  144. package/server/index.js +0 -8
  145. package/server/src/config.js +1 -1
  146. package/server/src/core/gameRoom.js +222 -0
  147. package/server/src/core/zhajinhua.js +563 -0
  148. package/server/src/games/gandengyan.js +348 -411
  149. package/server/src/http/app.js +7 -1
  150. package/server/src/index.js +9 -1
  151. package/out/_next/static/chunks/04mo7rr..0_1q.js +0 -1
  152. package/out/_next/static/chunks/06rf3qq5ggs6v.js +0 -1
  153. package/out/_next/static/chunks/07td.jq7xff84.css +0 -1
  154. package/out/_next/static/chunks/0cl7d~7abnk_p.css +0 -1
  155. package/out/_next/static/chunks/0d306t1wvjpdx.js +0 -1
  156. package/out/_next/static/chunks/0n.ayxmsar6e5.js +0 -1
  157. package/out/_next/static/chunks/0voe1.ttrh84k.css +0 -1
  158. package/out/_next/static/chunks/0wtf0xsiicxx6.js +0 -1
  159. package/out/_next/static/chunks/0x.ky97owcxxs.js +0 -1
  160. package/out/_next/static/chunks/0ysj5b94vu4ri.js +0 -1
  161. package/out/_next/static/chunks/184hxsuf-5c84.js +0 -1
  162. package/out/gandengyan/__next._full.txt +0 -25
  163. package/out/gandengyan/__next._head.txt +0 -5
  164. package/out/gandengyan/__next._tree.txt +0 -5
  165. package/out/gandengyan/__next.gandengyan.__PAGE__.txt +0 -10
  166. package/out/gandengyan/__next.gandengyan.txt +0 -5
  167. package/out/gandengyan/index.html +0 -15
  168. package/out/gandengyan/index.txt +0 -25
  169. /package/out/_next/static/{aPEZ4zaaR5W3WpSZ0dFsa → sSvbBrwXZY-4lBmcHshga}/_buildManifest.js +0 -0
  170. /package/out/_next/static/{aPEZ4zaaR5W3WpSZ0dFsa → sSvbBrwXZY-4lBmcHshga}/_clientMiddlewareManifest.js +0 -0
  171. /package/out/_next/static/{aPEZ4zaaR5W3WpSZ0dFsa → sSvbBrwXZY-4lBmcHshga}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18566,(t,e,r)=>{e.exports=t.r(76562)},31214,t=>{"use strict";let e=(0,t.i(56420).default)("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);t.s(["Cloud",0,e],31214)},10566,t=>{"use strict";let e=(0,t.i(56420).default)("notebook-pen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]);t.s(["NotebookPen",0,e],10566)},66595,t=>{"use strict";let e=(0,t.i(56420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);t.s(["Search",0,e],66595)},67927,t=>{"use strict";let e=(0,t.i(56420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);t.s(["ChevronRight",0,e],67927)},26067,t=>{"use strict";let e=(0,t.i(56420).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);t.s(["Folder",0,e],26067)},25981,t=>{"use strict";let e=(0,t.i(56420).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);t.s(["Upload",0,e],25981)},26091,t=>{"use strict";let e=(0,t.i(56420).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);t.s(["FileText",0,e],26091)},73474,t=>{"use strict";let e=(0,t.i(56420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);t.s(["Trash2",0,e],73474)},56522,t=>{"use strict";let e=(0,t.i(56420).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);t.s(["Save",0,e],56522)},53138,51757,t=>{"use strict";var e=t.i(56420);let r=(0,e.default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);t.s(["AlertTriangle",0,r],53138);let a=(0,e.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);t.s(["CheckCircle2",0,a],51757)},96699,t=>{"use strict";let e=(0,t.i(56420).default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);t.s(["Moon",0,e],96699)},35965,t=>{"use strict";let e=(0,t.i(56420).default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);t.s(["Sun",0,e],35965)},11241,t=>{"use strict";let e=(0,t.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);t.s(["ArrowLeft",0,e],11241)},59665,t=>{"use strict";var e=t.i(18050),r=t.i(71645),a=t.i(67228);let s=(0,t.i(56420).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);t.i(22183);var n=t.i(5142);let i=(0,r.createContext)(null);t.s(["default",0,function({sidebar:t,headerTitle:u,headerRight:c,children:h}){let[o,l]=(0,n.useDisclosure)(!1),[d,f]=(0,r.useState)(!1),p=(0,a.useMediaQuery)("(max-width: 768px)"),y=()=>{p?l.open():f(!1)};return(0,e.jsx)(i.Provider,{value:{closeSidebar:l.close,openSidebar:y,isSidebarVisible:p?o:!d},children:(0,e.jsxs)("div",{className:"app-layout",children:[(0,e.jsx)("div",{className:`sidebar-overlay ${o?"visible":""}`,onClick:()=>l.close()}),(0,e.jsx)("div",{className:`sidebar ${o?"open":""} ${d?"collapsed":""}`,children:t({closeSidebar:l.close,openSidebar:y})}),(0,e.jsxs)("div",{className:"main-content",children:[(0,e.jsxs)("header",{className:"app-header",children:[(0,e.jsxs)("div",{className:"header-left",children:[(0,e.jsx)("button",{onClick:()=>{p?l.toggle():f(!d)},className:"btn btn-icon sidebar-toggle-btn","aria-label":p?"打开菜单":d?"展开侧边栏":"收起侧边栏",children:(0,e.jsx)(s,{size:16})}),u]}),(0,e.jsx)("div",{className:"header-right",children:c})]}),h]})]})})},"useAppShell",0,function(){let t=(0,r.useContext)(i);if(!t)throw Error("useAppShell must be used within AppShell");return t}],59665)},27648,t=>{"use strict";var e=t.i(18050),r=t.i(93957),a=t.i(71192);t.s(["default",0,function({className:t=""}){let s=(0,a.useUserStore)(t=>t.identity),n=(0,a.useUserStore)(t=>t.openLoginModal),i=(0,a.useUserStore)(t=>t.logoutUser);return(0,e.jsxs)("div",{className:`chat-sidebar-footer sidebar-account ${t}`,children:[(0,e.jsxs)("div",{className:"user-info",children:[(0,e.jsx)("img",{className:"user-avatar-img",src:(0,r.generateAvatar)(s?.address),alt:"avatar"}),(0,e.jsx)("span",{className:"user-name",title:s?.address,children:s?.displayName||"未登录"})]}),s?(0,e.jsx)("button",{className:"btn btn-ghost logout-btn",onClick:i,children:"退出"}):(0,e.jsx)("button",{className:"btn btn-primary login-btn",onClick:n,children:"登录"})]})}])},39626,t=>{"use strict";var e=t.i(18050);let r=(0,t.i(56420).default)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);var a=t.i(59665);t.s(["default",0,function({label:t="打开侧边栏",className:s="",variant:n="primary"}){let{isSidebarVisible:i,openSidebar:u}=(0,a.useAppShell)();return i?null:(0,e.jsxs)("button",{type:"button",className:`btn ${"primary"===n?"btn-primary":""} sidebar-open-hint ${s}`.trim(),onClick:u,children:[(0,e.jsx)(r,{size:16}),t]})}],39626)},77071,t=>{"use strict";let e=(0,t.i(56420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);t.s(["Plus",0,e],77071)},22315,(t,e,r)=>{t.e,e.exports=function(){"use strict";var t="millisecond",e="second",r="minute",a="hour",s="week",n="month",i="quarter",u="year",c="date",h="Invalid Date",o=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,l=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=function(t,e,r){var a=String(t);return!a||a.length>=e?t:""+Array(e+1-a.length).join(r)+t},f="en",p={};p[f]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}};var y="$isDayjsObject",m=function(t){return t instanceof M||!(!t||!t[y])},v=function t(e,r,a){var s;if(!e)return f;if("string"==typeof e){var n=e.toLowerCase();p[n]&&(s=n),r&&(p[n]=r,s=n);var i=e.split("-");if(!s&&i.length>1)return t(i[0])}else{var u=e.name;p[u]=e,s=u}return!a&&s&&(f=s),s||!a&&f},k=function(t,e){if(m(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new M(r)},$={s:d,z:function(t){var e=-t.utcOffset(),r=Math.abs(e);return(e<=0?"+":"-")+d(Math.floor(r/60),2,"0")+":"+d(r%60,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var a=12*(r.year()-e.year())+(r.month()-e.month()),s=e.clone().add(a,n),i=r-s<0,u=e.clone().add(a+(i?-1:1),n);return+(-(a+(r-s)/(i?s-u:u-s))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(h){return({M:n,y:u,w:s,d:"day",D:c,h:a,m:r,s:e,ms:t,Q:i})[h]||String(h||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}};$.l=v,$.i=m,$.w=function(t,e){return k(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var M=function(){function d(t){this.$L=v(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[y]=!0}var f=d.prototype;return f.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if($.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var a=e.match(o);if(a){var s=a[2]-1||0,n=(a[7]||"0").substring(0,3);return r?new Date(Date.UTC(a[1],s,a[3]||1,a[4]||0,a[5]||0,a[6]||0,n)):new Date(a[1],s,a[3]||1,a[4]||0,a[5]||0,a[6]||0,n)}}return new Date(e)}(t),this.init()},f.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},f.$utils=function(){return $},f.isValid=function(){return this.$d.toString()!==h},f.isSame=function(t,e){var r=k(t);return this.startOf(e)<=r&&r<=this.endOf(e)},f.isAfter=function(t,e){return k(t)<this.startOf(e)},f.isBefore=function(t,e){return this.endOf(e)<k(t)},f.$g=function(t,e,r){return $.u(t)?this[e]:this.set(r,t)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(t,i){var h=this,o=!!$.u(i)||i,l=$.p(t),d=function(t,e){var r=$.w(h.$u?Date.UTC(h.$y,e,t):new Date(h.$y,e,t),h);return o?r:r.endOf("day")},f=function(t,e){return $.w(h.toDate()[t].apply(h.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(e)),h)},p=this.$W,y=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(l){case u:return o?d(1,0):d(31,11);case n:return o?d(1,y):d(0,y+1);case s:var k=this.$locale().weekStart||0,M=(p<k?p+7:p)-k;return d(o?m-M:m+(6-M),y);case"day":case c:return f(v+"Hours",0);case a:return f(v+"Minutes",1);case r:return f(v+"Seconds",2);case e:return f(v+"Milliseconds",3);default:return this.clone()}},f.endOf=function(t){return this.startOf(t,!1)},f.$set=function(s,i){var h,o=$.p(s),l="set"+(this.$u?"UTC":""),d=((h={}).day=l+"Date",h[c]=l+"Date",h[n]=l+"Month",h[u]=l+"FullYear",h[a]=l+"Hours",h[r]=l+"Minutes",h[e]=l+"Seconds",h[t]=l+"Milliseconds",h)[o],f="day"===o?this.$D+(i-this.$W):i;if(o===n||o===u){var p=this.clone().set(c,1);p.$d[d](f),p.init(),this.$d=p.set(c,Math.min(this.$D,p.daysInMonth())).$d}else d&&this.$d[d](f);return this.init(),this},f.set=function(t,e){return this.clone().$set(t,e)},f.get=function(t){return this[$.p(t)]()},f.add=function(t,i){var c,h=this;t=Number(t);var o=$.p(i),l=function(e){var r=k(h);return $.w(r.date(r.date()+Math.round(e*t)),h)};if(o===n)return this.set(n,this.$M+t);if(o===u)return this.set(u,this.$y+t);if("day"===o)return l(1);if(o===s)return l(7);var d=((c={})[r]=6e4,c[a]=36e5,c[e]=1e3,c)[o]||1,f=this.$d.getTime()+t*d;return $.w(f,this)},f.subtract=function(t,e){return this.add(-1*t,e)},f.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||h;var a=t||"YYYY-MM-DDTHH:mm:ssZ",s=$.z(this),n=this.$H,i=this.$m,u=this.$M,c=r.weekdays,o=r.months,d=r.meridiem,f=function(t,r,s,n){return t&&(t[r]||t(e,a))||s[r].slice(0,n)},p=function(t){return $.s(n%12||12,t,"0")},y=d||function(t,e,r){var a=t<12?"AM":"PM";return r?a.toLowerCase():a};return a.replace(l,function(t,a){return a||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return $.s(e.$y,4,"0");case"M":return u+1;case"MM":return $.s(u+1,2,"0");case"MMM":return f(r.monthsShort,u,o,3);case"MMMM":return f(o,u);case"D":return e.$D;case"DD":return $.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return f(r.weekdaysMin,e.$W,c,2);case"ddd":return f(r.weekdaysShort,e.$W,c,3);case"dddd":return c[e.$W];case"H":return String(n);case"HH":return $.s(n,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return y(n,i,!0);case"A":return y(n,i,!1);case"m":return String(i);case"mm":return $.s(i,2,"0");case"s":return String(e.$s);case"ss":return $.s(e.$s,2,"0");case"SSS":return $.s(e.$ms,3,"0");case"Z":return s}return null}(t)||s.replace(":","")})},f.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},f.diff=function(t,c,h){var o,l=this,d=$.p(c),f=k(t),p=(f.utcOffset()-this.utcOffset())*6e4,y=this-f,m=function(){return $.m(l,f)};switch(d){case u:o=m()/12;break;case n:o=m();break;case i:o=m()/3;break;case s:o=(y-p)/6048e5;break;case"day":o=(y-p)/864e5;break;case a:o=y/36e5;break;case r:o=y/6e4;break;case e:o=y/1e3;break;default:o=y}return h?o:$.a(o)},f.daysInMonth=function(){return this.endOf(n).$D},f.$locale=function(){return p[this.$L]},f.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),a=v(t,e,!0);return a&&(r.$L=a),r},f.clone=function(){return $.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},d}(),g=M.prototype;return k.prototype=g,[["$ms",t],["$s",e],["$m",r],["$H",a],["$W","day"],["$M",n],["$y",u],["$D",c]].forEach(function(t){g[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),k.extend=function(t,e){return t.$i||(t(e,M,k),t.$i=!0),k},k.locale=v,k.isDayjs=m,k.unix=function(t){return k(1e3*t)},k.en=p[f],k.Ls=p,k.p={},k}()},16327,6537,77816,t=>{"use strict";var e=t.i(56420);let r=(0,e.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);t.s(["ChevronDown",0,r],16327);let a=(0,e.default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);t.s(["Lock",0,a],6537);var s=t.i(22315);function n(t){let e;if(!t)return"";let r=(0,s.default)(Number(t)),a=r.hour();return e=a>=0&&a<3?"凌晨":a>=3&&a<6?"拂晓":a>=6&&a<9?"早晨":a>=9&&a<12?"上午":a>=12&&a<15?"下午":a>=15&&a<18?"傍晚":a>=18&&a<21?"晚上":"深夜",r.format(`YYYY年M月D日 ${e}h:m`)}t.s(["formatDate",0,n,"formatTime",0,n],77816)},71504,t=>{t.v(e=>Promise.all(["static/chunks/0h4r.qtmpa6eh.js","static/chunks/07r9nn-pzlgg1.js","static/chunks/0o9ce4cyf76by.js","static/chunks/0.w4hkvap~bva.js"].map(e=>t.l(e))).then(()=>e(36975)))}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return i}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});function a(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,o(e));else t.set(r,o(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return v},NormalizeError:function(){return g},PageNotFoundError:function(){return j},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return a},execOnce:function(){return o},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return l},isResSent:function(){return p},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return w}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>i.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&p(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class g extends Error{}class j extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",i=e.hash||"",l=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)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),i&&"#"!==i[0]&&(i="#"+i),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return i(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(71645);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(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 a}});let n=e.r(18967),s=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.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 x},useLinkStatus:function(){return j}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(90809),o=e.r(18050),i=a._(e.r(71645)),l=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),h=e.r(91949),m=e.r(73668),y=e.r(9396);function x(t){var r,n;let s,a,x,[j,v]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),b=(0,i.useRef)(null),{href:w,as:S,children:N,prefetch:k=null,passHref:P,replace:C,shallow:E,scroll:O,onClick:A,onMouseEnter:U,onTouchStart:M,legacyBehavior:_=!1,onNavigate:T,transitionTypes:L,ref:R,unstable_dynamicOnHover:z,...B}=t;s=N,_&&("string"==typeof s||"number"==typeof s)&&(s=(0,o.jsx)("a",{children:s}));let $=i.default.useContext(c.AppRouterContext),I=!1!==k,F=!1!==k?null===(n=k)||"auto"===n?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,D="string"==typeof(r=S||w)?r:(0,l.formatUrl)(r);if(_){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=i.default.Children.only(s)}let K=_?a&&"object"==typeof a&&a.ref:R,q=i.default.useCallback(e=>(null!==$&&(b.current=(0,h.mountLinkInstance)(e,D,$,F,I,v)),()=>{b.current&&((0,h.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,h.unmountPrefetchableInstance)(e)}),[I,D,$,F,v]),W={ref:(0,u.useMergedRef)(q,K),onClick(t){_||"function"!=typeof A||A(t),_&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!$||t.defaultPrevented||function(t,r,n,s,a,o,l){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);i.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,l)})}}(t,D,b,C,O,T,L)},onMouseEnter(e){_||"function"!=typeof U||U(e),_&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),$&&I&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)},onTouchStart:function(e){_||"function"!=typeof M||M(e),_&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),$&&I&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)}};return(0,d.isAbsoluteUrl)(D)?W.href=D:_&&!P&&("a"!==a.type||"href"in a.props)||(W.href=(0,p.addBasePath)(D)),x=_?i.default.cloneElement(a,W):(0,o.jsx)("a",{...B,...W,children:s}),(0,o.jsx)(g.Provider,{value:j,children:x})}e.r(84508);let g=(0,i.createContext)(h.IDLE_LINK_STATUS),j=()=>(0,i.useContext)(g);("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)},41220,e=>{"use strict";let t=(0,e.i(56420).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["Server",0,t],41220)},46513,e=>{"use strict";let t=(0,e.i(56420).default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);e.s(["Monitor",0,t],46513)},36162,26158,e=>{"use strict";var t=e.i(56420);let r=(0,t.default)("apple",[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]]);e.s(["Apple",0,r],36162);let n=(0,t.default)("laptop",[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]);e.s(["Laptop",0,n],26158)},72382,e=>{"use strict";let t=(0,e.i(56420).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],72382)},80860,e=>{"use strict";let t=(0,e.i(56420).default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",0,t],80860)},14232,e=>{"use strict";var t=e.i(18050),r=e.i(71645);class n extends r.default.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("[ErrorBoundary]",e,t)}handleReload=()=>{window.location.reload()};render(){return this.state.hasError?(0,t.jsxs)("div",{className:"error-boundary-page",children:[(0,t.jsx)("h1",{className:"error-boundary-title",children:"出错了"}),(0,t.jsx)("p",{className:"error-boundary-desc",children:"发生了意外错误,请尝试重新加载页面"}),(0,t.jsx)("button",{onClick:this.handleReload,className:"error-boundary-btn",children:"重新加载"})]}):this.props.children}}e.s(["ErrorBoundary",0,n])},52925,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(3593),s=e.i(71192);e.i(4121);var a=e.i(80809),o=e.i(63676),i=e.i(62368),l=e.i(46513),c=e.i(36162),u=e.i(26158),d=e.i(22016),p=e.i(41220);let f=(0,e.i(56420).default)("unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);var h=e.i(26913);function m({variant:e="page"}){let s=(0,n.useAppStore)(e=>e.checkBackend),a=(0,n.useAppStore)(e=>e.addToast),o=(0,h.getRemoteBackendUrlExport)(),[i,l]=(0,r.useState)(o),[c,u]=(0,r.useState)((0,h.getBackendInviteExport)()),[d,y]=(0,r.useState)(!1),x=o?"修改远程节点":"连接远程节点",g="输入别人部署好的 MostBox 节点地址和邀请码,无需安装客户端即可使用文件分享和聊天。",j="page"===e;async function v(){let e=i.trim().replace(/\/+$/,"");if(!function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(e))return void a("请输入有效的 http(s) 节点地址","warning");y(!0);try{let{ok:t,reason:r}=await (0,h.checkBackendConnectionTarget)({url:e,invite:c});if(!t)return void("http"===r?a("远程节点 HTTP 不可达,请检查地址","error"):"ws"===r?a("远程节点 WebSocket 不可达,请检查地址或代理配置","error"):a("远程节点连接失败,请检查地址和邀请码","error"));(0,h.configureBackend)({url:e,invite:c}),l(e),(0,h.setBackendUrl)(e),n.useAppStore.setState({hasBackend:!0}),a("远程节点已连接","success")}catch{a("远程节点连接失败","error")}finally{y(!1)}}async function b(){(0,h.clearBackendConnection)(),l(""),u(""),await s(),a("已清除远程节点,优先使用本地节点","success")}return(0,t.jsxs)("div",{className:`remote-node-connect remote-node-connect-${e}`,children:[j?(0,t.jsxs)("div",{className:"remote-node-connect-heading",children:[(0,t.jsx)(p.Server,{size:20}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{children:x}),(0,t.jsx)("p",{children:g})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"drawer-label",children:[(0,t.jsx)(p.Server,{size:14,className:"icon-inline"}),x]}),(0,t.jsx)("p",{className:"drawer-hint drawer-hint-spaced",children:g})]}),(0,t.jsxs)("div",{className:"remote-node-form",children:[(0,t.jsx)("input",{className:"input input-compact",placeholder:"https://node.example.com",value:i,onChange:e=>l(e.target.value)}),(0,t.jsx)("input",{className:"input input-compact",placeholder:"邀请码",value:c,onChange:e=>u(e.target.value)}),(0,t.jsxs)("button",{className:"btn btn-primary btn-full",onClick:v,disabled:d||!i.trim(),children:[(0,t.jsx)(p.Server,{size:16}),d?"连接中...":o?"更新连接":"连接节点"]}),o&&(0,t.jsxs)("button",{className:"btn btn-secondary btn-full",onClick:b,disabled:d,children:[(0,t.jsx)(f,{size:16}),"断开连接"]})]}),o&&(0,t.jsxs)("p",{className:j?"remote-node-status":"drawer-status",children:["当前远程节点:",o]})]})}let y=function({onClose:e}){let r=(0,n.useAppStore)(e=>e.hasBackend),s=[{name:"Windows",icon:(0,t.jsx)(l.Monitor,{size:16}),ext:".exe"},{name:"macOS",icon:(0,t.jsx)(c.Apple,{size:16}),ext:".dmg"},{name:"Linux",icon:(0,t.jsx)(u.Laptop,{size:16}),ext:".AppImage"}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"drawer-backdrop",onClick:e}),(0,t.jsxs)("div",{className:"settings-drawer",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"drawer-header",children:[(0,t.jsx)("h2",{className:"drawer-title",children:"关于"}),(0,t.jsx)("button",{onClick:e,className:"btn btn-icon",children:(0,t.jsx)(o.X,{size:18})})]}),(0,t.jsxs)("div",{className:"drawer-content",children:[(0,t.jsxs)("div",{className:"drawer-section drawer-about",children:[(0,t.jsx)("h3",{children:"MostBox"}),(0,t.jsx)("p",{children:"版本 0.1.0"}),(0,t.jsx)("p",{className:"drawer-subtitle",children:"Hyperswarm · Hyperdrive · IPFS"})]}),(0,t.jsx)("div",{className:"drawer-divider"}),(0,t.jsx)("div",{className:"drawer-section",children:(0,t.jsx)(m,{variant:"drawer"})}),!1===r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"drawer-divider"}),(0,t.jsxs)("div",{className:"drawer-section",children:[(0,t.jsxs)("label",{className:"drawer-label",children:[(0,t.jsx)(i.Download,{size:14,className:"icon-inline"}),"下载桌面客户端"]}),(0,t.jsx)("p",{className:"drawer-hint drawer-hint-spaced",children:"Web 端仅用于界面展示。下载桌面客户端获得完整的 P2P 文件分享和加密聊天体验。"}),(0,t.jsx)("div",{className:"download-platforms-mini",children:s.map(r=>(0,t.jsxs)(d.default,{href:"/download",className:"download-platform-mini",onClick:e,children:[r.icon,(0,t.jsx)("span",{children:r.name}),(0,t.jsx)("span",{className:"download-platform-mini-ext",children:r.ext})]},r.name))})]}),(0,t.jsx)("div",{className:"drawer-divider"}),(0,t.jsxs)("div",{className:"drawer-section",children:[(0,t.jsx)("label",{className:"drawer-label",children:"说明"}),(0,t.jsxs)("div",{className:"drawer-note",children:[(0,t.jsx)("p",{children:"桌面客户端提供以下完整功能:"}),(0,t.jsxs)("ul",{children:[(0,t.jsx)("li",{children:"P2P 文件分享与下载"}),(0,t.jsx)("li",{children:"加密频道聊天"}),(0,t.jsx)("li",{children:"本地持久化存储"}),(0,t.jsx)("li",{children:"离线消息同步"}),(0,t.jsx)("li",{children:"大文件无限制传输"})]})]})]})]})]})]})]})};var x=e.i(74080),g=e.i(72382),j=e.i(80860),v=e.i(57667),b=e.i(93957);function w(){let e=(0,n.useAppStore)(e=>e.addToast),r=(0,s.useUserStore)(e=>e.showLoginModal),a=(0,s.useUserStore)(e=>e.closeLoginModal),i=(0,s.useUserStore)(e=>e.loginUsername),l=(0,s.useUserStore)(e=>e.loginPassword),c=(0,s.useUserStore)(e=>e.showPassword),u=(0,s.useUserStore)(e=>e.loginPreviewAddress),d=(0,s.useUserStore)(e=>e.hasPreviewedAvatar),p=(0,s.useUserStore)(e=>e.loginLoading),f=(0,s.useUserStore)(e=>e.loginError),h=(0,s.useUserStore)(e=>e.setLoginUsername),m=(0,s.useUserStore)(e=>e.setLoginPassword),y=(0,s.useUserStore)(e=>e.togglePassword),w=(0,s.useUserStore)(e=>e.previewLoginIdentity),S=(0,s.useUserStore)(e=>e.loginUser);if(!r)return null;let N=u?`${u.slice(0,6)}...${u.slice(-4)}`:"Most People",k=(0,t.jsx)(v.ModalOverlay,{onClose:a,closeOnOverlayClick:!0,children:(0,t.jsxs)("form",{className:"login-modal",onSubmit:t=>{let r;t.preventDefault(),(r=S())&&e(`已登录 ${r.username}`,"success")},children:[(0,t.jsxs)("div",{className:"login-modal-header",children:[(0,t.jsx)("h3",{children:"登录"}),(0,t.jsx)("button",{className:"login-modal-close",onClick:a,type:"button",children:(0,t.jsx)(o.X,{size:18})})]}),(0,t.jsxs)("div",{className:"login-modal-body",children:[(0,t.jsx)("img",{className:"login-avatar-preview",src:u?(0,b.generateAvatar)(u):"/pwa-512x512.png",alt:"avatar"}),(0,t.jsx)("p",{className:"login-tip",children:N}),f&&(0,t.jsx)("p",{className:"login-error",children:f}),(0,t.jsx)("input",{type:"text",className:"input input-compact",placeholder:"用户名",value:i,onChange:e=>h(e.target.value),autoFocus:!0}),(0,t.jsxs)("div",{className:"login-password-wrapper",children:[(0,t.jsx)("input",{type:c?"text":"password",className:"input input-compact",placeholder:"密码",value:l,onChange:e=>m(e.target.value)}),(0,t.jsx)("button",{className:"login-password-toggle",type:"button",onClick:y,children:c?(0,t.jsx)(j.EyeOff,{size:16}):(0,t.jsx)(g.Eye,{size:16})})]}),(0,t.jsxs)("div",{className:"login-buttons-row",children:[(0,t.jsx)("button",{className:"btn btn-secondary",onClick:w,disabled:d||p,type:"button",children:d?"检查地址":"登录"}),(0,t.jsx)("button",{className:"btn btn-primary",disabled:!d||p,type:"submit",children:p?"登录中":"确认"})]})]})]})});return(0,x.createPortal)(k,document.body)}function S(){let e=(0,n.useAppStore)(e=>e.showConnectModal),r=(0,n.useAppStore)(e=>e.closeConnectModal);if(!e)return null;let s=(0,t.jsx)(v.ModalOverlay,{onClose:r,closeOnOverlayClick:!0,children:(0,t.jsxs)("div",{className:"connect-modal",children:[(0,t.jsxs)("div",{className:"connect-modal-header",children:[(0,t.jsx)("h3",{children:"连接节点"}),(0,t.jsx)("button",{className:"connect-modal-close",onClick:r,type:"button",children:(0,t.jsx)(o.X,{size:18})})]}),(0,t.jsx)("div",{className:"connect-modal-body",children:(0,t.jsx)(m,{variant:"drawer"})})]})});return(0,x.createPortal)(s,document.body)}e.s(["default",0,function(){let e=(0,n.useAppStore)(e=>e.checkBackend),o=(0,n.useAppStore)(e=>e.initializeLocalData),i=(0,s.useUserStore)(e=>e.initializeUser),l=(0,s.useUserStore)(e=>e.identity),c=(0,n.useAppStore)(e=>e.loadUserNotes),u=(0,n.useAppStore)(e=>e.resetAppState),d=(0,n.useAppStore)(e=>e.toasts),p=(0,n.useAppStore)(e=>e.removeToast),f=(0,n.useAppStore)(e=>e.showSettings),h=(0,n.useAppStore)(e=>e.closeSettings);return(0,r.useEffect)(()=>{o(),i(),e()},[e,o,i]),(0,r.useEffect)(()=>{l?c(l.address):u()},[l?.address,c,u]),(0,t.jsxs)(t.Fragment,{children:[d.map((e,r)=>(0,t.jsx)(a.Toast,{message:e.message,type:e.type,onDone:()=>p(e.id),index:r},e.id)),f&&(0,t.jsx)(y,{onClose:h}),(0,t.jsx)(w,{}),(0,t.jsx)(S,{})]})}],52925)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return i}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});function a(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,o(e));else t.set(r,o(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return v},NormalizeError:function(){return g},PageNotFoundError:function(){return j},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return a},execOnce:function(){return o},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return l},isResSent:function(){return p},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return w}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>i.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&p(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class g extends Error{}class j extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",i=e.hash||"",l=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)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),i&&"#"!==i[0]&&(i="#"+i),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return i(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(71645);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(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 a}});let n=e.r(18967),s=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.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 x},useLinkStatus:function(){return j}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(90809),o=e.r(18050),i=a._(e.r(71645)),l=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),h=e.r(91949),m=e.r(73668),y=e.r(9396);function x(t){var r,n;let s,a,x,[j,v]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),b=(0,i.useRef)(null),{href:w,as:S,children:N,prefetch:k=null,passHref:P,replace:C,shallow:E,scroll:O,onClick:A,onMouseEnter:U,onTouchStart:M,legacyBehavior:_=!1,onNavigate:T,transitionTypes:L,ref:R,unstable_dynamicOnHover:z,...B}=t;s=N,_&&("string"==typeof s||"number"==typeof s)&&(s=(0,o.jsx)("a",{children:s}));let $=i.default.useContext(c.AppRouterContext),I=!1!==k,F=!1!==k?null===(n=k)||"auto"===n?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,D="string"==typeof(r=S||w)?r:(0,l.formatUrl)(r);if(_){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=i.default.Children.only(s)}let K=_?a&&"object"==typeof a&&a.ref:R,q=i.default.useCallback(e=>(null!==$&&(b.current=(0,h.mountLinkInstance)(e,D,$,F,I,v)),()=>{b.current&&((0,h.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,h.unmountPrefetchableInstance)(e)}),[I,D,$,F,v]),W={ref:(0,u.useMergedRef)(q,K),onClick(t){_||"function"!=typeof A||A(t),_&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!$||t.defaultPrevented||function(t,r,n,s,a,o,l){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);i.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,l)})}}(t,D,b,C,O,T,L)},onMouseEnter(e){_||"function"!=typeof U||U(e),_&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),$&&I&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)},onTouchStart:function(e){_||"function"!=typeof M||M(e),_&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),$&&I&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)}};return(0,d.isAbsoluteUrl)(D)?W.href=D:_&&!P&&("a"!==a.type||"href"in a.props)||(W.href=(0,p.addBasePath)(D)),x=_?i.default.cloneElement(a,W):(0,o.jsx)("a",{...B,...W,children:s}),(0,o.jsx)(g.Provider,{value:j,children:x})}e.r(84508);let g=(0,i.createContext)(h.IDLE_LINK_STATUS),j=()=>(0,i.useContext)(g);("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)},72382,e=>{"use strict";let t=(0,e.i(56420).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],72382)},41220,e=>{"use strict";let t=(0,e.i(56420).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["Server",0,t],41220)},46513,e=>{"use strict";let t=(0,e.i(56420).default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);e.s(["Monitor",0,t],46513)},36162,26158,e=>{"use strict";var t=e.i(56420);let r=(0,t.default)("apple",[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]]);e.s(["Apple",0,r],36162);let n=(0,t.default)("laptop",[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]);e.s(["Laptop",0,n],26158)},80860,e=>{"use strict";let t=(0,e.i(56420).default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",0,t],80860)},14232,e=>{"use strict";var t=e.i(18050),r=e.i(71645);class n extends r.default.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("[ErrorBoundary]",e,t)}handleReload=()=>{window.location.reload()};render(){return this.state.hasError?(0,t.jsxs)("div",{className:"error-boundary-page",children:[(0,t.jsx)("h1",{className:"error-boundary-title",children:"出错了"}),(0,t.jsx)("p",{className:"error-boundary-desc",children:"发生了意外错误,请尝试重新加载页面"}),(0,t.jsx)("button",{onClick:this.handleReload,className:"error-boundary-btn",children:"重新加载"})]}):this.props.children}}e.s(["ErrorBoundary",0,n])},52925,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(3593),s=e.i(71192);e.i(4121);var a=e.i(80809),o=e.i(63676),i=e.i(62368),l=e.i(46513),c=e.i(36162),u=e.i(26158),d=e.i(22016),p=e.i(41220);let f=(0,e.i(56420).default)("unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);var h=e.i(26913);function m({variant:e="page"}){let s=(0,n.useAppStore)(e=>e.checkBackend),a=(0,n.useAppStore)(e=>e.addToast),o=(0,h.getRemoteBackendUrlExport)(),[i,l]=(0,r.useState)(o),[c,u]=(0,r.useState)((0,h.getBackendInviteExport)()),[d,y]=(0,r.useState)(!1),x=o?"修改远程节点":"连接远程节点",g="输入别人部署好的 MostBox 节点地址和邀请码,无需安装客户端即可使用文件分享和聊天。",j="page"===e;async function v(){let e=i.trim().replace(/\/+$/,"");if(!function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(e))return void a("请输入有效的 http(s) 节点地址","warning");y(!0);try{let{ok:t,reason:r}=await (0,h.checkBackendConnectionTarget)({url:e,invite:c});if(!t)return void("http"===r?a("远程节点 HTTP 不可达,请检查地址","error"):"ws"===r?a("远程节点 WebSocket 不可达,请检查地址或代理配置","error"):a("远程节点连接失败,请检查地址和邀请码","error"));(0,h.configureBackend)({url:e,invite:c}),l(e),(0,h.setBackendUrl)(e),n.useAppStore.setState({hasBackend:!0}),a("远程节点已连接","success")}catch{a("远程节点连接失败","error")}finally{y(!1)}}async function b(){(0,h.clearBackendConnection)(),l(""),u(""),await s(),a("已清除远程节点,优先使用本地节点","success")}return(0,t.jsxs)("div",{className:`remote-node-connect remote-node-connect-${e}`,children:[j?(0,t.jsxs)("div",{className:"remote-node-connect-heading",children:[(0,t.jsx)(p.Server,{size:20}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{children:x}),(0,t.jsx)("p",{children:g})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"drawer-label",children:[(0,t.jsx)(p.Server,{size:14,className:"icon-inline"}),x]}),(0,t.jsx)("p",{className:"drawer-hint drawer-hint-spaced",children:g})]}),(0,t.jsxs)("div",{className:"remote-node-form",children:[(0,t.jsx)("input",{className:"input input-compact",placeholder:"https://node.example.com",value:i,onChange:e=>l(e.target.value)}),(0,t.jsx)("input",{className:"input input-compact",placeholder:"邀请码",value:c,onChange:e=>u(e.target.value)}),(0,t.jsxs)("button",{className:"btn btn-primary btn-full",onClick:v,disabled:d||!i.trim(),children:[(0,t.jsx)(p.Server,{size:16}),d?"连接中...":o?"更新连接":"连接节点"]}),o&&(0,t.jsxs)("button",{className:"btn btn-secondary btn-full",onClick:b,disabled:d,children:[(0,t.jsx)(f,{size:16}),"断开连接"]})]}),o&&(0,t.jsxs)("p",{className:j?"remote-node-status":"drawer-status",children:["当前远程节点:",o]})]})}let y=function({onClose:e}){let r=(0,n.useAppStore)(e=>e.hasBackend),s=[{name:"Windows",icon:(0,t.jsx)(l.Monitor,{size:16}),ext:".exe"},{name:"macOS",icon:(0,t.jsx)(c.Apple,{size:16}),ext:".dmg"},{name:"Linux",icon:(0,t.jsx)(u.Laptop,{size:16}),ext:".AppImage"}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"drawer-backdrop",onClick:e}),(0,t.jsxs)("div",{className:"settings-drawer",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"drawer-header",children:[(0,t.jsx)("h2",{className:"drawer-title",children:"关于"}),(0,t.jsx)("button",{onClick:e,className:"btn btn-icon",children:(0,t.jsx)(o.X,{size:18})})]}),(0,t.jsxs)("div",{className:"drawer-content",children:[(0,t.jsxs)("div",{className:"drawer-section drawer-about",children:[(0,t.jsx)("h3",{children:"MostBox"}),(0,t.jsx)("p",{children:"版本 0.1.0"}),(0,t.jsx)("p",{className:"drawer-subtitle",children:"Hyperswarm · Hyperdrive · IPFS"})]}),(0,t.jsx)("div",{className:"drawer-divider"}),(0,t.jsx)("div",{className:"drawer-section",children:(0,t.jsx)(m,{variant:"drawer"})}),!1===r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"drawer-divider"}),(0,t.jsxs)("div",{className:"drawer-section",children:[(0,t.jsxs)("label",{className:"drawer-label",children:[(0,t.jsx)(i.Download,{size:14,className:"icon-inline"}),"下载桌面客户端"]}),(0,t.jsx)("p",{className:"drawer-hint drawer-hint-spaced",children:"Web 端仅用于界面展示。下载桌面客户端获得完整的 P2P 文件分享和加密聊天体验。"}),(0,t.jsx)("div",{className:"download-platforms-mini",children:s.map(r=>(0,t.jsxs)(d.default,{href:"/download",className:"download-platform-mini",onClick:e,children:[r.icon,(0,t.jsx)("span",{children:r.name}),(0,t.jsx)("span",{className:"download-platform-mini-ext",children:r.ext})]},r.name))})]}),(0,t.jsx)("div",{className:"drawer-divider"}),(0,t.jsxs)("div",{className:"drawer-section",children:[(0,t.jsx)("label",{className:"drawer-label",children:"说明"}),(0,t.jsxs)("div",{className:"drawer-note",children:[(0,t.jsx)("p",{children:"桌面客户端提供以下完整功能:"}),(0,t.jsxs)("ul",{children:[(0,t.jsx)("li",{children:"P2P 文件分享与下载"}),(0,t.jsx)("li",{children:"加密频道聊天"}),(0,t.jsx)("li",{children:"本地持久化存储"}),(0,t.jsx)("li",{children:"离线消息同步"}),(0,t.jsx)("li",{children:"大文件无限制传输"})]})]})]})]})]})]})]})};var x=e.i(74080),g=e.i(72382),j=e.i(80860),v=e.i(57667),b=e.i(93957);function w(){let e=(0,n.useAppStore)(e=>e.addToast),r=(0,s.useUserStore)(e=>e.showLoginModal),a=(0,s.useUserStore)(e=>e.closeLoginModal),i=(0,s.useUserStore)(e=>e.loginUsername),l=(0,s.useUserStore)(e=>e.loginPassword),c=(0,s.useUserStore)(e=>e.showPassword),u=(0,s.useUserStore)(e=>e.loginPreviewAddress),d=(0,s.useUserStore)(e=>e.hasPreviewedAvatar),p=(0,s.useUserStore)(e=>e.loginLoading),f=(0,s.useUserStore)(e=>e.loginError),h=(0,s.useUserStore)(e=>e.setLoginUsername),m=(0,s.useUserStore)(e=>e.setLoginPassword),y=(0,s.useUserStore)(e=>e.togglePassword),w=(0,s.useUserStore)(e=>e.previewLoginIdentity),S=(0,s.useUserStore)(e=>e.loginUser);if(!r)return null;let N=u?`${u.slice(0,6)}...${u.slice(-4)}`:"Most People",k=(0,t.jsx)(v.ModalOverlay,{onClose:a,closeOnOverlayClick:!0,children:(0,t.jsxs)("form",{className:"login-modal",onSubmit:t=>{let r;t.preventDefault(),(r=S())&&e(`已登录 ${r.username}`,"success")},children:[(0,t.jsxs)("div",{className:"login-modal-header",children:[(0,t.jsx)("h3",{children:"登录"}),(0,t.jsx)("button",{className:"login-modal-close",onClick:a,type:"button",children:(0,t.jsx)(o.X,{size:18})})]}),(0,t.jsxs)("div",{className:"login-modal-body",children:[(0,t.jsx)("img",{className:"login-avatar-preview",src:u?(0,b.generateAvatar)(u):"/pwa-512x512.png",alt:"avatar"}),(0,t.jsx)("p",{className:"login-tip",children:N}),f&&(0,t.jsx)("p",{className:"login-error",children:f}),(0,t.jsx)("input",{type:"text",className:"input input-compact",placeholder:"用户名",value:i,onChange:e=>h(e.target.value),autoFocus:!0}),(0,t.jsxs)("div",{className:"login-password-wrapper",children:[(0,t.jsx)("input",{type:c?"text":"password",className:"input input-compact",placeholder:"密码",value:l,onChange:e=>m(e.target.value)}),(0,t.jsx)("button",{className:"login-password-toggle",type:"button",onClick:y,children:c?(0,t.jsx)(j.EyeOff,{size:16}):(0,t.jsx)(g.Eye,{size:16})})]}),(0,t.jsxs)("div",{className:"login-buttons-row",children:[(0,t.jsx)("button",{className:"btn btn-secondary",onClick:w,disabled:d||p,type:"button",children:d?"检查地址":"登录"}),(0,t.jsx)("button",{className:"btn btn-primary",disabled:!d||p,type:"submit",children:p?"登录中":"确认"})]})]})]})});return(0,x.createPortal)(k,document.body)}function S(){let e=(0,n.useAppStore)(e=>e.showConnectModal),r=(0,n.useAppStore)(e=>e.closeConnectModal);if(!e)return null;let s=(0,t.jsx)(v.ModalOverlay,{onClose:r,closeOnOverlayClick:!0,children:(0,t.jsxs)("div",{className:"connect-modal",children:[(0,t.jsxs)("div",{className:"connect-modal-header",children:[(0,t.jsx)("h3",{children:"连接节点"}),(0,t.jsx)("button",{className:"connect-modal-close",onClick:r,type:"button",children:(0,t.jsx)(o.X,{size:18})})]}),(0,t.jsx)("div",{className:"connect-modal-body",children:(0,t.jsx)(m,{variant:"drawer"})})]})});return(0,x.createPortal)(s,document.body)}e.s(["default",0,function(){let e=(0,n.useAppStore)(e=>e.checkBackend),o=(0,n.useAppStore)(e=>e.initializeLocalData),i=(0,s.useUserStore)(e=>e.initializeUser),l=(0,s.useUserStore)(e=>e.identity),c=(0,n.useAppStore)(e=>e.loadUserNotes),u=(0,n.useAppStore)(e=>e.resetAppState),d=(0,n.useAppStore)(e=>e.toasts),p=(0,n.useAppStore)(e=>e.removeToast),f=(0,n.useAppStore)(e=>e.showSettings),h=(0,n.useAppStore)(e=>e.closeSettings);return(0,r.useEffect)(()=>{o(),i(),e()},[e,o,i]),(0,r.useEffect)(()=>{l?c(l.address):u()},[l?.address,c,u]),(0,t.jsxs)(t.Fragment,{children:[d.map((e,r)=>(0,t.jsx)(a.Toast,{message:e.message,type:e.type,onDone:()=>p(e.id),index:r},e.id)),f&&(0,t.jsx)(y,{onClose:h}),(0,t.jsx)(w,{}),(0,t.jsx)(S,{})]})}],52925)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,30274,e=>{"use strict";let a=(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,a],30274)},68590,e=>{"use strict";let a=(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,a],68590)},23952,87884,e=>{"use strict";var a=e.i(71645),t=e.i(26913);let s={getChannels(e={}){let a=new URLSearchParams;e.type&&a.set("type",e.type),e.excludeType&&a.set("excludeType",e.excludeType);let s=a.toString();return t.api.get(s?`/api/channels?${s}`:"/api/channels").json()},createChannel:(e,a="personal")=>t.api.post("/api/channels",{json:{name:e,type:a}}).json(),leaveChannel:e=>t.api.delete(`/api/channels/${encodeURIComponent(e)}`).json(),getChannelMessages:(e,a=100,s=0)=>t.api.get(`/api/channels/${encodeURIComponent(e)}/messages?limit=${a}&offset=${s}`).json(),sendChannelMessage:({channelName:e,content:a,author:s,authorName:i,attachment:n})=>t.api.post(`/api/channels/${encodeURIComponent(e)}/messages`,{json:n?{content:a,author:s,authorName:i,attachment:n}:{content:a,author:s,authorName:i}}).json(),getChannelPeers:e=>t.api.get(`/api/channels/${encodeURIComponent(e)}/peers`).json(),setChannelRemark:(e,a)=>t.api.put(`/api/channels/${encodeURIComponent(e)}/remark`,{json:{remark:a}}).json()};function i(e){return String(e.id||`${e.author||""}-${e.timestamp||""}-${e.content||""}`)}e.s(["channelApi",0,s],87884),e.s(["useChannelMessages",0,function({isReady:e,enabled:n=!0,channelName:l="",peerId:r="",waitForPeerId:c=!1,limit:d=100,reconnectBaseDelay:o=2500,acceptMessage:u,getMessageKey:h=i,onSyncError:p,onSocketEvent:m}){let[f,x]=(0,a.useState)([]),[y,j]=(0,a.useState)(!1),g=(0,a.useRef)(null),v=(0,a.useRef)(l),b=(0,a.useRef)(null),k=(0,a.useRef)(0),w=(0,a.useRef)(u),N=(0,a.useRef)(h),C=(0,a.useRef)(m),S=(0,a.useRef)(p),M=(0,a.useRef)(r);(0,a.useEffect)(()=>{w.current=u},[u]),(0,a.useEffect)(()=>{N.current=h},[h]),(0,a.useEffect)(()=>{C.current=m},[m]),(0,a.useEffect)(()=>{S.current=p},[p]);let z=(0,a.useCallback)(e=>{let a=w.current;return a?e.filter(a):e},[]),$=(0,a.useCallback)((e,a,t=!0)=>{let s=[...e];for(let e of z(a)){let a=N.current(e);if(t){let t=s.findIndex(a=>a.pending&&a.author?.toLowerCase()===e.author?.toLowerCase()&&a.content===e.content);if(-1!==t){s[t]={...e,id:e.id||a};continue}}s.some(e=>N.current(e)===a)||s.push({...e,id:e.id||a})}return s},[z]),R=(0,a.useCallback)((e,a)=>{g.current?.readyState===WebSocket.OPEN&&g.current.send(JSON.stringify({event:e,data:a}))},[]),A=(0,a.useCallback)(e=>{e&&R("channel:subscribe",{channel:e})},[R]),E=(0,a.useCallback)(e=>{e&&R("channel:unsubscribe",{channel:e})},[R]),F=(0,a.useCallback)(async(a=v.current,t={})=>{if(!a||!e)return[];try{let e=z(await s.getChannelMessages(a,d));return x(a=>t.replace?e:$(a,e,!1)),e}catch(e){return t.replace&&x([]),await S.current?.(e),[]}},[z,e,d,$]);(0,a.useEffect)(()=>{M.current=r,r&&(R("register",{peerId:r}),c&&v.current&&(A(v.current),F(v.current,{replace:!0})))},[r,A,F,c,R]);let T=(0,a.useCallback)(()=>{x([])},[]),I=(0,a.useCallback)(async({channelName:e=v.current,content:a,author:t,authorName:i,attachment:n,optimisticId:l})=>{let r=a.trim();if(!e||!r)return null;let c={id:l||`${t}-${Date.now()}-${Math.random().toString(36).slice(2)}`,author:t,authorName:i,content:r,timestamp:Date.now(),pending:!0,attachment:n};x(e=>[...e,c]);try{let a=await s.sendChannelMessage({channelName:e,content:r,author:t,authorName:i,attachment:n});return x(e=>e.map(e=>e.id===c.id?{...a.message,id:a.message.id||N.current(a.message)}:e)),a.message}catch(e){throw x(e=>e.filter(e=>e.id!==c.id)),e}},[]);return(0,a.useEffect)(()=>{let a=v.current;if(v.current=l,a&&a!==l&&E(a),l&&e&&n)return F(l,{replace:!0}),(!c||M.current)&&A(l),()=>E(l)},[l,n,e,A,F,E,c]),(0,a.useEffect)(()=>{if(!e||!n)return void j(!1);let a=!1;async function s(){let e=new WebSocket(await (0,t.getAuthenticatedWebSocketUrl)("/ws"));a?e.close():(e.onopen=()=>{j(!0),k.current=0,M.current&&e.send(JSON.stringify({event:"register",data:{peerId:M.current}})),v.current&&(!c||M.current)&&(A(v.current),F(v.current,{replace:!0}))},e.onmessage=e=>{try{let a=JSON.parse(e.data);C.current?.(a.event,a.data),"channel:message"===a.event&&a.data?.channel===v.current&&a.data?.message&&x(e=>$(e,[a.data.message]))}catch{}},e.onclose=()=>{if(j(!1),a)return;let e=k.current;if(e>=20)return;let t=Math.min(o*Math.pow(2,e),3e4);k.current=e+1,b.current=setTimeout(s,t)},e.onerror=()=>e.close(),g.current=e)}return k.current=0,s(),()=>{a=!0,b.current&&clearTimeout(b.current),g.current?.close(),g.current=null}},[n,e,$,o,A,F,c]),{clearMessages:T,connected:y,messages:f,sendMessage:I,setMessages:x,syncMessages:F}}],23952)},35965,e=>{"use strict";let a=(0,e.i(56420).default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,a],35965)},96699,e=>{"use strict";let a=(0,e.i(56420).default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,a],96699)},11241,e=>{"use strict";let a=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,a],11241)},59665,e=>{"use strict";var a=e.i(18050),t=e.i(71645),s=e.i(67228);let i=(0,e.i(56420).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);e.i(22183);var n=e.i(5142);let l=(0,t.createContext)(null);e.s(["default",0,function({sidebar:e,headerTitle:r,headerRight:c,children:d}){let[o,u]=(0,n.useDisclosure)(!1),[h,p]=(0,t.useState)(!1),m=(0,s.useMediaQuery)("(max-width: 768px)"),f=()=>{m?u.open():p(!1)};return(0,a.jsx)(l.Provider,{value:{closeSidebar:u.close,openSidebar:f,isSidebarVisible:m?o:!h},children:(0,a.jsxs)("div",{className:"app-layout",children:[(0,a.jsx)("div",{className:`sidebar-overlay ${o?"visible":""}`,onClick:()=>u.close()}),(0,a.jsx)("div",{className:`sidebar ${o?"open":""} ${h?"collapsed":""}`,children:e({closeSidebar:u.close,openSidebar:f})}),(0,a.jsxs)("div",{className:"main-content",children:[(0,a.jsxs)("header",{className:"app-header",children:[(0,a.jsxs)("div",{className:"header-left",children:[(0,a.jsx)("button",{onClick:()=>{m?u.toggle():p(!h)},className:"btn btn-icon sidebar-toggle-btn","aria-label":m?"打开菜单":h?"展开侧边栏":"收起侧边栏",children:(0,a.jsx)(i,{size:16})}),r]}),(0,a.jsx)("div",{className:"header-right",children:c})]}),d]})]})})},"useAppShell",0,function(){let e=(0,t.useContext)(l);if(!e)throw Error("useAppShell must be used within AppShell");return e}],59665)},27648,e=>{"use strict";var a=e.i(18050),t=e.i(93957),s=e.i(71192);e.s(["default",0,function({className:e=""}){let i=(0,s.useUserStore)(e=>e.identity),n=(0,s.useUserStore)(e=>e.openLoginModal),l=(0,s.useUserStore)(e=>e.logoutUser);return(0,a.jsxs)("div",{className:`chat-sidebar-footer sidebar-account ${e}`,children:[(0,a.jsxs)("div",{className:"user-info",children:[(0,a.jsx)("img",{className:"user-avatar-img",src:(0,t.generateAvatar)(i?.address),alt:"avatar"}),(0,a.jsx)("span",{className:"user-name",title:i?.address,children:i?.displayName||"未登录"})]}),i?(0,a.jsx)("button",{className:"btn btn-ghost logout-btn",onClick:l,children:"退出"}):(0,a.jsx)("button",{className:"btn btn-primary login-btn",onClick:n,children:"登录"})]})}])},26091,e=>{"use strict";let a=(0,e.i(56420).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,a],26091)},39626,e=>{"use strict";var a=e.i(18050);let t=(0,e.i(56420).default)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);var s=e.i(59665);e.s(["default",0,function({label:e="打开侧边栏",className:i="",variant:n="primary"}){let{isSidebarVisible:l,openSidebar:r}=(0,s.useAppShell)();return l?null:(0,a.jsxs)("button",{type:"button",className:`btn ${"primary"===n?"btn-primary":""} sidebar-open-hint ${i}`.trim(),onClick:r,children:[(0,a.jsx)(t,{size:16}),e]})}],39626)},77071,e=>{"use strict";let a=(0,e.i(56420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,a],77071)},51921,e=>{"use strict";let a=(0,e.i(56420).default)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);e.s(["Music",0,a],51921)},79490,e=>{"use strict";let a=(0,e.i(56420).default)("pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);e.s(["Edit2",0,a],79490)},15170,80796,e=>{"use strict";var a=e.i(56420);let t=(0,a.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);e.s(["Image",0,t],15170);let s=(0,a.default)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);e.s(["Film",0,s],80796)},12796,11028,6933,e=>{"use strict";let a=(0,e.i(56420).default)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);e.s(["Loader",0,a],12796);var t=e.i(18050),s=e.i(71645),i=e.i(26091),n=e.i(51921),l=e.i(63676),r=e.i(26913);e.s(["default",0,function({item:e,isBackendReady:c,getFileDownloadUrl:d,onClose:o}){let[u,h]=(0,s.useState)(""),[p,m]=(0,s.useState)(!1),[f,x]=(0,s.useState)(""),[y,j]=(0,s.useState)("");return(0,s.useEffect)(()=>{if("text"!==e.subtype)return;let a=!1;return(h(""),j(""),c)?(m(!0),(async()=>{try{let t=await fetch(d(e.cid),{headers:{...await (0,r.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`),Range:"bytes=0-9999"}});if(!t.ok)throw Error("加载失败");let s=await t.text();a||h(s||"(文件为空)")}catch{a||h("加载失败")}finally{a||m(!1)}})(),()=>{a=!0}):void h("加载失败")},[d,c,e.cid,e.subtype]),(0,s.useEffect)(()=>{var a;if("image"!==(a=e.subtype)&&"video"!==a&&"audio"!==a)return void x("");if(x(""),j(""),!c)return void j("加载失败");let t="",s=!1;return(async()=>{try{let a=await fetch(d(e.cid),{headers:await (0,r.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`)});if(!a.ok)throw Error("加载失败");let i=URL.createObjectURL(await a.blob());t=i,s||x(i)}catch{s||j("加载失败")}})(),()=>{s=!0,t&&URL.revokeObjectURL(t)}},[d,c,e.cid,e.subtype]),(0,t.jsxs)("div",{className:"preview-overlay",onClick:o,children:[(0,t.jsx)("button",{type:"button",className:"preview-close",onClick:o,"aria-label":"关闭预览",children:(0,t.jsx)(l.X,{size:20})}),(0,t.jsxs)("div",{onClick:e=>e.stopPropagation(),children:["image"===e.subtype&&(0,t.jsx)("div",{className:"preview-media-wrapper",children:f?(0,t.jsx)("img",{src:f,alt:e.fileName}):y?(0,t.jsxs)("div",{className:"preview-unsupported",children:[(0,t.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,t.jsx)("p",{children:e.fileName}),(0,t.jsx)("p",{className:"preview-unsupported-hint",children:y})]}):(0,t.jsx)("div",{className:"preview-loading",children:(0,t.jsx)("div",{className:"preview-loading-spinner"})})}),"video"===e.subtype&&(0,t.jsx)("div",{className:"preview-media-wrapper",children:f?(0,t.jsx)("video",{src:f,controls:!0}):y?(0,t.jsxs)("div",{className:"preview-unsupported",children:[(0,t.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,t.jsx)("p",{children:e.fileName}),(0,t.jsx)("p",{className:"preview-unsupported-hint",children:y})]}):(0,t.jsx)("div",{className:"preview-loading",children:(0,t.jsx)("div",{className:"preview-loading-spinner"})})}),"audio"===e.subtype&&(0,t.jsxs)("div",{className:"preview-audio",children:[(0,t.jsx)("div",{className:"preview-audio-icon",children:(0,t.jsx)(n.Music,{size:36,color:"var(--accent)"})}),(0,t.jsx)("p",{className:"preview-audio-filename",children:e.fileName}),f?(0,t.jsx)("audio",{className:"preview-audio-player",src:f,controls:!0}):(0,t.jsx)("div",{className:"preview-text-loading",children:y?(0,t.jsx)("p",{children:y}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a,{size:24,className:"preview-text-spinner"}),(0,t.jsx)("p",{children:"正在加载音频预览..."})]})})]}),"file"===e.subtype&&(0,t.jsxs)("div",{className:"preview-unsupported",children:[(0,t.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,t.jsx)("p",{children:e.fileName}),(0,t.jsx)("p",{className:"preview-unsupported-hint",children:"无法预览"})]}),"text"===e.subtype&&(0,t.jsxs)("div",{className:"preview-text-container",children:[(0,t.jsx)("div",{className:"preview-text-header",children:(0,t.jsx)("span",{children:e.fileName})}),p?(0,t.jsxs)("div",{className:"preview-text-loading",children:[(0,t.jsx)(a,{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:u||"(文件为空)"})]})]})]})}],11028),e.s(["getFileSubtype",0,function(e){let a=String(e||"").split(".").pop()?.toLowerCase()||"";return["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","heic","heif"].includes(a)?"image":["mp4","webm","mov","avi","mkv","flv","wmv","m4v","mpeg","3gp"].includes(a)?"video":["mp3","wav","ogg","flac","aac","m4a","wma","opus"].includes(a)?"audio":["txt","md","js","ts","jsx","tsx","css","scss","less","json","xml","html","htm","yaml","yml","toml","ini","cfg","conf","log","sh","bash","py","rb","go","rs","java","c","cpp","h","hpp","cs","php","sql","graphql","env","gitignore","dockerfile","readme"].includes(a)?"text":"file"}],6933)},41222,e=>{"use strict";var a=e.i(18050),t=e.i(71645),s=e.i(68590),i=e.i(30274),n=e.i(77071),l=e.i(35965),r=e.i(96699),c=e.i(63676),d=e.i(11241),o=e.i(79490),u=e.i(56420);let h=(0,u.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),p=(0,u.default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),m=(0,u.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var f=e.i(15170),x=e.i(80796),y=e.i(26091),j=e.i(62368),g=e.i(12796),v=e.i(51921);let b=(0,u.default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);var k=e.i(59665),w=e.i(11028);e.i(4121);var N=e.i(47910),C=e.i(88361),S=e.i(39626),M=e.i(26913),z=e.i(93957),$=e.i(3593),R=e.i(71192);e.i(22183);var A=e.i(5142),E=e.i(23952),F=e.i(27648),T=e.i(87884),I=e.i(6933);let U=/^[a-zA-Z0-9_-]+$/,L={async publishFile(e,a){let t=new FormData;t.append("file",e,a);let s=await M.api.post("/api/publish",{body:t});if(!s.ok)throw Error((await s.json().catch(()=>({error:s.statusText}))).error||"Request failed");return s.json()},listPublishedFiles:()=>M.api.get("/api/files").json(),downloadFile:e=>M.api.post("/api/download",{json:{link:e}}).json(),getFileDownloadUrl:e=>(0,M.getApiUrl)(`/api/files/${e}/download`)};function P(e){let a=String(e||"").split("/");return a[a.length-1]||e}e.s(["default",0,function(){let e=(0,$.useAppStore)(e=>e.isDarkMode),u=(0,$.useAppStore)(e=>e.setIsDarkMode),D=(0,$.useAppStore)(e=>e.hasBackend),q=(0,$.useAppStore)(e=>e.addToast),B=(0,$.useAppStore)(e=>e.openConnectModal),O=(0,R.useUserStore)(e=>e.identity),H=(0,R.useUserStore)(e=>e.openLoginModal),[W,K]=(0,t.useState)([]),[V,G]=(0,t.useState)(null),[J,X]=(0,t.useState)(""),[_,Q]=(0,A.useDisclosure)(!1),[Z,Y]=(0,t.useState)(""),[ee,ea]=(0,t.useState)(!1),[et,es]=(0,t.useState)(!1),[ei,en]=(0,A.useDisclosure)(!1),[el,er]=(0,t.useState)(null),[ec,ed]=(0,t.useState)(!1),[eo,eu]=(0,t.useState)(""),[eh,ep]=(0,t.useState)(null),[em,ef]=(0,t.useState)(!1),[ex,ey]=(0,t.useState)({}),ej=(0,t.useRef)(null),eg=(0,t.useRef)(null),ev=(0,t.useRef)(null),eb=(0,t.useRef)(null),ek=(0,t.useRef)(new Map),ew=!0===D,eN=(0,t.useCallback)(async(e,a)=>{q(await (0,M.getApiErrorMessage)(e,a),"error")},[q]),{clearMessages:eC,messages:eS,sendMessage:eM,syncMessages:ez}=(0,E.useChannelMessages)({isReady:ew,enabled:!!O,channelName:V?.name||"",peerId:Z,waitForPeerId:!0,onSyncError:e=>eN(e,"无法读取频道消息"),onSocketEvent:function(e,a){switch(e){case"channel:peer:online":case"channel:peer:offline":V&&T.channelApi.getChannelPeers(V.name).catch(e=>{console.warn("[Chat] Failed to fetch peers on event:",e.message)});break;case"channel:joined":case"channel:left":eE();break;case"download:success":{let e=ek.current.get(a.taskId);e&&(ek.current.delete(a.taskId),eT(e.cid),q(`${a.fileName||P(e.fileName)} 下载完成`,"success"),eF(e,a.fileName||e.fileName));break}case"download:error":case"download:cancelled":{let t=ek.current.get(a.taskId);t&&(ek.current.delete(a.taskId),eT(t.cid),q("download:cancelled"===e?"附件下载已取消":a.error||"附件下载失败","error"))}}}});function e$(){return!!ew||(B(),!1)}function eR(){return!!O||(H(),!1)}function eA(e){return e.length<3?"频道名至少 3 个字符":e.length>30?"频道名最多 30 个字符":U.test(e)?"":"频道名只能包含字母、数字、下划线和连字符"}async function eE(){if(ew)try{let e=await T.channelApi.getChannels({excludeType:"game"});K(e)}catch(e){K([]),await eN(e,"无法读取频道列表")}}function eF(e,a=e.fileName){let t=(0,I.getFileSubtype)(a);ep({cid:e.cid,fileName:a,subtype:"file"===t?e.kind:t})}function eT(e){ey(a=>{let t={...a};return delete t[e],t})}async function eI(e){!eR()||e$()&&(G(e),window.history.pushState({},"",`?channel=${encodeURIComponent(e.name)}`))}async function eU(e,a){if((a&&a.stopPropagation(),eR()&&e$())&&!et){es(!0);try{if(await T.channelApi.leaveChannel(e),V?.name===e){G(null),eC();let e=new URL(window.location.href);e.searchParams.delete("channel"),window.history.pushState({},"",e.pathname)}eE(),en.close(),er(null)}catch(e){await eN(e,"退出频道失败")}finally{es(!1)}}}async function eL(e){let a=e.trim();if(!a||ee)return;let t=eA(a);if(t)return void q(t,"error");if(eR()&&e$()){ea(!0);try{await T.channelApi.createChannel(a,"public");let e=W.find(e=>e.name===a)||{name:a,type:"public"};K(t=>t.some(e=>e.name===a)?t:[...t,e]),Q.close(),await eI(e),eE()}catch(e){await eN(e,"加入频道失败")}finally{ea(!1)}}}async function eP(e,a){if(!e.trim()||!V||!eR()||!e$())return!1;let t=e.trim();try{return await eM({channelName:V.name,content:t,author:O.address,authorName:O.displayName||O.username,attachment:a}),!0}catch(e){return await eN(e,"发送失败"),!1}}async function eD(){if(!J.trim())return;let e=J.trim();X(""),await eP(e)}async function eq(e){if(e&&0!==e.length&&V&&eR()&&e$()&&!em){ef(!0);try{for(let s of Array.from(e)){var a,t;let e=(a=V.name,t=s.name,`chat-file/${a}/${t}`),i=await L.publishFile(s,e),n=i.fileName||e,l=i.link||`most://${i.cid}?filename=${encodeURIComponent(n)}`,r={kind:s.type.startsWith("image/")?"image":s.type.startsWith("video/")?"video":s.type.startsWith("audio/")?"audio":s.type.startsWith("text/")?"text":(0,I.getFileSubtype)(n),cid:i.cid,fileName:n,link:l,mimeType:s.type||void 0,size:s.size};await eP(l,r)&&q(`${P(n)} 已发布`,"success")}}catch(e){await eN(e,"附件发送失败")}finally{ef(!1)}}}async function eB(e){if(eR()&&e$()&&!ex[e.cid])try{let a=(await L.listPublishedFiles()).find(a=>a.cid===e.cid);if(a)return void eF({...e,fileName:a.fileName},a.fileName);ey(a=>({...a,[e.cid]:"downloading"}));let t=await L.downloadFile(e.link);if(t.alreadyExists||t.fileName){eT(e.cid),eF({...e,fileName:t.fileName||e.fileName},t.fileName||e.fileName);return}t.taskId&&(ek.current.set(t.taskId,e),q("开始下载附件","success"))}catch(a){eT(e.cid),await eN(a,"附件下载失败")}}async function eO(){if(V&&eR()&&e$())try{let e=await T.channelApi.setChannelRemark(V.name,eo);K(a=>a.map(a=>a.name===V.name?{...a,remark:e.remark}:a)),G(a=>a?{...a,remark:e.remark}:null)}catch(e){await eN(e,"设置备注失败")}}(0,t.useEffect)(()=>{ej.current?.scrollIntoView({behavior:"smooth"})},[eS]),(0,t.useEffect)(()=>{ew?M.api.get("/api/node-id").json().then(e=>Y(e.id)).catch(e=>{console.warn("[Chat] Failed to fetch node ID:",e.message),eN(e,"无法读取节点 ID")}):Y("")},[ew,eN]),(0,t.useEffect)(()=>{ew&&O&&eE()},[D,ew,O?.address]),(0,t.useEffect)(()=>{V&&ew&&(ez(V.name,{replace:!0}),T.channelApi.getChannelPeers(V.name).catch(()=>{}))},[V,D,ew,ez]),(0,t.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("channel");if(e&&W.length>0){let a=W.find(a=>a.name===e);a&&(!V||V.name!==a.name)&&eI(a)}},[W,V]),(0,t.useEffect)(()=>{O||(K([]),G(null),eC(),X(""),Y(""),ed(!1),ep(null),ey({}),ek.current.clear())},[eC,O?.address]);let eH=V?(0,a.jsx)("h2",{className:"header-title",children:V.remark||V.name}):(0,a.jsx)("h2",{className:"header-title",children:"聊天"});return(0,a.jsxs)(k.default,{sidebar:({closeSidebar:e})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"sidebar-header sidebar-header-link",onClick:()=>window.location.href="/",children:[(0,a.jsx)(d.ArrowLeft,{size:18}),(0,a.jsx)("h1",{children:"MOST PEOPLE"})]}),(0,a.jsx)("nav",{className:"sidebar-nav",children:0===W.length?(0,a.jsx)("div",{className:"sidebar-empty-state",children:(0,a.jsx)("p",{children:"暂无频道"})}):W.map(t=>(0,a.jsxs)("div",{className:`sidebar-nav-btn ${V?.name===t.name?"active":""}`,onClick:()=>{eI(t),e()},role:"button",tabIndex:0,onKeyDown:a=>{"Enter"===a.key&&(eI(t),e())},children:[(0,a.jsx)(s.MessageSquare,{size:16}),(0,a.jsx)("span",{children:t.remark||t.name}),(0,a.jsx)("button",{className:"leave-channel-btn",onClick:e=>{e.stopPropagation(),er(t),en.open()},title:"退出频道",children:(0,a.jsx)(c.X,{size:14})})]},t.name))}),(0,a.jsxs)("button",{className:"create-channel-btn",onClick:()=>{eR()&&e$()&&Q.open()},children:[(0,a.jsx)(n.Plus,{size:16}),"加入频道"]}),(0,a.jsx)(F.default,{})]}),headerTitle:eH,headerRight:(0,a.jsxs)("div",{className:"header-right-actions",children:[(0,a.jsx)("button",{className:"btn btn-icon",onClick:()=>u(!e),title:"切换主题",children:e?(0,a.jsx)(l.Sun,{size:16}):(0,a.jsx)(r.Moon,{size:16})}),V&&(0,a.jsx)("button",{className:"btn btn-icon",onClick:()=>ed(!0),title:"频道设置",children:(0,a.jsx)(m,{size:16})})]}),children:[V?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"chat-messages",children:[0===eS.length?(0,a.jsxs)("div",{className:"chat-messages-empty",children:[(0,a.jsx)("div",{className:"empty-icon",children:(0,a.jsx)(s.MessageSquare,{size:28})}),(0,a.jsx)("p",{children:"暂无消息,开始聊天吧!"})]}):eS.map(e=>(0,a.jsxs)("div",{className:`chat-message ${e.author===O?.address?"self":"other"} ${e.pending?"pending":""}`,children:[(0,a.jsx)("img",{className:"msg-avatar",src:(0,z.generateAvatar)(e.author),alt:"avatar"}),(0,a.jsxs)("div",{className:"msg-content",children:[(0,a.jsx)("span",{className:"message-author",children:e.authorName||e.author?.slice(0,8)||"Unknown"}),function(e){var t,s;if(!e.attachment)return(0,a.jsx)("div",{className:"message-bubble",children:e.content});let i=e.attachment,n=ex[i.cid],l=((t=i.size)&&!(t<=0)?t<1024?`${t} B`:t<1048576?`${(t/1024).toFixed(1)} KB`:t<0x40000000?`${(t/1048576).toFixed(1)} MB`:`${(t/0x40000000).toFixed(2)} GB`:"")||"MostBox 文件";return(0,a.jsx)("div",{className:"message-bubble has-attachment",children:(0,a.jsxs)("button",{type:"button",className:"chat-attachment-card",onClick:()=>eB(i),disabled:!!(e.pending||n),title:i.link,children:[(0,a.jsx)("span",{className:`chat-attachment-icon ${i.kind}`,children:n?(0,a.jsx)(g.Loader,{size:20,className:"chat-attachment-spinner"}):"image"===(s=i.kind)?(0,a.jsx)(f.Image,{size:20}):"video"===s?(0,a.jsx)(x.Film,{size:20}):"audio"===s?(0,a.jsx)(v.Music,{size:20}):(0,a.jsx)(y.FileText,{size:20})}),(0,a.jsxs)("span",{className:"chat-attachment-info",children:[(0,a.jsx)("span",{className:"chat-attachment-name",children:P(i.fileName)}),(0,a.jsx)("span",{className:"chat-attachment-meta",children:e.pending?"发送中...":l})]}),(0,a.jsx)("span",{className:"chat-attachment-action",children:n?"下载中":(0,a.jsx)(j.Download,{size:16})})]})})}(e),(0,a.jsx)("span",{className:"message-time",children:new Date(e.timestamp).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})})]})]},e.id||`${e.author}-${e.timestamp}`)),(0,a.jsx)("div",{ref:ej})]}),(0,a.jsxs)("div",{className:"chat-input-area",children:[(0,a.jsx)("input",{ref:eg,type:"file",accept:"image/*",className:"chat-file-input",onChange:e=>{eq(e.target.files),e.currentTarget.value=""}}),(0,a.jsx)("input",{ref:ev,type:"file",accept:"video/*",className:"chat-file-input",onChange:e=>{eq(e.target.files),e.currentTarget.value=""}}),(0,a.jsx)("input",{ref:eb,type:"file",className:"chat-file-input",onChange:e=>{eq(e.target.files),e.currentTarget.value=""}}),(0,a.jsx)("button",{type:"button",className:"chat-tool-btn",onClick:()=>eg.current?.click(),disabled:!O||em,title:"发送图片",children:(0,a.jsx)(f.Image,{size:18})}),(0,a.jsx)("button",{type:"button",className:"chat-tool-btn",onClick:()=>ev.current?.click(),disabled:!O||em,title:"发送视频",children:(0,a.jsx)(x.Film,{size:18})}),(0,a.jsx)("button",{type:"button",className:"chat-tool-btn",onClick:()=>eb.current?.click(),disabled:!O||em,title:"发送文件",children:em?(0,a.jsx)(g.Loader,{size:18,className:"chat-attachment-spinner"}):(0,a.jsx)(b,{size:18})}),(0,a.jsx)("input",{type:"text",className:"input input-pill",placeholder:O?"输入消息...":"请先登录后发言",value:J,disabled:!O,onChange:e=>X(e.target.value),onKeyDown:e=>{"Enter"===e.key&&J.trim()&&eD()}}),(0,a.jsx)("button",{className:"send-btn",onClick:eD,disabled:!O||!J.trim(),children:(0,a.jsx)(i.Send,{size:18})})]})]}):(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"chat-welcome",children:[(0,a.jsx)("div",{className:"welcome-icon",children:(0,a.jsx)(s.MessageSquare,{size:36})}),(0,a.jsx)("h2",{children:"选择频道"}),(0,a.jsx)("p",{children:"从左侧边栏选择一个频道开始聊天,或创建一个新频道"}),(0,a.jsx)(S.default,{label:"打开频道列表"})]})}),_&&(0,a.jsx)(N.InputModal,{title:"加入频道",placeholder:"频道ID:3-20 位字母、数字、_ 或 -",confirmText:"加入",validate:eA,onConfirm:eL,onClose:()=>Q.close(),isLoading:ee,loadingText:"加入中..."}),ei&&el&&(0,a.jsx)(C.ConfirmModal,{title:"退出频道",message:`确定要退出频道 "${el.name}" 吗?`,confirmText:et?"退出中...":"退出",onConfirm:()=>eU(el.name,void 0),onClose:()=>{en.close(),er(null)},danger:!0}),eh&&(0,a.jsx)(w.default,{item:eh,isBackendReady:ew,getFileDownloadUrl:L.getFileDownloadUrl,onClose:()=>ep(null)}),ec&&V&&(0,a.jsx)("div",{className:"channel-detail-overlay",onClick:()=>ed(!1),children:(0,a.jsxs)("div",{className:"channel-detail-drawer",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"channel-detail-header",children:[(0,a.jsx)("h3",{children:"频道详情"}),(0,a.jsx)("button",{className:"btn btn-icon",onClick:()=>ed(!1),children:(0,a.jsx)(c.X,{size:18})})]}),(0,a.jsxs)("div",{className:"channel-detail-body",children:[(0,a.jsxs)("div",{className:"channel-detail-section",children:[(0,a.jsxs)("div",{className:"channel-detail-label",children:[(0,a.jsx)(p,{size:14}),(0,a.jsx)("span",{children:"频道 ID"})]}),(0,a.jsx)("div",{className:"channel-detail-value channel-detail-mono",children:V.name})]}),(0,a.jsxs)("div",{className:"channel-detail-section",children:[(0,a.jsxs)("div",{className:"channel-detail-label",children:[(0,a.jsx)(o.Edit2,{size:14}),(0,a.jsx)("span",{children:"备注名称"})]}),(0,a.jsx)("input",{type:"text",className:"input input-compact",placeholder:"输入备注名称",value:eo,onChange:e=>eu(e.target.value),onFocus:()=>eu(V.remark||""),onBlur:()=>eO(),onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()},maxLength:50})]}),(0,a.jsxs)("div",{className:"channel-detail-section",children:[(0,a.jsxs)("div",{className:"channel-detail-label",children:[(0,a.jsx)(h,{size:14}),(0,a.jsx)("span",{children:"创建时间"})]}),(0,a.jsx)("div",{className:"channel-detail-value",children:V.createdAt?new Date(V.createdAt).toLocaleDateString("zh-CN"):"-"})]})]}),(0,a.jsx)("div",{className:"channel-detail-footer",children:(0,a.jsx)("button",{className:"btn btn-danger btn-block",onClick:()=>{ed(!1),er(V),en.open()},children:"退出频道"})})]})})]})}],41222)}]);
@@ -0,0 +1 @@
1
+ .portal-page{min-height:calc(100dvh - 144px)}.portal-hero{text-align:center;padding:64px 24px 32px}.portal-hero-title{letter-spacing:-.03em;background:linear-gradient(135deg, var(--text-primary), var(--accent));-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text;margin-bottom:8px;font-size:48px;font-weight:700;line-height:1.1}.portal-hero-subtitle{color:var(--text-secondary);font-size:18px}@media (max-width:768px){.portal-hero{padding:40px 24px 24px}.portal-hero-title{font-size:36px}.portal-hero-subtitle{font-size:16px}}.portal-cards-section{padding-bottom:32px}.portal-cards{grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;display:grid}@media (max-width:1100px){.portal-cards{grid-template-columns:repeat(3,1fr)}}@media (max-width:768px){.portal-cards{grid-template-columns:1fr}}.portal-card{text-align:center;background:var(--glass-bg-subtle);-webkit-backdrop-filter:var(--blur-sm);border:1px solid var(--glass-border);border-radius:var(--radius-lg);cursor:pointer;transition:all var(--transition);border:2px solid #0000;flex-direction:column;align-items:center;gap:6px;padding:28px 20px;display:flex;position:relative}.portal-card:hover{background:var(--glass-bg);box-shadow:var(--glass-shadow);transform:translateY(-2px)}.portal-card.active{background:var(--glass-bg);border-color:var(--accent);box-shadow:0 4px 24px #5e6ad226}.portal-card-open-btn{opacity:.5;position:absolute;top:12px;right:12px}.portal-card:hover .portal-card-open-btn,.portal-card.active .portal-card-open-btn{opacity:1}.portal-card-icon{color:var(--accent);margin-bottom:4px}.portal-card-title{color:var(--text-primary);font-size:17px;font-weight:600}.portal-card-subtitle{color:var(--text-secondary);font-size:13px}.portal-node-actions{flex-wrap:wrap;justify-content:center;gap:12px;margin-top:18px;display:flex}.portal-node-actions .btn{min-width:128px}.portal-card-status{border-radius:var(--radius-full);background:var(--glass-bg-subtle);border:1px solid var(--glass-border);align-items:center;gap:5px;margin-top:6px;padding:3px 10px;font-size:11px;font-weight:500;display:inline-flex}.status-dot{border-radius:50%;width:7px;height:7px;display:inline-block}.status-dot.checking{background:var(--warning);animation:1.2s ease-in-out infinite pulse-dot}.status-dot.connected{background:var(--success)}.status-dot.disconnected{background:var(--danger)}.status-dot.ready{background:var(--info)}@keyframes pulse-dot{0%,to{opacity:.4;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.portal-marketing{padding-bottom:64px}.portal-marketing-inner{background:var(--glass-bg-subtle);-webkit-backdrop-filter:var(--blur-sm);border:1px solid var(--glass-border);border-radius:var(--radius-lg);padding:40px;animation:.3s ease-out fadeInUp}@media (max-width:768px){.portal-marketing-inner{padding:24px}}.portal-marketing-header h2{margin-bottom:12px;font-size:28px;font-weight:600}.portal-marketing-header p{color:var(--text-secondary);max-width:60ch;font-size:16px;line-height:1.7}@media (max-width:768px){.portal-marketing-header h2{font-size:22px}.portal-marketing-header p{font-size:14px}}.portal-marketing-features{grid-template-columns:repeat(2,1fr);gap:12px;margin-top:28px;display:grid}@media (max-width:768px){.portal-marketing-features{grid-template-columns:1fr}}.portal-feature-item{color:var(--text-secondary);align-items:flex-start;gap:10px;font-size:14px;line-height:1.5;display:flex}.portal-feature-icon{color:var(--accent);flex-shrink:0;margin-top:1px}.portal-marketing-steps{border-top:1px solid var(--glass-border);flex-direction:column;gap:16px;margin-top:32px;padding-top:32px;display:flex}.portal-step{align-items:flex-start;gap:14px;display:flex}.portal-step-num{background:var(--accent);color:#fff;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:32px;height:32px;font-size:13px;font-weight:700;display:flex}.portal-step-content strong{color:var(--text-primary);font-size:15px;font-weight:600}.portal-step-content p{color:var(--text-secondary);margin-top:2px;font-size:13px}.portal-step-code{background:var(--glass-bg-subtle);border:1px solid var(--glass-border);border-radius:var(--radius-sm);font-size:13px;font-family:var(--font-mono);color:var(--text-primary);margin-top:8px;padding:10px 14px;display:block}.portal-step-link{margin-top:6px}.portal-step-link a{color:var(--accent);align-items:center;gap:4px;font-size:13px;display:inline-flex}.portal-actions{border-top:1px solid var(--glass-border);flex-wrap:wrap;gap:12px;margin-top:32px;padding-top:32px;display:flex}.portal-actions .mkt-btn-primary,.portal-actions .mkt-btn-secondary{align-items:center;gap:6px;display:inline-flex}
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96661,5014,e=>{"use strict";let t=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();e.s(["mergeClasses",0,t],96661);var r=e.i(71645),l={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"};let i=(0,r.createContext)({}),a=(0,r.forwardRef)(({color:e,size:a,strokeWidth:n,absoluteStrokeWidth:o,className:s="",children:c,iconNode:d,...u},h)=>{let{size:f=24,strokeWidth:m=2,absoluteStrokeWidth:g=!1,color:p="currentColor",className:y=""}=(0,r.useContext)(i)??{},w=o??g?24*Number(n??m)/Number(a??f):n??m;return(0,r.createElement)("svg",{ref:h,...l,width:a??f??l.width,height:a??f??l.height,stroke:e??p,strokeWidth:w,className:t("lucide",y,s),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(u)&&{"aria-hidden":"true"},...u},[...d.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(c)?c:[c]])});e.s(["default",0,a],5014)},56420,e=>{"use strict";var t=e.i(71645),r=e.i(96661);let l=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var i=e.i(5014);e.s(["default",0,(e,a)=>{let n=(0,t.forwardRef)(({className:n,...o},s)=>(0,t.createElement)(i.default,{ref:s,iconNode:a,className:(0,r.mergeClasses)(`lucide-${l(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...o}));return n.displayName=l(e),n}],56420)},62368,e=>{"use strict";let t=(0,e.i(56420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],62368)},71192,e=>{"use strict";var t=e.i(68834),r=e.i(66112);function l(e,t){let{address:l,danger:i}=(0,r.mostWallet)(e,t);return{username:e,address:l,danger:i,displayName:`${e}#${l.slice(-4).toUpperCase()}`}}function i(e){"u">typeof localStorage&&localStorage.setItem("mostbox_identity",JSON.stringify(e))}function a(){"u">typeof localStorage&&(localStorage.removeItem("mostbox_identity"),localStorage.removeItem("mostbox_guest_identity"))}function n(e){return e&&"object"==typeof e&&e.username&&e.address&&e.danger&&"匿名"!==e.username?{username:e.username,address:e.address,danger:e.danger,displayName:e.displayName?e.displayName:`${e.username}#${e.address.slice(-4).toUpperCase()}`}:null}function o(){return{loginUsername:"",loginPassword:"",showPassword:!1,loginPreviewAddress:"",hasPreviewedAvatar:!1,loginLoading:!1,loginError:""}}let s=(0,t.create)((e,t)=>({identity:null,wallet:void 0,showLoginModal:!1,loginUsername:"",loginPassword:"",showPassword:!1,loginPreviewAddress:"",hasPreviewedAvatar:!1,loginLoading:!1,loginError:"",initializeUser:()=>{let t=n(function(){if("u"<typeof localStorage)return null;try{let e=localStorage.getItem("mostbox_identity");if(!e)return null;return JSON.parse(e)}catch{return null}}());t||a(),e({identity:t,wallet:t||void 0})},openLoginModal:()=>{e({showLoginModal:!0,loginError:""})},closeLoginModal:()=>{e({showLoginModal:!1,...o()})},setLoginUsername:t=>{e({loginUsername:t,loginPreviewAddress:"",hasPreviewedAvatar:!1,loginError:""})},setLoginPassword:t=>{e({loginPassword:t,loginPreviewAddress:"",hasPreviewedAvatar:!1,loginError:""})},togglePassword:()=>{e(e=>({showPassword:!e.showPassword}))},previewLoginIdentity:()=>{let{loginUsername:r,loginPassword:i}=t();if(!r.trim()||!i.trim())return e({loginError:"请输入用户名和密码"}),null;let a=l(r.trim(),i);return e({loginPreviewAddress:a.address,hasPreviewedAvatar:!0,loginError:""}),a},loginUser:()=>{let{loginUsername:r,loginPassword:a,hasPreviewedAvatar:n}=t();if(!r.trim()||!a.trim())return e({loginError:"请输入用户名和密码"}),null;if(!n)return e({loginError:"请先预览并确认头像"}),null;e({loginLoading:!0,loginError:""});try{let t=l(r.trim(),a);return i(t),e({identity:t,wallet:t,showLoginModal:!1,...o()}),t}catch(t){return e({loginLoading:!1,loginError:t instanceof Error?t.message:"登录失败"}),null}},setUserIdentity:t=>{let r=n(t);r&&(i(r),e({identity:r,wallet:r}))},logoutUser:()=>{a(),e({identity:null,wallet:void 0})}}));e.s(["useUserStore",0,s],71192)},67228,7881,49401,5142,40924,81317,8382,11239,e=>{"use strict";var t=e.i(71645);function r(e,r,l){let i=(0,t.useEffectEvent)(r);(0,t.useEffect)(()=>(window.addEventListener(e,i,l),()=>window.removeEventListener(e,i,l)),[e])}e.s(["useMediaQuery",0,function(e,r,{getInitialValueInEffect:l}={getInitialValueInEffect:!0}){let[i,a]=(0,t.useState)(l?r:!!("u">typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches);return(0,t.useEffect)(()=>{try{if("matchMedia"in window){let t=window.matchMedia(e);a(t.matches);let r=e=>a(e.matches);return t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}}}catch(e){return}},[e]),i||!1}],67228),e.s(["useWindowEvent",0,r],7881);let l={passive:!0};function i(e){try{return e&&JSON.parse(e)}catch{return e}}function a(e){return{getItem:t=>{try{return window[e].getItem(t)}catch(e){return console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked"),null}},setItem:(t,r)=>{try{window[e].setItem(t,r)}catch(e){console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}},removeItem:t=>{try{window[e].removeItem(t)}catch(e){console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}}}}e.s(["useViewportSize",0,function(){let[e,i]=(0,t.useState)({width:0,height:0}),a=(0,t.useCallback)(()=>{i({width:window.innerWidth||0,height:window.innerHeight||0})},[]);return r("resize",a,l),r("orientationchange",a,l),(0,t.useEffect)(a,[]),e}],49401),e.s(["useDisclosure",0,function(e=!1,r={}){let[l,i]=(0,t.useState)(e),a=(0,t.useCallback)(()=>{i(e=>e||(r.onOpen?.(),!0))},[r.onOpen]),n=(0,t.useCallback)(()=>{i(e=>e?(r.onClose?.(),!1):e)},[r.onClose]);return[l,{open:a,close:n,toggle:(0,t.useCallback)(()=>{l?n():a()},[n,a,l]),set:i}]}],5142),!function(e){let{getItem:t}=a(e)}("localStorage"),e.s(["useLocalStorage",0,function(e){return(function(e,l){let n="localStorage"===e?"mantine-local-storage":"mantine-session-storage",{getItem:o,setItem:s,removeItem:c}=a(e);return function({key:a,defaultValue:d,getInitialValueInEffect:u=!0,sync:h=!0,deserialize:f=i,serialize:m=e=>(function(e,t="use-local-storage"){try{return JSON.stringify(e)}catch(e){throw Error(`@mantine/hooks ${t}: Failed to serialize the value`)}})(e,l)}){let g=(0,t.useCallback)(t=>{let r;try{r="u"<typeof window||!(e in window)||null===window[e]||!!t}catch(e){r=!0}if(r)return d;let l=o(a);return null!==l?f(l):d},[a,d]),[p,y]=(0,t.useState)(g(u)),w=(0,t.useCallback)(e=>{e instanceof Function?y(t=>{let r=e(t);return s(a,m(r)),queueMicrotask(()=>{window.dispatchEvent(new CustomEvent(n,{detail:{key:a,value:r}}))}),r}):(s(a,m(e)),window.dispatchEvent(new CustomEvent(n,{detail:{key:a,value:e}})),y(e))},[a]),v=(0,t.useCallback)(()=>{c(a),y(d),window.dispatchEvent(new CustomEvent(n,{detail:{key:a,value:d}}))},[a,d]);return r("storage",t=>{h&&t.storageArea===window[e]&&t.key===a&&y(f(t.newValue??void 0))}),r(n,e=>{h&&e.detail.key===a&&y(e.detail.value)}),(0,t.useEffect)(()=>{void 0!==d&&void 0===p&&w(d)},[d,p,w]),(0,t.useEffect)(()=>{let e=g();void 0!==e&&w(e)},[a]),[void 0===p?d:p,w,v]}})("localStorage","use-local-storage")(e)}],40924),e.s(["useClipboard",0,function(e={}){let r=e.timeout??2e3,[l,i]=(0,t.useState)(null),[a,n]=(0,t.useState)(!1),o=(0,t.useRef)(null);return(0,t.useEffect)(()=>()=>{window.clearTimeout(o.current)},[]),{copy:e=>{"clipboard"in navigator?navigator.clipboard.writeText(e).then(()=>{i(null),window.clearTimeout(o.current),o.current=window.setTimeout(()=>n(!1),r),n(!0)}).catch(e=>i(e)):i(Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{n(!1),i(null),window.clearTimeout(o.current)},error:l,copied:a}}],81317);let n={" ":"space",ArrowLeft:"arrowleft",ArrowRight:"arrowright",ArrowUp:"arrowup",ArrowDown:"arrowdown",Escape:"escape",Esc:"escape",esc:"escape",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",Insert:"insert",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown","+":"plus","-":"minus","*":"asterisk","/":"slash"};function o(e){let t=e.replace("Key","").toLowerCase();return n[e]||t}e.s(["useHotkeys",0,function(e,r=["INPUT","TEXTAREA","SELECT"],l=!1){let i=(0,t.useEffectEvent)(t=>{e.forEach(([e,i,a={preventDefault:!0,usePhysicalKeys:!1}])=>{var n;(n=a.usePhysicalKeys,t=>{let r,l,i,a;return function(e,t,r){let{alt:l,ctrl:i,meta:a,mod:n,shift:s,key:c}=e,{altKey:d,ctrlKey:u,metaKey:h,shiftKey:f,key:m,code:g}=t;if(l!==d)return!1;if(n){if(!u&&!h)return!1}else if(i!==u||a!==h)return!1;return s===f&&!!c&&(r?o(g)===o(c):o(m??g)===o(c))}((l={alt:(r=e.toLowerCase().split("+").map(e=>e.trim())).includes("alt"),ctrl:r.includes("ctrl"),meta:r.includes("meta"),mod:r.includes("mod"),shift:r.includes("shift")},i=["alt","ctrl","meta","shift","mod"],a=r.find(e=>!i.includes(e)),{...l,key:"[plus]"===a?"+":a}),t,n)})(t)&&function(e,t,r=!1){return!(e.target instanceof HTMLElement)||(r?!t.includes(e.target.tagName):!e.target.isContentEditable&&!t.includes(e.target.tagName))}(t,r,l)&&(a.preventDefault&&t.preventDefault(),i(t))})});(0,t.useEffect)(()=>(document.documentElement.addEventListener("keydown",i),()=>document.documentElement.removeEventListener("keydown",i)),[])}],8382),e.s(["useToggle",0,function(e=[!1,!0]){let[[r],l]=(0,t.useReducer)((e,t)=>{let r=t instanceof Function?t(e[0]):t,l=Math.abs(e.indexOf(r));return e.slice(l).concat(e.slice(0,l))},e);return[r,l]}],11239)},22183,e=>{"use strict";e.i(67228),e.i(49401),e.i(5142),e.i(40924),e.i(81317),e.i(8382),e.i(11239),e.i(7881),e.i(71645),e.i(3593),e.i(71192),e.s([],22183)},93957,e=>{"use strict";function t(e){return e.replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(e){return e^=e<<13,e^=e>>17,e^=e<<5}function l(e=""){let t=function(e){let t=0;for(let l=0;l<e.length;l++)t=r(t=(t<<5)-t+e.charCodeAt(l)|0);return t}(e=e.toString().slice(0,1024))||1,i=()=>t=r(t),a=(e,t)=>Math.floor((i()- -0x80000000)/0xffffffff*(t+1-e)+e);return{seed:e,next:i,bool:(e=50)=>a(1,100)<=e,integer:(e,t)=>a(e,t),pick(e,t){var r;return 0===e.length?(i(),t):null!=(r=e[a(0,e.length-1)])?r:t},shuffle(e){let t=l(i().toString()),r=[...e];for(let e=r.length-1;e>0;e--){let l=t.integer(0,e);[r[e],r[l]]=[r[l],r[e]]}return r},string(e,t="abcdefghijklmnopqrstuvwxyz1234567890"){let r=l(i().toString()),a="";for(let l=0;l<e;l++)a+=t[r.integer(0,t.length-1)];return a}}}function i(e){let t=e.attributes.viewBox.split(" "),r=parseInt(t[0]),l=parseInt(t[1]);return{x:r,y:l,width:parseInt(t[2]),height:parseInt(t[3])}}let a={type:"object",$schema:"http://json-schema.org/draft-07/schema#",properties:{seed:{type:"string"},flip:{type:"boolean",default:!1},rotate:{type:"integer",minimum:0,maximum:360,default:0},scale:{type:"integer",minimum:0,maximum:200,default:100},radius:{type:"integer",minimum:0,maximum:50,default:0},size:{type:"integer",minimum:1},backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"}},backgroundType:{type:"array",items:{type:"string",enum:["solid","gradientLinear"]},default:["solid"]},backgroundRotation:{type:"array",items:{type:"integer",minimum:-360,maximum:360},default:[0,360]},translateX:{type:"integer",minimum:-100,maximum:100,default:0},translateY:{type:"integer",minimum:-100,maximum:100,default:0},clip:{type:"boolean",default:!0},randomizeIds:{type:"boolean",default:!1}}};function n(e){var t;let r={},l=null!=(t=e.properties)?t:{};return Object.keys(l).forEach(e=>{let t=l[e];"object"==typeof t&&void 0!==t.default&&(Array.isArray(t.default)?r[e]=[...t.default]:"object"==typeof t.default?r[e]={...t.default}:r[e]=t.default)}),r}function o(e){return"transparent"===e?e:`#${e}`}e.s([],95706),e.i(95706),e.s(["eyes",0,{bulging:(e,t)=>'<circle cx="28" cy="24" r="18" fill="#000" fill-opacity=".2"/><circle cx="74" cy="24" r="18" fill="#000" fill-opacity=".2"/><circle cx="28" cy="24" r="15" fill="#F1EEDA"/><circle cx="74" cy="24" r="15" fill="#F1EEDA"/><rect x="26" y="15" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/><rect x="74" y="15" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/>',dizzy:(e,t)=>'<path d="m25 27.2 5.5 5.5c.5.4 1.2.4 1.6 0l1.6-1.6c.4-.5.4-1.2 0-1.6L28.2 24l5.5-5.5c.4-.5.4-1.2 0-1.6l-1.6-1.6c-.5-.4-1.2-.4-1.6 0L25 20.8l-5.5-5.5c-.5-.4-1.2-.4-1.6 0l-1.6 1.6c-.4.4-.4 1.1 0 1.6l5.5 5.5-5.5 5.5c-.4.5-.4 1.2 0 1.6l1.6 1.6c.5.4 1.2.4 1.6 0l5.5-5.5ZM79 27.2l5.5 5.5c.5.4 1.2.4 1.6 0l1.6-1.6c.4-.5.4-1.2 0-1.6L82.2 24l5.5-5.5c.4-.5.4-1.2 0-1.6l-1.6-1.6c-.5-.4-1.2-.4-1.6 0L79 20.8l-5.5-5.5c-.5-.4-1.2-.4-1.6 0l-1.6 1.6c-.4.4-.4 1.1 0 1.6l5.5 5.5-5.5 5.5c-.4.5-.4 1.2 0 1.6l1.6 1.6c.5.4 1.2.4 1.6 0l5.5-5.5Z" fill="#000" fill-opacity=".8"/>',eva:(e,t)=>'<g fill-rule="evenodd" clip-rule="evenodd"><path d="M53 0c34.75 0 49 17.47 49 31 0 13.53-19.59 17-49 17-29.05 0-51-3.47-51-17S17.11 0 53 0Z" fill="#000" fill-opacity=".8"/><path d="M28.82 34.65c-6.53-1.35-11.24-6.34-10.52-11.14.72-4.79 6.6-7.58 13.12-6.23 6.53 1.36 11.24 6.35 10.52 11.15-.72 4.8-6.6 7.59-13.12 6.23ZM75.42 34.65c-6.52 1.36-12.4-1.43-13.12-6.23-.72-4.8 4-9.8 10.52-11.15 6.52-1.35 12.4 1.44 13.12 6.24.72 4.81-4 9.8-10.52 11.15Z" fill="#25A6F5"/></g>',frame1:(e,t)=>'<rect y="4" width="104" height="42" rx="4" fill="#000" fill-opacity=".8"/><rect x="28" y="25" width="10" height="11" rx="2" fill="#8BDDFF"/><rect x="66" y="25" width="10" height="11" rx="2" fill="#8BDDFF"/><path fill-rule="evenodd" clip-rule="evenodd" d="M21 4h8L12 46H4L21 4Z" fill="#fff" fill-opacity=".4"/>',frame2:(e,t)=>'<rect x="8" y="10" width="88" height="36" rx="4" fill="#000" fill-opacity=".8"/><rect x="28" y="21" width="10" height="17" rx="2" fill="#5EF2B8"/><rect x="66" y="21" width="10" height="17" rx="2" fill="#5EF2B8"/><path fill-rule="evenodd" clip-rule="evenodd" d="M83 10h5L76 46h-5l12-36Z" fill="#fff" fill-opacity=".4"/>',glow:(e,t)=>'<g fill="#fff"><circle cx="21" cy="30" r="15" fill-opacity=".1"/><circle cx="83" cy="30" r="15" fill-opacity=".1"/><circle cx="21" cy="30" r="12" fill-opacity=".1"/><circle cx="83" cy="30" r="12" fill-opacity=".1"/><circle cx="21" cy="30" r="6" fill-opacity=".8"/><circle cx="83" cy="30" r="6" fill-opacity=".8"/><circle cx="21" cy="30" r="3" fill-opacity=".8"/><circle cx="83" cy="30" r="3" fill-opacity=".8"/></g>',happy:(e,t)=>'<path d="m18 19 12-2M20 31c0-3.31 2.9-6 7-6 3.1 0 6 2.69 6 6M86 20l-12-3M84 31c0-3.31-2.9-6-6-6-4.1 0-7 2.69-7 6" stroke="#000" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>',hearts:(e,t)=>'<path d="M29.27 9.68c-2.55.13-4.96 2.24-6.25 4.15-1.48-1.76-4.1-3.6-6.65-3.47-5.48.28-8.85 3.8-8.63 8.1.3 5.72 4.88 8.89 9.7 12.24 1.71 1.15 5 4.15 5.42 4.82.42.67 2.14.6 2.58-.13a37.8 37.8 0 0 1 4.9-5.36c4.43-3.84 8.66-7.47 8.36-13.2-.23-4.3-3.95-7.44-9.43-7.15ZM87.63 10.36c-2.55-.14-5.17 1.7-6.65 3.47-1.3-1.9-3.7-4.02-6.25-4.15-5.48-.29-9.2 2.86-9.43 7.16-.3 5.72 3.93 9.35 8.36 13.19 1.6 1.32 4.55 4.64 4.9 5.36.35.7 2.06.82 2.58.13.51-.7 3.7-3.67 5.42-4.82 4.81-3.35 9.4-6.52 9.7-12.24.22-4.3-3.15-7.82-8.63-8.1Z" fill="#FF5353" fill-opacity=".8"/>',robocop:(e,t)=>'<rect x="7" y="16" width="91" height="16" rx="4" fill="#000" fill-opacity=".8"/><mask id="eyesRobocop-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="7" y="16" width="91" height="16"><rect x="7" y="16" width="91" height="16" rx="4" fill="#fff"/></mask><g mask="url(#eyesRobocop-a)" fill-rule="evenodd" clip-rule="evenodd" fill="#fff" fill-opacity=".8"><path d="M76 7h18L82 37H64L76 7ZM52 7h9L49 37h-9L52 7Z"/></g>',round:(e,t)=>'<g fill="#fff"><circle cx="24" cy="30" r="6"/><circle cx="80" cy="30" r="6"/></g>',roundFrame01:(e,t)=>'<rect y="12" width="104" height="32" rx="16" fill="#000" fill-opacity=".8"/><rect x="24" y="22" width="10" height="12" rx="2" fill="#F4F4F4"/><rect x="70" y="22" width="10" height="12" rx="2" fill="#F4F4F4"/>',roundFrame02:(e,t)=>'<rect y="11" width="104" height="34" rx="17" fill="#000" fill-opacity=".8"/><circle cx="29" cy="28" r="13" fill="#F1EEDA"/><circle cx="75" cy="28" r="13" fill="#F1EEDA"/><rect x="24" y="23" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/><rect x="70" y="23" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/>',sensor:(e,t)=>'<path d="M28 44a20 20 0 0 0 19.9-18h41.52a5 5 0 1 0 0-4H47.9A20 20 0 1 0 28 44Z" fill="#000" fill-opacity=".2"/><circle cx="94" cy="24" r="2" fill="#fff"/><circle cx="28" cy="24" r="16" fill="#000" fill-opacity=".6"/><circle cx="34" cy="16" r="3" fill="#fff"/>',shade01:(e,t)=>'<path d="M96 2H8c-4.5 0-8 3.5-8 8.03V28c0 4.5 3.5 8 8 8h13c8 0 11 8 18 8h27c7 0 9-8 17-8h13c4.5 0 8-3.5 8-8V10c0-4.5-3.5-8-8-8Z" fill="#000" fill-opacity=".8"/><path d="M87 14H17c-3.5 0-5 3-5 5v2c0 2 1.5 5 5 5h12c6 0 11.62 8 17 8h14c5.38 0 9-8 15-8h12c3.5 0 5-3 5-5v-2c0-2-1.5-5-5-5Z" fill="#FF3D3D"/><path d="M22.44 36.09 37.26 2h11L31.4 40.78l-.76-.58c-2.38-1.82-4.83-3.69-8.2-4.11ZM11.48 36 26.26 2h4L15.48 36h-4Z" fill="#fff" fill-opacity=".2"/>'},"mouth",0,{bite:(e,t)=>'<rect x="4" y="5" width="68" height="22" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="9" width="60" height="14" rx="2" fill="#000" fill-opacity=".6"/><path fill-rule="evenodd" clip-rule="evenodd" d="m20 17 6-8H14l6 8ZM32 17l6-8H26l6 8ZM44 17l6-8H38l6 8ZM56 17l6-8H50l6 8Z" fill="#E1E6E8"/>',diagram:(e,t)=>'<rect x="4" y="4" width="68" height="24" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="8" width="60" height="16" rx="2" fill="#000" fill-opacity=".8"/><path d="M9 17h11l2-4 3 7 4-8 2 9 3-11 3 10 3-3h15l3-4 2 7 3-3h4" stroke="#4EFAC9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',grill01:(e,t)=>'<g fill="#000" fill-opacity=".6"><rect x="12" y="12" width="4" height="8" rx="2"/><rect x="36" y="12" width="4" height="8" rx="2"/><rect x="24" y="12" width="4" height="8" rx="2"/><rect x="48" y="12" width="4" height="8" rx="2"/><rect x="60" y="12" width="4" height="8" rx="2"/></g>',grill02:(e,t)=>'<g fill="#000" fill-opacity=".6"><rect x="28" y="10" width="6" height="14" rx="2"/><rect x="14" y="10" width="6" height="14" rx="2"/><rect x="42" y="10" width="6" height="14" rx="2"/><rect x="56" y="10" width="6" height="14" rx="2"/></g>',grill03:(e,t)=>'<rect x="4" y="5" width="68" height="22" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="9" width="60" height="14" rx="2" fill="#fff"/><path fill="#000" fill-opacity=".1" d="M18 9h4v14h-4zM42 9h4v14h-4zM30 9h4v14h-4zM54 9h4v14h-4z"/>',smile01:(e,t)=>'<path d="M27.05 8.44a2 2 0 1 1 3.9-.88C31.72 10.96 34.4 13 38 13c3.6 0 6.28-2.04 7.05-5.44a2 2 0 1 1 3.9.88C47.75 13.7 43.43 17 38 17s-9.76-3.3-10.95-8.56Z" fill="#000" fill-opacity=".6"/>',smile02:(e,t)=>'<path fill-rule="evenodd" clip-rule="evenodd" d="M18 10.22C18 21.78 24.47 28 38 28c13.52 0 20-6.34 20-17.78C58 9.5 57.17 8 55 8H21c-2.05 0-3 1.38-3 2.22Z" fill="#000" fill-opacity=".8"/><mask id="mouthSmile02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="18" y="8" width="40" height="20"><path fill-rule="evenodd" clip-rule="evenodd" d="M18 10.22C18 21.78 24.47 28 38 28c13.52 0 20-6.34 20-17.78C58 9.5 57.17 8 55 8H21c-2.05 0-3 1.38-3 2.22Z" fill="#fff"/></mask><g mask="url(#mouthSmile02-a)"><rect x="30" y="2" width="16" height="14" rx="2" fill="#fff"/></g>',square01:(e,t)=>'<rect x="24" y="6" width="27" height="8" rx="4" fill="#000" fill-opacity=".8"/>',square02:(e,t)=>'<rect x="16" y="8" width="44" height="4" rx="2" fill="#000" fill-opacity=".8"/>'}],23855);var s=e.i(23855);function c({prng:e,group:t,values:r=[]}){let l=e.pick(r);return l&&s[t][l]?{name:l,value:s[t][l]}:void 0}let d={title:"Bottts",creator:"Pablo Stanley",source:"https://bottts.com/",homepage:"https://twitter.com/pablostanley",license:{name:"Free for personal and commercial use",url:"https://bottts.com/"}},u=({prng:e,options:t})=>{var r,l,i,a;let n=function({prng:e,options:t}){return{mouth:c({prng:e,group:"mouth",values:t.mouth}),eyes:c({prng:e,group:"eyes",values:t.eyes})}}({prng:e,options:t}),o=function({prng:e,options:t}){return{}}({prng:e,options:t});return{attributes:{viewBox:"0 0 120 120",fill:"none","shape-rendering":"auto"},body:`<g transform="translate(22 68)">${null!=(l=null==(r=n.mouth)?void 0:r.value(n,o))?l:""}</g><g transform="translate(8 20)">${null!=(a=null==(i=n.eyes)?void 0:i.value(n,o))?a:""}</g>`,extra:()=>({...Object.entries(n).reduce((e,[t,r])=>(e[t]=null==r?void 0:r.name,e),{}),...Object.entries(o).reduce((e,[t,r])=>(e[`${t}Color`]=r,e),{})})}};e.s(["create",0,u,"meta",0,d],17022),e.i(17022),e.s(["create",0,u,"meta",0,d,"schema",0,{$schema:"http://json-schema.org/draft-07/schema#",properties:{backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["ffb300","1e88e5","546e7a","6d4c41","00acc1","f4511e","5e35b1","43a047","757575","3949ab","039be5","7cb342","c0ca33","fb8c00","d81b60","8e24aa","e53935","00897b","fdd835"]},eyes:{type:"array",items:{type:"string",enum:["bulging","dizzy","eva","frame1","frame2","glow","happy","hearts","robocop","round","roundFrame01","roundFrame02","sensor","shade01"]},default:["bulging","dizzy","eva","frame1","frame2","glow","happy","hearts","robocop","round","roundFrame01","roundFrame02","sensor","shade01"]},mouth:{type:"array",items:{type:"string",enum:["bite","diagram","grill01","grill02","grill03","smile01","smile02","square01","square02"]},default:["bite","diagram","grill01","grill02","grill03","smile01","smile02","square01","square02"]}}}],13161);var h=e.i(13161),h=h;e.s(["generateAvatar",0,function(e){return e?(function(e,r={}){var s,c,d,u,h,f,m,g,p,y,w,v,x,b,k,E,$,M,C,L,S,j,F,A,N,P,z,U,D,I,T,Z,O,R;let H,B,q,W,X,_,J,V,K,Y,G,Q,ee,et,er,el,ei;f=r;let ea=l((r=JSON.parse(JSON.stringify({...n(a),...n(null!=(m=e.schema)?m:{}),...f}))).seed),en=e.create({prng:ea,options:r}),eo=ea.pick(null!=(s=r.backgroundType)?s:[],"solid"),{primary:es,secondary:ec}=(g=null!=(c=r.backgroundColor)?c:[],(H=ea.shuffle(g)).length<=1||2==g.length&&"gradientLinear"==eo?(H=g,ea.next()):H=ea.shuffle(g),0===H.length&&(H=["transparent"]),B=H[0],q=null!=(p=H[1])?p:H[0],{primary:o(B),secondary:o(q)}),ed=ea.integer((null==(d=r.backgroundRotation)?void 0:d.length)?Math.min(...r.backgroundRotation):0,(null==(u=r.backgroundRotation)?void 0:u.length)?Math.max(...r.backgroundRotation):0);r.size&&(en.attributes.width=r.size.toString(),en.attributes.height=r.size.toString()),void 0!==r.scale&&100!==r.scale&&(en.body=function(e,t){let{width:r,height:l,x:a,y:n}=i(e),o=t?(t-100)/100:0;return`<g transform="translate(${-((r/2+a)*o*1)} ${-((l/2+n)*o*1)}) scale(${t/100})">${e.body}</g>`}(en,r.scale)),r.flip&&(en.body=function(e){let{width:t,x:r}=i(e);return`<g transform="scale(-1 1) translate(${-1*t-2*r} 0)">${e.body}</g>`}(en)),r.rotate&&(en.body=function(e,t){let{width:r,height:l,x:a,y:n}=i(e);return`<g transform="rotate(${t}, ${r/2+a}, ${l/2+n})">${e.body}</g>`}(en,r.rotate)),(r.translateX||r.translateY)&&(y=r.translateX,w=r.translateY,X=((W=i(en)).width+2*W.x)*((null!=y?y:0)/100),_=(W.height+2*W.y)*((null!=w?w:0)/100),en.body=`<g transform="translate(${X} ${_})">${en.body}</g>`),"transparent"!==es&&"transparent"!==ec&&(en.body=function(e,r,l,a,n){let{width:o,height:s,x:c,y:d}=i(e),u=`<rect fill="${t(r)}" width="${o}" height="${s}" x="${c}" y="${d}" />`;switch(a){case"solid":return u+e.body;case"gradientLinear":return`<rect fill="url(#backgroundLinear)" width="${o}" height="${s}" x="${c}" y="${d}" /><defs><linearGradient id="backgroundLinear" gradientTransform="rotate(${n} 0.5 0.5)"><stop stop-color="${t(r)}"/><stop offset="1" stop-color="${t(l)}"/></linearGradient></defs>`+e.body}}(en,es,ec,eo,ed)),(r.radius||r.clip)&&(en.body=function(e,t){let{width:r,height:l,x:a,y:n}=i(e);return`<mask id="viewboxMask"><rect width="${r}" height="${l}" rx="${t?r*t/100:0}" ry="${t?l*t/100:0}" x="${a}" y="${n}" fill="#fff" /></mask><g mask="url(#viewboxMask)">${e.body}</g>`}(en,null!=(h=r.radius)?h:0)),r.randomizeIds&&(J=l(Math.random().toString()),V={},en.body=en.body.replace(/(id="|url\(#)([a-z0-9-_]+)([")])/gi,(e,t,r,l)=>(V[r]=V[r]||J.string(8),`${t}${V[r]}${l}`)));let eu=Object.keys(K={xmlns:"http://www.w3.org/2000/svg",...en.attributes}).map(e=>`${t(e)}="${t(K[e])}"`).join(" "),eh=(Y=null==(v=e.meta)?void 0:v.title,G=null==(x=e.meta)?void 0:x.creator,Q=null==(b=e.meta)?void 0:b.source,ee=null==(E=null==(k=e.meta)?void 0:k.license)?void 0:E.url,er=(null==(L=(C=e).meta)?void 0:L.title)?`„${null==(S=C.meta)?void 0:S.title}”`:"Design",el=`„${null!=(F=null==(j=C.meta)?void 0:j.creator)?F:"Unknown"}”`,(null==(A=C.meta)?void 0:A.source)&&(er+=` (${C.meta.source})`),ei="",(null==(P=null==(N=C.meta)?void 0:N.license)?void 0:P.name)!=="MIT"&&(null==(z=C.meta)?void 0:z.creator)!=="DiceBear"&&(null==(U=C.meta)?void 0:U.title)&&(ei+="Remix of "),ei+=`${er} by ${el}`,(null==(I=null==(D=C.meta)?void 0:D.license)?void 0:I.name)&&(ei+=`, licensed under „${null==(Z=null==(T=C.meta)?void 0:T.license)?void 0:Z.name}”`,(null==(R=null==(O=C.meta)?void 0:O.license)?void 0:R.url)&&(ei+=` (${C.meta.license.url})`)),et=ei,Y||G||Q||ee||et?'<metadata xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"><rdf:RDF><rdf:Description>'+(Y?`<dc:title>${t(Y)}</dc:title>`:"")+(G?`<dc:creator>${t(G)}</dc:creator>`:"")+(Q?`<dc:source xsi:type="dcterms:URI">${t(null!=(M=null==($=e.meta)?void 0:$.source)?M:"")}</dc:source>`:"")+(ee?`<dcterms:license xsi:type="dcterms:URI">${t(ee)}</dcterms:license>`:"")+(et?`<dc:rights>${t(et)}</dc:rights>`:"")+"</rdf:Description></rdf:RDF></metadata>":""),ef=`<svg ${eu}>${eh}${en.body}</svg>`;return{toString:()=>ef,toJson:()=>{var e;return{svg:ef,extra:{primaryBackgroundColor:es,secondaryBackgroundColor:ec,backgroundType:eo,backgroundRotation:ed,...null==(e=en.extra)?void 0:e.call(en)}}},toDataUri:()=>`data:image/svg+xml;utf8,${encodeURIComponent(ef)}`}})(h,{seed:"most.box@"+e,flip:!0,backgroundType:["gradientLinear"]}).toDataUri():"/pwa-512x512.png"}],93957)},57667,80809,e=>{"use strict";var t=e.i(18050),r=e.i(71645);e.i(22183);var l=e.i(8382);e.s(["ModalOverlay",0,function({children:e,onClose:i,closeOnOverlayClick:a=!1}){return(0,l.useHotkeys)(i?[["Escape",i]]:[]),(0,r.useEffect)(()=>{let e=window.visualViewport;if(!e)return;let t=()=>{document.documentElement.style.setProperty("--modal-visual-height",`${e.height}px`),document.documentElement.style.setProperty("--modal-visual-top",`${e.offsetTop}px`)};return t(),e.addEventListener("resize",t),e.addEventListener("scroll",t),()=>{e.removeEventListener("resize",t),e.removeEventListener("scroll",t),document.documentElement.style.removeProperty("--modal-visual-height"),document.documentElement.style.removeProperty("--modal-visual-top")}},[]),(0,t.jsxs)("div",{className:"modal-overlay",onClick:e=>{a&&e.target===e.currentTarget&&i?.()},children:[(0,t.jsx)("div",{className:"modal-overlay-backdrop"}),(0,t.jsx)("div",{className:"modal-glass",children:e})]})}],57667),e.s(["Toast",0,function({message:e,type:l,onDone:i,index:a}){(0,r.useEffect)(()=>{let e=setTimeout(i,3e3);return()=>clearTimeout(e)},[]);let n=Math.min(Math.max(a,0),5);return(0,t.jsx)("div",{className:`toast ${l} toast-stack-${n}`,children:e})}],80809)},63676,e=>{"use strict";let t=(0,e.i(56420).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],63676)},4121,88361,47910,e=>{"use strict";var t=e.i(57667);e.i(80809);var r=e.i(18050),l=e.i(63676);e.s(["ConfirmModal",0,function({title:e,message:i,confirmText:a,onConfirm:n,onClose:o,danger:s,closeOnOverlayClick:c}){return(0,r.jsx)(t.ModalOverlay,{onClose:o,closeOnOverlayClick:c,children:(0,r.jsxs)("div",{className:"confirm-modal",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"modal-header",children:[(0,r.jsx)("h3",{children:e}),(0,r.jsx)("button",{onClick:o,className:"btn btn-icon",children:(0,r.jsx)(l.X,{size:18})})]}),(0,r.jsx)("p",{children:i}),(0,r.jsxs)("div",{className:"modal-actions",children:[(0,r.jsx)("button",{onClick:o,className:"btn btn-secondary",children:"取消"}),(0,r.jsx)("button",{onClick:n,className:`btn ${s?"btn-danger":"btn-primary"}`,children:a})]})]})})}],88361);var i=e.i(71645);e.s(["InputModal",0,function({title:e,placeholder:a,defaultValue:n,confirmText:o,onConfirm:s,onClose:c,isLoading:d,loadingText:u,validate:h}){let[f,m]=(0,i.useState)(n||""),g=f.trim(),p=g&&h?h(g):"",y=!!g&&!p&&!d;function w(){y&&s(g)}return(0,r.jsx)(t.ModalOverlay,{onClose:c,children:(0,r.jsxs)("div",{className:"input-modal",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"modal-header",children:[(0,r.jsx)("h3",{children:e}),(0,r.jsx)("button",{onClick:c,className:"btn btn-icon",children:(0,r.jsx)(l.X,{size:18})})]}),(0,r.jsx)("input",{type:"text",value:f,onChange:e=>m(e.target.value),placeholder:a,autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&w()},className:"input input-compact","aria-invalid":!!p,"aria-describedby":p?"input-modal-error":void 0}),p&&(0,r.jsx)("p",{className:"input-modal-error",id:"input-modal-error",children:p}),(0,r.jsxs)("div",{className:"modal-actions",children:[(0,r.jsx)("button",{onClick:c,disabled:d,className:"btn btn-secondary",children:"取消"}),(0,r.jsx)("button",{onClick:w,disabled:!y,className:`btn btn-primary ${d?"btn-loading":""}`,children:d?u||"处理中...":o})]})]})})}],47910),e.s([],4121)}]);