@minecraft-docker/mcctl-console 1.14.0 → 1.15.1

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 (96) hide show
  1. package/.next/standalone/package.json +1 -1
  2. package/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
  3. package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +47 -47
  4. package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
  5. package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +2 -2
  6. package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
  7. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
  18. package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +1 -1
  19. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/[id]/route.js +1 -1
  20. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/export/route.js +1 -1
  21. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/route.js +1 -1
  22. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/stats/route.js +1 -1
  23. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/audit-logs/stream/route.js +1 -1
  24. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/auth/[...all]/route.js +1 -1
  25. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/history/route.js +1 -1
  26. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/restore/route.js +1 -1
  27. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/backup/route.js +1 -1
  28. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/ban/route.js +1 -1
  29. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/kick/route.js +1 -1
  30. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/op/route.js +1 -1
  31. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/route.js +1 -1
  32. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/players/whitelist/route.js +1 -1
  33. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/router/status/route.js +1 -1
  34. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/[action]/route.js +1 -1
  35. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/config/route.js +1 -1
  36. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/exec/route.js +1 -1
  37. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/route.js +1 -1
  38. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/[name]/world/reset/route.js +1 -1
  39. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/servers/route.js +1 -1
  40. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/user-servers/[id]/route.js +1 -1
  41. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/user-servers/route.js +1 -1
  42. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/users/route.js +1 -1
  43. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/worlds/[name]/[action]/route.js +1 -1
  44. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/worlds/[name]/route.js +1 -1
  45. package/.next/standalone/platform/services/mcctl-console/.next/server/app/api/worlds/route.js +1 -1
  46. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
  47. package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +2 -2
  48. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
  49. package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +2 -2
  50. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
  51. package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +2 -2
  52. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
  53. package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +2 -2
  54. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js +1 -1
  55. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
  56. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
  57. package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +2 -2
  58. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page.js +1 -1
  59. package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
  60. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
  61. package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +2 -2
  62. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
  63. package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +2 -2
  64. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
  65. package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +2 -2
  66. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js +1 -1
  67. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
  68. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
  69. package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +2 -2
  70. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
  71. package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +2 -2
  72. package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +16 -16
  73. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/354.js +1 -1
  74. package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/613.js +1 -1
  75. package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
  76. package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.js +1 -1
  77. package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.json +1 -1
  78. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
  79. package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
  80. package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
  81. package/.next/{static/chunks/app/(main)/layout-9311354243420c0d.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-692cb1da92b73287.js} +1 -1
  82. package/.next/{static/chunks/app/login/page-3ad9d595e6c37214.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-d6a5da720238e5cf.js} +1 -1
  83. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/page-8b5b6cb30448bcc5.js +1 -0
  84. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/signup/{page-69a8bc2df6bc3559.js → page-6e5550bc9fffa4bc.js} +1 -1
  85. package/.next/standalone/platform/services/mcctl-console/package.json +1 -1
  86. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/layout-9311354243420c0d.js → static/chunks/app/(main)/layout-692cb1da92b73287.js} +1 -1
  87. package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/login/page-3ad9d595e6c37214.js → static/chunks/app/login/page-d6a5da720238e5cf.js} +1 -1
  88. package/.next/static/chunks/app/page-8b5b6cb30448bcc5.js +1 -0
  89. package/.next/static/chunks/app/signup/{page-69a8bc2df6bc3559.js → page-6e5550bc9fffa4bc.js} +1 -1
  90. package/package.json +2 -2
  91. package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/page-fcacf1a03f097c1a.js +0 -1
  92. package/.next/static/chunks/app/page-fcacf1a03f097c1a.js +0 -1
  93. /package/.next/standalone/platform/services/mcctl-console/.next/static/{8BG9m6JnLqB8k8011EMcp → 54l5y_cPPm2v7sbdcoQao}/_buildManifest.js +0 -0
  94. /package/.next/standalone/platform/services/mcctl-console/.next/static/{8BG9m6JnLqB8k8011EMcp → 54l5y_cPPm2v7sbdcoQao}/_ssgManifest.js +0 -0
  95. /package/.next/static/{8BG9m6JnLqB8k8011EMcp → 54l5y_cPPm2v7sbdcoQao}/_buildManifest.js +0 -0
  96. /package/.next/static/{8BG9m6JnLqB8k8011EMcp → 54l5y_cPPm2v7sbdcoQao}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return H}});var n=t(94655),a=t(35106),i=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),h=t(31317),x=t(78765),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690);let A=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit Log",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function D(e){let{mobileOpen:r,onMenuToggle:t}=e,a=(0,s.usePathname)(),y=e=>"/dashboard"===e?"/dashboard"===a||"/"===a:a.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(h.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(i.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:A.map(e=>{let r=y(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.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:[(0,n.jsx)(i.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(h.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(x.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(h.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:A.map(e=>{let r=y(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var T=t(67337),_=t(41261),E=t(69123),L=t(75845),M=t(43880);function q(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let R=[{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 B(){let e=new Date().getFullYear();return(0,n.jsx)(i.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(T.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(i.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:R.map(e=>(0,n.jsxs)(i.Z,{children:[(0,n.jsx)(h.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(i.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(i.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(_.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(E.Z,{sx:{mb:3}}),(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(h.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(_.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(i.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(_.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(_.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(_.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(q,{fontSize:"small"})})]})]})]})})}function H(e){let{children:r}=e,[t,s]=(0,a.useState)(!1);return(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(D,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(i.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(B,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return P}});var n=t(94655),a=t(35106),i=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),h=t(36848),x=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,b]=(0,a.useState)(!1),[j,y]=(0,a.useState)({}),[v,Z]=(0,a.useState)(null),[w,C]=(0,a.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.zB.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(i.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(h.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,b]=(0,a.useState)(""),[j,y]=(0,a.useState)(""),[v,Z]=(0,a.useState)(!1),[w,C]=(0,a.useState)(!1),[k,S]=(0,a.useState)({}),[P,z]=(0,a.useState)(null),[I,W]=(0,a.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(i.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(h.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(h.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(35694),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(78319);function P(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,a.useState)(null),o=()=>{l(null)},h=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:x}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(x.name,x.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(i.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:x.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:x.email}),"admin"===x.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),(0,n.jsxs)(w.Z,{onClick:h,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),a=t(35106),i=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,i.usePathname)(),s=(0,i.useSearchParams)();return(0,a.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return c},w7:function(){return l},y1:function(){return o},zB:function(){return s}});var n=t(77054),a=t(61648),i=t(35016);let{signIn:s,signOut:l,signUp:o,useSession:c}=(0,n.X)({baseURL:i.env.NEXT_PUBLIC_BETTER_AUTH_URL||"http://localhost:5000",plugins:[(0,a.zB)()]})}},function(e){e.O(0,[6812,7220,8006,7294,8696,1071,55,3543,8347,2149,2542,8322,8918,212,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4095],{16387:function(e,r,t){Promise.resolve().then(t.bind(t,6453))},6453:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return H}});var n=t(94655),a=t(35106),i=t(7281),s=t(74228),l=t(46725),o=t(56275),c=t(62108),d=t(79983),x=t(31317),h=t(78765),m=t(90158),u=t(58347),p=t(49954),f=t(17820),g=t(73424),b=t(61505),j=t(71185),y=t(76176),v=t(27171),Z=t(35847),w=t(29983),C=t(80620),k=t(84974),S=t(34675),P=t(85480),z=t(64779);function I(e){return(0,n.jsxs)(z.Z,{...e,viewBox:"0 0 32 32",children:[(0,n.jsx)("rect",{width:"32",height:"32",fill:"#5DA840"}),(0,n.jsx)("rect",{x:"4",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"8",width:"8",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"12",y:"16",width:"8",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"20",width:"16",height:"8",fill:"#000"}),(0,n.jsx)("rect",{x:"8",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"20",y:"28",width:"4",height:"4",fill:"#000"}),(0,n.jsx)("rect",{x:"0",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"8",y:"4",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"24",y:"0",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"28",y:"8",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"}),(0,n.jsx)("rect",{x:"0",y:"24",width:"4",height:"4",fill:"#4A9030",opacity:"0.5"})]})}var W=t(8690);let A=[{label:"Dashboard",href:"/dashboard",icon:(0,n.jsx)(y.Z,{})},{label:"Servers",href:"/servers",icon:(0,n.jsx)(v.Z,{})},{label:"Worlds",href:"/worlds",icon:(0,n.jsx)(k.Z,{})},{label:"Players",href:"/players",icon:(0,n.jsx)(Z.Z,{})},{label:"Audit Log",href:"/audit-logs",icon:(0,n.jsx)(C.Z,{})},{label:"Backups",href:"/backups",icon:(0,n.jsx)(S.Z,{})},{label:"Routing",href:"/routing",icon:(0,n.jsx)(w.Z,{})}];function D(e){let{mobileOpen:r,onMenuToggle:t}=e,a=(0,s.usePathname)(),y=e=>"/dashboard"===e?"/dashboard"===a||"/"===a:a.startsWith(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{position:"fixed",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider",zIndex:e=>e.zIndex.drawer+1},children:(0,n.jsxs)(c.Z,{sx:{maxWidth:"1400px",width:"100%",mx:"auto",px:{xs:2,sm:3}},children:[(0,n.jsx)(d.Z,{color:"inherit","aria-label":"open menu",edge:"start",onClick:t,sx:{mr:2,display:{md:"none"}},children:(0,n.jsx)(b.Z,{})}),(0,n.jsxs)(l.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:28,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"common.white",letterSpacing:"0.05em",fontSize:"1.1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(i.Z,{component:"nav",sx:{display:{xs:"none",md:"flex"},alignItems:"center",gap:1,ml:4,flex:1},children:A.map(e=>{let r=y(e.href);return(0,n.jsx)(l.default,{href:e.href,style:{textDecoration:"none"},onClick:()=>!r&&(0,W.Av)(),children:(0,n.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:[(0,n.jsx)(i.Z,{component:"span",sx:{display:"flex",alignItems:"center","& svg":{fontSize:20}},children:e.icon}),(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:r?600:400},children:e.label})]})},e.href)})}),(0,n.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:(0,n.jsx)(P.Ie,{})})]})}),(0,n.jsx)(h.ZP,{variant:"temporary",anchor:"left",open:r,onClose:t,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",md:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:280,backgroundColor:"background.paper"}},children:(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:2,minHeight:64,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(I,{sx:{fontSize:24,color:"primary.main",mr:1}}),(0,n.jsx)(x.Z,{variant:"h6",component:"span",sx:{fontFamily:'"Minecraft", sans-serif',fontWeight:400,color:"primary.main",letterSpacing:"0.05em",fontSize:"1rem"},children:"Minecraft Console"})]}),(0,n.jsx)(d.Z,{onClick:t,"aria-label":"close menu",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(m.Z,{sx:{flex:1,px:1,py:2},children:A.map(e=>{let r=y(e.href);return(0,n.jsx)(u.ZP,{disablePadding:!0,sx:{mb:.5},children:(0,n.jsxs)(p.Z,{component:l.default,href:e.href,onClick:()=>{t(),r||(0,W.Av)()},"aria-current":r?"page":void 0,sx:{borderRadius:2,backgroundColor:r?"action.selected":"transparent","&:hover":{backgroundColor:"action.hover"}},children:[(0,n.jsx)(f.Z,{sx:{color:r?"primary.main":"text.secondary",minWidth:40},children:e.icon}),(0,n.jsx)(g.Z,{primary:e.label,primaryTypographyProps:{fontWeight:r?600:400,color:r?"primary.main":"text.primary"}})]})},e.href)})})]})})]})}var T=t(67337),_=t(41261),E=t(69123),L=t(75845),M=t(43880);function q(e){return(0,n.jsx)(z.Z,{...e,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.186m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288z"})})}let R=[{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 B(){let e=new Date().getFullYear();return(0,n.jsx)(i.Z,{component:"footer",sx:{backgroundColor:"background.paper",borderTop:"1px solid",borderColor:"divider",mt:"auto"},children:(0,n.jsxs)(T.Z,{maxWidth:"lg",sx:{py:6},children:[(0,n.jsx)(i.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(4, 1fr)"},gap:4,mb:4},children:R.map(e=>(0,n.jsxs)(i.Z,{children:[(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{fontWeight:600,color:"text.primary",mb:2},children:e.title}),(0,n.jsx)(i.Z,{component:"ul",sx:{listStyle:"none",p:0,m:0},children:e.links.map(e=>(0,n.jsx)(i.Z,{component:"li",sx:{mb:1},children:(0,n.jsx)(_.Z,{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,underline:"hover",sx:{color:"text.secondary",fontSize:"0.875rem",transition:"color 0.2s ease","&:hover":{color:"primary.main"}},children:e.label})},e.label))})]},e.title))}),(0,n.jsx)(E.Z,{sx:{mb:3}}),(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},gap:2},children:[(0,n.jsxs)(x.Z,{variant:"body2",sx:{color:"text.tertiary"},children:[e," \xa9"," ",(0,n.jsx)(_.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer",underline:"hover",sx:{color:"primary.main"},children:"Minecraft Server Management Console"})]}),(0,n.jsxs)(i.Z,{sx:{display:"flex",gap:2},children:[(0,n.jsx)(_.Z,{href:"https://github.com/smallmiro/minecraft-server-manager",target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(L.Z,{fontSize:"small"})}),(0,n.jsx)(_.Z,{href:"https://minecraft-server-manager.readthedocs.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"Documentation",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(M.Z,{fontSize:"small"})}),(0,n.jsx)(_.Z,{href:"https://hub.docker.com/r/itzg/minecraft-server",target:"_blank",rel:"noopener noreferrer","aria-label":"Docker Hub",sx:{color:"text.secondary",transition:"color 0.2s ease","&:hover":{color:"text.primary"}},children:(0,n.jsx)(q,{fontSize:"small"})})]})]})]})})}function H(e){let{children:r}=e,[t,s]=(0,a.useState)(!1);return(0,n.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",backgroundColor:"background.default"},children:[(0,n.jsx)(D,{mobileOpen:t,onMenuToggle:()=>{s(!t)}}),(0,n.jsx)(i.Z,{component:"main",sx:{flexGrow:1,display:"flex",flexDirection:"column",pt:{xs:"".concat(88,"px"),sm:"".concat(96,"px")},pb:{xs:3,sm:4},px:{xs:2,sm:3,md:4},maxWidth:"1400px",width:"100%",mx:"auto"},children:r}),(0,n.jsx)(B,{})]})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return u},WS:function(){return p},Ie:function(){return P}});var n=t(94655),a=t(35106),i=t(7281),s=t(81071),l=t(97436),o=t(52082),c=t(79983),d=t(30417),x=t(36848),h=t(554),m=t(6986);function u(e){let{onSuccess:r}=e,[t,u]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,b]=(0,a.useState)(!1),[j,y]=(0,a.useState)({}),[v,Z]=(0,a.useState)(null),[w,C]=(0,a.useState)(!1),k=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),y(e),0===Object.keys(e).length},S=async e=>{if(e.preventDefault(),Z(null),k()){C(!0);try{let e=await m.zB.email({email:t,password:p});if(e.error){Z(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){Z("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(i.Z,{component:"form",onSubmit:S,sx:{display:"flex",flexDirection:"column",gap:2},children:[v&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>Z(null),children:v}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>u(e.target.value),error:!!j.email,helperText:j.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!j.password,helperText:j.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!g)},edge:"end",children:g?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,u]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,b]=(0,a.useState)(""),[j,y]=(0,a.useState)(""),[v,Z]=(0,a.useState)(!1),[w,C]=(0,a.useState)(!1),[k,S]=(0,a.useState)({}),[P,z]=(0,a.useState)(null),[I,W]=(0,a.useState)(!1),A=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",j?g!==j&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",S(e),0===Object.keys(e).length},D=async e=>{if(e.preventDefault(),z(null),A()){W(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){z(e.error.message||"Registration failed"),W(!1);return}r&&r()}catch(e){z("An unexpected error occurred. Please try again."),W(!1)}}};return(0,n.jsxs)(i.Z,{component:"form",onSubmit:D,sx:{display:"flex",flexDirection:"column",gap:2},children:[P&&(0,n.jsx)(s.Z,{severity:"error",onClose:()=>z(null),children:P}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>u(e.target.value),error:!!k.name,helperText:k.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!k.email,helperText:k.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:v?"text":"password",value:g,onChange:e=>b(e.target.value),error:!!k.password,helperText:k.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!v)},edge:"end",children:v?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:j,onChange:e=>y(e.target.value),error:!!k.confirmPassword,helperText:k.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(c.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(x.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(d.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),b=t(86702),j=t(35694),y=t(31317),v=t(25333),Z=t(69123),w=t(7178),C=t(17820),k=t(73424),S=t(78319);function P(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[s,l]=(0,a.useState)(null),o=()=>{l(null)},x=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(d.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,u=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(b.Z,{sx:{bgcolor:"primary.main"},children:u})}),(0,n.jsxs)(j.Z,{anchorEl:s,open:!!s,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(i.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(y.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(y.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(v.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(Z.Z,{}),(0,n.jsxs)(w.Z,{onClick:x,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(S.Z,{fontSize:"small"})}),(0,n.jsx)(k.Z,{children:"Logout"})]})]})]})}},3454:function(e,r,t){"use strict";t.d(r,{LoadingProvider:function(){return o},startLoading:function(){return c},stopLoading:function(){return d}});var n=t(94655),a=t(35106),i=t(74228),s=t(31477),l=t.n(s);function o(e){let{children:r}=e,t=(0,i.usePathname)(),s=(0,i.useSearchParams)();return(0,a.useEffect)(()=>{l().done()},[t,s]),(0,n.jsx)(n.Fragment,{children:r})}function c(){l().start()}function d(){l().done()}l().configure({showSpinner:!1,speed:300,minimum:.1})},8690:function(e,r,t){"use strict";t.d(r,{Av:function(){return n.startLoading}});var n=t(3454)},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return c},w7:function(){return l},y1:function(){return o},zB:function(){return s}});var n=t(77054),a=t(61648),i=t(35016);let{signIn:s,signOut:l,signUp:o,useSession:c}=(0,n.X)({baseURL:i.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,a.zB)()]})}},function(e){e.O(0,[6812,7220,8006,7294,8696,1071,55,3543,8347,2149,2542,8322,8918,212,3669,2757,1744],function(){return e(e.s=16387)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2626],{40527:function(e,r,t){Promise.resolve().then(t.bind(t,10672))},628:function(e,r,t){"use strict";t.d(r,{Z:function(){return Z}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(69899),c=t(11379),h=t(9049);function m(e){return(0,h.ZP)("MuiCard",e)}(0,c.Z)("MuiCard",["root"]);var x=t(94655);let p=["className","raised"],f=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},m,r)},g=(0,o.ZP)(u.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({overflow:"hidden"}));var Z=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCard"}),{className:s,raised:l=!1}=t,o=(0,i.Z)(t,p),u=(0,n.Z)({},t,{raised:l}),c=f(u);return(0,x.jsx)(g,(0,n.Z)({className:(0,a.Z)(c.root,s),elevation:l?8:void 0,ref:r,ownerState:u},o))})},41565:function(e,r,t){"use strict";t.d(r,{Z:function(){return g}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(11379),c=t(9049);function h(e){return(0,c.ZP)("MuiCardContent",e)}(0,u.Z)("MuiCardContent",["root"]);var m=t(94655);let x=["className","component"],p=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},h,r)},f=(0,o.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}}));var g=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCardContent"}),{className:s,component:l="div"}=t,o=(0,i.Z)(t,x),u=(0,n.Z)({},t,{component:l}),c=p(u);return(0,m.jsx)(f,(0,n.Z)({as:l,className:(0,a.Z)(c.root,s),ownerState:u,ref:r},o))})},10672:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return m}});var n=t(94655),i=t(74228),s=t(67337),a=t(7281),l=t(628),o=t(41565),d=t(31317),u=t(41261),c=t(85480),h=t(46725);function m(){let e=(0,i.useRouter)();return(0,n.jsx)(s.Z,{maxWidth:"sm",children:(0,n.jsx)(a.Z,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",py:4},children:(0,n.jsx)(l.Z,{sx:{width:"100%",maxWidth:500},children:(0,n.jsxs)(o.Z,{sx:{p:4},children:[(0,n.jsx)(d.Z,{variant:"h4",component:"h1",gutterBottom:!0,sx:{fontWeight:600,textAlign:"center",mb:3},children:"Welcome Back"}),(0,n.jsx)(d.Z,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",mb:4},children:"Sign in to manage your Minecraft servers"}),(0,n.jsx)(c.U0,{onSuccess:()=>{e.push("/dashboard")}}),(0,n.jsx)(a.Z,{sx:{mt:3,textAlign:"center"},children:(0,n.jsxs)(d.Z,{variant:"body2",color:"text.secondary",children:["Don't have an account?"," ",(0,n.jsx)(u.Z,{component:h.default,href:"/signup",underline:"hover",children:"Sign up"})]})})]})})})})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return x},WS:function(){return p},Ie:function(){return k}});var n=t(94655),i=t(35106),s=t(7281),a=t(81071),l=t(97436),o=t(52082),d=t(79983),u=t(30417),c=t(36848),h=t(554),m=t(6986);function x(e){let{onSuccess:r}=e,[t,x]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(!1),[v,j]=(0,i.useState)({}),[y,b]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),S=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),j(e),0===Object.keys(e).length},P=async e=>{if(e.preventDefault(),b(null),S()){C(!0);try{let e=await m.zB.email({email:t,password:p});if(e.error){b(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){b("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:P,sx:{display:"flex",flexDirection:"column",gap:2},children:[y&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>b(null),children:y}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>x(e.target.value),error:!!v.email,helperText:v.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!v.password,helperText:v.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!g)},edge:"end",children:g?(0,n.jsx)(c.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,x]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(""),[v,j]=(0,i.useState)(""),[y,b]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[S,P]=(0,i.useState)({}),[k,W]=(0,i.useState)(null),[I,R]=(0,i.useState)(!1),q=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",v?g!==v&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",P(e),0===Object.keys(e).length},E=async e=>{if(e.preventDefault(),W(null),q()){R(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){W(e.error.message||"Registration failed"),R(!1);return}r&&r()}catch(e){W("An unexpected error occurred. Please try again."),R(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:E,sx:{display:"flex",flexDirection:"column",gap:2},children:[k&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>W(null),children:k}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>x(e.target.value),error:!!S.name,helperText:S.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!S.email,helperText:S.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:y?"text":"password",value:g,onChange:e=>Z(e.target.value),error:!!S.password,helperText:S.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!y)},edge:"end",children:y?(0,n.jsx)(c.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:v,onChange:e=>j(e.target.value),error:!!S.confirmPassword,helperText:S.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(c.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),Z=t(86702),v=t(35694),j=t(31317),y=t(25333),b=t(69123),w=t(7178),C=t(17820),S=t(73424),P=t(78319);function k(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[a,l]=(0,i.useState)(null),o=()=>{l(null)},c=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(s.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(u.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,x=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(Z.Z,{sx:{bgcolor:"primary.main"},children:x})}),(0,n.jsxs)(v.Z,{anchorEl:a,open:!!a,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(s.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(j.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(j.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(y.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(b.Z,{}),(0,n.jsxs)(w.Z,{onClick:c,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(S.Z,{children:"Logout"})]})]})]})}},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return d},w7:function(){return l},y1:function(){return o},zB:function(){return a}});var n=t(77054),i=t(61648),s=t(35016);let{signIn:a,signOut:l,signUp:o,useSession:d}=(0,n.X)({baseURL:s.env.NEXT_PUBLIC_BETTER_AUTH_URL||"http://localhost:5000",plugins:[(0,i.zB)()]})}},function(e){e.O(0,[6812,7220,8006,7294,8696,1071,55,3543,2149,2542,8322,3669,2757,1744],function(){return e(e.s=40527)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2626],{40527:function(e,r,t){Promise.resolve().then(t.bind(t,10672))},628:function(e,r,t){"use strict";t.d(r,{Z:function(){return Z}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(69899),c=t(11379),m=t(9049);function x(e){return(0,m.ZP)("MuiCard",e)}(0,c.Z)("MuiCard",["root"]);var h=t(94655);let p=["className","raised"],f=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},x,r)},g=(0,o.ZP)(u.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({overflow:"hidden"}));var Z=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCard"}),{className:s,raised:l=!1}=t,o=(0,i.Z)(t,p),u=(0,n.Z)({},t,{raised:l}),c=f(u);return(0,h.jsx)(g,(0,n.Z)({className:(0,a.Z)(c.root,s),elevation:l?8:void 0,ref:r,ownerState:u},o))})},41565:function(e,r,t){"use strict";t.d(r,{Z:function(){return g}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(11379),c=t(9049);function m(e){return(0,c.ZP)("MuiCardContent",e)}(0,u.Z)("MuiCardContent",["root"]);var x=t(94655);let h=["className","component"],p=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},m,r)},f=(0,o.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}}));var g=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCardContent"}),{className:s,component:l="div"}=t,o=(0,i.Z)(t,h),u=(0,n.Z)({},t,{component:l}),c=p(u);return(0,x.jsx)(f,(0,n.Z)({as:l,className:(0,a.Z)(c.root,s),ownerState:u,ref:r},o))})},10672:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return x}});var n=t(94655),i=t(74228),s=t(67337),a=t(7281),l=t(628),o=t(41565),d=t(31317),u=t(41261),c=t(85480),m=t(46725);function x(){let e=(0,i.useRouter)();return(0,n.jsx)(s.Z,{maxWidth:"sm",children:(0,n.jsx)(a.Z,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",py:4},children:(0,n.jsx)(l.Z,{sx:{width:"100%",maxWidth:500},children:(0,n.jsxs)(o.Z,{sx:{p:4},children:[(0,n.jsx)(d.Z,{variant:"h4",component:"h1",gutterBottom:!0,sx:{fontWeight:600,textAlign:"center",mb:3},children:"Welcome Back"}),(0,n.jsx)(d.Z,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",mb:4},children:"Sign in to manage your Minecraft servers"}),(0,n.jsx)(c.U0,{onSuccess:()=>{e.push("/dashboard")}}),(0,n.jsx)(a.Z,{sx:{mt:3,textAlign:"center"},children:(0,n.jsxs)(d.Z,{variant:"body2",color:"text.secondary",children:["Don't have an account?"," ",(0,n.jsx)(u.Z,{component:m.default,href:"/signup",underline:"hover",children:"Sign up"})]})})]})})})})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return h},WS:function(){return p},Ie:function(){return k}});var n=t(94655),i=t(35106),s=t(7281),a=t(81071),l=t(97436),o=t(52082),d=t(79983),u=t(30417),c=t(36848),m=t(554),x=t(6986);function h(e){let{onSuccess:r}=e,[t,h]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(!1),[v,j]=(0,i.useState)({}),[y,b]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),S=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),j(e),0===Object.keys(e).length},P=async e=>{if(e.preventDefault(),b(null),S()){C(!0);try{let e=await x.zB.email({email:t,password:p});if(e.error){b(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){b("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:P,sx:{display:"flex",flexDirection:"column",gap:2},children:[y&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>b(null),children:y}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>h(e.target.value),error:!!v.email,helperText:v.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!v.password,helperText:v.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!g)},edge:"end",children:g?(0,n.jsx)(c.Z,{}):(0,n.jsx)(m.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,h]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(""),[v,j]=(0,i.useState)(""),[y,b]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[S,P]=(0,i.useState)({}),[k,W]=(0,i.useState)(null),[I,R]=(0,i.useState)(!1),q=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",v?g!==v&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",P(e),0===Object.keys(e).length},E=async e=>{if(e.preventDefault(),W(null),q()){R(!0);try{let e=await x.y1.email({email:p,password:g,name:t});if(e.error){W(e.error.message||"Registration failed"),R(!1);return}r&&r()}catch(e){W("An unexpected error occurred. Please try again."),R(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:E,sx:{display:"flex",flexDirection:"column",gap:2},children:[k&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>W(null),children:k}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>h(e.target.value),error:!!S.name,helperText:S.name,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!S.email,helperText:S.email,disabled:I,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:y?"text":"password",value:g,onChange:e=>Z(e.target.value),error:!!S.password,helperText:S.password,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!y)},edge:"end",children:y?(0,n.jsx)(c.Z,{}):(0,n.jsx)(m.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:v,onChange:e=>j(e.target.value),error:!!S.confirmPassword,helperText:S.confirmPassword,disabled:I,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(c.Z,{}):(0,n.jsx)(m.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:I,fullWidth:!0,size:"large",children:I?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),Z=t(86702),v=t(35694),j=t(31317),y=t(25333),b=t(69123),w=t(7178),C=t(17820),S=t(73424),P=t(78319);function k(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,x.kP)(),[a,l]=(0,i.useState)(null),o=()=>{l(null)},c=async()=>{o(),await (0,x.w7)(),e.push("/login")};if(t)return(0,n.jsx)(s.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(u.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:m}=r,h=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(m.name,m.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(Z.Z,{sx:{bgcolor:"primary.main"},children:h})}),(0,n.jsxs)(v.Z,{anchorEl:a,open:!!a,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(s.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(j.Z,{variant:"subtitle1",fontWeight:"600",children:m.name||"User"}),(0,n.jsx)(j.Z,{variant:"body2",color:"text.secondary",children:m.email}),"admin"===m.role&&(0,n.jsx)(y.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(b.Z,{}),(0,n.jsxs)(w.Z,{onClick:c,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(S.Z,{children:"Logout"})]})]})]})}},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return d},w7:function(){return l},y1:function(){return o},zB:function(){return a}});var n=t(77054),i=t(61648),s=t(35016);let{signIn:a,signOut:l,signUp:o,useSession:d}=(0,n.X)({baseURL:s.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]})}},function(e){e.O(0,[6812,7220,8006,7294,8696,1071,55,3543,2149,2542,8322,3669,2757,1744],function(){return e(e.s=40527)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{54985:function(e,r,n){Promise.resolve().then(n.bind(n,26854))},93017:function(e,r,n){"use strict";n.d(r,{Z:function(){return I}});var t=n(16295),a=n(32324),i=n(81500),s=n(35106),o=n(70316),c=n(65951),u=n(41060),l=n(38762),f=n(28057),d=n(34519),h=n(11379),m=n(9049);function v(e){return(0,m.ZP)("MuiCircularProgress",e)}(0,h.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var k=n(94655);function p(){let e=(0,t._)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"]);return p=function(){return e},e}function P(){let e=(0,t._)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"]);return P=function(){return e},e}function g(){let e=(0,t._)(["\n animation: "," 1.4s linear infinite;\n "]);return g=function(){return e},e}function x(){let e=(0,t._)(["\n animation: "," 1.4s ease-in-out infinite;\n "]);return x=function(){return e},e}let Z=["className","color","disableShrink","size","style","thickness","value","variant"],y=e=>e,S,b,_,C,R=(0,u.F4)(S||(S=y(p()))),M=(0,u.F4)(b||(b=y(P()))),w=e=>{let{classes:r,variant:n,color:t,disableShrink:a}=e,i={root:["root",n,"color".concat((0,l.Z)(t))],svg:["svg"],circle:["circle","circle".concat((0,l.Z)(n)),a&&"circleDisableShrink"]};return(0,c.Z)(i,v,r)},D=(0,d.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,r)=>{let{ownerState:n}=e;return[r.root,r[n.variant],r["color".concat((0,l.Z)(n.color))]]}})(e=>{let{ownerState:r,theme:n}=e;return(0,i.Z)({display:"inline-block"},"determinate"===r.variant&&{transition:n.transitions.create("transform")},"inherit"!==r.color&&{color:(n.vars||n).palette[r.color].main})},e=>{let{ownerState:r}=e;return"indeterminate"===r.variant&&(0,u.iv)(_||(_=y(g(),0)),R)}),N=(0,d.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,r)=>r.svg})({display:"block"}),E=(0,d.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,r)=>{let{ownerState:n}=e;return[r.circle,r["circle".concat((0,l.Z)(n.variant))],n.disableShrink&&r.circleDisableShrink]}})(e=>{let{ownerState:r,theme:n}=e;return(0,i.Z)({stroke:"currentColor"},"determinate"===r.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===r.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})},e=>{let{ownerState:r}=e;return"indeterminate"===r.variant&&!r.disableShrink&&(0,u.iv)(C||(C=y(x(),0)),M)});var I=s.forwardRef(function(e,r){let n=(0,f.i)({props:e,name:"MuiCircularProgress"}),{className:t,color:s="primary",disableShrink:c=!1,size:u=40,style:l,thickness:d=3.6,value:h=0,variant:m="indeterminate"}=n,v=(0,a.Z)(n,Z),p=(0,i.Z)({},n,{color:s,disableShrink:c,size:u,thickness:d,value:h,variant:m}),P=w(p),g={},x={},y={};if("determinate"===m){let e=2*Math.PI*((44-d)/2);g.strokeDasharray=e.toFixed(3),y["aria-valuenow"]=Math.round(h),g.strokeDashoffset="".concat(((100-h)/100*e).toFixed(3),"px"),x.transform="rotate(-90deg)"}return(0,k.jsx)(D,(0,i.Z)({className:(0,o.Z)(P.root,t),style:(0,i.Z)({width:u,height:u},x,l),ownerState:p,ref:r,role:"progressbar"},y,v,{children:(0,k.jsx)(N,{className:P.svg,ownerState:p,viewBox:"".concat(22," ").concat(22," ").concat(44," ").concat(44),children:(0,k.jsx)(E,{className:P.circle,style:g,ownerState:p,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d})})}))})},74228:function(e,r,n){"use strict";var t=n(73310);n.o(t,"useParams")&&n.d(r,{useParams:function(){return t.useParams}}),n.o(t,"usePathname")&&n.d(r,{usePathname:function(){return t.usePathname}}),n.o(t,"useRouter")&&n.d(r,{useRouter:function(){return t.useRouter}}),n.o(t,"useSearchParams")&&n.d(r,{useSearchParams:function(){return t.useSearchParams}}),n.o(t,"useServerInsertedHTML")&&n.d(r,{useServerInsertedHTML:function(){return t.useServerInsertedHTML}})},26854:function(e,r,n){"use strict";n.r(r),n.d(r,{default:function(){return u}});var t=n(94655),a=n(35106),i=n(74228),s=n(7281),o=n(93017),c=n(6986);function u(){let e=(0,i.useRouter)(),{data:r,isPending:n}=(0,c.kP)();return(0,a.useEffect)(()=>{n||((null==r?void 0:r.user)?e.push("/dashboard"):e.push("/login"))},[r,n,e]),(0,t.jsx)(s.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh"},children:(0,t.jsx)(o.Z,{})})}},6986:function(e,r,n){"use strict";n.d(r,{kP:function(){return u},w7:function(){return o},y1:function(){return c},zB:function(){return s}});var t=n(77054),a=n(61648),i=n(35016);let{signIn:s,signOut:o,signUp:c,useSession:u}=(0,t.X)({baseURL:i.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,a.zB)()]})}},function(e){e.O(0,[6812,7220,2542,3669,2757,1744],function(){return e(e.s=54985)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4966],{24100:function(e,r,t){Promise.resolve().then(t.bind(t,85795))},628:function(e,r,t){"use strict";t.d(r,{Z:function(){return Z}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(69899),c=t(11379),h=t(9049);function x(e){return(0,h.ZP)("MuiCard",e)}(0,c.Z)("MuiCard",["root"]);var m=t(94655);let p=["className","raised"],f=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},x,r)},g=(0,o.ZP)(u.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({overflow:"hidden"}));var Z=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCard"}),{className:s,raised:l=!1}=t,o=(0,i.Z)(t,p),u=(0,n.Z)({},t,{raised:l}),c=f(u);return(0,m.jsx)(g,(0,n.Z)({className:(0,a.Z)(c.root,s),elevation:l?8:void 0,ref:r,ownerState:u},o))})},41565:function(e,r,t){"use strict";t.d(r,{Z:function(){return g}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(11379),c=t(9049);function h(e){return(0,c.ZP)("MuiCardContent",e)}(0,u.Z)("MuiCardContent",["root"]);var x=t(94655);let m=["className","component"],p=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},h,r)},f=(0,o.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}}));var g=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCardContent"}),{className:s,component:l="div"}=t,o=(0,i.Z)(t,m),u=(0,n.Z)({},t,{component:l}),c=p(u);return(0,x.jsx)(f,(0,n.Z)({as:l,className:(0,a.Z)(c.root,s),ownerState:u,ref:r},o))})},85795:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return x}});var n=t(94655),i=t(74228),s=t(67337),a=t(7281),l=t(628),o=t(41565),d=t(31317),u=t(41261),c=t(85480),h=t(46725);function x(){let e=(0,i.useRouter)();return(0,n.jsx)(s.Z,{maxWidth:"sm",children:(0,n.jsx)(a.Z,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",py:4},children:(0,n.jsx)(l.Z,{sx:{width:"100%",maxWidth:500},children:(0,n.jsxs)(o.Z,{sx:{p:4},children:[(0,n.jsx)(d.Z,{variant:"h4",component:"h1",gutterBottom:!0,sx:{fontWeight:600,textAlign:"center",mb:3},children:"Create Account"}),(0,n.jsx)(d.Z,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",mb:4},children:"Sign up to start managing Minecraft servers"}),(0,n.jsx)(c.WS,{onSuccess:()=>{e.push("/dashboard")}}),(0,n.jsx)(a.Z,{sx:{mt:3,textAlign:"center"},children:(0,n.jsxs)(d.Z,{variant:"body2",color:"text.secondary",children:["Already have an account?"," ",(0,n.jsx)(u.Z,{component:h.default,href:"/login",underline:"hover",children:"Sign in"})]})})]})})})})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return m},WS:function(){return p},Ie:function(){return W}});var n=t(94655),i=t(35106),s=t(7281),a=t(81071),l=t(97436),o=t(52082),d=t(79983),u=t(30417),c=t(36848),h=t(554),x=t(6986);function m(e){let{onSuccess:r}=e,[t,m]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(!1),[v,j]=(0,i.useState)({}),[y,b]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),S=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),j(e),0===Object.keys(e).length},P=async e=>{if(e.preventDefault(),b(null),S()){C(!0);try{let e=await x.zB.email({email:t,password:p});if(e.error){b(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){b("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:P,sx:{display:"flex",flexDirection:"column",gap:2},children:[y&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>b(null),children:y}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>m(e.target.value),error:!!v.email,helperText:v.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!v.password,helperText:v.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!g)},edge:"end",children:g?(0,n.jsx)(c.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,m]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(""),[v,j]=(0,i.useState)(""),[y,b]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[S,P]=(0,i.useState)({}),[W,k]=(0,i.useState)(null),[A,I]=(0,i.useState)(!1),R=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",v?g!==v&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",P(e),0===Object.keys(e).length},q=async e=>{if(e.preventDefault(),k(null),R()){I(!0);try{let e=await x.y1.email({email:p,password:g,name:t});if(e.error){k(e.error.message||"Registration failed"),I(!1);return}r&&r()}catch(e){k("An unexpected error occurred. Please try again."),I(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:q,sx:{display:"flex",flexDirection:"column",gap:2},children:[W&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>k(null),children:W}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>m(e.target.value),error:!!S.name,helperText:S.name,disabled:A,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!S.email,helperText:S.email,disabled:A,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:y?"text":"password",value:g,onChange:e=>Z(e.target.value),error:!!S.password,helperText:S.password,disabled:A,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!y)},edge:"end",children:y?(0,n.jsx)(c.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:v,onChange:e=>j(e.target.value),error:!!S.confirmPassword,helperText:S.confirmPassword,disabled:A,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(c.Z,{}):(0,n.jsx)(h.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:A,fullWidth:!0,size:"large",children:A?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),Z=t(86702),v=t(35694),j=t(31317),y=t(25333),b=t(69123),w=t(7178),C=t(17820),S=t(73424),P=t(78319);function W(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,x.kP)(),[a,l]=(0,i.useState)(null),o=()=>{l(null)},c=async()=>{o(),await (0,x.w7)(),e.push("/login")};if(t)return(0,n.jsx)(s.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(u.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:h}=r,m=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(h.name,h.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(Z.Z,{sx:{bgcolor:"primary.main"},children:m})}),(0,n.jsxs)(v.Z,{anchorEl:a,open:!!a,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(s.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(j.Z,{variant:"subtitle1",fontWeight:"600",children:h.name||"User"}),(0,n.jsx)(j.Z,{variant:"body2",color:"text.secondary",children:h.email}),"admin"===h.role&&(0,n.jsx)(y.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(b.Z,{}),(0,n.jsxs)(w.Z,{onClick:c,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(S.Z,{children:"Logout"})]})]})]})}},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return d},w7:function(){return l},y1:function(){return o},zB:function(){return a}});var n=t(77054),i=t(61648),s=t(35016);let{signIn:a,signOut:l,signUp:o,useSession:d}=(0,n.X)({baseURL:s.env.NEXT_PUBLIC_BETTER_AUTH_URL||"http://localhost:5000",plugins:[(0,i.zB)()]})}},function(e){e.O(0,[6812,7220,8006,7294,8696,1071,55,3543,2149,2542,8322,3669,2757,1744],function(){return e(e.s=24100)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4966],{24100:function(e,r,t){Promise.resolve().then(t.bind(t,85795))},628:function(e,r,t){"use strict";t.d(r,{Z:function(){return Z}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(69899),c=t(11379),x=t(9049);function m(e){return(0,x.ZP)("MuiCard",e)}(0,c.Z)("MuiCard",["root"]);var h=t(94655);let p=["className","raised"],f=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},m,r)},g=(0,o.ZP)(u.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({overflow:"hidden"}));var Z=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCard"}),{className:s,raised:l=!1}=t,o=(0,i.Z)(t,p),u=(0,n.Z)({},t,{raised:l}),c=f(u);return(0,h.jsx)(g,(0,n.Z)({className:(0,a.Z)(c.root,s),elevation:l?8:void 0,ref:r,ownerState:u},o))})},41565:function(e,r,t){"use strict";t.d(r,{Z:function(){return g}});var n=t(81500),i=t(32324),s=t(35106),a=t(70316),l=t(65951),o=t(34519),d=t(28057),u=t(11379),c=t(9049);function x(e){return(0,c.ZP)("MuiCardContent",e)}(0,u.Z)("MuiCardContent",["root"]);var m=t(94655);let h=["className","component"],p=e=>{let{classes:r}=e;return(0,l.Z)({root:["root"]},x,r)},f=(0,o.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}}));var g=s.forwardRef(function(e,r){let t=(0,d.i)({props:e,name:"MuiCardContent"}),{className:s,component:l="div"}=t,o=(0,i.Z)(t,h),u=(0,n.Z)({},t,{component:l}),c=p(u);return(0,m.jsx)(f,(0,n.Z)({as:l,className:(0,a.Z)(c.root,s),ownerState:u,ref:r},o))})},85795:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return m}});var n=t(94655),i=t(74228),s=t(67337),a=t(7281),l=t(628),o=t(41565),d=t(31317),u=t(41261),c=t(85480),x=t(46725);function m(){let e=(0,i.useRouter)();return(0,n.jsx)(s.Z,{maxWidth:"sm",children:(0,n.jsx)(a.Z,{sx:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",py:4},children:(0,n.jsx)(l.Z,{sx:{width:"100%",maxWidth:500},children:(0,n.jsxs)(o.Z,{sx:{p:4},children:[(0,n.jsx)(d.Z,{variant:"h4",component:"h1",gutterBottom:!0,sx:{fontWeight:600,textAlign:"center",mb:3},children:"Create Account"}),(0,n.jsx)(d.Z,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",mb:4},children:"Sign up to start managing Minecraft servers"}),(0,n.jsx)(c.WS,{onSuccess:()=>{e.push("/dashboard")}}),(0,n.jsx)(a.Z,{sx:{mt:3,textAlign:"center"},children:(0,n.jsxs)(d.Z,{variant:"body2",color:"text.secondary",children:["Already have an account?"," ",(0,n.jsx)(u.Z,{component:x.default,href:"/login",underline:"hover",children:"Sign in"})]})})]})})})})}},85480:function(e,r,t){"use strict";t.d(r,{U0:function(){return h},WS:function(){return p},Ie:function(){return W}});var n=t(94655),i=t(35106),s=t(7281),a=t(81071),l=t(97436),o=t(52082),d=t(79983),u=t(30417),c=t(36848),x=t(554),m=t(6986);function h(e){let{onSuccess:r}=e,[t,h]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(!1),[v,j]=(0,i.useState)({}),[y,b]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),S=()=>{let e={};return t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||(e.email="Invalid email address"):e.email="Email is required",p||(e.password="Password is required"),j(e),0===Object.keys(e).length},P=async e=>{if(e.preventDefault(),b(null),S()){C(!0);try{let e=await m.zB.email({email:t,password:p});if(e.error){b(e.error.message||"Invalid credentials"),C(!1);return}r&&r()}catch(e){b("An unexpected error occurred. Please try again."),C(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:P,sx:{display:"flex",flexDirection:"column",gap:2},children:[y&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>b(null),children:y}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:t,onChange:e=>h(e.target.value),error:!!v.email,helperText:v.email,disabled:w,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:g?"text":"password",value:p,onChange:e=>f(e.target.value),error:!!v.password,helperText:v.password,disabled:w,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{Z(!g)},edge:"end",children:g?(0,n.jsx)(c.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:w,fullWidth:!0,size:"large",children:w?"Signing in...":"Sign In"})]})}function p(e){let{onSuccess:r}=e,[t,h]=(0,i.useState)(""),[p,f]=(0,i.useState)(""),[g,Z]=(0,i.useState)(""),[v,j]=(0,i.useState)(""),[y,b]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),[S,P]=(0,i.useState)({}),[W,k]=(0,i.useState)(null),[A,I]=(0,i.useState)(!1),R=()=>{let e={};return t||(e.name="Name is required"),p?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(e.email="Invalid email address"):e.email="Email is required",g?g.length<8&&(e.password="Password must be at least 8 characters"):e.password="Password is required",v?g!==v&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password",P(e),0===Object.keys(e).length},q=async e=>{if(e.preventDefault(),k(null),R()){I(!0);try{let e=await m.y1.email({email:p,password:g,name:t});if(e.error){k(e.error.message||"Registration failed"),I(!1);return}r&&r()}catch(e){k("An unexpected error occurred. Please try again."),I(!1)}}};return(0,n.jsxs)(s.Z,{component:"form",onSubmit:q,sx:{display:"flex",flexDirection:"column",gap:2},children:[W&&(0,n.jsx)(a.Z,{severity:"error",onClose:()=>k(null),children:W}),(0,n.jsx)(l.Z,{label:"Name",type:"text",value:t,onChange:e=>h(e.target.value),error:!!S.name,helperText:S.name,disabled:A,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Email",type:"email",value:p,onChange:e=>f(e.target.value),error:!!S.email,helperText:S.email,disabled:A,fullWidth:!0,required:!0}),(0,n.jsx)(l.Z,{label:"Password",type:y?"text":"password",value:g,onChange:e=>Z(e.target.value),error:!!S.password,helperText:S.password,disabled:A,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{b(!y)},edge:"end",children:y?(0,n.jsx)(c.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(l.Z,{label:"Confirm Password",type:w?"text":"password",value:v,onChange:e=>j(e.target.value),error:!!S.confirmPassword,helperText:S.confirmPassword,disabled:A,fullWidth:!0,required:!0,InputProps:{endAdornment:(0,n.jsx)(o.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",onClick:()=>{C(!w)},edge:"end",children:w?(0,n.jsx)(c.Z,{}):(0,n.jsx)(x.Z,{})})})}}),(0,n.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:A,fullWidth:!0,size:"large",children:A?"Creating account...":"Sign Up"})]})}var f=t(74228),g=t(93017),Z=t(86702),v=t(35694),j=t(31317),y=t(25333),b=t(69123),w=t(7178),C=t(17820),S=t(73424),P=t(78319);function W(){let e=(0,f.useRouter)(),{data:r,isPending:t}=(0,m.kP)(),[a,l]=(0,i.useState)(null),o=()=>{l(null)},c=async()=>{o(),await (0,m.w7)(),e.push("/login")};if(t)return(0,n.jsx)(s.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(g.Z,{size:24})});if(!(null==r?void 0:r.user))return(0,n.jsx)(u.Z,{variant:"contained",color:"primary",onClick:()=>{e.push("/login")},children:"Sign In"});let{user:x}=r,h=((e,r)=>{if(e){let r=e.split(" ");return r.length>=2?"".concat(r[0][0]).concat(r[1][0]).toUpperCase():e.substring(0,2).toUpperCase()}return r?r[0].toUpperCase():"?"})(x.name,x.email);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Z,{onClick:e=>{l(e.currentTarget)},"aria-label":"user menu",children:(0,n.jsx)(Z.Z,{sx:{bgcolor:"primary.main"},children:h})}),(0,n.jsxs)(v.Z,{anchorEl:a,open:!!a,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{mt:1},children:[(0,n.jsxs)(s.Z,{sx:{px:2,py:1.5,minWidth:200},children:[(0,n.jsx)(j.Z,{variant:"subtitle1",fontWeight:"600",children:x.name||"User"}),(0,n.jsx)(j.Z,{variant:"body2",color:"text.secondary",children:x.email}),"admin"===x.role&&(0,n.jsx)(y.Z,{label:"Admin",size:"small",color:"primary",sx:{mt:1}})]}),(0,n.jsx)(b.Z,{}),(0,n.jsxs)(w.Z,{onClick:c,children:[(0,n.jsx)(C.Z,{children:(0,n.jsx)(P.Z,{fontSize:"small"})}),(0,n.jsx)(S.Z,{children:"Logout"})]})]})]})}},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return d},w7:function(){return l},y1:function(){return o},zB:function(){return a}});var n=t(77054),i=t(61648),s=t(35016);let{signIn:a,signOut:l,signUp:o,useSession:d}=(0,n.X)({baseURL:s.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,i.zB)()]})}},function(e){e.O(0,[6812,7220,8006,7294,8696,1071,55,3543,2149,2542,8322,3669,2757,1744],function(){return e(e.s=24100)}),_N_E=e.O()}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft-docker/mcctl-console",
