@minecraft-docker/mcctl-console 2.8.1 → 2.9.0

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 (265) hide show
  1. package/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
  2. package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +110 -112
  3. package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
  4. package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +5 -5
  5. package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
  6. package/.next/standalone/platform/services/mcctl-console/.next/routes-manifest.json +1 -1
  7. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page.js +1 -1
  8. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page.js.nft.json +1 -1
  9. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js +2 -2
  11. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js.nft.json +1 -1
  12. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js +1 -1
  14. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js.nft.json +1 -1
  15. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js +1 -1
  17. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js.nft.json +1 -1
  18. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js +1 -1
  20. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js.nft.json +1 -1
  21. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js +4 -4
  23. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js.nft.json +1 -1
  24. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page.js +1 -1
  26. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page.js.nft.json +1 -1
  27. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
  28. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js +1 -1
  29. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js.nft.json +1 -1
  30. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
  31. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js +1 -1
  32. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js.nft.json +1 -1
  33. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js +1 -1
  35. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js.nft.json +1 -1
  36. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
  37. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js +1 -1
  38. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js.nft.json +1 -1
  39. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page.js +1 -1
  41. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page.js.nft.json +1 -1
  42. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
  44. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +6 -6
  45. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/mkdir/route.js +1 -0
  46. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/mkdir/route.js.nft.json +1 -0
  47. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/read/route.js +1 -0
  48. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/read/route.js.nft.json +1 -0
  49. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/rename/route.js +1 -0
  50. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/rename/route.js.nft.json +1 -0
  51. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/route.js +1 -0
  52. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/route.js.nft.json +1 -0
  53. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/write/route.js +1 -0
  54. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/write/route.js.nft.json +1 -0
  55. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
  56. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +8 -8
  57. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
  58. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +7 -7
  59. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
  60. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +8 -8
  61. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
  62. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +6 -6
  63. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js +1 -1
  64. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js.nft.json +1 -1
  65. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
  66. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
  67. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +7 -7
  68. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page.js +1 -1
  69. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page.js.nft.json +1 -1
  70. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
  72. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +8 -8
  73. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
  74. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +8 -8
  75. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
  76. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +8 -8
  77. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.html +1 -1
  78. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.rsc +8 -8
  79. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js +1 -1
  80. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js.nft.json +1 -1
  81. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
  82. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
  83. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +7 -7
  84. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
  85. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +8 -8
  86. package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +28 -23
  87. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1088.js +1 -1
  88. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1201.js +1 -0
  89. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1309.js +1 -1
  90. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/2842.js +51 -0
  91. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/354.js +1 -1
  92. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/{6175.js → 3613.js} +1 -1
  93. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4207.js +1 -0
  94. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4282.js +1 -0
  95. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4479.js +1 -0
  96. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/5843.js +1 -1
  97. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/6554.js +2 -0
  98. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/7573.js +1 -1
  99. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8243.js +1 -1
  100. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8913.js +1 -0
  101. package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-build-manifest.js +1 -1
  102. package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
  103. package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.js +1 -1
  104. package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.json +1 -1
  105. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
  106. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
  107. package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
  108. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1055-b8c83674b69387ea.js +1 -0
  109. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/140-25eb9312925d8fea.js +1 -0
  110. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2698-b163080d7b32e5e3.js +1 -0
  111. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2701-677e528d028253ad.js +1 -0
  112. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/3811-48f6e101f9864e3d.js +1 -0
  113. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4036-c4d6006e9e913068.js +1 -0
  114. package/.next/{static/chunks/2539-6bce0edb99b4e538.js → standalone/platform/services/mcctl-console/.next/static/chunks/4219-26d64443218aac0b.js} +1 -1
  115. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4474-b7d88543d50f7f58.js +1 -0
  116. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4841-6260a560fdad2dd4.js +1 -0
  117. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4898-60767ae3dfa904db.js +1 -0
  118. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5498-b79f9cd3afa37253.js +1 -0
  119. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6650-51e2b21d03bb2f09.js +1 -0
  120. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7073-3b047d20c07ac065.js +1 -0
  121. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7087-64ab6928ccdc0ca7.js +1 -0
  122. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7477-3b97ce4c66d3cf7e.js +1 -0
  123. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7753-74bf23c88b387cb7.js +1 -0
  124. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7965-67c4c53f693bc0c4.js +1 -0
  125. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9097-3bc29153e9b2c9d1.js +1 -0
  126. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9788-03286ddd24a074b7.js +1 -0
  127. package/.next/{static/chunks/app/(main)/admin/users/page-e8263fc89b5d349a.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/users/page-b3a3231f2ddc0371.js} +1 -1
  128. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-d65c062a803fc4b2.js +1 -0
  129. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/{layout-bf1846a6b0c68959.js → layout-49deaa08620bff5b.js} +1 -1
  130. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-430dd294c3b34903.js +1 -0
  131. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/routing/{page-0fbdeec8fee218ef.js → page-f430d126cc21547c.js} +1 -1
  132. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/console/page-bea101bb0e8858b4.js +1 -0
  133. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-585e20928c8db0d8.js +1 -0
  134. package/.next/{static/chunks/app/(main)/servers/page-382a14f87768df2c.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-5286112dc6e93885.js} +1 -1
  135. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-dd38d40e3e0257a8.js +1 -0
  136. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-874ad606cffc439d.js +1 -0
  137. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/layout-eaefe334d7b2816a.js +1 -0
  138. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-05a2cf46a8784859.js +1 -0
  139. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/page-df2a4f73aae39ef2.js +1 -0
  140. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/ee812fa3-98eef0b457d8ec47.js +1 -0
  141. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{webpack-198a420ca2ddb7de.js → webpack-7e31802f06defd3e.js} +1 -1
  142. package/.next/standalone/platform/services/mcctl-console/.next/static/css/6a2c381c71b398da.css +1 -0
  143. package/.next/standalone/platform/services/mcctl-console/package.json +10 -0
  144. package/.next/static/chunks/1055-b8c83674b69387ea.js +1 -0
  145. package/.next/static/chunks/140-25eb9312925d8fea.js +1 -0
  146. package/.next/static/chunks/2698-b163080d7b32e5e3.js +1 -0
  147. package/.next/static/chunks/2701-677e528d028253ad.js +1 -0
  148. package/.next/static/chunks/3811-48f6e101f9864e3d.js +1 -0
  149. package/.next/static/chunks/4036-c4d6006e9e913068.js +1 -0
  150. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/2539-6bce0edb99b4e538.js → static/chunks/4219-26d64443218aac0b.js} +1 -1
  151. package/.next/static/chunks/4474-b7d88543d50f7f58.js +1 -0
  152. package/.next/static/chunks/4841-6260a560fdad2dd4.js +1 -0
  153. package/.next/static/chunks/4898-60767ae3dfa904db.js +1 -0
  154. package/.next/static/chunks/5498-b79f9cd3afa37253.js +1 -0
  155. package/.next/static/chunks/6650-51e2b21d03bb2f09.js +1 -0
  156. package/.next/static/chunks/7073-3b047d20c07ac065.js +1 -0
  157. package/.next/static/chunks/7087-64ab6928ccdc0ca7.js +1 -0
  158. package/.next/static/chunks/7477-3b97ce4c66d3cf7e.js +1 -0
  159. package/.next/static/chunks/7753-74bf23c88b387cb7.js +1 -0
  160. package/.next/static/chunks/7965-67c4c53f693bc0c4.js +1 -0
  161. package/.next/static/chunks/9097-3bc29153e9b2c9d1.js +1 -0
  162. package/.next/static/chunks/9788-03286ddd24a074b7.js +1 -0
  163. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/users/page-e8263fc89b5d349a.js → static/chunks/app/(main)/admin/users/page-b3a3231f2ddc0371.js} +1 -1
  164. package/.next/static/chunks/app/(main)/audit-logs/page-d65c062a803fc4b2.js +1 -0
  165. package/.next/static/chunks/app/(main)/{layout-bf1846a6b0c68959.js → layout-49deaa08620bff5b.js} +1 -1
  166. package/.next/static/chunks/app/(main)/players/page-430dd294c3b34903.js +1 -0
  167. package/.next/static/chunks/app/(main)/routing/{page-0fbdeec8fee218ef.js → page-f430d126cc21547c.js} +1 -1
  168. package/.next/static/chunks/app/(main)/servers/[name]/console/page-bea101bb0e8858b4.js +1 -0
  169. package/.next/static/chunks/app/(main)/servers/[name]/page-585e20928c8db0d8.js +1 -0
  170. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-382a14f87768df2c.js → static/chunks/app/(main)/servers/page-5286112dc6e93885.js} +1 -1
  171. package/.next/static/chunks/app/(main)/settings/page-dd38d40e3e0257a8.js +1 -0
  172. package/.next/static/chunks/app/(main)/worlds/page-874ad606cffc439d.js +1 -0
  173. package/.next/static/chunks/app/layout-eaefe334d7b2816a.js +1 -0
  174. package/.next/static/chunks/app/login/page-05a2cf46a8784859.js +1 -0
  175. package/.next/static/chunks/app/signup/page-df2a4f73aae39ef2.js +1 -0
  176. package/.next/static/chunks/ee812fa3-98eef0b457d8ec47.js +1 -0
  177. package/.next/static/chunks/{webpack-198a420ca2ddb7de.js → webpack-7e31802f06defd3e.js} +1 -1
  178. package/.next/static/css/6a2c381c71b398da.css +1 -0
  179. package/package.json +12 -2
  180. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/3068.js +0 -1
  181. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/3633.js +0 -1
  182. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4609.js +0 -1
  183. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/609.js +0 -1
  184. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/6591.js +0 -2
  185. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8849.js +0 -1
  186. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/9023.js +0 -51
  187. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/9874.js +0 -1
  188. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1047-1957808ef6d146f3.js +0 -1
  189. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1099-fa64c7b90813b0a5.js +0 -1
  190. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/212-b904d9ae152f2360.js +0 -1
  191. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2701-385dbd7376f5851d.js +0 -1
  192. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2724-6be0c6be94353443.js +0 -1
  193. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/392-8c54ddef9482164b.js +0 -1
  194. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4187-07672ba5a9f76f7c.js +0 -1
  195. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4219-a84afcb66908141b.js +0 -1
  196. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5381-d66dae5d5171cd57.js +0 -1
  197. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5787-04cc23df05f9da2e.js +0 -1
  198. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6039-38b0b8c06d25892e.js +0 -1
  199. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6645-9bcc9a0f9cd2fdc9.js +0 -1
  200. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6646-c5d039d1ad306467.js +0 -1
  201. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/674-096e0376c367d751.js +0 -1
  202. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/682-6192991ddec396b8.js +0 -1
  203. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6909-9750e61adcf6f5e5.js +0 -1
  204. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7965-420dbb1f781fdc83.js +0 -1
  205. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8233-0fdf0ee81a8cadce.js +0 -1
  206. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/837-f4fbf77c24343b1f.js +0 -1
  207. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8738-25eee78e0dfd0adf.js +0 -1
  208. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9949-2daeb31bdedf25c7.js +0 -1
  209. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-c52171f3de12db63.js +0 -1
  210. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-c4760429d9828ad3.js +0 -1
  211. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/console/page-a0050b5b439d954f.js +0 -1
  212. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-f82acaf60a615953.js +0 -1
  213. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-94ebb6f110d7cba4.js +0 -1
  214. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-a194d5d6a77d7e06.js +0 -1
  215. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/layout-37a5eb78e96aa17e.js +0 -1
  216. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-b7ec94d60aae14ce.js +0 -1
  217. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/page-6f03571bb9914130.js +0 -1
  218. package/.next/standalone/platform/services/mcctl-console/.next/static/css/2579b9365591037f.css +0 -1
  219. package/.next/standalone/platform/services/mcctl-console/.next/static/media/0ea4f4df910e6120-s.woff2 +0 -0
  220. package/.next/standalone/platform/services/mcctl-console/.next/static/media/1f160ec2cb9962ef-s.woff2 +0 -0
  221. package/.next/standalone/platform/services/mcctl-console/.next/static/media/739c2d8941231bb4-s.p.woff2 +0 -0
  222. package/.next/standalone/platform/services/mcctl-console/.next/static/media/ad8a7e2c3c2c120b-s.woff2 +0 -0
  223. package/.next/standalone/platform/services/mcctl-console/.next/static/media/cde148027b808b99-s.woff2 +0 -0
  224. package/.next/standalone/platform/services/mcctl-console/.next/static/media/e61ae719f7cc4155-s.woff2 +0 -0
  225. package/.next/static/chunks/1047-1957808ef6d146f3.js +0 -1
  226. package/.next/static/chunks/1099-fa64c7b90813b0a5.js +0 -1
  227. package/.next/static/chunks/212-b904d9ae152f2360.js +0 -1
  228. package/.next/static/chunks/2701-385dbd7376f5851d.js +0 -1
  229. package/.next/static/chunks/2724-6be0c6be94353443.js +0 -1
  230. package/.next/static/chunks/392-8c54ddef9482164b.js +0 -1
  231. package/.next/static/chunks/4187-07672ba5a9f76f7c.js +0 -1
  232. package/.next/static/chunks/4219-a84afcb66908141b.js +0 -1
  233. package/.next/static/chunks/5381-d66dae5d5171cd57.js +0 -1
  234. package/.next/static/chunks/5787-04cc23df05f9da2e.js +0 -1
  235. package/.next/static/chunks/6039-38b0b8c06d25892e.js +0 -1
  236. package/.next/static/chunks/6645-9bcc9a0f9cd2fdc9.js +0 -1
  237. package/.next/static/chunks/6646-c5d039d1ad306467.js +0 -1
  238. package/.next/static/chunks/674-096e0376c367d751.js +0 -1
  239. package/.next/static/chunks/682-6192991ddec396b8.js +0 -1
  240. package/.next/static/chunks/6909-9750e61adcf6f5e5.js +0 -1
  241. package/.next/static/chunks/7965-420dbb1f781fdc83.js +0 -1
  242. package/.next/static/chunks/8233-0fdf0ee81a8cadce.js +0 -1
  243. package/.next/static/chunks/837-f4fbf77c24343b1f.js +0 -1
  244. package/.next/static/chunks/8738-25eee78e0dfd0adf.js +0 -1
  245. package/.next/static/chunks/9949-2daeb31bdedf25c7.js +0 -1
  246. package/.next/static/chunks/app/(main)/audit-logs/page-c52171f3de12db63.js +0 -1
  247. package/.next/static/chunks/app/(main)/players/page-c4760429d9828ad3.js +0 -1
  248. package/.next/static/chunks/app/(main)/servers/[name]/console/page-a0050b5b439d954f.js +0 -1
  249. package/.next/static/chunks/app/(main)/servers/[name]/page-f82acaf60a615953.js +0 -1
  250. package/.next/static/chunks/app/(main)/settings/page-94ebb6f110d7cba4.js +0 -1
  251. package/.next/static/chunks/app/(main)/worlds/page-a194d5d6a77d7e06.js +0 -1
  252. package/.next/static/chunks/app/layout-37a5eb78e96aa17e.js +0 -1
  253. package/.next/static/chunks/app/login/page-b7ec94d60aae14ce.js +0 -1
  254. package/.next/static/chunks/app/signup/page-6f03571bb9914130.js +0 -1
  255. package/.next/static/css/2579b9365591037f.css +0 -1
  256. package/.next/static/media/0ea4f4df910e6120-s.woff2 +0 -0
  257. package/.next/static/media/1f160ec2cb9962ef-s.woff2 +0 -0
  258. package/.next/static/media/739c2d8941231bb4-s.p.woff2 +0 -0
  259. package/.next/static/media/ad8a7e2c3c2c120b-s.woff2 +0 -0
  260. package/.next/static/media/cde148027b808b99-s.woff2 +0 -0
  261. package/.next/static/media/e61ae719f7cc4155-s.woff2 +0 -0
  262. /package/.next/standalone/platform/services/mcctl-console/.next/static/{S1X5jEkA1d_pSlIMuZWrE → FCefTqFnjMPhnL-HmaWHN}/_buildManifest.js +0 -0
  263. /package/.next/standalone/platform/services/mcctl-console/.next/static/{S1X5jEkA1d_pSlIMuZWrE → FCefTqFnjMPhnL-HmaWHN}/_ssgManifest.js +0 -0
  264. /package/.next/static/{S1X5jEkA1d_pSlIMuZWrE → FCefTqFnjMPhnL-HmaWHN}/_buildManifest.js +0 -0
  265. /package/.next/static/{S1X5jEkA1d_pSlIMuZWrE → FCefTqFnjMPhnL-HmaWHN}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7965],{57965:function(e,r,s){s.d(r,{eE:function(){return Q},E4:function(){return N},SB:function(){return k},ms:function(){return X},hI:function(){return p},aY:function(){return ec},zd:function(){return U},Ik:function(){return P}});var n=s(94655),t=s(628),i=s(41565),a=s(31317),l=s(7281),o=s(25333),c=s(21138),d=s(84811),x=s(70366),u=s(47001),h=s(59602);let j={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},m={border:0,py:1};function p(e){var r;let{router:s}=e,p=(r=s.mode)?r.includes("in-docker")||r.includes("auto-discovery")?{label:"Auto Discovery",color:"info"}:r.includes("mapping")?{label:"Manual Mapping",color:"warning"}:{label:r,color:"default"}:{label:"Unknown",color:"default"};return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(h.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Platform Information"})]}),(0,n.jsx)(c.Z,{size:"small",children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Router Name"}),(0,n.jsx)(u.Z,{sx:m,children:s.name})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Port"}),(0,n.jsx)(u.Z,{sx:m,children:s.port})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Mode"}),(0,n.jsx)(u.Z,{sx:m,children:(0,n.jsx)(o.Z,{label:p.label,size:"small",color:p.color,variant:"outlined"})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:j,children:"Uptime"}),(0,n.jsx)(u.Z,{sx:m,children:s.uptime||"-"})]})]})})]})})}var Z=s(95511),f=s(66561),g=s(12795),y=s(96407),v=s(29983),b=s(81960);function w(e){switch(e){case"running":return"#4caf50";case"exited":case"dead":case"not_found":case"not_created":return"#f44336";case"created":case"restarting":case"paused":return"#ff9800";default:return"#9e9e9e"}}function S(e){let{status:r}=e;return(0,n.jsx)(Z.Z,{title:r,arrow:!0,children:(0,n.jsx)(l.Z,{sx:{width:10,height:10,borderRadius:"50%",bgcolor:w(r),flexShrink:0,boxShadow:"running"===r?"0 0 6px ".concat(w(r)):"none"}})})}function P(e){let{router:r}=e,s=function(e){let r=new Map;for(let s of e){let e=s.target.replace(/^mc-/,"").replace(/:25565$/,""),n=r.get(e);n?n.hostnames.push(s.hostname):r.set(e,{status:s.serverStatus,hostnames:[s.hostname],serverType:s.serverType,serverVersion:s.serverVersion})}return r}(r.routes);return(0,n.jsx)(t.Z,{sx:{height:"100%"},children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(v.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"MC-Router Status"}),(0,n.jsxs)(l.Z,{sx:{ml:"auto",display:"flex",gap:1},children:[(0,n.jsx)(o.Z,{label:r.status,size:"small",color:function(e){switch(e){case"running":return"success";case"exited":case"dead":case"not_found":case"not_created":return"error";case"created":case"restarting":case"paused":return"warning";default:return"default"}}(r.status)}),(0,n.jsx)(o.Z,{label:r.health,size:"small",color:function(e){switch(e){case"healthy":return"success";case"unhealthy":return"error";case"starting":return"warning";default:return"default"}}(r.health),variant:"outlined"})]})]}),(0,n.jsx)(a.Z,{variant:"subtitle2",sx:{mb:1,mt:3},children:"Routing Table"}),0===r.routes.length?(0,n.jsx)(a.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No routes configured"}):(0,n.jsx)(l.Z,{sx:{mt:1},children:Array.from(s.entries()).map(e=>{let[r,{status:s,hostnames:t,serverType:i,serverVersion:o}]=e;return(0,n.jsxs)(f.Z,{defaultExpanded:!0,disableGutters:!0,elevation:0,sx:{border:1,borderColor:"divider","&:not(:last-child)":{borderBottom:0},"&::before":{display:"none"}},children:[(0,n.jsx)(g.Z,{expandIcon:(0,n.jsx)(b.Z,{}),children:(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%",pr:1},children:[(0,n.jsx)(S,{status:s}),(0,n.jsx)(a.Z,{variant:"subtitle2",sx:{fontWeight:600},children:r}),(i||o)&&(0,n.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:[i,o].filter(Boolean).join(" ")}),(0,n.jsxs)(a.Z,{variant:"caption",color:"text.secondary",sx:{ml:"auto"},children:[t.length," ",1===t.length?"route":"routes"]})]})}),(0,n.jsx)(y.Z,{sx:{pt:0},children:(0,n.jsx)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:t.map(e=>(0,n.jsx)(a.Z,{variant:"body2",sx:{fontSize:"0.85rem",color:"text.secondary"},children:e},e))})})]},r)})})]})})}var C=s(21605);let z={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},I={border:0,py:1};function k(e){var r;let{router:s}=e,h=s.routes.filter(e=>"running"===e.serverStatus).length,j=s.routes.length;return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(C.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Network Settings"})]}),(0,n.jsx)(l.Z,{sx:{overflowX:"auto"},children:(0,n.jsx)(c.Z,{size:"small",children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Listening Port"}),(0,n.jsx)(u.Z,{sx:I,children:(0,n.jsx)(o.Z,{label:s.port,size:"small",variant:"outlined"})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Routing Mode"}),(0,n.jsx)(u.Z,{sx:I,children:(0,n.jsx)(o.Z,{label:(r=s.mode)?r.includes("in-docker")||r.includes("auto-discovery")?"Auto Discovery":r.includes("mapping")?"Manual Mapping":r:"Unknown",size:"small",color:"info",variant:"outlined"})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Total Routes"}),(0,n.jsx)(u.Z,{sx:I,children:j})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:z,children:"Active Routes"}),(0,n.jsx)(u.Z,{sx:I,children:(0,n.jsx)(o.Z,{label:"".concat(h," / ").concat(j),size:"small",color:h>0?"success":"default",variant:"outlined"})})]})]})})})]})})}var A=s(76544);function N(e){var r;let{avahi:s}=e,c=null!==(r=null==s?void 0:s.status)&&void 0!==r?r:"unknown";return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(A.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"mDNS (Avahi)"}),(0,n.jsx)(o.Z,{label:c,size:"small",color:"running"===c?"success":c.includes("not running")?"warning":"not installed"===c?"error":"default",sx:{ml:"auto"}})]}),(0,n.jsxs)(a.Z,{variant:"body2",color:"text.secondary",children:["Avahi mDNS daemon enables ",(0,n.jsx)("code",{children:".local"})," hostname resolution for Minecraft servers on the local network."]})]})})}var D=s(35106),T=s(97436),E=s(30417),W=s(93017),B=s(30114),R=s(6986);function U(e){var r;let{onSuccess:s,onError:c}=e,{data:d}=(0,R.kP)(),[x,u]=(0,D.useState)((null==d?void 0:null===(r=d.user)||void 0===r?void 0:r.name)||""),[h,j]=(0,D.useState)(!1),[m,p]=(0,D.useState)(!1),Z=null==d?void 0:d.user;(0,D.useEffect)(()=>{(null==Z?void 0:Z.name)&&!m&&(u(Z.name),p(!0))},[null==Z?void 0:Z.name,m]);let f=x!==((null==Z?void 0:Z.name)||""),g=async()=>{if(f&&x.trim()){j(!0);try{let{error:e}=await (0,R.Nq)({name:x.trim()});e?c(e.message||"Failed to update profile"):s("Profile updated successfully")}catch(e){c("Failed to update profile")}finally{j(!1)}}};return Z?(0,n.jsx)(t.Z,{sx:{height:"100%"},children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:3},children:[(0,n.jsx)(B.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Profile"})]}),(0,n.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,n.jsx)(T.Z,{label:"Name",value:x,onChange:e=>u(e.target.value),fullWidth:!0,size:"small"}),(0,n.jsx)(T.Z,{label:"Email",value:Z.email,fullWidth:!0,size:"small",disabled:!0,helperText:"Email cannot be changed"}),(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(a.Z,{variant:"body2",color:"text.secondary",children:"Role:"}),(0,n.jsx)(o.Z,{label:"admin"===Z.role?"Admin":"User",size:"small",color:"admin"===Z.role?"primary":"default",variant:"outlined"})]}),(0,n.jsx)(l.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,n.jsx)(E.Z,{variant:"contained",onClick:g,disabled:!f||!x.trim()||h,startIcon:h?(0,n.jsx)(W.Z,{size:16}):null,children:h?"Saving...":"Save Changes"})})]})]})}):null}var _=s(52082),F=s(79983),M=s(70603),L=s(28058),q=s(42730);function X(e){let{onSuccess:r,onError:s}=e,[o,c]=(0,D.useState)(""),[d,x]=(0,D.useState)(""),[u,h]=(0,D.useState)(""),[j,m]=(0,D.useState)(!1),[p,Z]=(0,D.useState)(!1),[f,g]=(0,D.useState)(!1),[y,v]=(0,D.useState)(!1),[b,w]=(0,D.useState)({}),S=()=>{let e={};return o||(e.currentPassword="Current password is required"),d?d.length<8&&(e.newPassword="Password must be at least ".concat(8," characters")):e.newPassword="New password is required",u?d!==u&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your new password",o&&d&&o===d&&(e.newPassword="New password must be different from current password"),w(e),0===Object.keys(e).length},P=async e=>{if(e.preventDefault(),S()){v(!0);try{let{error:e}=await (0,R.Cp)({currentPassword:o,newPassword:d,revokeOtherSessions:!1});e?s(e.message||"Failed to change password"):(r("Password changed successfully"),c(""),x(""),h(""),w({}))}catch(e){s("Failed to change password")}finally{v(!1)}}},C=(e,r)=>(0,n.jsx)(_.Z,{position:"end",children:(0,n.jsx)(F.Z,{"aria-label":e?"hide password":"show password",onClick:()=>r(!e),edge:"end",size:"small",children:e?(0,n.jsx)(q.Z,{fontSize:"small"}):(0,n.jsx)(L.Z,{fontSize:"small"})})});return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:3},children:[(0,n.jsx)(M.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Change Password"})]}),(0,n.jsxs)(l.Z,{component:"form",onSubmit:P,sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,n.jsx)(T.Z,{label:"Current Password",type:j?"text":"password",value:o,onChange:e=>{c(e.target.value),b.currentPassword&&w(e=>({...e,currentPassword:""}))},error:!!b.currentPassword,helperText:b.currentPassword,fullWidth:!0,size:"small",autoComplete:"current-password",InputProps:{endAdornment:C(j,m)}}),(0,n.jsx)(T.Z,{label:"New Password",type:p?"text":"password",value:d,onChange:e=>{x(e.target.value),b.newPassword&&w(e=>({...e,newPassword:""}))},error:!!b.newPassword,helperText:b.newPassword||"Minimum ".concat(8," characters"),fullWidth:!0,size:"small",autoComplete:"new-password",InputProps:{endAdornment:C(p,Z)}}),(0,n.jsx)(T.Z,{label:"Confirm New Password",type:f?"text":"password",value:u,onChange:e=>{h(e.target.value),b.confirmPassword&&w(e=>({...e,confirmPassword:""}))},error:!!b.confirmPassword,helperText:b.confirmPassword,fullWidth:!0,size:"small",autoComplete:"new-password",InputProps:{endAdornment:C(f,g)}}),(0,n.jsx)(l.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,n.jsx)(E.Z,{type:"submit",variant:"contained",disabled:y,startIcon:y?(0,n.jsx)(W.Z,{size:16}):null,children:y?"Changing...":"Change Password"})})]})]})})}var O=s(23695);let K={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},V={border:0,py:1};function $(e){return e?("string"==typeof e?new Date(e):e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"}):"-"}function Q(){let{data:e}=(0,R.kP)(),r=null==e?void 0:e.user;return r?(0,n.jsx)(t.Z,{sx:{height:"100%"},children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(O.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"Account Information"})]}),(0,n.jsx)(c.Z,{size:"small",children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:K,children:"Account ID"}),(0,n.jsx)(u.Z,{sx:V,children:(0,n.jsx)(a.Z,{variant:"body2",sx:{fontSize:"0.8rem"},children:r.id})})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:K,children:"Created"}),(0,n.jsx)(u.Z,{sx:V,children:$(r.createdAt)})]}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:K,children:"Last Updated"}),(0,n.jsx)(u.Z,{sx:V,children:$(r.updatedAt)})]})]})})]})}):null}var Y=s(11254),G=s(10721),H=s(81071),J=s(84974),ee=s(5501),er=s(93315),es=s(9078),en=s(10449),et=s(24559),ei=s(37228);let ea={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},el={border:0,py:1};function eo(e){let{text:r}=e,[s,t]=(0,D.useState)(!1),i=async()=>{try{await navigator.clipboard.writeText(r),t(!0),setTimeout(()=>t(!1),2e3)}catch(e){console.error("Failed to copy:",e)}};return(0,n.jsx)(F.Z,{size:"small",onClick:i,sx:{ml:1,color:s?"success.main":"text.secondary","&:hover":{bgcolor:"action.hover"}},"aria-label":s?"Copied":"Copy to clipboard",children:s?(0,n.jsx)(et.Z,{sx:{fontSize:16}}):(0,n.jsx)(en.Z,{sx:{fontSize:16}})})}function ec(){let{data:e,isLoading:r,error:s}=(0,ei.UW)(),h=(0,ei.Bc)(),j=(0,ei.N$)();if(s)return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(J.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),(0,n.jsxs)(H.Z,{severity:"error",children:["Failed to load playit status: ",s.message]})]})});if(r)return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(G.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(G.Z,{variant:"text",width:"40%",height:32})]}),(0,n.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(G.Z,{variant:"text",width:"35%"}),(0,n.jsx)(G.Z,{variant:"text",width:"40%"})]}),(0,n.jsxs)(l.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(G.Z,{variant:"text",width:"35%"}),(0,n.jsx)(G.Z,{variant:"text",width:"40%"})]})]})});if(!(null==e?void 0:e.enabled))return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(J.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),(0,n.jsxs)(H.Z,{severity:"info",children:[(0,n.jsx)(a.Z,{variant:"body2",fontWeight:500,sx:{mb:.5},children:"Not configured"}),(0,n.jsx)(a.Z,{variant:"body2",color:"text.secondary",children:"playit.gg agent is not set up. Configure PLAYIT_SECRET to enable external access."})]})]})});let m=e.agentRunning&&"running"===e.containerStatus,p=h.isPending||j.isPending,Z=h.error||j.error;return(0,n.jsx)(t.Z,{children:(0,n.jsxs)(i.Z,{children:[(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[(0,n.jsx)(J.Z,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),Z&&(0,n.jsx)(H.Z,{severity:"error",sx:{mb:2},children:Z.message||"Action failed"}),(0,n.jsxs)(l.Z,{sx:{display:"flex",gap:1,mb:2,flexWrap:"wrap"},children:[m?(0,n.jsx)(E.Z,{variant:"outlined",size:"small",color:"error",startIcon:p?(0,n.jsx)(W.Z,{size:16}):(0,n.jsx)(er.Z,{}),onClick:()=>{j.mutate()},disabled:p,sx:{fontSize:12},children:p?"Stopping...":"Stop Agent"}):(0,n.jsx)(E.Z,{variant:"contained",size:"small",color:"success",startIcon:p?(0,n.jsx)(W.Z,{size:16,color:"inherit"}):(0,n.jsx)(ee.Z,{}),onClick:()=>{h.mutate()},disabled:p,sx:{fontSize:12},children:p?"Starting...":"Start Agent"}),(0,n.jsx)(E.Z,{component:"a",href:"https://playit.gg/account/tunnels",target:"_blank",rel:"noopener noreferrer",size:"small",startIcon:(0,n.jsx)(es.Z,{}),sx:{fontSize:12},children:"View Dashboard"})]}),(0,n.jsx)(l.Z,{sx:{overflowX:"auto"},children:(0,n.jsx)(c.Z,{size:"small",sx:{mb:3},children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:ea,children:"Agent Status"}),(0,n.jsx)(u.Z,{sx:el,children:(0,n.jsx)(o.Z,{label:m?"Running":"Stopped",size:"small",color:m?"success":"default",variant:"outlined"})})]}),e.uptime&&(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:ea,children:"Uptime"}),(0,n.jsx)(u.Z,{sx:el,children:e.uptime})]})]})})}),e.servers&&e.servers.length>0&&(()=>{let r=e.servers.filter(e=>e.playitDomain),s=e.servers.filter(e=>!e.playitDomain);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.Z,{variant:"subtitle2",sx:{mb:1.5,fontWeight:600},children:"Server Domains"}),r.length>0?(0,n.jsx)(l.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(c.Z,{size:"small",sx:{mb:s.length>0?2:0},children:[(0,n.jsx)(Y.Z,{children:(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:{fontWeight:600,borderBottom:2,borderColor:"divider"},children:"Server"}),(0,n.jsx)(u.Z,{sx:{fontWeight:600,borderBottom:2,borderColor:"divider"},children:"External Domain"})]})}),(0,n.jsx)(d.Z,{children:r.map(e=>(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(u.Z,{sx:{py:1.5,borderBottom:1,borderColor:"divider"},children:e.serverName}),(0,n.jsx)(u.Z,{sx:{py:1.5,borderBottom:1,borderColor:"divider"},children:(0,n.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(a.Z,{variant:"body2",sx:{wordBreak:"break-all"},children:e.playitDomain}),(0,n.jsx)(eo,{text:e.playitDomain})]})})]},e.serverName))})]})}):(0,n.jsxs)(a.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["No servers with external domains configured. Use ",(0,n.jsx)("code",{children:"mcctl create --playit-domain"})," to register a domain."]}),s.length>0&&(0,n.jsxs)(a.Z,{variant:"body2",color:"text.secondary",children:[s.length," server",s.length>1?"s":""," without external domain: ",s.map(e=>e.serverName).join(", ")]})]})})()]})})}},37228:function(e,r,s){s.d(r,{Bc:function(){return o},N$:function(){return c},UW:function(){return l}});var n=s(5632),t=s(58919),i=s(20367),a=s(42936);function l(){return(0,n.a)({queryKey:["playit-status"],queryFn:()=>(0,a.SC)("/api/playit/status"),refetchInterval:3e4})}function o(){let e=(0,t.NL)();return(0,i.D)({mutationFn:()=>(0,a.SC)("/api/playit/start",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}function c(){let e=(0,t.NL)();return(0,i.D)({mutationFn:()=>(0,a.SC)("/api/playit/stop",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}},6986:function(e,r,s){s.d(r,{Cp:function(){return u},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return h}});var n=s(77054),t=s(61648),i=s(35016);let a=(0,n.X)({baseURL:i.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,t.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:u}=a,h=a.admin}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9097],{69123:function(e,t,r){var i=r(32324),n=r(81500),o=r(35106),a=r(70316),l=r(65951),c=r(64577),s=r(34519),d=r(28057),u=r(16945),p=r(94655);let h=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],v=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:o,orientation:a,textAlign:c,variant:s}=e;return(0,l.Z)({root:["root",t&&"absolute",s,o&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===c&&"vertical"!==a&&"textAlignRight","left"===c&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},u.V,i)},g=(0,s.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,c.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),f=(0,s.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),m=o.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:o=!1,children:l,className:c,component:s=l?"div":"hr",flexItem:u=!1,light:m=!1,orientation:b="horizontal",role:x="hr"!==s?"separator":void 0,textAlign:Z="center",variant:w="fullWidth"}=r,y=(0,i.Z)(r,h),S=(0,n.Z)({},r,{absolute:o,component:s,flexItem:u,light:m,orientation:b,role:x,textAlign:Z,variant:w}),k=v(S);return(0,p.jsx)(g,(0,n.Z)({as:s,className:(0,a.Z)(k.root,c),role:x,ref:t,ownerState:S},y,{children:l?(0,p.jsx)(f,{className:k.wrapper,ownerState:S,children:l}):null}))});m.muiSkipListHighlight=!0,t.Z=m},41261:function(e,t,r){r.d(t,{Z:function(){return R}});var i=r(32324),n=r(81500),o=r(35106),a=r(70316),l=r(65951),c=r(38762),s=r(34519),d=r(28057),u=r(22125),p=r(38481),h=r(31317),v=r(11379),g=r(9049);function f(e){return(0,g.ZP)("MuiLink",e)}let m=(0,v.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var b=r(20219),x=r(64577);let Z={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},w=e=>Z[e]||e;var y=e=>{let{theme:t,ownerState:r}=e,i=w(r.color),n=(0,b.DW)(t,"palette.".concat(i),!1)||r.color,o=(0,b.DW)(t,"palette.".concat(i,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,x.Fq)(n,.4)},S=r(94655);let k=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],A=e=>{let{classes:t,component:r,focusVisible:i,underline:n}=e,o={root:["root","underline".concat((0,c.Z)(n)),"button"===r&&"button",i&&"focusVisible"]};return(0,l.Z)(o,f,t)},C=(0,s.ZP)(h.Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t["underline".concat((0,c.Z)(r.underline))],"button"===r.component&&t.button]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},"none"===r.underline&&{textDecoration:"none"},"hover"===r.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===r.underline&&(0,n.Z)({textDecoration:"underline"},"inherit"!==r.color&&{textDecorationColor:y({theme:t,ownerState:r})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===r.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(m.focusVisible)]:{outline:"auto"}})});var R=o.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiLink"}),{className:l,color:c="primary",component:s="a",onBlur:h,onFocus:v,TypographyClasses:g,underline:f="always",variant:m="inherit",sx:b}=r,x=(0,i.Z)(r,k),{isFocusVisibleRef:w,onBlur:y,onFocus:R,ref:I}=(0,u.Z)(),[L,D]=o.useState(!1),W=(0,p.Z)(t,I),M=(0,n.Z)({},r,{color:c,component:s,focusVisible:L,underline:f,variant:m}),N=A(M);return(0,S.jsx)(C,(0,n.Z)({color:c,className:(0,a.Z)(N.root,l),classes:g,component:s,onBlur:e=>{y(e),!1===w.current&&D(!1),h&&h(e)},onFocus:e=>{R(e),!0===w.current&&D(!0),v&&v(e)},ref:W,ownerState:M,variant:m,sx:[...Object.keys(Z).includes(c)?[]:[{color:c}],...Array.isArray(b)?b:[b]]},x))})},17820:function(e,t,r){var i=r(32324),n=r(81500),o=r(35106),a=r(70316),l=r(65951),c=r(34519),s=r(28057),d=r(33326),u=r(75084),p=r(94655);let h=["className"],v=e=>{let{alignItems:t,classes:r}=e;return(0,l.Z)({root:["root","flex-start"===t&&"alignItemsFlexStart"]},d.f,r)},g=(0,c.ZP)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===r.alignItems&&{marginTop:8})}),f=o.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiListItemIcon"}),{className:l}=r,c=(0,i.Z)(r,h),d=o.useContext(u.Z),f=(0,n.Z)({},r,{alignItems:d.alignItems}),m=v(f);return(0,p.jsx)(g,(0,n.Z)({className:(0,a.Z)(m.root,l),ownerState:f,ref:t},c))});t.Z=f}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9788],{407:function(e,t,o){var r=o(8091);t.Z=void 0;var a=r(o(66758)),n=o(94655);t.Z=(0,a.default)([(0,n.jsx)("path",{d:"M17 11c.34 0 .67.04 1 .09V6.27L10.5 3 3 6.27v4.91c0 4.54 3.2 8.79 7.5 9.82.55-.13 1.08-.32 1.6-.55-.69-.98-1.1-2.17-1.1-3.45 0-3.31 2.69-6 6-6"},"0"),(0,n.jsx)("path",{d:"M17 13c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 1.38c.62 0 1.12.51 1.12 1.12s-.51 1.12-1.12 1.12-1.12-.51-1.12-1.12.5-1.12 1.12-1.12m0 5.37c-.93 0-1.74-.46-2.24-1.17.05-.72 1.51-1.08 2.24-1.08s2.19.36 2.24 1.08c-.5.71-1.31 1.17-2.24 1.17"},"1")],"AdminPanelSettings")},397:function(e,t,o){var r=o(8091);t.Z=void 0;var a=r(o(66758)),n=o(94655);t.Z=(0,a.default)((0,n.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"}),"Block")},21111:function(e,t,o){var r=o(8091);t.Z=void 0;var a=r(o(66758)),n=o(94655);t.Z=(0,a.default)((0,n.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete")},45813:function(e,t,o){var r=o(8091);t.Z=void 0;var a=r(o(66758)),n=o(94655);t.Z=(0,a.default)((0,n.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit")},29114:function(e,t,o){var r=o(8091);t.Z=void 0;var a=r(o(66758)),n=o(94655);t.Z=(0,a.default)((0,n.jsx)("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"}),"GroupAdd")},37809:function(e,t,o){var r=o(8091);t.Z=void 0;var a=r(o(66758)),n=o(94655);t.Z=(0,a.default)((0,n.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert")},47606:function(e,t,o){var r=o(8091);t.Z=void 0;var a=r(o(66758)),n=o(94655);t.Z=(0,a.default)((0,n.jsx)("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonAdd")},11597:function(e,t,o){var r=o(8091);t.Z=void 0;var a=r(o(66758)),n=o(94655);t.Z=(0,a.default)((0,n.jsx)("path",{d:"M14 8c0-2.21-1.79-4-4-4S6 5.79 6 8s1.79 4 4 4 4-1.79 4-4m3 2v2h6v-2zM2 18v2h16v-2c0-2.66-5.33-4-8-4s-8 1.34-8 4"}),"PersonRemove")},65087:function(e,t,o){o.d(t,{Z:function(){return w}});var r=o(32324),a=o(81500),n=o(35106),c=o(70316),i=o(65951),s=o(34519),l=o(15651),d=o(28057),u=o(31317),v=o(11379),h=o(9049);function p(e){return(0,h.ZP)("MuiDialogContentText",e)}(0,v.Z)("MuiDialogContentText",["root"]);var m=o(94655);let Z=["children","className"],f=e=>{let{classes:t}=e,o=(0,i.Z)({root:["root"]},p,t);return(0,a.Z)({},t,o)},g=(0,s.ZP)(u.Z,{shouldForwardProp:e=>(0,l.Z)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({});var w=n.forwardRef(function(e,t){let o=(0,d.i)({props:e,name:"MuiDialogContentText"}),{className:n}=o,i=(0,r.Z)(o,Z),s=f(i);return(0,m.jsx)(g,(0,a.Z)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:i,className:(0,c.Z)(s.root,n)},o,{classes:s}))})},69783:function(e,t,o){o.d(t,{Z:function(){return g}});var r=o(32324),a=o(81500),n=o(35106),c=o(70316),i=o(65951),s=o(75084),l=o(34519),d=o(28057),u=o(11379),v=o(9049);function h(e){return(0,v.ZP)("MuiListItemAvatar",e)}(0,u.Z)("MuiListItemAvatar",["root","alignItemsFlexStart"]);var p=o(94655);let m=["className"],Z=e=>{let{alignItems:t,classes:o}=e;return(0,i.Z)({root:["root","flex-start"===t&&"alignItemsFlexStart"]},h,o)},f=(0,l.ZP)("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,"flex-start"===o.alignItems&&t.alignItemsFlexStart]}})(e=>{let{ownerState:t}=e;return(0,a.Z)({minWidth:56,flexShrink:0},"flex-start"===t.alignItems&&{marginTop:8})});var g=n.forwardRef(function(e,t){let o=(0,d.i)({props:e,name:"MuiListItemAvatar"}),{className:i}=o,l=(0,r.Z)(o,m),u=n.useContext(s.Z),v=(0,a.Z)({},o,{alignItems:u.alignItems}),h=Z(v);return(0,p.jsx)(f,(0,a.Z)({className:(0,c.Z)(h.root,i),ownerState:v,ref:t},l))})},39181:function(e,t,o){o.d(t,{Z:function(){return B}});var r=o(32324),a=o(81500),n=o(35106),c=o(70316),i=o(65951),s=o(64577),l=o(1592),d=o(28057),u=o(61626),v=o(94655),h=(0,u.Z)((0,v.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),p=(0,u.Z)((0,v.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),m=o(34519),Z=o(15651);let f=(0,m.ZP)("span",{name:"MuiRadioButtonIcon",shouldForwardProp:Z.Z})({position:"relative",display:"flex"}),g=(0,m.ZP)(h,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),w=(0,m.ZP)(p,{name:"MuiRadioButtonIcon"})(e=>{let{theme:t,ownerState:o}=e;return(0,a.Z)({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},o.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})})});var x=function(e){let{checked:t=!1,classes:o={},fontSize:r}=e,n=(0,a.Z)({},e,{checked:t});return(0,v.jsxs)(f,{className:o.root,ownerState:n,children:[(0,v.jsx)(g,{fontSize:r,className:o.background,ownerState:n}),(0,v.jsx)(w,{fontSize:r,className:o.dot,ownerState:n})]})},k=o(38762),b=o(27350),S=o(36189),M=o(11379),C=o(9049);function R(e){return(0,C.ZP)("MuiRadio",e)}let y=(0,M.Z)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),z=["checked","checkedIcon","color","icon","name","onChange","size","className"],j=e=>{let{classes:t,color:o,size:r}=e,n={root:["root","color".concat((0,k.Z)(o)),"medium"!==r&&"size".concat((0,k.Z)(r))]};return(0,a.Z)({},t,(0,i.Z)(n,R,t))},P=(0,m.ZP)(l.Z,{shouldForwardProp:e=>(0,Z.Z)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,"medium"!==o.size&&t["size".concat((0,k.Z)(o.size))],t["color".concat((0,k.Z)(o.color))]]}})(e=>{let{theme:t,ownerState:o}=e;return(0,a.Z)({color:(t.vars||t).palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===o.color?t.vars.palette.action.activeChannel:t.vars.palette[o.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,s.Fq)("default"===o.color?t.palette.action.active:t.palette[o.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==o.color&&{["&.".concat(y.checked)]:{color:(t.vars||t).palette[o.color].main}},{["&.".concat(y.disabled)]:{color:(t.vars||t).palette.action.disabled}})}),I=(0,v.jsx)(x,{checked:!0}),N=(0,v.jsx)(x,{});var B=n.forwardRef(function(e,t){var o,i,s,l;let u=(0,d.i)({props:e,name:"MuiRadio"}),{checked:h,checkedIcon:p=I,color:m="primary",icon:Z=N,name:f,onChange:g,size:w="medium",className:x}=u,k=(0,r.Z)(u,z),M=(0,a.Z)({},u,{color:m,size:w}),C=j(M),R=n.useContext(S.Z),y=h,B=(0,b.Z)(g,R&&R.onChange),F=f;return R&&(void 0===y&&(s=R.value,y="object"==typeof(l=u.value)&&null!==l?s===l:String(s)===String(l)),void 0===F&&(F=R.name)),(0,v.jsx)(P,(0,a.Z)({type:"radio",icon:n.cloneElement(Z,{fontSize:null!=(o=N.props.fontSize)?o:w}),checkedIcon:n.cloneElement(p,{fontSize:null!=(i=I.props.fontSize)?i:w}),ownerState:M,classes:C,name:F,checked:y,onChange:B,ref:t,className:(0,c.Z)(C.root,x)},k))})},34080:function(e,t,o){o.d(t,{Z:function(){return y}});var r=o(81500),a=o(32324),n=o(35106),c=o(70316),i=o(65951),s=o(34519),l=o(28057),d=o(11379),u=o(9049);function v(e){return(0,u.ZP)("MuiFormGroup",e)}(0,d.Z)("MuiFormGroup",["root","row","error"]);var h=o(85016),p=o(95953),m=o(94655);let Z=["className","row"],f=e=>{let{classes:t,row:o,error:r}=e;return(0,i.Z)({root:["root",o&&"row",r&&"error"]},v,t)},g=(0,s.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.row&&t.row]}})(e=>{let{ownerState:t}=e;return(0,r.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})}),w=n.forwardRef(function(e,t){let o=(0,l.i)({props:e,name:"MuiFormGroup"}),{className:n,row:i=!1}=o,s=(0,a.Z)(o,Z),d=(0,h.Z)(),u=(0,p.Z)({props:o,muiFormControl:d,states:["error"]}),v=(0,r.Z)({},o,{row:i,error:u.error}),w=f(v);return(0,m.jsx)(g,(0,r.Z)({className:(0,c.Z)(w.root,n),ownerState:v,ref:t},s))});function x(e){return(0,u.ZP)("MuiRadioGroup",e)}(0,d.Z)("MuiRadioGroup",["root","row","error"]);var k=o(38481),b=o(18280),S=o(36189),M=o(88207);let C=["actions","children","className","defaultValue","name","onChange","value"],R=e=>{let{classes:t,row:o,error:r}=e;return(0,i.Z)({root:["root",o&&"row",r&&"error"]},x,t)};var y=n.forwardRef(function(e,t){let{actions:o,children:i,className:s,defaultValue:l,name:d,onChange:u,value:v}=e,h=(0,a.Z)(e,C),p=n.useRef(null),Z=R(e),[f,g]=(0,b.Z)({controlled:v,default:l,name:"RadioGroup"});n.useImperativeHandle(o,()=>({focus:()=>{let e=p.current.querySelector("input:not(:disabled):checked");e||(e=p.current.querySelector("input:not(:disabled)")),e&&e.focus()}}),[]);let x=(0,k.Z)(t,p),y=(0,M.Z)(d),z=n.useMemo(()=>({name:y,onChange(e){g(e.target.value),u&&u(e,e.target.value)},value:f}),[y,u,g,f]);return(0,m.jsx)(S.Z.Provider,{value:z,children:(0,m.jsx)(w,(0,r.Z)({role:"radiogroup",ref:x,className:(0,c.Z)(Z.root,s)},h,{children:i}))})})},36189:function(e,t,o){let r=o(35106).createContext(void 0);t.Z=r},38393:function(e,t,o){o.d(t,{Z:function(){return M}});var r=o(32324),a=o(81500),n=o(35106),c=o(70316),i=o(65951),s=o(64577),l=o(38762),d=o(1592),u=o(34519),v=o(28057),h=o(11379),p=o(9049);function m(e){return(0,p.ZP)("MuiSwitch",e)}let Z=(0,h.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);var f=o(94655);let g=["className","color","edge","size","sx"],w=e=>{let{classes:t,edge:o,size:r,color:n,checked:c,disabled:s}=e,d={root:["root",o&&"edge".concat((0,l.Z)(o)),"size".concat((0,l.Z)(r))],switchBase:["switchBase","color".concat((0,l.Z)(n)),c&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=(0,i.Z)(d,m,t);return(0,a.Z)({},t,u)},x=(0,u.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.edge&&t["edge".concat((0,l.Z)(o.edge))],t["size".concat((0,l.Z)(o.size))]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,["& .".concat(Z.thumb)]:{width:16,height:16},["& .".concat(Z.switchBase)]:{padding:4,["&.".concat(Z.checked)]:{transform:"translateX(16px)"}}}}]}),k=(0,u.ZP)(d.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.switchBase,{["& .".concat(Z.input)]:t.input},"default"!==o.color&&t["color".concat((0,l.Z)(o.color))]]}})(e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:"".concat("light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]),transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),["&.".concat(Z.checked)]:{transform:"translateX(20px)"},["&.".concat(Z.disabled)]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:"".concat("light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600])},["&.".concat(Z.checked," + .").concat(Z.track)]:{opacity:.5},["&.".concat(Z.disabled," + .").concat(Z.track)]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:"".concat("light"===t.palette.mode?.12:.2)},["& .".concat(Z.input)]:{left:"-100%",width:"300%"}}},e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,s.Fq)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[o]=e;return{props:{color:o},style:{["&.".concat(Z.checked)]:{color:(t.vars||t).palette[o].main,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[o].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,s.Fq)(t.palette[o].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(Z.disabled)]:{color:t.vars?t.vars.palette.Switch["".concat(o,"DisabledColor")]:"".concat("light"===t.palette.mode?(0,s.$n)(t.palette[o].main,.62):(0,s._j)(t.palette[o].main,.55))}},["&.".concat(Z.checked," + .").concat(Z.track)]:{backgroundColor:(t.vars||t).palette[o].main}}}})]}}),b=(0,u.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:"".concat("light"===t.palette.mode?t.palette.common.black:t.palette.common.white),opacity:t.vars?t.vars.opacity.switchTrack:"".concat("light"===t.palette.mode?.38:.3)}}),S=(0,u.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}});var M=n.forwardRef(function(e,t){let o=(0,v.i)({props:e,name:"MuiSwitch"}),{className:n,color:i="primary",edge:s=!1,size:l="medium",sx:d}=o,u=(0,r.Z)(o,g),h=(0,a.Z)({},o,{color:i,edge:s,size:l}),p=w(h),m=(0,f.jsx)(S,{className:p.thumb,ownerState:h});return(0,f.jsxs)(x,{className:(0,c.Z)(p.root,n),sx:d,ownerState:h,children:[(0,f.jsx)(k,(0,a.Z)({type:"checkbox",icon:m,checkedIcon:m,ref:t,ownerState:h},u,{classes:(0,a.Z)({},p,{root:p.switchBase})})),(0,f.jsx)(b,{className:p.track,ownerState:h})]})})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5931],{66289:function(e,t,r){Promise.resolve().then(r.bind(r,12256))},71185:function(e,t,r){"use strict";var i=r(8091);t.Z=void 0;var n=i(r(66758)),l=r(94655);t.Z=(0,n.default)((0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},69123:function(e,t,r){"use strict";var i=r(32324),n=r(81500),l=r(35106),a=r(70316),o=r(65951),s=r(64577),c=r(34519),d=r(28057),h=r(16945),u=r(94655);let x=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],m=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:l,orientation:a,textAlign:s,variant:c}=e;return(0,o.Z)({root:["root",t&&"absolute",c,l&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},h.V,i)},v=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),f=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),Z=l.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:l=!1,children:o,className:s,component:c=o?"div":"hr",flexItem:h=!1,light:Z=!1,orientation:p="horizontal",role:g="hr"!==c?"separator":void 0,textAlign:j="center",variant:b="fullWidth"}=r,y=(0,i.Z)(r,x),w=(0,n.Z)({},r,{absolute:l,component:c,flexItem:h,light:Z,orientation:p,role:g,textAlign:j,variant:b}),C=m(w);return(0,u.jsx)(v,(0,n.Z)({as:c,className:(0,a.Z)(C.root,s),role:g,ref:t,ownerState:w},y,{children:o?(0,u.jsx)(f,{className:C.wrapper,ownerState:w,children:o}):null}))});Z.muiSkipListHighlight=!0,t.Z=Z},16945:function(e,t,r){"use strict";r.d(t,{V:function(){return l}});var i=r(11379),n=r(9049);function l(e){return(0,n.ZP)("MuiDivider",e)}let a=(0,i.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.Z=a},53281:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(28057),c=r(34519),d=r(11379),h=r(9049);function u(e){return(0,h.ZP)("MuiTableContainer",e)}(0,d.Z)("MuiTableContainer",["root"]);var x=r(94655);let m=["className","component"],v=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},u,t)},f=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var Z=l.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:l,component:o="div"}=r,c=(0,n.Z)(r,m),d=(0,i.Z)({},r,{component:o}),h=v(d);return(0,x.jsx)(f,(0,i.Z)({ref:t,as:o,className:(0,a.Z)(h.root,l),ownerState:d},c))})},12256:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return R}});var i=r(94655),n=r(35106),l=r(7281),a=r(93017),o=r(81071),s=r(31317),c=r(5632),d=r(6986),h=r(53281),u=r(69899),x=r(21138),m=r(11254),v=r(70366),f=r(47001),Z=r(84811),p=r(25333);function g(e){let{users:t,onUserClick:r}=e;return 0===t.length?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",p:4},children:(0,i.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"No users found"})}):(0,i.jsx)(h.Z,{component:u.Z,sx:{overflowX:"auto"},children:(0,i.jsxs)(x.Z,{children:[(0,i.jsx)(m.Z,{children:(0,i.jsxs)(v.Z,{children:[(0,i.jsx)(f.Z,{children:"Email"}),(0,i.jsx)(f.Z,{children:"Name"}),(0,i.jsx)(f.Z,{children:"Role"}),(0,i.jsx)(f.Z,{children:"Status"}),(0,i.jsx)(f.Z,{children:"Created At"})]})}),(0,i.jsx)(Z.Z,{children:t.map(e=>(0,i.jsxs)(v.Z,{hover:!0,onClick:()=>r(e),sx:{cursor:"pointer"},children:[(0,i.jsx)(f.Z,{children:e.email}),(0,i.jsx)(f.Z,{children:e.name||"N/A"}),(0,i.jsx)(f.Z,{children:"admin"===e.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})}),(0,i.jsx)(f.Z,{children:e.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})}),(0,i.jsx)(f.Z,{children:new Date(e.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]},e.id))})]})})}var j=r(99770),b=r(62508),y=r(79983),w=r(5682),C=r(69123),A=r(71185);function S(e){let{user:t,open:r,onClose:n}=e;return(0,i.jsxs)(j.Z,{open:r,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,i.jsx)(b.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(s.Z,{variant:"h6",children:"User Details"}),(0,i.jsx)(y.Z,{onClick:n,size:"small","aria-label":"close",children:(0,i.jsx)(A.Z,{})})]})}),(0,i.jsx)(w.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Email"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.email})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Name"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.name||"N/A"})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Role"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:"admin"===t.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Status"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:t.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})})]}),(0,i.jsx)(C.Z,{}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Created At"}),(0,i.jsx)(s.Z,{variant:"body2",children:new Date(t.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"User ID"}),(0,i.jsx)(s.Z,{variant:"body2",sx:{fontFamily:'"Roboto Mono", monospace',fontSize:"0.875rem"},children:t.id})]})]})})]})}function R(){let{data:e,isLoading:t,isError:r,error:h}=(0,c.a)({queryKey:["admin","users"],queryFn:async()=>{let{data:e,error:t}=await d.zB.listUsers({query:{}});if(t)throw Error(t.message||"Failed to fetch users");return(null==e?void 0:e.users)?e.users.map(e=>{var t,r,i;return{id:e.id,email:e.email,name:null!==(t=e.name)&&void 0!==t?t:null,role:null!==(r=e.role)&&void 0!==r?r:"user",banned:null!==(i=e.banned)&&void 0!==i&&i,createdAt:new Date(e.createdAt)}}):[]}}),[u,x]=(0,n.useState)(null);return t?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:(0,i.jsx)(a.Z,{})}):r?(0,i.jsx)(l.Z,{sx:{p:3},children:(0,i.jsxs)(o.Z,{severity:"error",children:["Failed to load users. ",(null==h?void 0:h.message)||"Please try again later."]})}):(0,i.jsxs)(l.Z,{sx:{p:3},children:[(0,i.jsx)(s.Z,{variant:"h4",component:"h1",gutterBottom:!0,children:"User Management"}),(0,i.jsx)(g,{users:e||[],onUserClick:e=>{x(e)}}),u&&(0,i.jsx)(S,{user:u,open:!0,onClose:()=>{x(null)}})]})}},6986:function(e,t,r){"use strict";r.d(t,{Cp:function(){return u},Nq:function(){return h},cg:function(){return o},kP:function(){return d},w7:function(){return s},y1:function(){return c},zB:function(){return x}});var i=r(77054),n=r(61648),l=r(35016);let a=(0,i.X)({baseURL:l.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,n.zB)()]}),{signIn:o,signOut:s,signUp:c,useSession:d,updateUser:h,changePassword:u}=a,x=a.admin}},function(e){e.O(0,[6812,9760,5004,1071,540,4416,2542,880,2844,3669,2757,1744],function(){return e(e.s=66289)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5931],{66289:function(e,t,r){Promise.resolve().then(r.bind(r,12256))},71185:function(e,t,r){"use strict";var i=r(8091);t.Z=void 0;var n=i(r(66758)),l=r(94655);t.Z=(0,n.default)((0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},69123:function(e,t,r){"use strict";var i=r(32324),n=r(81500),l=r(35106),a=r(70316),o=r(65951),s=r(64577),c=r(34519),d=r(28057),h=r(16945),u=r(94655);let x=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],m=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:l,orientation:a,textAlign:s,variant:c}=e;return(0,o.Z)({root:["root",t&&"absolute",c,l&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},h.V,i)},v=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),Z=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),f=l.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:l=!1,children:o,className:s,component:c=o?"div":"hr",flexItem:h=!1,light:f=!1,orientation:p="horizontal",role:g="hr"!==c?"separator":void 0,textAlign:j="center",variant:b="fullWidth"}=r,y=(0,i.Z)(r,x),w=(0,n.Z)({},r,{absolute:l,component:c,flexItem:h,light:f,orientation:p,role:g,textAlign:j,variant:b}),C=m(w);return(0,u.jsx)(v,(0,n.Z)({as:c,className:(0,a.Z)(C.root,s),role:g,ref:t,ownerState:w},y,{children:o?(0,u.jsx)(Z,{className:C.wrapper,ownerState:w,children:o}):null}))});f.muiSkipListHighlight=!0,t.Z=f},16945:function(e,t,r){"use strict";r.d(t,{V:function(){return l}});var i=r(11379),n=r(9049);function l(e){return(0,n.ZP)("MuiDivider",e)}let a=(0,i.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.Z=a},53281:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(28057),c=r(34519),d=r(11379),h=r(9049);function u(e){return(0,h.ZP)("MuiTableContainer",e)}(0,d.Z)("MuiTableContainer",["root"]);var x=r(94655);let m=["className","component"],v=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},u,t)},Z=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var f=l.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:l,component:o="div"}=r,c=(0,n.Z)(r,m),d=(0,i.Z)({},r,{component:o}),h=v(d);return(0,x.jsx)(Z,(0,i.Z)({ref:t,as:o,className:(0,a.Z)(h.root,l),ownerState:d},c))})},12256:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return R}});var i=r(94655),n=r(35106),l=r(7281),a=r(93017),o=r(81071),s=r(31317),c=r(5632),d=r(6986),h=r(53281),u=r(69899),x=r(21138),m=r(11254),v=r(70366),Z=r(47001),f=r(84811),p=r(25333);function g(e){let{users:t,onUserClick:r}=e;return 0===t.length?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",p:4},children:(0,i.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"No users found"})}):(0,i.jsx)(h.Z,{component:u.Z,sx:{overflowX:"auto"},children:(0,i.jsxs)(x.Z,{children:[(0,i.jsx)(m.Z,{children:(0,i.jsxs)(v.Z,{children:[(0,i.jsx)(Z.Z,{children:"Email"}),(0,i.jsx)(Z.Z,{children:"Name"}),(0,i.jsx)(Z.Z,{children:"Role"}),(0,i.jsx)(Z.Z,{children:"Status"}),(0,i.jsx)(Z.Z,{children:"Created At"})]})}),(0,i.jsx)(f.Z,{children:t.map(e=>(0,i.jsxs)(v.Z,{hover:!0,onClick:()=>r(e),sx:{cursor:"pointer"},children:[(0,i.jsx)(Z.Z,{children:e.email}),(0,i.jsx)(Z.Z,{children:e.name||"N/A"}),(0,i.jsx)(Z.Z,{children:"admin"===e.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})}),(0,i.jsx)(Z.Z,{children:e.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})}),(0,i.jsx)(Z.Z,{children:new Date(e.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]},e.id))})]})})}var j=r(99770),b=r(62508),y=r(79983),w=r(5682),C=r(69123),A=r(71185);function S(e){let{user:t,open:r,onClose:n}=e;return(0,i.jsxs)(j.Z,{open:r,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,i.jsx)(b.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(s.Z,{variant:"h6",children:"User Details"}),(0,i.jsx)(y.Z,{onClick:n,size:"small","aria-label":"close",children:(0,i.jsx)(A.Z,{})})]})}),(0,i.jsx)(w.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Email"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.email})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Name"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.name||"N/A"})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Role"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:"admin"===t.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Status"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:t.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})})]}),(0,i.jsx)(C.Z,{}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Created At"}),(0,i.jsx)(s.Z,{variant:"body2",children:new Date(t.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"User ID"}),(0,i.jsx)(s.Z,{variant:"body2",sx:{fontSize:"0.875rem"},children:t.id})]})]})})]})}function R(){let{data:e,isLoading:t,isError:r,error:h}=(0,c.a)({queryKey:["admin","users"],queryFn:async()=>{let{data:e,error:t}=await d.zB.listUsers({query:{}});if(t)throw Error(t.message||"Failed to fetch users");return(null==e?void 0:e.users)?e.users.map(e=>{var t,r,i;return{id:e.id,email:e.email,name:null!==(t=e.name)&&void 0!==t?t:null,role:null!==(r=e.role)&&void 0!==r?r:"user",banned:null!==(i=e.banned)&&void 0!==i&&i,createdAt:new Date(e.createdAt)}}):[]}}),[u,x]=(0,n.useState)(null);return t?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:(0,i.jsx)(a.Z,{})}):r?(0,i.jsx)(l.Z,{sx:{p:3},children:(0,i.jsxs)(o.Z,{severity:"error",children:["Failed to load users. ",(null==h?void 0:h.message)||"Please try again later."]})}):(0,i.jsxs)(l.Z,{sx:{p:3},children:[(0,i.jsx)(s.Z,{variant:"h4",component:"h1",gutterBottom:!0,children:"User Management"}),(0,i.jsx)(g,{users:e||[],onUserClick:e=>{x(e)}}),u&&(0,i.jsx)(S,{user:u,open:!0,onClose:()=>{x(null)}})]})}},6986:function(e,t,r){"use strict";r.d(t,{Cp:function(){return u},Nq:function(){return h},cg:function(){return o},kP:function(){return d},w7:function(){return s},y1:function(){return c},zB:function(){return x}});var i=r(77054),n=r(61648),l=r(35016);let a=(0,i.X)({baseURL:l.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,n.zB)()]}),{signIn:o,signOut:s,signUp:c,useSession:d,updateUser:h,changePassword:u}=a,x=a.admin}},function(e){e.O(0,[6812,9760,5004,1071,540,4416,2542,880,2844,3669,2757,1744],function(){return e(e.s=66289)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4743],{3590:function(e,t,r){Promise.resolve().then(r.bind(r,52791))},52791:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return eS}});var n=r(94655),s=r(35106),i=r(74228),a=r(7281),o=r(69899),l=r(31317),c=r(25333),d=r(76492),u=r(80620),x=r(78439),h=r(56813),m=r(26892),p=r(84840),g=r(628),j=r(41565),v=r(10721),f=r(69178),Z=r(46207),y=r(45354),b=r(35847);function S(e){var t,r,s;let{stats:i,isLoading:o}=e;if(o)return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:[0,1,2,3].map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{children:(0,n.jsxs)(j.Z,{children:[(0,n.jsx)(v.Z,{variant:"text",width:"60%"}),(0,n.jsx)(v.Z,{variant:"text",width:"40%",height:40}),(0,n.jsx)(v.Z,{variant:"text",width:"80%"})]})})},e))});let c=null!==(t=null==i?void 0:i.total)&&void 0!==t?t:0,d=c>0?((null!==(r=null==i?void 0:i.byStatus.success)&&void 0!==r?r:0)/c*100).toFixed(1):"0.0",u=null!==(s=null==i?void 0:i.byStatus.failure)&&void 0!==s?s:0,x=i?Object.keys(i.byActor).length:0,h=[{title:"Total Logs",value:c.toLocaleString(),icon:(0,n.jsx)(f.Z,{fontSize:"large"}),color:"#1bd96a",description:"All audit log entries"},{title:"Success Rate",value:"".concat(d,"%"),icon:(0,n.jsx)(Z.Z,{fontSize:"large"}),color:"#22c55e",description:"Successful operations"},{title:"Failures",value:u,icon:(0,n.jsx)(y.Z,{fontSize:"large"}),color:"#ef4444",description:"Failed operations"},{title:"Active Users",value:x,icon:(0,n.jsx)(b.Z,{fontSize:"large"}),color:"#3b82f6",description:"Unique actors"}];return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:h.map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:e.color}},children:(0,n.jsxs)(j.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:e.title}),(0,n.jsx)(a.Z,{sx:{color:e.color,opacity:.8},children:e.icon})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:1},children:e.value}),(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:e.description})]})})},e.title))})}var C=r(97436),w=r(62328),T=r(7178),k=r(29793),z=r(75726),N=r(30417),R=r(87716),A=r(79983),E=r(89923),I=r(10297),L=r(50880),F=r(54617),D=r(42431),P=r(81960),W=r(84284),M=r(82925);function O(e){return"server"===e?M.Xn:"player"===e?M.KK:M.xg}function U(e){let t,{filters:r,onFiltersChange:i,onExport:o}=e,[d,u]=(0,s.useState)(!0),x=(t=0,r.action&&t++,r.actor&&t++,r.targetType&&t++,r.targetName&&t++,r.status&&t++,r.from&&t++,r.to&&t++,t),h=O(r.targetType),m=(e,t)=>{let n={...r};""===t||void 0===t?delete n[e]:n[e]=t,"targetType"===e&&n.action&&!O(t).includes(n.action)&&delete n.action,n.offset=0,i(n)};return(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:d?2:0},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsxs)(A.Z,{onClick:()=>u(!d),size:"small","aria-label":d?"Collapse filters":"Expand filters",children:[(0,n.jsx)(L.Z,{}),d?(0,n.jsx)(W.Z,{sx:{fontSize:14}}):(0,n.jsx)(P.Z,{sx:{fontSize:14}})]}),(0,n.jsx)(l.Z,{variant:"subtitle2",color:"text.secondary",children:"Filters"}),x>0&&(0,n.jsx)(c.Z,{label:x,size:"small",color:"primary",sx:{height:20,fontSize:"0.7rem"}})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[x>0&&(0,n.jsx)(N.Z,{size:"small",startIcon:(0,n.jsx)(F.Z,{}),onClick:()=>{i({limit:r.limit,sort:r.sort})},color:"inherit",children:"Clear All"}),o&&(0,n.jsx)(N.Z,{size:"small",variant:"outlined",onClick:o,children:"Export"})]})]}),(0,n.jsx)(R.Z,{in:d,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:2,flexWrap:"wrap"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1,alignItems:"center"},children:[(0,n.jsx)(C.Z,{type:"date",label:"From",size:"small",value:r.from?r.from.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("from",t?"".concat(t,"T00:00:00Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"~"}),(0,n.jsx)(C.Z,{type:"date",label:"To",size:"small",value:r.to?r.to.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("to",t?"".concat(t,"T23:59:59Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}})]}),(0,n.jsxs)(k.Z,{size:"small",sx:{minWidth:160},children:[(0,n.jsx)(z.Z,{children:"Action"}),(0,n.jsxs)(w.Z,{value:r.action||"",label:"Action",onChange:e=>m("action",e.target.value||void 0),children:[(0,n.jsx)(T.Z,{value:"",children:"All Actions"}),h.map(e=>(0,n.jsx)(T.Z,{value:e,children:M.n3[e]||e},e))]})]}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.targetType||"",exclusive:!0,onChange:(e,t)=>m("targetType",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All targets",children:"All"}),(0,n.jsx)(E.Z,{value:"server","aria-label":"Server targets",children:"Server"}),(0,n.jsx)(E.Z,{value:"player","aria-label":"Player targets",children:"Player"})]})}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.status||"",exclusive:!0,onChange:(e,t)=>m("status",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All statuses",children:"All"}),(0,n.jsx)(E.Z,{value:"success","aria-label":"Success only",children:"Success"}),(0,n.jsx)(E.Z,{value:"failure","aria-label":"Failure only",children:"Failure"})]})}),(0,n.jsx)(C.Z,{label:"Target Name",placeholder:"Search...",size:"small",value:r.targetName||"",onChange:e=>m("targetName",e.target.value||void 0),InputProps:{startAdornment:(0,n.jsx)(D.Z,{sx:{color:"text.secondary",mr:.5,fontSize:18}})},sx:{minWidth:160}}),(0,n.jsx)(C.Z,{label:"Actor",placeholder:"e.g., api:admin",size:"small",value:r.actor||"",onChange:e=>m("actor",e.target.value||void 0),sx:{minWidth:140}})]})})]})}var q=r(21138),K=r(84811),_=r(47001),B=r(53281),V=r(11254),X=r(70366),J=r(6406),H=r(95511),G=r(81071),Q=r(89161),Y=r(60236),$=r(27171),ee=r(30114),et=r(46725);function er(e){var t,r;let{log:i,onClick:o}=e,[d,u]=(0,s.useState)("failure"===i.status),x=i.details&&Object.keys(i.details).length>0,p="failure"===i.status&&i.errorMessage,g=x||p,j=(t=i.targetType,r=i.targetName,"server"===t?"/servers/".concat(encodeURIComponent(r)):"player"===t?"/players":null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(X.Z,{hover:!0,sx:{cursor:"pointer","&:last-child td, &:last-child th":{border:0}},onClick:()=>null==o?void 0:o(i),tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),null==o||o(i))},role:"button","aria-label":"".concat(i.action," by ").concat(i.actor," on ").concat(i.targetName),children:[(0,n.jsx)(_.Z,{padding:"checkbox",sx:{width:48},children:g&&(0,n.jsx)(A.Z,{size:"small",onClick:e=>{e.stopPropagation(),u(!d)},"aria-label":d?"Collapse details":"Expand details",children:d?(0,n.jsx)(Y.Z,{}):(0,n.jsx)(Q.Z,{})})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(H.Z,{title:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(i.timestamp),arrow:!0,children:(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/1e3),s=Math.floor(n/60),i=Math.floor(s/60),a=Math.floor(i/24);return n<60?"just now":s<60?"".concat(s,"m ago"):i<24?"".concat(i,"h ago"):a<7?"".concat(a,"d ago"):new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(r)}(i.timestamp)})})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(h.I,{action:i.action})}),(0,n.jsx)(_.Z,{children:i.actor.startsWith("cli:")?(0,n.jsx)(c.Z,{label:i.actor.replace("cli:",""),size:"small",variant:"outlined",sx:{fontSize:"0.75rem"}}):(0,n.jsx)(l.Z,{variant:"body2",children:i.actor.replace("api:","")})}),(0,n.jsx)(_.Z,{children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[function(e){switch(e){case"server":return(0,n.jsx)($.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});case"player":return(0,n.jsx)(ee.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});default:return null}}(i.targetType),j?(0,n.jsx)(et.default,{href:j,style:{textDecoration:"none"},onClick:e=>e.stopPropagation(),children:(0,n.jsx)(l.Z,{variant:"body2",sx:{color:"primary.main","&:hover":{textDecoration:"underline"}},children:i.targetName})}):(0,n.jsx)(l.Z,{variant:"body2",children:i.targetName})]})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(m.c,{status:i.status})})]}),g&&(0,n.jsx)(X.Z,{children:(0,n.jsx)(_.Z,{sx:{py:0},colSpan:6,children:(0,n.jsx)(R.Z,{in:d,timeout:"auto",unmountOnExit:!0,children:(0,n.jsxs)(a.Z,{sx:{py:2,px:2},children:[p&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:2},children:i.errorMessage}),x&&(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{mb:1,display:"block"},children:"Details"}),(0,n.jsx)(q.Z,{size:"small",sx:{width:"auto"},children:(0,n.jsx)(K.Z,{children:Object.entries(i.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0},children:t}),(0,n.jsx)(_.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]})]})})})})]})}function en(e){let{logs:t,total:r,isLoading:s,error:i,filters:a,onFiltersChange:c,onRowClick:d,onRetry:u}=e,x=Math.floor((a.offset||0)/(a.limit||50)),h=a.limit||50;return s?(0,n.jsx)(o.Z,{children:(0,n.jsx)(B.Z,{children:(0,n.jsxs)(q.Z,{children:[(0,n.jsx)(V.Z,{children:(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox"}),(0,n.jsx)(_.Z,{children:"Timestamp"}),(0,n.jsx)(_.Z,{children:"Action"}),(0,n.jsx)(_.Z,{children:"Actor"}),(0,n.jsx)(_.Z,{children:"Target"}),(0,n.jsx)(_.Z,{children:"Status"})]})}),(0,n.jsx)(K.Z,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox"}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(v.Z,{variant:"text",width:80})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(v.Z,{variant:"rounded",width:70,height:24})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(v.Z,{variant:"text",width:60})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(v.Z,{variant:"text",width:100})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(v.Z,{variant:"rounded",width:50,height:24})})]},t))})]})})}):i?(0,n.jsx)(G.Z,{severity:"error",action:u&&(0,n.jsx)(N.Z,{color:"inherit",size:"small",onClick:u,children:"Retry"}),children:i.message||"Failed to load audit logs"}):0===t.length?(0,n.jsxs)(o.Z,{sx:{p:6,textAlign:"center"},children:[(0,n.jsx)(f.Z,{sx:{fontSize:64,color:"text.disabled",mb:2}}),(0,n.jsx)(l.Z,{variant:"h6",color:"text.secondary",gutterBottom:!0,children:"No audit logs found"}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.disabled",sx:{mb:2},children:"Try adjusting your filters or check back later."}),(0,n.jsx)(N.Z,{variant:"outlined",size:"small",onClick:()=>c({limit:a.limit,sort:a.sort}),children:"Reset Filters"})]}):(0,n.jsxs)(o.Z,{children:[(0,n.jsx)(B.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(q.Z,{size:"small",children:[(0,n.jsx)(V.Z,{children:(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox",sx:{width:48}}),(0,n.jsx)(_.Z,{sx:{fontWeight:600,whiteSpace:"nowrap"},children:"Timestamp"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Action"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Actor"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Target"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Status"})]})}),(0,n.jsx)(K.Z,{children:t.map(e=>(0,n.jsx)(er,{log:e,onClick:d},e.id))})]})}),(0,n.jsx)(J.Z,{component:"div",count:r,page:x,onPageChange:(e,t)=>{c({...a,offset:t*h})},rowsPerPage:h,onRowsPerPageChange:e=>{let t=parseInt(e.target.value,10);c({...a,limit:t,offset:0})},rowsPerPageOptions:[25,50,100],"aria-label":"Audit log pagination"})]})}var es=r(62142),ei=r(69123),ea=r(33402),eo=r(60097),el=r(90158),ec=r(58347),ed=r(73424),eu=r(93017),ex=r(71185),eh=r(84509);function em(e){let{logs:t}=e;return 0===t.length?(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No related logs found"}):(0,n.jsx)(el.Z,{dense:!0,sx:{py:0},children:t.map(e=>(0,n.jsx)(ec.ZP,{sx:{px:0,py:1,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(ed.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(h.I,{action:e.action,size:"small"}),e.targetName&&(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e.targetName})]}),secondary:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})},e.id))})}function ep(e){var t,r,i,o,c;let{log:d,open:u,onClose:x}=e,[p,g]=(0,s.useState)(0),{data:j,isLoading:v}=(0,eh.VM)(null!==(t=null==d?void 0:d.id)&&void 0!==t?t:null,{enabled:u&&!!d});return(0,n.jsxs)(es.ZP,{anchor:"right",open:u,onClose:x,sx:{"& .MuiDrawer-paper":{width:{xs:"100%",sm:420},maxWidth:"100%"}},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(l.Z,{variant:"h6",component:"h2",children:"Audit Log Detail"}),(0,n.jsx)(A.Z,{onClick:x,"aria-label":"Close detail drawer",autoFocus:!0,children:(0,n.jsx)(ex.Z,{})})]}),(0,n.jsx)(a.Z,{sx:{p:2,overflow:"auto",flex:1},children:d?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"ID"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontSize:"0.8rem",wordBreak:"break-all"},children:d.id})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Timestamp"}),(0,n.jsx)(l.Z,{variant:"body2",children:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(d.timestamp)})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:3,mb:3},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Action"}),(0,n.jsx)(h.I,{action:d.action,size:"medium"})]}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Status"}),(0,n.jsx)(m.c,{status:d.status,size:"medium"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Actor"}),(0,n.jsx)(l.Z,{variant:"body2",children:d.actor})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Target"}),(0,n.jsxs)(l.Z,{variant:"body2",children:[d.targetType,"/",d.targetName]})]}),"failure"===d.status&&d.errorMessage&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:3},children:d.errorMessage}),d.details&&Object.keys(d.details).length>0&&(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(ei.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Details"}),(0,n.jsx)(q.Z,{size:"small",children:(0,n.jsx)(K.Z,{children:Object.entries(d.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0,width:"40%"},children:t}),(0,n.jsx)(_.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]}),(0,n.jsx)(ei.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Related Logs"}),v?(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:3},children:(0,n.jsx)(eu.Z,{size:24})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ea.Z,{value:p,onChange:(e,t)=>g(t),sx:{mb:1},children:[(0,n.jsx)(eo.Z,{label:"Same Target (".concat(null!==(r=null==j?void 0:j.relatedLogs.sameTarget.length)&&void 0!==r?r:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}}),(0,n.jsx)(eo.Z,{label:"Same Actor (".concat(null!==(i=null==j?void 0:j.relatedLogs.sameActor.length)&&void 0!==i?i:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}})]}),0===p&&(0,n.jsx)(em,{logs:null!==(o=null==j?void 0:j.relatedLogs.sameTarget)&&void 0!==o?o:[]}),1===p&&(0,n.jsx)(em,{logs:null!==(c=null==j?void 0:j.relatedLogs.sameActor)&&void 0!==c?c:[]})]})]}):(0,n.jsx)(l.Z,{color:"text.secondary",children:"No log selected"})})]})}var eg=r(99770),ej=r(62508),ev=r(5682),ef=r(76678),eZ=r(15761);function ey(e){let{open:t,onClose:r,filters:i,totalCount:o}=e,[c,d]=(0,s.useState)("csv"),[u,x]=(0,s.useState)(!1),[h,m]=(0,s.useState)(null),p=function(e){let t=[];return e.action&&t.push("Action: ".concat(e.action)),e.actor&&t.push("Actor: ".concat(e.actor)),e.targetType&&t.push("Type: ".concat(e.targetType)),e.targetName&&t.push("Target: ".concat(e.targetName)),e.status&&t.push("Status: ".concat(e.status)),e.from&&t.push("From: ".concat(e.from.split("T")[0])),e.to&&t.push("To: ".concat(e.to.split("T")[0])),t}(i),g=async()=>{x(!0),m(null);try{let e=function(e,t){let r=new URLSearchParams;return r.set("format",t),e.action&&r.set("action",e.action),e.actor&&r.set("actor",e.actor),e.targetType&&r.set("targetType",e.targetType),e.targetName&&r.set("targetName",e.targetName),e.status&&r.set("status",e.status),e.from&&r.set("from",e.from),e.to&&r.set("to",e.to),"/api/audit-logs/export?".concat(r.toString())}(i,c),t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({message:"Export failed"}));throw Error(e.message||"Export failed")}let n=await t.blob(),s=window.URL.createObjectURL(n),a=document.createElement("a");a.href=s;let o=t.headers.get("Content-Disposition"),l=null==o?void 0:o.match(/filename="?([^"]+)"?/);a.download=(null==l?void 0:l[1])||"audit-logs.".concat(c),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s),r()}catch(e){m(e instanceof Error?e.message:"Export failed")}finally{x(!1)}};return(0,n.jsxs)(eg.Z,{open:t,onClose:r,maxWidth:"sm",fullWidth:!0,children:[(0,n.jsx)(ej.Z,{children:"Export Audit Logs"}),(0,n.jsxs)(ev.Z,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Format"}),(0,n.jsxs)(I.Z,{value:c,exclusive:!0,onChange:(e,t)=>t&&d(t),size:"small",children:[(0,n.jsx)(E.Z,{value:"csv",children:"CSV"}),(0,n.jsx)(E.Z,{value:"json",children:"JSON"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Applied Filters"}),p.length>0?(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:p.map(e=>(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e},e))}):(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"No filters applied (all logs)"})]}),(0,n.jsxs)(a.Z,{sx:{mb:2},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:.5},children:"Estimated Rows"}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[Math.min(o,5e3).toLocaleString()," rows"]})]}),o>5e3&&(0,n.jsxs)(G.Z,{severity:"warning",sx:{mb:2},children:["Export is limited to ",5e3.toLocaleString()," rows. Total matching logs: ",o.toLocaleString(),". Consider narrowing your filters for a complete export."]}),h&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:2},children:h})]}),(0,n.jsxs)(ef.Z,{children:[(0,n.jsx)(N.Z,{onClick:r,disabled:u,children:"Cancel"}),(0,n.jsx)(N.Z,{variant:"contained",startIcon:u?(0,n.jsx)(eu.Z,{size:16,color:"inherit"}):(0,n.jsx)(eZ.Z,{}),onClick:g,disabled:u,children:u?"Exporting...":"Export ".concat(c.toUpperCase())})]})]})}var eb=r(93757);function eS(){var e,t,r;let h=(0,i.useRouter)(),m=(0,i.useSearchParams)(),[p,g]=(0,s.useState)(()=>(function(e){let t={},r=e.get("action"),n=e.get("actor"),s=e.get("targetType"),i=e.get("targetName"),a=e.get("status"),o=e.get("from"),l=e.get("to"),c=e.get("limit"),d=e.get("offset"),u=e.get("sort");return r&&(t.action=r),n&&(t.actor=n),s&&(t.targetType=s),i&&(t.targetName=i),a&&(t.status=a),o&&(t.from=o),l&&(t.to=l),c&&(t.limit=parseInt(c,10)),d&&(t.offset=parseInt(d,10)),("timestamp:asc"===u||"timestamp:desc"===u)&&(t.sort=u),t})(m)),[j,v]=(0,s.useState)(null),[f,Z]=(0,s.useState)(!1),[y,b]=(0,s.useState)(!1),[C,w]=(0,s.useState)(0),T=(0,s.useRef)(new Set),{data:k,isLoading:z,error:N,refetch:R}=(0,eh.hT)(p),{data:A,isLoading:E}=(0,eh.DM)(),{isConnected:I}=(0,eb.D)({url:"/api/audit-logs/stream",enabled:!0,onMessage:(0,s.useCallback)(e=>{if("audit-log"===e.type){let t=e.data;if("id"in t&&"string"==typeof t.id){if(T.current.has(t.id))return;if(T.current.add(t.id),T.current.size>1e3){let e=Array.from(T.current);T.current=new Set(e.slice(e.length-500))}}w(e=>e+1)}},[]),reconnectInterval:3e3,maxReconnectAttempts:1/0});(0,s.useEffect)(()=>{let e=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.limit&&50!==e.limit&&t.set("limit",String(e.limit)),e.offset&&e.offset>0&&t.set("offset",String(e.offset)),e.sort&&"timestamp:desc"!==e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(p);e!==(m.toString()?"?".concat(m.toString()):"")&&h.replace("/audit-logs".concat(e),{scroll:!1})},[p,h,m]);let L=(0,s.useCallback)(e=>{g(e),w(0)},[]),F=(0,s.useCallback)(e=>{v(e),Z(!0)},[]),D=(0,s.useCallback)(()=>{w(0),R()},[R]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,d.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,d.Fq)(e.palette.error.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,d.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(u.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Audit Log"}),(0,n.jsx)(c.Z,{icon:(0,n.jsx)(x.Z,{sx:{fontSize:10,color:I?"success.main":"text.disabled",animation:I?"pulse 2s infinite":"none","@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}}}),label:I?"Live":"Offline",size:"small",variant:"outlined",sx:{fontSize:"0.7rem"}})]}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Monitor all management activities across your servers"})]})]})}),(0,n.jsx)(a.Z,{sx:{mb:3},children:(0,n.jsx)(S,{stats:A,isLoading:E})}),C>0&&(0,n.jsx)(a.Z,{sx:{mb:2,p:1.5,textAlign:"center",bgcolor:"primary.main",color:"primary.contrastText",borderRadius:1,cursor:"pointer","&:hover":{opacity:.9}},onClick:D,role:"button","aria-label":"".concat(C," new logs, click to refresh"),children:(0,n.jsxs)(l.Z,{variant:"body2",fontWeight:600,children:[C," new ",1===C?"log":"logs"," available - Click to refresh"]})}),(0,n.jsx)(U,{filters:p,onFiltersChange:L,onExport:()=>b(!0)}),(0,n.jsx)(en,{logs:null!==(e=null==k?void 0:k.logs)&&void 0!==e?e:[],total:null!==(t=null==k?void 0:k.total)&&void 0!==t?t:0,isLoading:z,error:N,filters:p,onFiltersChange:L,onRowClick:F,onRetry:()=>R()}),(0,n.jsx)(ep,{log:j,open:f,onClose:()=>{Z(!1),v(null)}}),(0,n.jsx)(ey,{open:y,onClose:()=>b(!1),filters:p,totalCount:null!==(r=null==k?void 0:k.total)&&void 0!==r?r:0})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",o=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:o,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function o(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},42936:function(e,t,r){"use strict";async function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...t.headers};t.body&&(r["Content-Type"]="application/json");let n=await fetch(e,{...t,headers:r});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText})),t=Error(e.message);throw t.statusCode=n.status,t.code=e.error,t}return n.json()}r.d(t,{SC:function(){return n}})},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return l},VM:function(){return o},hT:function(){return i},oL:function(){return c}});var n=r(5632),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function o(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function l(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},93757:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(35106);class s{connect(e){this.options=e,this.shouldReconnect=!0,this.establishConnection()}establishConnection(){this.options&&(this.updateState("connecting"),this.eventSource&&this.eventSource.close(),this.eventSource=new EventSource(this.options.url,{withCredentials:this.options.withCredentials||!1}),this.eventSource.onopen=()=>{this.updateState("connected"),this.retryCount=0,this.lastError=null},this.eventSource.onmessage=e=>{if(!e.data.startsWith(":"))try{var t,r;let n=JSON.parse(e.data);null===(r=this.options)||void 0===r||null===(t=r.onMessage)||void 0===t||t.call(r,n)}catch(e){console.warn("Failed to parse SSE message:",e)}},this.eventSource.onerror=()=>{var e,t;let r={message:"SSE connection error",code:"CONNECTION_ERROR",retryCount:this.retryCount,timestamp:new Date};this.lastError=r,this.updateState("error"),null===(t=this.options)||void 0===t||null===(e=t.onError)||void 0===e||e.call(t,r),this.shouldReconnect&&this.scheduleReconnect()})}scheduleReconnect(){var e,t;if(!this.options)return;let r=null!==(e=this.options.maxReconnectAttempts)&&void 0!==e?e:1/0;if(this.retryCount>=r)return;this.reconnectTimer&&clearTimeout(this.reconnectTimer);let n=null!==(t=this.options.reconnectInterval)&&void 0!==t?t:3e3;this.reconnectTimer=setTimeout(()=>{this.retryCount++,this.establishConnection()},n)}disconnect(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.updateState("disconnected")}getState(){return this.state}isConnected(){return"connected"===this.state}getLastError(){return this.lastError}getRetryCount(){return this.retryCount}reconnect(){this.retryCount++,this.shouldReconnect=!0,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.establishConnection()}updateState(e){var t,r;this.state=e,null===(r=this.options)||void 0===r||null===(t=r.onStateChange)||void 0===t||t.call(r,e)}constructor(){this.eventSource=null,this.state="disconnected",this.retryCount=0,this.lastError=null,this.reconnectTimer=null,this.options=null,this.shouldReconnect=!0}}function i(e){let{url:t,onMessage:r,onError:i,reconnectInterval:a=3e3,maxReconnectAttempts:o=1/0,enabled:l=!0,withCredentials:c=!1}=e,[d,u]=(0,n.useState)(null),[x,h]=(0,n.useState)("disconnected"),[m,p]=(0,n.useState)(null),[g,j]=(0,n.useState)(0),v=(0,n.useRef)(null),f=(0,n.useCallback)(e=>{u(e),null==r||r(e)},[r]),Z=(0,n.useCallback)(e=>{h(e),"connected"===e&&j(0)},[]),y=(0,n.useCallback)(e=>{p(e),"number"==typeof e.retryCount&&j(e.retryCount),null==i||i(e)},[i]),b=(0,n.useCallback)(()=>{v.current&&(v.current.reconnect(),j(v.current.getRetryCount()))},[]),S=(0,n.useCallback)(()=>{v.current&&v.current.disconnect()},[]);return(0,n.useEffect)(()=>{if(!l){v.current&&(v.current.disconnect(),v.current=null);return}return v.current||(v.current=new s),v.current.connect({url:t,onMessage:f,onStateChange:Z,onError:y,reconnectInterval:a,maxReconnectAttempts:o,withCredentials:c}),()=>{v.current&&(v.current.disconnect(),v.current=null)}},[t,l,a,o,c,f,Z,y]),{data:d,isConnected:"connected"===x,state:x,error:m,retryCount:g,reconnect:b,disconnect:S}}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return o},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],o=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,880,5511,55,2844,8347,7073,4474,4240,2698,3669,2757,1744],function(){return e(e.s=3590)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return B}});var n=t(94655),i=t(35106),a=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(62142),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690),A=t(6986);let D=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function T(e){let{mobileOpen:r,onMenuToggle:t}=e,i=(0,s.usePathname)(),{data:y}=(0,A.kP)(),v=e=>"/dashboard"===e?"/dashboard"===i||"/"===i:i.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(a.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(a.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var _=t(67337),E=t(41261),q=t(69123),M=t(75845),L=t(43880);function R(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let U=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function H(){let e=new Date().getFullYear();return(0,n.jsx)(a.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(_.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(a.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:U.map(e=>(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(a.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(a.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(E.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(q.Z,{sx:{mb:3}}),(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(R,{fontSize:"small"})})]})]})]})})}function B(e){let{children:r}=e,[t,s]=(0,i.useState)(!1);return(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(T,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(a.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(H,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return I}});var n=t(94655),i=t(35106),a=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(!1),[j,y]=(0,i.useState)({}),[v,Z]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.cg.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[v,Z]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[k,S]=(0,i.useState)({}),[P,z]=(0,i.useState)(null),[I,W]=(0,i.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(88812),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(25169),P=t(41094),z=t(78319);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,i.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(a.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),"admin"===h.role&&(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Users"})]}),(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Settings"})]}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(z.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),i=t(35106),a=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,a.usePathname)(),s=(0,a.useSearchParams)();return(0,i.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{Cp:function(){return h},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return m}});var n=t(77054),i=t(61648),a=t(35016);let s=(0,n.X)({baseURL:a.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:h}=s,m=s.admin}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,2542,55,2539,8347,9949,4240,212,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return B}});var n=t(94655),i=t(35106),a=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(62142),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690),A=t(6986);let D=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function T(e){let{mobileOpen:r,onMenuToggle:t}=e,i=(0,s.usePathname)(),{data:y}=(0,A.kP)(),v=e=>"/dashboard"===e?"/dashboard"===i||"/"===i:i.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(a.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:2,color:r?"primary.main":"text.secondary",backgroundColor:r?"action.selected":"transparent",transition:"all 0.2s ease","&:hover":{backgroundColor:"action.hover",color:r?"primary.main":"text.primary"}},children:[(0,n.jsx)(a.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let r=v(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var _=t(67337),E=t(41261),q=t(69123),M=t(75845),L=t(43880);function R(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let U=[{title:"Resources",links:[{label:"Getting Started",href:"https://minecraft-server-manager.readthedocs.io/en/latest/getting-started/",external:!0},{label:"Configuration",href:"https://minecraft-server-manager.readthedocs.io/en/latest/configuration/",external:!0},{label:"Troubleshooting",href:"https://minecraft-server-manager.readthedocs.io/en/latest/troubleshooting/",external:!0}]},{title:"Documentation",links:[{label:"CLI Commands",href:"https://minecraft-server-manager.readthedocs.io/en/latest/cli/",external:!0},{label:"API Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/console/",external:!0},{label:"itzg Reference",href:"https://minecraft-server-manager.readthedocs.io/en/latest/itzg-reference/",external:!0}]},{title:"Community",links:[{label:"GitHub",href:"https://github.com/smallmiro/minecraft-server-manager",external:!0},{label:"Issues",href:"https://github.com/smallmiro/minecraft-server-manager/issues",external:!0}]},{title:"About",links:[{label:"License",href:"https://github.com/smallmiro/minecraft-server-manager/blob/main/LICENSE",external:!0},{label:"Docker Hub",href:"https://hub.docker.com/r/itzg/minecraft-server",external:!0}]}];function H(){let e=new Date().getFullYear();return(0,n.jsx)(a.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(_.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(a.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:U.map(e=>(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(a.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(a.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(E.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(q.Z,{sx:{mb:3}}),(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(E.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(E.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(R,{fontSize:"small"})})]})]})]})})}function B(e){let{children:r}=e,[t,s]=(0,i.useState)(!1);return(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(T,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(a.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(H,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return I}});var n=t(94655),i=t(35106),a=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(!1),[j,y]=(0,i.useState)({}),[v,Z]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.cg.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,b]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[v,Z]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[k,S]=(0,i.useState)({}),[P,z]=(0,i.useState)(null),[I,W]=(0,i.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(a.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(88812),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(25169),P=t(41094),z=t(78319);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,i.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(a.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),"admin"===h.role&&(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Users"})]}),(0,n.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Settings"})]}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(z.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),i=t(35106),a=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,a.usePathname)(),s=(0,a.useSearchParams)();return(0,i.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{Cp:function(){return h},Nq:function(){return x},cg:function(){return l},kP:function(){return d},w7:function(){return o},y1:function(){return c},zB:function(){return m}});var n=t(77054),i=t(61648),a=t(35016);let s=(0,n.X)({baseURL:a.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]}),{signIn:l,signOut:o,signUp:c,useSession:d,updateUser:x,changePassword:h}=s,m=s.admin}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,2542,55,4219,8347,9097,4240,4036,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[781],{31809:function(e,r,n){Promise.resolve().then(n.bind(n,12192))},69366:function(e,r,n){"use strict";var a=n(8091);r.Z=void 0;var s=a(n(66758)),t=n(94655);r.Z=(0,s.default)((0,t.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh")},42431:function(e,r,n){"use strict";var a=n(8091);r.Z=void 0;var s=a(n(66758)),t=n(94655);r.Z=(0,s.default)((0,t.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search")},76678:function(e,r,n){"use strict";n.d(r,{Z:function(){return Z}});var a=n(32324),s=n(81500),t=n(35106),i=n(70316),l=n(65951),o=n(34519),c=n(28057),d=n(11379),x=n(9049);function u(e){return(0,x.ZP)("MuiDialogActions",e)}(0,d.Z)("MuiDialogActions",["root","spacing"]);var h=n(94655);let p=["className","disableSpacing"],y=e=>{let{classes:r,disableSpacing:n}=e;return(0,l.Z)({root:["root",!n&&"spacing"]},u,r)},m=(0,o.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,r)=>{let{ownerState:n}=e;return[r.root,!n.disableSpacing&&r.spacing]}})(e=>{let{ownerState:r}=e;return(0,s.Z)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!r.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})});var Z=t.forwardRef(function(e,r){let n=(0,c.i)({props:e,name:"MuiDialogActions"}),{className:t,disableSpacing:l=!1}=n,o=(0,a.Z)(n,p),d=(0,s.Z)({},n,{disableSpacing:l}),x=y(d);return(0,h.jsx)(m,(0,s.Z)({className:(0,i.Z)(x.root,t),ownerState:d,ref:r},o))})},73424:function(e,r,n){"use strict";var a=n(32324),s=n(81500),t=n(35106),i=n(70316),l=n(65951),o=n(31317),c=n(75084),d=n(28057),x=n(34519),u=n(64769),h=n(94655);let p=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],y=e=>{let{classes:r,inset:n,primary:a,secondary:s,dense:t}=e;return(0,l.Z)({root:["root",n&&"inset",t&&"dense",a&&s&&"multiline"],primary:["primary"],secondary:["secondary"]},u.L,r)},m=(0,x.ZP)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,r)=>{let{ownerState:n}=e;return[{["& .".concat(u.Z.primary)]:r.primary},{["& .".concat(u.Z.secondary)]:r.secondary},r.root,n.inset&&r.inset,n.primary&&n.secondary&&r.multiline,n.dense&&r.dense]}})(e=>{let{ownerState:r}=e;return(0,s.Z)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},r.primary&&r.secondary&&{marginTop:6,marginBottom:6},r.inset&&{paddingLeft:56})}),Z=t.forwardRef(function(e,r){let n=(0,d.i)({props:e,name:"MuiListItemText"}),{children:l,className:x,disableTypography:u=!1,inset:Z=!1,primary:j,primaryTypographyProps:v,secondary:b,secondaryTypographyProps:f}=n,g=(0,a.Z)(n,p),{dense:k}=t.useContext(c.Z),C=null!=j?j:l,P=b,S=(0,s.Z)({},n,{disableTypography:u,inset:Z,primary:!!C,secondary:!!P,dense:k}),w=y(S);return null==C||C.type===o.Z||u||(C=(0,h.jsx)(o.Z,(0,s.Z)({variant:k?"body2":"body1",className:w.primary,component:null!=v&&v.variant?void 0:"span",display:"block"},v,{children:C}))),null==P||P.type===o.Z||u||(P=(0,h.jsx)(o.Z,(0,s.Z)({variant:"body2",className:w.secondary,color:"text.secondary",display:"block"},f,{children:P}))),(0,h.jsxs)(m,(0,s.Z)({className:(0,i.Z)(w.root,x),ownerState:S,ref:r},g,{children:[C,P]}))});r.Z=Z},64769:function(e,r,n){"use strict";n.d(r,{L:function(){return t}});var a=n(11379),s=n(9049);function t(e){return(0,s.ZP)("MuiListItemText",e)}let i=(0,a.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);r.Z=i},12192:function(e,r,n){"use strict";n.r(r),n.d(r,{default:function(){return $}});var a=n(94655),s=n(35106),t=n(7281),i=n(31317),l=n(84840),o=n(33402),c=n(60097),d=n(29793),x=n(75726),u=n(62328),h=n(7178),p=n(69899),y=n(76492),m=n(35847),Z=n(628),j=n(41565),v=n(90158),b=n(58347),f=n(73424),g=n(69783),k=n(86702),C=n(79983),P=n(30417),S=n(25333),w=n(99770),L=n(62508),N=n(5682),R=n(65087),T=n(76678),M=n(97436),A=n(93017),I=n(81071),O=n(66561),B=n(12795),E=n(96407),F=n(69366),W=n(11597),_=n(81960),z=n(30114);function D(e){let{onPlayerKicked:r}=e,[n,l]=(0,s.useState)(!0),[o,c]=(0,s.useState)(null),[d,x]=(0,s.useState)([]),[u,h]=(0,s.useState)(!1),[p,y]=(0,s.useState)(null),[m,D]=(0,s.useState)(""),[K,q]=(0,s.useState)(!1),J=(0,s.useCallback)(async()=>{l(!0),c(null);try{let e=await fetch("/api/players");if(!e.ok)throw Error("Failed to fetch players");let r=await e.json();x(r.servers)}catch(e){c("Failed to load players"),console.error("Error fetching players:",e)}finally{l(!1)}},[]);(0,s.useEffect)(()=>{J()},[J]);let V=(e,r)=>{y({player:e,server:r}),D(""),h(!0)},Y=async()=>{if(p){q(!0);try{if(!(await fetch("/api/players/kick",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:p.player.name,server:p.server,reason:m||"Kicked by administrator"})})).ok)throw Error("Failed to kick player");h(!1),y(null),null==r||r(p.player,p.server),await J()}catch(e){console.error("Error kicking player:",e)}finally{q(!1)}}},$=d.some(e=>e.players.length>0);return(0,a.jsx)(Z.Z,{"data-testid":"player-list",children:(0,a.jsxs)(j.Z,{children:[(0,a.jsxs)(t.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,a.jsx)(i.Z,{variant:"h6",children:"Online Players"}),(0,a.jsx)(C.Z,{onClick:J,disabled:n,"aria-label":"Refresh",children:(0,a.jsx)(F.Z,{})})]}),n&&(0,a.jsx)(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:(0,a.jsx)(A.Z,{})}),o&&(0,a.jsx)(I.Z,{severity:"error",sx:{mb:2},children:o}),!n&&!o&&!$&&(0,a.jsx)(i.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players online"}),!n&&!o&&$&&(0,a.jsx)(t.Z,{children:d.map(e=>(0,a.jsxs)(O.Z,{defaultExpanded:e.players.length>0,children:[(0,a.jsx)(B.Z,{expandIcon:(0,a.jsx)(_.Z,{}),children:(0,a.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:2,width:"100%"},children:[(0,a.jsx)(i.Z,{variant:"subtitle1",sx:{fontWeight:500},children:e.name}),(0,a.jsx)(S.Z,{label:"".concat(e.players.length," player").concat(1!==e.players.length?"s":""),size:"small",color:e.players.length>0?"success":"default"})]})}),(0,a.jsx)(E.Z,{children:0===e.players.length?(0,a.jsx)(i.Z,{color:"text.secondary",sx:{fontStyle:"italic"},children:"No players online on this server"}):(0,a.jsx)(v.Z,{dense:!0,children:e.players.map(r=>(0,a.jsxs)(b.ZP,{secondaryAction:(0,a.jsx)(C.Z,{edge:"end","aria-label":"Kick player",onClick:()=>V(r,e.name),color:"error",children:(0,a.jsx)(W.Z,{})}),children:[(0,a.jsx)(g.Z,{children:(0,a.jsx)(k.Z,{src:"https://mc-heads.net/avatar/".concat(r.uuid,"/40"),alt:r.name,children:(0,a.jsx)(z.Z,{})})}),(0,a.jsx)(f.Z,{primary:r.name,secondary:r.uuid.substring(0,8)+"..."})]},r.uuid))})})]},e.name))}),(0,a.jsxs)(w.Z,{open:u,onClose:()=>h(!1),children:[(0,a.jsx)(L.Z,{children:"Kick Player"}),(0,a.jsxs)(N.Z,{children:[(0,a.jsxs)(R.Z,{children:["Are you sure you want to kick ",null==p?void 0:p.player.name," from ",null==p?void 0:p.server,"?"]}),(0,a.jsx)(M.Z,{autoFocus:!0,margin:"dense",label:"Reason (optional)",fullWidth:!0,variant:"outlined",value:m,onChange:e=>D(e.target.value),placeholder:"Kicked by administrator"})]}),(0,a.jsxs)(T.Z,{children:[(0,a.jsx)(P.Z,{onClick:()=>h(!1),disabled:K,children:"Cancel"}),(0,a.jsx)(P.Z,{onClick:Y,color:"error",variant:"contained",disabled:K,"aria-label":"Confirm kick",children:K?(0,a.jsx)(A.Z,{size:20}):"Confirm"})]})]})]})})}var K=n(61650),q=n(73729),J=n(41189),V=n(92666);function Y(e){let{children:r,value:n,index:s}=e;return(0,a.jsx)("div",{role:"tabpanel",hidden:n!==s,children:n===s&&(0,a.jsx)(t.Z,{sx:{py:3},children:r})})}function $(){let[e,r]=(0,s.useState)(0),[n,Z]=(0,s.useState)(""),{data:j,isLoading:v}=(0,V.x$)(),b=null==j?void 0:j.servers;return(0,s.useEffect)(()=>{!n&&b&&b.length>0&&Z(b[0].name)},[b,n]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,y.Fq)(e.palette.info.main,.1)," 0%, ").concat((0,y.Fq)(e.palette.secondary.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,y.Fq)(e.palette.info.main,.2))},children:(0,a.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,a.jsx)(t.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"info.main",color:"info.contrastText"},children:(0,a.jsx)(m.Z,{sx:{fontSize:32}})}),(0,a.jsxs)(t.Z,{children:[(0,a.jsx)(i.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Player Management"}),(0,a.jsx)(i.Z,{variant:"body1",color:"text.secondary",children:"Manage players, whitelist, operators, and bans across your servers"})]})]})}),(0,a.jsx)(t.Z,{sx:{mb:3},children:(0,a.jsxs)(d.Z,{sx:{minWidth:200},children:[(0,a.jsx)(x.Z,{id:"server-select-label",children:"Server"}),(0,a.jsx)(u.Z,{labelId:"server-select-label",value:n,label:"Server",onChange:e=>Z(e.target.value),disabled:v,children:null==b?void 0:b.map(e=>(0,a.jsx)(h.Z,{value:e.name,children:e.name},e.name))})]})}),(0,a.jsx)(t.Z,{sx:{borderBottom:1,borderColor:"divider"},children:(0,a.jsxs)(o.Z,{value:e,onChange:(e,n)=>{r(n)},"aria-label":"Player management tabs",children:[(0,a.jsx)(c.Z,{label:"Online Players"}),(0,a.jsx)(c.Z,{label:"Whitelist",disabled:!n}),(0,a.jsx)(c.Z,{label:"Operators",disabled:!n}),(0,a.jsx)(c.Z,{label:"Ban List",disabled:!n})]})}),(0,a.jsx)(Y,{value:e,index:0,children:(0,a.jsx)(D,{})}),(0,a.jsx)(Y,{value:e,index:1,children:n&&(0,a.jsxs)(l.ZP,{container:!0,spacing:3,children:[(0,a.jsx)(l.ZP,{item:!0,xs:12,md:8,children:(0,a.jsx)(K.Z,{serverName:n})}),(0,a.jsx)(l.ZP,{item:!0,xs:12,md:4,children:(0,a.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,a.jsx)(i.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Whitelist"}),(0,a.jsx)(i.Z,{variant:"body2",color:"text.secondary",children:"The whitelist controls which players can join your server. When enabled, only players on the whitelist can connect. Add players by their Minecraft username."})]})})]})}),(0,a.jsx)(Y,{value:e,index:2,children:n&&(0,a.jsxs)(l.ZP,{container:!0,spacing:3,children:[(0,a.jsx)(l.ZP,{item:!0,xs:12,md:8,children:(0,a.jsx)(q.d,{serverName:n})}),(0,a.jsx)(l.ZP,{item:!0,xs:12,md:4,children:(0,a.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,a.jsx)(i.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Operators"}),(0,a.jsx)(i.Z,{variant:"body2",color:"text.secondary",children:"Operators (OPs) have elevated permissions on the server. They can use commands like /give, /gamemode, /tp, and more. OP levels range from 1-4, with 4 being the highest."}),(0,a.jsxs)(t.Z,{sx:{mt:2},children:[(0,a.jsx)(i.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 1: Can bypass spawn protection"}),(0,a.jsx)(i.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 2: Can use /clear, /gamemode, etc."}),(0,a.jsx)(i.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 3: Can use /ban, /kick, /op, etc."}),(0,a.jsx)(i.Z,{variant:"caption",color:"text.secondary",component:"div",children:"Level 4: Can use /stop, full access"})]})]})})]})}),(0,a.jsx)(Y,{value:e,index:3,children:n&&(0,a.jsxs)(l.ZP,{container:!0,spacing:3,children:[(0,a.jsx)(l.ZP,{item:!0,xs:12,md:8,children:(0,a.jsx)(J.Z,{serverName:n})}),(0,a.jsx)(l.ZP,{item:!0,xs:12,md:4,children:(0,a.jsxs)(t.Z,{sx:{p:2,bgcolor:"background.paper",borderRadius:1},children:[(0,a.jsx)(i.Z,{variant:"subtitle2",color:"text.secondary",gutterBottom:!0,children:"About Bans"}),(0,a.jsx)(i.Z,{variant:"body2",color:"text.secondary",children:"Banned players cannot connect to your server. You can ban players by username and provide an optional reason. Bans can be removed (pardoned) at any time."})]})})]})})]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,880,4219,8347,4841,1658,4474,9788,2666,5498,3669,2757,1744],function(){return e(e.s=31809)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148],{61943:function(e,t,i){Promise.resolve().then(i.bind(i,34488))},34488:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return p}});var n=i(94655),r=i(7281),s=i(84840),a=i(31317),x=i(10721),l=i(81071),d=i(628),o=i(41565),c=i(69899),h=i(76492),j=i(29983),u=i(92666),Z=i(57965);function g(e){let{rows:t}=e;return(0,n.jsx)(d.Z,{children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"50%",height:32})]}),[...Array(t)].map((e,t)=>(0,n.jsxs)(r.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(x.Z,{variant:"text",width:"35%"}),(0,n.jsx)(x.Z,{variant:"text",width:"40%"})]},t))]})})}function m(){return(0,n.jsx)(d.Z,{sx:{height:"100%"},children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:32}),(0,n.jsxs)(r.Z,{sx:{ml:"auto",display:"flex",gap:1},children:[(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24}),(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24})]})]}),(0,n.jsx)(x.Z,{variant:"text",width:"30%",sx:{mt:3,mb:1}}),[0,1].map(e=>(0,n.jsxs)(r.Z,{sx:{border:1,borderColor:"divider",p:2,"&:not(:last-child)":{borderBottom:0}},children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1.5},children:[(0,n.jsx)(x.Z,{variant:"circular",width:10,height:10}),(0,n.jsx)(x.Z,{variant:"text",width:"25%"}),(0,n.jsx)(x.Z,{variant:"text",width:"15%"}),(0,n.jsx)(x.Z,{variant:"text",width:"10%",sx:{ml:"auto"}})]}),[0,1,2].map(e=>(0,n.jsx)(x.Z,{variant:"text",width:"70%",sx:{ml:2.5}},e))]},e))]})})}function p(){let{data:e,isLoading:t,error:i}=(0,u.nv)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,h.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,h.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,h.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(r.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(j.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(r.Z,{children:[(0,n.jsx)(a.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Routing"}),(0,n.jsx)(a.Z,{variant:"body1",color:"text.secondary",children:"Server routing and network configuration"})]})]})}),i&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to load router status: ",i.message]}),t?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:1})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(m,{})})]}):(null==e?void 0:e.router)?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(Z.hI,{router:e.router}),(0,n.jsx)(Z.SB,{router:e.router}),(0,n.jsx)(Z.E4,{avahi:e.avahi}),(0,n.jsx)(Z.aY,{})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(Z.Ik,{router:e.router})})]}):null]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,2542,5511,2844,8738,5381,1099,2666,7965,3669,2757,1744],function(){return e(e.s=61943)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148],{61943:function(e,t,i){Promise.resolve().then(i.bind(i,34488))},34488:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return p}});var n=i(94655),r=i(7281),s=i(84840),a=i(31317),x=i(10721),l=i(81071),d=i(628),o=i(41565),c=i(69899),h=i(76492),j=i(29983),u=i(92666),Z=i(57965);function g(e){let{rows:t}=e;return(0,n.jsx)(d.Z,{children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"50%",height:32})]}),[...Array(t)].map((e,t)=>(0,n.jsxs)(r.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[(0,n.jsx)(x.Z,{variant:"text",width:"35%"}),(0,n.jsx)(x.Z,{variant:"text",width:"40%"})]},t))]})})}function m(){return(0,n.jsx)(d.Z,{sx:{height:"100%"},children:(0,n.jsxs)(o.Z,{children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[(0,n.jsx)(x.Z,{variant:"circular",width:24,height:24}),(0,n.jsx)(x.Z,{variant:"text",width:"40%",height:32}),(0,n.jsxs)(r.Z,{sx:{ml:"auto",display:"flex",gap:1},children:[(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24}),(0,n.jsx)(x.Z,{variant:"rounded",width:70,height:24})]})]}),(0,n.jsx)(x.Z,{variant:"text",width:"30%",sx:{mt:3,mb:1}}),[0,1].map(e=>(0,n.jsxs)(r.Z,{sx:{border:1,borderColor:"divider",p:2,"&:not(:last-child)":{borderBottom:0}},children:[(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1.5},children:[(0,n.jsx)(x.Z,{variant:"circular",width:10,height:10}),(0,n.jsx)(x.Z,{variant:"text",width:"25%"}),(0,n.jsx)(x.Z,{variant:"text",width:"15%"}),(0,n.jsx)(x.Z,{variant:"text",width:"10%",sx:{ml:"auto"}})]}),[0,1,2].map(e=>(0,n.jsx)(x.Z,{variant:"text",width:"70%",sx:{ml:2.5}},e))]},e))]})})}function p(){let{data:e,isLoading:t,error:i}=(0,u.nv)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,h.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,h.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,h.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(r.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(j.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(r.Z,{children:[(0,n.jsx)(a.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Routing"}),(0,n.jsx)(a.Z,{variant:"body1",color:"text.secondary",children:"Server routing and network configuration"})]})]})}),i&&(0,n.jsxs)(l.Z,{severity:"error",sx:{mb:3},children:["Failed to load router status: ",i.message]}),t?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:4}),(0,n.jsx)(g,{rows:1})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(m,{})})]}):(null==e?void 0:e.router)?(0,n.jsxs)(s.ZP,{container:!0,spacing:3,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,md:4,children:(0,n.jsxs)(r.Z,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,n.jsx)(Z.hI,{router:e.router}),(0,n.jsx)(Z.SB,{router:e.router}),(0,n.jsx)(Z.E4,{avahi:e.avahi}),(0,n.jsx)(Z.aY,{})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,md:8,children:(0,n.jsx)(Z.Ik,{router:e.router})})]}):null]})}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1071,540,4416,2538,2542,5511,2844,4841,4898,2666,7965,3669,2757,1744],function(){return e(e.s=61943)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3767],{32823:function(e,t,n){Promise.resolve().then(n.bind(n,32050))},32050:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return p}});var r=n(94655),s=n(35106),o=n(31358),l=n(7281),c=n(31317),i=n(26138),a=n(41261),u=n(79983),d=n(10117),h=n(73660);function p(e){let{params:t}=e,n=(0,o.x)(),{name:p}=(0,s.use)(t),m=decodeURIComponent(p);return(0,r.jsxs)(l.Z,{sx:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,r.jsxs)(l.Z,{sx:{mb:2},children:[(0,r.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[(0,r.jsx)(u.Z,{onClick:()=>n.push("/servers/".concat(p)),size:"small","aria-label":"Back to server",children:(0,r.jsx)(d.Z,{})}),(0,r.jsxs)(i.Z,{"aria-label":"breadcrumb",children:[(0,r.jsx)(a.Z,{component:"button",variant:"body1",onClick:()=>n.push("/servers"),sx:{cursor:"pointer"},underline:"hover",color:"inherit",children:"Servers"}),(0,r.jsx)(a.Z,{component:"button",variant:"body1",onClick:()=>n.push("/servers/".concat(p)),sx:{cursor:"pointer"},underline:"hover",color:"inherit",children:m}),(0,r.jsx)(c.Z,{color:"text.primary",children:"Console"})]})]}),(0,r.jsxs)(c.Z,{variant:"h5",component:"h1",children:[m," Console"]})]}),(0,r.jsx)(l.Z,{sx:{flex:1,minHeight:0},children:(0,r.jsx)(h.K,{serverName:m})})]})}},3454:function(e,t,n){"use strict";n.d(t,{LoadingProvider:function(){return i},startLoading:function(){return a},stopLoading:function(){return u}});var r=n(94655),s=n(35106),o=n(74228),l=n(31477),c=n.n(l);function i(e){let{children:t}=e,n=(0,o.usePathname)(),l=(0,o.useSearchParams)();return(0,s.useEffect)(()=>{c().done()},[n,l]),(0,r.jsx)(r.Fragment,{children:t})}function a(){c().start()}function u(){c().done()}c().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,t,n){"use strict";n.d(t,{Av:function(){return r.startLoading}});var r=n(3454)},73660:function(e,t,n){"use strict";n.d(t,{K:function(){return w}});var r=n(94655),s=n(35106),o=n(18844),l=n.n(o),c=n(7281),i=n(69899),a=n(97436),u=n(30417),d=n(90829),h=n(79983),p=n(31317),m=n(25333),f=n(40064),x=n(45547),g=n(70115),v=n(69123),C=n(93017),b=n(11141),S=n(19127),j=n(69366),y=n(163);let R=[{label:"say",template:"say "},{label:"give",template:"give "},{label:"tp",template:"tp "},{label:"gamemode",template:"gamemode "}],Z=new(l())({fg:"#aaa",bg:"#000",newline:!1,escapeXML:!0,colors:{0:"#000000",1:"#cc0000",2:"#4e9a06",3:"#c4a000",4:"#3465a4",5:"#75507b",6:"#06989a",7:"#d3d7cf",8:"#555753",9:"#ef2929",10:"#8ae234",11:"#fce94f",12:"#729fcf",13:"#ad7fa8",14:"#34e2e2",15:"#eeeeec"}}),k=(0,s.memo)(function(e){let{log:t}=e,n=(0,s.useMemo)(()=>(function(e){let t=e.replace(/\x1b\[\?[\d;]*[a-zA-Z]/g,"").replace(/\x1b\[[0-9;]*[KJH]/g,"").replace(/\x1b=/g,"").replace(/\[\?[\d;]*[a-zA-Z]/g,"").replace(/\[[0-9;]*[KJH]/g,"").replace(/\[m/g,"").replace(/\[(\d+)m/g,"\x1b[$1m").replace(/>\.\.\.\.\r?/g,"").replace(/\r/g,"");return Z.toHtml(t)})(t),[t]);return(0,r.jsx)(c.Z,{sx:{py:.25,whiteSpace:"pre-wrap",wordBreak:"break-all","& span":{}},dangerouslySetInnerHTML:{__html:n}})});function w(e){let{serverName:t}=e,[n,o]=(0,s.useState)(""),[l,Z]=(0,s.useState)([]),[w,E]=(0,s.useState)(-1),[N,O]=(0,s.useState)("ALL"),[T,A]=(0,s.useState)(!0),[I,L]=(0,s.useState)(!0),[z,D]=(0,s.useState)(!1),H=(0,s.useRef)(null),M=(0,s.useRef)(null),{logs:_,isConnected:F,clearLogs:P,reconnect:W,retryCount:K}=(0,y.Y)({serverName:t}),J=(0,s.useMemo)(()=>{let e=_;return I&&(e=e.filter(e=>!e.includes("RCON Listener")&&!e.includes("RCON Client")&&!e.includes("RconClient"))),"ALL"!==N&&(e=e.filter(e=>(e.includes("/ERROR]")||e.includes("/ERROR:")?"ERROR":e.includes("/WARN]")||e.includes("/WARN:")?"WARN":(e.includes("/INFO]")||e.includes("/INFO:"),"INFO"))===N)),e},[_,N,I]);(0,s.useEffect)(()=>{T&&M.current&&(M.current.scrollTop=M.current.scrollHeight)},[J,T]);let U=(0,s.useCallback)(async()=>{let e=n.trim();if(e&&!z){D(!0);try{Z(t=>[...t,e]),E(-1),await fetch("/api/servers/".concat(encodeURIComponent(t),"/exec"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e})}),o("")}catch(e){console.error("Failed to execute command:",e)}finally{D(!1)}}},[n,t,z]),B=(0,s.useCallback)(e=>{if("Enter"===e.key)e.preventDefault(),U();else if("ArrowUp"===e.key){if(e.preventDefault(),0===l.length)return;let t=-1===w?l.length-1:Math.max(0,w-1);E(t),o(l[t])}else if("ArrowDown"===e.key){if(e.preventDefault(),-1===w)return;let t=w+1;t>=l.length?(E(-1),o("")):(E(t),o(l[t]))}},[l,w,U]),Y=(0,s.useCallback)(e=>{var t;o(e),null===(t=H.current)||void 0===t||t.focus()},[]),G=F?{text:"Connected",color:"success"}:K>0?{text:"Disconnected (Retry ".concat(K,")"),color:"warning"}:{text:"Disconnected",color:"error"};return(0,r.jsxs)(i.Z,{"data-testid":"server-console",sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:400},children:[(0,r.jsxs)(c.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",px:2,py:1,gap:1,borderBottom:1,borderColor:"divider"},children:[(0,r.jsxs)(g.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,r.jsx)(p.Z,{variant:"subtitle2",children:"Console"}),(0,r.jsx)(m.Z,{"data-testid":"connection-status",label:G.text,color:G.color,size:"small"})]}),(0,r.jsxs)(g.Z,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",useFlexGap:!0,children:[(0,r.jsx)(d.Z,{size:"small",variant:"outlined",children:["ALL","INFO","WARN","ERROR"].map(e=>(0,r.jsx)(u.Z,{onClick:()=>O(e),variant:N===e?"contained":"outlined",children:e},e))}),(0,r.jsx)(f.Z,{control:(0,r.jsx)(x.Z,{checked:T,onChange:e=>A(e.target.checked),size:"small",inputProps:{"aria-label":"Auto-scroll"}}),label:"Auto-scroll"}),(0,r.jsx)(f.Z,{control:(0,r.jsx)(x.Z,{checked:I,onChange:e=>L(e.target.checked),size:"small",inputProps:{"aria-label":"Hide RCON"}}),label:"Hide RCON"}),(0,r.jsx)(h.Z,{size:"small",onClick:P,"aria-label":"Clear logs",title:"Clear logs",children:(0,r.jsx)(S.Z,{})}),!F&&(0,r.jsx)(u.Z,{size:"small",startIcon:(0,r.jsx)(j.Z,{}),onClick:W,"aria-label":"Reconnect",children:"Reconnect"})]})]}),(0,r.jsx)(c.Z,{ref:M,sx:{flex:1,overflow:"auto",bgcolor:"#1a1a1a",p:1,fontSize:"0.85rem"},children:0===J.length?(0,r.jsx)(p.Z,{color:"text.secondary",sx:{textAlign:"center",py:4,color:"#666"},children:"Waiting for logs..."}):J.map((e,t)=>(0,r.jsx)(k,{log:e},t))}),(0,r.jsx)(v.Z,{}),(0,r.jsx)(c.Z,{sx:{px:2,py:1,bgcolor:"background.default"},children:(0,r.jsxs)(g.Z,{direction:"row",spacing:1,children:[(0,r.jsx)(p.Z,{variant:"caption",color:"text.secondary",sx:{alignSelf:"center"},children:"Quick:"}),R.map(e=>(0,r.jsx)(u.Z,{size:"small",variant:"outlined",onClick:()=>Y(e.template),children:e.label},e.label))]})}),(0,r.jsx)(v.Z,{}),(0,r.jsxs)(c.Z,{sx:{display:"flex",p:1,gap:1},children:[(0,r.jsx)(a.Z,{inputRef:H,fullWidth:!0,size:"small",placeholder:"Enter command...",value:n,onChange:e=>o(e.target.value),onKeyDown:B,disabled:!F||z,InputProps:{}}),(0,r.jsx)(u.Z,{variant:"contained",onClick:U,disabled:!n.trim()||!F||z,startIcon:z?(0,r.jsx)(C.Z,{size:16}):(0,r.jsx)(b.Z,{}),"aria-label":"Send command",children:"Send"})]})]})}},31358:function(e,t,n){"use strict";n.d(t,{x:function(){return l}});var r=n(74228),s=n(35106),o=n(8690);function l(){let e=(0,r.useRouter)(),t=(0,s.useCallback)((t,n)=>{(0,o.Av)(),e.push(t,n)},[e]),n=(0,s.useCallback)((t,n)=>{(0,o.Av)(),e.replace(t,n)},[e]);return(0,s.useMemo)(()=>({...e,push:t,replace:n}),[e,t,n])}},93757:function(e,t,n){"use strict";n.d(t,{D:function(){return o}});var r=n(35106);class s{connect(e){this.options=e,this.shouldReconnect=!0,this.establishConnection()}establishConnection(){this.options&&(this.updateState("connecting"),this.eventSource&&this.eventSource.close(),this.eventSource=new EventSource(this.options.url,{withCredentials:this.options.withCredentials||!1}),this.eventSource.onopen=()=>{this.updateState("connected"),this.retryCount=0,this.lastError=null},this.eventSource.onmessage=e=>{if(!e.data.startsWith(":"))try{var t,n;let r=JSON.parse(e.data);null===(n=this.options)||void 0===n||null===(t=n.onMessage)||void 0===t||t.call(n,r)}catch(e){console.warn("Failed to parse SSE message:",e)}},this.eventSource.onerror=()=>{var e,t;let n={message:"SSE connection error",code:"CONNECTION_ERROR",retryCount:this.retryCount,timestamp:new Date};this.lastError=n,this.updateState("error"),null===(t=this.options)||void 0===t||null===(e=t.onError)||void 0===e||e.call(t,n),this.shouldReconnect&&this.scheduleReconnect()})}scheduleReconnect(){var e,t;if(!this.options)return;let n=null!==(e=this.options.maxReconnectAttempts)&&void 0!==e?e:1/0;if(this.retryCount>=n)return;this.reconnectTimer&&clearTimeout(this.reconnectTimer);let r=null!==(t=this.options.reconnectInterval)&&void 0!==t?t:3e3;this.reconnectTimer=setTimeout(()=>{this.retryCount++,this.establishConnection()},r)}disconnect(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.updateState("disconnected")}getState(){return this.state}isConnected(){return"connected"===this.state}getLastError(){return this.lastError}getRetryCount(){return this.retryCount}reconnect(){this.retryCount++,this.shouldReconnect=!0,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.establishConnection()}updateState(e){var t,n;this.state=e,null===(n=this.options)||void 0===n||null===(t=n.onStateChange)||void 0===t||t.call(n,e)}constructor(){this.eventSource=null,this.state="disconnected",this.retryCount=0,this.lastError=null,this.reconnectTimer=null,this.options=null,this.shouldReconnect=!0}}function o(e){let{url:t,onMessage:n,onError:o,reconnectInterval:l=3e3,maxReconnectAttempts:c=1/0,enabled:i=!0,withCredentials:a=!1}=e,[u,d]=(0,r.useState)(null),[h,p]=(0,r.useState)("disconnected"),[m,f]=(0,r.useState)(null),[x,g]=(0,r.useState)(0),v=(0,r.useRef)(null),C=(0,r.useCallback)(e=>{d(e),null==n||n(e)},[n]),b=(0,r.useCallback)(e=>{p(e),"connected"===e&&g(0)},[]),S=(0,r.useCallback)(e=>{f(e),"number"==typeof e.retryCount&&g(e.retryCount),null==o||o(e)},[o]),j=(0,r.useCallback)(()=>{v.current&&(v.current.reconnect(),g(v.current.getRetryCount()))},[]),y=(0,r.useCallback)(()=>{v.current&&v.current.disconnect()},[]);return(0,r.useEffect)(()=>{if(!i){v.current&&(v.current.disconnect(),v.current=null);return}return v.current||(v.current=new s),v.current.connect({url:t,onMessage:C,onStateChange:b,onError:S,reconnectInterval:l,maxReconnectAttempts:c,withCredentials:a}),()=>{v.current&&(v.current.disconnect(),v.current=null)}},[t,i,l,c,a,C,b,S]),{data:u,isConnected:"connected"===h,state:h,error:m,retryCount:x,reconnect:j,disconnect:y}}},163:function(e,t,n){"use strict";n.d(t,{Y:function(){return o}});var r=n(35106),s=n(93757);function o(e){let{serverName:t,maxLines:n=500,enabled:o=!0,reconnectInterval:l=3e3}=e,[c,i]=(0,r.useState)([]);(0,r.useEffect)(()=>{i([])},[t]);let a=(0,r.useCallback)(e=>{let t;"server-log"===e.type?t=e.data.log:"log"in e&&"string"==typeof e.log&&(t=e.log),t&&i(e=>{let r=[...e,t];return r.length>n?r.slice(r.length-n):r})},[n]),{isConnected:u,reconnect:d,retryCount:h}=(0,s.D)({url:"/api/sse/servers/".concat(encodeURIComponent(t),"/logs"),onMessage:a,enabled:o,reconnectInterval:l});return{logs:c,isConnected:u,clearLogs:(0,r.useCallback)(()=>{i([])},[]),reconnect:d,retryCount:h}}}},function(e){e.O(0,[6812,9760,5004,7296,7436,1658,6727,1055,7753,3669,2757,1744],function(){return e(e.s=32823)}),_N_E=e.O()}]);