@minecraft-docker/mcctl-console 2.8.1 → 2.10.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 (269) 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 +115 -117
  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/download/route.js +57 -0
  46. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/download/route.js.nft.json +1 -0
  47. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/mkdir/route.js +1 -0
  48. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/mkdir/route.js.nft.json +1 -0
  49. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/read/route.js +1 -0
  50. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/read/route.js.nft.json +1 -0
  51. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/rename/route.js +1 -0
  52. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/rename/route.js.nft.json +1 -0
  53. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/route.js +1 -0
  54. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/route.js.nft.json +1 -0
  55. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/upload/route.js +57 -0
  56. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/upload/route.js.nft.json +1 -0
  57. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/write/route.js +1 -0
  58. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/files/write/route.js.nft.json +1 -0
  59. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
  60. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +8 -8
  61. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
  62. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +7 -7
  63. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
  64. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +8 -8
  65. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
  66. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +6 -6
  67. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js +1 -1
  68. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js.nft.json +1 -1
  69. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
  70. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
  71. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +7 -7
  72. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page.js +1 -1
  73. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page.js.nft.json +1 -1
  74. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
  75. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
  76. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +8 -8
  77. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
  78. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +8 -8
  79. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
  80. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +8 -8
  81. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.html +1 -1
  82. package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.rsc +8 -8
  83. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js +1 -1
  84. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js.nft.json +1 -1
  85. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
  86. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
  87. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +7 -7
  88. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
  89. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +8 -8
  90. package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +27 -20
  91. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1088.js +1 -1
  92. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1201.js +1 -0
  93. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1309.js +1 -1
  94. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/2842.js +51 -0
  95. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/354.js +1 -1
  96. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/{6175.js → 3613.js} +1 -1
  97. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4207.js +1 -0
  98. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4282.js +1 -0
  99. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4479.js +1 -0
  100. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/5843.js +1 -1
  101. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/6554.js +2 -0
  102. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/7573.js +1 -1
  103. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8243.js +1 -1
  104. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8913.js +1 -0
  105. package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-build-manifest.js +1 -1
  106. package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
  107. package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.js +1 -1
  108. package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.json +1 -1
  109. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
  110. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
  111. package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
  112. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1055-b8c83674b69387ea.js +1 -0
  113. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/140-25eb9312925d8fea.js +1 -0
  114. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2698-b163080d7b32e5e3.js +1 -0
  115. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2701-677e528d028253ad.js +1 -0
  116. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4036-c4d6006e9e913068.js +1 -0
  117. package/.next/{static/chunks/2539-6bce0edb99b4e538.js → standalone/platform/services/mcctl-console/.next/static/chunks/4219-26d64443218aac0b.js} +1 -1
  118. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4474-b7d88543d50f7f58.js +1 -0
  119. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4841-6260a560fdad2dd4.js +1 -0
  120. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4898-60767ae3dfa904db.js +1 -0
  121. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5498-b79f9cd3afa37253.js +1 -0
  122. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6650-51e2b21d03bb2f09.js +1 -0
  123. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7073-3b047d20c07ac065.js +1 -0
  124. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7087-64ab6928ccdc0ca7.js +1 -0
  125. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7477-3b97ce4c66d3cf7e.js +1 -0
  126. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7730-be5bbd218f018510.js +1 -0
  127. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7753-74bf23c88b387cb7.js +1 -0
  128. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7965-67c4c53f693bc0c4.js +1 -0
  129. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9097-3bc29153e9b2c9d1.js +1 -0
  130. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9788-03286ddd24a074b7.js +1 -0
  131. 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
  132. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-d65c062a803fc4b2.js +1 -0
  133. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/{layout-bf1846a6b0c68959.js → layout-49deaa08620bff5b.js} +1 -1
  134. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-430dd294c3b34903.js +1 -0
  135. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/routing/{page-0fbdeec8fee218ef.js → page-f430d126cc21547c.js} +1 -1
  136. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/console/page-bea101bb0e8858b4.js +1 -0
  137. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-2253494a8db1ef4d.js +1 -0
  138. 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
  139. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-dd38d40e3e0257a8.js +1 -0
  140. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-874ad606cffc439d.js +1 -0
  141. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/layout-eaefe334d7b2816a.js +1 -0
  142. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-05a2cf46a8784859.js +1 -0
  143. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/page-df2a4f73aae39ef2.js +1 -0
  144. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/ee812fa3-98eef0b457d8ec47.js +1 -0
  145. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{webpack-198a420ca2ddb7de.js → webpack-7e31802f06defd3e.js} +1 -1
  146. package/.next/standalone/platform/services/mcctl-console/.next/static/css/6a2c381c71b398da.css +1 -0
  147. package/.next/standalone/platform/services/mcctl-console/package.json +10 -0
  148. package/.next/static/chunks/1055-b8c83674b69387ea.js +1 -0
  149. package/.next/static/chunks/140-25eb9312925d8fea.js +1 -0
  150. package/.next/static/chunks/2698-b163080d7b32e5e3.js +1 -0
  151. package/.next/static/chunks/2701-677e528d028253ad.js +1 -0
  152. package/.next/static/chunks/4036-c4d6006e9e913068.js +1 -0
  153. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/2539-6bce0edb99b4e538.js → static/chunks/4219-26d64443218aac0b.js} +1 -1
  154. package/.next/static/chunks/4474-b7d88543d50f7f58.js +1 -0
  155. package/.next/static/chunks/4841-6260a560fdad2dd4.js +1 -0
  156. package/.next/static/chunks/4898-60767ae3dfa904db.js +1 -0
  157. package/.next/static/chunks/5498-b79f9cd3afa37253.js +1 -0
  158. package/.next/static/chunks/6650-51e2b21d03bb2f09.js +1 -0
  159. package/.next/static/chunks/7073-3b047d20c07ac065.js +1 -0
  160. package/.next/static/chunks/7087-64ab6928ccdc0ca7.js +1 -0
  161. package/.next/static/chunks/7477-3b97ce4c66d3cf7e.js +1 -0
  162. package/.next/static/chunks/7730-be5bbd218f018510.js +1 -0
  163. package/.next/static/chunks/7753-74bf23c88b387cb7.js +1 -0
  164. package/.next/static/chunks/7965-67c4c53f693bc0c4.js +1 -0
  165. package/.next/static/chunks/9097-3bc29153e9b2c9d1.js +1 -0
  166. package/.next/static/chunks/9788-03286ddd24a074b7.js +1 -0
  167. 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
  168. package/.next/static/chunks/app/(main)/audit-logs/page-d65c062a803fc4b2.js +1 -0
  169. package/.next/static/chunks/app/(main)/{layout-bf1846a6b0c68959.js → layout-49deaa08620bff5b.js} +1 -1
  170. package/.next/static/chunks/app/(main)/players/page-430dd294c3b34903.js +1 -0
  171. package/.next/static/chunks/app/(main)/routing/{page-0fbdeec8fee218ef.js → page-f430d126cc21547c.js} +1 -1
  172. package/.next/static/chunks/app/(main)/servers/[name]/console/page-bea101bb0e8858b4.js +1 -0
  173. package/.next/static/chunks/app/(main)/servers/[name]/page-2253494a8db1ef4d.js +1 -0
  174. 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
  175. package/.next/static/chunks/app/(main)/settings/page-dd38d40e3e0257a8.js +1 -0
  176. package/.next/static/chunks/app/(main)/worlds/page-874ad606cffc439d.js +1 -0
  177. package/.next/static/chunks/app/layout-eaefe334d7b2816a.js +1 -0
  178. package/.next/static/chunks/app/login/page-05a2cf46a8784859.js +1 -0
  179. package/.next/static/chunks/app/signup/page-df2a4f73aae39ef2.js +1 -0
  180. package/.next/static/chunks/ee812fa3-98eef0b457d8ec47.js +1 -0
  181. package/.next/static/chunks/{webpack-198a420ca2ddb7de.js → webpack-7e31802f06defd3e.js} +1 -1
  182. package/.next/static/css/6a2c381c71b398da.css +1 -0
  183. package/package.json +12 -2
  184. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/3068.js +0 -1
  185. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/3633.js +0 -1
  186. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4609.js +0 -1
  187. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/609.js +0 -1
  188. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/6591.js +0 -2
  189. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8849.js +0 -1
  190. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/9023.js +0 -51
  191. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/9874.js +0 -1
  192. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1047-1957808ef6d146f3.js +0 -1
  193. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1099-fa64c7b90813b0a5.js +0 -1
  194. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/212-b904d9ae152f2360.js +0 -1
  195. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2701-385dbd7376f5851d.js +0 -1
  196. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2724-6be0c6be94353443.js +0 -1
  197. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/392-8c54ddef9482164b.js +0 -1
  198. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4187-07672ba5a9f76f7c.js +0 -1
  199. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4219-a84afcb66908141b.js +0 -1
  200. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5381-d66dae5d5171cd57.js +0 -1
  201. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5787-04cc23df05f9da2e.js +0 -1
  202. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6039-38b0b8c06d25892e.js +0 -1
  203. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6645-9bcc9a0f9cd2fdc9.js +0 -1
  204. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6646-c5d039d1ad306467.js +0 -1
  205. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/674-096e0376c367d751.js +0 -1
  206. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/682-6192991ddec396b8.js +0 -1
  207. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6909-9750e61adcf6f5e5.js +0 -1
  208. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7965-420dbb1f781fdc83.js +0 -1
  209. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8233-0fdf0ee81a8cadce.js +0 -1
  210. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/837-f4fbf77c24343b1f.js +0 -1
  211. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8738-25eee78e0dfd0adf.js +0 -1
  212. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9949-2daeb31bdedf25c7.js +0 -1
  213. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/page-c52171f3de12db63.js +0 -1
  214. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-c4760429d9828ad3.js +0 -1
  215. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/console/page-a0050b5b439d954f.js +0 -1
  216. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/page-f82acaf60a615953.js +0 -1
  217. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-94ebb6f110d7cba4.js +0 -1
  218. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-a194d5d6a77d7e06.js +0 -1
  219. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/layout-37a5eb78e96aa17e.js +0 -1
  220. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-b7ec94d60aae14ce.js +0 -1
  221. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/page-6f03571bb9914130.js +0 -1
  222. package/.next/standalone/platform/services/mcctl-console/.next/static/css/2579b9365591037f.css +0 -1
  223. package/.next/standalone/platform/services/mcctl-console/.next/static/media/0ea4f4df910e6120-s.woff2 +0 -0
  224. package/.next/standalone/platform/services/mcctl-console/.next/static/media/1f160ec2cb9962ef-s.woff2 +0 -0
  225. package/.next/standalone/platform/services/mcctl-console/.next/static/media/739c2d8941231bb4-s.p.woff2 +0 -0
  226. package/.next/standalone/platform/services/mcctl-console/.next/static/media/ad8a7e2c3c2c120b-s.woff2 +0 -0
  227. package/.next/standalone/platform/services/mcctl-console/.next/static/media/cde148027b808b99-s.woff2 +0 -0
  228. package/.next/standalone/platform/services/mcctl-console/.next/static/media/e61ae719f7cc4155-s.woff2 +0 -0
  229. package/.next/static/chunks/1047-1957808ef6d146f3.js +0 -1
  230. package/.next/static/chunks/1099-fa64c7b90813b0a5.js +0 -1
  231. package/.next/static/chunks/212-b904d9ae152f2360.js +0 -1
  232. package/.next/static/chunks/2701-385dbd7376f5851d.js +0 -1
  233. package/.next/static/chunks/2724-6be0c6be94353443.js +0 -1
  234. package/.next/static/chunks/392-8c54ddef9482164b.js +0 -1
  235. package/.next/static/chunks/4187-07672ba5a9f76f7c.js +0 -1
  236. package/.next/static/chunks/4219-a84afcb66908141b.js +0 -1
  237. package/.next/static/chunks/5381-d66dae5d5171cd57.js +0 -1
  238. package/.next/static/chunks/5787-04cc23df05f9da2e.js +0 -1
  239. package/.next/static/chunks/6039-38b0b8c06d25892e.js +0 -1
  240. package/.next/static/chunks/6645-9bcc9a0f9cd2fdc9.js +0 -1
  241. package/.next/static/chunks/6646-c5d039d1ad306467.js +0 -1
  242. package/.next/static/chunks/674-096e0376c367d751.js +0 -1
  243. package/.next/static/chunks/682-6192991ddec396b8.js +0 -1
  244. package/.next/static/chunks/6909-9750e61adcf6f5e5.js +0 -1
  245. package/.next/static/chunks/7965-420dbb1f781fdc83.js +0 -1
  246. package/.next/static/chunks/8233-0fdf0ee81a8cadce.js +0 -1
  247. package/.next/static/chunks/837-f4fbf77c24343b1f.js +0 -1
  248. package/.next/static/chunks/8738-25eee78e0dfd0adf.js +0 -1
  249. package/.next/static/chunks/9949-2daeb31bdedf25c7.js +0 -1
  250. package/.next/static/chunks/app/(main)/audit-logs/page-c52171f3de12db63.js +0 -1
  251. package/.next/static/chunks/app/(main)/players/page-c4760429d9828ad3.js +0 -1
  252. package/.next/static/chunks/app/(main)/servers/[name]/console/page-a0050b5b439d954f.js +0 -1
  253. package/.next/static/chunks/app/(main)/servers/[name]/page-f82acaf60a615953.js +0 -1
  254. package/.next/static/chunks/app/(main)/settings/page-94ebb6f110d7cba4.js +0 -1
  255. package/.next/static/chunks/app/(main)/worlds/page-a194d5d6a77d7e06.js +0 -1
  256. package/.next/static/chunks/app/layout-37a5eb78e96aa17e.js +0 -1
  257. package/.next/static/chunks/app/login/page-b7ec94d60aae14ce.js +0 -1
  258. package/.next/static/chunks/app/signup/page-6f03571bb9914130.js +0 -1
  259. package/.next/static/css/2579b9365591037f.css +0 -1
  260. package/.next/static/media/0ea4f4df910e6120-s.woff2 +0 -0
  261. package/.next/static/media/1f160ec2cb9962ef-s.woff2 +0 -0
  262. package/.next/static/media/739c2d8941231bb4-s.p.woff2 +0 -0
  263. package/.next/static/media/ad8a7e2c3c2c120b-s.woff2 +0 -0
  264. package/.next/static/media/cde148027b808b99-s.woff2 +0 -0
  265. package/.next/static/media/e61ae719f7cc4155-s.woff2 +0 -0
  266. /package/.next/standalone/platform/services/mcctl-console/.next/static/{S1X5jEkA1d_pSlIMuZWrE → ojSswOX1mWw27ewVtDT2w}/_buildManifest.js +0 -0
  267. /package/.next/standalone/platform/services/mcctl-console/.next/static/{S1X5jEkA1d_pSlIMuZWrE → ojSswOX1mWw27ewVtDT2w}/_ssgManifest.js +0 -0
  268. /package/.next/static/{S1X5jEkA1d_pSlIMuZWrE → ojSswOX1mWw27ewVtDT2w}/_buildManifest.js +0 -0
  269. /package/.next/static/{S1X5jEkA1d_pSlIMuZWrE → ojSswOX1mWw27ewVtDT2w}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=1309,exports.ids=[1309],exports.modules={78649:(e,t,s)=>{s.d(t,{F0:()=>a,zB:()=>r});class r extends Error{constructor(e,t,s){super(s),this.statusCode=e,this.error=t,this.name="McctlApiError"}}class n{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey,this.userContext=e.userContext}async fetch(e,t={}){let s=`${this.baseUrl}${e}`,n={"X-API-Key":this.apiKey};t.body&&(n["Content-Type"]="application/json"),this.userContext&&(n["X-User"]=this.userContext.username,n["X-Role"]=this.userContext.role);let a=await fetch(s,{...t,headers:{...n,...t.headers}});if(!a.ok){let e=await a.json().catch(()=>({error:"UnknownError",message:a.statusText}));throw new r(a.status,e.error,e.message)}return a.json()}async getServers(){return this.fetch("/api/servers")}async getServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}`)}async createServer(e){return this.fetch("/api/servers",{method:"POST",body:JSON.stringify(e)})}async deleteServer(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async startServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/start`,{method:"POST"})}async stopServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/stop`,{method:"POST"})}async restartServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/restart`,{method:"POST"})}async execCommand(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/exec`,{method:"POST",body:JSON.stringify({command:t})})}async getLogs(e,t=100){return this.fetch(`/api/servers/${encodeURIComponent(e)}/logs?lines=${t}`)}async getWorlds(){return this.fetch("/api/worlds")}async getWorld(e){return this.fetch(`/api/worlds/${encodeURIComponent(e)}`)}async createWorld(e){return this.fetch("/api/worlds",{method:"POST",body:JSON.stringify(e)})}async assignWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/assign`,{method:"POST",body:JSON.stringify({serverName:t})})}async releaseWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/release${t?"?force=true":""}`,{method:"POST"})}async deleteWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async getServerConfig(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`)}async updateServerConfig(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`,{method:"PATCH",body:JSON.stringify(t)})}async resetWorld(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/world/reset`,{method:"POST"})}async getRouterStatus(){return this.fetch("/api/router/status")}async getBackupStatus(){return this.fetch("/api/backup/status")}async pushBackup(e){let t=e?JSON.stringify({message:e}):void 0;return this.fetch("/api/backup/push",{method:"POST",body:t})}async getBackupHistory(e=20){return this.fetch(`/api/backup/history?limit=${e}`)}async restoreBackup(e){return this.fetch("/api/backup/restore",{method:"POST",body:JSON.stringify({commitHash:e})})}async getWhitelist(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/whitelist`)}async getWhitelistStatus(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/whitelist/status`)}async setWhitelistStatus(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/whitelist/status`,{method:"PUT",body:JSON.stringify({enabled:t})})}async addToWhitelist(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/whitelist`,{method:"POST",body:JSON.stringify({player:t})})}async removeFromWhitelist(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/whitelist/${encodeURIComponent(t)}`,{method:"DELETE"})}async getBans(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/bans`)}async banPlayer(e,t,s){return this.fetch(`/api/servers/${encodeURIComponent(e)}/bans`,{method:"POST",body:JSON.stringify({player:t,reason:s})})}async unbanPlayer(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/bans/${encodeURIComponent(t)}`,{method:"DELETE"})}async getOpsWithLevel(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/ops`)}async addOpWithLevel(e,t,s=4){return this.fetch(`/api/servers/${encodeURIComponent(e)}/ops`,{method:"POST",body:JSON.stringify({player:t,level:s})})}async updateOpLevel(e,t,s){return this.fetch(`/api/servers/${encodeURIComponent(e)}/ops/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({level:s})})}async removeOp(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/ops/${encodeURIComponent(t)}`,{method:"DELETE"})}async getOps(e){return this.getOpsWithLevel(e).then(e=>({players:e.operators.map(e=>e.name),total:e.count,source:e.source}))}async addOp(e,t){return this.addOpWithLevel(e,t,4).then(e=>({success:e.success,message:e.message||`Added ${t} as operator`,source:e.source}))}async getHostnames(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/hostnames`)}async updateHostnames(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/hostnames`,{method:"PUT",body:JSON.stringify({customHostnames:t})})}async getServerMods(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/mods`)}async addServerMods(e,t,s){return this.fetch(`/api/servers/${encodeURIComponent(e)}/mods`,{method:"POST",body:JSON.stringify({slugs:t,source:s})})}async removeServerMod(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/mods/${encodeURIComponent(t)}`,{method:"DELETE"})}async searchMods(e,t=10,s=0){let r=new URLSearchParams({q:e,limit:String(t),offset:String(s)});return this.fetch(`/api/mods/search?${r}`)}async getPlayitStatus(){return this.fetch("/api/playit/status")}async startPlayit(){return this.fetch("/api/playit/start",{method:"POST"})}async stopPlayit(){return this.fetch("/api/playit/stop",{method:"POST"})}}function a(e){let t=process.env.MCCTL_API_URL||"http://localhost:5001",s=process.env.MCCTL_API_KEY||"";return s||console.warn("MCCTL_API_KEY is not set. API requests may fail."),new n({baseUrl:t,apiKey:s,userContext:e})}},31969:(e,t,s)=>{s.d(t,{I:()=>u,Z:()=>p});var r=s(33580),n=s(5944),a=s(90224),o=s(22587),i=s(8290);let d=process.env.BETTER_AUTH_BASE_URL||`http://localhost:${process.env.PORT||5e3}`,c=d.startsWith("https://"),u=(0,r.kj)({baseURL:d,secret:process.env.BETTER_AUTH_SECRET,database:(0,n.s)(o.db,{provider:"sqlite",schema:{user:i.users,session:i.sessions,account:i.accounts,verification:i.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},advanced:{useSecureCookies:c},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,a.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:e=>{let t=["http://localhost:5000","http://localhost:3000",d,process.env.NEXT_PUBLIC_APP_URL];if(e){let s=e.headers.get("origin");s&&function(e){try{let t=new URL(e).hostname;return"localhost"===t||"127.0.0.1"===t||"::1"===t||t.startsWith("192.168.")||t.startsWith("10.")||/^172\.(1[6-9]|2\d|3[01])\./.test(t)||t.endsWith(".local")}catch{return!1}}(s)&&t.push(s)}return t}});async function p(e){return u.api.getSession({headers:e})}},22587:(e,t,s)=>{s.d(t,{db:()=>h});var r=s(85890),n=s.n(r),a=s(31590),o=s(8290),i=s(55315),d=s.n(i),c=s(92048);let u=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=process.env.MCCTL_ROOT||process.cwd(),t=d().join(e,"data");return d().join(t,"mcctl.db")}();!function(e){if(":memory:"===e)return;let t=d().dirname(e);(0,c.existsSync)(t)||(0,c.mkdirSync)(t,{recursive:!0})}(u);let p=new(n())(u);p.pragma("journal_mode = WAL"),p.pragma("foreign_keys = ON"),p.exec(`
1
+ "use strict";exports.id=1309,exports.ids=[1309],exports.modules={78649:(e,t,s)=>{s.d(t,{F0:()=>a,zB:()=>r});class r extends Error{constructor(e,t,s){super(s),this.statusCode=e,this.error=t,this.name="McctlApiError"}}class n{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,""),this.apiKey=e.apiKey,this.userContext=e.userContext}async fetch(e,t={}){let s=`${this.baseUrl}${e}`,n={"X-API-Key":this.apiKey};t.body&&(n["Content-Type"]="application/json"),this.userContext&&(n["X-User"]=this.userContext.username,n["X-Role"]=this.userContext.role);let a=await fetch(s,{...t,headers:{...n,...t.headers}});if(!a.ok){let e=await a.json().catch(()=>({error:"UnknownError",message:a.statusText}));throw new r(a.status,e.error,e.message)}return a.json()}async getServers(){return this.fetch("/api/servers")}async getServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}`)}async createServer(e){return this.fetch("/api/servers",{method:"POST",body:JSON.stringify(e)})}async deleteServer(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async startServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/start`,{method:"POST"})}async stopServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/stop`,{method:"POST"})}async restartServer(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/restart`,{method:"POST"})}async execCommand(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/exec`,{method:"POST",body:JSON.stringify({command:t})})}async getLogs(e,t=100){return this.fetch(`/api/servers/${encodeURIComponent(e)}/logs?lines=${t}`)}async getWorlds(){return this.fetch("/api/worlds")}async getWorld(e){return this.fetch(`/api/worlds/${encodeURIComponent(e)}`)}async createWorld(e){return this.fetch("/api/worlds",{method:"POST",body:JSON.stringify(e)})}async assignWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/assign`,{method:"POST",body:JSON.stringify({serverName:t})})}async releaseWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}/release${t?"?force=true":""}`,{method:"POST"})}async deleteWorld(e,t){return this.fetch(`/api/worlds/${encodeURIComponent(e)}${t?"?force=true":""}`,{method:"DELETE"})}async getServerConfig(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`)}async updateServerConfig(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/config`,{method:"PATCH",body:JSON.stringify(t)})}async resetWorld(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/world/reset`,{method:"POST"})}async getRouterStatus(){return this.fetch("/api/router/status")}async getBackupStatus(){return this.fetch("/api/backup/status")}async pushBackup(e){let t=e?JSON.stringify({message:e}):void 0;return this.fetch("/api/backup/push",{method:"POST",body:t})}async getBackupHistory(e=20){return this.fetch(`/api/backup/history?limit=${e}`)}async restoreBackup(e){return this.fetch("/api/backup/restore",{method:"POST",body:JSON.stringify({commitHash:e})})}async getWhitelist(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/whitelist`)}async getWhitelistStatus(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/whitelist/status`)}async setWhitelistStatus(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/whitelist/status`,{method:"PUT",body:JSON.stringify({enabled:t})})}async addToWhitelist(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/whitelist`,{method:"POST",body:JSON.stringify({player:t})})}async removeFromWhitelist(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/whitelist/${encodeURIComponent(t)}`,{method:"DELETE"})}async getBans(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/bans`)}async banPlayer(e,t,s){return this.fetch(`/api/servers/${encodeURIComponent(e)}/bans`,{method:"POST",body:JSON.stringify({player:t,reason:s})})}async unbanPlayer(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/bans/${encodeURIComponent(t)}`,{method:"DELETE"})}async getOpsWithLevel(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/ops`)}async addOpWithLevel(e,t,s=4){return this.fetch(`/api/servers/${encodeURIComponent(e)}/ops`,{method:"POST",body:JSON.stringify({player:t,level:s})})}async updateOpLevel(e,t,s){return this.fetch(`/api/servers/${encodeURIComponent(e)}/ops/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({level:s})})}async removeOp(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/ops/${encodeURIComponent(t)}`,{method:"DELETE"})}async getOps(e){return this.getOpsWithLevel(e).then(e=>({players:e.operators.map(e=>e.name),total:e.count,source:e.source}))}async addOp(e,t){return this.addOpWithLevel(e,t,4).then(e=>({success:e.success,message:e.message||`Added ${t} as operator`,source:e.source}))}async getHostnames(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/hostnames`)}async updateHostnames(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/hostnames`,{method:"PUT",body:JSON.stringify({customHostnames:t})})}async getServerMods(e){return this.fetch(`/api/servers/${encodeURIComponent(e)}/mods`)}async addServerMods(e,t,s){return this.fetch(`/api/servers/${encodeURIComponent(e)}/mods`,{method:"POST",body:JSON.stringify({slugs:t,source:s})})}async removeServerMod(e,t){return this.fetch(`/api/servers/${encodeURIComponent(e)}/mods/${encodeURIComponent(t)}`,{method:"DELETE"})}async searchMods(e,t=10,s=0){let r=new URLSearchParams({q:e,limit:String(t),offset:String(s)});return this.fetch(`/api/mods/search?${r}`)}async getPlayitStatus(){return this.fetch("/api/playit/status")}async startPlayit(){return this.fetch("/api/playit/start",{method:"POST"})}async stopPlayit(){return this.fetch("/api/playit/stop",{method:"POST"})}async listFiles(e,t){let s=new URLSearchParams({path:t});return this.fetch(`/api/servers/${encodeURIComponent(e)}/files?${s}`)}async readFile(e,t){let s=new URLSearchParams({path:t});return this.fetch(`/api/servers/${encodeURIComponent(e)}/files/read?${s}`)}async writeFile(e,t,s){let r=new URLSearchParams({path:t});return this.fetch(`/api/servers/${encodeURIComponent(e)}/files/write?${r}`,{method:"PUT",body:JSON.stringify({content:s})})}async deleteFile(e,t){let s=new URLSearchParams({path:t});return this.fetch(`/api/servers/${encodeURIComponent(e)}/files?${s}`,{method:"DELETE"})}async createDirectory(e,t){let s=new URLSearchParams({path:t});return this.fetch(`/api/servers/${encodeURIComponent(e)}/files/mkdir?${s}`,{method:"POST"})}async renameFile(e,t,s){return this.fetch(`/api/servers/${encodeURIComponent(e)}/files/rename`,{method:"POST",body:JSON.stringify({oldPath:t,newPath:s})})}}function a(e){let t=process.env.MCCTL_API_URL||"http://localhost:5001",s=process.env.MCCTL_API_KEY||"";return s||console.warn("MCCTL_API_KEY is not set. API requests may fail."),new n({baseUrl:t,apiKey:s,userContext:e})}},31969:(e,t,s)=>{s.d(t,{I:()=>u,Z:()=>p});var r=s(33580),n=s(5944),a=s(90224),o=s(22587),i=s(8290);let d=process.env.BETTER_AUTH_BASE_URL||`http://localhost:${process.env.PORT||5e3}`,c=d.startsWith("https://"),u=(0,r.kj)({baseURL:d,secret:process.env.BETTER_AUTH_SECRET,database:(0,n.s)(o.db,{provider:"sqlite",schema:{user:i.users,session:i.sessions,account:i.accounts,verification:i.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},advanced:{useSecureCookies:c},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,a.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:e=>{let t=["http://localhost:5000","http://localhost:3000",d,process.env.NEXT_PUBLIC_APP_URL];if(e){let s=e.headers.get("origin");s&&function(e){try{let t=new URL(e).hostname;return"localhost"===t||"127.0.0.1"===t||"::1"===t||t.startsWith("192.168.")||t.startsWith("10.")||/^172\.(1[6-9]|2\d|3[01])\./.test(t)||t.endsWith(".local")}catch{return!1}}(s)&&t.push(s)}return t}});async function p(e){return u.api.getSession({headers:e})}},22587:(e,t,s)=>{s.d(t,{db:()=>h});var r=s(85890),n=s.n(r),a=s(31590),o=s(8290),i=s(55315),d=s.n(i),c=s(92048);let u=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=process.env.MCCTL_ROOT||process.cwd(),t=d().join(e,"data");return d().join(t,"mcctl.db")}();!function(e){if(":memory:"===e)return;let t=d().dirname(e);(0,c.existsSync)(t)||(0,c.mkdirSync)(t,{recursive:!0})}(u);let p=new(n())(u);p.pragma("journal_mode = WAL"),p.pragma("foreign_keys = ON"),p.exec(`
2
2
  CREATE TABLE IF NOT EXISTS users (
3
3
  id TEXT PRIMARY KEY,
4
4
  name TEXT NOT NULL,
@@ -0,0 +1,51 @@
1
+ "use strict";exports.id=2842,exports.ids=[2842],exports.modules={53825:(e,t,n)=>{var r=n(66682);t.Z=void 0;var o=r(n(7750)),a=n(58120);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check")},51999:(e,t,n)=>{var r=n(66682);t.Z=void 0;var o=r(n(7750)),a=n(58120);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy")},79795:(e,t,n)=>{var r=n(66682);t.Z=void 0;var o=r(n(7750)),a=n(58120);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined")},61960:(e,t,n)=>{var r=n(66682);t.Z=void 0;var o=r(n(7750)),a=n(58120);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock")},97441:(e,t,n)=>{var r=n(66682);t.Z=void 0;var o=r(n(7750)),a=n(58120);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew")},29553:(e,t,n)=>{var r=n(66682);t.Z=void 0;var o=r(n(7750)),a=n(58120);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow")},77343:(e,t,n)=>{var r=n(66682);t.Z=void 0;var o=r(n(7750)),a=n(58120);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings")},27767:(e,t,n)=>{var r=n(66682);t.Z=void 0;var o=r(n(7750)),a=n(58120);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},36739:(e,t,n)=>{var r=n(66682);t.Z=void 0;var o=r(n(7750)),a=n(58120);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},68913:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(36885),o=n(4981),a=n(36372),i=n(30330),l=n(84199),s=n(3693),c=n(95940),u=n(62923),d=n(9103),h=n(89206),v=n(7967);function p(e){return(0,v.ZP)("MuiSkeleton",e)}(0,h.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var m=n(58120);let f=["animation","className","component","height","style","variant","width"],g=e=>e,Z,b,x,w,C=e=>{let{classes:t,variant:n,animation:r,hasChildren:o,width:a,height:i}=e;return(0,s.Z)({root:["root",n,r,o&&"withChildren",o&&!a&&"fitContent",o&&!i&&"heightAuto"]},p,t)},k=(0,l.F4)(Z||(Z=g`
2
+ 0% {
3
+ opacity: 1;
4
+ }
5
+
6
+ 50% {
7
+ opacity: 0.4;
8
+ }
9
+
10
+ 100% {
11
+ opacity: 1;
12
+ }
13
+ `)),M=(0,l.F4)(b||(b=g`
14
+ 0% {
15
+ transform: translateX(-100%);
16
+ }
17
+
18
+ 50% {
19
+ /* +0.5s of delay between each loop */
20
+ transform: translateX(100%);
21
+ }
22
+
23
+ 100% {
24
+ transform: translateX(100%);
25
+ }
26
+ `)),y=(0,u.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(({theme:e,ownerState:t})=>{let n=String(e.shape.borderRadius).match(/[\d.\-+]*\s*(.*)/)[1]||"px",r=parseFloat(e.shape.borderRadius);return(0,o.Z)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,c.Fq)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===t.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${n}/${Math.round(r/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}},"circular"===t.variant&&{borderRadius:"50%"},"rounded"===t.variant&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>"pulse"===e.animation&&(0,l.iv)(x||(x=g`
27
+ animation: ${0} 2s ease-in-out 0.5s infinite;
28
+ `),k),({ownerState:e,theme:t})=>"wave"===e.animation&&(0,l.iv)(w||(w=g`
29
+ position: relative;
30
+ overflow: hidden;
31
+
32
+ /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
33
+ -webkit-mask-image: -webkit-radial-gradient(white, black);
34
+
35
+ &::after {
36
+ animation: ${0} 2s linear 0.5s infinite;
37
+ background: linear-gradient(
38
+ 90deg,
39
+ transparent,
40
+ ${0},
41
+ transparent
42
+ );
43
+ content: '';
44
+ position: absolute;
45
+ transform: translateX(-100%); /* Avoid flash during server-side hydration */
46
+ bottom: 0;
47
+ left: 0;
48
+ right: 0;
49
+ top: 0;
50
+ }
51
+ `),M,(t.vars||t).palette.action.hover)),E=a.forwardRef(function(e,t){let n=(0,d.i)({props:e,name:"MuiSkeleton"}),{animation:a="pulse",className:l,component:s="span",height:c,style:u,variant:h="text",width:v}=n,p=(0,r.Z)(n,f),g=(0,o.Z)({},n,{animation:a,component:s,variant:h,hasChildren:!!p.children}),Z=C(g);return(0,m.jsx)(y,(0,o.Z)({as:s,ref:t,className:(0,i.Z)(Z.root,l),ownerState:g},p,{style:(0,o.Z)({width:v,height:c},u)}))})},60920:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(36885),o=n(4981),a=n(36372),i=n(3693),l=n(23359),s=n(48170),c=n(49982),u=n(27079);let d=function(e={}){let{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:l}=e,d=(0,s.Z)();a.useEffect(()=>{if(i)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||null==r||r(e,"escapeKeyDown")}},[i,r]);let h=(0,c.Z)((e,t)=>{null==r||r(e,t)}),v=(0,c.Z)(e=>{r&&null!=e&&d.start(e,()=>{h(null,"timeout")})});a.useEffect(()=>(i&&v(t),d.clear),[i,t,v,d]);let p=d.clear,m=a.useCallback(()=>{null!=t&&v(null!=l?l:.5*t)},[t,l,v]),f=e=>t=>{let n=e.onBlur;null==n||n(t),m()},g=e=>t=>{let n=e.onFocus;null==n||n(t),p()},Z=e=>t=>{let n=e.onMouseEnter;null==n||n(t),p()},b=e=>t=>{let n=e.onMouseLeave;null==n||n(t),m()};return a.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",m),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",p)}},[n,i,m,p]),{getRootProps:(t={})=>{let n=(0,o.Z)({},(0,u.Z)(e),(0,u.Z)(t));return(0,o.Z)({role:"presentation"},t,n,{onBlur:f(n),onFocus:g(n),onMouseEnter:Z(n),onMouseLeave:b(n)})},onClickAway:e=>{null==r||r(e,"clickaway")}}};var h=n(21430),v=n(52059),p=n(34200),m=n(58120);function f(e){return e.substring(2).toLowerCase()}function g(e){let{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,l=a.useRef(!1),s=a.useRef(null),u=a.useRef(!1),d=a.useRef(!1);a.useEffect(()=>(setTimeout(()=>{u.current=!0},0),()=>{u.current=!1}),[]);let g=(0,h.Z)((0,p.Z)(t),s),Z=(0,c.Z)(e=>{let t=d.current;d.current=!1;let r=(0,v.Z)(s.current);if(u.current&&s.current&&(!("clientX"in e)||!(r.documentElement.clientWidth<e.clientX)&&!(r.documentElement.clientHeight<e.clientY))){if(l.current){l.current=!1;return}(e.composedPath?e.composedPath().indexOf(s.current)>-1:!r.documentElement.contains(e.target)||s.current.contains(e.target))||!n&&t||o(e)}}),b=e=>n=>{d.current=!0;let r=t.props[e];r&&r(n)},x={ref:g};return!1!==i&&(x[i]=b(i)),a.useEffect(()=>{if(!1!==i){let e=f(i),t=(0,v.Z)(s.current),n=()=>{l.current=!0};return t.addEventListener(e,Z),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,Z),t.removeEventListener("touchmove",n)}}},[Z,i]),!1!==r&&(x[r]=b(r)),a.useEffect(()=>{if(!1!==r){let e=f(r),t=(0,v.Z)(s.current);return t.addEventListener(e,Z),()=>{t.removeEventListener(e,Z)}}},[Z,r]),(0,m.jsx)(a.Fragment,{children:a.cloneElement(t,x)})}var Z=n(62923),b=n(62073),x=n(9103),w=n(29251),C=n(77485),k=n(30330),M=n(93445),y=n(52329),E=n(89206),S=n(7967);function L(e){return(0,S.ZP)("MuiSnackbarContent",e)}(0,E.Z)("MuiSnackbarContent",["root","message","action"]);let R=["action","className","message","role"],O=e=>{let{classes:t}=e;return(0,i.Z)({root:["root"],action:["action"],message:["message"]},L,t)},z=(0,Z.ZP)(y.Z,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?.8:.98,n=(0,M._4)(e.palette.background.default,t);return(0,o.Z)({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),j=(0,Z.ZP)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),P=(0,Z.ZP)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),T=a.forwardRef(function(e,t){let n=(0,x.i)({props:e,name:"MuiSnackbarContent"}),{action:a,className:i,message:l,role:s="alert"}=n,c=(0,r.Z)(n,R),u=O(n);return(0,m.jsxs)(z,(0,o.Z)({role:s,square:!0,elevation:6,className:(0,k.Z)(u.root,i),ownerState:n,ref:t},c,{children:[(0,m.jsx)(j,{className:u.message,ownerState:n,children:l}),a?(0,m.jsx)(P,{className:u.action,ownerState:n,children:a}):null]}))});function V(e){return(0,S.ZP)("MuiSnackbar",e)}(0,E.Z)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);let $=["onEnter","onExited"],F=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],H=e=>{let{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${(0,w.Z)(n.vertical)}${(0,w.Z)(n.horizontal)}`]};return(0,i.Z)(r,V,t)},A=(0,Z.ZP)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`anchorOrigin${(0,w.Z)(n.anchorOrigin.vertical)}${(0,w.Z)(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>(0,o.Z)({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===t.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===t.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===t.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:(0,o.Z)({},"top"===t.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===t.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===t.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===t.anchorOrigin.horizontal&&{right:24,left:"auto"})})),N=a.forwardRef(function(e,t){let n=(0,x.i)({props:e,name:"MuiSnackbar"}),i=(0,b.Z)(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:c,anchorOrigin:{vertical:u,horizontal:h}={vertical:"bottom",horizontal:"left"},autoHideDuration:v=null,children:p,className:f,ClickAwayListenerProps:Z,ContentProps:w,disableWindowBlurListener:k=!1,message:M,open:y,TransitionComponent:E=C.Z,transitionDuration:S=s,TransitionProps:{onEnter:L,onExited:R}={}}=n,O=(0,r.Z)(n.TransitionProps,$),z=(0,r.Z)(n,F),j=(0,o.Z)({},n,{anchorOrigin:{vertical:u,horizontal:h},autoHideDuration:v,disableWindowBlurListener:k,TransitionComponent:E,transitionDuration:S}),P=H(j),{getRootProps:V,onClickAway:N}=d((0,o.Z)({},j)),[B,I]=a.useState(!0),X=(0,l.Z)({elementType:A,getSlotProps:V,externalForwardedProps:z,ownerState:j,additionalProps:{ref:t},className:[P.root,f]});return!y&&B?null:(0,m.jsx)(g,(0,o.Z)({onClickAway:N},Z,{children:(0,m.jsx)(A,(0,o.Z)({},X,{children:(0,m.jsx)(E,(0,o.Z)({appear:!0,in:y,timeout:S,direction:"top"===u?"down":"up",onEnter:(e,t)=>{I(!1),L&&L(e,t)},onExited:e=>{I(!0),R&&R(e)}},O,{children:p||(0,m.jsx)(T,(0,o.Z)({message:M,action:c},w))}))}))}))})}};
@@ -1 +1 @@
1
- exports.id=354,exports.ids=[354],exports.modules={78729:(e,r,t)=>{Promise.resolve().then(t.bind(t,47600))},47600:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>_});var a=t(58120),s=t(36372),i=t(89352),n=t(56539),l=t(40611),o=t(22053),c=t(39497),d=t(54365),x=t(2365),h=t(33549),m=t(58664),p=t(73091),u=t(19609),f=t(63654),g=t(63856),b=t(6695),j=t(33615),y=t(6545),v=t(43908),Z=t(28669),w=t(32130),C=t(88517),k=t(1877),S=t(37372),P=t(34081),z=t(60417);function I(e){return(0,a.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[a.jsx("rect",{width:"32",height:"32",fill:"#5DA840"}),a.jsx("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),a.jsx("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),a.jsx("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),a.jsx("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),a.jsx("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),a.jsx("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),a.jsx("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(36597),A=t(68763);let D=[{label:"Dashboard",href:"/dashboard",icon:a.jsx(y.Z,{})},{label:"Servers",href:"/servers",icon:a.jsx(v.Z,{})},{label:"Worlds",href:"/worlds",icon:a.jsx(k.Z,{})},{label:"Players",href:"/players",icon:a.jsx(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:a.jsx(C.Z,{})},{label:"Backups",href:"/backups",icon:a.jsx(S.Z,{})},{label:"Routing",href:"/routing",icon:a.jsx(w.Z,{})}];function T({mobileOpen:e,onMenuToggle:r}){let t=(0,n.usePathname)(),{data:s}=(0,A.kP)(),y=e=>"/dashboard"===e?"/dashboard"===t||"/"===t:t.startsWith(e);return(0,a.jsxs)(a.Fragment,{children:[a.jsx(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,a.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[a.jsx(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:r,sx:{mr:2,display:{md:"none"}},children:a.jsx(b.Z,{})}),(0,a.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[a.jsx(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),a.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"})]}),a.jsx(i.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=y(e.href);return a.jsx(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,a.jsxs)(i.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:[a.jsx(i.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),a.jsx(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),a.jsx(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:a.jsx(P.Ie,{})})]})}),a.jsx(h.ZP,{variant:"temporary",anchor:"left",open:e,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,a.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,a.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[a.jsx(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),a.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"})]}),a.jsx(d.Z,{onClick:r,"aria-label":"close menu",children:a.jsx(j.Z,{})})]}),a.jsx(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let t=y(e.href);return a.jsx(p.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,a.jsxs)(u.Z,{component:l.default,href:e.href,onClick:()=>{r(),t||(0,W.Av)()},"aria-current":t?"page":void 0,sx:{borderRadius:2,backgroundColor:t?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[a.jsx(f.Z,{sx:{color:t?"primary.main":"text.secondary",minWidth:40},children:e.icon}),a.jsx(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:t?600:400,color:t?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var M=t(23972),q=t(42578),R=t(80336),U=t(3984),E=t(60028);function H(e){return a.jsx(z.Z,{...e,viewBox:"0 0 24 24",children:a.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 B=[{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 V(){let e=new Date().getFullYear();return a.jsx(i.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,a.jsxs)(M.Z,{maxWidth:"lg",sx:{py:6},children:[a.jsx(i.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:B.map(e=>(0,a.jsxs)(i.Z,{children:[a.jsx(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),a.jsx(i.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>a.jsx(i.Z,{component:"li",sx:{mb:1},children:a.jsx(q.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))}),a.jsx(R.Z,{sx:{mb:3}}),(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,a.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",a.jsx(q.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,a.jsxs)(i.Z,{sx:{display:"flex",gap:2},children:[a.jsx(q.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:a.jsx(U.Z,{fontSize:"small"})}),a.jsx(q.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:a.jsx(E.Z,{fontSize:"small"})}),a.jsx(q.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:a.jsx(H,{fontSize:"small"})})]})]})]})})}function _({children:e}){let[r,t]=(0,s.useState)(!1);return(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[a.jsx(T,{mobileOpen:r,onMenuToggle:()=>{t(!r)}}),a.jsx(i.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"88px",sm:"96px"},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:e}),a.jsx(V,{})]})}},34081:(e,r,t)=>{"use strict";t.d(r,{U0:()=>p,WS:()=>u,Ie:()=>I});var a=t(58120),s=t(36372),i=t(89352),n=t(66757),l=t(6275),o=t(92559),c=t(54365),d=t(10257),x=t(3643),h=t(8721),m=t(68763);function p({onSuccess:e}){let[r,t]=(0,s.useState)(""),[p,u]=(0,s.useState)(""),[f,g]=(0,s.useState)(!1),[b,j]=(0,s.useState)({}),[y,v]=(0,s.useState)(null),[Z,w]=(0,s.useState)(!1),C=()=>{let e={};return r?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),j(e),0===Object.keys(e).length},k=async t=>{if(t.preventDefault(),v(null),C()){w(!0);try{let t=await m.cg.email({email:r,password:p});if(t.error){v(t.error.message||"Invalid credentials"),w(!1);return}e&&e()}catch(e){v("An unexpected error occurred. Please try again."),w(!1)}}};return(0,a.jsxs)(i.Z,{component:"form",onSubmit:k,sx:{display:"flex",flexDirection:"column",gap:2},children:[y&&a.jsx(n.Z,{severity:"error",onClose:()=>v(null),children:y}),a.jsx(l.Z,{label:"Email",type:"email",value:r,onChange:e=>t(e.target.value),error:!!b.email,helperText:b.email,disabled:Z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Password",type:f?"text":"password",value:p,onChange:e=>u(e.target.value),error:!!b.password,helperText:b.password,disabled:Z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{g(!f)},edge:"end",children:f?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:Z,fullWidth:!0,size:"large",children:Z?"Signing in...":"Sign In"})]})}function u({onSuccess:e}){let[r,t]=(0,s.useState)(""),[p,u]=(0,s.useState)(""),[f,g]=(0,s.useState)(""),[b,j]=(0,s.useState)(""),[y,v]=(0,s.useState)(!1),[Z,w]=(0,s.useState)(!1),[C,k]=(0,s.useState)({}),[S,P]=(0,s.useState)(null),[z,I]=(0,s.useState)(!1),W=()=>{let e={};return r||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",f?f.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",b?f!==b&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",k(e),0===Object.keys(e).length},A=async t=>{if(t.preventDefault(),P(null),W()){I(!0);try{let t=await m.y1.email({email:p,password:f,name:r});if(t.error){P(t.error.message||"Registration failed"),I(!1);return}e&&e()}catch(e){P("An unexpected error occurred. Please try again."),I(!1)}}};return(0,a.jsxs)(i.Z,{component:"form",onSubmit:A,sx:{display:"flex",flexDirection:"column",gap:2},children:[S&&a.jsx(n.Z,{severity:"error",onClose:()=>P(null),children:S}),a.jsx(l.Z,{label:"Name",type:"text",value:r,onChange:e=>t(e.target.value),error:!!C.name,helperText:C.name,disabled:z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Email",type:"email",value:p,onChange:e=>u(e.target.value),error:!!C.email,helperText:C.email,disabled:z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Password",type:y?"text":"password",value:f,onChange:e=>g(e.target.value),error:!!C.password,helperText:C.password,disabled:z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{v(!y)},edge:"end",children:y?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(l.Z,{label:"Confirm Password",type:Z?"text":"password",value:b,onChange:e=>j(e.target.value),error:!!C.confirmPassword,helperText:C.confirmPassword,disabled:z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{w(!Z)},edge:"end",children:Z?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:z,fullWidth:!0,size:"large",children:z?"Creating account...":"Sign Up"})]})}var f=t(56539),g=t(79943),b=t(61573),j=t(81030),y=t(2365),v=t(48787),Z=t(80336),w=t(99634),C=t(63654),k=t(63856),S=t(62178),P=t(50210),z=t(49185);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[n,l]=(0,s.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return a.jsx(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx(g.Z,{size:24})});if(!r?.user)return a.jsx(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,p=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?`${r[0][0]}${r[1][0]}`.toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,a.jsxs)(a.Fragment,{children:[a.jsx(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:a.jsx(b.Z,{sx:{bgcolor:"primary.main"},children:p})}),(0,a.jsxs)(j.Z,{anchorEl:n,open:!!n,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,a.jsxs)(i.Z,{sx:{px:2,py:1.5,minWidth:200},children:[a.jsx(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),a.jsx(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&a.jsx(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),a.jsx(Z.Z,{}),"admin"===h.role&&(0,a.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[a.jsx(C.Z,{children:a.jsx(S.Z,{fontSize:"small"})}),a.jsx(k.Z,{children:"Users"})]}),(0,a.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[a.jsx(C.Z,{children:a.jsx(P.Z,{fontSize:"small"})}),a.jsx(k.Z,{children:"Settings"})]}),(0,a.jsxs)(w.Z,{onClick:x,children:[a.jsx(C.Z,{children:a.jsx(z.Z,{fontSize:"small"})}),a.jsx(k.Z,{children:"Logout"})]})]})]})}},36597:(e,r,t)=>{"use strict";t.d(r,{Av:()=>a.startLoading});var a=t(21908)},68763:(e,r,t)=>{"use strict";t.d(r,{Cp:()=>x,Nq:()=>d,cg:()=>n,kP:()=>c,w7:()=>l,y1:()=>o,zB:()=>h});var a=t(19106),s=t(82829);let i=(0,a.X)({baseURL:process.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,s.zB)()]}),{signIn:n,signOut:l,signUp:o,useSession:c,updateUser:d,changePassword:x}=i,h=i.admin},26072:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>a});let a=(0,t(2325).createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/(main)/layout.tsx#default`)},52001:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>s});var a=t(15505);let s=e=>[{type:"image/svg+xml",sizes:"any",url:(0,a.fillMetadataSegment)(".",e.params,"icon.svg")+"?0f68875a168deab8"}]}};
1
+ exports.id=354,exports.ids=[354],exports.modules={78729:(e,r,t)=>{Promise.resolve().then(t.bind(t,47600))},47600:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>_});var a=t(58120),s=t(36372),i=t(89352),n=t(56539),l=t(40611),o=t(22053),c=t(39497),d=t(54365),x=t(2365),h=t(33549),m=t(58664),p=t(73091),u=t(19609),f=t(63654),g=t(63856),b=t(6695),j=t(33615),y=t(6545),v=t(43908),Z=t(28669),w=t(32130),C=t(88517),k=t(765),S=t(37372),P=t(34081),z=t(60417);function I(e){return(0,a.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[a.jsx("rect",{width:"32",height:"32",fill:"#5DA840"}),a.jsx("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),a.jsx("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),a.jsx("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),a.jsx("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),a.jsx("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),a.jsx("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),a.jsx("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),a.jsx("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(36597),A=t(68763);let D=[{label:"Dashboard",href:"/dashboard",icon:a.jsx(y.Z,{})},{label:"Servers",href:"/servers",icon:a.jsx(v.Z,{})},{label:"Worlds",href:"/worlds",icon:a.jsx(k.Z,{})},{label:"Players",href:"/players",icon:a.jsx(Z.Z,{})},{label:"Audit",href:"/audit-logs",icon:a.jsx(C.Z,{})},{label:"Backups",href:"/backups",icon:a.jsx(S.Z,{})},{label:"Routing",href:"/routing",icon:a.jsx(w.Z,{})}];function T({mobileOpen:e,onMenuToggle:r}){let t=(0,n.usePathname)(),{data:s}=(0,A.kP)(),y=e=>"/dashboard"===e?"/dashboard"===t||"/"===t:t.startsWith(e);return(0,a.jsxs)(a.Fragment,{children:[a.jsx(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,a.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[a.jsx(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:r,sx:{mr:2,display:{md:"none"}},children:a.jsx(b.Z,{})}),(0,a.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[a.jsx(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),a.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"})]}),a.jsx(i.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:D.map(e=>{let r=y(e.href);return a.jsx(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,a.jsxs)(i.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:[a.jsx(i.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),a.jsx(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),a.jsx(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:a.jsx(P.Ie,{})})]})}),a.jsx(h.ZP,{variant:"temporary",anchor:"left",open:e,onClose:r,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,a.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,a.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[a.jsx(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),a.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"})]}),a.jsx(d.Z,{onClick:r,"aria-label":"close menu",children:a.jsx(j.Z,{})})]}),a.jsx(m.Z,{sx:{flex:1,px:1,py:2},children:D.map(e=>{let t=y(e.href);return a.jsx(p.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,a.jsxs)(u.Z,{component:l.default,href:e.href,onClick:()=>{r(),t||(0,W.Av)()},"aria-current":t?"page":void 0,sx:{borderRadius:2,backgroundColor:t?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[a.jsx(f.Z,{sx:{color:t?"primary.main":"text.secondary",minWidth:40},children:e.icon}),a.jsx(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:t?600:400,color:t?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var M=t(23972),q=t(42578),R=t(80336),U=t(3984),E=t(60028);function H(e){return a.jsx(z.Z,{...e,viewBox:"0 0 24 24",children:a.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 B=[{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 V(){let e=new Date().getFullYear();return a.jsx(i.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,a.jsxs)(M.Z,{maxWidth:"lg",sx:{py:6},children:[a.jsx(i.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:B.map(e=>(0,a.jsxs)(i.Z,{children:[a.jsx(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),a.jsx(i.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>a.jsx(i.Z,{component:"li",sx:{mb:1},children:a.jsx(q.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))}),a.jsx(R.Z,{sx:{mb:3}}),(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,a.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",a.jsx(q.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,a.jsxs)(i.Z,{sx:{display:"flex",gap:2},children:[a.jsx(q.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:a.jsx(U.Z,{fontSize:"small"})}),a.jsx(q.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:a.jsx(E.Z,{fontSize:"small"})}),a.jsx(q.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:a.jsx(H,{fontSize:"small"})})]})]})]})})}function _({children:e}){let[r,t]=(0,s.useState)(!1);return(0,a.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[a.jsx(T,{mobileOpen:r,onMenuToggle:()=>{t(!r)}}),a.jsx(i.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"88px",sm:"96px"},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:e}),a.jsx(V,{})]})}},34081:(e,r,t)=>{"use strict";t.d(r,{U0:()=>p,WS:()=>u,Ie:()=>I});var a=t(58120),s=t(36372),i=t(89352),n=t(66757),l=t(6275),o=t(92559),c=t(54365),d=t(10257),x=t(3643),h=t(8721),m=t(68763);function p({onSuccess:e}){let[r,t]=(0,s.useState)(""),[p,u]=(0,s.useState)(""),[f,g]=(0,s.useState)(!1),[b,j]=(0,s.useState)({}),[y,v]=(0,s.useState)(null),[Z,w]=(0,s.useState)(!1),C=()=>{let e={};return r?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),j(e),0===Object.keys(e).length},k=async t=>{if(t.preventDefault(),v(null),C()){w(!0);try{let t=await m.cg.email({email:r,password:p});if(t.error){v(t.error.message||"Invalid credentials"),w(!1);return}e&&e()}catch(e){v("An unexpected error occurred. Please try again."),w(!1)}}};return(0,a.jsxs)(i.Z,{component:"form",onSubmit:k,sx:{display:"flex",flexDirection:"column",gap:2},children:[y&&a.jsx(n.Z,{severity:"error",onClose:()=>v(null),children:y}),a.jsx(l.Z,{label:"Email",type:"email",value:r,onChange:e=>t(e.target.value),error:!!b.email,helperText:b.email,disabled:Z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Password",type:f?"text":"password",value:p,onChange:e=>u(e.target.value),error:!!b.password,helperText:b.password,disabled:Z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{g(!f)},edge:"end",children:f?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:Z,fullWidth:!0,size:"large",children:Z?"Signing in...":"Sign In"})]})}function u({onSuccess:e}){let[r,t]=(0,s.useState)(""),[p,u]=(0,s.useState)(""),[f,g]=(0,s.useState)(""),[b,j]=(0,s.useState)(""),[y,v]=(0,s.useState)(!1),[Z,w]=(0,s.useState)(!1),[C,k]=(0,s.useState)({}),[S,P]=(0,s.useState)(null),[z,I]=(0,s.useState)(!1),W=()=>{let e={};return r||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",f?f.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",b?f!==b&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",k(e),0===Object.keys(e).length},A=async t=>{if(t.preventDefault(),P(null),W()){I(!0);try{let t=await m.y1.email({email:p,password:f,name:r});if(t.error){P(t.error.message||"Registration failed"),I(!1);return}e&&e()}catch(e){P("An unexpected error occurred. Please try again."),I(!1)}}};return(0,a.jsxs)(i.Z,{component:"form",onSubmit:A,sx:{display:"flex",flexDirection:"column",gap:2},children:[S&&a.jsx(n.Z,{severity:"error",onClose:()=>P(null),children:S}),a.jsx(l.Z,{label:"Name",type:"text",value:r,onChange:e=>t(e.target.value),error:!!C.name,helperText:C.name,disabled:z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Email",type:"email",value:p,onChange:e=>u(e.target.value),error:!!C.email,helperText:C.email,disabled:z,fullWidth:!0,required:!0}),a.jsx(l.Z,{label:"Password",type:y?"text":"password",value:f,onChange:e=>g(e.target.value),error:!!C.password,helperText:C.password,disabled:z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{v(!y)},edge:"end",children:y?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(l.Z,{label:"Confirm Password",type:Z?"text":"password",value:b,onChange:e=>j(e.target.value),error:!!C.confirmPassword,helperText:C.confirmPassword,disabled:z,fullWidth:!0,required:!0,InputProps:{endAdornment:a.jsx(o.Z,{position:"end",children:a.jsx(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{w(!Z)},edge:"end",children:Z?a.jsx(x.Z,{}):a.jsx(h.Z,{})})})}}),a.jsx(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:z,fullWidth:!0,size:"large",children:z?"Creating account...":"Sign Up"})]})}var f=t(56539),g=t(79943),b=t(61573),j=t(81030),y=t(2365),v=t(48787),Z=t(80336),w=t(99634),C=t(63654),k=t(63856),S=t(62178),P=t(50210),z=t(49185);function I(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[n,l]=(0,s.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return a.jsx(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx(g.Z,{size:24})});if(!r?.user)return a.jsx(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,p=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?`${r[0][0]}${r[1][0]}`.toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,a.jsxs)(a.Fragment,{children:[a.jsx(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:a.jsx(b.Z,{sx:{bgcolor:"primary.main"},children:p})}),(0,a.jsxs)(j.Z,{anchorEl:n,open:!!n,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,a.jsxs)(i.Z,{sx:{px:2,py:1.5,minWidth:200},children:[a.jsx(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),a.jsx(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&a.jsx(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),a.jsx(Z.Z,{}),"admin"===h.role&&(0,a.jsxs)(w.Z,{onClick:()=>{o(),e.push("/admin/users")},children:[a.jsx(C.Z,{children:a.jsx(S.Z,{fontSize:"small"})}),a.jsx(k.Z,{children:"Users"})]}),(0,a.jsxs)(w.Z,{onClick:()=>{o(),e.push("/settings")},children:[a.jsx(C.Z,{children:a.jsx(P.Z,{fontSize:"small"})}),a.jsx(k.Z,{children:"Settings"})]}),(0,a.jsxs)(w.Z,{onClick:x,children:[a.jsx(C.Z,{children:a.jsx(z.Z,{fontSize:"small"})}),a.jsx(k.Z,{children:"Logout"})]})]})]})}},36597:(e,r,t)=>{"use strict";t.d(r,{Av:()=>a.startLoading});var a=t(21908)},68763:(e,r,t)=>{"use strict";t.d(r,{Cp:()=>x,Nq:()=>d,cg:()=>n,kP:()=>c,w7:()=>l,y1:()=>o,zB:()=>h});var a=t(19106),s=t(82829);let i=(0,a.X)({baseURL:process.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,s.zB)()]}),{signIn:n,signOut:l,signUp:o,useSession:c,updateUser:d,changePassword:x}=i,h=i.admin},26072:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>a});let a=(0,t(2325).createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/app/(main)/layout.tsx#default`)},52001:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>s});var a=t(15505);let s=e=>[{type:"image/svg+xml",sizes:"any",url:(0,a.fillMetadataSegment)(".",e.params,"icon.svg")+"?0f68875a168deab8"}]}};
@@ -1,4 +1,4 @@
1
- exports.id=6175,exports.ids=[6175],exports.modules={24705:(e,r,t)=>{Promise.resolve().then(t.bind(t,83053)),Promise.resolve().then(t.bind(t,21908)),Promise.resolve().then(t.bind(t,53014)),Promise.resolve().then(t.bind(t,53966)),Promise.resolve().then(t.bind(t,93551))},81323:(e,r,t)=>{Promise.resolve().then(t.t.bind(t,67348,23)),Promise.resolve().then(t.t.bind(t,98985,23)),Promise.resolve().then(t.t.bind(t,20881,23)),Promise.resolve().then(t.t.bind(t,68123,23)),Promise.resolve().then(t.t.bind(t,69806,23)),Promise.resolve().then(t.t.bind(t,97952,23))},21908:(e,r,t)=>{"use strict";t.d(r,{LoadingProvider:()=>o,startLoading:()=>d,stopLoading:()=>c});var s=t(58120);t(36372);var a=t(56539),i=t(42070),n=t.n(i);function o({children:e}){return(0,a.usePathname)(),(0,a.useSearchParams)(),s.jsx(s.Fragment,{children:e})}function d(){n().start()}function c(){n().done()}n().configure({showSpinner:!1,speed:300,minimum:.1})},53014:(e,r,t)=>{"use strict";t.d(r,{QueryProvider:()=>n});var s=t(58120),a=t(85084),i=t(95343);function n({children:e}){let r=new a.S({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});return s.jsx(i.aH,{client:r,children:e})}},93551:(e,r,t)=>{"use strict";t.d(r,{ThemeProvider:()=>o});var s=t(58120),a=t(94756),i=t(57879),n=t(53966);function o({children:e}){return(0,s.jsxs)(a.Z,{theme:n.darkTheme,children:[s.jsx(i.ZP,{}),e]})}},53966:(e,r,t)=>{"use strict";t.d(r,{darkTheme:()=>i});var s=t(16476);let a={bgBase:"#16181c",bgRaised:"#1a1d22",bgSurface:"#26282e",bgElevated:"#313338",textPrimary:"#ffffff",textSecondary:"#9a9a9a",border:"#2e3035",primary:"#1bd96a",primaryLight:"#4de38a",primaryDark:"#15a852",secondary:"#7c3aed",secondaryLight:"#9f67f0",secondaryDark:"#5b21b6"},i=(0,s.Z)({palette:{mode:"dark",primary:{main:a.primary,light:a.primaryLight,dark:a.primaryDark},secondary:{main:a.secondary,light:a.secondaryLight,dark:a.secondaryDark},background:{default:a.bgBase,paper:a.bgRaised},success:{main:"#22c55e"},error:{main:"#ef4444"},warning:{main:"#f59e0b"},text:{primary:a.textPrimary,secondary:a.textSecondary},divider:a.border,action:{hover:a.bgSurface,selected:a.bgSurface}},typography:{fontFamily:'var(--font-roboto-mono), "Roboto Mono", monospace'},components:{MuiCard:{styleOverrides:{root:{backgroundColor:a.bgRaised,borderRadius:"12px",border:`1px solid ${a.border}`}}},MuiPaper:{styleOverrides:{root:{backgroundImage:"none"}}},MuiButton:{styleOverrides:{root:{borderRadius:"8px",textTransform:"none"}}},MuiAppBar:{styleOverrides:{root:{backgroundColor:a.bgRaised,borderBottom:`1px solid ${a.border}`}}},MuiDrawer:{styleOverrides:{paper:{backgroundColor:a.bgRaised,borderRight:`1px solid ${a.border}`}}},MuiCssBaseline:{styleOverrides:{body:{scrollbarColor:`${a.bgElevated} ${a.bgBase}`,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:a.bgBase,width:8},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:a.bgElevated,minHeight:24},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:a.bgSurface}}}}}})},97759:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>T,metadata:()=>m});var s=t(8203),a=t(38888),i=t.n(a),n=t(84898),o=t(65577),d=t(2325);(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/theme/muiTheme.ts#darkTheme`);let c=(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/theme/ThemeProvider.tsx#ThemeProvider`),l=(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/lib/QueryProvider.tsx#QueryProvider`);t(22587),t(8290),t(60154);let u=(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/components/providers/LoadingProvider.tsx#LoadingProvider`);(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/components/providers/LoadingProvider.tsx#startLoading`),(0,d.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/components/providers/LoadingProvider.tsx#stopLoading`),t(56825);let m={title:"Minecraft Server Manager",description:"Web-based management console for Minecraft server infrastructure"};function T({children:e}){return s.jsx("html",{lang:"en",children:s.jsx("body",{className:`${i().variable} ${i().className}`,children:s.jsx("div",{id:"__next",children:s.jsx(o.Z,{children:s.jsx(c,{children:s.jsx(l,{children:s.jsx(n.Suspense,{fallback:null,children:s.jsx(u,{children:e})})})})})})})})}},60154:(e,r,t)=>{"use strict";t.d(r,{Ke:()=>l,kF:()=>c,l4:()=>o,mk:()=>d});var s=t(31969),a=t(22587),i=t(8290),n=t(30579);class o extends Error{constructor(e,r=401){super(e),this.statusCode=r,this.name="AuthError"}}async function d(e){let r=await (0,s.Z)(e);if(!r)throw new o("Unauthorized",401);return r}async function c(e){let r=await d(e);if("admin"!==r.user.role)throw new o("Forbidden: Admin access required",403);return r}async function l(e,r,t="view"){let s=await d(e);if("admin"===s.user.role)return s;let c=await a.db.select().from(i.userServers).where((0,n.xD)((0,n.eq)(i.userServers.userId,s.user.id),(0,n.eq)(i.userServers.serverId,r))).limit(1);if(0===c.length)throw new o("Forbidden: No access to this server",403);let l=c[0].permission,u={view:1,manage:2,admin:3};if(u[l]<u[t])throw new o(`Forbidden: Requires ${t} permission`,403);return s}},31969:(e,r,t)=>{"use strict";t.d(r,{I:()=>l,Z:()=>u});var s=t(33580),a=t(5944),i=t(90224),n=t(22587),o=t(8290);let d=process.env.BETTER_AUTH_BASE_URL||`http://localhost:${process.env.PORT||5e3}`,c=d.startsWith("https://"),l=(0,s.kj)({baseURL:d,secret:process.env.BETTER_AUTH_SECRET,database:(0,a.s)(n.db,{provider:"sqlite",schema:{user:o.users,session:o.sessions,account:o.accounts,verification:o.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},advanced:{useSecureCookies:c},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,i.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:e=>{let r=["http://localhost:5000","http://localhost:3000",d,process.env.NEXT_PUBLIC_APP_URL];if(e){let t=e.headers.get("origin");t&&function(e){try{let r=new URL(e).hostname;return"localhost"===r||"127.0.0.1"===r||"::1"===r||r.startsWith("192.168.")||r.startsWith("10.")||/^172\.(1[6-9]|2\d|3[01])\./.test(r)||r.endsWith(".local")}catch{return!1}}(t)&&r.push(t)}return r}});async function u(e){return l.api.getSession({headers:e})}},22587:(e,r,t)=>{"use strict";t.d(r,{db:()=>m});var s=t(85890),a=t.n(s),i=t(31590),n=t(8290),o=t(55315),d=t.n(o),c=t(92048);let l=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=process.env.MCCTL_ROOT||process.cwd(),r=d().join(e,"data");return d().join(r,"mcctl.db")}();!function(e){if(":memory:"===e)return;let r=d().dirname(e);(0,c.existsSync)(r)||(0,c.mkdirSync)(r,{recursive:!0})}(l);let u=new(a())(l);u.pragma("journal_mode = WAL"),u.pragma("foreign_keys = ON"),u.exec(`
1
+ exports.id=3613,exports.ids=[3613],exports.modules={41982:(e,r,t)=>{Promise.resolve().then(t.bind(t,83053)),Promise.resolve().then(t.bind(t,21908)),Promise.resolve().then(t.bind(t,53014)),Promise.resolve().then(t.bind(t,53966)),Promise.resolve().then(t.bind(t,93551))},81323:(e,r,t)=>{Promise.resolve().then(t.t.bind(t,67348,23)),Promise.resolve().then(t.t.bind(t,98985,23)),Promise.resolve().then(t.t.bind(t,20881,23)),Promise.resolve().then(t.t.bind(t,68123,23)),Promise.resolve().then(t.t.bind(t,69806,23)),Promise.resolve().then(t.t.bind(t,97952,23))},21908:(e,r,t)=>{"use strict";t.d(r,{LoadingProvider:()=>o,startLoading:()=>d,stopLoading:()=>c});var s=t(58120);t(36372);var a=t(56539),i=t(42070),n=t.n(i);function o({children:e}){return(0,a.usePathname)(),(0,a.useSearchParams)(),s.jsx(s.Fragment,{children:e})}function d(){n().start()}function c(){n().done()}n().configure({showSpinner:!1,speed:300,minimum:.1})},53014:(e,r,t)=>{"use strict";t.d(r,{QueryProvider:()=>n});var s=t(58120),a=t(85084),i=t(95343);function n({children:e}){let r=new a.S({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});return s.jsx(i.aH,{client:r,children:e})}},93551:(e,r,t)=>{"use strict";t.d(r,{ThemeProvider:()=>o});var s=t(58120),a=t(94756),i=t(57879),n=t(53966);function o({children:e}){return(0,s.jsxs)(a.Z,{theme:n.darkTheme,children:[s.jsx(i.ZP,{}),e]})}},53966:(e,r,t)=>{"use strict";t.d(r,{darkTheme:()=>i});var s=t(16476);let a={bgBase:"#16181c",bgRaised:"#1a1d22",bgSurface:"#26282e",bgElevated:"#313338",textPrimary:"#ffffff",textSecondary:"#9a9a9a",border:"#2e3035",primary:"#1bd96a",primaryLight:"#4de38a",primaryDark:"#15a852",secondary:"#7c3aed",secondaryLight:"#9f67f0",secondaryDark:"#5b21b6"},i=(0,s.Z)({palette:{mode:"dark",primary:{main:a.primary,light:a.primaryLight,dark:a.primaryDark},secondary:{main:a.secondary,light:a.secondaryLight,dark:a.secondaryDark},background:{default:a.bgBase,paper:a.bgRaised},success:{main:"#22c55e"},error:{main:"#ef4444"},warning:{main:"#f59e0b"},text:{primary:a.textPrimary,secondary:a.textSecondary},divider:a.border,action:{hover:a.bgSurface,selected:a.bgSurface}},typography:{},components:{MuiCard:{styleOverrides:{root:{backgroundColor:a.bgRaised,borderRadius:"12px",border:`1px solid ${a.border}`}}},MuiPaper:{styleOverrides:{root:{backgroundImage:"none"}}},MuiButton:{styleOverrides:{root:{borderRadius:"8px",textTransform:"none"}}},MuiAppBar:{styleOverrides:{root:{backgroundColor:a.bgRaised,borderBottom:`1px solid ${a.border}`}}},MuiDrawer:{styleOverrides:{paper:{backgroundColor:a.bgRaised,borderRight:`1px solid ${a.border}`}}},MuiCssBaseline:{styleOverrides:{body:{scrollbarColor:`${a.bgElevated} ${a.bgBase}`,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:a.bgBase,width:8},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:a.bgElevated,minHeight:24},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:a.bgSurface}}}}}})},97759:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>u,metadata:()=>l});var s=t(8203),a=t(84898),i=t(65577),n=t(2325);(0,n.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/theme/muiTheme.ts#darkTheme`);let o=(0,n.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/theme/ThemeProvider.tsx#ThemeProvider`),d=(0,n.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/lib/QueryProvider.tsx#QueryProvider`);t(22587),t(8290),t(60154);let c=(0,n.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/components/providers/LoadingProvider.tsx#LoadingProvider`);(0,n.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/components/providers/LoadingProvider.tsx#startLoading`),(0,n.createProxy)(String.raw`/home/runner/work/minecraft-server-manager/minecraft-server-manager/platform/services/mcctl-console/src/components/providers/LoadingProvider.tsx#stopLoading`),t(56825);let l={title:"Minecraft Server Manager",description:"Web-based management console for Minecraft server infrastructure"};function u({children:e}){return s.jsx("html",{lang:"en",children:s.jsx("body",{children:s.jsx("div",{id:"__next",children:s.jsx(i.Z,{children:s.jsx(o,{children:s.jsx(d,{children:s.jsx(a.Suspense,{fallback:null,children:s.jsx(c,{children:e})})})})})})})})}},60154:(e,r,t)=>{"use strict";t.d(r,{Ke:()=>l,kF:()=>c,l4:()=>o,mk:()=>d});var s=t(31969),a=t(22587),i=t(8290),n=t(30579);class o extends Error{constructor(e,r=401){super(e),this.statusCode=r,this.name="AuthError"}}async function d(e){let r=await (0,s.Z)(e);if(!r)throw new o("Unauthorized",401);return r}async function c(e){let r=await d(e);if("admin"!==r.user.role)throw new o("Forbidden: Admin access required",403);return r}async function l(e,r,t="view"){let s=await d(e);if("admin"===s.user.role)return s;let c=await a.db.select().from(i.userServers).where((0,n.xD)((0,n.eq)(i.userServers.userId,s.user.id),(0,n.eq)(i.userServers.serverId,r))).limit(1);if(0===c.length)throw new o("Forbidden: No access to this server",403);let l=c[0].permission,u={view:1,manage:2,admin:3};if(u[l]<u[t])throw new o(`Forbidden: Requires ${t} permission`,403);return s}},31969:(e,r,t)=>{"use strict";t.d(r,{I:()=>l,Z:()=>u});var s=t(33580),a=t(5944),i=t(90224),n=t(22587),o=t(8290);let d=process.env.BETTER_AUTH_BASE_URL||`http://localhost:${process.env.PORT||5e3}`,c=d.startsWith("https://"),l=(0,s.kj)({baseURL:d,secret:process.env.BETTER_AUTH_SECRET,database:(0,a.s)(n.db,{provider:"sqlite",schema:{user:o.users,session:o.sessions,account:o.accounts,verification:o.verifications}}),emailAndPassword:{enabled:!0,requireEmailVerification:!1},session:{expiresIn:604800,updateAge:86400,cookieCache:{enabled:!0,maxAge:300}},advanced:{useSecureCookies:c},user:{additionalFields:{role:{type:"string",required:!1,defaultValue:"user",input:!1}}},plugins:[(0,i.SA)({defaultRole:"user",adminRole:"admin"})],trustedOrigins:e=>{let r=["http://localhost:5000","http://localhost:3000",d,process.env.NEXT_PUBLIC_APP_URL];if(e){let t=e.headers.get("origin");t&&function(e){try{let r=new URL(e).hostname;return"localhost"===r||"127.0.0.1"===r||"::1"===r||r.startsWith("192.168.")||r.startsWith("10.")||/^172\.(1[6-9]|2\d|3[01])\./.test(r)||r.endsWith(".local")}catch{return!1}}(t)&&r.push(t)}return r}});async function u(e){return l.api.getSession({headers:e})}},22587:(e,r,t)=>{"use strict";t.d(r,{db:()=>m});var s=t(85890),a=t.n(s),i=t(31590),n=t(8290),o=t(55315),d=t.n(o),c=t(92048);let l=function(){if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=process.env.MCCTL_ROOT||process.cwd(),r=d().join(e,"data");return d().join(r,"mcctl.db")}();!function(e){if(":memory:"===e)return;let r=d().dirname(e);(0,c.existsSync)(r)||(0,c.mkdirSync)(r,{recursive:!0})}(l);let u=new(a())(l);u.pragma("journal_mode = WAL"),u.pragma("foreign_keys = ON"),u.exec(`
2
2
  CREATE TABLE IF NOT EXISTS users (
3
3
  id TEXT PRIMARY KEY,
4
4
  name TEXT NOT NULL,
@@ -0,0 +1 @@
1
+ "use strict";exports.id=4207,exports.ids=[4207],exports.modules={84527:(t,e,r)=>{var i=r(66682);e.Z=void 0;var o=i(r(7750)),n=r(58120);e.Z=(0,o.default)((0,n.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},38481:(t,e,r)=>{var i=r(66682);e.Z=void 0;var o=i(r(7750)),n=r(58120);e.Z=(0,o.default)((0,n.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person")},95009:(t,e,r)=>{r.d(e,{Z:()=>M});var i=r(4981),o=r(36885),n=r(36372),s=r(30330),a=r(3693),d=r(62923),l=r(9103),u=r(5374),c=r(52329),p=r(33041),h=r(3011),m=r(55753),f=r(89206),v=r(7967);function g(t){return(0,v.ZP)("MuiAccordion",t)}let x=(0,f.Z)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]);var b=r(58120);let Z=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],y=t=>{let{classes:e,square:r,expanded:i,disabled:o,disableGutters:n}=t;return(0,a.Z)({root:["root",!r&&"rounded",i&&"expanded",o&&"disabled",!n&&"gutters"],region:["region"]},g,e)},R=(0,d.ZP)(c.Z,{name:"MuiAccordion",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[{[`& .${x.region}`]:e.region},e.root,!r.square&&e.rounded,!r.disableGutters&&e.gutters]}})(({theme:t})=>{let e={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],e),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],e)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${x.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${x.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}},({theme:t})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${x.expanded}`]:{margin:"16px 0"}}}]})),M=n.forwardRef(function(t,e){let r=(0,l.i)({props:t,name:"MuiAccordion"}),{children:a,className:d,defaultExpanded:c=!1,disabled:f=!1,disableGutters:v=!1,expanded:g,onChange:x,square:M=!1,slots:w={},slotProps:C={},TransitionComponent:S,TransitionProps:P}=r,E=(0,o.Z)(r,Z),[A,$]=(0,h.Z)({controlled:g,default:c,name:"Accordion",state:"expanded"}),j=n.useCallback(t=>{$(!A),x&&x(t,!A)},[A,x,$]),[O,...N]=n.Children.toArray(a),I=n.useMemo(()=>({expanded:A,disabled:f,disableGutters:v,toggle:j}),[A,f,v,j]),z=(0,i.Z)({},r,{square:M,disabled:f,disableGutters:v,expanded:A}),T=y(z),k=(0,i.Z)({transition:S},w),D=(0,i.Z)({transition:P},C),[V,W]=(0,m.Z)("transition",{elementType:u.Z,externalForwardedProps:{slots:k,slotProps:D},ownerState:z});return(0,b.jsxs)(R,(0,i.Z)({className:(0,s.Z)(T.root,d),ref:e,ownerState:z,square:M},E,{children:[(0,b.jsx)(p.Z.Provider,{value:I,children:O}),(0,b.jsx)(V,(0,i.Z)({in:A,timeout:"auto"},W,{children:(0,b.jsx)("div",{"aria-labelledby":O.props.id,id:O.props["aria-controls"],role:"region",className:T.region,children:N})}))]}))})},33041:(t,e,r)=>{r.d(e,{Z:()=>i});let i=r(36372).createContext({})},45912:(t,e,r)=>{r.d(e,{Z:()=>g});var i=r(4981),o=r(36885),n=r(36372),s=r(30330),a=r(3693),d=r(62923),l=r(9103),u=r(89206),c=r(7967);function p(t){return(0,c.ZP)("MuiAccordionDetails",t)}(0,u.Z)("MuiAccordionDetails",["root"]);var h=r(58120);let m=["className"],f=t=>{let{classes:e}=t;return(0,a.Z)({root:["root"]},p,e)},v=(0,d.ZP)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({padding:t.spacing(1,2,2)})),g=n.forwardRef(function(t,e){let r=(0,l.i)({props:t,name:"MuiAccordionDetails"}),{className:n}=r,a=(0,o.Z)(r,m),d=f(r);return(0,h.jsx)(v,(0,i.Z)({className:(0,s.Z)(d.root,n),ref:e,ownerState:r},a))})},4587:(t,e,r)=>{r.d(e,{Z:()=>R});var i=r(4981),o=r(36885),n=r(36372),s=r(30330),a=r(3693),d=r(62923),l=r(9103),u=r(39183),c=r(33041),p=r(89206),h=r(7967);function m(t){return(0,h.ZP)("MuiAccordionSummary",t)}let f=(0,p.Z)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]);var v=r(58120);let g=["children","className","expandIcon","focusVisibleClassName","onClick"],x=t=>{let{classes:e,expanded:r,disabled:i,disableGutters:o}=t;return(0,a.Z)({root:["root",r&&"expanded",i&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",r&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",r&&"expanded"]},m,e)},b=(0,d.ZP)(u.Z,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{let e={duration:t.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],e),[`&.${f.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${f.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`&:hover:not(.${f.disabled})`]:{cursor:"pointer"},variants:[{props:t=>!t.disableGutters,style:{[`&.${f.expanded}`]:{minHeight:64}}}]}}),Z=(0,d.ZP)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(t,e)=>e.content})(({theme:t})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),[`&.${f.expanded}`]:{margin:"20px 0"}}}]})),y=(0,d.ZP)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(t,e)=>e.expandIconWrapper})(({theme:t})=>({display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),[`&.${f.expanded}`]:{transform:"rotate(180deg)"}})),R=n.forwardRef(function(t,e){let r=(0,l.i)({props:t,name:"MuiAccordionSummary"}),{children:a,className:d,expandIcon:u,focusVisibleClassName:p,onClick:h}=r,m=(0,o.Z)(r,g),{disabled:f=!1,disableGutters:R,expanded:M,toggle:w}=n.useContext(c.Z),C=(0,i.Z)({},r,{expanded:M,disabled:f,disableGutters:R}),S=x(C);return(0,v.jsxs)(b,(0,i.Z)({focusRipple:!1,disableRipple:!0,disabled:f,component:"div","aria-expanded":M,className:(0,s.Z)(S.root,d),focusVisibleClassName:(0,s.Z)(S.focusVisible,p),onClick:t=>{w&&w(t),h&&h(t)},ref:e,ownerState:C},m,{children:[(0,v.jsx)(Z,{className:S.content,ownerState:C,children:a}),u&&(0,v.jsx)(y,{className:S.expandIconWrapper,ownerState:C,children:u})]}))})},5374:(t,e,r)=>{r.d(e,{Z:()=>S});var i=r(36885),o=r(4981),n=r(36372),s=r(30330),a=r(82474),d=r(48170),l=r(3693),u=r(62923),c=r(9103),p=r(62546),h=r(83871),m=r(62073),f=r(69473),v=r(89206),g=r(7967);function x(t){return(0,g.ZP)("MuiCollapse",t)}(0,v.Z)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var b=r(58120);let Z=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],y=t=>{let{orientation:e,classes:r}=t,i={root:["root",`${e}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${e}`],wrapperInner:["wrapperInner",`${e}`]};return(0,l.Z)(i,x,r)},R=(0,u.ZP)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:r}=t;return[e.root,e[r.orientation],"entered"===r.state&&e.entered,"exited"===r.state&&!r.in&&"0px"===r.collapsedSize&&e.hidden]}})(({theme:t,ownerState:e})=>(0,o.Z)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===e.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===e.state&&(0,o.Z)({height:"auto",overflow:"visible"},"horizontal"===e.orientation&&{width:"auto"}),"exited"===e.state&&!e.in&&"0px"===e.collapsedSize&&{visibility:"hidden"})),M=(0,u.ZP)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})(({ownerState:t})=>(0,o.Z)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})),w=(0,u.ZP)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(t,e)=>e.wrapperInner})(({ownerState:t})=>(0,o.Z)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})),C=n.forwardRef(function(t,e){let r=(0,c.i)({props:t,name:"MuiCollapse"}),{addEndListener:l,children:u,className:v,collapsedSize:g="0px",component:x,easing:C,in:S,onEnter:P,onEntered:E,onEntering:A,onExit:$,onExited:j,onExiting:O,orientation:N="vertical",style:I,timeout:z=p.x9.standard,TransitionComponent:T=a.ZP}=r,k=(0,i.Z)(r,Z),D=(0,o.Z)({},r,{orientation:N,collapsedSize:g}),V=y(D),W=(0,m.Z)(),L=(0,d.Z)(),G=n.useRef(null),B=n.useRef(),H="number"==typeof g?`${g}px`:g,K="horizontal"===N,q=K?"width":"height",F=n.useRef(null),U=(0,f.Z)(e,F),Y=t=>e=>{if(t){let r=F.current;void 0===e?t(r):t(r,e)}},J=()=>G.current?G.current[K?"clientWidth":"clientHeight"]:0,Q=Y((t,e)=>{G.current&&K&&(G.current.style.position="absolute"),t.style[q]=H,P&&P(t,e)}),X=Y((t,e)=>{let r=J();G.current&&K&&(G.current.style.position="");let{duration:i,easing:o}=(0,h.C)({style:I,timeout:z,easing:C},{mode:"enter"});if("auto"===z){let e=W.transitions.getAutoHeightDuration(r);t.style.transitionDuration=`${e}ms`,B.current=e}else t.style.transitionDuration="string"==typeof i?i:`${i}ms`;t.style[q]=`${r}px`,t.style.transitionTimingFunction=o,A&&A(t,e)}),_=Y((t,e)=>{t.style[q]="auto",E&&E(t,e)}),tt=Y(t=>{t.style[q]=`${J()}px`,$&&$(t)}),te=Y(j),tr=Y(t=>{let e=J(),{duration:r,easing:i}=(0,h.C)({style:I,timeout:z,easing:C},{mode:"exit"});if("auto"===z){let r=W.transitions.getAutoHeightDuration(e);t.style.transitionDuration=`${r}ms`,B.current=r}else t.style.transitionDuration="string"==typeof r?r:`${r}ms`;t.style[q]=H,t.style.transitionTimingFunction=i,O&&O(t)});return(0,b.jsx)(T,(0,o.Z)({in:S,onEnter:Q,onEntered:_,onEntering:X,onExit:tt,onExited:te,onExiting:tr,addEndListener:t=>{"auto"===z&&L.start(B.current||0,t),l&&l(F.current,t)},nodeRef:F,timeout:"auto"===z?null:z},k,{children:(t,e)=>(0,b.jsx)(R,(0,o.Z)({as:x,className:(0,s.Z)(V.root,v,{entered:V.entered,exited:!S&&"0px"===H&&V.hidden}[t]),style:(0,o.Z)({[K?"minWidth":"minHeight"]:H},I),ref:U},e,{ownerState:(0,o.Z)({},D,{state:t}),children:(0,b.jsx)(M,{ownerState:(0,o.Z)({},D,{state:t}),className:V.wrapper,ref:G,children:(0,b.jsx)(w,{ownerState:(0,o.Z)({},D,{state:t}),className:V.wrapperInner,children:u})})}))}))});C.muiSupportAuto=!0;let S=C},20042:(t,e,r)=>{r.d(e,{D:()=>u});var i=r(36372),o=r(83365),n=r(96254),s=r(16360),a=r(35114),d=class extends s.l{#t;#e=void 0;#r;#i;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,a.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,a.Ym)(e.mutationKey)!==(0,a.Ym)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#o(),this.#n(t)}getCurrentResult(){return this.#e}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#o(),this.#n()}mutate(t,e){return this.#i=e,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(t)}#o(){let t=this.#r?.state??(0,o.R)();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#n(t){n.Vr.batch(()=>{if(this.#i&&this.hasListeners()){let e=this.#e.variables,r=this.#e.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,e,r,i)}catch(t){Promise.reject(t)}try{this.#i.onSettled?.(t.data,null,e,r,i)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,e,r,i)}catch(t){Promise.reject(t)}try{this.#i.onSettled?.(void 0,t.error,e,r,i)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#e)})})}},l=r(95343);function u(t,e){let r=(0,l.NL)(e),[o]=i.useState(()=>new d(r,t));i.useEffect(()=>{o.setOptions(t)},[o,t]);let s=i.useSyncExternalStore(i.useCallback(t=>o.subscribe(n.Vr.batchCalls(t)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=i.useCallback((t,e)=>{o.mutate(t,e).catch(a.ZT)},[o]);if(s.error&&(0,a.L3)(o.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=4282,exports.ids=[4282],exports.modules={22599:(e,t,l)=>{l.d(t,{Z:()=>S});var r=l(36885),o=l(4981),n=l(36372),i=l(30330),a=l(3693),s=l(39183),c=l(29251),d=l(9103),u=l(62923),f=l(89206),p=l(7967);function b(e){return(0,p.ZP)("MuiTab",e)}let h=(0,f.Z)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]);var v=l(58120);let m=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],x=e=>{let{classes:t,textColor:l,fullWidth:r,wrapped:o,icon:n,label:i,selected:s,disabled:d}=e,u={root:["root",n&&i&&"labelIcon",`textColor${(0,c.Z)(l)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",d&&"disabled"],iconWrapper:["iconWrapper"]};return(0,a.Z)(u,b,t)},Z=(0,u.ZP)(s.Z,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:l}=e;return[t.root,l.label&&l.icon&&t.labelIcon,t[`textColor${(0,c.Z)(l.textColor)}`],l.fullWidth&&t.fullWidth,l.wrapped&&t.wrapped,{[`& .${h.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>(0,o.Z)({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${h.iconWrapper}`]:(0,o.Z)({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${h.selected}`]:{opacity:1},[`&.${h.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${h.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${h.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${h.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${h.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),S=n.forwardRef(function(e,t){let l=(0,d.i)({props:e,name:"MuiTab"}),{className:a,disabled:s=!1,disableFocusRipple:c=!1,fullWidth:u,icon:f,iconPosition:p="top",indicator:b,label:h,onChange:S,onClick:g,onFocus:w,selected:y,selectionFollowsFocus:B,textColor:C="inherit",value:E,wrapped:W=!1}=l,I=(0,r.Z)(l,m),M=(0,o.Z)({},l,{disabled:s,disableFocusRipple:c,selected:y,icon:!!f,iconPosition:p,label:!!h,fullWidth:u,textColor:C,wrapped:W}),P=x(M),R=f&&h&&n.isValidElement(f)?n.cloneElement(f,{className:(0,i.Z)(P.iconWrapper,f.props.className)}):f;return(0,v.jsxs)(Z,(0,o.Z)({focusRipple:!c,className:(0,i.Z)(P.root,a),ref:t,role:"tab","aria-selected":y,disabled:s,onClick:e=>{!y&&S&&S(e,E),g&&g(e)},onFocus:e=>{B&&!y&&S&&S(e,E),w&&w(e)},ownerState:M,tabIndex:y?0:-1},I,{children:["top"===p||"start"===p?(0,v.jsxs)(n.Fragment,{children:[R,h]}):(0,v.jsxs)(n.Fragment,{children:[h,R]}),b]}))})},65137:(e,t,l)=>{let r;l.d(t,{Z:()=>K});var o=l(36885),n=l(4981),i=l(36372),a=l(30330),s=l(3693),c=l(10587),d=l(23359),u=l(62923),f=l(9103),p=l(62073),b=l(4793);function h(){if(r)return r;let e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),r="reverse",e.scrollLeft>0?r="default":(e.scrollLeft=1,0===e.scrollLeft&&(r="negative")),document.body.removeChild(e),r}function v(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var m=l(22608),x=l(76805),Z=l(58120);let S=["onChange"],g={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var w=l(29235),y=l(63645),B=l(39183),C=l(89206),E=l(7967);function W(e){return(0,E.ZP)("MuiTabScrollButton",e)}let I=(0,C.Z)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),M=["className","slots","slotProps","direction","orientation","disabled"],P=e=>{let{classes:t,orientation:l,disabled:r}=e;return(0,s.Z)({root:["root",l,r&&"disabled"]},W,t)},R=(0,u.ZP)(B.Z,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:l}=e;return[t.root,l.orientation&&t[l.orientation]]}})(({ownerState:e})=>(0,n.Z)({width:40,flexShrink:0,opacity:.8,[`&.${I.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),T=i.forwardRef(function(e,t){var l,r;let i=(0,f.i)({props:e,name:"MuiTabScrollButton"}),{className:s,slots:u={},slotProps:p={},direction:b}=i,h=(0,o.Z)(i,M),v=(0,c.V)(),m=(0,n.Z)({isRtl:v},i),x=P(m),S=null!=(l=u.StartScrollButtonIcon)?l:w.Z,g=null!=(r=u.EndScrollButtonIcon)?r:y.Z,B=(0,d.Z)({elementType:S,externalSlotProps:p.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),C=(0,d.Z)({elementType:g,externalSlotProps:p.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return(0,Z.jsx)(R,(0,n.Z)({component:"div",className:(0,a.Z)(x.root,s),ref:t,role:null,ownerState:m,tabIndex:null},h,{children:"left"===b?(0,Z.jsx)(S,(0,n.Z)({},B)):(0,Z.jsx)(g,(0,n.Z)({},C))}))});var N=l(71514);function L(e){return(0,E.ZP)("MuiTabs",e)}let z=(0,C.Z)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var k=l(25334);let A=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],j=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,$=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,H=(e,t,l)=>{let r=!1,o=l(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}let t=o.disabled||"true"===o.getAttribute("aria-disabled");if(!o.hasAttribute("tabindex")||t)o=l(e,o);else{o.focus();return}}},F=e=>{let{vertical:t,fixed:l,hideScrollbar:r,scrollableX:o,scrollableY:n,centered:i,scrollButtonsHideMobile:a,classes:c}=e;return(0,s.Z)({root:["root",t&&"vertical"],scroller:["scroller",l&&"fixed",r&&"hideScrollbar",o&&"scrollableX",n&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",i&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},L,c)},X=(0,u.ZP)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:l}=e;return[{[`& .${z.scrollButtons}`]:t.scrollButtons},{[`& .${z.scrollButtons}`]:l.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,l.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>(0,n.Z)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${z.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),D=(0,u.ZP)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{let{ownerState:l}=e;return[t.scroller,l.fixed&&t.fixed,l.hideScrollbar&&t.hideScrollbar,l.scrollableX&&t.scrollableX,l.scrollableY&&t.scrollableY]}})(({ownerState:e})=>(0,n.Z)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),O=(0,u.ZP)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{let{ownerState:l}=e;return[t.flexContainer,l.vertical&&t.flexContainerVertical,l.centered&&t.centered]}})(({ownerState:e})=>(0,n.Z)({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Y=(0,u.ZP)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>(0,n.Z)({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),V=(0,u.ZP)(function(e){let{onChange:t}=e,l=(0,o.Z)(e,S),r=i.useRef(),a=i.useRef(null),s=()=>{r.current=a.current.offsetHeight-a.current.clientHeight};return(0,m.Z)(()=>{let e=(0,b.Z)(()=>{let e=r.current;s(),e!==r.current&&t(r.current)}),l=(0,x.Z)(a.current);return l.addEventListener("resize",e),()=>{e.clear(),l.removeEventListener("resize",e)}},[t]),i.useEffect(()=>{s(),t(r.current)},[t]),(0,Z.jsx)("div",(0,n.Z)({style:g},l,{ref:a}))})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),q={},K=i.forwardRef(function(e,t){let l=(0,f.i)({props:e,name:"MuiTabs"}),r=(0,p.Z)(),s=(0,c.V)(),{"aria-label":u,"aria-labelledby":m,action:S,centered:g=!1,children:w,className:y,component:B="div",allowScrollButtonsMobile:C=!1,indicatorColor:E="primary",onChange:W,orientation:I="horizontal",ScrollButtonComponent:M=T,scrollButtons:P="auto",selectionFollowsFocus:R,slots:L={},slotProps:z={},TabIndicatorProps:K={},TabScrollButtonProps:G={},textColor:U="primary",value:J,variant:Q="standard",visibleScrollbar:_=!1}=l,ee=(0,o.Z)(l,A),et="scrollable"===Q,el="vertical"===I,er=el?"scrollTop":"scrollLeft",eo=el?"top":"left",en=el?"bottom":"right",ei=el?"clientHeight":"clientWidth",ea=el?"height":"width",es=(0,n.Z)({},l,{component:B,allowScrollButtonsMobile:C,indicatorColor:E,orientation:I,vertical:el,scrollButtons:P,textColor:U,variant:Q,visibleScrollbar:_,fixed:!et,hideScrollbar:et&&!_,scrollableX:et&&!el,scrollableY:et&&el,centered:g&&!et,scrollButtonsHideMobile:!C}),ec=F(es),ed=(0,d.Z)({elementType:L.StartScrollButtonIcon,externalSlotProps:z.startScrollButtonIcon,ownerState:es}),eu=(0,d.Z)({elementType:L.EndScrollButtonIcon,externalSlotProps:z.endScrollButtonIcon,ownerState:es}),[ef,ep]=i.useState(!1),[eb,eh]=i.useState(q),[ev,em]=i.useState(!1),[ex,eZ]=i.useState(!1),[eS,eg]=i.useState(!1),[ew,ey]=i.useState({overflow:"hidden",scrollbarWidth:0}),eB=new Map,eC=i.useRef(null),eE=i.useRef(null),eW=()=>{let e,t;let l=eC.current;if(l){let t=l.getBoundingClientRect();e={clientWidth:l.clientWidth,scrollLeft:l.scrollLeft,scrollTop:l.scrollTop,scrollLeftNormalized:function(e,t){let l=e.scrollLeft;if("rtl"!==t)return l;switch(h()){case"negative":return e.scrollWidth-e.clientWidth+l;case"reverse":return e.scrollWidth-e.clientWidth-l;default:return l}}(l,s?"rtl":"ltr"),scrollWidth:l.scrollWidth,top:t.top,bottom:t.bottom,left:t.left,right:t.right}}if(l&&!1!==J){let e=eE.current.children;if(e.length>0){let l=e[eB.get(J)];t=l?l.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},eI=(0,N.Z)(()=>{let e;let{tabsMeta:t,tabMeta:l}=eW(),r=0;if(el)e="top",l&&t&&(r=l.top-t.top+t.scrollTop);else if(e=s?"right":"left",l&&t){let o=s?t.scrollLeftNormalized+t.clientWidth-t.scrollWidth:t.scrollLeft;r=(s?-1:1)*(l[e]-t[e]+o)}let o={[e]:r,[ea]:l?l[ea]:0};if(isNaN(eb[e])||isNaN(eb[ea]))eh(o);else{let t=Math.abs(eb[e]-o[e]),l=Math.abs(eb[ea]-o[ea]);(t>=1||l>=1)&&eh(o)}}),eM=(e,{animation:t=!0}={})=>{t?function(e,t,l,r={},o=()=>{}){let{ease:n=v,duration:i=300}=r,a=null,s=t[e],c=!1,d=r=>{if(c){o(Error("Animation cancelled"));return}null===a&&(a=r);let u=Math.min(1,(r-a)/i);if(t[e]=n(u)*(l-s)+s,u>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(d)};return s===l?o(Error("Element already at target position")):requestAnimationFrame(d),()=>{c=!0}}(er,eC.current,e,{duration:r.transitions.duration.standard}):eC.current[er]=e},eP=e=>{let t=eC.current[er];el?t+=e:(t+=e*(s?-1:1),t*=s&&"reverse"===h()?-1:1),eM(t)},eR=()=>{let e=eC.current[ei],t=0,l=Array.from(eE.current.children);for(let r=0;r<l.length;r+=1){let o=l[r];if(t+o[ei]>e){0===r&&(t=e);break}t+=o[ei]}return t},eT=()=>{eP(-1*eR())},eN=()=>{eP(eR())},eL=i.useCallback(e=>{ey({overflow:null,scrollbarWidth:e})},[]),ez=(0,N.Z)(e=>{let{tabsMeta:t,tabMeta:l}=eW();l&&t&&(l[eo]<t[eo]?eM(t[er]+(l[eo]-t[eo]),{animation:e}):l[en]>t[en]&&eM(t[er]+(l[en]-t[en]),{animation:e}))}),ek=(0,N.Z)(()=>{et&&!1!==P&&eg(!eS)});i.useEffect(()=>{let e,t;let l=(0,b.Z)(()=>{eC.current&&eI()}),r=(0,x.Z)(eC.current);return r.addEventListener("resize",l),"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(l),Array.from(eE.current.children).forEach(t=>{e.observe(t)})),"undefined"!=typeof MutationObserver&&(t=new MutationObserver(t=>{t.forEach(t=>{t.removedNodes.forEach(t=>{var l;null==(l=e)||l.unobserve(t)}),t.addedNodes.forEach(t=>{var l;null==(l=e)||l.observe(t)})}),l(),ek()})).observe(eE.current,{childList:!0}),()=>{var o,n;l.clear(),r.removeEventListener("resize",l),null==(o=t)||o.disconnect(),null==(n=e)||n.disconnect()}},[eI,ek]),i.useEffect(()=>{let e=Array.from(eE.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&et&&!1!==P){let l=e[0],r=e[t-1],o={root:eC.current,threshold:.99},n=new IntersectionObserver(e=>{em(!e[0].isIntersecting)},o);n.observe(l);let i=new IntersectionObserver(e=>{eZ(!e[0].isIntersecting)},o);return i.observe(r),()=>{n.disconnect(),i.disconnect()}}},[et,P,eS,null==w?void 0:w.length]),i.useEffect(()=>{ep(!0)},[]),i.useEffect(()=>{eI()}),i.useEffect(()=>{ez(q!==eb)},[ez,eb]),i.useImperativeHandle(S,()=>({updateIndicator:eI,updateScrollButtons:ek}),[eI,ek]);let eA=(0,Z.jsx)(Y,(0,n.Z)({},K,{className:(0,a.Z)(ec.indicator,K.className),ownerState:es,style:(0,n.Z)({},eb,K.style)})),ej=0,e$=i.Children.map(w,e=>{if(!i.isValidElement(e))return null;let t=void 0===e.props.value?ej:e.props.value;eB.set(t,ej);let l=t===J;return ej+=1,i.cloneElement(e,(0,n.Z)({fullWidth:"fullWidth"===Q,indicator:l&&!ef&&eA,selected:l,selectionFollowsFocus:R,onChange:W,textColor:U,value:t},1!==ej||!1!==J||e.props.tabIndex?{}:{tabIndex:0}))}),eH=(()=>{let e={};e.scrollbarSizeListener=et?(0,Z.jsx)(V,{onChange:eL,className:(0,a.Z)(ec.scrollableX,ec.hideScrollbar)}):null;let t=et&&("auto"===P&&(ev||ex)||!0===P);return e.scrollButtonStart=t?(0,Z.jsx)(M,(0,n.Z)({slots:{StartScrollButtonIcon:L.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:ed},orientation:I,direction:s?"right":"left",onClick:eT,disabled:!ev},G,{className:(0,a.Z)(ec.scrollButtons,G.className)})):null,e.scrollButtonEnd=t?(0,Z.jsx)(M,(0,n.Z)({slots:{EndScrollButtonIcon:L.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:eu},orientation:I,direction:s?"left":"right",onClick:eN,disabled:!ex},G,{className:(0,a.Z)(ec.scrollButtons,G.className)})):null,e})();return(0,Z.jsxs)(X,(0,n.Z)({className:(0,a.Z)(ec.root,y),ownerState:es,ref:t,as:B},ee,{children:[eH.scrollButtonStart,eH.scrollbarSizeListener,(0,Z.jsxs)(D,{className:ec.scroller,ownerState:es,style:{overflow:ew.overflow,[el?`margin${s?"Left":"Right"}`:"marginBottom"]:_?void 0:-ew.scrollbarWidth},ref:eC,children:[(0,Z.jsx)(O,{"aria-label":u,"aria-labelledby":m,"aria-orientation":"vertical"===I?"vertical":null,className:ec.flexContainer,ownerState:es,onKeyDown:e=>{let t=eE.current,l=(0,k.Z)(t).activeElement;if("tab"!==l.getAttribute("role"))return;let r="horizontal"===I?"ArrowLeft":"ArrowUp",o="horizontal"===I?"ArrowRight":"ArrowDown";switch("horizontal"===I&&s&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),H(t,l,$);break;case o:e.preventDefault(),H(t,l,j);break;case"Home":e.preventDefault(),H(t,null,j);break;case"End":e.preventDefault(),H(t,null,$)}},ref:eE,role:"tablist",children:e$}),ef&&eA]}),eH.scrollButtonEnd]}))})},29235:(e,t,l)=>{l.d(t,{Z:()=>n}),l(36372);var r=l(59647),o=l(58120);let n=(0,r.Z)((0,o.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},63645:(e,t,l)=>{l.d(t,{Z:()=>n}),l(36372);var r=l(59647),o=l(58120);let n=(0,r.Z)((0,o.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=4479,exports.ids=[4479],exports.modules={48688:(e,a,n)=>{n.d(a,{Z:()=>E});var l=n(58120),r=n(36372),t=n(89352),s=n(67073),i=n(92797),o=n(2365),d=n(58664),c=n(73091),h=n(63856),u=n(98491),x=n(61573),p=n(54365),m=n(6275),j=n(10257),y=n(79943),Z=n(66757),g=n(23016),v=n(34443),b=n(44696),f=n(15539),C=n(51290),w=n(96454),S=n(54815),k=n(38481);function E({serverName:e}){let[a,n]=(0,r.useState)(!0),[E,F]=(0,r.useState)(null),[I,A]=(0,r.useState)([]),[D,P]=(0,r.useState)(),[z,L]=(0,r.useState)(!1),[O,W]=(0,r.useState)({player:"",reason:""}),[$,U]=(0,r.useState)(!1),[B,N]=(0,r.useState)(null),R=(0,r.useCallback)(async()=>{n(!0),F(null);try{let a=await fetch(`/api/players/ban?server=${encodeURIComponent(e)}`);if(!a.ok)throw Error("Failed to fetch bans");let n=await a.json();A(n.players),P(n.source)}catch(e){F("Failed to load ban list"),console.error("Error fetching bans:",e)}finally{n(!1)}},[e]),T=()=>{L(!1),W({player:"",reason:""})},J=async()=>{if(O.player.trim()){U(!0),F(null);try{if(!(await fetch("/api/players/ban",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:O.player.trim(),reason:O.reason.trim()||"Banned by administrator",server:e})})).ok)throw Error("Failed to ban player");T(),await R()}catch(e){F("Failed to ban player"),console.error("Error banning player:",e)}finally{U(!1)}}},M=async a=>{N(a),F(null);try{if(!(await fetch(`/api/players/ban?player=${encodeURIComponent(a)}&server=${encodeURIComponent(e)}`,{method:"DELETE"})).ok)throw Error("Failed to unban player");await R()}catch(e){F("Failed to unban player"),console.error("Error unbanning player:",e)}finally{N(null)}},G=e=>{try{return new Date(e).toLocaleDateString()}catch{return e}};return l.jsx(s.Z,{"data-testid":"ban-manager",children:(0,l.jsxs)(i.Z,{children:[(0,l.jsxs)(t.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[l.jsx(o.Z,{variant:"h6",children:"Ban List"}),l.jsx(j.Z,{variant:"outlined",color:"error",startIcon:l.jsx(S.Z,{}),onClick:()=>{W({player:"",reason:""}),L(!0)},"aria-label":"Ban player",children:"Ban Player"})]}),E&&l.jsx(Z.Z,{severity:"error",sx:{mb:2},children:E}),!a&&D&&"rcon"!==D&&(0,l.jsxs)(Z.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===D?"config.env":"banned-players.json",". Changes will apply on next server start."]}),a&&l.jsx(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:l.jsx(y.Z,{})}),!a&&0===I.length&&l.jsx(o.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players banned"}),!a&&I.length>0&&l.jsx(d.Z,{dense:!0,children:I.map(e=>(0,l.jsxs)(c.ZP,{secondaryAction:l.jsx(p.Z,{edge:"end","aria-label":"Unban player",onClick:()=>M(e.name),disabled:B===e.name,color:"success",children:B===e.name?l.jsx(y.Z,{size:20}):l.jsx(w.Z,{})}),children:[l.jsx(u.Z,{children:l.jsx(x.Z,{src:e.uuid?`https://mc-heads.net/avatar/${e.uuid}/40`:void 0,alt:e.name,sx:{bgcolor:"error.main"},children:l.jsx(k.Z,{})})}),l.jsx(h.Z,{primary:e.name,secondary:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Z,{component:"span",variant:"body2",color:"text.secondary",children:["Reason: ",e.reason||"No reason specified"]}),l.jsx("br",{}),(0,l.jsxs)(o.Z,{component:"span",variant:"caption",color:"text.secondary",children:["Banned: ",G(e.created)," by ",e.source||"Unknown"]})]})})]},e.uuid||e.name))}),(0,l.jsxs)(v.Z,{open:z,onClose:T,maxWidth:"sm",fullWidth:!0,children:[l.jsx(b.Z,{children:"Ban Player"}),l.jsx(f.Z,{children:(0,l.jsxs)(g.Z,{spacing:2,sx:{mt:1},children:[l.jsx(m.Z,{label:"Player Name",placeholder:"Enter player name",value:O.player,onChange:e=>W({...O,player:e.target.value}),fullWidth:!0,required:!0}),l.jsx(m.Z,{label:"Reason",placeholder:"Banned by administrator",value:O.reason,onChange:e=>W({...O,reason:e.target.value}),fullWidth:!0,multiline:!0,rows:2})]})}),(0,l.jsxs)(C.Z,{children:[l.jsx(j.Z,{onClick:T,disabled:$,children:"Cancel"}),l.jsx(j.Z,{onClick:J,color:"error",variant:"contained",disabled:!O.player.trim()||$,startIcon:$?l.jsx(y.Z,{size:16}):l.jsx(S.Z,{}),children:"Ban"})]})]})]})})}},26774:(e,a,n)=>{n.d(a,{d:()=>N});var l=n(58120),r=n(36372),t=n(89352),s=n(67073),i=n(92797),o=n(2365),d=n(58664),c=n(73091),h=n(63856),u=n(98491),x=n(61573),p=n(54365),m=n(6275),j=n(10257),y=n(79943),Z=n(66757),g=n(34443),v=n(44696),b=n(15539),f=n(51290),C=n(81030),w=n(99634),S=n(54655),k=n(96454),E=n(45286),F=n(59615),I=n(27429),A=n(48787);let D={1:{color:"info",label:"Moderator",icon:"\uD83D\uDEE1️"},2:{color:"success",label:"Gamemaster",icon:"\uD83C\uDFAE"},3:{color:"warning",label:"Admin",icon:"⚙️"},4:{color:"error",label:"Owner",icon:"\uD83D\uDC51"}};function P({level:e,showIcon:a=!1,compact:n=!1,size:r="medium",variant:s="filled"}){let i=D[e];if(!i)return null;let o=n?e.toString():`Level ${e} - ${i.label}`,d=a?l.jsx(t.Z,{component:"span",sx:{mr:.5},children:i.icon}):void 0;return l.jsx(A.Z,{label:(0,l.jsxs)(l.Fragment,{children:[d,o]}),color:i.color,size:r,variant:s})}var z=n(32486),L=n(99943),O=n(92241),W=n(14360),$=n(61974);let U=[{value:1,label:"Level 1 - Moderator",description:"Bypass spawn protection",icon:"\uD83D\uDEE1️"},{value:2,label:"Level 2 - Gamemaster",description:"Cheats, command blocks",icon:"\uD83C\uDFAE"},{value:3,label:"Level 3 - Admin",description:"Player management commands",icon:"⚙️"},{value:4,label:"Level 4 - Owner",description:"Full server control",icon:"\uD83D\uDC51"}];function B({value:e,onChange:a,label:n,disabled:r=!1}){return(0,l.jsxs)(z.Z,{component:"fieldset",fullWidth:!0,disabled:r,children:[n&&l.jsx(L.Z,{component:"legend",sx:{mb:1},children:n}),l.jsx(O.Z,{value:e,onChange:e=>{a(parseInt(e.target.value,10))},children:U.map(e=>l.jsx(W.Z,{value:e.value,control:l.jsx($.Z,{}),label:(0,l.jsxs)(t.Z,{children:[(0,l.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(o.Z,{component:"span",children:e.icon}),l.jsx(o.Z,{component:"span",fontWeight:"medium",children:e.label})]}),l.jsx(o.Z,{variant:"body2",color:"text.secondary",sx:{ml:4},children:e.description})]}),sx:{alignItems:"flex-start",py:1}},e.value))})]})}function N({serverName:e}){let[a,n]=(0,r.useState)(!0),[A,D]=(0,r.useState)(null),[z,L]=(0,r.useState)([]),[O,W]=(0,r.useState)(),[$,U]=(0,r.useState)(""),[N,R]=(0,r.useState)(!1),[T,J]=(0,r.useState)(null),[M,G]=(0,r.useState)(!1),[q,H]=(0,r.useState)(4),[K,Y]=(0,r.useState)(!1),[Q,V]=(0,r.useState)(null),[X,_]=(0,r.useState)(4),[ee,ea]=(0,r.useState)(!1),[en,el]=(0,r.useState)(null),[er,et]=(0,r.useState)(null),es=(0,r.useCallback)(async()=>{n(!0),D(null);try{let a=await fetch(`/api/players/op?server=${encodeURIComponent(e)}`);if(!a.ok)throw Error("Failed to fetch operators");let n=await a.json();L(n.operators),W(n.source)}catch(e){D("Failed to load operators"),console.error("Error fetching operators:",e)}finally{n(!1)}},[e]),ei=async()=>{if($.trim()){R(!0),D(null);try{if(!(await fetch("/api/players/op",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({player:$.trim(),server:e,level:q})})).ok)throw Error("Failed to add operator");U(""),H(4),G(!1),await es()}catch(e){D("Failed to add operator"),console.error("Error adding operator:",e)}finally{R(!1)}}},eo=async a=>{J(a),D(null),el(null),et(null);try{if(!(await fetch(`/api/players/op?player=${encodeURIComponent(a)}&server=${encodeURIComponent(e)}`,{method:"DELETE"})).ok)throw Error("Failed to remove operator");await es()}catch(e){D("Failed to remove operator"),console.error("Error removing operator:",e)}finally{J(null)}},ed=async()=>{if(Q){ea(!0),D(null);try{if(!(await fetch(`/api/players/op/${encodeURIComponent(Q.name)}?server=${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({level:X})})).ok)throw Error("Failed to change operator level");Y(!1),V(null),await es()}catch(e){D("Failed to change operator level"),console.error("Error changing operator level:",e)}finally{ea(!1)}}},ec=(e,a)=>{el(e.currentTarget),et(a)},eh=()=>{el(null),et(null)};return(0,l.jsxs)(s.Z,{"data-testid":"op-manager",children:[(0,l.jsxs)(i.Z,{children:[l.jsx(o.Z,{variant:"h6",gutterBottom:!0,children:"Operators"}),A&&l.jsx(Z.Z,{severity:"error",sx:{mb:2},children:A}),!a&&O&&"rcon"!==O&&(0,l.jsxs)(Z.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===O?"config.env":"ops.json",". Changes will apply on next server start."]}),l.jsx(t.Z,{sx:{mb:2},children:l.jsx(j.Z,{variant:"contained",onClick:()=>G(!0),startIcon:l.jsx(E.Z,{}),"aria-label":"Add operator",fullWidth:!0,children:"Add Operator"})}),a&&l.jsx(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:l.jsx(y.Z,{})}),!a&&0===z.length&&l.jsx(o.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No operators configured"}),!a&&z.length>0&&(0,l.jsxs)(l.Fragment,{children:[l.jsx(d.Z,{dense:!0,children:z.map(e=>(0,l.jsxs)(c.ZP,{secondaryAction:l.jsx(p.Z,{edge:"end","aria-label":"Operator actions",onClick:a=>ec(a,e),disabled:T===e.name,children:T===e.name?l.jsx(y.Z,{size:20}):l.jsx(S.Z,{})}),children:[l.jsx(u.Z,{children:l.jsx(x.Z,{src:e.uuid?`https://mc-heads.net/avatar/${e.uuid}/40`:void 0,alt:e.name,sx:{bgcolor:"warning.main"},children:l.jsx(F.Z,{})})}),l.jsx(h.Z,{primary:(0,l.jsxs)(t.Z,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[l.jsx(o.Z,{component:"span",children:e.name}),l.jsx(P,{level:e.level,showIcon:!0,size:"small"})]}),secondary:e.uuid?e.uuid.substring(0,8)+"...":"UUID not available"})]},e.uuid||e.name))}),(0,l.jsxs)(C.Z,{anchorEl:en,open:!!en,onClose:eh,children:[(0,l.jsxs)(w.Z,{onClick:()=>{er&&(V(er),_(er.level),Y(!0),eh())},children:[l.jsx(I.Z,{sx:{mr:1},fontSize:"small"}),"Change Level"]}),(0,l.jsxs)(w.Z,{onClick:()=>er&&eo(er.name),children:[l.jsx(k.Z,{sx:{mr:1},fontSize:"small",color:"error"}),"Remove OP"]})]})]})]}),(0,l.jsxs)(g.Z,{open:M,onClose:()=>!N&&G(!1),maxWidth:"sm",fullWidth:!0,children:[l.jsx(v.Z,{children:"Add Operator"}),(0,l.jsxs)(b.Z,{children:[l.jsx(m.Z,{autoFocus:!0,margin:"dense",label:"Player Name",placeholder:"Enter player name",fullWidth:!0,value:$,onChange:e=>U(e.target.value),disabled:N,sx:{mb:2}}),l.jsx(B,{value:q,onChange:H,label:"OP Level",disabled:N})]}),(0,l.jsxs)(f.Z,{children:[l.jsx(j.Z,{onClick:()=>G(!1),disabled:N,children:"Cancel"}),l.jsx(j.Z,{variant:"contained",onClick:ei,disabled:!$.trim()||N,startIcon:N?l.jsx(y.Z,{size:16}):void 0,children:N?"Adding...":"Add OP"})]})]}),(0,l.jsxs)(g.Z,{open:K,onClose:()=>!ee&&Y(!1),maxWidth:"sm",fullWidth:!0,children:[(0,l.jsxs)(v.Z,{children:["Change OP Level - ",Q?.name]}),l.jsx(b.Z,{children:Q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["Current: Level ",Q.level," (",Q.role,")"]}),l.jsx(B,{value:X,onChange:_,label:"New Level",disabled:ee})]})}),(0,l.jsxs)(f.Z,{children:[l.jsx(j.Z,{onClick:()=>Y(!1),disabled:ee,children:"Cancel"}),l.jsx(j.Z,{variant:"contained",onClick:ed,disabled:ee||X===Q?.level,startIcon:ee?l.jsx(y.Z,{size:16}):void 0,children:ee?"Saving...":"Save Changes"})]})]})]})}},65465:(e,a,n)=>{n.d(a,{Z:()=>I});var l=n(58120),r=n(36372),t=n(89352),s=n(67073),i=n(92797),o=n(2365),d=n(58664),c=n(73091),h=n(63856),u=n(98491),x=n(61573),p=n(54365),m=n(6275),j=n(10257),y=n(79943),Z=n(66757),g=n(23016),v=n(16770),b=n(48787),f=n(92559),C=n(96454),w=n(45286),S=n(38481),k=n(96468),E=n(21898),F=n(74151);function I({serverName:e}){let[a,n]=(0,r.useState)(""),[I,A]=(0,r.useState)(null),[D,P]=(0,r.useState)(!1),[z,L]=(0,r.useState)(""),[O,W]=(0,r.useState)(null),[$,U]=(0,r.useState)(""),{data:B,isLoading:N,error:R}=(0,F.ox)(e),{data:T}=(0,F.Yo)(e),J=(0,F.zF)(),M=(0,F.Ll)(),G=(0,F.S0)(),q=B?.players??[],H=B?.source,K=T?.enabled??!1,Y=(0,r.useMemo)(()=>{if(!$.trim())return q;let e=$.toLowerCase();return q.filter(a=>a.name.toLowerCase().includes(e))},[q,$]),Q=R?.message||(M.error?"Failed to add player to whitelist":null)||(G.error&&!I?"Failed to remove player from whitelist":null)||(J.error?"Failed to update whitelist status":null),V=()=>{a.trim()&&M.mutate({serverName:e,player:a.trim()},{onSuccess:()=>n("")})},X=a=>{A(a),G.mutate({serverName:e,player:a},{onSettled:()=>A(null)})},_=async()=>{let a=z.split(/[,\n]/).map(e=>e.trim()).filter(Boolean);if(0===a.length)return;W(null);let n=0;for(let l of a)try{await M.mutateAsync({serverName:e,player:l}),n++}catch{}W(`Added ${n} of ${a.length} players`),n>0&&L("")},ee=M.isPending;return l.jsx(s.Z,{"data-testid":"whitelist-manager",children:(0,l.jsxs)(i.Z,{children:[(0,l.jsxs)(g.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{mb:2},children:[(0,l.jsxs)(g.Z,{direction:"row",alignItems:"center",spacing:1,children:[l.jsx(o.Z,{variant:"h6",children:"Whitelist"}),l.jsx(b.Z,{label:K?"ON":"OFF",color:K?"success":"default",size:"small","data-testid":"whitelist-status-chip"})]}),l.jsx(v.Z,{checked:K,onChange:()=>{J.mutate({serverName:e,enabled:!K})},disabled:J.isPending,inputProps:{"aria-label":"Toggle whitelist"},"data-testid":"whitelist-toggle"})]}),Q&&l.jsx(Z.Z,{severity:"error",sx:{mb:2},children:Q}),!N&&H&&"rcon"!==H&&(0,l.jsxs)(Z.Z,{severity:"info",sx:{mb:2},children:["Server is offline. Showing data from ","config"===H?"config.env":"whitelist.json",". Changes will apply on next server start."]}),(0,l.jsxs)(g.Z,{direction:"row",spacing:1,alignItems:"flex-start",sx:{mb:2},children:[D?(0,l.jsxs)(t.Z,{sx:{flex:1},children:[l.jsx(m.Z,{size:"small",placeholder:"player1, player2, player3",value:z,onChange:e=>L(e.target.value),disabled:ee,fullWidth:!0,multiline:!0,rows:3,"data-testid":"bulk-input"}),O&&l.jsx(Z.Z,{severity:"info",sx:{mt:1},"data-testid":"bulk-result",children:O})]}):l.jsx(m.Z,{size:"small",placeholder:"Player name",value:a,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"===e.key&&V()},disabled:ee,fullWidth:!0}),D?l.jsx(j.Z,{variant:"contained",onClick:_,disabled:!z.trim()||ee,startIcon:ee?l.jsx(y.Z,{size:16}):l.jsx(E.Z,{}),"aria-label":"Add players in bulk",children:"Add All"}):l.jsx(j.Z,{variant:"contained",onClick:V,disabled:!a.trim()||ee,startIcon:ee?l.jsx(y.Z,{size:16}):l.jsx(w.Z,{}),"aria-label":"Add player to whitelist",children:"Add"}),l.jsx(j.Z,{variant:D?"contained":"outlined",onClick:()=>{P(!D),W(null)},"aria-label":"Toggle bulk mode","data-testid":"bulk-toggle",sx:{whiteSpace:"nowrap"},children:"Bulk"})]}),q.length>=5&&l.jsx(m.Z,{size:"small",placeholder:"Search players...",value:$,onChange:e=>U(e.target.value),fullWidth:!0,sx:{mb:2},InputProps:{startAdornment:l.jsx(f.Z,{position:"start",children:l.jsx(k.Z,{})})},"data-testid":"search-input"}),N&&l.jsx(t.Z,{sx:{display:"flex",justifyContent:"center",py:4},children:l.jsx(y.Z,{})}),!N&&0===q.length&&l.jsx(o.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},children:"No players whitelisted"}),!N&&q.length>0&&0===Y.length&&l.jsx(o.Z,{color:"text.secondary",sx:{textAlign:"center",py:4},"data-testid":"no-match-message",children:"No matching players"}),!N&&Y.length>0&&l.jsx(d.Z,{dense:!0,children:Y.map(e=>(0,l.jsxs)(c.ZP,{secondaryAction:l.jsx(p.Z,{edge:"end","aria-label":"Remove from whitelist",onClick:()=>X(e.name),disabled:I===e.name,color:"error",children:I===e.name?l.jsx(y.Z,{size:20}):l.jsx(C.Z,{})}),children:[l.jsx(u.Z,{children:l.jsx(x.Z,{src:e.uuid?`https://mc-heads.net/avatar/${e.uuid}/40`:void 0,alt:e.name,children:l.jsx(S.Z,{})})}),l.jsx(h.Z,{primary:e.name,secondary:e.uuid?e.uuid.substring(0,8)+"...":"UUID not available"})]},e.uuid||e.name))})]})})}}};
@@ -1 +1 @@
1
- "use strict";exports.id=5843,exports.ids=[5843],exports.modules={5414:(e,s,r)=>{var t=r(66682);s.Z=void 0;var n=t(r(7750)),a=r(58120);s.Z=(0,n.default)([(0,a.jsx)("path",{d:"m7.3 14.7 1.2-1.2c-1-1-1.5-2.3-1.5-3.5 0-1.3.5-2.6 1.5-3.5L7.3 5.3c-1.3 1.3-2 3-2 4.7s.7 3.4 2 4.7M19.1 2.9l-1.2 1.2c1.6 1.6 2.4 3.8 2.4 5.9 0 2.1-.8 4.3-2.4 5.9l1.2 1.2c2-2 2.9-4.5 2.9-7.1 0-2.6-1-5.1-2.9-7.1"},"0"),(0,a.jsx)("path",{d:"M6.1 4.1 4.9 2.9C3 4.9 2 7.4 2 10c0 2.6 1 5.1 2.9 7.1l1.2-1.2c-1.6-1.6-2.4-3.8-2.4-5.9 0-2.1.8-4.3 2.4-5.9m10.6 10.6c1.3-1.3 2-3 2-4.7-.1-1.7-.7-3.4-2-4.7l-1.2 1.2c1 1 1.5 2.3 1.5 3.5 0 1.3-.5 2.6-1.5 3.5zM14.5 10c0-1.38-1.12-2.5-2.5-2.5S9.5 8.62 9.5 10c0 .76.34 1.42.87 1.88L7 22h2l.67-2h4.67l.66 2h2l-3.37-10.12c.53-.46.87-1.12.87-1.88m-4.17 8L12 13l1.67 5z"},"1")],"CellTower")},94304:(e,s,r)=>{var t=r(66682);s.Z=void 0;var n=t(r(7750)),a=r(58120);s.Z=(0,n.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info")},79603:(e,s,r)=>{var t=r(66682);s.Z=void 0;var n=t(r(7750)),a=r(58120);s.Z=(0,n.default)((0,a.jsx)("path",{d:"M15.9 5c-.17 0-.32.09-.41.23l-.07.15-5.18 11.65c-.16.29-.26.61-.26.96 0 1.11.9 2.01 2.01 2.01.96 0 1.77-.68 1.96-1.59l.01-.03L16.4 5.5c0-.28-.22-.5-.5-.5M1 9l2 2c2.88-2.88 6.79-4.08 10.53-3.62l1.19-2.68C9.89 3.84 4.74 5.27 1 9m20 2 2-2c-1.64-1.64-3.55-2.82-5.59-3.57l-.53 2.82c1.5.62 2.9 1.53 4.12 2.75m-4 4 2-2c-.8-.8-1.7-1.42-2.66-1.89l-.55 2.92c.42.27.83.59 1.21.97M5 13l2 2c1.13-1.13 2.56-1.79 4.03-2l1.28-2.88c-2.63-.08-5.3.87-7.31 2.88"}),"NetworkCheck")},97441:(e,s,r)=>{var t=r(66682);s.Z=void 0;var n=t(r(7750)),a=r(58120);s.Z=(0,n.default)((0,a.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew")},84292:(e,s,r)=>{var t=r(66682);s.Z=void 0;var n=t(r(7750)),a=r(58120);s.Z=(0,n.default)((0,a.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop")},95843:(e,s,r)=>{r.d(s,{eE:()=>X,E4:()=>M,SB:()=>k,ms:()=>$,hI:()=>j,aY:()=>ec,zd:()=>F,Ik:()=>C});var t=r(58120),n=r(67073),a=r(92797),l=r(2365),i=r(89352),o=r(48787),c=r(37891),d=r(88916),x=r(59059),h=r(75698),u=r(79795);let m={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},p={border:0,py:1};function j({router:e}){var s;let r=(s=e.mode)?s.includes("in-docker")||s.includes("auto-discovery")?{label:"Auto Discovery",color:"info"}:s.includes("mapping")?{label:"Manual Mapping",color:"warning"}:{label:s,color:"default"}:{label:"Unknown",color:"default"};return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(u.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"Platform Information"})]}),t.jsx(c.Z,{size:"small",children:(0,t.jsxs)(d.Z,{children:[(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:m,children:"Router Name"}),t.jsx(h.Z,{sx:p,children:e.name})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:m,children:"Port"}),t.jsx(h.Z,{sx:p,children:e.port})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:m,children:"Mode"}),t.jsx(h.Z,{sx:p,children:t.jsx(o.Z,{label:r.label,size:"small",color:r.color,variant:"outlined"})})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:m,children:"Uptime"}),t.jsx(h.Z,{sx:p,children:e.uptime||"-"})]})]})})]})})}var Z=r(98243),f=r(95009),g=r(4587),y=r(45912),v=r(32130),w=r(84527);function b(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({status:e}){return t.jsx(Z.Z,{title:e,arrow:!0,children:t.jsx(i.Z,{sx:{width:10,height:10,borderRadius:"50%",bgcolor:b(e),flexShrink:0,boxShadow:"running"===e?`0 0 6px ${b(e)}`:"none"}})})}function C({router:e}){let s=function(e){let s=new Map;for(let r of e){let e=r.target.replace(/^mc-/,"").replace(/:25565$/,""),t=s.get(e);t?t.hostnames.push(r.hostname):s.set(e,{status:r.serverStatus,hostnames:[r.hostname],serverType:r.serverType,serverVersion:r.serverVersion})}return s}(e.routes);return t.jsx(n.Z,{sx:{height:"100%"},children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(v.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"MC-Router Status"}),(0,t.jsxs)(i.Z,{sx:{ml:"auto",display:"flex",gap:1},children:[t.jsx(o.Z,{label:e.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"}}(e.status)}),t.jsx(o.Z,{label:e.health,size:"small",color:function(e){switch(e){case"healthy":return"success";case"unhealthy":return"error";case"starting":return"warning";default:return"default"}}(e.health),variant:"outlined"})]})]}),t.jsx(l.Z,{variant:"subtitle2",sx:{mb:1,mt:3},children:"Routing Table"}),0===e.routes.length?t.jsx(l.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No routes configured"}):t.jsx(i.Z,{sx:{mt:1},children:Array.from(s.entries()).map(([e,{status:s,hostnames:r,serverType:n,serverVersion:a}])=>(0,t.jsxs)(f.Z,{defaultExpanded:!0,disableGutters:!0,elevation:0,sx:{border:1,borderColor:"divider","&:not(:last-child)":{borderBottom:0},"&::before":{display:"none"}},children:[t.jsx(g.Z,{expandIcon:t.jsx(w.Z,{}),children:(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%",pr:1},children:[t.jsx(S,{status:s}),t.jsx(l.Z,{variant:"subtitle2",sx:{fontWeight:600},children:e}),(n||a)&&t.jsx(l.Z,{variant:"caption",color:"text.secondary",children:[n,a].filter(Boolean).join(" ")}),(0,t.jsxs)(l.Z,{variant:"caption",color:"text.secondary",sx:{ml:"auto"},children:[r.length," ",1===r.length?"route":"routes"]})]})}),t.jsx(y.Z,{sx:{pt:0},children:t.jsx(i.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:r.map(e=>t.jsx(l.Z,{variant:"body2",sx:{fontFamily:'"Roboto Mono", monospace',fontSize:"0.85rem",color:"text.secondary"},children:e},e))})})]},e))})]})})}var z=r(79603);let P={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},I={border:0,py:1};function k({router:e}){var s;let r=e.routes.filter(e=>"running"===e.serverStatus).length,u=e.routes.length;return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(z.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"Network Settings"})]}),t.jsx(i.Z,{sx:{overflowX:"auto"},children:t.jsx(c.Z,{size:"small",children:(0,t.jsxs)(d.Z,{children:[(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:P,children:"Listening Port"}),t.jsx(h.Z,{sx:I,children:t.jsx(o.Z,{label:e.port,size:"small",variant:"outlined"})})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:P,children:"Routing Mode"}),t.jsx(h.Z,{sx:I,children:t.jsx(o.Z,{label:(s=e.mode)?s.includes("in-docker")||s.includes("auto-discovery")?"Auto Discovery":s.includes("mapping")?"Manual Mapping":s:"Unknown",size:"small",color:"info",variant:"outlined"})})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:P,children:"Total Routes"}),t.jsx(h.Z,{sx:I,children:u})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:P,children:"Active Routes"}),t.jsx(h.Z,{sx:I,children:t.jsx(o.Z,{label:`${r} / ${u}`,size:"small",color:r>0?"success":"default",variant:"outlined"})})]})]})})})]})})}var A=r(5414);function M({avahi:e}){let s=e?.status??"unknown";return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(A.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"mDNS (Avahi)"}),t.jsx(o.Z,{label:s,size:"small",color:"running"===s?"success":s.includes("not running")?"warning":"not installed"===s?"error":"default",sx:{ml:"auto"}})]}),(0,t.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:["Avahi mDNS daemon enables ",t.jsx("code",{children:".local"})," hostname resolution for Minecraft servers on the local network."]})]})})}var N=r(36372),D=r(6275),T=r(10257),W=r(79943),R=r(38481),E=r(68763);function F({onSuccess:e,onError:s}){let{data:r}=(0,E.kP)(),[c,d]=(0,N.useState)(r?.user?.name||""),[x,h]=(0,N.useState)(!1),[u,m]=(0,N.useState)(!1),p=r?.user,j=c!==(p?.name||""),Z=async()=>{if(j&&c.trim()){h(!0);try{let{error:r}=await (0,E.Nq)({name:c.trim()});r?s(r.message||"Failed to update profile"):e("Profile updated successfully")}catch{s("Failed to update profile")}finally{h(!1)}}};return p?t.jsx(n.Z,{sx:{height:"100%"},children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:3},children:[t.jsx(R.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"Profile"})]}),(0,t.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[t.jsx(D.Z,{label:"Name",value:c,onChange:e=>d(e.target.value),fullWidth:!0,size:"small"}),t.jsx(D.Z,{label:"Email",value:p.email,fullWidth:!0,size:"small",disabled:!0,helperText:"Email cannot be changed"}),(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(l.Z,{variant:"body2",color:"text.secondary",children:"Role:"}),t.jsx(o.Z,{label:"admin"===p.role?"Admin":"User",size:"small",color:"admin"===p.role?"primary":"default",variant:"outlined"})]}),t.jsx(i.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:t.jsx(T.Z,{variant:"contained",onClick:Z,disabled:!j||!c.trim()||x,startIcon:x?t.jsx(W.Z,{size:16}):null,children:x?"Saving...":"Save Changes"})})]})]})}):null}var L=r(92559),U=r(54365),B=r(61960),V=r(27767),q=r(36739);function $({onSuccess:e,onError:s}){let[r,o]=(0,N.useState)(""),[c,d]=(0,N.useState)(""),[x,h]=(0,N.useState)(""),[u,m]=(0,N.useState)(!1),[p,j]=(0,N.useState)(!1),[Z,f]=(0,N.useState)(!1),[g,y]=(0,N.useState)(!1),[v,w]=(0,N.useState)({}),b=()=>{let e={};return r||(e.currentPassword="Current password is required"),c?c.length<8&&(e.newPassword="Password must be at least 8 characters"):e.newPassword="New password is required",x?c!==x&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your new password",r&&c&&r===c&&(e.newPassword="New password must be different from current password"),w(e),0===Object.keys(e).length},S=async t=>{if(t.preventDefault(),b()){y(!0);try{let{error:t}=await (0,E.Cp)({currentPassword:r,newPassword:c,revokeOtherSessions:!1});t?s(t.message||"Failed to change password"):(e("Password changed successfully"),o(""),d(""),h(""),w({}))}catch{s("Failed to change password")}finally{y(!1)}}},C=(e,s)=>t.jsx(L.Z,{position:"end",children:t.jsx(U.Z,{"aria-label":e?"hide password":"show password",onClick:()=>s(!e),edge:"end",size:"small",children:e?t.jsx(q.Z,{fontSize:"small"}):t.jsx(V.Z,{fontSize:"small"})})});return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:3},children:[t.jsx(B.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"Change Password"})]}),(0,t.jsxs)(i.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2.5},children:[t.jsx(D.Z,{label:"Current Password",type:u?"text":"password",value:r,onChange:e=>{o(e.target.value),v.currentPassword&&w(e=>({...e,currentPassword:""}))},error:!!v.currentPassword,helperText:v.currentPassword,fullWidth:!0,size:"small",autoComplete:"current-password",InputProps:{endAdornment:C(u,m)}}),t.jsx(D.Z,{label:"New Password",type:p?"text":"password",value:c,onChange:e=>{d(e.target.value),v.newPassword&&w(e=>({...e,newPassword:""}))},error:!!v.newPassword,helperText:v.newPassword||"Minimum 8 characters",fullWidth:!0,size:"small",autoComplete:"new-password",InputProps:{endAdornment:C(p,j)}}),t.jsx(D.Z,{label:"Confirm New Password",type:Z?"text":"password",value:x,onChange:e=>{h(e.target.value),v.confirmPassword&&w(e=>({...e,confirmPassword:""}))},error:!!v.confirmPassword,helperText:v.confirmPassword,fullWidth:!0,size:"small",autoComplete:"new-password",InputProps:{endAdornment:C(Z,f)}}),t.jsx(i.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:t.jsx(T.Z,{type:"submit",variant:"contained",disabled:g,startIcon:g?t.jsx(W.Z,{size:16}):null,children:g?"Changing...":"Change Password"})})]})]})})}var _=r(94304);let O={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},H={border:0,py:1};function K(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 X(){let{data:e}=(0,E.kP)(),s=e?.user;return s?t.jsx(n.Z,{sx:{height:"100%"},children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(_.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"Account Information"})]}),t.jsx(c.Z,{size:"small",children:(0,t.jsxs)(d.Z,{children:[(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:O,children:"Account ID"}),t.jsx(h.Z,{sx:H,children:t.jsx(l.Z,{variant:"body2",sx:{fontFamily:'"Roboto Mono", monospace',fontSize:"0.8rem"},children:s.id})})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:O,children:"Created"}),t.jsx(h.Z,{sx:H,children:K(s.createdAt)})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:O,children:"Last Updated"}),t.jsx(h.Z,{sx:H,children:K(s.updatedAt)})]})]})})]})}):null}var Q=r(70862),Y=r(68913),G=r(66757),J=r(1877),ee=r(29553),es=r(84292),er=r(97441),et=r(51999),en=r(53825),ea=r(15934);let el={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},ei={border:0,py:1};function eo({text:e}){let[s,r]=(0,N.useState)(!1),n=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Failed to copy:",e)}};return t.jsx(U.Z,{size:"small",onClick:n,sx:{ml:1,color:s?"success.main":"text.secondary","&:hover":{bgcolor:"action.hover"}},"aria-label":s?"Copied":"Copy to clipboard",children:s?t.jsx(en.Z,{sx:{fontSize:16}}):t.jsx(et.Z,{sx:{fontSize:16}})})}function ec(){let{data:e,isLoading:s,error:r}=(0,ea.UW)(),u=(0,ea.Bc)(),m=(0,ea.N$)();if(r)return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(J.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),(0,t.jsxs)(G.Z,{severity:"error",children:["Failed to load playit status: ",r.message]})]})});if(s)return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(Y.Z,{variant:"circular",width:24,height:24}),t.jsx(Y.Z,{variant:"text",width:"40%",height:32})]}),(0,t.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[t.jsx(Y.Z,{variant:"text",width:"35%"}),t.jsx(Y.Z,{variant:"text",width:"40%"})]}),(0,t.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[t.jsx(Y.Z,{variant:"text",width:"35%"}),t.jsx(Y.Z,{variant:"text",width:"40%"})]})]})});if(!e?.enabled)return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(J.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),(0,t.jsxs)(G.Z,{severity:"info",children:[t.jsx(l.Z,{variant:"body2",fontWeight:500,sx:{mb:.5},children:"Not configured"}),t.jsx(l.Z,{variant:"body2",color:"text.secondary",children:"playit.gg agent is not set up. Configure PLAYIT_SECRET to enable external access."})]})]})});let p=e.agentRunning&&"running"===e.containerStatus,j=u.isPending||m.isPending,Z=u.error||m.error;return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[t.jsx(J.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),Z&&t.jsx(G.Z,{severity:"error",sx:{mb:2},children:Z.message||"Action failed"}),(0,t.jsxs)(i.Z,{sx:{display:"flex",gap:1,mb:2,flexWrap:"wrap"},children:[p?t.jsx(T.Z,{variant:"outlined",size:"small",color:"error",startIcon:j?t.jsx(W.Z,{size:16}):t.jsx(es.Z,{}),onClick:()=>{m.mutate()},disabled:j,sx:{fontSize:12},children:j?"Stopping...":"Stop Agent"}):t.jsx(T.Z,{variant:"contained",size:"small",color:"success",startIcon:j?t.jsx(W.Z,{size:16,color:"inherit"}):t.jsx(ee.Z,{}),onClick:()=>{u.mutate()},disabled:j,sx:{fontSize:12},children:j?"Starting...":"Start Agent"}),t.jsx(T.Z,{component:"a",href:"https://playit.gg/account/tunnels",target:"_blank",rel:"noopener noreferrer",size:"small",startIcon:t.jsx(er.Z,{}),sx:{fontSize:12},children:"View Dashboard"})]}),t.jsx(i.Z,{sx:{overflowX:"auto"},children:t.jsx(c.Z,{size:"small",sx:{mb:3},children:(0,t.jsxs)(d.Z,{children:[(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:el,children:"Agent Status"}),t.jsx(h.Z,{sx:ei,children:t.jsx(o.Z,{label:p?"Running":"Stopped",size:"small",color:p?"success":"default",variant:"outlined"})})]}),e.uptime&&(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:el,children:"Uptime"}),t.jsx(h.Z,{sx:ei,children:e.uptime})]})]})})}),e.servers&&e.servers.length>0&&(()=>{let s=e.servers.filter(e=>e.playitDomain),r=e.servers.filter(e=>!e.playitDomain);return(0,t.jsxs)(t.Fragment,{children:[t.jsx(l.Z,{variant:"subtitle2",sx:{mb:1.5,fontWeight:600},children:"Server Domains"}),s.length>0?t.jsx(i.Z,{sx:{overflowX:"auto"},children:(0,t.jsxs)(c.Z,{size:"small",sx:{mb:r.length>0?2:0},children:[t.jsx(Q.Z,{children:(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:{fontWeight:600,borderBottom:2,borderColor:"divider"},children:"Server"}),t.jsx(h.Z,{sx:{fontWeight:600,borderBottom:2,borderColor:"divider"},children:"External Domain"})]})}),t.jsx(d.Z,{children:s.map(e=>(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:{py:1.5,borderBottom:1,borderColor:"divider"},children:e.serverName}),t.jsx(h.Z,{sx:{py:1.5,borderBottom:1,borderColor:"divider"},children:(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(l.Z,{variant:"body2",sx:{fontFamily:'"Roboto Mono", monospace',wordBreak:"break-all"},children:e.playitDomain}),t.jsx(eo,{text:e.playitDomain})]})})]},e.serverName))})]})}):(0,t.jsxs)(l.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["No servers with external domains configured. Use ",t.jsx("code",{children:"mcctl create --playit-domain"})," to register a domain."]}),r.length>0&&(0,t.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[r.length," server",r.length>1?"s":""," without external domain: ",r.map(e=>e.serverName).join(", ")]})]})})()]})})}},43137:(e,s,r)=>{async function t(e,s={}){let r={...s.headers};s.body&&(r["Content-Type"]="application/json");let t=await fetch(e,{...s,headers:r});if(!t.ok){let e=await t.json().catch(()=>({error:"UnknownError",message:t.statusText})),s=Error(e.message);throw s.statusCode=t.status,s.code=e.error,s}return t.json()}r.d(s,{SC:()=>t})},15934:(e,s,r)=>{r.d(s,{Bc:()=>o,N$:()=>c,UW:()=>i});var t=r(28872),n=r(95343),a=r(20042),l=r(43137);function i(){return(0,t.a)({queryKey:["playit-status"],queryFn:()=>(0,l.SC)("/api/playit/status"),refetchInterval:3e4})}function o(){let e=(0,n.NL)();return(0,a.D)({mutationFn:()=>(0,l.SC)("/api/playit/start",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}function c(){let e=(0,n.NL)();return(0,a.D)({mutationFn:()=>(0,l.SC)("/api/playit/stop",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}}};
1
+ "use strict";exports.id=5843,exports.ids=[5843],exports.modules={5414:(e,s,r)=>{var t=r(66682);s.Z=void 0;var n=t(r(7750)),a=r(58120);s.Z=(0,n.default)([(0,a.jsx)("path",{d:"m7.3 14.7 1.2-1.2c-1-1-1.5-2.3-1.5-3.5 0-1.3.5-2.6 1.5-3.5L7.3 5.3c-1.3 1.3-2 3-2 4.7s.7 3.4 2 4.7M19.1 2.9l-1.2 1.2c1.6 1.6 2.4 3.8 2.4 5.9 0 2.1-.8 4.3-2.4 5.9l1.2 1.2c2-2 2.9-4.5 2.9-7.1 0-2.6-1-5.1-2.9-7.1"},"0"),(0,a.jsx)("path",{d:"M6.1 4.1 4.9 2.9C3 4.9 2 7.4 2 10c0 2.6 1 5.1 2.9 7.1l1.2-1.2c-1.6-1.6-2.4-3.8-2.4-5.9 0-2.1.8-4.3 2.4-5.9m10.6 10.6c1.3-1.3 2-3 2-4.7-.1-1.7-.7-3.4-2-4.7l-1.2 1.2c1 1 1.5 2.3 1.5 3.5 0 1.3-.5 2.6-1.5 3.5zM14.5 10c0-1.38-1.12-2.5-2.5-2.5S9.5 8.62 9.5 10c0 .76.34 1.42.87 1.88L7 22h2l.67-2h4.67l.66 2h2l-3.37-10.12c.53-.46.87-1.12.87-1.88m-4.17 8L12 13l1.67 5z"},"1")],"CellTower")},94304:(e,s,r)=>{var t=r(66682);s.Z=void 0;var n=t(r(7750)),a=r(58120);s.Z=(0,n.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info")},79603:(e,s,r)=>{var t=r(66682);s.Z=void 0;var n=t(r(7750)),a=r(58120);s.Z=(0,n.default)((0,a.jsx)("path",{d:"M15.9 5c-.17 0-.32.09-.41.23l-.07.15-5.18 11.65c-.16.29-.26.61-.26.96 0 1.11.9 2.01 2.01 2.01.96 0 1.77-.68 1.96-1.59l.01-.03L16.4 5.5c0-.28-.22-.5-.5-.5M1 9l2 2c2.88-2.88 6.79-4.08 10.53-3.62l1.19-2.68C9.89 3.84 4.74 5.27 1 9m20 2 2-2c-1.64-1.64-3.55-2.82-5.59-3.57l-.53 2.82c1.5.62 2.9 1.53 4.12 2.75m-4 4 2-2c-.8-.8-1.7-1.42-2.66-1.89l-.55 2.92c.42.27.83.59 1.21.97M5 13l2 2c1.13-1.13 2.56-1.79 4.03-2l1.28-2.88c-2.63-.08-5.3.87-7.31 2.88"}),"NetworkCheck")},84292:(e,s,r)=>{var t=r(66682);s.Z=void 0;var n=t(r(7750)),a=r(58120);s.Z=(0,n.default)((0,a.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop")},95843:(e,s,r)=>{r.d(s,{eE:()=>Q,E4:()=>N,SB:()=>k,ms:()=>_,hI:()=>m,aY:()=>ed,zd:()=>U,Ik:()=>C});var t=r(58120),n=r(67073),a=r(92797),l=r(2365),i=r(89352),o=r(48787),d=r(37891),c=r(88916),x=r(59059),h=r(75698),u=r(79795);let j={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},p={border:0,py:1};function m({router:e}){var s;let r=(s=e.mode)?s.includes("in-docker")||s.includes("auto-discovery")?{label:"Auto Discovery",color:"info"}:s.includes("mapping")?{label:"Manual Mapping",color:"warning"}:{label:s,color:"default"}:{label:"Unknown",color:"default"};return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(u.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"Platform Information"})]}),t.jsx(d.Z,{size:"small",children:(0,t.jsxs)(c.Z,{children:[(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:j,children:"Router Name"}),t.jsx(h.Z,{sx:p,children:e.name})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:j,children:"Port"}),t.jsx(h.Z,{sx:p,children:e.port})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:j,children:"Mode"}),t.jsx(h.Z,{sx:p,children:t.jsx(o.Z,{label:r.label,size:"small",color:r.color,variant:"outlined"})})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:j,children:"Uptime"}),t.jsx(h.Z,{sx:p,children:e.uptime||"-"})]})]})})]})})}var Z=r(98243),f=r(95009),g=r(4587),y=r(45912),v=r(32130),w=r(84527);function b(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({status:e}){return t.jsx(Z.Z,{title:e,arrow:!0,children:t.jsx(i.Z,{sx:{width:10,height:10,borderRadius:"50%",bgcolor:b(e),flexShrink:0,boxShadow:"running"===e?`0 0 6px ${b(e)}`:"none"}})})}function C({router:e}){let s=function(e){let s=new Map;for(let r of e){let e=r.target.replace(/^mc-/,"").replace(/:25565$/,""),t=s.get(e);t?t.hostnames.push(r.hostname):s.set(e,{status:r.serverStatus,hostnames:[r.hostname],serverType:r.serverType,serverVersion:r.serverVersion})}return s}(e.routes);return t.jsx(n.Z,{sx:{height:"100%"},children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(v.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"MC-Router Status"}),(0,t.jsxs)(i.Z,{sx:{ml:"auto",display:"flex",gap:1},children:[t.jsx(o.Z,{label:e.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"}}(e.status)}),t.jsx(o.Z,{label:e.health,size:"small",color:function(e){switch(e){case"healthy":return"success";case"unhealthy":return"error";case"starting":return"warning";default:return"default"}}(e.health),variant:"outlined"})]})]}),t.jsx(l.Z,{variant:"subtitle2",sx:{mb:1,mt:3},children:"Routing Table"}),0===e.routes.length?t.jsx(l.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No routes configured"}):t.jsx(i.Z,{sx:{mt:1},children:Array.from(s.entries()).map(([e,{status:s,hostnames:r,serverType:n,serverVersion:a}])=>(0,t.jsxs)(f.Z,{defaultExpanded:!0,disableGutters:!0,elevation:0,sx:{border:1,borderColor:"divider","&:not(:last-child)":{borderBottom:0},"&::before":{display:"none"}},children:[t.jsx(g.Z,{expandIcon:t.jsx(w.Z,{}),children:(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%",pr:1},children:[t.jsx(S,{status:s}),t.jsx(l.Z,{variant:"subtitle2",sx:{fontWeight:600},children:e}),(n||a)&&t.jsx(l.Z,{variant:"caption",color:"text.secondary",children:[n,a].filter(Boolean).join(" ")}),(0,t.jsxs)(l.Z,{variant:"caption",color:"text.secondary",sx:{ml:"auto"},children:[r.length," ",1===r.length?"route":"routes"]})]})}),t.jsx(y.Z,{sx:{pt:0},children:t.jsx(i.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:r.map(e=>t.jsx(l.Z,{variant:"body2",sx:{fontSize:"0.85rem",color:"text.secondary"},children:e},e))})})]},e))})]})})}var z=r(79603);let P={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},I={border:0,py:1};function k({router:e}){var s;let r=e.routes.filter(e=>"running"===e.serverStatus).length,u=e.routes.length;return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(z.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"Network Settings"})]}),t.jsx(i.Z,{sx:{overflowX:"auto"},children:t.jsx(d.Z,{size:"small",children:(0,t.jsxs)(c.Z,{children:[(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:P,children:"Listening Port"}),t.jsx(h.Z,{sx:I,children:t.jsx(o.Z,{label:e.port,size:"small",variant:"outlined"})})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:P,children:"Routing Mode"}),t.jsx(h.Z,{sx:I,children:t.jsx(o.Z,{label:(s=e.mode)?s.includes("in-docker")||s.includes("auto-discovery")?"Auto Discovery":s.includes("mapping")?"Manual Mapping":s:"Unknown",size:"small",color:"info",variant:"outlined"})})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:P,children:"Total Routes"}),t.jsx(h.Z,{sx:I,children:u})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:P,children:"Active Routes"}),t.jsx(h.Z,{sx:I,children:t.jsx(o.Z,{label:`${r} / ${u}`,size:"small",color:r>0?"success":"default",variant:"outlined"})})]})]})})})]})})}var A=r(5414);function N({avahi:e}){let s=e?.status??"unknown";return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(A.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"mDNS (Avahi)"}),t.jsx(o.Z,{label:s,size:"small",color:"running"===s?"success":s.includes("not running")?"warning":"not installed"===s?"error":"default",sx:{ml:"auto"}})]}),(0,t.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:["Avahi mDNS daemon enables ",t.jsx("code",{children:".local"})," hostname resolution for Minecraft servers on the local network."]})]})})}var D=r(36372),M=r(6275),T=r(10257),W=r(79943),E=r(38481),R=r(68763);function U({onSuccess:e,onError:s}){let{data:r}=(0,R.kP)(),[d,c]=(0,D.useState)(r?.user?.name||""),[x,h]=(0,D.useState)(!1),[u,j]=(0,D.useState)(!1),p=r?.user,m=d!==(p?.name||""),Z=async()=>{if(m&&d.trim()){h(!0);try{let{error:r}=await (0,R.Nq)({name:d.trim()});r?s(r.message||"Failed to update profile"):e("Profile updated successfully")}catch{s("Failed to update profile")}finally{h(!1)}}};return p?t.jsx(n.Z,{sx:{height:"100%"},children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:3},children:[t.jsx(E.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"Profile"})]}),(0,t.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[t.jsx(M.Z,{label:"Name",value:d,onChange:e=>c(e.target.value),fullWidth:!0,size:"small"}),t.jsx(M.Z,{label:"Email",value:p.email,fullWidth:!0,size:"small",disabled:!0,helperText:"Email cannot be changed"}),(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(l.Z,{variant:"body2",color:"text.secondary",children:"Role:"}),t.jsx(o.Z,{label:"admin"===p.role?"Admin":"User",size:"small",color:"admin"===p.role?"primary":"default",variant:"outlined"})]}),t.jsx(i.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:t.jsx(T.Z,{variant:"contained",onClick:Z,disabled:!m||!d.trim()||x,startIcon:x?t.jsx(W.Z,{size:16}):null,children:x?"Saving...":"Save Changes"})})]})]})}):null}var B=r(92559),F=r(54365),L=r(61960),q=r(27767),$=r(36739);function _({onSuccess:e,onError:s}){let[r,o]=(0,D.useState)(""),[d,c]=(0,D.useState)(""),[x,h]=(0,D.useState)(""),[u,j]=(0,D.useState)(!1),[p,m]=(0,D.useState)(!1),[Z,f]=(0,D.useState)(!1),[g,y]=(0,D.useState)(!1),[v,w]=(0,D.useState)({}),b=()=>{let e={};return r||(e.currentPassword="Current password is required"),d?d.length<8&&(e.newPassword="Password must be at least 8 characters"):e.newPassword="New password is required",x?d!==x&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your new password",r&&d&&r===d&&(e.newPassword="New password must be different from current password"),w(e),0===Object.keys(e).length},S=async t=>{if(t.preventDefault(),b()){y(!0);try{let{error:t}=await (0,R.Cp)({currentPassword:r,newPassword:d,revokeOtherSessions:!1});t?s(t.message||"Failed to change password"):(e("Password changed successfully"),o(""),c(""),h(""),w({}))}catch{s("Failed to change password")}finally{y(!1)}}},C=(e,s)=>t.jsx(B.Z,{position:"end",children:t.jsx(F.Z,{"aria-label":e?"hide password":"show password",onClick:()=>s(!e),edge:"end",size:"small",children:e?t.jsx($.Z,{fontSize:"small"}):t.jsx(q.Z,{fontSize:"small"})})});return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:3},children:[t.jsx(L.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"Change Password"})]}),(0,t.jsxs)(i.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2.5},children:[t.jsx(M.Z,{label:"Current Password",type:u?"text":"password",value:r,onChange:e=>{o(e.target.value),v.currentPassword&&w(e=>({...e,currentPassword:""}))},error:!!v.currentPassword,helperText:v.currentPassword,fullWidth:!0,size:"small",autoComplete:"current-password",InputProps:{endAdornment:C(u,j)}}),t.jsx(M.Z,{label:"New Password",type:p?"text":"password",value:d,onChange:e=>{c(e.target.value),v.newPassword&&w(e=>({...e,newPassword:""}))},error:!!v.newPassword,helperText:v.newPassword||"Minimum 8 characters",fullWidth:!0,size:"small",autoComplete:"new-password",InputProps:{endAdornment:C(p,m)}}),t.jsx(M.Z,{label:"Confirm New Password",type:Z?"text":"password",value:x,onChange:e=>{h(e.target.value),v.confirmPassword&&w(e=>({...e,confirmPassword:""}))},error:!!v.confirmPassword,helperText:v.confirmPassword,fullWidth:!0,size:"small",autoComplete:"new-password",InputProps:{endAdornment:C(Z,f)}}),t.jsx(i.Z,{sx:{display:"flex",justifyContent:"flex-end"},children:t.jsx(T.Z,{type:"submit",variant:"contained",disabled:g,startIcon:g?t.jsx(W.Z,{size:16}):null,children:g?"Changing...":"Change Password"})})]})]})})}var O=r(94304);let V={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},K={border:0,py:1};function X(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)(),s=e?.user;return s?t.jsx(n.Z,{sx:{height:"100%"},children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(O.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"Account Information"})]}),t.jsx(d.Z,{size:"small",children:(0,t.jsxs)(c.Z,{children:[(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:V,children:"Account ID"}),t.jsx(h.Z,{sx:K,children:t.jsx(l.Z,{variant:"body2",sx:{fontSize:"0.8rem"},children:s.id})})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:V,children:"Created"}),t.jsx(h.Z,{sx:K,children:X(s.createdAt)})]}),(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:V,children:"Last Updated"}),t.jsx(h.Z,{sx:K,children:X(s.updatedAt)})]})]})})]})}):null}var Y=r(70862),G=r(68913),H=r(66757),J=r(765),ee=r(29553),es=r(84292),er=r(97441),et=r(51999),en=r(53825),ea=r(15934);let el={fontWeight:500,color:"text.secondary",border:0,width:"40%",py:1},ei={border:0,py:1};function eo({text:e}){let[s,r]=(0,D.useState)(!1),n=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Failed to copy:",e)}};return t.jsx(F.Z,{size:"small",onClick:n,sx:{ml:1,color:s?"success.main":"text.secondary","&:hover":{bgcolor:"action.hover"}},"aria-label":s?"Copied":"Copy to clipboard",children:s?t.jsx(en.Z,{sx:{fontSize:16}}):t.jsx(et.Z,{sx:{fontSize:16}})})}function ed(){let{data:e,isLoading:s,error:r}=(0,ea.UW)(),u=(0,ea.Bc)(),j=(0,ea.N$)();if(r)return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(J.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),(0,t.jsxs)(H.Z,{severity:"error",children:["Failed to load playit status: ",r.message]})]})});if(s)return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(G.Z,{variant:"circular",width:24,height:24}),t.jsx(G.Z,{variant:"text",width:"40%",height:32})]}),(0,t.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[t.jsx(G.Z,{variant:"text",width:"35%"}),t.jsx(G.Z,{variant:"text",width:"40%"})]}),(0,t.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",py:.75},children:[t.jsx(G.Z,{variant:"text",width:"35%"}),t.jsx(G.Z,{variant:"text",width:"40%"})]})]})});if(!e?.enabled)return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:2},children:[t.jsx(J.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),(0,t.jsxs)(H.Z,{severity:"info",children:[t.jsx(l.Z,{variant:"body2",fontWeight:500,sx:{mb:.5},children:"Not configured"}),t.jsx(l.Z,{variant:"body2",color:"text.secondary",children:"playit.gg agent is not set up. Configure PLAYIT_SECRET to enable external access."})]})]})});let p=e.agentRunning&&"running"===e.containerStatus,m=u.isPending||j.isPending,Z=u.error||j.error;return t.jsx(n.Z,{children:(0,t.jsxs)(a.Z,{children:[(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,mb:1},children:[t.jsx(J.Z,{color:"primary"}),t.jsx(l.Z,{variant:"h6",component:"h2",children:"External Access (playit.gg)"})]}),Z&&t.jsx(H.Z,{severity:"error",sx:{mb:2},children:Z.message||"Action failed"}),(0,t.jsxs)(i.Z,{sx:{display:"flex",gap:1,mb:2,flexWrap:"wrap"},children:[p?t.jsx(T.Z,{variant:"outlined",size:"small",color:"error",startIcon:m?t.jsx(W.Z,{size:16}):t.jsx(es.Z,{}),onClick:()=>{j.mutate()},disabled:m,sx:{fontSize:12},children:m?"Stopping...":"Stop Agent"}):t.jsx(T.Z,{variant:"contained",size:"small",color:"success",startIcon:m?t.jsx(W.Z,{size:16,color:"inherit"}):t.jsx(ee.Z,{}),onClick:()=>{u.mutate()},disabled:m,sx:{fontSize:12},children:m?"Starting...":"Start Agent"}),t.jsx(T.Z,{component:"a",href:"https://playit.gg/account/tunnels",target:"_blank",rel:"noopener noreferrer",size:"small",startIcon:t.jsx(er.Z,{}),sx:{fontSize:12},children:"View Dashboard"})]}),t.jsx(i.Z,{sx:{overflowX:"auto"},children:t.jsx(d.Z,{size:"small",sx:{mb:3},children:(0,t.jsxs)(c.Z,{children:[(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:el,children:"Agent Status"}),t.jsx(h.Z,{sx:ei,children:t.jsx(o.Z,{label:p?"Running":"Stopped",size:"small",color:p?"success":"default",variant:"outlined"})})]}),e.uptime&&(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:el,children:"Uptime"}),t.jsx(h.Z,{sx:ei,children:e.uptime})]})]})})}),e.servers&&e.servers.length>0&&(()=>{let s=e.servers.filter(e=>e.playitDomain),r=e.servers.filter(e=>!e.playitDomain);return(0,t.jsxs)(t.Fragment,{children:[t.jsx(l.Z,{variant:"subtitle2",sx:{mb:1.5,fontWeight:600},children:"Server Domains"}),s.length>0?t.jsx(i.Z,{sx:{overflowX:"auto"},children:(0,t.jsxs)(d.Z,{size:"small",sx:{mb:r.length>0?2:0},children:[t.jsx(Y.Z,{children:(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:{fontWeight:600,borderBottom:2,borderColor:"divider"},children:"Server"}),t.jsx(h.Z,{sx:{fontWeight:600,borderBottom:2,borderColor:"divider"},children:"External Domain"})]})}),t.jsx(c.Z,{children:s.map(e=>(0,t.jsxs)(x.Z,{children:[t.jsx(h.Z,{sx:{py:1.5,borderBottom:1,borderColor:"divider"},children:e.serverName}),t.jsx(h.Z,{sx:{py:1.5,borderBottom:1,borderColor:"divider"},children:(0,t.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(l.Z,{variant:"body2",sx:{wordBreak:"break-all"},children:e.playitDomain}),t.jsx(eo,{text:e.playitDomain})]})})]},e.serverName))})]})}):(0,t.jsxs)(l.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:["No servers with external domains configured. Use ",t.jsx("code",{children:"mcctl create --playit-domain"})," to register a domain."]}),r.length>0&&(0,t.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[r.length," server",r.length>1?"s":""," without external domain: ",r.map(e=>e.serverName).join(", ")]})]})})()]})})}},43137:(e,s,r)=>{async function t(e,s={}){let r={...s.headers};s.body&&(r["Content-Type"]="application/json");let t=await fetch(e,{...s,headers:r});if(!t.ok){let e=await t.json().catch(()=>({error:"UnknownError",message:t.statusText})),s=Error(e.message);throw s.statusCode=t.status,s.code=e.error,s}return t.json()}r.d(s,{SC:()=>t})},15934:(e,s,r)=>{r.d(s,{Bc:()=>o,N$:()=>d,UW:()=>i});var t=r(28872),n=r(95343),a=r(20042),l=r(43137);function i(){return(0,t.a)({queryKey:["playit-status"],queryFn:()=>(0,l.SC)("/api/playit/status"),refetchInterval:3e4})}function o(){let e=(0,n.NL)();return(0,a.D)({mutationFn:()=>(0,l.SC)("/api/playit/start",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}function d(){let e=(0,n.NL)();return(0,a.D)({mutationFn:()=>(0,l.SC)("/api/playit/stop",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["playit-status"]})}})}}};