3
- "version": "1.14.0",
3
+ "version": "1.15.1",
4
4
  "description": "Web management console for Docker Minecraft servers",
5
5
  "bin": {
6
6
  "mcctl-console": "bin/start.js"
@@ -47,7 +47,7 @@
47
47
  "dependencies": {
48
48
  "@emotion/react": "^11.13.5",
49
49
  "@emotion/styled": "^11.13.5",
50
- "@minecraft-docker/shared": "^1.14.0",
50
+ "@minecraft-docker/shared": "^1.15.1",
51
51
  "@mui/icons-material": "^5.17.1",
52
52
  "@mui/material": "^5.17.1",
53
53
  "@mui/material-nextjs": "^5.17.1",
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{54985:function(e,r,t){Promise.resolve().then(t.bind(t,26854))},93017:function(e,r,t){"use strict";t.d(r,{Z:function(){return I}});var n=t(16295),a=t(32324),i=t(81500),s=t(35106),o=t(70316),c=t(65951),u=t(41060),l=t(38762),f=t(28057),d=t(34519),h=t(11379),m=t(9049);function v(e){return(0,m.ZP)("MuiCircularProgress",e)}(0,h.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var k=t(94655);function p(){let e=(0,n._)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"]);return p=function(){return e},e}function P(){let e=(0,n._)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"]);return P=function(){return e},e}function g(){let e=(0,n._)(["\n animation: "," 1.4s linear infinite;\n "]);return g=function(){return e},e}function x(){let e=(0,n._)(["\n animation: "," 1.4s ease-in-out infinite;\n "]);return x=function(){return e},e}let Z=["className","color","disableShrink","size","style","thickness","value","variant"],y=e=>e,S,b,_,C,R=(0,u.F4)(S||(S=y(p()))),M=(0,u.F4)(b||(b=y(P()))),w=e=>{let{classes:r,variant:t,color:n,disableShrink:a}=e,i={root:["root",t,"color".concat((0,l.Z)(n))],svg:["svg"],circle:["circle","circle".concat((0,l.Z)(t)),a&&"circleDisableShrink"]};return(0,c.Z)(i,v,r)},D=(0,d.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,r)=>{let{ownerState:t}=e;return[r.root,r[t.variant],r["color".concat((0,l.Z)(t.color))]]}})(e=>{let{ownerState:r,theme:t}=e;return(0,i.Z)({display:"inline-block"},"determinate"===r.variant&&{transition:t.transitions.create("transform")},"inherit"!==r.color&&{color:(t.vars||t).palette[r.color].main})},e=>{let{ownerState:r}=e;return"indeterminate"===r.variant&&(0,u.iv)(_||(_=y(g(),0)),R)}),N=(0,d.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,r)=>r.svg})({display:"block"}),E=(0,d.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,r)=>{let{ownerState:t}=e;return[r.circle,r["circle".concat((0,l.Z)(t.variant))],t.disableShrink&&r.circleDisableShrink]}})(e=>{let{ownerState:r,theme:t}=e;return(0,i.Z)({stroke:"currentColor"},"determinate"===r.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===r.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})},e=>{let{ownerState:r}=e;return"indeterminate"===r.variant&&!r.disableShrink&&(0,u.iv)(C||(C=y(x(),0)),M)});var I=s.forwardRef(function(e,r){let t=(0,f.i)({props:e,name:"MuiCircularProgress"}),{className:n,color:s="primary",disableShrink:c=!1,size:u=40,style:l,thickness:d=3.6,value:h=0,variant:m="indeterminate"}=t,v=(0,a.Z)(t,Z),p=(0,i.Z)({},t,{color:s,disableShrink:c,size:u,thickness:d,value:h,variant:m}),P=w(p),g={},x={},y={};if("determinate"===m){let e=2*Math.PI*((44-d)/2);g.strokeDasharray=e.toFixed(3),y["aria-valuenow"]=Math.round(h),g.strokeDashoffset="".concat(((100-h)/100*e).toFixed(3),"px"),x.transform="rotate(-90deg)"}return(0,k.jsx)(D,(0,i.Z)({className:(0,o.Z)(P.root,n),style:(0,i.Z)({width:u,height:u},x,l),ownerState:p,ref:r,role:"progressbar"},y,v,{children:(0,k.jsx)(N,{className:P.svg,ownerState:p,viewBox:"".concat(22," ").concat(22," ").concat(44," ").concat(44),children:(0,k.jsx)(E,{className:P.circle,style:g,ownerState:p,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d})})}))})},74228:function(e,r,t){"use strict";var n=t(73310);t.o(n,"useParams")&&t.d(r,{useParams:function(){return n.useParams}}),t.o(n,"usePathname")&&t.d(r,{usePathname:function(){return n.usePathname}}),t.o(n,"useRouter")&&t.d(r,{useRouter:function(){return n.useRouter}}),t.o(n,"useSearchParams")&&t.d(r,{useSearchParams:function(){return n.useSearchParams}}),t.o(n,"useServerInsertedHTML")&&t.d(r,{useServerInsertedHTML:function(){return n.useServerInsertedHTML}})},26854:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return u}});var n=t(94655),a=t(35106),i=t(74228),s=t(7281),o=t(93017),c=t(6986);function u(){let e=(0,i.useRouter)(),{data:r,isPending:t}=(0,c.kP)();return(0,a.useEffect)(()=>{t||((null==r?void 0:r.user)?e.push("/dashboard"):e.push("/login"))},[r,t,e]),(0,n.jsx)(s.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh"},children:(0,n.jsx)(o.Z,{})})}},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return u},w7:function(){return o},y1:function(){return c},zB:function(){return s}});var n=t(77054),a=t(61648),i=t(35016);let{signIn:s,signOut:o,signUp:c,useSession:u}=(0,n.X)({baseURL:i.env.NEXT_PUBLIC_BETTER_AUTH_URL||"http://localhost:5000",plugins:[(0,a.zB)()]})}},function(e){e.O(0,[6812,7220,2542,3669,2757,1744],function(){return e(e.s=54985)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{54985:function(e,r,t){Promise.resolve().then(t.bind(t,26854))},93017:function(e,r,t){"use strict";t.d(r,{Z:function(){return I}});var n=t(16295),a=t(32324),i=t(81500),s=t(35106),o=t(70316),c=t(65951),u=t(41060),l=t(38762),f=t(28057),d=t(34519),h=t(11379),m=t(9049);function v(e){return(0,m.ZP)("MuiCircularProgress",e)}(0,h.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var k=t(94655);function p(){let e=(0,n._)(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"]);return p=function(){return e},e}function P(){let e=(0,n._)(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"]);return P=function(){return e},e}function g(){let e=(0,n._)(["\n animation: "," 1.4s linear infinite;\n "]);return g=function(){return e},e}function x(){let e=(0,n._)(["\n animation: "," 1.4s ease-in-out infinite;\n "]);return x=function(){return e},e}let Z=["className","color","disableShrink","size","style","thickness","value","variant"],y=e=>e,S,b,_,C,R=(0,u.F4)(S||(S=y(p()))),M=(0,u.F4)(b||(b=y(P()))),w=e=>{let{classes:r,variant:t,color:n,disableShrink:a}=e,i={root:["root",t,"color".concat((0,l.Z)(n))],svg:["svg"],circle:["circle","circle".concat((0,l.Z)(t)),a&&"circleDisableShrink"]};return(0,c.Z)(i,v,r)},D=(0,d.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,r)=>{let{ownerState:t}=e;return[r.root,r[t.variant],r["color".concat((0,l.Z)(t.color))]]}})(e=>{let{ownerState:r,theme:t}=e;return(0,i.Z)({display:"inline-block"},"determinate"===r.variant&&{transition:t.transitions.create("transform")},"inherit"!==r.color&&{color:(t.vars||t).palette[r.color].main})},e=>{let{ownerState:r}=e;return"indeterminate"===r.variant&&(0,u.iv)(_||(_=y(g(),0)),R)}),N=(0,d.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,r)=>r.svg})({display:"block"}),E=(0,d.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,r)=>{let{ownerState:t}=e;return[r.circle,r["circle".concat((0,l.Z)(t.variant))],t.disableShrink&&r.circleDisableShrink]}})(e=>{let{ownerState:r,theme:t}=e;return(0,i.Z)({stroke:"currentColor"},"determinate"===r.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===r.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})},e=>{let{ownerState:r}=e;return"indeterminate"===r.variant&&!r.disableShrink&&(0,u.iv)(C||(C=y(x(),0)),M)});var I=s.forwardRef(function(e,r){let t=(0,f.i)({props:e,name:"MuiCircularProgress"}),{className:n,color:s="primary",disableShrink:c=!1,size:u=40,style:l,thickness:d=3.6,value:h=0,variant:m="indeterminate"}=t,v=(0,a.Z)(t,Z),p=(0,i.Z)({},t,{color:s,disableShrink:c,size:u,thickness:d,value:h,variant:m}),P=w(p),g={},x={},y={};if("determinate"===m){let e=2*Math.PI*((44-d)/2);g.strokeDasharray=e.toFixed(3),y["aria-valuenow"]=Math.round(h),g.strokeDashoffset="".concat(((100-h)/100*e).toFixed(3),"px"),x.transform="rotate(-90deg)"}return(0,k.jsx)(D,(0,i.Z)({className:(0,o.Z)(P.root,n),style:(0,i.Z)({width:u,height:u},x,l),ownerState:p,ref:r,role:"progressbar"},y,v,{children:(0,k.jsx)(N,{className:P.svg,ownerState:p,viewBox:"".concat(22," ").concat(22," ").concat(44," ").concat(44),children:(0,k.jsx)(E,{className:P.circle,style:g,ownerState:p,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d})})}))})},74228:function(e,r,t){"use strict";var n=t(73310);t.o(n,"useParams")&&t.d(r,{useParams:function(){return n.useParams}}),t.o(n,"usePathname")&&t.d(r,{usePathname:function(){return n.usePathname}}),t.o(n,"useRouter")&&t.d(r,{useRouter:function(){return n.useRouter}}),t.o(n,"useSearchParams")&&t.d(r,{useSearchParams:function(){return n.useSearchParams}}),t.o(n,"useServerInsertedHTML")&&t.d(r,{useServerInsertedHTML:function(){return n.useServerInsertedHTML}})},26854:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return u}});var n=t(94655),a=t(35106),i=t(74228),s=t(7281),o=t(93017),c=t(6986);function u(){let e=(0,i.useRouter)(),{data:r,isPending:t}=(0,c.kP)();return(0,a.useEffect)(()=>{t||((null==r?void 0:r.user)?e.push("/dashboard"):e.push("/login"))},[r,t,e]),(0,n.jsx)(s.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh"},children:(0,n.jsx)(o.Z,{})})}},6986:function(e,r,t){"use strict";t.d(r,{kP:function(){return u},w7:function(){return o},y1:function(){return c},zB:function(){return s}});var n=t(77054),a=t(61648),i=t(35016);let{signIn:s,signOut:o,signUp:c,useSession:u}=(0,n.X)({baseURL:i.env.NEXT_PUBLIC_BETTER_AUTH_URL||"http://localhost:5000",plugins:[(0,a.zB)()]})}},function(e){e.O(0,[6812,7220,2542,3669,2757,1744],function(){return e(e.s=54985)}),_N_E=e.O()}]);