@minecraft-docker/mcctl-console 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/BUILD_ID +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/app-build-manifest.json +84 -72
- package/.next/standalone/platform/services/mcctl-console/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/build-manifest.json +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/prerender-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page.js.nft.json +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/admin/users/page_client-reference-manifest.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/audit-logs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/backups/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/players/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js +1 -51
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/routing/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/console/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/servers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/(main)/worlds/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/audit-logs.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/backups.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/dashboard.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/index.rsc +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/login.rsc +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/players.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/routing.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/servers.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/settings.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page.js.nft.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/signup.rsc +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/worlds.rsc +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app-paths-manifest.json +15 -15
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1080.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/1314.js +54 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/4533.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/5019.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/5068.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/701.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8243.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8847.js +74 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8913.js +51 -0
- package/.next/standalone/platform/services/mcctl-console/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.js +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/next-font-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/404.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/pages/500.html +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{1189-60aed59c0e82a63d.js → 1189-9b2b752dc97065ac.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/1854-71dbad60b363e57e.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/2777-90cc701b41e837af.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4668-f487c5c564e045d6.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/521-a5b59e2a19c8dd4f.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5511-7a419d84918a8d64.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/{6479-82b21daf8e380c4d.js → 6479-f31fbc0f2cf7ddd0.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7359-45760f0e0e93f86b.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8558-4356df5e91ec7f4c.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/892-a0f20ea0df618c15.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/admin/layout-a902566886bf412c.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/{admin/users/page-f45f3cd30725a718.js → (main)/admin/users/page-48f4e3bdef6c2202.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/audit-logs/{page-b879c927081e59a2.js → page-21b37416096d3cfc.js} +1 -1
- package/.next/{static/chunks/app/(main)/backups/page-7a59c9269da2d63e.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-a8606e93b4994f33.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/dashboard/{page-d2d8cd0c7a0a54ec.js → page-fe3321721ddfe2a7.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-5bbed669a03279a3.js +1 -0
- package/.next/{static/chunks/app/(main)/routing/page-909690ecbe76f31c.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/routing/page-ee0b47f2cc2bc235.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/[name]/{page-96518534b90deb1c.js → page-b8d4a08a748e882d.js} +1 -1
- package/.next/{static/chunks/app/(main)/servers/page-c35bb5a99e6ff107.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-e47f9c34ab4e890d.js} +1 -1
- package/.next/{static/chunks/app/(main)/settings/page-a805f639e14a10b0.js → standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-dac4b25dde7b0719.js} +1 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-7e2bc35fda11d7c4.js +1 -0
- package/.next/standalone/platform/services/mcctl-console/package.json +1 -1
- package/.next/static/chunks/{1189-60aed59c0e82a63d.js → 1189-9b2b752dc97065ac.js} +1 -1
- package/.next/static/chunks/1854-71dbad60b363e57e.js +1 -0
- package/.next/static/chunks/2777-90cc701b41e837af.js +1 -0
- package/.next/static/chunks/4668-f487c5c564e045d6.js +1 -0
- package/.next/static/chunks/521-a5b59e2a19c8dd4f.js +1 -0
- package/.next/static/chunks/5511-7a419d84918a8d64.js +1 -0
- package/.next/static/chunks/{6479-82b21daf8e380c4d.js → 6479-f31fbc0f2cf7ddd0.js} +1 -1
- package/.next/static/chunks/7359-45760f0e0e93f86b.js +1 -0
- package/.next/static/chunks/8558-4356df5e91ec7f4c.js +1 -0
- package/.next/static/chunks/892-a0f20ea0df618c15.js +1 -0
- package/.next/static/chunks/app/(main)/admin/layout-a902566886bf412c.js +1 -0
- package/.next/static/chunks/app/{admin/users/page-f45f3cd30725a718.js → (main)/admin/users/page-48f4e3bdef6c2202.js} +1 -1
- package/.next/static/chunks/app/(main)/audit-logs/{page-b879c927081e59a2.js → page-21b37416096d3cfc.js} +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/backups/page-7a59c9269da2d63e.js → static/chunks/app/(main)/backups/page-a8606e93b4994f33.js} +1 -1
- package/.next/static/chunks/app/(main)/dashboard/{page-d2d8cd0c7a0a54ec.js → page-fe3321721ddfe2a7.js} +1 -1
- package/.next/static/chunks/app/(main)/players/page-5bbed669a03279a3.js +1 -0
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/routing/page-909690ecbe76f31c.js → static/chunks/app/(main)/routing/page-ee0b47f2cc2bc235.js} +1 -1
- package/.next/static/chunks/app/(main)/servers/[name]/{page-96518534b90deb1c.js → page-b8d4a08a748e882d.js} +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/servers/page-c35bb5a99e6ff107.js → static/chunks/app/(main)/servers/page-e47f9c34ab4e890d.js} +1 -1
- package/.next/{standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/settings/page-a805f639e14a10b0.js → static/chunks/app/(main)/settings/page-dac4b25dde7b0719.js} +1 -1
- package/.next/static/chunks/app/(main)/worlds/page-7e2bc35fda11d7c4.js +1 -0
- package/package.json +2 -2
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/admin/users/page.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/admin/users/page.js.nft.json +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/admin/users/page_client-reference-manifest.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/admin/users.html +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/admin/users.meta +0 -5
- package/.next/standalone/platform/services/mcctl-console/.next/server/app/admin/users.rsc +0 -12
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/3029.js +0 -51
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/3048.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/6231.js +0 -74
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/7057.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/7453.js +0 -54
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/8165.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/server/chunks/9250.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/190-9ecdd3c2ad7fadef.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/4597-a66229d37b05fea9.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/5386-a568e84580b1d208.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/6571-0d9e629a91d9f630.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7073-46594e6380fdda11.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/7782-0f287c9ab0566879.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/787-91c6946656342fe4.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/8625-b235421f69a178fb.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/9810-e8bf0b092d80a553.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/players/page-724151791dd69b93.js +0 -1
- package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/app/(main)/worlds/page-704a3dafb5b8ec15.js +0 -1
- package/.next/static/chunks/190-9ecdd3c2ad7fadef.js +0 -1
- package/.next/static/chunks/4597-a66229d37b05fea9.js +0 -1
- package/.next/static/chunks/5386-a568e84580b1d208.js +0 -1
- package/.next/static/chunks/6571-0d9e629a91d9f630.js +0 -1
- package/.next/static/chunks/7073-46594e6380fdda11.js +0 -1
- package/.next/static/chunks/7782-0f287c9ab0566879.js +0 -1
- package/.next/static/chunks/787-91c6946656342fe4.js +0 -1
- package/.next/static/chunks/8625-b235421f69a178fb.js +0 -1
- package/.next/static/chunks/9810-e8bf0b092d80a553.js +0 -1
- package/.next/static/chunks/app/(main)/players/page-724151791dd69b93.js +0 -1
- package/.next/static/chunks/app/(main)/worlds/page-704a3dafb5b8ec15.js +0 -1
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{lF2Ag_PdEMco5HscTAFVZ → qKkyAhVhtEF8ACV2o3pRc}/_buildManifest.js +0 -0
- /package/.next/standalone/platform/services/mcctl-console/.next/static/{lF2Ag_PdEMco5HscTAFVZ → qKkyAhVhtEF8ACV2o3pRc}/_ssgManifest.js +0 -0
- /package/.next/static/{lF2Ag_PdEMco5HscTAFVZ → qKkyAhVhtEF8ACV2o3pRc}/_buildManifest.js +0 -0
- /package/.next/static/{lF2Ag_PdEMco5HscTAFVZ → qKkyAhVhtEF8ACV2o3pRc}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6479],{69178:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m2 14H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"}),"Assignment")},46207:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},54617:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z"}),"ClearAll")},15761:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download")},43436:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error")},45354:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline")},84284:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess")},81960:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},78439:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord")},50880:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList")},89161:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown")},60236:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp")},30114:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person")},87716:function(t,e,n){n.d(e,{Z:function(){return C}});var r=n(32324),o=n(81500),i=n(35106),a=n(70316),l=n(92019),s=n(67485),c=n(65951),d=n(34519),u=n(28057),h=n(30035),p=n(56874),v=n(83855),f=n(38481),g=n(11379),m=n(9049);function Z(t){return(0,m.ZP)("MuiCollapse",t)}(0,g.Z)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var b=n(94655);let x=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],w=t=>{let{orientation:e,classes:n}=t;return(0,c.Z)({root:["root","".concat(e)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(e)],wrapperInner:["wrapperInner","".concat(e)]},Z,n)},R=(0,d.ZP)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.root,e[n.orientation],"entered"===n.state&&e.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&e.hidden]}})(t=>{let{theme:e,ownerState:n}=t;return(0,o.Z)({height:0,overflow:"hidden",transition:e.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:e.transitions.create("width")},"entered"===n.state&&(0,o.Z)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})}),P=(0,d.ZP)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})(t=>{let{ownerState:e}=t;return(0,o.Z)({display:"flex",width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})}),y=(0,d.ZP)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(t,e)=>e.wrapperInner})(t=>{let{ownerState:e}=t;return(0,o.Z)({width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})}),M=i.forwardRef(function(t,e){let n=(0,u.i)({props:t,name:"MuiCollapse"}),{addEndListener:c,children:d,className:g,collapsedSize:m="0px",component:Z,easing:M,in:C,onEnter:S,onEntered:j,onEntering:I,onExit:B,onExited:L,onExiting:z,orientation:k="vertical",style:T,timeout:A=h.x9.standard,TransitionComponent:H=l.ZP}=n,N=(0,r.Z)(n,x),E=(0,o.Z)({},n,{orientation:k,collapsedSize:m}),D=w(E),F=(0,v.Z)(),V=(0,s.Z)(),W=i.useRef(null),_=i.useRef(),X="number"==typeof m?"".concat(m,"px"):m,O="horizontal"===k,q=O?"width":"height",K=i.useRef(null),G=(0,f.Z)(e,K),U=t=>e=>{if(t){let n=K.current;void 0===e?t(n):t(n,e)}},J=()=>W.current?W.current[O?"clientWidth":"clientHeight"]:0,Q=U((t,e)=>{W.current&&O&&(W.current.style.position="absolute"),t.style[q]=X,S&&S(t,e)}),Y=U((t,e)=>{let n=J();W.current&&O&&(W.current.style.position="");let{duration:r,easing:o}=(0,p.C)({style:T,timeout:A,easing:M},{mode:"enter"});if("auto"===A){let e=F.transitions.getAutoHeightDuration(n);t.style.transitionDuration="".concat(e,"ms"),_.current=e}else t.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");t.style[q]="".concat(n,"px"),t.style.transitionTimingFunction=o,I&&I(t,e)}),$=U((t,e)=>{t.style[q]="auto",j&&j(t,e)}),tt=U(t=>{t.style[q]="".concat(J(),"px"),B&&B(t)}),te=U(L),tn=U(t=>{let e=J(),{duration:n,easing:r}=(0,p.C)({style:T,timeout:A,easing:M},{mode:"exit"});if("auto"===A){let n=F.transitions.getAutoHeightDuration(e);t.style.transitionDuration="".concat(n,"ms"),_.current=n}else t.style.transitionDuration="string"==typeof n?n:"".concat(n,"ms");t.style[q]=X,t.style.transitionTimingFunction=r,z&&z(t)});return(0,b.jsx)(H,(0,o.Z)({in:C,onEnter:Q,onEntered:$,onEntering:Y,onExit:tt,onExited:te,onExiting:tn,addEndListener:t=>{"auto"===A&&V.start(_.current||0,t),c&&c(K.current,t)},nodeRef:K,timeout:"auto"===A?null:A},N,{children:(t,e)=>(0,b.jsx)(R,(0,o.Z)({as:Z,className:(0,a.Z)(D.root,g,{entered:D.entered,exited:!C&&"0px"===X&&D.hidden}[t]),style:(0,o.Z)({[O?"minWidth":"minHeight"]:X},T),ref:G},e,{ownerState:(0,o.Z)({},E,{state:t}),children:(0,b.jsx)(P,{ownerState:(0,o.Z)({},E,{state:t}),className:D.wrapper,ref:W,children:(0,b.jsx)(y,{ownerState:(0,o.Z)({},E,{state:t}),className:D.wrapperInner,children:d})})}))}))});M.muiSupportAuto=!0;var C=M},69123:function(t,e,n){var r=n(32324),o=n(81500),i=n(35106),a=n(70316),l=n(65951),s=n(64577),c=n(34519),d=n(28057),u=n(16945),h=n(94655);let p=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],v=t=>{let{absolute:e,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:c}=t;return(0,l.Z)({root:["root",e&&"absolute",c,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},u.V,r)},f=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,"vertical"===n.orientation&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&"vertical"===n.orientation&&e.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&e.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&e.textAlignLeft]}})(t=>{let{theme:e,ownerState:n}=t;return(0,o.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:e.vars?"rgba(".concat(e.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(e.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})},t=>{let{ownerState:e}=t;return(0,o.Z)({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},t=>{let{theme:e,ownerState:n}=t;return(0,o.Z)({},n.children&&"vertical"!==n.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((e.vars||e).palette.divider),borderTopStyle:"inherit"}})},t=>{let{theme:e,ownerState:n}=t;return(0,o.Z)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((e.vars||e).palette.divider),borderLeftStyle:"inherit"}})},t=>{let{ownerState:e}=t;return(0,o.Z)({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),g=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.wrapper,"vertical"===n.orientation&&e.wrapperVertical]}})(t=>{let{theme:e,ownerState:n}=t;return(0,o.Z)({display:"inline-block",paddingLeft:"calc(".concat(e.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(e.spacing(1)," * 1.2)")},"vertical"===n.orientation&&{paddingTop:"calc(".concat(e.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(e.spacing(1)," * 1.2)")})}),m=i.forwardRef(function(t,e){let n=(0,d.i)({props:t,name:"MuiDivider"}),{absolute:i=!1,children:l,className:s,component:c=l?"div":"hr",flexItem:u=!1,light:m=!1,orientation:Z="horizontal",role:b="hr"!==c?"separator":void 0,textAlign:x="center",variant:w="fullWidth"}=n,R=(0,r.Z)(n,p),P=(0,o.Z)({},n,{absolute:i,component:c,flexItem:u,light:m,orientation:Z,role:b,textAlign:x,variant:w}),y=v(P);return(0,h.jsx)(f,(0,o.Z)({as:c,className:(0,a.Z)(y.root,s),role:b,ref:e,ownerState:P},R,{children:l?(0,h.jsx)(g,{className:y.wrapper,ownerState:P,children:l}):null}))});m.muiSkipListHighlight=!0,e.Z=m},10721:function(t,e,n){n.d(e,{Z:function(){return L}});var r=n(16295),o=n(32324),i=n(81500),a=n(35106),l=n(70316),s=n(41060),c=n(65951),d=n(76492),u=n(34519),h=n(28057),p=n(11379),v=n(9049);function f(t){return(0,v.ZP)("MuiSkeleton",t)}(0,p.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var g=n(94655);function m(){let t=(0,r._)(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"]);return m=function(){return t},t}function Z(){let t=(0,r._)(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"]);return Z=function(){return t},t}function b(){let t=(0,r._)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]);return b=function(){return t},t}function x(){let t=(0,r._)(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 2s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ",",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]);return x=function(){return t},t}let w=["animation","className","component","height","style","variant","width"],R=t=>t,P,y,M,C,S=t=>{let{classes:e,variant:n,animation:r,hasChildren:o,width:i,height:a}=t;return(0,c.Z)({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},f,e)},j=(0,s.F4)(P||(P=R(m()))),I=(0,s.F4)(y||(y=R(Z()))),B=(0,u.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.root,e[n.variant],!1!==n.animation&&e[n.animation],n.hasChildren&&e.withChildren,n.hasChildren&&!n.width&&e.fitContent,n.hasChildren&&!n.height&&e.heightAuto]}})(t=>{let{theme:e,ownerState:n}=t,r=String(e.shape.borderRadius).match(/[\d.\-+]*\s*(.*)/)[1]||"px",o=parseFloat(e.shape.borderRadius);return(0,i.Z)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,d.Fq)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===n.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(o).concat(r,"/").concat(Math.round(o/.6*10)/10).concat(r),"&:empty:before":{content:'"\\00a0"'}},"circular"===n.variant&&{borderRadius:"50%"},"rounded"===n.variant&&{borderRadius:(e.vars||e).shape.borderRadius},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})},t=>{let{ownerState:e}=t;return"pulse"===e.animation&&(0,s.iv)(M||(M=R(b(),0)),j)},t=>{let{ownerState:e,theme:n}=t;return"wave"===e.animation&&(0,s.iv)(C||(C=R(x(),0,0)),I,(n.vars||n).palette.action.hover)});var L=a.forwardRef(function(t,e){let n=(0,h.i)({props:t,name:"MuiSkeleton"}),{animation:r="pulse",className:a,component:s="span",height:c,style:d,variant:u="text",width:p}=n,v=(0,o.Z)(n,w),f=(0,i.Z)({},n,{animation:r,component:s,variant:u,hasChildren:!!v.children}),m=S(f);return(0,g.jsx)(B,(0,i.Z)({as:s,ref:e,className:(0,l.Z)(m.root,a),ownerState:f},v,{style:(0,i.Z)({width:p,height:c},d)}))})},53281:function(t,e,n){n.d(e,{Z:function(){return m}});var r=n(81500),o=n(32324),i=n(35106),a=n(70316),l=n(65951),s=n(28057),c=n(34519),d=n(11379),u=n(9049);function h(t){return(0,u.ZP)("MuiTableContainer",t)}(0,d.Z)("MuiTableContainer",["root"]);var p=n(94655);let v=["className","component"],f=t=>{let{classes:e}=t;return(0,l.Z)({root:["root"]},h,e)},g=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"});var m=i.forwardRef(function(t,e){let n=(0,s.i)({props:t,name:"MuiTableContainer"}),{className:i,component:l="div"}=n,c=(0,o.Z)(n,v),d=(0,r.Z)({},n,{component:l}),u=f(d);return(0,p.jsx)(g,(0,r.Z)({ref:e,as:l,className:(0,a.Z)(u.root,i),ownerState:d},c))})},11254:function(t,e,n){n.d(e,{Z:function(){return x}});var r=n(81500),o=n(32324),i=n(35106),a=n(70316),l=n(65951),s=n(70210),c=n(28057),d=n(34519),u=n(11379),h=n(9049);function p(t){return(0,h.ZP)("MuiTableHead",t)}(0,u.Z)("MuiTableHead",["root"]);var v=n(94655);let f=["className","component"],g=t=>{let{classes:e}=t;return(0,l.Z)({root:["root"]},p,e)},m=(0,d.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),Z={variant:"head"},b="thead";var x=i.forwardRef(function(t,e){let n=(0,c.i)({props:t,name:"MuiTableHead"}),{className:i,component:l=b}=n,d=(0,o.Z)(n,f),u=(0,r.Z)({},n,{component:l}),h=g(u);return(0,v.jsx)(s.Z.Provider,{value:Z,children:(0,v.jsx)(m,(0,r.Z)({as:l,className:(0,a.Z)(h.root,i),ref:e,role:l===b?null:"rowgroup",ownerState:u},d))})})},6406:function(t,e,n){n.d(e,{Z:function(){return _}});var r,o=n(32324),i=n(81500),a=n(35106),l=n(70316),s=n(65951),c=n(23225),d=n(34519),u=n(28057),h=n(47684),p=n(7178),v=n(62328),f=n(47001),g=n(62108),m=n(16501),Z=n(6858),b=n(92302),x=n(79983),w=n(61626),R=n(94655),P=(0,w.Z)((0,R.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),y=(0,w.Z)((0,R.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage");let M=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],C=a.forwardRef(function(t,e){var n,r,a,l,s,c,d,u;let{backIconButtonProps:h,count:p,disabled:v=!1,getItemAriaLabel:f,nextIconButtonProps:g,onPageChange:w,page:C,rowsPerPage:S,showFirstButton:j,showLastButton:I,slots:B={},slotProps:L={}}=t,z=(0,o.Z)(t,M),k=(0,m.V)(),T=null!=(n=B.firstButton)?n:x.Z,A=null!=(r=B.lastButton)?r:x.Z,H=null!=(a=B.nextButton)?a:x.Z,N=null!=(l=B.previousButton)?l:x.Z,E=null!=(s=B.firstButtonIcon)?s:y,D=null!=(c=B.lastButtonIcon)?c:P,F=null!=(d=B.nextButtonIcon)?d:b.Z,V=null!=(u=B.previousButtonIcon)?u:Z.Z,W=k?A:T,_=k?H:N,X=k?N:H,O=k?T:A,q=k?L.lastButton:L.firstButton,K=k?L.nextButton:L.previousButton,G=k?L.previousButton:L.nextButton,U=k?L.firstButton:L.lastButton;return(0,R.jsxs)("div",(0,i.Z)({ref:e},z,{children:[j&&(0,R.jsx)(W,(0,i.Z)({onClick:t=>{w(t,0)},disabled:v||0===C,"aria-label":f("first",C),title:f("first",C)},q,{children:k?(0,R.jsx)(D,(0,i.Z)({},L.lastButtonIcon)):(0,R.jsx)(E,(0,i.Z)({},L.firstButtonIcon))})),(0,R.jsx)(_,(0,i.Z)({onClick:t=>{w(t,C-1)},disabled:v||0===C,color:"inherit","aria-label":f("previous",C),title:f("previous",C)},null!=K?K:h,{children:k?(0,R.jsx)(F,(0,i.Z)({},L.nextButtonIcon)):(0,R.jsx)(V,(0,i.Z)({},L.previousButtonIcon))})),(0,R.jsx)(X,(0,i.Z)({onClick:t=>{w(t,C+1)},disabled:v||-1!==p&&C>=Math.ceil(p/S)-1,color:"inherit","aria-label":f("next",C),title:f("next",C)},null!=G?G:g,{children:k?(0,R.jsx)(V,(0,i.Z)({},L.previousButtonIcon)):(0,R.jsx)(F,(0,i.Z)({},L.nextButtonIcon))})),I&&(0,R.jsx)(O,(0,i.Z)({onClick:t=>{w(t,Math.max(0,Math.ceil(p/S)-1))},disabled:v||C>=Math.ceil(p/S)-1,"aria-label":f("last",C),title:f("last",C)},U,{children:k?(0,R.jsx)(E,(0,i.Z)({},L.firstButtonIcon)):(0,R.jsx)(D,(0,i.Z)({},L.lastButtonIcon))}))]}))});var S=n(88207),j=n(11379),I=n(9049);function B(t){return(0,I.ZP)("MuiTablePagination",t)}let L=(0,j.Z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),z=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],k=(0,d.ZP)(f.Z,{name:"MuiTablePagination",slot:"Root",overridesResolver:(t,e)=>e.root})(t=>{let{theme:e}=t;return{overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}}),T=(0,d.ZP)(g.Z,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(t,e)=>(0,i.Z)({["& .".concat(L.actions)]:e.actions},e.toolbar)})(t=>{let{theme:e}=t;return{minHeight:52,paddingRight:2,["".concat(e.breakpoints.up("xs")," and (orientation: landscape)")]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},["& .".concat(L.actions)]:{flexShrink:0,marginLeft:20}}}),A=(0,d.ZP)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(t,e)=>e.spacer})({flex:"1 1 100%"}),H=(0,d.ZP)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(t,e)=>e.selectLabel})(t=>{let{theme:e}=t;return(0,i.Z)({},e.typography.body2,{flexShrink:0})}),N=(0,d.ZP)(v.Z,{name:"MuiTablePagination",slot:"Select",overridesResolver:(t,e)=>(0,i.Z)({["& .".concat(L.selectIcon)]:e.selectIcon,["& .".concat(L.select)]:e.select},e.input,e.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,["& .".concat(L.select)]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),E=(0,d.ZP)(p.Z,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(t,e)=>e.menuItem})({}),D=(0,d.ZP)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(t,e)=>e.displayedRows})(t=>{let{theme:e}=t;return(0,i.Z)({},e.typography.body2,{flexShrink:0})});function F(t){let{from:e,to:n,count:r}=t;return"".concat(e,"–").concat(n," of ").concat(-1!==r?r:"more than ".concat(n))}function V(t){return"Go to ".concat(t," page")}let W=t=>{let{classes:e}=t;return(0,s.Z)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},B,e)};var _=a.forwardRef(function(t,e){var n;let s;let d=(0,u.i)({props:t,name:"MuiTablePagination"}),{ActionsComponent:p=C,backIconButtonProps:v,className:g,colSpan:m,component:Z=f.Z,count:b,disabled:x=!1,getItemAriaLabel:w=V,labelDisplayedRows:P=F,labelRowsPerPage:y="Rows per page:",nextIconButtonProps:M,onPageChange:j,onRowsPerPageChange:I,page:B,rowsPerPage:L,rowsPerPageOptions:_=[10,25,50,100],SelectProps:X={},showFirstButton:O=!1,showLastButton:q=!1,slotProps:K={},slots:G={}}=d,U=(0,o.Z)(d,z),J=W(d),Q=null!=(n=null==K?void 0:K.select)?n:X,Y=Q.native?"option":E;(Z===f.Z||"td"===Z)&&(s=m||1e3);let $=(0,S.Z)(Q.id),tt=(0,S.Z)(Q.labelId);return(0,R.jsx)(k,(0,i.Z)({colSpan:s,ref:e,as:Z,ownerState:d,className:(0,l.Z)(J.root,g)},U,{children:(0,R.jsxs)(T,{className:J.toolbar,children:[(0,R.jsx)(A,{className:J.spacer}),_.length>1&&(0,R.jsx)(H,{className:J.selectLabel,id:tt,children:y}),_.length>1&&(0,R.jsx)(N,(0,i.Z)({variant:"standard"},!Q.variant&&{input:r||(r=(0,R.jsx)(h.ZP,{}))},{value:L,onChange:I,id:$,labelId:tt},Q,{classes:(0,i.Z)({},Q.classes,{root:(0,l.Z)(J.input,J.selectRoot,(Q.classes||{}).root),select:(0,l.Z)(J.select,(Q.classes||{}).select),icon:(0,l.Z)(J.selectIcon,(Q.classes||{}).icon)}),disabled:x,children:_.map(t=>(0,a.createElement)(Y,(0,i.Z)({},!(0,c.Z)(Y)&&{ownerState:d},{className:J.menuItem,key:t.label?t.label:t,value:t.value?t.value:t}),t.label?t.label:t))})),(0,R.jsx)(D,{className:J.displayedRows,children:P({from:0===b?0:B*L+1,to:-1===b?(B+1)*L:-1===L?b:Math.min(b,(B+1)*L),count:-1===b?-1:b,page:B})}),(0,R.jsx)(p,{className:J.actions,backIconButtonProps:v,count:b,nextIconButtonProps:M,onPageChange:j,page:B,rowsPerPage:L,showFirstButton:O,showLastButton:q,slotProps:K.actions,slots:G.actions,getItemAriaLabel:w,disabled:x})]})}))})}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6479],{69178:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m2 14H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"}),"Assignment")},46207:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},54617:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z"}),"ClearAll")},15761:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download")},43436:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error")},45354:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline")},84284:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess")},81960:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},78439:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord")},50880:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList")},89161:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown")},60236:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp")},30114:function(t,e,n){var r=n(8091);e.Z=void 0;var o=r(n(66758)),i=n(94655);e.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person")},87716:function(t,e,n){n.d(e,{Z:function(){return C}});var r=n(32324),o=n(81500),i=n(35106),a=n(70316),l=n(92019),s=n(67485),c=n(65951),d=n(34519),u=n(28057),h=n(30035),p=n(56874),v=n(83855),f=n(38481),g=n(11379),m=n(9049);function Z(t){return(0,m.ZP)("MuiCollapse",t)}(0,g.Z)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var b=n(94655);let x=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],w=t=>{let{orientation:e,classes:n}=t;return(0,c.Z)({root:["root","".concat(e)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(e)],wrapperInner:["wrapperInner","".concat(e)]},Z,n)},y=(0,d.ZP)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.root,e[n.orientation],"entered"===n.state&&e.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&e.hidden]}})(t=>{let{theme:e,ownerState:n}=t;return(0,o.Z)({height:0,overflow:"hidden",transition:e.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:e.transitions.create("width")},"entered"===n.state&&(0,o.Z)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})}),R=(0,d.ZP)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})(t=>{let{ownerState:e}=t;return(0,o.Z)({display:"flex",width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})}),P=(0,d.ZP)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(t,e)=>e.wrapperInner})(t=>{let{ownerState:e}=t;return(0,o.Z)({width:"100%"},"horizontal"===e.orientation&&{width:"auto",height:"100%"})}),M=i.forwardRef(function(t,e){let n=(0,u.i)({props:t,name:"MuiCollapse"}),{addEndListener:c,children:d,className:g,collapsedSize:m="0px",component:Z,easing:M,in:C,onEnter:j,onEntered:I,onEntering:S,onExit:B,onExited:L,onExiting:z,orientation:k="vertical",style:A,timeout:T=h.x9.standard,TransitionComponent:E=l.ZP}=n,H=(0,r.Z)(n,x),N=(0,o.Z)({},n,{orientation:k,collapsedSize:m}),F=w(N),D=(0,v.Z)(),V=(0,s.Z)(),W=i.useRef(null),$=i.useRef(),O="number"==typeof m?"".concat(m,"px"):m,_="horizontal"===k,X=_?"width":"height",q=i.useRef(null),K=(0,f.Z)(e,q),G=t=>e=>{if(t){let n=q.current;void 0===e?t(n):t(n,e)}},U=()=>W.current?W.current[_?"clientWidth":"clientHeight"]:0,J=G((t,e)=>{W.current&&_&&(W.current.style.position="absolute"),t.style[X]=O,j&&j(t,e)}),Q=G((t,e)=>{let n=U();W.current&&_&&(W.current.style.position="");let{duration:r,easing:o}=(0,p.C)({style:A,timeout:T,easing:M},{mode:"enter"});if("auto"===T){let e=D.transitions.getAutoHeightDuration(n);t.style.transitionDuration="".concat(e,"ms"),$.current=e}else t.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");t.style[X]="".concat(n,"px"),t.style.transitionTimingFunction=o,S&&S(t,e)}),Y=G((t,e)=>{t.style[X]="auto",I&&I(t,e)}),tt=G(t=>{t.style[X]="".concat(U(),"px"),B&&B(t)}),te=G(L),tn=G(t=>{let e=U(),{duration:n,easing:r}=(0,p.C)({style:A,timeout:T,easing:M},{mode:"exit"});if("auto"===T){let n=D.transitions.getAutoHeightDuration(e);t.style.transitionDuration="".concat(n,"ms"),$.current=n}else t.style.transitionDuration="string"==typeof n?n:"".concat(n,"ms");t.style[X]=O,t.style.transitionTimingFunction=r,z&&z(t)});return(0,b.jsx)(E,(0,o.Z)({in:C,onEnter:J,onEntered:Y,onEntering:Q,onExit:tt,onExited:te,onExiting:tn,addEndListener:t=>{"auto"===T&&V.start($.current||0,t),c&&c(q.current,t)},nodeRef:q,timeout:"auto"===T?null:T},H,{children:(t,e)=>(0,b.jsx)(y,(0,o.Z)({as:Z,className:(0,a.Z)(F.root,g,{entered:F.entered,exited:!C&&"0px"===O&&F.hidden}[t]),style:(0,o.Z)({[_?"minWidth":"minHeight"]:O},A),ref:K},e,{ownerState:(0,o.Z)({},N,{state:t}),children:(0,b.jsx)(R,{ownerState:(0,o.Z)({},N,{state:t}),className:F.wrapper,ref:W,children:(0,b.jsx)(P,{ownerState:(0,o.Z)({},N,{state:t}),className:F.wrapperInner,children:d})})}))}))});M.muiSupportAuto=!0;var C=M},69123:function(t,e,n){var r=n(32324),o=n(81500),i=n(35106),a=n(70316),l=n(65951),s=n(64577),c=n(34519),d=n(28057),u=n(16945),h=n(94655);let p=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],v=t=>{let{absolute:e,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:c}=t;return(0,l.Z)({root:["root",e&&"absolute",c,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},u.V,r)},f=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,"vertical"===n.orientation&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&"vertical"===n.orientation&&e.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&e.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&e.textAlignLeft]}})(t=>{let{theme:e,ownerState:n}=t;return(0,o.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:e.vars?"rgba(".concat(e.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(e.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})},t=>{let{ownerState:e}=t;return(0,o.Z)({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},t=>{let{theme:e,ownerState:n}=t;return(0,o.Z)({},n.children&&"vertical"!==n.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((e.vars||e).palette.divider),borderTopStyle:"inherit"}})},t=>{let{theme:e,ownerState:n}=t;return(0,o.Z)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((e.vars||e).palette.divider),borderLeftStyle:"inherit"}})},t=>{let{ownerState:e}=t;return(0,o.Z)({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),g=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.wrapper,"vertical"===n.orientation&&e.wrapperVertical]}})(t=>{let{theme:e,ownerState:n}=t;return(0,o.Z)({display:"inline-block",paddingLeft:"calc(".concat(e.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(e.spacing(1)," * 1.2)")},"vertical"===n.orientation&&{paddingTop:"calc(".concat(e.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(e.spacing(1)," * 1.2)")})}),m=i.forwardRef(function(t,e){let n=(0,d.i)({props:t,name:"MuiDivider"}),{absolute:i=!1,children:l,className:s,component:c=l?"div":"hr",flexItem:u=!1,light:m=!1,orientation:Z="horizontal",role:b="hr"!==c?"separator":void 0,textAlign:x="center",variant:w="fullWidth"}=n,y=(0,r.Z)(n,p),R=(0,o.Z)({},n,{absolute:i,component:c,flexItem:u,light:m,orientation:Z,role:b,textAlign:x,variant:w}),P=v(R);return(0,h.jsx)(f,(0,o.Z)({as:c,className:(0,a.Z)(P.root,s),role:b,ref:e,ownerState:R},y,{children:l?(0,h.jsx)(g,{className:P.wrapper,ownerState:R,children:l}):null}))});m.muiSkipListHighlight=!0,e.Z=m},10721:function(t,e,n){n.d(e,{Z:function(){return L}});var r=n(16295),o=n(32324),i=n(81500),a=n(35106),l=n(70316),s=n(41060),c=n(65951),d=n(76492),u=n(34519),h=n(28057),p=n(11379),v=n(9049);function f(t){return(0,v.ZP)("MuiSkeleton",t)}(0,p.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var g=n(94655);function m(){let t=(0,r._)(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"]);return m=function(){return t},t}function Z(){let t=(0,r._)(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"]);return Z=function(){return t},t}function b(){let t=(0,r._)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]);return b=function(){return t},t}function x(){let t=(0,r._)(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 2s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ",",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]);return x=function(){return t},t}let w=["animation","className","component","height","style","variant","width"],y=t=>t,R,P,M,C,j=t=>{let{classes:e,variant:n,animation:r,hasChildren:o,width:i,height:a}=t;return(0,c.Z)({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},f,e)},I=(0,s.F4)(R||(R=y(m()))),S=(0,s.F4)(P||(P=y(Z()))),B=(0,u.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(t,e)=>{let{ownerState:n}=t;return[e.root,e[n.variant],!1!==n.animation&&e[n.animation],n.hasChildren&&e.withChildren,n.hasChildren&&!n.width&&e.fitContent,n.hasChildren&&!n.height&&e.heightAuto]}})(t=>{let{theme:e,ownerState:n}=t,r=String(e.shape.borderRadius).match(/[\d.\-+]*\s*(.*)/)[1]||"px",o=parseFloat(e.shape.borderRadius);return(0,i.Z)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,d.Fq)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===n.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(o).concat(r,"/").concat(Math.round(o/.6*10)/10).concat(r),"&:empty:before":{content:'"\\00a0"'}},"circular"===n.variant&&{borderRadius:"50%"},"rounded"===n.variant&&{borderRadius:(e.vars||e).shape.borderRadius},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})},t=>{let{ownerState:e}=t;return"pulse"===e.animation&&(0,s.iv)(M||(M=y(b(),0)),I)},t=>{let{ownerState:e,theme:n}=t;return"wave"===e.animation&&(0,s.iv)(C||(C=y(x(),0,0)),S,(n.vars||n).palette.action.hover)});var L=a.forwardRef(function(t,e){let n=(0,h.i)({props:t,name:"MuiSkeleton"}),{animation:r="pulse",className:a,component:s="span",height:c,style:d,variant:u="text",width:p}=n,v=(0,o.Z)(n,w),f=(0,i.Z)({},n,{animation:r,component:s,variant:u,hasChildren:!!v.children}),m=j(f);return(0,g.jsx)(B,(0,i.Z)({as:s,ref:e,className:(0,l.Z)(m.root,a),ownerState:f},v,{style:(0,i.Z)({width:p,height:c},d)}))})},53281:function(t,e,n){n.d(e,{Z:function(){return m}});var r=n(81500),o=n(32324),i=n(35106),a=n(70316),l=n(65951),s=n(28057),c=n(34519),d=n(11379),u=n(9049);function h(t){return(0,u.ZP)("MuiTableContainer",t)}(0,d.Z)("MuiTableContainer",["root"]);var p=n(94655);let v=["className","component"],f=t=>{let{classes:e}=t;return(0,l.Z)({root:["root"]},h,e)},g=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"});var m=i.forwardRef(function(t,e){let n=(0,s.i)({props:t,name:"MuiTableContainer"}),{className:i,component:l="div"}=n,c=(0,o.Z)(n,v),d=(0,r.Z)({},n,{component:l}),u=f(d);return(0,p.jsx)(g,(0,r.Z)({ref:e,as:l,className:(0,a.Z)(u.root,i),ownerState:d},c))})},11254:function(t,e,n){n.d(e,{Z:function(){return x}});var r=n(81500),o=n(32324),i=n(35106),a=n(70316),l=n(65951),s=n(70210),c=n(28057),d=n(34519),u=n(11379),h=n(9049);function p(t){return(0,h.ZP)("MuiTableHead",t)}(0,u.Z)("MuiTableHead",["root"]);var v=n(94655);let f=["className","component"],g=t=>{let{classes:e}=t;return(0,l.Z)({root:["root"]},p,e)},m=(0,d.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),Z={variant:"head"},b="thead";var x=i.forwardRef(function(t,e){let n=(0,c.i)({props:t,name:"MuiTableHead"}),{className:i,component:l=b}=n,d=(0,o.Z)(n,f),u=(0,r.Z)({},n,{component:l}),h=g(u);return(0,v.jsx)(s.Z.Provider,{value:Z,children:(0,v.jsx)(m,(0,r.Z)({as:l,className:(0,a.Z)(h.root,i),ref:e,role:l===b?null:"rowgroup",ownerState:u},d))})})},6406:function(t,e,n){n.d(e,{Z:function(){return $}});var r,o=n(32324),i=n(81500),a=n(35106),l=n(70316),s=n(65951),c=n(23225),d=n(34519),u=n(28057),h=n(47684),p=n(7178),v=n(62328),f=n(47001),g=n(62108),m=n(16501),Z=n(6858),b=n(92302),x=n(79983),w=n(61626),y=n(94655),R=(0,w.Z)((0,y.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),P=(0,w.Z)((0,y.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage");let M=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],C=a.forwardRef(function(t,e){var n,r,a,l,s,c,d,u;let{backIconButtonProps:h,count:p,disabled:v=!1,getItemAriaLabel:f,nextIconButtonProps:g,onPageChange:w,page:C,rowsPerPage:j,showFirstButton:I,showLastButton:S,slots:B={},slotProps:L={}}=t,z=(0,o.Z)(t,M),k=(0,m.V)(),A=null!=(n=B.firstButton)?n:x.Z,T=null!=(r=B.lastButton)?r:x.Z,E=null!=(a=B.nextButton)?a:x.Z,H=null!=(l=B.previousButton)?l:x.Z,N=null!=(s=B.firstButtonIcon)?s:P,F=null!=(c=B.lastButtonIcon)?c:R,D=null!=(d=B.nextButtonIcon)?d:b.Z,V=null!=(u=B.previousButtonIcon)?u:Z.Z,W=k?T:A,$=k?E:H,O=k?H:E,_=k?A:T,X=k?L.lastButton:L.firstButton,q=k?L.nextButton:L.previousButton,K=k?L.previousButton:L.nextButton,G=k?L.firstButton:L.lastButton;return(0,y.jsxs)("div",(0,i.Z)({ref:e},z,{children:[I&&(0,y.jsx)(W,(0,i.Z)({onClick:t=>{w(t,0)},disabled:v||0===C,"aria-label":f("first",C),title:f("first",C)},X,{children:k?(0,y.jsx)(F,(0,i.Z)({},L.lastButtonIcon)):(0,y.jsx)(N,(0,i.Z)({},L.firstButtonIcon))})),(0,y.jsx)($,(0,i.Z)({onClick:t=>{w(t,C-1)},disabled:v||0===C,color:"inherit","aria-label":f("previous",C),title:f("previous",C)},null!=q?q:h,{children:k?(0,y.jsx)(D,(0,i.Z)({},L.nextButtonIcon)):(0,y.jsx)(V,(0,i.Z)({},L.previousButtonIcon))})),(0,y.jsx)(O,(0,i.Z)({onClick:t=>{w(t,C+1)},disabled:v||-1!==p&&C>=Math.ceil(p/j)-1,color:"inherit","aria-label":f("next",C),title:f("next",C)},null!=K?K:g,{children:k?(0,y.jsx)(V,(0,i.Z)({},L.previousButtonIcon)):(0,y.jsx)(D,(0,i.Z)({},L.nextButtonIcon))})),S&&(0,y.jsx)(_,(0,i.Z)({onClick:t=>{w(t,Math.max(0,Math.ceil(p/j)-1))},disabled:v||C>=Math.ceil(p/j)-1,"aria-label":f("last",C),title:f("last",C)},G,{children:k?(0,y.jsx)(N,(0,i.Z)({},L.firstButtonIcon)):(0,y.jsx)(F,(0,i.Z)({},L.lastButtonIcon))}))]}))});var j=n(88207),I=n(11379),S=n(9049);function B(t){return(0,S.ZP)("MuiTablePagination",t)}let L=(0,I.Z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),z=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],k=(0,d.ZP)(f.Z,{name:"MuiTablePagination",slot:"Root",overridesResolver:(t,e)=>e.root})(t=>{let{theme:e}=t;return{overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}}),A=(0,d.ZP)(g.Z,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(t,e)=>(0,i.Z)({["& .".concat(L.actions)]:e.actions},e.toolbar)})(t=>{let{theme:e}=t;return{minHeight:52,paddingRight:2,["".concat(e.breakpoints.up("xs")," and (orientation: landscape)")]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},["& .".concat(L.actions)]:{flexShrink:0,marginLeft:20}}}),T=(0,d.ZP)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(t,e)=>e.spacer})({flex:"1 1 100%"}),E=(0,d.ZP)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(t,e)=>e.selectLabel})(t=>{let{theme:e}=t;return(0,i.Z)({},e.typography.body2,{flexShrink:0})}),H=(0,d.ZP)(v.Z,{name:"MuiTablePagination",slot:"Select",overridesResolver:(t,e)=>(0,i.Z)({["& .".concat(L.selectIcon)]:e.selectIcon,["& .".concat(L.select)]:e.select},e.input,e.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,["& .".concat(L.select)]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),N=(0,d.ZP)(p.Z,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(t,e)=>e.menuItem})({}),F=(0,d.ZP)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(t,e)=>e.displayedRows})(t=>{let{theme:e}=t;return(0,i.Z)({},e.typography.body2,{flexShrink:0})});function D(t){let{from:e,to:n,count:r}=t;return"".concat(e,"–").concat(n," of ").concat(-1!==r?r:"more than ".concat(n))}function V(t){return"Go to ".concat(t," page")}let W=t=>{let{classes:e}=t;return(0,s.Z)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},B,e)};var $=a.forwardRef(function(t,e){var n;let s;let d=(0,u.i)({props:t,name:"MuiTablePagination"}),{ActionsComponent:p=C,backIconButtonProps:v,className:g,colSpan:m,component:Z=f.Z,count:b,disabled:x=!1,getItemAriaLabel:w=V,labelDisplayedRows:R=D,labelRowsPerPage:P="Rows per page:",nextIconButtonProps:M,onPageChange:I,onRowsPerPageChange:S,page:B,rowsPerPage:L,rowsPerPageOptions:$=[10,25,50,100],SelectProps:O={},showFirstButton:_=!1,showLastButton:X=!1,slotProps:q={},slots:K={}}=d,G=(0,o.Z)(d,z),U=W(d),J=null!=(n=null==q?void 0:q.select)?n:O,Q=J.native?"option":N;(Z===f.Z||"td"===Z)&&(s=m||1e3);let Y=(0,j.Z)(J.id),tt=(0,j.Z)(J.labelId);return(0,y.jsx)(k,(0,i.Z)({colSpan:s,ref:e,as:Z,ownerState:d,className:(0,l.Z)(U.root,g)},G,{children:(0,y.jsxs)(A,{className:U.toolbar,children:[(0,y.jsx)(T,{className:U.spacer}),$.length>1&&(0,y.jsx)(E,{className:U.selectLabel,id:tt,children:P}),$.length>1&&(0,y.jsx)(H,(0,i.Z)({variant:"standard"},!J.variant&&{input:r||(r=(0,y.jsx)(h.ZP,{}))},{value:L,onChange:S,id:Y,labelId:tt},J,{classes:(0,i.Z)({},J.classes,{root:(0,l.Z)(U.input,U.selectRoot,(J.classes||{}).root),select:(0,l.Z)(U.select,(J.classes||{}).select),icon:(0,l.Z)(U.selectIcon,(J.classes||{}).icon)}),disabled:x,children:$.map(t=>(0,a.createElement)(Q,(0,i.Z)({},!(0,c.Z)(Q)&&{ownerState:d},{className:U.menuItem,key:t.label?t.label:t,value:t.value?t.value:t}),t.label?t.label:t))})),(0,y.jsx)(F,{className:U.displayedRows,children:R({from:0===b?0:B*L+1,to:-1===b?(B+1)*L:-1===L?b:Math.min(b,(B+1)*L),count:-1===b?-1:b,page:B})}),(0,y.jsx)(p,{className:U.actions,backIconButtonProps:v,count:b,nextIconButtonProps:M,onPageChange:I,page:B,rowsPerPage:L,showFirstButton:_,showLastButton:X,slotProps:q.actions,slots:K.actions,getItemAriaLabel:w,disabled:x})]})}))})},76492:function(t,e,n){n.d(e,{Fq:function(){return i}});var r=n(22085),o=n(34272);function i(t,e){return t=function t(e){let n;if(e.type)return e;if("#"===e.charAt(0))return t(function(t){t=t.slice(1);let e=RegExp(`.{1,${t.length>=6?2:1}}`,"g"),n=t.match(e);return n&&1===n[0].length&&(n=n.map(t=>t+t)),n?`rgb${4===n.length?"a":""}(${n.map((t,e)=>e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3).join(", ")})`:""}(e));let o=e.indexOf("("),i=e.substring(0,o);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(i))throw Error((0,r.Z)(9,e));let a=e.substring(o+1,e.length-1);if("color"===i){if(n=(a=a.split(" ")).shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw Error((0,r.Z)(10,n))}else a=a.split(",");return{type:i,values:a=a.map(t=>parseFloat(t)),colorSpace:n}}(t),e=function(t,e=0,n=1){return(0,o.Z)(t,e,n)}(e),("rgb"===t.type||"hsl"===t.type)&&(t.type+="a"),"color"===t.type?t.values[3]=`/${e}`:t.values[3]=e,function(t){let{type:e,colorSpace:n}=t,{values:r}=t;return -1!==e.indexOf("rgb")?r=r.map((t,e)=>e<3?parseInt(t,10):t):-1!==e.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==e.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${e}(${r})`}(t)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7359],{76492:function(t,e,s){s.d(e,{Fq:function(){return n}});var i=s(22085),r=s(34272);function n(t,e){return t=function t(e){let s;if(e.type)return e;if("#"===e.charAt(0))return t(function(t){t=t.slice(1);let e=RegExp(`.{1,${t.length>=6?2:1}}`,"g"),s=t.match(e);return s&&1===s[0].length&&(s=s.map(t=>t+t)),s?`rgb${4===s.length?"a":""}(${s.map((t,e)=>e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3).join(", ")})`:""}(e));let r=e.indexOf("("),n=e.substring(0,r);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw Error((0,i.Z)(9,e));let o=e.substring(r+1,e.length-1);if("color"===n){if(s=(o=o.split(" ")).shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(s))throw Error((0,i.Z)(10,s))}else o=o.split(",");return{type:n,values:o=o.map(t=>parseFloat(t)),colorSpace:s}}(t),e=function(t,e=0,s=1){return(0,r.Z)(t,e,s)}(e),("rgb"===t.type||"hsl"===t.type)&&(t.type+="a"),"color"===t.type?t.values[3]=`/${e}`:t.values[3]=e,function(t){let{type:e,colorSpace:s}=t,{values:i}=t;return -1!==e.indexOf("rgb")?i=i.map((t,e)=>e<3?parseInt(t,10):t):-1!==e.indexOf("hsl")&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),i=-1!==e.indexOf("color")?`${s} ${i.join(" ")}`:`${i.join(", ")}`,`${e}(${i})`}(t)}},98091:function(t,e,s){s.d(e,{R:function(){return a},m:function(){return o}});var i=s(11430),r=s(23620),n=s(97639),o=class extends r.F{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||a(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#r({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,n.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#r({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let i="pending"===this.state.status,r=!this.#i.canStart();try{if(i)e();else{this.#r({type:"pending",variables:t,isPaused:r}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#r({type:"pending",context:e,variables:t,isPaused:r})}let n=await this.#i.start();return await this.#s.config.onSuccess?.(n,t,this.state.context,this,s),await this.options.onSuccess?.(n,t,this.state.context,s),await this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,t,this.state.context,s),this.#r({type:"success",data:n}),n}catch(e){try{await this.#s.config.onError?.(e,t,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,s)}catch(t){Promise.reject(t)}try{await this.#s.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,s)}catch(t){Promise.reject(t)}throw this.#r({type:"error",error:e}),e}finally{this.#s.runNext(this)}}#r(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),i.Vr.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},20367:function(t,e,s){s.d(e,{D:function(){return c}});var i=s(35106),r=s(98091),n=s(11430),o=s(12835),a=s(80375),u=class extends o.l{#t;#n=void 0;#o;#a;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#u()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,a.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#o,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,a.Ym)(e.mutationKey)!==(0,a.Ym)(this.options.mutationKey)?this.reset():this.#o?.state.status==="pending"&&this.#o.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#o?.removeObserver(this)}onMutationUpdate(t){this.#u(),this.#h(t)}getCurrentResult(){return this.#n}reset(){this.#o?.removeObserver(this),this.#o=void 0,this.#u(),this.#h()}mutate(t,e){return this.#a=e,this.#o?.removeObserver(this),this.#o=this.#t.getMutationCache().build(this.#t,this.options),this.#o.addObserver(this),this.#o.execute(t)}#u(){let t=this.#o?.state??(0,r.R)();this.#n={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#h(t){n.Vr.batch(()=>{if(this.#a&&this.hasListeners()){let e=this.#n.variables,s=this.#n.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#a.onSuccess?.(t.data,e,s,i)}catch(t){Promise.reject(t)}try{this.#a.onSettled?.(t.data,null,e,s,i)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#a.onError?.(t.error,e,s,i)}catch(t){Promise.reject(t)}try{this.#a.onSettled?.(void 0,t.error,e,s,i)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#n)})})}},h=s(58919);function c(t,e){let s=(0,h.NL)(e),[r]=i.useState(()=>new u(s,t));i.useEffect(()=>{r.setOptions(t)},[r,t]);let o=i.useSyncExternalStore(i.useCallback(t=>r.subscribe(n.Vr.batchCalls(t)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=i.useCallback((t,e)=>{r.mutate(t,e).catch(a.ZT)},[r]);if(o.error&&(0,a.L3)(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8558],{407:function(e,o,r){var t=r(8091);o.Z=void 0;var a=t(r(66758)),n=r(94655);o.Z=(0,a.default)([(0,n.jsx)("path",{d:"M17 11c.34 0 .67.04 1 .09V6.27L10.5 3 3 6.27v4.91c0 4.54 3.2 8.79 7.5 9.82.55-.13 1.08-.32 1.6-.55-.69-.98-1.1-2.17-1.1-3.45 0-3.31 2.69-6 6-6"},"0"),(0,n.jsx)("path",{d:"M17 13c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 1.38c.62 0 1.12.51 1.12 1.12s-.51 1.12-1.12 1.12-1.12-.51-1.12-1.12.5-1.12 1.12-1.12m0 5.37c-.93 0-1.74-.46-2.24-1.17.05-.72 1.51-1.08 2.24-1.08s2.19.36 2.24 1.08c-.5.71-1.31 1.17-2.24 1.17"},"1")],"AdminPanelSettings")},21111:function(e,o,r){var t=r(8091);o.Z=void 0;var a=t(r(66758)),n=r(94655);o.Z=(0,a.default)((0,n.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete")},37809:function(e,o,r){var t=r(8091);o.Z=void 0;var a=t(r(66758)),n=r(94655);o.Z=(0,a.default)((0,n.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert")},47606:function(e,o,r){var t=r(8091);o.Z=void 0;var a=t(r(66758)),n=r(94655);o.Z=(0,a.default)((0,n.jsx)("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonAdd")},11597:function(e,o,r){var t=r(8091);o.Z=void 0;var a=t(r(66758)),n=r(94655);o.Z=(0,a.default)((0,n.jsx)("path",{d:"M14 8c0-2.21-1.79-4-4-4S6 5.79 6 8s1.79 4 4 4 4-1.79 4-4m3 2v2h6v-2zM2 18v2h16v-2c0-2.66-5.33-4-8-4s-8 1.34-8 4"}),"PersonRemove")},76678:function(e,o,r){r.d(o,{Z:function(){return h}});var t=r(32324),a=r(81500),n=r(35106),i=r(70316),s=r(65951),c=r(34519),l=r(28057),u=r(11379),d=r(9049);function v(e){return(0,d.ZP)("MuiDialogActions",e)}(0,u.Z)("MuiDialogActions",["root","spacing"]);var f=r(94655);let Z=["className","disableSpacing"],m=e=>{let{classes:o,disableSpacing:r}=e;return(0,s.Z)({root:["root",!r&&"spacing"]},v,o)},p=(0,c.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,o)=>{let{ownerState:r}=e;return[o.root,!r.disableSpacing&&o.spacing]}})(e=>{let{ownerState:o}=e;return(0,a.Z)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!o.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})});var h=n.forwardRef(function(e,o){let r=(0,l.i)({props:e,name:"MuiDialogActions"}),{className:n,disableSpacing:s=!1}=r,c=(0,t.Z)(r,Z),u=(0,a.Z)({},r,{disableSpacing:s}),d=m(u);return(0,f.jsx)(p,(0,a.Z)({className:(0,i.Z)(d.root,n),ownerState:u,ref:o},c))})},39181:function(e,o,r){r.d(o,{Z:function(){return D}});var t=r(32324),a=r(81500),n=r(35106),i=r(70316),s=r(65951),c=r(64577),l=r(1592),u=r(28057),d=r(61626),v=r(94655),f=(0,d.Z)((0,v.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),Z=(0,d.Z)((0,v.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),m=r(34519),p=r(15651);let h=(0,m.ZP)("span",{name:"MuiRadioButtonIcon",shouldForwardProp:p.Z})({position:"relative",display:"flex"}),g=(0,m.ZP)(f,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),x=(0,m.ZP)(Z,{name:"MuiRadioButtonIcon"})(e=>{let{theme:o,ownerState:r}=e;return(0,a.Z)({left:0,position:"absolute",transform:"scale(0)",transition:o.transitions.create("transform",{easing:o.transitions.easing.easeIn,duration:o.transitions.duration.shortest})},r.checked&&{transform:"scale(1)",transition:o.transitions.create("transform",{easing:o.transitions.easing.easeOut,duration:o.transitions.duration.shortest})})});var M=function(e){let{checked:o=!1,classes:r={},fontSize:t}=e,n=(0,a.Z)({},e,{checked:o});return(0,v.jsxs)(h,{className:r.root,ownerState:n,children:[(0,v.jsx)(g,{fontSize:t,className:r.background,ownerState:n}),(0,v.jsx)(x,{fontSize:t,className:r.dot,ownerState:n})]})},R=r(38762),w=r(27350),S=r(36189),C=r(11379),j=r(9049);function k(e){return(0,j.ZP)("MuiRadio",e)}let z=(0,C.Z)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),b=["checked","checkedIcon","color","icon","name","onChange","size","className"],P=e=>{let{classes:o,color:r,size:t}=e,n={root:["root","color".concat((0,R.Z)(r)),"medium"!==t&&"size".concat((0,R.Z)(t))]};return(0,a.Z)({},o,(0,s.Z)(n,k,o))},y=(0,m.ZP)(l.Z,{shouldForwardProp:e=>(0,p.Z)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,o)=>{let{ownerState:r}=e;return[o.root,"medium"!==r.size&&o["size".concat((0,R.Z)(r.size))],o["color".concat((0,R.Z)(r.color))]]}})(e=>{let{theme:o,ownerState:r}=e;return(0,a.Z)({color:(o.vars||o).palette.text.secondary},!r.disableRipple&&{"&:hover":{backgroundColor:o.vars?"rgba(".concat("default"===r.color?o.vars.palette.action.activeChannel:o.vars.palette[r.color].mainChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):(0,c.Fq)("default"===r.color?o.palette.action.active:o.palette[r.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==r.color&&{["&.".concat(z.checked)]:{color:(o.vars||o).palette[r.color].main}},{["&.".concat(z.disabled)]:{color:(o.vars||o).palette.action.disabled}})}),N=(0,v.jsx)(M,{checked:!0}),I=(0,v.jsx)(M,{});var D=n.forwardRef(function(e,o){var r,s,c,l;let d=(0,u.i)({props:e,name:"MuiRadio"}),{checked:f,checkedIcon:Z=N,color:m="primary",icon:p=I,name:h,onChange:g,size:x="medium",className:M}=d,R=(0,t.Z)(d,b),C=(0,a.Z)({},d,{color:m,size:x}),j=P(C),k=n.useContext(S.Z),z=f,D=(0,w.Z)(g,k&&k.onChange),F=h;return k&&(void 0===z&&(c=k.value,z="object"==typeof(l=d.value)&&null!==l?c===l:String(c)===String(l)),void 0===F&&(F=k.name)),(0,v.jsx)(y,(0,a.Z)({type:"radio",icon:n.cloneElement(p,{fontSize:null!=(r=I.props.fontSize)?r:x}),checkedIcon:n.cloneElement(Z,{fontSize:null!=(s=N.props.fontSize)?s:x}),ownerState:C,classes:j,name:F,checked:z,onChange:D,ref:o,className:(0,i.Z)(j.root,M)},R))})},34080:function(e,o,r){r.d(o,{Z:function(){return z}});var t=r(81500),a=r(32324),n=r(35106),i=r(70316),s=r(65951),c=r(34519),l=r(28057),u=r(11379),d=r(9049);function v(e){return(0,d.ZP)("MuiFormGroup",e)}(0,u.Z)("MuiFormGroup",["root","row","error"]);var f=r(85016),Z=r(95953),m=r(94655);let p=["className","row"],h=e=>{let{classes:o,row:r,error:t}=e;return(0,s.Z)({root:["root",r&&"row",t&&"error"]},v,o)},g=(0,c.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,o)=>{let{ownerState:r}=e;return[o.root,r.row&&o.row]}})(e=>{let{ownerState:o}=e;return(0,t.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},o.row&&{flexDirection:"row"})}),x=n.forwardRef(function(e,o){let r=(0,l.i)({props:e,name:"MuiFormGroup"}),{className:n,row:s=!1}=r,c=(0,a.Z)(r,p),u=(0,f.Z)(),d=(0,Z.Z)({props:r,muiFormControl:u,states:["error"]}),v=(0,t.Z)({},r,{row:s,error:d.error}),x=h(v);return(0,m.jsx)(g,(0,t.Z)({className:(0,i.Z)(x.root,n),ownerState:v,ref:o},c))});function M(e){return(0,d.ZP)("MuiRadioGroup",e)}(0,u.Z)("MuiRadioGroup",["root","row","error"]);var R=r(38481),w=r(18280),S=r(36189),C=r(88207);let j=["actions","children","className","defaultValue","name","onChange","value"],k=e=>{let{classes:o,row:r,error:t}=e;return(0,s.Z)({root:["root",r&&"row",t&&"error"]},M,o)};var z=n.forwardRef(function(e,o){let{actions:r,children:s,className:c,defaultValue:l,name:u,onChange:d,value:v}=e,f=(0,a.Z)(e,j),Z=n.useRef(null),p=k(e),[h,g]=(0,w.Z)({controlled:v,default:l,name:"RadioGroup"});n.useImperativeHandle(r,()=>({focus:()=>{let e=Z.current.querySelector("input:not(:disabled):checked");e||(e=Z.current.querySelector("input:not(:disabled)")),e&&e.focus()}}),[]);let M=(0,R.Z)(o,Z),z=(0,C.Z)(u),b=n.useMemo(()=>({name:z,onChange(e){g(e.target.value),d&&d(e,e.target.value)},value:h}),[z,d,g,h]);return(0,m.jsx)(S.Z.Provider,{value:b,children:(0,m.jsx)(x,(0,t.Z)({role:"radiogroup",ref:M,className:(0,i.Z)(p.root,c)},f,{children:s}))})})},36189:function(e,o,r){let t=r(35106).createContext(void 0);o.Z=t}}]);
|
package/.next/standalone/platform/services/mcctl-console/.next/static/chunks/892-a0f20ea0df618c15.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[892],{34675:function(e,t,r){var o=r(8091);t.Z=void 0;var n=o(r(66758)),a=r(94655);t.Z=(0,n.default)((0,a.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"Backup")},46207:function(e,t,r){var o=r(8091);t.Z=void 0;var n=o(r(66758)),a=r(94655);t.Z=(0,n.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},91606:function(e,t,r){var o=r(8091);t.Z=void 0;var n=o(r(66758)),a=r(94655);t.Z=(0,n.default)((0,a.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"CloudUpload")},43436:function(e,t,r){var o=r(8091);t.Z=void 0;var n=o(r(66758)),a=r(94655);t.Z=(0,n.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error")},97731:function(e,t,r){var o=r(8091);t.Z=void 0;var n=o(r(66758)),a=r(94655);t.Z=(0,n.default)((0,a.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"Restore")},628:function(e,t,r){r.d(t,{Z:function(){return y}});var o=r(81500),n=r(32324),a=r(35106),i=r(70316),s=r(65951),l=r(34519),u=r(28057),c=r(69899),d=r(11379),f=r(9049);function p(e){return(0,f.ZP)("MuiCard",e)}(0,d.Z)("MuiCard",["root"]);var v=r(94655);let Z=["className","raised"],m=e=>{let{classes:t}=e;return(0,s.Z)({root:["root"]},p,t)},h=(0,l.ZP)(c.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"}));var y=a.forwardRef(function(e,t){let r=(0,u.i)({props:e,name:"MuiCard"}),{className:a,raised:s=!1}=r,l=(0,n.Z)(r,Z),c=(0,o.Z)({},r,{raised:s}),d=m(c);return(0,v.jsx)(h,(0,o.Z)({className:(0,i.Z)(d.root,a),elevation:s?8:void 0,ref:t,ownerState:c},l))})},41565:function(e,t,r){r.d(t,{Z:function(){return h}});var o=r(81500),n=r(32324),a=r(35106),i=r(70316),s=r(65951),l=r(34519),u=r(28057),c=r(11379),d=r(9049);function f(e){return(0,d.ZP)("MuiCardContent",e)}(0,c.Z)("MuiCardContent",["root"]);var p=r(94655);let v=["className","component"],Z=e=>{let{classes:t}=e;return(0,s.Z)({root:["root"]},f,t)},m=(0,l.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}}));var h=a.forwardRef(function(e,t){let r=(0,u.i)({props:e,name:"MuiCardContent"}),{className:a,component:s="div"}=r,l=(0,n.Z)(r,v),c=(0,o.Z)({},r,{component:s}),d=Z(c);return(0,p.jsx)(m,(0,o.Z)({as:s,className:(0,i.Z)(d.root,a),ownerState:c,ref:t},l))})},76678:function(e,t,r){r.d(t,{Z:function(){return h}});var o=r(32324),n=r(81500),a=r(35106),i=r(70316),s=r(65951),l=r(34519),u=r(28057),c=r(11379),d=r(9049);function f(e){return(0,d.ZP)("MuiDialogActions",e)}(0,c.Z)("MuiDialogActions",["root","spacing"]);var p=r(94655);let v=["className","disableSpacing"],Z=e=>{let{classes:t,disableSpacing:r}=e;return(0,s.Z)({root:["root",!r&&"spacing"]},f,t)},m=(0,l.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})(e=>{let{ownerState:t}=e;return(0,n.Z)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})});var h=a.forwardRef(function(e,t){let r=(0,u.i)({props:e,name:"MuiDialogActions"}),{className:a,disableSpacing:s=!1}=r,l=(0,o.Z)(r,v),c=(0,n.Z)({},r,{disableSpacing:s}),d=Z(c);return(0,p.jsx)(m,(0,n.Z)({className:(0,i.Z)(d.root,a),ownerState:c,ref:t},l))})},65087:function(e,t,r){r.d(t,{Z:function(){return C}});var o=r(32324),n=r(81500),a=r(35106),i=r(70316),s=r(65951),l=r(34519),u=r(15651),c=r(28057),d=r(31317),f=r(11379),p=r(9049);function v(e){return(0,p.ZP)("MuiDialogContentText",e)}(0,f.Z)("MuiDialogContentText",["root"]);var Z=r(94655);let m=["children","className"],h=e=>{let{classes:t}=e,r=(0,s.Z)({root:["root"]},v,t);return(0,n.Z)({},t,r)},y=(0,l.ZP)(d.Z,{shouldForwardProp:e=>(0,u.Z)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({});var C=a.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiDialogContentText"}),{className:a}=r,s=(0,o.Z)(r,m),l=h(s);return(0,Z.jsx)(y,(0,n.Z)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:s,className:(0,i.Z)(l.root,a)},r,{classes:l}))})},70115:function(e,t,r){r.d(t,{Z:function(){return b}});var o=r(32324),n=r(81500),a=r(35106),i=r(70316),s=r(41499),l=r(9049),u=r(65951),c=r(48442),d=r(54569),f=r(28131),p=r(8557),v=r(43513),Z=r(95731),m=r(94655);let h=["component","direction","spacing","divider","children","className","useFlexGap"],y=(0,p.Z)(),C=(0,c.Z)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function g(e){return(0,d.Z)({props:e,name:"MuiStack",defaultTheme:y})}let M=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],w=({ownerState:e,theme:t})=>{let r=(0,n.Z)({display:"flex",flexDirection:"column"},(0,v.k9)({theme:t},(0,v.P$)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e})));if(e.spacing){let o=(0,Z.hB)(t),n=Object.keys(t.breakpoints.values).reduce((t,r)=>(("object"==typeof e.spacing&&null!=e.spacing[r]||"object"==typeof e.direction&&null!=e.direction[r])&&(t[r]=!0),t),{}),a=(0,v.P$)({values:e.direction,base:n}),i=(0,v.P$)({values:e.spacing,base:n});"object"==typeof a&&Object.keys(a).forEach((e,t,r)=>{if(!a[e]){let o=t>0?a[r[t-1]]:"column";a[e]=o}}),r=(0,s.Z)(r,(0,v.k9)({theme:t},i,(t,r)=>e.useFlexGap?{gap:(0,Z.NA)(o,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${M(r?a[r]:e.direction)}`]:(0,Z.NA)(o,t)}}))}return(0,v.dt)(t.breakpoints,r)};var x=r(34519),R=r(28057),b=function(e={}){let{createStyledComponent:t=C,useThemeProps:r=g,componentName:s="MuiStack"}=e,c=()=>(0,u.Z)({root:["root"]},e=>(0,l.ZP)(s,e),{}),d=t(w);return a.forwardRef(function(e,t){let s=r(e),l=(0,f.Z)(s),{component:u="div",direction:p="column",spacing:v=0,divider:Z,children:y,className:C,useFlexGap:g=!1}=l,M=(0,o.Z)(l,h),w=c();return(0,m.jsx)(d,(0,n.Z)({as:u,ownerState:{direction:p,spacing:v,useFlexGap:g},ref:t,className:(0,i.Z)(w.root,C)},M,{children:Z?function(e,t){let r=a.Children.toArray(e).filter(Boolean);return r.reduce((e,o,n)=>(e.push(o),n<r.length-1&&e.push(a.cloneElement(t,{key:`separator-${n}`})),e),[])}(y,Z):y}))})}({createStyledComponent:(0,x.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,R.i)({props:e,name:"MuiStack"})})},53281:function(e,t,r){r.d(t,{Z:function(){return h}});var o=r(81500),n=r(32324),a=r(35106),i=r(70316),s=r(65951),l=r(28057),u=r(34519),c=r(11379),d=r(9049);function f(e){return(0,d.ZP)("MuiTableContainer",e)}(0,c.Z)("MuiTableContainer",["root"]);var p=r(94655);let v=["className","component"],Z=e=>{let{classes:t}=e;return(0,s.Z)({root:["root"]},f,t)},m=(0,u.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var h=a.forwardRef(function(e,t){let r=(0,l.i)({props:e,name:"MuiTableContainer"}),{className:a,component:s="div"}=r,u=(0,n.Z)(r,v),c=(0,o.Z)({},r,{component:s}),d=Z(c);return(0,p.jsx)(m,(0,o.Z)({ref:t,as:s,className:(0,i.Z)(d.root,a),ownerState:c},u))})},11254:function(e,t,r){r.d(t,{Z:function(){return g}});var o=r(81500),n=r(32324),a=r(35106),i=r(70316),s=r(65951),l=r(70210),u=r(28057),c=r(34519),d=r(11379),f=r(9049);function p(e){return(0,f.ZP)("MuiTableHead",e)}(0,d.Z)("MuiTableHead",["root"]);var v=r(94655);let Z=["className","component"],m=e=>{let{classes:t}=e;return(0,s.Z)({root:["root"]},p,t)},h=(0,c.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),y={variant:"head"},C="thead";var g=a.forwardRef(function(e,t){let r=(0,u.i)({props:e,name:"MuiTableHead"}),{className:a,component:s=C}=r,c=(0,n.Z)(r,Z),d=(0,o.Z)({},r,{component:s}),f=m(d);return(0,v.jsx)(l.Z.Provider,{value:y,children:(0,v.jsx)(h,(0,o.Z)({as:s,className:(0,i.Z)(f.root,a),ref:t,role:s===C?null:"rowgroup",ownerState:d},c))})})},48442:function(e,t,r){r.d(t,{Z:function(){return y}});var o=r(81500),n=r(32324),a=r(14526),i=r(41499),s=r(8557),l=r(72686);let u=["ownerState"],c=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function p(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}let v=(0,s.Z)(),Z=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function m({defaultTheme:e,theme:t,themeId:r}){return 0===Object.keys(t).length?e:t[r]||t}function h(e,t,r){let{ownerState:i}=t,s=(0,n.Z)(t,u),l="function"==typeof e?e((0,o.Z)({ownerState:i},s)):e;if(Array.isArray(l))return l.flatMap(e=>h(e,(0,o.Z)({ownerState:i},s),r));if(l&&"object"==typeof l&&Array.isArray(l.variants)){let{variants:e=[]}=l,t=(0,n.Z)(l,c);return e.forEach(e=>{let n=!0;if("function"==typeof e.props?n=e.props((0,o.Z)({ownerState:i},s,i)):Object.keys(e.props).forEach(t=>{(null==i?void 0:i[t])!==e.props[t]&&s[t]!==e.props[t]&&(n=!1)}),n){Array.isArray(t)||(t=[t]);let n="function"==typeof e.style?e.style((0,o.Z)({ownerState:i},s,i)):e.style;t.push(r?p((0,a.internal_serializeStyles)(n),r):n)}}),t}return r?p((0,a.internal_serializeStyles)(l),r):l}var y=function(e={}){let{themeId:t,defaultTheme:r=v,rootShouldForwardProp:s=f,slotShouldForwardProp:u=f}=e,c=e=>(0,l.Z)((0,o.Z)({},e,{theme:m((0,o.Z)({},e,{defaultTheme:r,themeId:t}))}));return c.__mui_systemSx=!0,(e,l={})=>{var p;let v;(0,a.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));let{name:y,slot:C,skipVariantsResolver:g,skipSx:M,overridesResolver:w=(p=Z(C))?(e,t)=>t[p]:null}=l,x=(0,n.Z)(l,d),R=y&&y.startsWith("Mui")||C?"components":"custom",b=void 0!==g?g:C&&"Root"!==C&&"root"!==C||!1,S=M||!1,k=f;"Root"===C||"root"===C?k=s:C?k=u:"string"==typeof e&&e.charCodeAt(0)>96&&(k=void 0);let j=(0,a.default)(e,(0,o.Z)({shouldForwardProp:k,label:v},x)),P=e=>"function"==typeof e&&e.__emotion_real!==e||(0,i.P)(e)?n=>{let a=m({theme:n.theme,defaultTheme:r,themeId:t});return h(e,(0,o.Z)({},n,{theme:a}),a.modularCssLayers?R:void 0)}:e,N=(n,...a)=>{let i=P(n),s=a?a.map(P):[];y&&w&&s.push(e=>{let n=m((0,o.Z)({},e,{defaultTheme:r,themeId:t}));if(!n.components||!n.components[y]||!n.components[y].styleOverrides)return null;let a=n.components[y].styleOverrides,i={};return Object.entries(a).forEach(([t,r])=>{i[t]=h(r,(0,o.Z)({},e,{theme:n}),n.modularCssLayers?"theme":void 0)}),w(e,i)}),y&&!b&&s.push(e=>{var n;let a=m((0,o.Z)({},e,{defaultTheme:r,themeId:t}));return h({variants:null==a||null==(n=a.components)||null==(n=n[y])?void 0:n.variants},(0,o.Z)({},e,{theme:a}),a.modularCssLayers?"theme":void 0)}),S||s.push(c);let l=s.length-a.length;if(Array.isArray(n)&&l>0){let e=Array(l).fill("");(i=[...n,...e]).raw=[...n.raw,...e]}let u=j(i,...s);return e.muiName&&(u.muiName=e.muiName),u};return j.withConfig&&(N.withConfig=j.withConfig),N}}()},54569:function(e,t,r){r.d(t,{Z:function(){return a}});var o=r(71483),n=r(32730);function a(e){let{props:t,name:r,defaultTheme:a,themeId:i}=e,s=(0,n.Z)(a);return i&&(s=s[i]||s),function(e){let{theme:t,name:r,props:n}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?(0,o.Z)(t.components[r].defaultProps,n):n}({theme:s,name:r,props:t})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8314],{87685:function(){}},function(n){n.O(0,[3669,2757,1744],function(){return n(n.s=87685)}),_N_E=n.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9674],{18890:function(e,t,r){Promise.resolve().then(r.bind(r,53693))},71185:function(e,t,r){"use strict";var i=r(8091);t.Z=void 0;var n=i(r(66758)),l=r(94655);t.Z=(0,n.default)((0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},69123:function(e,t,r){"use strict";var i=r(32324),n=r(81500),l=r(35106),a=r(70316),o=r(65951),s=r(64577),c=r(34519),d=r(28057),u=r(16945),h=r(94655);let x=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Z=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:l,orientation:a,textAlign:s,variant:c}=e;return(0,o.Z)({root:["root",t&&"absolute",c,l&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},u.V,i)},m=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),v=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),f=l.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:l=!1,children:o,className:s,component:c=o?"div":"hr",flexItem:u=!1,light:f=!1,orientation:p="horizontal",role:g="hr"!==c?"separator":void 0,textAlign:j="center",variant:b="fullWidth"}=r,y=(0,i.Z)(r,x),w=(0,n.Z)({},r,{absolute:l,component:c,flexItem:u,light:f,orientation:p,role:g,textAlign:j,variant:b}),C=Z(w);return(0,h.jsx)(m,(0,n.Z)({as:c,className:(0,a.Z)(C.root,s),role:g,ref:t,ownerState:w},y,{children:o?(0,h.jsx)(v,{className:C.wrapper,ownerState:w,children:o}):null}))});f.muiSkipListHighlight=!0,t.Z=f},16945:function(e,t,r){"use strict";r.d(t,{V:function(){return l}});var i=r(11379),n=r(9049);function l(e){return(0,n.ZP)("MuiDivider",e)}let a=(0,i.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.Z=a},53281:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(28057),c=r(34519),d=r(11379),u=r(9049);function h(e){return(0,u.ZP)("MuiTableContainer",e)}(0,d.Z)("MuiTableContainer",["root"]);var x=r(94655);let Z=["className","component"],m=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},h,t)},v=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var f=l.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:l,component:o="div"}=r,c=(0,n.Z)(r,Z),d=(0,i.Z)({},r,{component:o}),u=m(d);return(0,x.jsx)(v,(0,i.Z)({ref:t,as:o,className:(0,a.Z)(u.root,l),ownerState:d},c))})},11254:function(e,t,r){"use strict";r.d(t,{Z:function(){return j}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(70210),c=r(28057),d=r(34519),u=r(11379),h=r(9049);function x(e){return(0,h.ZP)("MuiTableHead",e)}(0,u.Z)("MuiTableHead",["root"]);var Z=r(94655);let m=["className","component"],v=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},x,t)},f=(0,d.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),p={variant:"head"},g="thead";var j=l.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiTableHead"}),{className:l,component:o=g}=r,d=(0,n.Z)(r,m),u=(0,i.Z)({},r,{component:o}),h=v(u);return(0,Z.jsx)(s.Z.Provider,{value:p,children:(0,Z.jsx)(f,(0,i.Z)({as:o,className:(0,a.Z)(h.root,l),ref:t,role:o===g?null:"rowgroup",ownerState:u},d))})})},53693:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return R}});var i=r(94655),n=r(35106),l=r(7281),a=r(93017),o=r(81071),s=r(31317),c=r(5632),d=r(6986),u=r(53281),h=r(69899),x=r(21138),Z=r(11254),m=r(70366),v=r(47001),f=r(84811),p=r(25333);function g(e){let{users:t,onUserClick:r}=e;return 0===t.length?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",p:4},children:(0,i.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"No users found"})}):(0,i.jsx)(u.Z,{component:h.Z,children:(0,i.jsxs)(x.Z,{children:[(0,i.jsx)(Z.Z,{children:(0,i.jsxs)(m.Z,{children:[(0,i.jsx)(v.Z,{children:"Email"}),(0,i.jsx)(v.Z,{children:"Name"}),(0,i.jsx)(v.Z,{children:"Role"}),(0,i.jsx)(v.Z,{children:"Status"}),(0,i.jsx)(v.Z,{children:"Created At"})]})}),(0,i.jsx)(f.Z,{children:t.map(e=>(0,i.jsxs)(m.Z,{hover:!0,onClick:()=>r(e),sx:{cursor:"pointer"},children:[(0,i.jsx)(v.Z,{children:e.email}),(0,i.jsx)(v.Z,{children:e.name||"N/A"}),(0,i.jsx)(v.Z,{children:"admin"===e.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})}),(0,i.jsx)(v.Z,{children:e.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})}),(0,i.jsx)(v.Z,{children:new Date(e.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]},e.id))})]})})}var j=r(99770),b=r(62508),y=r(79983),w=r(5682),C=r(69123),A=r(71185);function S(e){let{user:t,open:r,onClose:n}=e;return(0,i.jsxs)(j.Z,{open:r,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,i.jsx)(b.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(s.Z,{variant:"h6",children:"User Details"}),(0,i.jsx)(y.Z,{onClick:n,size:"small","aria-label":"close",children:(0,i.jsx)(A.Z,{})})]})}),(0,i.jsx)(w.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Email"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.email})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Name"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.name||"N/A"})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Role"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:"admin"===t.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Status"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:t.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})})]}),(0,i.jsx)(C.Z,{}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Created At"}),(0,i.jsx)(s.Z,{variant:"body2",children:new Date(t.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"User ID"}),(0,i.jsx)(s.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:t.id})]})]})})]})}function R(){let{data:e,isLoading:t,isError:r,error:u}=(0,c.a)({queryKey:["admin","users"],queryFn:async()=>{let{data:e,error:t}=await d.zB.listUsers({query:{}});if(t)throw Error(t.message||"Failed to fetch users");return(null==e?void 0:e.users)?e.users.map(e=>{var t,r,i;return{id:e.id,email:e.email,name:null!==(t=e.name)&&void 0!==t?t:null,role:null!==(r=e.role)&&void 0!==r?r:"user",banned:null!==(i=e.banned)&&void 0!==i&&i,createdAt:new Date(e.createdAt)}}):[]}}),[h,x]=(0,n.useState)(null);return t?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:(0,i.jsx)(a.Z,{})}):r?(0,i.jsx)(l.Z,{sx:{p:3},children:(0,i.jsxs)(o.Z,{severity:"error",children:["Failed to load users. ",(null==u?void 0:u.message)||"Please try again later."]})}):(0,i.jsxs)(l.Z,{sx:{p:3},children:[(0,i.jsx)(s.Z,{variant:"h4",component:"h1",gutterBottom:!0,children:"User Management"}),(0,i.jsx)(g,{users:e||[],onUserClick:e=>{x(e)}}),h&&(0,i.jsx)(S,{user:h,open:!0,onClose:()=>{x(null)}})]})}},6986:function(e,t,r){"use strict";r.d(t,{Cp:function(){return h},Nq:function(){return u},cg:function(){return o},kP:function(){return d},w7:function(){return s},y1:function(){return c},zB:function(){return x}});var i=r(77054),n=r(61648),l=r(35016);let a=(0,i.X)({baseURL:l.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,n.zB)()]}),{signIn:o,signOut:s,signUp:c,useSession:d,updateUser:u,changePassword:h}=a,x=a.admin}},function(e){e.O(0,[6812,9760,6758,680,1071,540,4416,2542,880,9654,3669,2757,1744],function(){return e(e.s=18890)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5931],{66289:function(e,t,r){Promise.resolve().then(r.bind(r,12256))},71185:function(e,t,r){"use strict";var i=r(8091);t.Z=void 0;var n=i(r(66758)),l=r(94655);t.Z=(0,n.default)((0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},69123:function(e,t,r){"use strict";var i=r(32324),n=r(81500),l=r(35106),a=r(70316),o=r(65951),s=r(64577),c=r(34519),d=r(28057),u=r(16945),h=r(94655);let x=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Z=e=>{let{absolute:t,children:r,classes:i,flexItem:n,light:l,orientation:a,textAlign:s,variant:c}=e;return(0,o.Z)({root:["root",t&&"absolute",c,l&&"light","vertical"===a&&"vertical",n&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},u.V,i)},m=(0,c.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,s.Fq)(t.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,n.Z)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,n.Z)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),v=(0,c.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:r}=e;return(0,n.Z)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),f=l.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiDivider"}),{absolute:l=!1,children:o,className:s,component:c=o?"div":"hr",flexItem:u=!1,light:f=!1,orientation:p="horizontal",role:g="hr"!==c?"separator":void 0,textAlign:j="center",variant:b="fullWidth"}=r,y=(0,i.Z)(r,x),w=(0,n.Z)({},r,{absolute:l,component:c,flexItem:u,light:f,orientation:p,role:g,textAlign:j,variant:b}),C=Z(w);return(0,h.jsx)(m,(0,n.Z)({as:c,className:(0,a.Z)(C.root,s),role:g,ref:t,ownerState:w},y,{children:o?(0,h.jsx)(v,{className:C.wrapper,ownerState:w,children:o}):null}))});f.muiSkipListHighlight=!0,t.Z=f},16945:function(e,t,r){"use strict";r.d(t,{V:function(){return l}});var i=r(11379),n=r(9049);function l(e){return(0,n.ZP)("MuiDivider",e)}let a=(0,i.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);t.Z=a},53281:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(28057),c=r(34519),d=r(11379),u=r(9049);function h(e){return(0,u.ZP)("MuiTableContainer",e)}(0,d.Z)("MuiTableContainer",["root"]);var x=r(94655);let Z=["className","component"],m=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},h,t)},v=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var f=l.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:l,component:o="div"}=r,c=(0,n.Z)(r,Z),d=(0,i.Z)({},r,{component:o}),u=m(d);return(0,x.jsx)(v,(0,i.Z)({ref:t,as:o,className:(0,a.Z)(u.root,l),ownerState:d},c))})},11254:function(e,t,r){"use strict";r.d(t,{Z:function(){return j}});var i=r(81500),n=r(32324),l=r(35106),a=r(70316),o=r(65951),s=r(70210),c=r(28057),d=r(34519),u=r(11379),h=r(9049);function x(e){return(0,h.ZP)("MuiTableHead",e)}(0,u.Z)("MuiTableHead",["root"]);var Z=r(94655);let m=["className","component"],v=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"]},x,t)},f=(0,d.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),p={variant:"head"},g="thead";var j=l.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiTableHead"}),{className:l,component:o=g}=r,d=(0,n.Z)(r,m),u=(0,i.Z)({},r,{component:o}),h=v(u);return(0,Z.jsx)(s.Z.Provider,{value:p,children:(0,Z.jsx)(f,(0,i.Z)({as:o,className:(0,a.Z)(h.root,l),ref:t,role:o===g?null:"rowgroup",ownerState:u},d))})})},12256:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return R}});var i=r(94655),n=r(35106),l=r(7281),a=r(93017),o=r(81071),s=r(31317),c=r(5632),d=r(6986),u=r(53281),h=r(69899),x=r(21138),Z=r(11254),m=r(70366),v=r(47001),f=r(84811),p=r(25333);function g(e){let{users:t,onUserClick:r}=e;return 0===t.length?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",p:4},children:(0,i.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"No users found"})}):(0,i.jsx)(u.Z,{component:h.Z,children:(0,i.jsxs)(x.Z,{children:[(0,i.jsx)(Z.Z,{children:(0,i.jsxs)(m.Z,{children:[(0,i.jsx)(v.Z,{children:"Email"}),(0,i.jsx)(v.Z,{children:"Name"}),(0,i.jsx)(v.Z,{children:"Role"}),(0,i.jsx)(v.Z,{children:"Status"}),(0,i.jsx)(v.Z,{children:"Created At"})]})}),(0,i.jsx)(f.Z,{children:t.map(e=>(0,i.jsxs)(m.Z,{hover:!0,onClick:()=>r(e),sx:{cursor:"pointer"},children:[(0,i.jsx)(v.Z,{children:e.email}),(0,i.jsx)(v.Z,{children:e.name||"N/A"}),(0,i.jsx)(v.Z,{children:"admin"===e.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})}),(0,i.jsx)(v.Z,{children:e.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})}),(0,i.jsx)(v.Z,{children:new Date(e.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]},e.id))})]})})}var j=r(99770),b=r(62508),y=r(79983),w=r(5682),C=r(69123),A=r(71185);function S(e){let{user:t,open:r,onClose:n}=e;return(0,i.jsxs)(j.Z,{open:r,onClose:n,maxWidth:"sm",fullWidth:!0,children:[(0,i.jsx)(b.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(s.Z,{variant:"h6",children:"User Details"}),(0,i.jsx)(y.Z,{onClick:n,size:"small","aria-label":"close",children:(0,i.jsx)(A.Z,{})})]})}),(0,i.jsx)(w.Z,{children:(0,i.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Email"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.email})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Name"}),(0,i.jsx)(s.Z,{variant:"body1",children:t.name||"N/A"})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Role"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:"admin"===t.role?(0,i.jsx)(p.Z,{label:"Admin",color:"primary",size:"small"}):(0,i.jsx)(p.Z,{label:"User",size:"small"})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Status"}),(0,i.jsx)(l.Z,{sx:{mt:.5},children:t.banned?(0,i.jsx)(p.Z,{label:"Banned",color:"error",size:"small"}):(0,i.jsx)(p.Z,{label:"Active",color:"success",size:"small"})})]}),(0,i.jsx)(C.Z,{}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Created At"}),(0,i.jsx)(s.Z,{variant:"body2",children:new Date(t.createdAt).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]}),(0,i.jsxs)(l.Z,{children:[(0,i.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"User ID"}),(0,i.jsx)(s.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:t.id})]})]})})]})}function R(){let{data:e,isLoading:t,isError:r,error:u}=(0,c.a)({queryKey:["admin","users"],queryFn:async()=>{let{data:e,error:t}=await d.zB.listUsers({query:{}});if(t)throw Error(t.message||"Failed to fetch users");return(null==e?void 0:e.users)?e.users.map(e=>{var t,r,i;return{id:e.id,email:e.email,name:null!==(t=e.name)&&void 0!==t?t:null,role:null!==(r=e.role)&&void 0!==r?r:"user",banned:null!==(i=e.banned)&&void 0!==i&&i,createdAt:new Date(e.createdAt)}}):[]}}),[h,x]=(0,n.useState)(null);return t?(0,i.jsx)(l.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:(0,i.jsx)(a.Z,{})}):r?(0,i.jsx)(l.Z,{sx:{p:3},children:(0,i.jsxs)(o.Z,{severity:"error",children:["Failed to load users. ",(null==u?void 0:u.message)||"Please try again later."]})}):(0,i.jsxs)(l.Z,{sx:{p:3},children:[(0,i.jsx)(s.Z,{variant:"h4",component:"h1",gutterBottom:!0,children:"User Management"}),(0,i.jsx)(g,{users:e||[],onUserClick:e=>{x(e)}}),h&&(0,i.jsx)(S,{user:h,open:!0,onClose:()=>{x(null)}})]})}},6986:function(e,t,r){"use strict";r.d(t,{Cp:function(){return h},Nq:function(){return u},cg:function(){return o},kP:function(){return d},w7:function(){return s},y1:function(){return c},zB:function(){return x}});var i=r(77054),n=r(61648),l=r(35016);let a=(0,i.X)({baseURL:l.env.NEXT_PUBLIC_BETTER_AUTH_URL||"",plugins:[(0,n.zB)()]}),{signIn:o,signOut:s,signUp:c,useSession:d,updateUser:u,changePassword:h}=a,x=a.admin}},function(e){e.O(0,[6812,9760,6758,680,1071,540,4416,2542,880,9654,3669,2757,1744],function(){return e(e.s=66289)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4743],{3590:function(e,t,r){Promise.resolve().then(r.bind(r,52791))},52791:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return eS}});var n=r(94655),s=r(35106),i=r(74228),a=r(7281),o=r(69899),l=r(31317),c=r(25333),d=r(76492),u=r(80620),x=r(78439),h=r(56813),m=r(26892),p=r(84840),g=r(628),j=r(41565),f=r(10721),v=r(69178),Z=r(46207),y=r(45354),b=r(35847);function S(e){var t,r,s;let{stats:i,isLoading:o}=e;if(o)return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:[0,1,2,3].map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{children:(0,n.jsxs)(j.Z,{children:[(0,n.jsx)(f.Z,{variant:"text",width:"60%"}),(0,n.jsx)(f.Z,{variant:"text",width:"40%",height:40}),(0,n.jsx)(f.Z,{variant:"text",width:"80%"})]})})},e))});let c=null!==(t=null==i?void 0:i.total)&&void 0!==t?t:0,d=c>0?((null!==(r=null==i?void 0:i.byStatus.success)&&void 0!==r?r:0)/c*100).toFixed(1):"0.0",u=null!==(s=null==i?void 0:i.byStatus.failure)&&void 0!==s?s:0,x=i?Object.keys(i.byActor).length:0,h=[{title:"Total Logs",value:c.toLocaleString(),icon:(0,n.jsx)(v.Z,{fontSize:"large"}),color:"#1bd96a",description:"All audit log entries"},{title:"Success Rate",value:"".concat(d,"%"),icon:(0,n.jsx)(Z.Z,{fontSize:"large"}),color:"#22c55e",description:"Successful operations"},{title:"Failures",value:u,icon:(0,n.jsx)(y.Z,{fontSize:"large"}),color:"#ef4444",description:"Failed operations"},{title:"Active Users",value:x,icon:(0,n.jsx)(b.Z,{fontSize:"large"}),color:"#3b82f6",description:"Unique actors"}];return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:h.map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:e.color}},children:(0,n.jsxs)(j.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:e.title}),(0,n.jsx)(a.Z,{sx:{color:e.color,opacity:.8},children:e.icon})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:1},children:e.value}),(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:e.description})]})})},e.title))})}var C=r(97436),w=r(62328),T=r(7178),k=r(29793),z=r(75726),N=r(30417),R=r(87716),A=r(79983),E=r(89923),I=r(10297),F=r(50880),L=r(54617),D=r(42431),P=r(81960),W=r(84284),M=r(82925);function O(e){return"server"===e?M.Xn:"player"===e?M.KK:M.xg}function U(e){let t,{filters:r,onFiltersChange:i,onExport:o}=e,[d,u]=(0,s.useState)(!0),x=(t=0,r.action&&t++,r.actor&&t++,r.targetType&&t++,r.targetName&&t++,r.status&&t++,r.from&&t++,r.to&&t++,t),h=O(r.targetType),m=(e,t)=>{let n={...r};""===t||void 0===t?delete n[e]:n[e]=t,"targetType"===e&&n.action&&!O(t).includes(n.action)&&delete n.action,n.offset=0,i(n)};return(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:d?2:0},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsxs)(A.Z,{onClick:()=>u(!d),size:"small","aria-label":d?"Collapse filters":"Expand filters",children:[(0,n.jsx)(F.Z,{}),d?(0,n.jsx)(W.Z,{sx:{fontSize:14}}):(0,n.jsx)(P.Z,{sx:{fontSize:14}})]}),(0,n.jsx)(l.Z,{variant:"subtitle2",color:"text.secondary",children:"Filters"}),x>0&&(0,n.jsx)(c.Z,{label:x,size:"small",color:"primary",sx:{height:20,fontSize:"0.7rem"}})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[x>0&&(0,n.jsx)(N.Z,{size:"small",startIcon:(0,n.jsx)(L.Z,{}),onClick:()=>{i({limit:r.limit,sort:r.sort})},color:"inherit",children:"Clear All"}),o&&(0,n.jsx)(N.Z,{size:"small",variant:"outlined",onClick:o,children:"Export"})]})]}),(0,n.jsx)(R.Z,{in:d,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:2,flexWrap:"wrap"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1,alignItems:"center"},children:[(0,n.jsx)(C.Z,{type:"date",label:"From",size:"small",value:r.from?r.from.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("from",t?"".concat(t,"T00:00:00Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"~"}),(0,n.jsx)(C.Z,{type:"date",label:"To",size:"small",value:r.to?r.to.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("to",t?"".concat(t,"T23:59:59Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}})]}),(0,n.jsxs)(k.Z,{size:"small",sx:{minWidth:160},children:[(0,n.jsx)(z.Z,{children:"Action"}),(0,n.jsxs)(w.Z,{value:r.action||"",label:"Action",onChange:e=>m("action",e.target.value||void 0),children:[(0,n.jsx)(T.Z,{value:"",children:"All Actions"}),h.map(e=>(0,n.jsx)(T.Z,{value:e,children:M.n3[e]||e},e))]})]}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.targetType||"",exclusive:!0,onChange:(e,t)=>m("targetType",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All targets",children:"All"}),(0,n.jsx)(E.Z,{value:"server","aria-label":"Server targets",children:"Server"}),(0,n.jsx)(E.Z,{value:"player","aria-label":"Player targets",children:"Player"})]})}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.status||"",exclusive:!0,onChange:(e,t)=>m("status",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All statuses",children:"All"}),(0,n.jsx)(E.Z,{value:"success","aria-label":"Success only",children:"Success"}),(0,n.jsx)(E.Z,{value:"failure","aria-label":"Failure only",children:"Failure"})]})}),(0,n.jsx)(C.Z,{label:"Target Name",placeholder:"Search...",size:"small",value:r.targetName||"",onChange:e=>m("targetName",e.target.value||void 0),InputProps:{startAdornment:(0,n.jsx)(D.Z,{sx:{color:"text.secondary",mr:.5,fontSize:18}})},sx:{minWidth:160}}),(0,n.jsx)(C.Z,{label:"Actor",placeholder:"e.g., api:admin",size:"small",value:r.actor||"",onChange:e=>m("actor",e.target.value||void 0),sx:{minWidth:140}})]})})]})}var q=r(21138),K=r(84811),_=r(47001),B=r(53281),V=r(11254),X=r(70366),J=r(6406),H=r(95511),G=r(81071),Q=r(89161),Y=r(60236),$=r(27171),ee=r(30114),et=r(46725);function er(e){var t,r;let{log:i,onClick:o}=e,[d,u]=(0,s.useState)("failure"===i.status),x=i.details&&Object.keys(i.details).length>0,p="failure"===i.status&&i.errorMessage,g=x||p,j=(t=i.targetType,r=i.targetName,"server"===t?"/servers/".concat(encodeURIComponent(r)):"player"===t?"/players":null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(X.Z,{hover:!0,sx:{cursor:"pointer","&:last-child td, &:last-child th":{border:0}},onClick:()=>null==o?void 0:o(i),tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),null==o||o(i))},role:"button","aria-label":"".concat(i.action," by ").concat(i.actor," on ").concat(i.targetName),children:[(0,n.jsx)(_.Z,{padding:"checkbox",sx:{width:48},children:g&&(0,n.jsx)(A.Z,{size:"small",onClick:e=>{e.stopPropagation(),u(!d)},"aria-label":d?"Collapse details":"Expand details",children:d?(0,n.jsx)(Y.Z,{}):(0,n.jsx)(Q.Z,{})})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(H.Z,{title:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(i.timestamp),arrow:!0,children:(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/1e3),s=Math.floor(n/60),i=Math.floor(s/60),a=Math.floor(i/24);return n<60?"just now":s<60?"".concat(s,"m ago"):i<24?"".concat(i,"h ago"):a<7?"".concat(a,"d ago"):new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(r)}(i.timestamp)})})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(h.I,{action:i.action})}),(0,n.jsx)(_.Z,{children:i.actor.startsWith("cli:")?(0,n.jsx)(c.Z,{label:i.actor.replace("cli:",""),size:"small",variant:"outlined",sx:{fontSize:"0.75rem"}}):(0,n.jsx)(l.Z,{variant:"body2",children:i.actor.replace("api:","")})}),(0,n.jsx)(_.Z,{children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[function(e){switch(e){case"server":return(0,n.jsx)($.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});case"player":return(0,n.jsx)(ee.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});default:return null}}(i.targetType),j?(0,n.jsx)(et.default,{href:j,style:{textDecoration:"none"},onClick:e=>e.stopPropagation(),children:(0,n.jsx)(l.Z,{variant:"body2",sx:{color:"primary.main","&:hover":{textDecoration:"underline"}},children:i.targetName})}):(0,n.jsx)(l.Z,{variant:"body2",children:i.targetName})]})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(m.c,{status:i.status})})]}),g&&(0,n.jsx)(X.Z,{children:(0,n.jsx)(_.Z,{sx:{py:0},colSpan:6,children:(0,n.jsx)(R.Z,{in:d,timeout:"auto",unmountOnExit:!0,children:(0,n.jsxs)(a.Z,{sx:{py:2,px:2},children:[p&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:2},children:i.errorMessage}),x&&(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{mb:1,display:"block"},children:"Details"}),(0,n.jsx)(q.Z,{size:"small",sx:{width:"auto"},children:(0,n.jsx)(K.Z,{children:Object.entries(i.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0},children:t}),(0,n.jsx)(_.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]})]})})})})]})}function en(e){let{logs:t,total:r,isLoading:s,error:i,filters:a,onFiltersChange:c,onRowClick:d,onRetry:u}=e,x=Math.floor((a.offset||0)/(a.limit||50)),h=a.limit||50;return s?(0,n.jsx)(o.Z,{children:(0,n.jsx)(B.Z,{children:(0,n.jsxs)(q.Z,{children:[(0,n.jsx)(V.Z,{children:(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox"}),(0,n.jsx)(_.Z,{children:"Timestamp"}),(0,n.jsx)(_.Z,{children:"Action"}),(0,n.jsx)(_.Z,{children:"Actor"}),(0,n.jsx)(_.Z,{children:"Target"}),(0,n.jsx)(_.Z,{children:"Status"})]})}),(0,n.jsx)(K.Z,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox"}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:80})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"rounded",width:70,height:24})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:60})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:100})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"rounded",width:50,height:24})})]},t))})]})})}):i?(0,n.jsx)(G.Z,{severity:"error",action:u&&(0,n.jsx)(N.Z,{color:"inherit",size:"small",onClick:u,children:"Retry"}),children:i.message||"Failed to load audit logs"}):0===t.length?(0,n.jsxs)(o.Z,{sx:{p:6,textAlign:"center"},children:[(0,n.jsx)(v.Z,{sx:{fontSize:64,color:"text.disabled",mb:2}}),(0,n.jsx)(l.Z,{variant:"h6",color:"text.secondary",gutterBottom:!0,children:"No audit logs found"}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.disabled",sx:{mb:2},children:"Try adjusting your filters or check back later."}),(0,n.jsx)(N.Z,{variant:"outlined",size:"small",onClick:()=>c({limit:a.limit,sort:a.sort}),children:"Reset Filters"})]}):(0,n.jsxs)(o.Z,{children:[(0,n.jsx)(B.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(q.Z,{size:"small",children:[(0,n.jsx)(V.Z,{children:(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox",sx:{width:48}}),(0,n.jsx)(_.Z,{sx:{fontWeight:600,whiteSpace:"nowrap"},children:"Timestamp"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Action"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Actor"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Target"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Status"})]})}),(0,n.jsx)(K.Z,{children:t.map(e=>(0,n.jsx)(er,{log:e,onClick:d},e.id))})]})}),(0,n.jsx)(J.Z,{component:"div",count:r,page:x,onPageChange:(e,t)=>{c({...a,offset:t*h})},rowsPerPage:h,onRowsPerPageChange:e=>{let t=parseInt(e.target.value,10);c({...a,limit:t,offset:0})},rowsPerPageOptions:[25,50,100],"aria-label":"Audit log pagination"})]})}var es=r(78765),ei=r(69123),ea=r(33402),eo=r(60097),el=r(90158),ec=r(58347),ed=r(73424),eu=r(93017),ex=r(71185),eh=r(84509);function em(e){let{logs:t}=e;return 0===t.length?(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No related logs found"}):(0,n.jsx)(el.Z,{dense:!0,sx:{py:0},children:t.map(e=>(0,n.jsx)(ec.ZP,{sx:{px:0,py:1,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(ed.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(h.I,{action:e.action,size:"small"}),e.targetName&&(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e.targetName})]}),secondary:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})},e.id))})}function ep(e){var t,r,i,o,c;let{log:d,open:u,onClose:x}=e,[p,g]=(0,s.useState)(0),{data:j,isLoading:f}=(0,eh.VM)(null!==(t=null==d?void 0:d.id)&&void 0!==t?t:null,{enabled:u&&!!d});return(0,n.jsxs)(es.ZP,{anchor:"right",open:u,onClose:x,sx:{"& .MuiDrawer-paper":{width:{xs:"100%",sm:420},maxWidth:"100%"}},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(l.Z,{variant:"h6",component:"h2",children:"Audit Log Detail"}),(0,n.jsx)(A.Z,{onClick:x,"aria-label":"Close detail drawer",autoFocus:!0,children:(0,n.jsx)(ex.Z,{})})]}),(0,n.jsx)(a.Z,{sx:{p:2,overflow:"auto",flex:1},children:d?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"ID"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.8rem",wordBreak:"break-all"},children:d.id})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Timestamp"}),(0,n.jsx)(l.Z,{variant:"body2",children:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(d.timestamp)})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:3,mb:3},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Action"}),(0,n.jsx)(h.I,{action:d.action,size:"medium"})]}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Status"}),(0,n.jsx)(m.c,{status:d.status,size:"medium"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Actor"}),(0,n.jsx)(l.Z,{variant:"body2",children:d.actor})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Target"}),(0,n.jsxs)(l.Z,{variant:"body2",children:[d.targetType,"/",d.targetName]})]}),"failure"===d.status&&d.errorMessage&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:3},children:d.errorMessage}),d.details&&Object.keys(d.details).length>0&&(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(ei.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Details"}),(0,n.jsx)(q.Z,{size:"small",children:(0,n.jsx)(K.Z,{children:Object.entries(d.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0,width:"40%"},children:t}),(0,n.jsx)(_.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]}),(0,n.jsx)(ei.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Related Logs"}),f?(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:3},children:(0,n.jsx)(eu.Z,{size:24})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ea.Z,{value:p,onChange:(e,t)=>g(t),sx:{mb:1},children:[(0,n.jsx)(eo.Z,{label:"Same Target (".concat(null!==(r=null==j?void 0:j.relatedLogs.sameTarget.length)&&void 0!==r?r:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}}),(0,n.jsx)(eo.Z,{label:"Same Actor (".concat(null!==(i=null==j?void 0:j.relatedLogs.sameActor.length)&&void 0!==i?i:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}})]}),0===p&&(0,n.jsx)(em,{logs:null!==(o=null==j?void 0:j.relatedLogs.sameTarget)&&void 0!==o?o:[]}),1===p&&(0,n.jsx)(em,{logs:null!==(c=null==j?void 0:j.relatedLogs.sameActor)&&void 0!==c?c:[]})]})]}):(0,n.jsx)(l.Z,{color:"text.secondary",children:"No log selected"})})]})}var eg=r(99770),ej=r(62508),ef=r(5682),ev=r(76678),eZ=r(15761);function ey(e){let{open:t,onClose:r,filters:i,totalCount:o}=e,[c,d]=(0,s.useState)("csv"),[u,x]=(0,s.useState)(!1),[h,m]=(0,s.useState)(null),p=function(e){let t=[];return e.action&&t.push("Action: ".concat(e.action)),e.actor&&t.push("Actor: ".concat(e.actor)),e.targetType&&t.push("Type: ".concat(e.targetType)),e.targetName&&t.push("Target: ".concat(e.targetName)),e.status&&t.push("Status: ".concat(e.status)),e.from&&t.push("From: ".concat(e.from.split("T")[0])),e.to&&t.push("To: ".concat(e.to.split("T")[0])),t}(i),g=async()=>{x(!0),m(null);try{let e=function(e,t){let r=new URLSearchParams;return r.set("format",t),e.action&&r.set("action",e.action),e.actor&&r.set("actor",e.actor),e.targetType&&r.set("targetType",e.targetType),e.targetName&&r.set("targetName",e.targetName),e.status&&r.set("status",e.status),e.from&&r.set("from",e.from),e.to&&r.set("to",e.to),"/api/audit-logs/export?".concat(r.toString())}(i,c),t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({message:"Export failed"}));throw Error(e.message||"Export failed")}let n=await t.blob(),s=window.URL.createObjectURL(n),a=document.createElement("a");a.href=s;let o=t.headers.get("Content-Disposition"),l=null==o?void 0:o.match(/filename="?([^"]+)"?/);a.download=(null==l?void 0:l[1])||"audit-logs.".concat(c),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s),r()}catch(e){m(e instanceof Error?e.message:"Export failed")}finally{x(!1)}};return(0,n.jsxs)(eg.Z,{open:t,onClose:r,maxWidth:"sm",fullWidth:!0,children:[(0,n.jsx)(ej.Z,{children:"Export Audit Logs"}),(0,n.jsxs)(ef.Z,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Format"}),(0,n.jsxs)(I.Z,{value:c,exclusive:!0,onChange:(e,t)=>t&&d(t),size:"small",children:[(0,n.jsx)(E.Z,{value:"csv",children:"CSV"}),(0,n.jsx)(E.Z,{value:"json",children:"JSON"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Applied Filters"}),p.length>0?(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:p.map(e=>(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e},e))}):(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"No filters applied (all logs)"})]}),(0,n.jsxs)(a.Z,{sx:{mb:2},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:.5},children:"Estimated Rows"}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[Math.min(o,5e3).toLocaleString()," rows"]})]}),o>5e3&&(0,n.jsxs)(G.Z,{severity:"warning",sx:{mb:2},children:["Export is limited to ",5e3.toLocaleString()," rows. Total matching logs: ",o.toLocaleString(),". Consider narrowing your filters for a complete export."]}),h&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:2},children:h})]}),(0,n.jsxs)(ev.Z,{children:[(0,n.jsx)(N.Z,{onClick:r,disabled:u,children:"Cancel"}),(0,n.jsx)(N.Z,{variant:"contained",startIcon:u?(0,n.jsx)(eu.Z,{size:16,color:"inherit"}):(0,n.jsx)(eZ.Z,{}),onClick:g,disabled:u,children:u?"Exporting...":"Export ".concat(c.toUpperCase())})]})]})}var eb=r(93757);function eS(){var e,t,r;let h=(0,i.useRouter)(),m=(0,i.useSearchParams)(),[p,g]=(0,s.useState)(()=>(function(e){let t={},r=e.get("action"),n=e.get("actor"),s=e.get("targetType"),i=e.get("targetName"),a=e.get("status"),o=e.get("from"),l=e.get("to"),c=e.get("limit"),d=e.get("offset"),u=e.get("sort");return r&&(t.action=r),n&&(t.actor=n),s&&(t.targetType=s),i&&(t.targetName=i),a&&(t.status=a),o&&(t.from=o),l&&(t.to=l),c&&(t.limit=parseInt(c,10)),d&&(t.offset=parseInt(d,10)),("timestamp:asc"===u||"timestamp:desc"===u)&&(t.sort=u),t})(m)),[j,f]=(0,s.useState)(null),[v,Z]=(0,s.useState)(!1),[y,b]=(0,s.useState)(!1),[C,w]=(0,s.useState)(0),T=(0,s.useRef)(new Set),{data:k,isLoading:z,error:N,refetch:R}=(0,eh.hT)(p),{data:A,isLoading:E}=(0,eh.DM)(),{isConnected:I}=(0,eb.D)({url:"/api/audit-logs/stream",enabled:!0,onMessage:(0,s.useCallback)(e=>{if("audit-log"===e.type){let t=e.data;if("id"in t&&"string"==typeof t.id){if(T.current.has(t.id))return;if(T.current.add(t.id),T.current.size>1e3){let e=Array.from(T.current);T.current=new Set(e.slice(e.length-500))}}w(e=>e+1)}},[]),reconnectInterval:3e3,maxReconnectAttempts:1/0});(0,s.useEffect)(()=>{let e=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.limit&&50!==e.limit&&t.set("limit",String(e.limit)),e.offset&&e.offset>0&&t.set("offset",String(e.offset)),e.sort&&"timestamp:desc"!==e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(p);e!==(m.toString()?"?".concat(m.toString()):"")&&h.replace("/audit-logs".concat(e),{scroll:!1})},[p,h,m]);let F=(0,s.useCallback)(e=>{g(e),w(0)},[]),L=(0,s.useCallback)(e=>{f(e),Z(!0)},[]),D=(0,s.useCallback)(()=>{w(0),R()},[R]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,d.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,d.Fq)(e.palette.error.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,d.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(u.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Audit Log"}),(0,n.jsx)(c.Z,{icon:(0,n.jsx)(x.Z,{sx:{fontSize:10,color:I?"success.main":"text.disabled",animation:I?"pulse 2s infinite":"none","@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}}}),label:I?"Live":"Offline",size:"small",variant:"outlined",sx:{fontSize:"0.7rem"}})]}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Monitor all management activities across your servers"})]})]})}),(0,n.jsx)(a.Z,{sx:{mb:3},children:(0,n.jsx)(S,{stats:A,isLoading:E})}),C>0&&(0,n.jsx)(a.Z,{sx:{mb:2,p:1.5,textAlign:"center",bgcolor:"primary.main",color:"primary.contrastText",borderRadius:1,cursor:"pointer","&:hover":{opacity:.9}},onClick:D,role:"button","aria-label":"".concat(C," new logs, click to refresh"),children:(0,n.jsxs)(l.Z,{variant:"body2",fontWeight:600,children:[C," new ",1===C?"log":"logs"," available - Click to refresh"]})}),(0,n.jsx)(U,{filters:p,onFiltersChange:F,onExport:()=>b(!0)}),(0,n.jsx)(en,{logs:null!==(e=null==k?void 0:k.logs)&&void 0!==e?e:[],total:null!==(t=null==k?void 0:k.total)&&void 0!==t?t:0,isLoading:z,error:N,filters:p,onFiltersChange:F,onRowClick:L,onRetry:()=>R()}),(0,n.jsx)(ep,{log:j,open:v,onClose:()=>{Z(!1),f(null)}}),(0,n.jsx)(ey,{open:y,onClose:()=>b(!1),filters:p,totalCount:null!==(r=null==k?void 0:k.total)&&void 0!==r?r:0})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",o=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:o,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function o(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},42936:function(e,t,r){"use strict";async function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...t.headers};t.body&&(r["Content-Type"]="application/json");let n=await fetch(e,{...t,headers:r});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText})),t=Error(e.message);throw t.statusCode=n.status,t.code=e.error,t}return n.json()}r.d(t,{SC:function(){return n}})},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return l},VM:function(){return o},hT:function(){return i},oL:function(){return c}});var n=r(5632),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function o(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function l(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},93757:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(35106);class s{connect(e){this.options=e,this.shouldReconnect=!0,this.establishConnection()}establishConnection(){this.options&&(this.updateState("connecting"),this.eventSource&&this.eventSource.close(),this.eventSource=new EventSource(this.options.url,{withCredentials:this.options.withCredentials||!1}),this.eventSource.onopen=()=>{this.updateState("connected"),this.retryCount=0,this.lastError=null},this.eventSource.onmessage=e=>{if(!e.data.startsWith(":"))try{var t,r;let n=JSON.parse(e.data);null===(r=this.options)||void 0===r||null===(t=r.onMessage)||void 0===t||t.call(r,n)}catch(e){console.warn("Failed to parse SSE message:",e)}},this.eventSource.onerror=()=>{var e,t;let r={message:"SSE connection error",code:"CONNECTION_ERROR",retryCount:this.retryCount,timestamp:new Date};this.lastError=r,this.updateState("error"),null===(t=this.options)||void 0===t||null===(e=t.onError)||void 0===e||e.call(t,r),this.shouldReconnect&&this.scheduleReconnect()})}scheduleReconnect(){var e,t;if(!this.options)return;let r=null!==(e=this.options.maxReconnectAttempts)&&void 0!==e?e:1/0;if(this.retryCount>=r)return;this.reconnectTimer&&clearTimeout(this.reconnectTimer);let n=null!==(t=this.options.reconnectInterval)&&void 0!==t?t:3e3;this.reconnectTimer=setTimeout(()=>{this.retryCount++,this.establishConnection()},n)}disconnect(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.updateState("disconnected")}getState(){return this.state}isConnected(){return"connected"===this.state}getLastError(){return this.lastError}getRetryCount(){return this.retryCount}reconnect(){this.retryCount++,this.shouldReconnect=!0,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.establishConnection()}updateState(e){var t,r;this.state=e,null===(r=this.options)||void 0===r||null===(t=r.onStateChange)||void 0===t||t.call(r,e)}constructor(){this.eventSource=null,this.state="disconnected",this.retryCount=0,this.lastError=null,this.reconnectTimer=null,this.options=null,this.shouldReconnect=!0}}function i(e){let{url:t,onMessage:r,onError:i,reconnectInterval:a=3e3,maxReconnectAttempts:o=1/0,enabled:l=!0,withCredentials:c=!1}=e,[d,u]=(0,n.useState)(null),[x,h]=(0,n.useState)("disconnected"),[m,p]=(0,n.useState)(null),[g,j]=(0,n.useState)(0),f=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{u(e),null==r||r(e)},[r]),Z=(0,n.useCallback)(e=>{h(e),"connected"===e&&j(0)},[]),y=(0,n.useCallback)(e=>{p(e),"number"==typeof e.retryCount&&j(e.retryCount),null==i||i(e)},[i]),b=(0,n.useCallback)(()=>{f.current&&(f.current.reconnect(),j(f.current.getRetryCount()))},[]),S=(0,n.useCallback)(()=>{f.current&&f.current.disconnect()},[]);return(0,n.useEffect)(()=>{if(!l){f.current&&(f.current.disconnect(),f.current=null);return}return f.current||(f.current=new s),f.current.connect({url:t,onMessage:v,onStateChange:Z,onError:y,reconnectInterval:a,maxReconnectAttempts:o,withCredentials:c}),()=>{f.current&&(f.current.disconnect(),f.current=null)}},[t,l,a,o,c,v,Z,y]),{data:d,isConnected:"connected"===x,state:x,error:m,retryCount:g,reconnect:b,disconnect:S}}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return o},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],o=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,6758,680,1668,7436,1071,540,4416,9810,7073,880,55,9654,8347,6909,4474,8918,6479,3669,2757,1744],function(){return e(e.s=3590)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4743],{3590:function(e,t,r){Promise.resolve().then(r.bind(r,52791))},52791:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return eS}});var n=r(94655),s=r(35106),i=r(74228),a=r(7281),o=r(69899),l=r(31317),c=r(25333),d=r(76492),u=r(80620),x=r(78439),h=r(56813),m=r(26892),p=r(84840),g=r(628),j=r(41565),f=r(10721),v=r(69178),Z=r(46207),y=r(45354),b=r(35847);function S(e){var t,r,s;let{stats:i,isLoading:o}=e;if(o)return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:[0,1,2,3].map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{children:(0,n.jsxs)(j.Z,{children:[(0,n.jsx)(f.Z,{variant:"text",width:"60%"}),(0,n.jsx)(f.Z,{variant:"text",width:"40%",height:40}),(0,n.jsx)(f.Z,{variant:"text",width:"80%"})]})})},e))});let c=null!==(t=null==i?void 0:i.total)&&void 0!==t?t:0,d=c>0?((null!==(r=null==i?void 0:i.byStatus.success)&&void 0!==r?r:0)/c*100).toFixed(1):"0.0",u=null!==(s=null==i?void 0:i.byStatus.failure)&&void 0!==s?s:0,x=i?Object.keys(i.byActor).length:0,h=[{title:"Total Logs",value:c.toLocaleString(),icon:(0,n.jsx)(v.Z,{fontSize:"large"}),color:"#1bd96a",description:"All audit log entries"},{title:"Success Rate",value:"".concat(d,"%"),icon:(0,n.jsx)(Z.Z,{fontSize:"large"}),color:"#22c55e",description:"Successful operations"},{title:"Failures",value:u,icon:(0,n.jsx)(y.Z,{fontSize:"large"}),color:"#ef4444",description:"Failed operations"},{title:"Active Users",value:x,icon:(0,n.jsx)(b.Z,{fontSize:"large"}),color:"#3b82f6",description:"Unique actors"}];return(0,n.jsx)(p.ZP,{container:!0,spacing:2,children:h.map(e=>(0,n.jsx)(p.ZP,{item:!0,xs:6,md:3,children:(0,n.jsx)(g.Z,{sx:{height:"100%",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:"4px",background:e.color}},children:(0,n.jsxs)(j.Z,{children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{fontWeight:500},children:e.title}),(0,n.jsx)(a.Z,{sx:{color:e.color,opacity:.8},children:e.icon})]}),(0,n.jsx)(l.Z,{variant:"h3",component:"div",sx:{fontWeight:700,color:"text.primary",mb:1},children:e.value}),(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",children:e.description})]})})},e.title))})}var C=r(97436),w=r(62328),T=r(7178),k=r(29793),z=r(75726),N=r(30417),R=r(87716),A=r(79983),E=r(89923),I=r(10297),F=r(50880),L=r(54617),D=r(42431),P=r(81960),W=r(84284),M=r(82925);function O(e){return"server"===e?M.Xn:"player"===e?M.KK:M.xg}function U(e){let t,{filters:r,onFiltersChange:i,onExport:o}=e,[d,u]=(0,s.useState)(!0),x=(t=0,r.action&&t++,r.actor&&t++,r.targetType&&t++,r.targetName&&t++,r.status&&t++,r.from&&t++,r.to&&t++,t),h=O(r.targetType),m=(e,t)=>{let n={...r};""===t||void 0===t?delete n[e]:n[e]=t,"targetType"===e&&n.action&&!O(t).includes(n.action)&&delete n.action,n.offset=0,i(n)};return(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:d?2:0},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsxs)(A.Z,{onClick:()=>u(!d),size:"small","aria-label":d?"Collapse filters":"Expand filters",children:[(0,n.jsx)(F.Z,{}),d?(0,n.jsx)(W.Z,{sx:{fontSize:14}}):(0,n.jsx)(P.Z,{sx:{fontSize:14}})]}),(0,n.jsx)(l.Z,{variant:"subtitle2",color:"text.secondary",children:"Filters"}),x>0&&(0,n.jsx)(c.Z,{label:x,size:"small",color:"primary",sx:{height:20,fontSize:"0.7rem"}})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1},children:[x>0&&(0,n.jsx)(N.Z,{size:"small",startIcon:(0,n.jsx)(L.Z,{}),onClick:()=>{i({limit:r.limit,sort:r.sort})},color:"inherit",children:"Clear All"}),o&&(0,n.jsx)(N.Z,{size:"small",variant:"outlined",onClick:o,children:"Export"})]})]}),(0,n.jsx)(R.Z,{in:d,children:(0,n.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:2,flexWrap:"wrap"},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:1,alignItems:"center"},children:[(0,n.jsx)(C.Z,{type:"date",label:"From",size:"small",value:r.from?r.from.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("from",t?"".concat(t,"T00:00:00Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"~"}),(0,n.jsx)(C.Z,{type:"date",label:"To",size:"small",value:r.to?r.to.split("T")[0]:"",onChange:e=>{let t=e.target.value;m("to",t?"".concat(t,"T23:59:59Z"):void 0)},InputLabelProps:{shrink:!0},sx:{minWidth:150}})]}),(0,n.jsxs)(k.Z,{size:"small",sx:{minWidth:160},children:[(0,n.jsx)(z.Z,{children:"Action"}),(0,n.jsxs)(w.Z,{value:r.action||"",label:"Action",onChange:e=>m("action",e.target.value||void 0),children:[(0,n.jsx)(T.Z,{value:"",children:"All Actions"}),h.map(e=>(0,n.jsx)(T.Z,{value:e,children:M.n3[e]||e},e))]})]}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.targetType||"",exclusive:!0,onChange:(e,t)=>m("targetType",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All targets",children:"All"}),(0,n.jsx)(E.Z,{value:"server","aria-label":"Server targets",children:"Server"}),(0,n.jsx)(E.Z,{value:"player","aria-label":"Player targets",children:"Player"})]})}),(0,n.jsx)(a.Z,{children:(0,n.jsxs)(I.Z,{value:r.status||"",exclusive:!0,onChange:(e,t)=>m("status",t||void 0),size:"small",children:[(0,n.jsx)(E.Z,{value:"","aria-label":"All statuses",children:"All"}),(0,n.jsx)(E.Z,{value:"success","aria-label":"Success only",children:"Success"}),(0,n.jsx)(E.Z,{value:"failure","aria-label":"Failure only",children:"Failure"})]})}),(0,n.jsx)(C.Z,{label:"Target Name",placeholder:"Search...",size:"small",value:r.targetName||"",onChange:e=>m("targetName",e.target.value||void 0),InputProps:{startAdornment:(0,n.jsx)(D.Z,{sx:{color:"text.secondary",mr:.5,fontSize:18}})},sx:{minWidth:160}}),(0,n.jsx)(C.Z,{label:"Actor",placeholder:"e.g., api:admin",size:"small",value:r.actor||"",onChange:e=>m("actor",e.target.value||void 0),sx:{minWidth:140}})]})})]})}var q=r(21138),K=r(84811),_=r(47001),B=r(53281),V=r(11254),X=r(70366),J=r(6406),H=r(95511),G=r(81071),Q=r(89161),Y=r(60236),$=r(27171),ee=r(30114),et=r(46725);function er(e){var t,r;let{log:i,onClick:o}=e,[d,u]=(0,s.useState)("failure"===i.status),x=i.details&&Object.keys(i.details).length>0,p="failure"===i.status&&i.errorMessage,g=x||p,j=(t=i.targetType,r=i.targetName,"server"===t?"/servers/".concat(encodeURIComponent(r)):"player"===t?"/players":null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(X.Z,{hover:!0,sx:{cursor:"pointer","&:last-child td, &:last-child th":{border:0}},onClick:()=>null==o?void 0:o(i),tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),null==o||o(i))},role:"button","aria-label":"".concat(i.action," by ").concat(i.actor," on ").concat(i.targetName),children:[(0,n.jsx)(_.Z,{padding:"checkbox",sx:{width:48},children:g&&(0,n.jsx)(A.Z,{size:"small",onClick:e=>{e.stopPropagation(),u(!d)},"aria-label":d?"Collapse details":"Expand details",children:d?(0,n.jsx)(Y.Z,{}):(0,n.jsx)(Q.Z,{})})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(H.Z,{title:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(i.timestamp),arrow:!0,children:(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/1e3),s=Math.floor(n/60),i=Math.floor(s/60),a=Math.floor(i/24);return n<60?"just now":s<60?"".concat(s,"m ago"):i<24?"".concat(i,"h ago"):a<7?"".concat(a,"d ago"):new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(r)}(i.timestamp)})})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(h.I,{action:i.action})}),(0,n.jsx)(_.Z,{children:i.actor.startsWith("cli:")?(0,n.jsx)(c.Z,{label:i.actor.replace("cli:",""),size:"small",variant:"outlined",sx:{fontSize:"0.75rem"}}):(0,n.jsx)(l.Z,{variant:"body2",children:i.actor.replace("api:","")})}),(0,n.jsx)(_.Z,{children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center"},children:[function(e){switch(e){case"server":return(0,n.jsx)($.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});case"player":return(0,n.jsx)(ee.Z,{sx:{fontSize:16,mr:.5,color:"text.secondary"}});default:return null}}(i.targetType),j?(0,n.jsx)(et.default,{href:j,style:{textDecoration:"none"},onClick:e=>e.stopPropagation(),children:(0,n.jsx)(l.Z,{variant:"body2",sx:{color:"primary.main","&:hover":{textDecoration:"underline"}},children:i.targetName})}):(0,n.jsx)(l.Z,{variant:"body2",children:i.targetName})]})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(m.c,{status:i.status})})]}),g&&(0,n.jsx)(X.Z,{children:(0,n.jsx)(_.Z,{sx:{py:0},colSpan:6,children:(0,n.jsx)(R.Z,{in:d,timeout:"auto",unmountOnExit:!0,children:(0,n.jsxs)(a.Z,{sx:{py:2,px:2},children:[p&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:2},children:i.errorMessage}),x&&(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{mb:1,display:"block"},children:"Details"}),(0,n.jsx)(q.Z,{size:"small",sx:{width:"auto"},children:(0,n.jsx)(K.Z,{children:Object.entries(i.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0},children:t}),(0,n.jsx)(_.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]})]})})})})]})}function en(e){let{logs:t,total:r,isLoading:s,error:i,filters:a,onFiltersChange:c,onRowClick:d,onRetry:u}=e,x=Math.floor((a.offset||0)/(a.limit||50)),h=a.limit||50;return s?(0,n.jsx)(o.Z,{children:(0,n.jsx)(B.Z,{children:(0,n.jsxs)(q.Z,{children:[(0,n.jsx)(V.Z,{children:(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox"}),(0,n.jsx)(_.Z,{children:"Timestamp"}),(0,n.jsx)(_.Z,{children:"Action"}),(0,n.jsx)(_.Z,{children:"Actor"}),(0,n.jsx)(_.Z,{children:"Target"}),(0,n.jsx)(_.Z,{children:"Status"})]})}),(0,n.jsx)(K.Z,{children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox"}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:80})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"rounded",width:70,height:24})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:60})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"text",width:100})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(f.Z,{variant:"rounded",width:50,height:24})})]},t))})]})})}):i?(0,n.jsx)(G.Z,{severity:"error",action:u&&(0,n.jsx)(N.Z,{color:"inherit",size:"small",onClick:u,children:"Retry"}),children:i.message||"Failed to load audit logs"}):0===t.length?(0,n.jsxs)(o.Z,{sx:{p:6,textAlign:"center"},children:[(0,n.jsx)(v.Z,{sx:{fontSize:64,color:"text.disabled",mb:2}}),(0,n.jsx)(l.Z,{variant:"h6",color:"text.secondary",gutterBottom:!0,children:"No audit logs found"}),(0,n.jsx)(l.Z,{variant:"body2",color:"text.disabled",sx:{mb:2},children:"Try adjusting your filters or check back later."}),(0,n.jsx)(N.Z,{variant:"outlined",size:"small",onClick:()=>c({limit:a.limit,sort:a.sort}),children:"Reset Filters"})]}):(0,n.jsxs)(o.Z,{children:[(0,n.jsx)(B.Z,{sx:{overflowX:"auto"},children:(0,n.jsxs)(q.Z,{size:"small",children:[(0,n.jsx)(V.Z,{children:(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{padding:"checkbox",sx:{width:48}}),(0,n.jsx)(_.Z,{sx:{fontWeight:600,whiteSpace:"nowrap"},children:"Timestamp"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Action"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Actor"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Target"}),(0,n.jsx)(_.Z,{sx:{fontWeight:600},children:"Status"})]})}),(0,n.jsx)(K.Z,{children:t.map(e=>(0,n.jsx)(er,{log:e,onClick:d},e.id))})]})}),(0,n.jsx)(J.Z,{component:"div",count:r,page:x,onPageChange:(e,t)=>{c({...a,offset:t*h})},rowsPerPage:h,onRowsPerPageChange:e=>{let t=parseInt(e.target.value,10);c({...a,limit:t,offset:0})},rowsPerPageOptions:[25,50,100],"aria-label":"Audit log pagination"})]})}var es=r(78765),ei=r(69123),ea=r(33402),eo=r(60097),el=r(90158),ec=r(58347),ed=r(73424),eu=r(93017),ex=r(71185),eh=r(84509);function em(e){let{logs:t}=e;return 0===t.length?(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",sx:{py:2,textAlign:"center"},children:"No related logs found"}):(0,n.jsx)(el.Z,{dense:!0,sx:{py:0},children:t.map(e=>(0,n.jsx)(ec.ZP,{sx:{px:0,py:1,"&:not(:last-child)":{borderBottom:"1px solid",borderColor:"divider"}},children:(0,n.jsx)(ed.Z,{primary:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(h.I,{action:e.action,size:"small"}),e.targetName&&(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e.targetName})]}),secondary:function(e){let t=new Date,r=new Date(e),n=Math.floor((t.getTime()-r.getTime())/6e4),s=Math.floor(n/60);return n<60?"".concat(n,"m ago"):s<24?"".concat(s,"h ago"):"".concat(Math.floor(s/24),"d ago")}(e.timestamp)})},e.id))})}function ep(e){var t,r,i,o,c;let{log:d,open:u,onClose:x}=e,[p,g]=(0,s.useState)(0),{data:j,isLoading:f}=(0,eh.VM)(null!==(t=null==d?void 0:d.id)&&void 0!==t?t:null,{enabled:u&&!!d});return(0,n.jsxs)(es.ZP,{anchor:"right",open:u,onClose:x,sx:{"& .MuiDrawer-paper":{width:{xs:"100%",sm:420},maxWidth:"100%"}},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(l.Z,{variant:"h6",component:"h2",children:"Audit Log Detail"}),(0,n.jsx)(A.Z,{onClick:x,"aria-label":"Close detail drawer",autoFocus:!0,children:(0,n.jsx)(ex.Z,{})})]}),(0,n.jsx)(a.Z,{sx:{p:2,overflow:"auto",flex:1},children:d?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"ID"}),(0,n.jsx)(l.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.8rem",wordBreak:"break-all"},children:d.id})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Timestamp"}),(0,n.jsx)(l.Z,{variant:"body2",children:function(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}).format(t)}(d.timestamp)})]}),(0,n.jsxs)(a.Z,{sx:{display:"flex",gap:3,mb:3},children:[(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Action"}),(0,n.jsx)(h.I,{action:d.action,size:"medium"})]}),(0,n.jsxs)(a.Z,{children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Status"}),(0,n.jsx)(m.c,{status:d.status,size:"medium"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Actor"}),(0,n.jsx)(l.Z,{variant:"body2",children:d.actor})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.5},children:"Target"}),(0,n.jsxs)(l.Z,{variant:"body2",children:[d.targetType,"/",d.targetName]})]}),"failure"===d.status&&d.errorMessage&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:3},children:d.errorMessage}),d.details&&Object.keys(d.details).length>0&&(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(ei.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Details"}),(0,n.jsx)(q.Z,{size:"small",children:(0,n.jsx)(K.Z,{children:Object.entries(d.details).map(e=>{let[t,r]=e;return(0,n.jsxs)(X.Z,{children:[(0,n.jsx)(_.Z,{sx:{fontWeight:600,color:"text.secondary",border:"none",py:.5,pl:0,width:"40%"},children:t}),(0,n.jsx)(_.Z,{sx:{border:"none",py:.5},children:String(r)})]},t)})})})]}),(0,n.jsx)(ei.Z,{sx:{mb:2}}),(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Related Logs"}),f?(0,n.jsx)(a.Z,{sx:{display:"flex",justifyContent:"center",py:3},children:(0,n.jsx)(eu.Z,{size:24})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ea.Z,{value:p,onChange:(e,t)=>g(t),sx:{mb:1},children:[(0,n.jsx)(eo.Z,{label:"Same Target (".concat(null!==(r=null==j?void 0:j.relatedLogs.sameTarget.length)&&void 0!==r?r:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}}),(0,n.jsx)(eo.Z,{label:"Same Actor (".concat(null!==(i=null==j?void 0:j.relatedLogs.sameActor.length)&&void 0!==i?i:0,")"),sx:{textTransform:"none",fontSize:"0.8rem"}})]}),0===p&&(0,n.jsx)(em,{logs:null!==(o=null==j?void 0:j.relatedLogs.sameTarget)&&void 0!==o?o:[]}),1===p&&(0,n.jsx)(em,{logs:null!==(c=null==j?void 0:j.relatedLogs.sameActor)&&void 0!==c?c:[]})]})]}):(0,n.jsx)(l.Z,{color:"text.secondary",children:"No log selected"})})]})}var eg=r(99770),ej=r(62508),ef=r(5682),ev=r(76678),eZ=r(15761);function ey(e){let{open:t,onClose:r,filters:i,totalCount:o}=e,[c,d]=(0,s.useState)("csv"),[u,x]=(0,s.useState)(!1),[h,m]=(0,s.useState)(null),p=function(e){let t=[];return e.action&&t.push("Action: ".concat(e.action)),e.actor&&t.push("Actor: ".concat(e.actor)),e.targetType&&t.push("Type: ".concat(e.targetType)),e.targetName&&t.push("Target: ".concat(e.targetName)),e.status&&t.push("Status: ".concat(e.status)),e.from&&t.push("From: ".concat(e.from.split("T")[0])),e.to&&t.push("To: ".concat(e.to.split("T")[0])),t}(i),g=async()=>{x(!0),m(null);try{let e=function(e,t){let r=new URLSearchParams;return r.set("format",t),e.action&&r.set("action",e.action),e.actor&&r.set("actor",e.actor),e.targetType&&r.set("targetType",e.targetType),e.targetName&&r.set("targetName",e.targetName),e.status&&r.set("status",e.status),e.from&&r.set("from",e.from),e.to&&r.set("to",e.to),"/api/audit-logs/export?".concat(r.toString())}(i,c),t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({message:"Export failed"}));throw Error(e.message||"Export failed")}let n=await t.blob(),s=window.URL.createObjectURL(n),a=document.createElement("a");a.href=s;let o=t.headers.get("Content-Disposition"),l=null==o?void 0:o.match(/filename="?([^"]+)"?/);a.download=(null==l?void 0:l[1])||"audit-logs.".concat(c),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s),r()}catch(e){m(e instanceof Error?e.message:"Export failed")}finally{x(!1)}};return(0,n.jsxs)(eg.Z,{open:t,onClose:r,maxWidth:"sm",fullWidth:!0,children:[(0,n.jsx)(ej.Z,{children:"Export Audit Logs"}),(0,n.jsxs)(ef.Z,{children:[(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Format"}),(0,n.jsxs)(I.Z,{value:c,exclusive:!0,onChange:(e,t)=>t&&d(t),size:"small",children:[(0,n.jsx)(E.Z,{value:"csv",children:"CSV"}),(0,n.jsx)(E.Z,{value:"json",children:"JSON"})]})]}),(0,n.jsxs)(a.Z,{sx:{mb:3},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:1},children:"Applied Filters"}),p.length>0?(0,n.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column",gap:.5},children:p.map(e=>(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:e},e))}):(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:"No filters applied (all logs)"})]}),(0,n.jsxs)(a.Z,{sx:{mb:2},children:[(0,n.jsx)(l.Z,{variant:"subtitle2",sx:{mb:.5},children:"Estimated Rows"}),(0,n.jsxs)(l.Z,{variant:"body2",color:"text.secondary",children:[Math.min(o,5e3).toLocaleString()," rows"]})]}),o>5e3&&(0,n.jsxs)(G.Z,{severity:"warning",sx:{mb:2},children:["Export is limited to ",5e3.toLocaleString()," rows. Total matching logs: ",o.toLocaleString(),". Consider narrowing your filters for a complete export."]}),h&&(0,n.jsx)(G.Z,{severity:"error",sx:{mb:2},children:h})]}),(0,n.jsxs)(ev.Z,{children:[(0,n.jsx)(N.Z,{onClick:r,disabled:u,children:"Cancel"}),(0,n.jsx)(N.Z,{variant:"contained",startIcon:u?(0,n.jsx)(eu.Z,{size:16,color:"inherit"}):(0,n.jsx)(eZ.Z,{}),onClick:g,disabled:u,children:u?"Exporting...":"Export ".concat(c.toUpperCase())})]})]})}var eb=r(93757);function eS(){var e,t,r;let h=(0,i.useRouter)(),m=(0,i.useSearchParams)(),[p,g]=(0,s.useState)(()=>(function(e){let t={},r=e.get("action"),n=e.get("actor"),s=e.get("targetType"),i=e.get("targetName"),a=e.get("status"),o=e.get("from"),l=e.get("to"),c=e.get("limit"),d=e.get("offset"),u=e.get("sort");return r&&(t.action=r),n&&(t.actor=n),s&&(t.targetType=s),i&&(t.targetName=i),a&&(t.status=a),o&&(t.from=o),l&&(t.to=l),c&&(t.limit=parseInt(c,10)),d&&(t.offset=parseInt(d,10)),("timestamp:asc"===u||"timestamp:desc"===u)&&(t.sort=u),t})(m)),[j,f]=(0,s.useState)(null),[v,Z]=(0,s.useState)(!1),[y,b]=(0,s.useState)(!1),[C,w]=(0,s.useState)(0),T=(0,s.useRef)(new Set),{data:k,isLoading:z,error:N,refetch:R}=(0,eh.hT)(p),{data:A,isLoading:E}=(0,eh.DM)(),{isConnected:I}=(0,eb.D)({url:"/api/audit-logs/stream",enabled:!0,onMessage:(0,s.useCallback)(e=>{if("audit-log"===e.type){let t=e.data;if("id"in t&&"string"==typeof t.id){if(T.current.has(t.id))return;if(T.current.add(t.id),T.current.size>1e3){let e=Array.from(T.current);T.current=new Set(e.slice(e.length-500))}}w(e=>e+1)}},[]),reconnectInterval:3e3,maxReconnectAttempts:1/0});(0,s.useEffect)(()=>{let e=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.limit&&50!==e.limit&&t.set("limit",String(e.limit)),e.offset&&e.offset>0&&t.set("offset",String(e.offset)),e.sort&&"timestamp:desc"!==e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(p);e!==(m.toString()?"?".concat(m.toString()):"")&&h.replace("/audit-logs".concat(e),{scroll:!1})},[p,h,m]);let F=(0,s.useCallback)(e=>{g(e),w(0)},[]),L=(0,s.useCallback)(e=>{f(e),Z(!0)},[]),D=(0,s.useCallback)(()=>{w(0),R()},[R]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,d.Fq)(e.palette.warning.main,.1)," 0%, ").concat((0,d.Fq)(e.palette.error.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,d.Fq)(e.palette.warning.main,.2))},children:(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,n.jsx)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"warning.main",color:"warning.contrastText"},children:(0,n.jsx)(u.Z,{sx:{fontSize:32}})}),(0,n.jsxs)(a.Z,{sx:{flex:1},children:[(0,n.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,n.jsx)(l.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Audit Log"}),(0,n.jsx)(c.Z,{icon:(0,n.jsx)(x.Z,{sx:{fontSize:10,color:I?"success.main":"text.disabled",animation:I?"pulse 2s infinite":"none","@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}}}),label:I?"Live":"Offline",size:"small",variant:"outlined",sx:{fontSize:"0.7rem"}})]}),(0,n.jsx)(l.Z,{variant:"body1",color:"text.secondary",children:"Monitor all management activities across your servers"})]})]})}),(0,n.jsx)(a.Z,{sx:{mb:3},children:(0,n.jsx)(S,{stats:A,isLoading:E})}),C>0&&(0,n.jsx)(a.Z,{sx:{mb:2,p:1.5,textAlign:"center",bgcolor:"primary.main",color:"primary.contrastText",borderRadius:1,cursor:"pointer","&:hover":{opacity:.9}},onClick:D,role:"button","aria-label":"".concat(C," new logs, click to refresh"),children:(0,n.jsxs)(l.Z,{variant:"body2",fontWeight:600,children:[C," new ",1===C?"log":"logs"," available - Click to refresh"]})}),(0,n.jsx)(U,{filters:p,onFiltersChange:F,onExport:()=>b(!0)}),(0,n.jsx)(en,{logs:null!==(e=null==k?void 0:k.logs)&&void 0!==e?e:[],total:null!==(t=null==k?void 0:k.total)&&void 0!==t?t:0,isLoading:z,error:N,filters:p,onFiltersChange:F,onRowClick:L,onRetry:()=>R()}),(0,n.jsx)(ep,{log:j,open:v,onClose:()=>{Z(!1),f(null)}}),(0,n.jsx)(ey,{open:y,onClose:()=>b(!1),filters:p,totalCount:null!==(r=null==k?void 0:k.total)&&void 0!==r?r:0})]})}},56813:function(e,t,r){"use strict";r.d(t,{I:function(){return a}});var n=r(94655),s=r(25333),i=r(82925);function a(e){let{action:t,size:r="small"}=e,a=i.Lu[t]||"default",o=i.n3[t]||t;return(0,n.jsx)(s.Z,{label:o,color:a,size:r,variant:"filled",sx:{fontWeight:600,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},26892:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(94655),s=r(25333),i=r(46207),a=r(43436);function o(e){let{status:t,size:r="small"}=e;return(0,n.jsx)(s.Z,{icon:"success"===t?(0,n.jsx)(i.Z,{}):(0,n.jsx)(a.Z,{}),label:"success"===t?"OK":"Error",color:"success"===t?"success":"error",size:r,variant:"outlined",sx:{fontWeight:500,fontSize:"small"===r?"0.7rem":"0.8rem"}})}},42936:function(e,t,r){"use strict";async function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={...t.headers};t.body&&(r["Content-Type"]="application/json");let n=await fetch(e,{...t,headers:r});if(!n.ok){let e=await n.json().catch(()=>({error:"UnknownError",message:n.statusText})),t=Error(e.message);throw t.statusCode=n.status,t.code=e.error,t}return n.json()}r.d(t,{SC:function(){return n}})},84509:function(e,t,r){"use strict";r.d(t,{DM:function(){return a},HZ:function(){return l},VM:function(){return o},hT:function(){return i},oL:function(){return c}});var n=r(5632),s=r(42936);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=function(e){let t=new URLSearchParams;e.action&&t.set("action",e.action),e.actor&&t.set("actor",e.actor),e.targetType&&t.set("targetType",e.targetType),e.targetName&&t.set("targetName",e.targetName),e.status&&t.set("status",e.status),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.offset&&t.set("offset",String(e.offset)),e.sort&&t.set("sort",e.sort);let r=t.toString();return r?"?".concat(r):""}(e);return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs".concat(r)),enabled:(null==t?void 0:t.enabled)!==!1})}function a(e){return(0,n.a)({queryKey:["audit-logs","stats"],queryFn:()=>(0,s.SC)("/api/audit-logs/stats"),enabled:(null==e?void 0:e.enabled)!==!1,refetchInterval:3e4})}function o(e,t){return(0,n.a)({queryKey:["audit-logs",e],queryFn:()=>(0,s.SC)("/api/audit-logs/".concat(encodeURIComponent(e))),enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function l(e,t){var r;return i({targetType:"server",targetName:e,limit:null!==(r=null==t?void 0:t.limit)&&void 0!==r?r:20},{enabled:(null==t?void 0:t.enabled)!==!1&&!!e})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return i({limit:e,sort:"timestamp:desc"})}},93757:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(35106);class s{connect(e){this.options=e,this.shouldReconnect=!0,this.establishConnection()}establishConnection(){this.options&&(this.updateState("connecting"),this.eventSource&&this.eventSource.close(),this.eventSource=new EventSource(this.options.url,{withCredentials:this.options.withCredentials||!1}),this.eventSource.onopen=()=>{this.updateState("connected"),this.retryCount=0,this.lastError=null},this.eventSource.onmessage=e=>{if(!e.data.startsWith(":"))try{var t,r;let n=JSON.parse(e.data);null===(r=this.options)||void 0===r||null===(t=r.onMessage)||void 0===t||t.call(r,n)}catch(e){console.warn("Failed to parse SSE message:",e)}},this.eventSource.onerror=()=>{var e,t;let r={message:"SSE connection error",code:"CONNECTION_ERROR",retryCount:this.retryCount,timestamp:new Date};this.lastError=r,this.updateState("error"),null===(t=this.options)||void 0===t||null===(e=t.onError)||void 0===e||e.call(t,r),this.shouldReconnect&&this.scheduleReconnect()})}scheduleReconnect(){var e,t;if(!this.options)return;let r=null!==(e=this.options.maxReconnectAttempts)&&void 0!==e?e:1/0;if(this.retryCount>=r)return;this.reconnectTimer&&clearTimeout(this.reconnectTimer);let n=null!==(t=this.options.reconnectInterval)&&void 0!==t?t:3e3;this.reconnectTimer=setTimeout(()=>{this.retryCount++,this.establishConnection()},n)}disconnect(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.updateState("disconnected")}getState(){return this.state}isConnected(){return"connected"===this.state}getLastError(){return this.lastError}getRetryCount(){return this.retryCount}reconnect(){this.retryCount++,this.shouldReconnect=!0,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.establishConnection()}updateState(e){var t,r;this.state=e,null===(r=this.options)||void 0===r||null===(t=r.onStateChange)||void 0===t||t.call(r,e)}constructor(){this.eventSource=null,this.state="disconnected",this.retryCount=0,this.lastError=null,this.reconnectTimer=null,this.options=null,this.shouldReconnect=!0}}function i(e){let{url:t,onMessage:r,onError:i,reconnectInterval:a=3e3,maxReconnectAttempts:o=1/0,enabled:l=!0,withCredentials:c=!1}=e,[d,u]=(0,n.useState)(null),[x,h]=(0,n.useState)("disconnected"),[m,p]=(0,n.useState)(null),[g,j]=(0,n.useState)(0),f=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{u(e),null==r||r(e)},[r]),Z=(0,n.useCallback)(e=>{h(e),"connected"===e&&j(0)},[]),y=(0,n.useCallback)(e=>{p(e),"number"==typeof e.retryCount&&j(e.retryCount),null==i||i(e)},[i]),b=(0,n.useCallback)(()=>{f.current&&(f.current.reconnect(),j(f.current.getRetryCount()))},[]),S=(0,n.useCallback)(()=>{f.current&&f.current.disconnect()},[]);return(0,n.useEffect)(()=>{if(!l){f.current&&(f.current.disconnect(),f.current=null);return}return f.current||(f.current=new s),f.current.connect({url:t,onMessage:v,onStateChange:Z,onError:y,reconnectInterval:a,maxReconnectAttempts:o,withCredentials:c}),()=>{f.current&&(f.current.disconnect(),f.current=null)}},[t,l,a,o,c,v,Z,y]),{data:d,isConnected:"connected"===x,state:x,error:m,retryCount:g,reconnect:b,disconnect:S}}},82925:function(e,t,r){"use strict";r.d(t,{KK:function(){return o},Lu:function(){return n},Xn:function(){return a},n3:function(){return s},xg:function(){return i}});let n={"server.create":"success","server.delete":"error","server.start":"info","server.stop":"warning","server.restart":"secondary","player.whitelist.add":"success","player.whitelist.remove":"warning","player.ban":"error","player.unban":"success","player.op":"info","player.deop":"warning","player.kick":"error","audit.purge":"default"},s={"server.create":"Create","server.delete":"Delete","server.start":"Start","server.stop":"Stop","server.restart":"Restart","player.whitelist.add":"Whitelist Add","player.whitelist.remove":"Whitelist Remove","player.ban":"Ban","player.unban":"Unban","player.op":"Op","player.deop":"Deop","player.kick":"Kick","audit.purge":"Purge"},i=["server.create","server.delete","server.start","server.stop","server.restart","player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick","audit.purge"],a=["server.create","server.delete","server.start","server.stop","server.restart"],o=["player.whitelist.add","player.whitelist.remove","player.ban","player.unban","player.op","player.deop","player.kick"]}},function(e){e.O(0,[6812,9760,6758,680,1668,7436,1071,540,4416,521,5511,880,55,9654,8347,6909,4474,8918,6479,3669,2757,1744],function(){return e(e.s=3590)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6302],{1366:function(e,n,t){Promise.resolve().then(t.bind(t,6643))},6643:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return P}});var r=t(94655),s=t(31317),i=t(7281),o=t(69899),a=t(70115),c=t(76492),u=t(91606),l=t(628),d=t(41565),h=t(25333),x=t(46207),y=t(43436),m=t(92666);function j(){let{data:e,isLoading:n,error:t}=(0,m.mj)();if(n)return(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,r.jsx)(s.Z,{color:"text.secondary",children:"Loading..."})]})});if(t)return(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,r.jsx)(s.Z,{color:"error",children:"Failed to load backup status"})]})});let{configured:o,lastBackup:a,repository:c}=e||{};return(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Backup Status"}),(0,r.jsx)(h.Z,{icon:o?(0,r.jsx)(x.Z,{}):(0,r.jsx)(y.Z,{}),label:o?"Configured":"Not Configured",color:o?"success":"error",size:"small"})]}),o?(0,r.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c&&(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Repository"}),(0,r.jsx)(s.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:c})]}),a&&(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Last Backup"}),(0,r.jsx)(s.Z,{variant:"body2",children:function(e){let n=new Date,t=new Date(e),r=Math.floor((n.getTime()-t.getTime())/6e4),s=Math.floor(r/60);return r<1?"just now":r<60?"".concat(r," minutes ago"):s<24?"".concat(s," hours ago"):"".concat(Math.floor(s/24)," days ago")}(a)})]}),!a&&(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"No backups yet"})]}):(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"GitHub backup is not configured. Please configure BACKUP_REPO_URL in your environment."})]})})}var f=t(35106),p=t(21138),v=t(84811),Z=t(47001),g=t(53281),b=t(11254),S=t(70366),C=t(79983),k=t(97731),w=t(30417),q=t(99770),F=t(76678),I=t(5682),K=t(65087),D=t(62508),T=t(81071),N=t(93017);function B(e){var n;let{open:t,commit:o,onClose:a}=e,{mutate:c,isPending:u}=(0,m.s8)(),[l,d]=(0,f.useState)(""),[h,x]=(0,f.useState)(""),y=()=>{u||(d(""),x(""),a())};return(0,r.jsxs)(q.Z,{open:t,onClose:y,maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(D.Z,{children:"Restore Backup"}),(0,r.jsxs)(I.Z,{children:[(0,r.jsx)(T.Z,{severity:"warning",sx:{mb:2},children:"This will restore all worlds from the selected backup. Current world data will be overwritten."}),l&&(0,r.jsx)(T.Z,{severity:"success",sx:{mb:2},children:l}),h&&(0,r.jsx)(T.Z,{severity:"error",sx:{mb:2},children:h}),(0,r.jsx)(K.Z,{sx:{mb:2},children:"Are you sure you want to restore from this backup?"}),(0,r.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Commit Hash"}),(0,r.jsx)(s.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:o.hash})]}),(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Date"}),(0,r.jsx)(s.Z,{variant:"body2",children:(n=o.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(n)))})]}),(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Message"}),(0,r.jsx)(s.Z,{variant:"body2",children:o.message})]}),(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Author"}),(0,r.jsx)(s.Z,{variant:"body2",children:o.author})]})]})]}),(0,r.jsxs)(F.Z,{children:[(0,r.jsx)(w.Z,{onClick:y,disabled:u,children:"Cancel"}),(0,r.jsx)(w.Z,{onClick:()=>{d(""),x(""),c(o.hash,{onSuccess:()=>{d("Backup restored successfully from ".concat(o.hash.substring(0,7))),setTimeout(()=>{a()},2e3)},onError:e=>{x("Failed to restore backup: ".concat(e.message))}})},variant:"contained",color:"warning",disabled:u,startIcon:u?(0,r.jsx)(N.Z,{size:16}):(0,r.jsx)(k.Z,{}),children:u?"Restoring...":"Restore"})]})]})}function Q(){let{data:e,isLoading:n,error:t}=(0,m.$t)(20),[i,o]=(0,f.useState)(null),a=e=>{o(e)};if(n)return(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,r.jsx)(s.Z,{color:"text.secondary",children:"Loading..."})]})});if(t)return(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,r.jsx)(s.Z,{color:"error",children:"Failed to load backup history"})]})});let c=(null==e?void 0:e.commits)||[];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),0===c.length?(0,r.jsx)(s.Z,{color:"text.secondary",children:"No backup history available"}):(0,r.jsx)(g.Z,{children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(b.Z,{children:(0,r.jsxs)(S.Z,{children:[(0,r.jsx)(Z.Z,{children:"Commit"}),(0,r.jsx)(Z.Z,{children:"Date"}),(0,r.jsx)(Z.Z,{children:"Message"}),(0,r.jsx)(Z.Z,{children:"Author"}),(0,r.jsx)(Z.Z,{align:"right",children:"Actions"})]})}),(0,r.jsx)(v.Z,{children:c.map(e=>{var n;return(0,r.jsxs)(S.Z,{children:[(0,r.jsx)(Z.Z,{children:(0,r.jsx)(h.Z,{label:e.hash.substring(0,7),size:"small",variant:"outlined",sx:{fontFamily:"monospace"}})}),(0,r.jsx)(Z.Z,{children:(0,r.jsx)(s.Z,{variant:"body2",children:(n=e.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(n)))})}),(0,r.jsx)(Z.Z,{children:(0,r.jsx)(s.Z,{variant:"body2",children:e.message})}),(0,r.jsx)(Z.Z,{children:(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:e.author})}),(0,r.jsx)(Z.Z,{align:"right",children:(0,r.jsx)(C.Z,{size:"small",color:"primary",onClick:()=>a(e),title:"Restore this backup",children:(0,r.jsx)(k.Z,{})})})]},e.hash)})})]})})]})}),i&&(0,r.jsx)(B,{open:!!i,commit:i,onClose:()=>{o(null)}})]})}var R=t(97436),O=t(34675);function L(e){let{disabled:n}=e,[t,s]=(0,f.useState)(!1),[i,o]=(0,f.useState)(""),[a,c]=(0,f.useState)(""),[u,l]=(0,f.useState)(""),{mutate:d,isPending:h}=(0,m.c5)(),x=()=>{h||(s(!1),o(""),c(""),l(""))};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.Z,{variant:"contained",startIcon:(0,r.jsx)(O.Z,{}),onClick:()=>{s(!0),c(""),l(""),o("Backup ".concat(new Date().toISOString().split("T")[0]))},disabled:n||h,children:"Push Backup"}),(0,r.jsxs)(q.Z,{open:t,onClose:x,maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(D.Z,{children:"Push Backup"}),(0,r.jsxs)(I.Z,{children:[a&&(0,r.jsx)(T.Z,{severity:"success",sx:{mb:2},children:a}),u&&(0,r.jsx)(T.Z,{severity:"error",sx:{mb:2},children:u}),(0,r.jsx)(R.Z,{autoFocus:!0,margin:"dense",label:"Commit Message",type:"text",fullWidth:!0,variant:"outlined",value:i,onChange:e=>o(e.target.value),disabled:h,helperText:"Optional message describing this backup"})]}),(0,r.jsxs)(F.Z,{children:[(0,r.jsx)(w.Z,{onClick:x,disabled:h,children:"Cancel"}),(0,r.jsx)(w.Z,{onClick:()=>{c(""),l(""),d({message:i||void 0},{onSuccess:e=>{c(e.commitHash?"Backup pushed successfully (".concat(e.commitHash.substring(0,7),")"):"Backup pushed successfully"),setTimeout(()=>{x()},2e3)},onError:e=>{l("Failed to push backup: ".concat(e.message))}})},variant:"contained",disabled:h,startIcon:h?(0,r.jsx)(N.Z,{size:16}):(0,r.jsx)(O.Z,{}),children:h?"Pushing...":"Push"})]})]})]})}function P(){var e;let{data:n}=(0,m.mj)(),t=null!==(e=null==n?void 0:n.configured)&&void 0!==e&&e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,c.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,c.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,c.Fq)(e.palette.secondary.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,r.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,r.jsx)(u.Z,{sx:{fontSize:32}})}),(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Backups"}),(0,r.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"Manage world backups and restore points"})]})]}),(0,r.jsx)(L,{disabled:!t})]}),(0,r.jsxs)(a.Z,{spacing:3,children:[(0,r.jsx)(j,{}),t&&(0,r.jsx)(Q,{})]})]})}},42936:function(e,n,t){"use strict";async function r(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={...n.headers};n.body&&(t["Content-Type"]="application/json");let r=await fetch(e,{...n,headers:t});if(!r.ok){let e=await r.json().catch(()=>({error:"UnknownError",message:r.statusText})),n=Error(e.message);throw n.statusCode=r.status,n.code=e.error,n}return r.json()}t.d(n,{SC:function(){return r}})},92666:function(e,n,t){"use strict";t.d(n,{$t:function(){return S},Aw:function(){return d},Fv:function(){return f},Hq:function(){return u},Hy:function(){return c},MH:function(){return v},Sr:function(){return x},_I:function(){return h},c5:function(){return C},g2:function(){return j},gx:function(){return Z},hy:function(){return y},iC:function(){return p},jM:function(){return l},mj:function(){return b},nq:function(){return m},nv:function(){return g},s8:function(){return k},x$:function(){return a}});var r=t(5632),s=t(58919),i=t(20367),o=t(42936);function a(){return(0,r.a)({queryKey:["servers"],queryFn:()=>(0,o.SC)("/api/servers"),refetchInterval:6e4})}function c(e,n){return(0,r.a)({queryKey:["servers",e],queryFn:()=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e))),enabled:(null==n?void 0:n.enabled)!==!1&&!!e,refetchInterval:3e4})}function u(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{name:n,force:t}=e;return(0,o.SC)("/api/servers/".concat(encodeURIComponent(n)).concat(t?"?force=true":""),{method:"DELETE"})},onSuccess:()=>{e.invalidateQueries({queryKey:["servers"]})}})}function l(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e),"/start"),{method:"POST"}),onSuccess:(n,t)=>{e.invalidateQueries({queryKey:["servers"]}),e.invalidateQueries({queryKey:["servers",t]})}})}function d(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e),"/stop"),{method:"POST"}),onSuccess:(n,t)=>{e.invalidateQueries({queryKey:["servers"]}),e.invalidateQueries({queryKey:["servers",t]})}})}function h(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e),"/restart"),{method:"POST"}),onSuccess:(n,t)=>{e.invalidateQueries({queryKey:["servers"]}),e.invalidateQueries({queryKey:["servers",t]})}})}function x(){return(0,r.a)({queryKey:["worlds"],queryFn:()=>(0,o.SC)("/api/worlds"),refetchInterval:3e4})}function y(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/worlds",{method:"POST",body:JSON.stringify(e)}),onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]})}})}function m(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{worldName:n,serverName:t}=e;return(0,o.SC)("/api/worlds/".concat(encodeURIComponent(n),"/assign"),{method:"POST",body:JSON.stringify({serverName:t})})},onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]}),e.invalidateQueries({queryKey:["servers"]})}})}function j(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{worldName:n,force:t}=e;return(0,o.SC)("/api/worlds/".concat(encodeURIComponent(n),"/release").concat(t?"?force=true":""),{method:"POST"})},onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]})}})}function f(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{name:n,force:t}=e;return(0,o.SC)("/api/worlds/".concat(encodeURIComponent(n)).concat(t?"?force=true":""),{method:"DELETE"})},onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]})}})}function p(e,n){return(0,r.a)({queryKey:["servers",e,"config"],queryFn:()=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e),"/config")),enabled:(null==n?void 0:n.enabled)!==!1&&!!e})}function v(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{serverName:n,config:t}=e;return(0,o.SC)("/api/servers/".concat(encodeURIComponent(n),"/config"),{method:"PATCH",body:JSON.stringify(t)})},onSuccess:(n,t)=>{let{serverName:r}=t;e.invalidateQueries({queryKey:["servers",r,"config"]}),e.invalidateQueries({queryKey:["servers",r]})}})}function Z(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e),"/world/reset"),{method:"POST"}),onSuccess:(n,t)=>{e.invalidateQueries({queryKey:["servers",t]}),e.invalidateQueries({queryKey:["worlds"]})}})}function g(){return(0,r.a)({queryKey:["router-status"],queryFn:()=>(0,o.SC)("/api/router/status"),refetchInterval:3e4})}function b(){return(0,r.a)({queryKey:["backup-status"],queryFn:()=>(0,o.SC)("/api/backup"),refetchInterval:6e4})}function S(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return(0,r.a)({queryKey:["backup-history",e],queryFn:()=>(0,o.SC)("/api/backup/history?limit=".concat(e)),refetchInterval:6e4})}function C(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{message:n}=e;return(0,o.SC)("/api/backup",{method:"POST",body:JSON.stringify({message:n})})},onSuccess:()=>{e.invalidateQueries({queryKey:["backup-status"]}),e.invalidateQueries({queryKey:["backup-history"]})}})}function k(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/backup/restore",{method:"POST",body:JSON.stringify({commitHash:e})}),onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]}),e.invalidateQueries({queryKey:["servers"]})}})}}},function(e){e.O(0,[6812,9760,6758,680,1668,7436,1071,540,4416,880,9654,8625,3669,2757,1744],function(){return e(e.s=1366)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6302],{1366:function(e,n,t){Promise.resolve().then(t.bind(t,6643))},6643:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return P}});var r=t(94655),s=t(31317),i=t(7281),o=t(69899),a=t(70115),c=t(76492),u=t(91606),l=t(628),d=t(41565),h=t(25333),x=t(46207),y=t(43436),m=t(92666);function j(){let{data:e,isLoading:n,error:t}=(0,m.mj)();if(n)return(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,r.jsx)(s.Z,{color:"text.secondary",children:"Loading..."})]})});if(t)return(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Backup Status"}),(0,r.jsx)(s.Z,{color:"error",children:"Failed to load backup status"})]})});let{configured:o,lastBackup:a,repository:c}=e||{};return(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2},children:[(0,r.jsx)(s.Z,{variant:"h6",children:"Backup Status"}),(0,r.jsx)(h.Z,{icon:o?(0,r.jsx)(x.Z,{}):(0,r.jsx)(y.Z,{}),label:o?"Configured":"Not Configured",color:o?"success":"error",size:"small"})]}),o?(0,r.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c&&(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Repository"}),(0,r.jsx)(s.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:c})]}),a&&(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Last Backup"}),(0,r.jsx)(s.Z,{variant:"body2",children:function(e){let n=new Date,t=new Date(e),r=Math.floor((n.getTime()-t.getTime())/6e4),s=Math.floor(r/60);return r<1?"just now":r<60?"".concat(r," minutes ago"):s<24?"".concat(s," hours ago"):"".concat(Math.floor(s/24)," days ago")}(a)})]}),!a&&(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"No backups yet"})]}):(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:"GitHub backup is not configured. Please configure BACKUP_REPO_URL in your environment."})]})})}var f=t(35106),p=t(21138),v=t(84811),Z=t(47001),g=t(53281),b=t(11254),S=t(70366),C=t(79983),k=t(97731),w=t(30417),q=t(99770),F=t(76678),I=t(5682),K=t(65087),D=t(62508),T=t(81071),N=t(93017);function B(e){var n;let{open:t,commit:o,onClose:a}=e,{mutate:c,isPending:u}=(0,m.s8)(),[l,d]=(0,f.useState)(""),[h,x]=(0,f.useState)(""),y=()=>{u||(d(""),x(""),a())};return(0,r.jsxs)(q.Z,{open:t,onClose:y,maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(D.Z,{children:"Restore Backup"}),(0,r.jsxs)(I.Z,{children:[(0,r.jsx)(T.Z,{severity:"warning",sx:{mb:2},children:"This will restore all worlds from the selected backup. Current world data will be overwritten."}),l&&(0,r.jsx)(T.Z,{severity:"success",sx:{mb:2},children:l}),h&&(0,r.jsx)(T.Z,{severity:"error",sx:{mb:2},children:h}),(0,r.jsx)(K.Z,{sx:{mb:2},children:"Are you sure you want to restore from this backup?"}),(0,r.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Commit Hash"}),(0,r.jsx)(s.Z,{variant:"body2",sx:{fontFamily:"monospace",fontSize:"0.875rem"},children:o.hash})]}),(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Date"}),(0,r.jsx)(s.Z,{variant:"body2",children:(n=o.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(n)))})]}),(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Message"}),(0,r.jsx)(s.Z,{variant:"body2",children:o.message})]}),(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"caption",color:"text.secondary",children:"Author"}),(0,r.jsx)(s.Z,{variant:"body2",children:o.author})]})]})]}),(0,r.jsxs)(F.Z,{children:[(0,r.jsx)(w.Z,{onClick:y,disabled:u,children:"Cancel"}),(0,r.jsx)(w.Z,{onClick:()=>{d(""),x(""),c(o.hash,{onSuccess:()=>{d("Backup restored successfully from ".concat(o.hash.substring(0,7))),setTimeout(()=>{a()},2e3)},onError:e=>{x("Failed to restore backup: ".concat(e.message))}})},variant:"contained",color:"warning",disabled:u,startIcon:u?(0,r.jsx)(N.Z,{size:16}):(0,r.jsx)(k.Z,{}),children:u?"Restoring...":"Restore"})]})]})}function Q(){let{data:e,isLoading:n,error:t}=(0,m.$t)(20),[i,o]=(0,f.useState)(null),a=e=>{o(e)};if(n)return(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,r.jsx)(s.Z,{color:"text.secondary",children:"Loading..."})]})});if(t)return(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),(0,r.jsx)(s.Z,{color:"error",children:"Failed to load backup history"})]})});let c=(null==e?void 0:e.commits)||[];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)(s.Z,{variant:"h6",gutterBottom:!0,children:"Backup History"}),0===c.length?(0,r.jsx)(s.Z,{color:"text.secondary",children:"No backup history available"}):(0,r.jsx)(g.Z,{children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(b.Z,{children:(0,r.jsxs)(S.Z,{children:[(0,r.jsx)(Z.Z,{children:"Commit"}),(0,r.jsx)(Z.Z,{children:"Date"}),(0,r.jsx)(Z.Z,{children:"Message"}),(0,r.jsx)(Z.Z,{children:"Author"}),(0,r.jsx)(Z.Z,{align:"right",children:"Actions"})]})}),(0,r.jsx)(v.Z,{children:c.map(e=>{var n;return(0,r.jsxs)(S.Z,{children:[(0,r.jsx)(Z.Z,{children:(0,r.jsx)(h.Z,{label:e.hash.substring(0,7),size:"small",variant:"outlined",sx:{fontFamily:"monospace"}})}),(0,r.jsx)(Z.Z,{children:(0,r.jsx)(s.Z,{variant:"body2",children:(n=e.date,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(n)))})}),(0,r.jsx)(Z.Z,{children:(0,r.jsx)(s.Z,{variant:"body2",children:e.message})}),(0,r.jsx)(Z.Z,{children:(0,r.jsx)(s.Z,{variant:"body2",color:"text.secondary",children:e.author})}),(0,r.jsx)(Z.Z,{align:"right",children:(0,r.jsx)(C.Z,{size:"small",color:"primary",onClick:()=>a(e),title:"Restore this backup",children:(0,r.jsx)(k.Z,{})})})]},e.hash)})})]})})]})}),i&&(0,r.jsx)(B,{open:!!i,commit:i,onClose:()=>{o(null)}})]})}var R=t(97436),O=t(34675);function L(e){let{disabled:n}=e,[t,s]=(0,f.useState)(!1),[i,o]=(0,f.useState)(""),[a,c]=(0,f.useState)(""),[u,l]=(0,f.useState)(""),{mutate:d,isPending:h}=(0,m.c5)(),x=()=>{h||(s(!1),o(""),c(""),l(""))};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.Z,{variant:"contained",startIcon:(0,r.jsx)(O.Z,{}),onClick:()=>{s(!0),c(""),l(""),o("Backup ".concat(new Date().toISOString().split("T")[0]))},disabled:n||h,children:"Push Backup"}),(0,r.jsxs)(q.Z,{open:t,onClose:x,maxWidth:"sm",fullWidth:!0,children:[(0,r.jsx)(D.Z,{children:"Push Backup"}),(0,r.jsxs)(I.Z,{children:[a&&(0,r.jsx)(T.Z,{severity:"success",sx:{mb:2},children:a}),u&&(0,r.jsx)(T.Z,{severity:"error",sx:{mb:2},children:u}),(0,r.jsx)(R.Z,{autoFocus:!0,margin:"dense",label:"Commit Message",type:"text",fullWidth:!0,variant:"outlined",value:i,onChange:e=>o(e.target.value),disabled:h,helperText:"Optional message describing this backup"})]}),(0,r.jsxs)(F.Z,{children:[(0,r.jsx)(w.Z,{onClick:x,disabled:h,children:"Cancel"}),(0,r.jsx)(w.Z,{onClick:()=>{c(""),l(""),d({message:i||void 0},{onSuccess:e=>{c(e.commitHash?"Backup pushed successfully (".concat(e.commitHash.substring(0,7),")"):"Backup pushed successfully"),setTimeout(()=>{x()},2e3)},onError:e=>{l("Failed to push backup: ".concat(e.message))}})},variant:"contained",disabled:h,startIcon:h?(0,r.jsx)(N.Z,{size:16}):(0,r.jsx)(O.Z,{}),children:h?"Pushing...":"Push"})]})]})]})}function P(){var e;let{data:n}=(0,m.mj)(),t=null!==(e=null==n?void 0:n.configured)&&void 0!==e&&e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.Z,{elevation:0,sx:{mb:4,p:3,background:e=>"linear-gradient(135deg, ".concat((0,c.Fq)(e.palette.secondary.main,.1)," 0%, ").concat((0,c.Fq)(e.palette.info.main,.1)," 100%)"),borderRadius:2,border:e=>"1px solid ".concat((0,c.Fq)(e.palette.secondary.main,.2)),display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,r.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:2},children:[(0,r.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:56,height:56,borderRadius:2,bgcolor:"secondary.main",color:"secondary.contrastText"},children:(0,r.jsx)(u.Z,{sx:{fontSize:32}})}),(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(s.Z,{variant:"h4",component:"h1",fontWeight:"bold",children:"Backups"}),(0,r.jsx)(s.Z,{variant:"body1",color:"text.secondary",children:"Manage world backups and restore points"})]})]}),(0,r.jsx)(L,{disabled:!t})]}),(0,r.jsxs)(a.Z,{spacing:3,children:[(0,r.jsx)(j,{}),t&&(0,r.jsx)(Q,{})]})]})}},42936:function(e,n,t){"use strict";async function r(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t={...n.headers};n.body&&(t["Content-Type"]="application/json");let r=await fetch(e,{...n,headers:t});if(!r.ok){let e=await r.json().catch(()=>({error:"UnknownError",message:r.statusText})),n=Error(e.message);throw n.statusCode=r.status,n.code=e.error,n}return r.json()}t.d(n,{SC:function(){return r}})},92666:function(e,n,t){"use strict";t.d(n,{$t:function(){return S},Aw:function(){return d},Fv:function(){return f},Hq:function(){return u},Hy:function(){return c},MH:function(){return v},Sr:function(){return x},_I:function(){return h},c5:function(){return C},g2:function(){return j},gx:function(){return Z},hy:function(){return y},iC:function(){return p},jM:function(){return l},mj:function(){return b},nq:function(){return m},nv:function(){return g},s8:function(){return k},x$:function(){return a}});var r=t(5632),s=t(58919),i=t(20367),o=t(42936);function a(){return(0,r.a)({queryKey:["servers"],queryFn:()=>(0,o.SC)("/api/servers"),refetchInterval:6e4})}function c(e,n){return(0,r.a)({queryKey:["servers",e],queryFn:()=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e))),enabled:(null==n?void 0:n.enabled)!==!1&&!!e,refetchInterval:3e4})}function u(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{name:n,force:t}=e;return(0,o.SC)("/api/servers/".concat(encodeURIComponent(n)).concat(t?"?force=true":""),{method:"DELETE"})},onSuccess:()=>{e.invalidateQueries({queryKey:["servers"]})}})}function l(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e),"/start"),{method:"POST"}),onSuccess:(n,t)=>{e.invalidateQueries({queryKey:["servers"]}),e.invalidateQueries({queryKey:["servers",t]})}})}function d(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e),"/stop"),{method:"POST"}),onSuccess:(n,t)=>{e.invalidateQueries({queryKey:["servers"]}),e.invalidateQueries({queryKey:["servers",t]})}})}function h(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e),"/restart"),{method:"POST"}),onSuccess:(n,t)=>{e.invalidateQueries({queryKey:["servers"]}),e.invalidateQueries({queryKey:["servers",t]})}})}function x(){return(0,r.a)({queryKey:["worlds"],queryFn:()=>(0,o.SC)("/api/worlds"),refetchInterval:3e4})}function y(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/worlds",{method:"POST",body:JSON.stringify(e)}),onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]})}})}function m(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{worldName:n,serverName:t}=e;return(0,o.SC)("/api/worlds/".concat(encodeURIComponent(n),"/assign"),{method:"POST",body:JSON.stringify({serverName:t})})},onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]}),e.invalidateQueries({queryKey:["servers"]})}})}function j(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{worldName:n,force:t}=e;return(0,o.SC)("/api/worlds/".concat(encodeURIComponent(n),"/release").concat(t?"?force=true":""),{method:"POST"})},onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]})}})}function f(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{name:n,force:t}=e;return(0,o.SC)("/api/worlds/".concat(encodeURIComponent(n)).concat(t?"?force=true":""),{method:"DELETE"})},onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]})}})}function p(e,n){return(0,r.a)({queryKey:["servers",e,"config"],queryFn:()=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e),"/config")),enabled:(null==n?void 0:n.enabled)!==!1&&!!e})}function v(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{serverName:n,config:t}=e;return(0,o.SC)("/api/servers/".concat(encodeURIComponent(n),"/config"),{method:"PATCH",body:JSON.stringify(t)})},onSuccess:(n,t)=>{let{serverName:r}=t;e.invalidateQueries({queryKey:["servers",r,"config"]}),e.invalidateQueries({queryKey:["servers",r]})}})}function Z(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/servers/".concat(encodeURIComponent(e),"/world/reset"),{method:"POST"}),onSuccess:(n,t)=>{e.invalidateQueries({queryKey:["servers",t]}),e.invalidateQueries({queryKey:["worlds"]})}})}function g(){return(0,r.a)({queryKey:["router-status"],queryFn:()=>(0,o.SC)("/api/router/status"),refetchInterval:3e4})}function b(){return(0,r.a)({queryKey:["backup-status"],queryFn:()=>(0,o.SC)("/api/backup"),refetchInterval:6e4})}function S(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return(0,r.a)({queryKey:["backup-history",e],queryFn:()=>(0,o.SC)("/api/backup/history?limit=".concat(e)),refetchInterval:6e4})}function C(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>{let{message:n}=e;return(0,o.SC)("/api/backup",{method:"POST",body:JSON.stringify({message:n})})},onSuccess:()=>{e.invalidateQueries({queryKey:["backup-status"]}),e.invalidateQueries({queryKey:["backup-history"]})}})}function k(){let e=(0,s.NL)();return(0,i.D)({mutationFn:e=>(0,o.SC)("/api/backup/restore",{method:"POST",body:JSON.stringify({commitHash:e})}),onSuccess:()=>{e.invalidateQueries({queryKey:["worlds"]}),e.invalidateQueries({queryKey:["servers"]})}})}}},function(e){e.O(0,[6812,9760,6758,680,1668,7436,1071,540,4416,7359,880,9654,892,3669,2757,1744],function(){return e(e.s=1366)}),_N_E=e.O()}]);
|