From 8968821197fb2601656ab35aa568b418a4442beb Mon Sep 17 00:00:00 2001 From: Xinecraft Date: Sun, 20 Oct 2024 02:19:44 +0530 Subject: [PATCH] WiP BanWarden --- .env.example | 7 + app/Enums/PlayerPunishmentType.php | 14 +- .../Admin/RecruitmentSubmissionController.php | 4 +- .../Controllers/Admin/ServerController.php | 14 +- app/Http/Controllers/Admin/UserController.php | 3 +- .../Api/ApiBanWardenController.php | 238 ++ app/Http/Controllers/BanWardenController.php | 209 ++ app/Http/Controllers/CustomPageController.php | 2 +- app/Http/Controllers/PlayerController.php | 1 + app/Http/Middleware/AuthenticateApiKey.php | 7 +- app/Http/Requests/CreateServerRequest.php | 5 +- app/Http/Requests/UpdateServerRequest.php | 4 + app/Jobs/GeneratePunishmentInsightsJob.php | 156 + app/Models/Player.php | 12 + app/Models/PlayerPunishment.php | 92 + app/Services/AskGptService.php | 32 +- app/Services/OpenAiService.php | 32 + composer.lock | 16 +- config/minetrax.php | 17 +- .../factories/PlayerPunishmentFactory.php | 43 + ...084539_create_player_punishments_table.php | 61 + database/seeders/PermissionSeeder.php | 6 + ...-a5631c0e.js => ActionMessage-0a173c09.js} | 2 +- ...-b7dccb9b.js => ActionSection-47b16d51.js} | 2 +- ...ut-56ec59aa.js => AdminLayout-2ffdcf09.js} | 2 +- ...324ca2.js => AfterCreateSteps-ee88a425.js} | 2 +- ...Card-abdcd361.js => AlertCard-9ecef095.js} | 2 +- ...e60c14b.js => ApiTokenManager-c54b3194.js} | 2 +- ...yout-e973448b.js => AppLayout-180f66c1.js} | 2 +- ...-bdf12524.js => ArrowPathIcon-c6e59e31.js} | 2 +- ...475e.js => AuthenticationCard-d8c2fc41.js} | 2 +- ....js => AuthenticationCardLogo-0dce8c07.js} | 2 +- ...{Button-4bd25e7c.js => Button-2e00e3fc.js} | 2 +- ...kin-5379fe69.js => ChangeSkin-bac80215.js} | 2 +- .../{Chart-99140012.js => Chart-f075141f.js} | 2 +- ...8f80.js => ChartBarSquareIcon-95f19b2b.js} | 2 +- ...hatlog-713db61c.js => Chatlog-6113f3d8.js} | 2 +- ...ckbox-53958c8e.js => Checkbox-6f533c3f.js} | 2 +- ...8e33.js => CloudArrowDownIcon-c01292c4.js} | 2 +- ...ments-0a69730d.js => Comments-dbad18a7.js} | 2 +- ...ee5a1.js => CommonStatusBadge-61bbdd69.js} | 2 +- ...c1ff45b.js => ConfirmPassword-3d80cc74.js} | 2 +- ...294c1.js => ConfirmationModal-ba520607.js} | 2 +- ...75e25f.js => ConfirmsPassword-b4679733.js} | 2 +- ...log-74a43a53.js => Consolelog-25e94885.js} | 2 +- ...ge-beb2c2cd.js => CreateBadge-d41425c2.js} | 2 +- ...e95f.js => CreateCommandQueue-d25066b4.js} | 2 +- ...af0c8c.js => CreateCustomForm-c58255cc.js} | 2 +- ...d4353c.js => CreateCustomPage-9f1d6e5c.js} | 2 +- ...c2c7f79f.js => CreateDownload-0bb4d35f.js} | 2 +- ....js => CreateEditBungeeServer-ade8b391.js} | 2 +- ...ews-c175c90f.js => CreateNews-2b6f792b.js} | 2 +- ...oll-7ec8733f.js => CreatePoll-f7be85f1.js} | 2 +- ...ank-d81a7928.js => CreateRank-df963bc6.js} | 2 +- ...4b13f.js => CreateRecruitment-2c305d86.js} | 2 +- ...ole-27dcf3aa.js => CreateRole-a2d7ccf5.js} | 2 +- ...r-9e26aa63.js => CreateServer-f4ff2a39.js} | 2 +- ...s => CustomFormIntelListChart-7beb73c6.js} | 2 +- ...n-7d762419.js => DangerButton-71c955e8.js} | 2 +- ...-39c577af.js => DangerSetting-386b9c7c.js} | 2 +- ...oard-32ef8031.js => Dashboard-e20420ee.js} | 2 +- ...oard-69095996.js => Dashboard-e3cefc96.js} | 2 +- ...4e5c3cf9.js => DeleteUserForm-c73b95ed.js} | 2 +- ...al-977775f6.js => DialogModal-0c8e3b2a.js} | 2 +- ...-ffcf3063.js => DidYouKnowBox-8dbe53b3.js} | 2 +- ...Item-1f3b78b0.js => DtRowItem-d6e395fe.js} | 2 +- ...adge-dbfe2aa9.js => EditBadge-54694712.js} | 2 +- ...de01bbae.js => EditCustomForm-57e13716.js} | 2 +- ...2e10cf3c.js => EditCustomPage-3bfe7cdb.js} | 2 +- ...d-0ea18927.js => EditDownload-6d728075.js} | 2 +- ...tNews-1d1ae649.js => EditNews-48d58992.js} | 2 +- ...tRank-d852dab8.js => EditRank-6349f1ae.js} | 2 +- ...3c7a5e6.js => EditRecruitment-bbc5310b.js} | 2 +- ...tRole-7e9a0dd6.js => EditRole-71002814.js} | 2 +- ...ver-1f89b227.js => EditServer-b259bff5.js} | 2 +- ...tUser-82565b51.js => EditUser-0644bf6e.js} | 2 +- ...yeIcon-f53f289b.js => EyeIcon-388b0a41.js} | 2 +- ...st-7e34d5eb.js => FeatureList-61d217ce.js} | 2 +- ...9a6b4bfd.js => ForgotPassword-145311c1.js} | 2 +- ...on-f13c96c5.js => FormSection-b7abaf65.js} | 2 +- ...1d0ee5d1.js => GeneralSetting-6b176256.js} | 2 +- .../{Icon-07002ff2.js => Icon-09cf2959.js} | 2 +- public/build/default/assets/Index-4c6935e7.js | 1 - public/build/default/assets/Index-73e31e93.js | 1 + ...kDb-4cc26e12.js => IndexAskDb-f027c821.js} | 2 +- ...dge-d72d2093.js => IndexBadge-57ccd0e9.js} | 2 +- ...96f03.js => IndexCommandQueue-d76ae471.js} | 2 +- ...223abf7.js => IndexCustomForm-8e1f2559.js} | 2 +- ...5111ae2.js => IndexCustomForm-92bd8550.js} | 2 +- ... => IndexCustomFormSubmission-9be4470d.js} | 2 +- ...a35a07c.js => IndexCustomPage-89e43bd4.js} | 2 +- ...-8993b44b.js => IndexDownload-688dc29e.js} | 2 +- ...-d6ee197f.js => IndexDownload-741290eb.js} | 2 +- ...edbbdc4d.js => IndexFailedJob-f9ae79ce.js} | 2 +- ...News-2f6eb928.js => IndexNews-250506ff.js} | 2 +- ...News-b4ecf1a1.js => IndexNews-3d9f049a.js} | 2 +- ...er-c3ef8e5f.js => IndexPlayer-5a3263ee.js} | 2 +- ...Poll-a3b2bb68.js => IndexPoll-709d097b.js} | 2 +- ...Poll-389bd657.js => IndexPoll-adcd7b7d.js} | 2 +- ...Rank-09179348.js => IndexRank-c458b3a8.js} | 2 +- ...a9aa6f.js => IndexRecruitment-40b1bccd.js} | 2 +- ...9cde3a.js => IndexRecruitment-87dac589.js} | 2 +- ...=> IndexRecruitmentSubmission-560e52a0.js} | 2 +- ...=> IndexRecruitmentSubmission-98ffa7ba.js} | 2 +- ...Role-e534b81b.js => IndexRole-9b22b3ff.js} | 2 +- ...er-9a05f777.js => IndexServer-777f09fa.js} | 2 +- ...n-62afe2d9.js => IndexSession-2641dede.js} | 2 +- ...n-4c58513f.js => IndexSession-563149ee.js} | 2 +- ...aff-65aab91c.js => IndexStaff-a952c293.js} | 2 +- ...User-307cc017.js => IndexUser-423b6417.js} | 2 +- ...77155dfe.js => InfiniteScroll-d51b43df.js} | 2 +- .../{Input-dd4c1472.js => Input-5e60fc33.js} | 2 +- ...ror-60a04532.js => InputError-5a44e724.js} | 2 +- .../{Label-b3ad0293.js => Label-11e35a17.js} | 2 +- ...s => LinkedSocialAccountsForm-71d146d9.js} | 2 +- ...2ee0ee.js => ListLinkedPlayer-bb82e20b.js} | 2 +- ...-48824f65.js => LoadingButton-e7934cd8.js} | 2 +- ...359de6f9.js => LoadingSpinner-3c255422.js} | 2 +- ...n-0c007e7b.js => LockOpenIcon-827abb95.js} | 2 +- .../{Login-d76847e7.js => Login-d411ea4f.js} | 2 +- ...ogoutOtherBrowserSessionsForm-8904e421.js} | 2 +- .../{Modal-1b568ea2.js => Modal-97271be4.js} | 2 +- ...8e61d.js => NavigationSetting-4c096057.js} | 2 +- ...ewsBox-3482bf66.js => NewsBox-1da5bf06.js} | 2 +- ...n-8d3ec9dd.js => NoSymbolIcon-8a7e6bf4.js} | 2 +- ...rview-d3c78b79.js => Overview-4ef9348c.js} | 2 +- ...b.js => PasswordStrengthMeter-bf606963.js} | 2 +- ...737220.js => PencilSquareIcon-538f2837.js} | 2 +- ...ce-a6c9fc8a.js => Performance-a4db7ca0.js} | 2 +- ...-608b5cf3.js => PlayerSetting-31a10f6b.js} | 2 +- ...-431e017c.js => PlayerSubMenu-675ca141.js} | 2 +- ...ase-1a7419a6.js => Playerbase-92138dda.js} | 2 +- ...st-0bb02122.js => PlayersList-0ef9071f.js} | 2 +- ...yersMinecraftVersionMetricBox-2b97d8cc.js} | 2 +- ...-888e43cf.js => PluginSetting-edf6edd2.js} | 2 +- ...ollBox-10a4c504.js => PollBox-ff417874.js} | 2 +- .../{Post-212d1a90.js => Post-b7ee13d9.js} | 2 +- ... => PostRegistrationSetupUser-94701710.js} | 2 +- ...-8177841a.js => PrivacyPolicy-cd15c31f.js} | 2 +- ....js => RecruitmentMessagesBox-17c05847.js} | 2 +- ...ister-0ce08a05.js => Register-a1095d45.js} | 2 +- ...-8b77ddaf.js => ResetPassword-67f75cc2.js} | 2 +- ...6d47922.js => SecondaryButton-f2a3fd51.js} | 2 +- ...-55204df8.js => SectionBorder-5743bf69.js} | 2 +- ...e-e6aedb5c.js => SectionTitle-06c20b1f.js} | 2 +- ...ing-dfc0d418.js => SeoSetting-6ca04c27.js} | 2 +- ... => ServerIntelServerSelector-f57127e6.js} | 2 +- ...b45ada4.js => ServerStatusBox-fcb33ee6.js} | 2 +- ...-42eb6069.js => ServerSubMenu-b61470d4.js} | 2 +- ...utBox-eebc989b.js => ShoutBox-d557e7b3.js} | 2 +- .../{Show-a1f10524.js => Show-4affe96c.js} | 2 +- ...b256e42e.js => ShowBannedPage-81593629.js} | 2 +- ...0e3647a8.js => ShowCustomForm-03cac768.js} | 2 +- ...71a51173.js => ShowCustomForm-545bd7e3.js} | 2 +- ...s => ShowCustomFormSubmission-dd557d00.js} | 2 +- ...fee4caca.js => ShowCustomPage-e93514bc.js} | 2 +- ...d-79126e36.js => ShowDownload-50fa9b20.js} | 2 +- ...wNews-5f2f5af2.js => ShowNews-ae768a83.js} | 2 +- ...wNews-e9d4c855.js => ShowNews-c8fb8f63.js} | 2 +- ...d-06c7e2d9.js => ShowNewsCard-54019a93.js} | 2 +- ...yer-08a22be4.js => ShowPlayer-12119f5c.js} | 2 +- ...wPost-6c457a73.js => ShowPost-b0b13ff1.js} | 2 +- ...6b88591.js => ShowRecruitment-1a0e1c6a.js} | 2 +- ...21d7d68.js => ShowRecruitment-9ed7aa24.js} | 2 +- ... => ShowRecruitmentSubmission-8c09cd07.js} | 2 +- ... => ShowRecruitmentSubmission-fe2d4f24.js} | 2 +- ...ver-e863f44e.js => ShowServer-93810177.js} | 2 +- ...b690af3.js => ShowServerStats-c4cc617d.js} | 2 +- ...on-1a910fac.js => ShowSession-738b0403.js} | 2 +- ...wUser-6fb7eca1.js => ShowUser-082290ba.js} | 2 +- ...92fb7.js => SocialAuthButtons-de49af57.js} | 2 +- ...d2986e.js => SocialChannelBox-66760a7d.js} | 2 +- ...31c497d5.js => TermsOfService-7b203089.js} | 2 +- ...g-46547894.js => ThemeSetting-b9a898de.js} | 2 +- ...Icon-f65af45c.js => TrashIcon-50fe1ad0.js} | 2 +- ...> TwoFactorAuthenticationForm-0fb1cebb.js} | 2 +- ...cffa.js => TwoFactorChallenge-d5cd9356.js} | 2 +- ...teNotificationPreferencesForm-842659a0.js} | 2 +- ...3bb2.js => UpdatePasswordForm-e09df248.js} | 2 +- ... UpdateProfileInformationForm-0d11789f.js} | 2 +- ...4c196f9.js => UserDisplayname-e8f15ed7.js} | 2 +- ...-d603044a.js => UserGroupIcon-e174887a.js} | 2 +- ...rIcon-93e45b79.js => UserIcon-542a2e06.js} | 2 +- ...2a9d2.js => UserNotifications-e5fd2a03.js} | 2 +- ...il-9faf1cd1.js => VerifyEmail-d67709a9.js} | 2 +- ...elcome-3717bc97.js => Welcome-700d1d27.js} | 2 +- ...kbox-da8a8990.js => XCheckbox-4b4d3718.js} | 2 +- ...{XInput-5de78b04.js => XInput-4d223784.js} | 2 +- ...Icon-25f2033f.js => XMarkIcon-63f73fcf.js} | 2 +- ...Select-fa8c7abc.js => XSelect-e6b58960.js} | 2 +- ...area-d9650587.js => XTextarea-a0f330d0.js} | 2 +- public/build/default/assets/app-54f1cad1.css | 7 + public/build/default/assets/app-662bdc65.css | 7 - .../{app-10f1fbb6.js => app-d03084a3.js} | 2 +- ...heme-8b8a50d2.js => darkTheme-b1df9bdd.js} | 2 +- ...asymde-85e05395.js => easymde-5f880db8.js} | 2 +- ...{hidden-f2d5170c.js => hidden-44eecd86.js} | 2 +- .../{index-886e100a.js => index-dedae3a2.js} | 2 +- .../{index-4cdd74a9.js => index-f3fe24a1.js} | 2 +- ...ex.es-1e0088c9.js => index.es-6397ce21.js} | 2 +- ...ed-98ce9e0e.js => open-closed-db295aa4.js} | 2 +- ...js => use-resolve-button-type-d5bb55c5.js} | 2 +- ...9d4f38f.js => useAuthorizable-db63a772.js} | 2 +- ...4fe.js => vue-multiselect.esm-733a639e.js} | 2 +- public/build/default/manifest.json | 3094 ++++++++--------- public/images/console_head.png | Bin 0 -> 334 bytes public/images/console_head2.png | Bin 0 -> 221 bytes public/images/pc_head.png | Bin 0 -> 2992 bytes public/images/pc_render.png | Bin 0 -> 19182 bytes resources/default/js/Components/Comments.vue | 2 +- .../js/Components/DataTable/ArrayTable.vue | 207 ++ resources/default/js/Components/Post.vue | 2 +- .../Admin/CommandQueue/CreateCommandQueue.vue | 2 +- .../IndexCustomFormSubmission.vue | 4 + .../Pages/Admin/PlayerIntel/PlayersList.vue | 2 +- .../IndexRecruitmentSubmission.vue | 4 + .../ShowRecruitmentSubmission.vue | 18 +- .../Admin/Server/CreateEditBungeeServer.vue | 43 +- .../js/Pages/Admin/Server/CreateServer.vue | 35 +- .../js/Pages/Admin/Server/EditServer.vue | 35 +- .../js/Pages/Admin/Server/IndexServer.vue | 2 +- .../default/js/Pages/Admin/User/EditUser.vue | 1 + .../js/Pages/Auth/TwoFactorChallenge.vue | 6 +- .../js/Pages/BanWarden/IndexPunishment.vue | 442 +++ .../js/Pages/BanWarden/ShowPunishment.vue | 1182 +++++++ .../default/js/Pages/Player/IndexPlayer.vue | 498 ++- .../js/Pages/PlayerIntel/IndexSession.vue | 2 +- .../default/js/Pages/User/IndexStaff.vue | 128 +- resources/default/js/Shared/AdminSideMenu.vue | 8 +- .../default/js/Shared/CommonStatusBadge.vue | 13 +- .../default/js/Shared/MainNavbarCustom.vue | 2 +- resources/default/js/Shared/NewestUserBox.vue | 2 +- .../default/js/Shared/OnlineUsersBox.vue | 2 +- .../js/Shared/RecruitmentMessagesBox.vue | 2 +- resources/default/js/Shared/Search.vue | 4 +- .../gptprompts/punishment-insights.blade.php | 11 + routes/api.php | 4 + routes/dev.php | 19 + routes/web.php | 9 +- 239 files changed, 4984 insertions(+), 2148 deletions(-) create mode 100644 app/Http/Controllers/Api/ApiBanWardenController.php create mode 100644 app/Http/Controllers/BanWardenController.php create mode 100644 app/Jobs/GeneratePunishmentInsightsJob.php create mode 100644 app/Models/PlayerPunishment.php create mode 100644 app/Services/OpenAiService.php create mode 100644 database/factories/PlayerPunishmentFactory.php create mode 100644 database/migrations/2024_06_30_084539_create_player_punishments_table.php rename public/build/default/assets/{ActionMessage-a5631c0e.js => ActionMessage-0a173c09.js} (85%) rename public/build/default/assets/{ActionSection-b7dccb9b.js => ActionSection-47b16d51.js} (75%) rename public/build/default/assets/{AdminLayout-56ec59aa.js => AdminLayout-2ffdcf09.js} (98%) rename public/build/default/assets/{AfterCreateSteps-4d324ca2.js => AfterCreateSteps-ee88a425.js} (86%) rename public/build/default/assets/{AlertCard-abdcd361.js => AlertCard-9ecef095.js} (90%) rename public/build/default/assets/{ApiTokenManager-1e60c14b.js => ApiTokenManager-c54b3194.js} (85%) rename public/build/default/assets/{AppLayout-e973448b.js => AppLayout-180f66c1.js} (99%) rename public/build/default/assets/{ArrowPathIcon-bdf12524.js => ArrowPathIcon-c6e59e31.js} (86%) rename public/build/default/assets/{AuthenticationCard-8397475e.js => AuthenticationCard-d8c2fc41.js} (87%) rename public/build/default/assets/{AuthenticationCardLogo-ad53a10c.js => AuthenticationCardLogo-0dce8c07.js} (93%) rename public/build/default/assets/{Button-4bd25e7c.js => Button-2e00e3fc.js} (94%) rename public/build/default/assets/{ChangeSkin-5379fe69.js => ChangeSkin-bac80215.js} (96%) rename public/build/default/assets/{Chart-99140012.js => Chart-f075141f.js} (99%) rename public/build/default/assets/{ChartBarSquareIcon-0a168f80.js => ChartBarSquareIcon-95f19b2b.js} (85%) rename public/build/default/assets/{Chatlog-713db61c.js => Chatlog-6113f3d8.js} (71%) rename public/build/default/assets/{Checkbox-53958c8e.js => Checkbox-6f533c3f.js} (89%) rename public/build/default/assets/{CloudArrowDownIcon-01098e33.js => CloudArrowDownIcon-c01292c4.js} (85%) rename public/build/default/assets/{Comments-0a69730d.js => Comments-dbad18a7.js} (96%) rename public/build/default/assets/{CommonStatusBadge-06cee5a1.js => CommonStatusBadge-61bbdd69.js} (95%) rename public/build/default/assets/{ConfirmPassword-1c1ff45b.js => ConfirmPassword-3d80cc74.js} (79%) rename public/build/default/assets/{ConfirmationModal-cfc294c1.js => ConfirmationModal-ba520607.js} (90%) rename public/build/default/assets/{ConfirmsPassword-3d75e25f.js => ConfirmsPassword-b4679733.js} (83%) rename public/build/default/assets/{Consolelog-74a43a53.js => Consolelog-25e94885.js} (70%) rename public/build/default/assets/{CreateBadge-beb2c2cd.js => CreateBadge-d41425c2.js} (89%) rename public/build/default/assets/{CreateCommandQueue-16dfe95f.js => CreateCommandQueue-d25066b4.js} (94%) rename public/build/default/assets/{CreateCustomForm-44af0c8c.js => CreateCustomForm-c58255cc.js} (93%) rename public/build/default/assets/{CreateCustomPage-34d4353c.js => CreateCustomPage-9f1d6e5c.js} (91%) rename public/build/default/assets/{CreateDownload-c2c7f79f.js => CreateDownload-0bb4d35f.js} (91%) rename public/build/default/assets/{CreateEditBungeeServer-8b82b6ec.js => CreateEditBungeeServer-ade8b391.js} (93%) rename public/build/default/assets/{CreateNews-c175c90f.js => CreateNews-2b6f792b.js} (90%) rename public/build/default/assets/{CreatePoll-7ec8733f.js => CreatePoll-f7be85f1.js} (90%) rename public/build/default/assets/{CreateRank-d81a7928.js => CreateRank-df963bc6.js} (90%) rename public/build/default/assets/{CreateRecruitment-3604b13f.js => CreateRecruitment-2c305d86.js} (94%) rename public/build/default/assets/{CreateRole-27dcf3aa.js => CreateRole-a2d7ccf5.js} (91%) rename public/build/default/assets/{CreateServer-9e26aa63.js => CreateServer-f4ff2a39.js} (93%) rename public/build/default/assets/{CustomFormIntelListChart-8eb1e0fa.js => CustomFormIntelListChart-7beb73c6.js} (92%) rename public/build/default/assets/{DangerButton-7d762419.js => DangerButton-71c955e8.js} (88%) rename public/build/default/assets/{DangerSetting-39c577af.js => DangerSetting-386b9c7c.js} (92%) rename public/build/default/assets/{Dashboard-32ef8031.js => Dashboard-e20420ee.js} (97%) rename public/build/default/assets/{Dashboard-69095996.js => Dashboard-e3cefc96.js} (97%) rename public/build/default/assets/{DeleteUserForm-4e5c3cf9.js => DeleteUserForm-c73b95ed.js} (84%) rename public/build/default/assets/{DialogModal-977775f6.js => DialogModal-0c8e3b2a.js} (83%) rename public/build/default/assets/{DidYouKnowBox-ffcf3063.js => DidYouKnowBox-8dbe53b3.js} (97%) rename public/build/default/assets/{DtRowItem-1f3b78b0.js => DtRowItem-d6e395fe.js} (98%) rename public/build/default/assets/{EditBadge-dbfe2aa9.js => EditBadge-54694712.js} (89%) rename public/build/default/assets/{EditCustomForm-de01bbae.js => EditCustomForm-57e13716.js} (93%) rename public/build/default/assets/{EditCustomPage-2e10cf3c.js => EditCustomPage-3bfe7cdb.js} (91%) rename public/build/default/assets/{EditDownload-0ea18927.js => EditDownload-6d728075.js} (91%) rename public/build/default/assets/{EditNews-1d1ae649.js => EditNews-48d58992.js} (90%) rename public/build/default/assets/{EditRank-d852dab8.js => EditRank-6349f1ae.js} (90%) rename public/build/default/assets/{EditRecruitment-d3c7a5e6.js => EditRecruitment-bbc5310b.js} (95%) rename public/build/default/assets/{EditRole-7e9a0dd6.js => EditRole-71002814.js} (91%) rename public/build/default/assets/{EditServer-1f89b227.js => EditServer-b259bff5.js} (94%) rename public/build/default/assets/{EditUser-82565b51.js => EditUser-0644bf6e.js} (94%) rename public/build/default/assets/{EyeIcon-f53f289b.js => EyeIcon-388b0a41.js} (89%) rename public/build/default/assets/{FeatureList-7e34d5eb.js => FeatureList-61d217ce.js} (92%) rename public/build/default/assets/{ForgotPassword-9a6b4bfd.js => ForgotPassword-145311c1.js} (81%) rename public/build/default/assets/{FormSection-f13c96c5.js => FormSection-b7abaf65.js} (86%) rename public/build/default/assets/{GeneralSetting-1d0ee5d1.js => GeneralSetting-6b176256.js} (97%) rename public/build/default/assets/{Icon-07002ff2.js => Icon-09cf2959.js} (99%) delete mode 100644 public/build/default/assets/Index-4c6935e7.js create mode 100644 public/build/default/assets/Index-73e31e93.js rename public/build/default/assets/{IndexAskDb-4cc26e12.js => IndexAskDb-f027c821.js} (92%) rename public/build/default/assets/{IndexBadge-d72d2093.js => IndexBadge-57ccd0e9.js} (83%) rename public/build/default/assets/{IndexCommandQueue-51b96f03.js => IndexCommandQueue-d76ae471.js} (88%) rename public/build/default/assets/{IndexCustomForm-a223abf7.js => IndexCustomForm-8e1f2559.js} (84%) rename public/build/default/assets/{IndexCustomForm-25111ae2.js => IndexCustomForm-92bd8550.js} (86%) rename public/build/default/assets/{IndexCustomFormSubmission-709a4e93.js => IndexCustomFormSubmission-9be4470d.js} (90%) rename public/build/default/assets/{IndexCustomPage-aa35a07c.js => IndexCustomPage-89e43bd4.js} (87%) rename public/build/default/assets/{IndexDownload-8993b44b.js => IndexDownload-688dc29e.js} (82%) rename public/build/default/assets/{IndexDownload-d6ee197f.js => IndexDownload-741290eb.js} (84%) rename public/build/default/assets/{IndexFailedJob-edbbdc4d.js => IndexFailedJob-f9ae79ce.js} (84%) rename public/build/default/assets/{IndexNews-2f6eb928.js => IndexNews-250506ff.js} (85%) rename public/build/default/assets/{IndexNews-b4ecf1a1.js => IndexNews-3d9f049a.js} (92%) rename public/build/default/assets/{IndexPlayer-c3ef8e5f.js => IndexPlayer-5a3263ee.js} (95%) rename public/build/default/assets/{IndexPoll-a3b2bb68.js => IndexPoll-709d097b.js} (77%) rename public/build/default/assets/{IndexPoll-389bd657.js => IndexPoll-adcd7b7d.js} (87%) rename public/build/default/assets/{IndexRank-09179348.js => IndexRank-c458b3a8.js} (84%) rename public/build/default/assets/{IndexRecruitment-93a9aa6f.js => IndexRecruitment-40b1bccd.js} (87%) rename public/build/default/assets/{IndexRecruitment-b39cde3a.js => IndexRecruitment-87dac589.js} (89%) rename public/build/default/assets/{IndexRecruitmentSubmission-e6593d7c.js => IndexRecruitmentSubmission-560e52a0.js} (85%) rename public/build/default/assets/{IndexRecruitmentSubmission-22eebd4f.js => IndexRecruitmentSubmission-98ffa7ba.js} (87%) rename public/build/default/assets/{IndexRole-e534b81b.js => IndexRole-9b22b3ff.js} (85%) rename public/build/default/assets/{IndexServer-9a05f777.js => IndexServer-777f09fa.js} (91%) rename public/build/default/assets/{IndexSession-62afe2d9.js => IndexSession-2641dede.js} (88%) rename public/build/default/assets/{IndexSession-4c58513f.js => IndexSession-563149ee.js} (82%) rename public/build/default/assets/{IndexStaff-65aab91c.js => IndexStaff-a952c293.js} (82%) rename public/build/default/assets/{IndexUser-307cc017.js => IndexUser-423b6417.js} (86%) rename public/build/default/assets/{InfiniteScroll-77155dfe.js => InfiniteScroll-d51b43df.js} (86%) rename public/build/default/assets/{Input-dd4c1472.js => Input-5e60fc33.js} (89%) rename public/build/default/assets/{InputError-60a04532.js => InputError-5a44e724.js} (52%) rename public/build/default/assets/{Label-b3ad0293.js => Label-11e35a17.js} (81%) rename public/build/default/assets/{LinkedSocialAccountsForm-bc22178a.js => LinkedSocialAccountsForm-71d146d9.js} (72%) rename public/build/default/assets/{ListLinkedPlayer-c82ee0ee.js => ListLinkedPlayer-bb82e20b.js} (97%) rename public/build/default/assets/{LoadingButton-48824f65.js => LoadingButton-e7934cd8.js} (91%) rename public/build/default/assets/{LoadingSpinner-359de6f9.js => LoadingSpinner-3c255422.js} (91%) rename public/build/default/assets/{LockOpenIcon-0c007e7b.js => LockOpenIcon-827abb95.js} (86%) rename public/build/default/assets/{Login-d76847e7.js => Login-d411ea4f.js} (82%) rename public/build/default/assets/{LogoutOtherBrowserSessionsForm-fa6c8872.js => LogoutOtherBrowserSessionsForm-8904e421.js} (90%) rename public/build/default/assets/{Modal-1b568ea2.js => Modal-97271be4.js} (93%) rename public/build/default/assets/{NavigationSetting-3e58e61d.js => NavigationSetting-4c096057.js} (99%) rename public/build/default/assets/{NewsBox-3482bf66.js => NewsBox-1da5bf06.js} (94%) rename public/build/default/assets/{NoSymbolIcon-8d3ec9dd.js => NoSymbolIcon-8a7e6bf4.js} (84%) rename public/build/default/assets/{Overview-d3c78b79.js => Overview-4ef9348c.js} (94%) rename public/build/default/assets/{PasswordStrengthMeter-d8d6aa2b.js => PasswordStrengthMeter-bf606963.js} (99%) rename public/build/default/assets/{PencilSquareIcon-d5737220.js => PencilSquareIcon-538f2837.js} (88%) rename public/build/default/assets/{Performance-a6c9fc8a.js => Performance-a4db7ca0.js} (91%) rename public/build/default/assets/{PlayerSetting-608b5cf3.js => PlayerSetting-31a10f6b.js} (97%) rename public/build/default/assets/{PlayerSubMenu-431e017c.js => PlayerSubMenu-675ca141.js} (96%) rename public/build/default/assets/{Playerbase-1a7419a6.js => Playerbase-92138dda.js} (88%) rename public/build/default/assets/{PlayersList-0bb02122.js => PlayersList-0ef9071f.js} (86%) rename public/build/default/assets/{PlayersMinecraftVersionMetricBox-60b3ba57.js => PlayersMinecraftVersionMetricBox-2b97d8cc.js} (96%) rename public/build/default/assets/{PluginSetting-888e43cf.js => PluginSetting-edf6edd2.js} (96%) rename public/build/default/assets/{PollBox-10a4c504.js => PollBox-ff417874.js} (97%) rename public/build/default/assets/{Post-212d1a90.js => Post-b7ee13d9.js} (95%) rename public/build/default/assets/{PostRegistrationSetupUser-950f46f0.js => PostRegistrationSetupUser-94701710.js} (81%) rename public/build/default/assets/{PrivacyPolicy-8177841a.js => PrivacyPolicy-cd15c31f.js} (82%) rename public/build/default/assets/{RecruitmentMessagesBox-ca73d906.js => RecruitmentMessagesBox-17c05847.js} (94%) rename public/build/default/assets/{Register-0ce08a05.js => Register-a1095d45.js} (87%) rename public/build/default/assets/{ResetPassword-8b77ddaf.js => ResetPassword-67f75cc2.js} (84%) rename public/build/default/assets/{SecondaryButton-e6d47922.js => SecondaryButton-f2a3fd51.js} (94%) rename public/build/default/assets/{SectionBorder-55204df8.js => SectionBorder-5743bf69.js} (81%) rename public/build/default/assets/{SectionTitle-e6aedb5c.js => SectionTitle-06c20b1f.js} (88%) rename public/build/default/assets/{SeoSetting-dfc0d418.js => SeoSetting-6ca04c27.js} (92%) rename public/build/default/assets/{ServerIntelServerSelector-11fc272b.js => ServerIntelServerSelector-f57127e6.js} (89%) rename public/build/default/assets/{ServerStatusBox-7b45ada4.js => ServerStatusBox-fcb33ee6.js} (94%) rename public/build/default/assets/{ServerSubMenu-42eb6069.js => ServerSubMenu-b61470d4.js} (92%) rename public/build/default/assets/{ShoutBox-eebc989b.js => ShoutBox-d557e7b3.js} (97%) rename public/build/default/assets/{Show-a1f10524.js => Show-4affe96c.js} (55%) rename public/build/default/assets/{ShowBannedPage-b256e42e.js => ShowBannedPage-81593629.js} (83%) rename public/build/default/assets/{ShowCustomForm-0e3647a8.js => ShowCustomForm-03cac768.js} (86%) rename public/build/default/assets/{ShowCustomForm-71a51173.js => ShowCustomForm-545bd7e3.js} (91%) rename public/build/default/assets/{ShowCustomFormSubmission-168ea6e8.js => ShowCustomFormSubmission-dd557d00.js} (94%) rename public/build/default/assets/{ShowCustomPage-fee4caca.js => ShowCustomPage-e93514bc.js} (89%) rename public/build/default/assets/{ShowDownload-79126e36.js => ShowDownload-50fa9b20.js} (89%) rename public/build/default/assets/{ShowNews-5f2f5af2.js => ShowNews-ae768a83.js} (76%) rename public/build/default/assets/{ShowNews-e9d4c855.js => ShowNews-c8fb8f63.js} (80%) rename public/build/default/assets/{ShowNewsCard-06c7e2d9.js => ShowNewsCard-54019a93.js} (90%) rename public/build/default/assets/{ShowPlayer-08a22be4.js => ShowPlayer-12119f5c.js} (98%) rename public/build/default/assets/{ShowPost-6c457a73.js => ShowPost-b0b13ff1.js} (65%) rename public/build/default/assets/{ShowRecruitment-96b88591.js => ShowRecruitment-1a0e1c6a.js} (94%) rename public/build/default/assets/{ShowRecruitment-921d7d68.js => ShowRecruitment-9ed7aa24.js} (92%) rename public/build/default/assets/{ShowRecruitmentSubmission-9d054f09.js => ShowRecruitmentSubmission-8c09cd07.js} (91%) rename public/build/default/assets/{ShowRecruitmentSubmission-1c179d41.js => ShowRecruitmentSubmission-fe2d4f24.js} (91%) rename public/build/default/assets/{ShowServer-e863f44e.js => ShowServer-93810177.js} (99%) rename public/build/default/assets/{ShowServerStats-cb690af3.js => ShowServerStats-c4cc617d.js} (98%) rename public/build/default/assets/{ShowSession-1a910fac.js => ShowSession-738b0403.js} (97%) rename public/build/default/assets/{ShowUser-6fb7eca1.js => ShowUser-082290ba.js} (94%) rename public/build/default/assets/{SocialAuthButtons-27b92fb7.js => SocialAuthButtons-de49af57.js} (96%) rename public/build/default/assets/{SocialChannelBox-bdd2986e.js => SocialChannelBox-66760a7d.js} (98%) rename public/build/default/assets/{TermsOfService-31c497d5.js => TermsOfService-7b203089.js} (82%) rename public/build/default/assets/{ThemeSetting-46547894.js => ThemeSetting-b9a898de.js} (96%) rename public/build/default/assets/{TrashIcon-f65af45c.js => TrashIcon-50fe1ad0.js} (91%) rename public/build/default/assets/{TwoFactorAuthenticationForm-c1d2c91f.js => TwoFactorAuthenticationForm-0fb1cebb.js} (90%) rename public/build/default/assets/{TwoFactorChallenge-7465cffa.js => TwoFactorChallenge-d5cd9356.js} (89%) rename public/build/default/assets/{UpdateNotificationPreferencesForm-eb1bf390.js => UpdateNotificationPreferencesForm-842659a0.js} (98%) rename public/build/default/assets/{UpdatePasswordForm-58fa3bb2.js => UpdatePasswordForm-e09df248.js} (87%) rename public/build/default/assets/{UpdateProfileInformationForm-ee7e016a.js => UpdateProfileInformationForm-0d11789f.js} (95%) rename public/build/default/assets/{UserDisplayname-74c196f9.js => UserDisplayname-e8f15ed7.js} (93%) rename public/build/default/assets/{UserGroupIcon-d603044a.js => UserGroupIcon-e174887a.js} (94%) rename public/build/default/assets/{UserIcon-93e45b79.js => UserIcon-542a2e06.js} (85%) rename public/build/default/assets/{UserNotifications-1412a9d2.js => UserNotifications-e5fd2a03.js} (86%) rename public/build/default/assets/{VerifyEmail-9faf1cd1.js => VerifyEmail-d67709a9.js} (85%) rename public/build/default/assets/{Welcome-3717bc97.js => Welcome-700d1d27.js} (98%) rename public/build/default/assets/{XCheckbox-da8a8990.js => XCheckbox-4b4d3718.js} (95%) rename public/build/default/assets/{XInput-5de78b04.js => XInput-4d223784.js} (97%) rename public/build/default/assets/{XMarkIcon-25f2033f.js => XMarkIcon-63f73fcf.js} (80%) rename public/build/default/assets/{XSelect-fa8c7abc.js => XSelect-e6b58960.js} (97%) rename public/build/default/assets/{XTextarea-d9650587.js => XTextarea-a0f330d0.js} (97%) create mode 100644 public/build/default/assets/app-54f1cad1.css delete mode 100644 public/build/default/assets/app-662bdc65.css rename public/build/default/assets/{app-10f1fbb6.js => app-d03084a3.js} (93%) rename public/build/default/assets/{darkTheme-8b8a50d2.js => darkTheme-b1df9bdd.js} (99%) rename public/build/default/assets/{easymde-85e05395.js => easymde-5f880db8.js} (99%) rename public/build/default/assets/{hidden-f2d5170c.js => hidden-44eecd86.js} (96%) rename public/build/default/assets/{index-886e100a.js => index-dedae3a2.js} (98%) rename public/build/default/assets/{index-4cdd74a9.js => index-f3fe24a1.js} (93%) rename public/build/default/assets/{index.es-1e0088c9.js => index.es-6397ce21.js} (99%) rename public/build/default/assets/{open-closed-98ce9e0e.js => open-closed-db295aa4.js} (75%) rename public/build/default/assets/{use-resolve-button-type-5343a0d4.js => use-resolve-button-type-d5bb55c5.js} (96%) rename public/build/default/assets/{useAuthorizable-a9d4f38f.js => useAuthorizable-db63a772.js} (83%) rename public/build/default/assets/{vue-multiselect.esm-2340c4fe.js => vue-multiselect.esm-733a639e.js} (99%) create mode 100644 public/images/console_head.png create mode 100644 public/images/console_head2.png create mode 100644 public/images/pc_head.png create mode 100644 public/images/pc_render.png create mode 100644 resources/default/js/Components/DataTable/ArrayTable.vue create mode 100644 resources/default/js/Pages/BanWarden/IndexPunishment.vue create mode 100644 resources/default/js/Pages/BanWarden/ShowPunishment.vue create mode 100644 resources/default/views/gptprompts/punishment-insights.blade.php diff --git a/.env.example b/.env.example index fe6bc1c5c..96eb00888 100644 --- a/.env.example +++ b/.env.example @@ -170,3 +170,10 @@ MAIL_PASSWORD=null MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS=no-reply@minetrax.github.io MAIL_FROM_NAME="${APP_NAME}" + +# BanWarden +BANWARDEN_ENABLED=true +BANWARDEN_AI_INSIGHTS_ENABLED=true +BANWARDEN_SHOW_PUBLIC=true +BANWARDEN_DISCORD_WEBHHOOK_URL= +BANWARDEN_ALLOW_CONTROL_FROM_WEB=true diff --git a/app/Enums/PlayerPunishmentType.php b/app/Enums/PlayerPunishmentType.php index c891f00d4..feb146ad0 100644 --- a/app/Enums/PlayerPunishmentType.php +++ b/app/Enums/PlayerPunishmentType.php @@ -6,16 +6,10 @@ final class PlayerPunishmentType extends Enum { - const PLAYER_BAN = 'PLAYER_BAN'; - const IP_BAN = 'IP_BAN'; - const COMPOSITE_BAN = 'COMPOSITE_BAN'; - const PLAYER_MUTE = 'PLAYER_MUTE'; - const IP_MUTE = 'IP_MUTE'; - const COMPOSITE_MUTE = 'COMPOSITE_MUTE'; - const PLAYER_WARN = 'PLAYER_WARN'; - const IP_WARN = 'IP_WARN'; - const COMPOSITE_WARN = 'COMPOSITE_WARN'; - const PLAYER_KICK = 'PLAYER_KICK'; + const BAN = 'ban'; + const MUTE = 'mute'; + const WARN = 'warn'; + const KICK = 'kick'; public function toArray(): mixed { diff --git a/app/Http/Controllers/Admin/RecruitmentSubmissionController.php b/app/Http/Controllers/Admin/RecruitmentSubmissionController.php index 6ea576677..d18b2391b 100644 --- a/app/Http/Controllers/Admin/RecruitmentSubmissionController.php +++ b/app/Http/Controllers/Admin/RecruitmentSubmissionController.php @@ -73,7 +73,7 @@ public function indexOpen(Request $request) 'user.name', 'lastActor.name', 'lastCommentor.name', - AllowedFilter::custom('q', new FilterMultipleFields(['data', 'status'])), + AllowedFilter::custom('q', new FilterMultipleFields(['id', 'data', 'status'])), ]) ->allowedSorts($fields) ->defaultSort('-updated_at') @@ -142,7 +142,7 @@ public function indexClosed(Request $request) 'user.name', 'lastActor.name', 'lastCommentor.name', - AllowedFilter::custom('q', new FilterMultipleFields(['data', 'status'])), + AllowedFilter::custom('q', new FilterMultipleFields(['id', 'data', 'status'])), ]) ->allowedSorts($fields) ->defaultSort('-updated_at') diff --git a/app/Http/Controllers/Admin/ServerController.php b/app/Http/Controllers/Admin/ServerController.php index c0f070a38..e21e943ae 100644 --- a/app/Http/Controllers/Admin/ServerController.php +++ b/app/Http/Controllers/Admin/ServerController.php @@ -151,8 +151,12 @@ public function storeBungee(Request $request, GeolocationService $geolocationSer 'webquery_port' => 'nullable|numeric|min:0|max:65535|required_if_accepted:is_server_intel_enabled|different:join_port', 'name' => 'required', 'minecraft_version' => ['required', new EnumValue(ServerVersion::class)], - 'settings' => 'sometimes', 'is_server_intel_enabled' => 'required|boolean', + 'settings' => 'sometimes', + 'settings.server_identifier' => 'nullable|alpha_dash', + 'settings.is_skin_change_via_web_allowed' => 'required|boolean', + 'settings.is_banwarden_enabled' => 'required|boolean', + 'order' => 'nullable|numeric', ]); $countryId = $geolocationService->getCountryIdFromIP($request->ip_address); @@ -170,6 +174,7 @@ public function storeBungee(Request $request, GeolocationService $geolocationSer 'is_server_intel_enabled' => $request->is_server_intel_enabled, 'settings' => $request->settings, 'created_by' => $request->user()->id, + 'order' => $request->order, ]); if (! $request->webquery_port) { @@ -276,8 +281,12 @@ public function updateBungee(Request $request, Server $server, GeolocationServic 'webquery_port' => 'nullable|numeric|min:0|max:65535|required_if_accepted:is_server_intel_enabled|different:join_port', 'name' => 'required', 'minecraft_version' => ['required', new EnumValue(ServerVersion::class)], - 'settings' => 'sometimes', 'is_server_intel_enabled' => 'required|boolean', + 'settings' => 'sometimes', + 'settings.server_identifier' => 'nullable|alpha_dash', + 'settings.is_skin_change_via_web_allowed' => 'required|boolean', + 'settings.is_banwarden_enabled' => 'required|boolean', + 'order' => 'nullable|numeric', ]); $countryId = $geolocationService->getCountryIdFromIP($request->ip_address); @@ -292,6 +301,7 @@ public function updateBungee(Request $request, Server $server, GeolocationServic $server->settings = $request->settings; $server->is_server_intel_enabled = $request->is_server_intel_enabled; $server->country_id = $countryId; + $server->order = $request->order; $server->updated_by = $request->user()->id; $server->save(); diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 43fe9c79b..1660e7176 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -42,7 +42,8 @@ public function index() 'last_login_at', 'roles.display_name', 'country.name', - AllowedFilter::custom('q', new FilterMultipleFields(['name', 'email', 'username'])), + 'discord_user_id', + AllowedFilter::custom('q', new FilterMultipleFields(['name', 'email', 'username', 'discord_user_id'])), ]) ->allowedSorts(['id', 'name', 'email', 'username', 'created_at', 'updated_at', 'country_id', 'last_login_at']) ->defaultSort('id') diff --git a/app/Http/Controllers/Api/ApiBanWardenController.php b/app/Http/Controllers/Api/ApiBanWardenController.php new file mode 100644 index 000000000..85e4c8638 --- /dev/null +++ b/app/Http/Controllers/Api/ApiBanWardenController.php @@ -0,0 +1,238 @@ +validate([ + 'data' => 'required|array', + 'data.server_id' => 'required|numeric|exists:servers,id', + 'data.punishments' => 'required|array', + 'data.punishments.*.plugin_name' => 'required|in:litebans,libertybans', + 'data.punishments.*.plugin_punishment_id' => 'required|string', + 'data.punishments.*.type' => 'required|in:ban,kick,mute,warn', + 'data.punishments.*.uuid' => 'nullable|string', + 'data.punishments.*.ip_address' => 'nullable|ip', + 'data.punishments.*.is_ipban' => 'required|boolean', + 'data.punishments.*.start_at' => 'required|numeric', + 'data.punishments.*.end_at' => 'nullable|numeric', + 'data.punishments.*.reason' => 'nullable|string', + 'data.punishments.*.server_scope' => 'nullable|string', + 'data.punishments.*.origin_server_name' => 'nullable|string', + 'data.punishments.*.creator_uuid' => 'nullable|string', + 'data.punishments.*.creator_username' => 'nullable|string', + 'data.punishments.*.remover_uuid' => 'nullable|string', + 'data.punishments.*.remover_username' => 'nullable|string', + 'data.punishments.*.removed_reason' => 'nullable|string', + 'data.punishments.*.removed_at' => 'nullable|numeric', + 'data.punishments.*.from_event' => 'required|in:punish,pardon,sync', + ]); + + $server = Server::where('id', $request->input('data.server_id'))->firstOrFail(); + if (!$server->settings['is_banwarden_enabled']) { + return $this->error(__('BanWarden is disabled on this server. Please enable it from web.'), 'banwarden_disabled', 403); + } + + DB::beginTransaction(); + try { + $punishments = $request->input('data.punishments'); + foreach ($punishments as $punishment) { + $playerUuid = Str::isUuid($punishment['uuid']) ? $punishment['uuid'] : null; + $creatorUuid = Str::isUuid($punishment['creator_uuid']) ? $punishment['creator_uuid'] : null; + $removerUuid = Str::isUuid($punishment['remover_uuid']) ? $punishment['remover_uuid'] : null; + // Find player id + $player = $playerUuid ? Player::where('uuid', $punishment['uuid'])->first() : null; + + $startAtDate = Carbon::createFromTimestampMs($punishment['start_at']); + $endAtDate = $punishment['end_at'] ? Carbon::createFromTimestampMs($punishment['end_at']) : null; + $removedAtDate = $punishment['removed_at'] ? Carbon::createFromTimestampMs($punishment['removed_at']) : null; + + // Server ID for scope and origin + $serverScope = $punishment['server_scope']; + $scopeServer = null; + if ($serverScope != "*" && $serverScope != null) { + $scopeServer = Server::where('settings->server_identifier', $serverScope) + ->orWhere('name', $serverScope) + ->first(); + } + $originServerName = $punishment['origin_server_name']; + $originServer = null; + if ($originServerName != null) { + $originServer = Server::where('settings->server_identifier', $originServerName) + ->orWhere('name', $originServerName) + ->first(); + } + if (!$originServer) { + $originServer = $server; + } + + // Get country id from IP + $forGeoIp = str_replace(['%', '*'], '0', $punishment['ip_address']); + $countryId = $geolocationService->getCountryIdFromIP($forGeoIp); + + PlayerPunishment::updateOrCreate([ + 'type' => $punishment['type'], + 'plugin_punishment_id' => $punishment['plugin_punishment_id'], + 'plugin_name' => $punishment['plugin_name'], + ], [ + 'type' => $punishment['type'], + 'uuid' => $playerUuid, + 'ip_address' => $punishment['ip_address'], + 'player_id' => $player?->id, + 'is_ipban' => $punishment['is_ipban'], + 'country_id' => $countryId, + 'start_at' => $startAtDate, + 'end_at' => $endAtDate, + 'reason' => $punishment['reason'], + 'server_scope' => $punishment['server_scope'], + 'scope_server_id' => $scopeServer?->id, + 'origin_server_name' => $punishment['origin_server_name'], + 'origin_server_id' => $originServer?->id, + 'creator_uuid' => $creatorUuid, + 'creator_username' => $punishment['creator_username'], + 'remover_uuid' => $removerUuid, + 'remover_username' => $punishment['remover_username'], + 'removed_reason' => $punishment['removed_reason'], + 'removed_at' => $removedAtDate, + ]); + } + + DB::commit(); + + // Forget Metrics Cache + Cache::forget('banwarden.public.metrics'); + + return $this->success(null, __('Punishments synced successfully.')); + } catch (\Exception $e) { + DB::rollBack(); + \Log::error($e); + + return $this->error(__('Failed to sync punishments: :message', [ + 'message' => $e->getMessage(), + ]), 'failed_to_sync_punishments', 500); + } + } + + public function postReportPunishment(Request $request, GeolocationService $geolocationService) + { + $request->validate([ + 'data' => 'required|array', + 'data.server_id' => 'required|numeric|exists:servers,id', + 'data.plugin_name' => 'required|in:litebans,libertybans', + 'data.plugin_punishment_id' => 'required|string', + 'data.type' => 'required|in:ban,kick,mute,warn', + 'data.uuid' => 'nullable|string', + 'data.ip_address' => 'nullable|ip', + 'data.is_ipban' => 'required|boolean', + 'data.start_at' => 'required|numeric', + 'data.end_at' => 'nullable|numeric', + 'data.reason' => 'nullable|string', + 'data.server_scope' => 'nullable|string', + 'data.origin_server_name' => 'nullable|string', + 'data.creator_uuid' => 'nullable|string', + 'data.creator_username' => 'nullable|string', + 'data.remover_uuid' => 'nullable|string', + 'data.remover_username' => 'nullable|string', + 'data.removed_reason' => 'nullable|string', + 'data.removed_at' => 'nullable|numeric', + 'data.from_event' => 'required|in:punish,pardon,sync', + ]); + + $server = Server::where('id', $request->input('data.server_id'))->firstOrFail(); + if (!$server->settings['is_banwarden_enabled']) { + return $this->error(__('BanWarden is disabled on this server. Please enable it from web.'), 'banwarden_disabled', 403); + } + + DB::beginTransaction(); + try { + $punishment = $request->input('data'); + $playerUuid = Str::isUuid($punishment['uuid']) ? $punishment['uuid'] : null; + $creatorUuid = Str::isUuid($punishment['creator_uuid']) ? $punishment['creator_uuid'] : null; + $removerUuid = Str::isUuid($punishment['remover_uuid']) ? $punishment['remover_uuid'] : null; + + // Find player id + $player = $playerUuid ? Player::where('uuid', $playerUuid)->first() : null; + + $startAtDate = Carbon::createFromTimestampMs($punishment['start_at']); + $endAtDate = $punishment['end_at'] ? Carbon::createFromTimestampMs($punishment['end_at']) : null; + $removedAtDate = $punishment['removed_at'] ? Carbon::createFromTimestampMs($punishment['removed_at']) : null; + + // Server ID for scope and origin + $serverScope = $punishment['server_scope']; + $scopeServer = null; + if ($serverScope != "*" && $serverScope != null) { + $scopeServer = Server::where('settings->server_identifier', $serverScope) + ->orWhere('name', $serverScope) + ->first(); + } + $originServerName = $punishment['origin_server_name']; + $originServer = null; + if ($originServerName != null) { + $originServer = Server::where('settings->server_identifier', $originServerName) + ->orWhere('name', $originServerName) + ->first(); + } + if (!$originServer) { + $originServer = $server; + } + + // Get country id from IP + $forGeoIp = str_replace(['%', '*'], '0', $punishment['ip_address']); + $countryId = $geolocationService->getCountryIdFromIP($forGeoIp); + + PlayerPunishment::updateOrCreate([ + 'type' => $punishment['type'], + 'plugin_punishment_id' => $punishment['plugin_punishment_id'], + 'plugin_name' => $punishment['plugin_name'], + ], [ + 'type' => $punishment['type'], + 'uuid' => $playerUuid, + 'ip_address' => $punishment['ip_address'], + 'player_id' => $player?->id, + 'is_ipban' => $punishment['is_ipban'], + 'country_id' => $countryId, + 'start_at' => $startAtDate, + 'end_at' => $endAtDate, + 'reason' => $punishment['reason'], + 'server_scope' => $punishment['server_scope'], + 'scope_server_id' => $scopeServer?->id, + 'origin_server_name' => $punishment['origin_server_name'], + 'origin_server_id' => $originServer?->id, + 'creator_uuid' => $creatorUuid, + 'creator_username' => $punishment['creator_username'], + 'remover_uuid' => $removerUuid, + 'remover_username' => $punishment['remover_username'], + 'removed_reason' => $punishment['removed_reason'], + 'removed_at' => $removedAtDate, + ]); + + // TODO: Report and FireEvent accordingly if its Punish or Pardon event. + + DB::commit(); + + // Forget Metrics Cache + Cache::forget('banwarden.public.metrics'); + + return $this->success(null, __('Punishment reported successfully.')); + } catch (\Exception $e) { + DB::rollBack(); + \Log::error($e); + + return $this->error(__('Failed to report punishment: :message', [ + 'message' => $e->getMessage(), + ]), 'failed_to_report_punishment', 500); + } + } +} diff --git a/app/Http/Controllers/BanWardenController.php b/app/Http/Controllers/BanWardenController.php new file mode 100644 index 000000000..63da0b504 --- /dev/null +++ b/app/Http/Controllers/BanWardenController.php @@ -0,0 +1,209 @@ +input('perPage', 10); + if ($perPage > 100) { + $perPage = 100; + } + + $fields = [ + 'id', + 'type', + 'plugin_punishment_id', + 'uuid', + 'ip_address', + 'player_id', + 'is_ipban', + 'country_id', + 'reason', + 'start_at', + 'end_at', + 'removed_at', + 'creator_uuid', + 'creator_username', + 'server_scope', + ]; + $punishments = QueryBuilder::for(PlayerPunishment::class)->with([ + 'country:id,name,iso_code', + 'victimPlayer:id,uuid,username,skin_texture_id', + 'creatorPlayer:id,uuid,username,skin_texture_id', + ]) + ->select($fields) + ->allowedFilters([ + ...$fields, + 'country.name', + 'victimPlayer.username', + AllowedFilter::scope('status'), + AllowedFilter::custom('q', new FilterMultipleFields([ + 'id', + 'type', + 'plugin_punishment_id', + 'uuid', + 'reason', + 'creator_uuid', + 'creator_username', + 'remover_username', + 'remover_uuid', + ])), + ]) + ->allowedSorts($fields) + ->defaultSort('-id') + ->simplePaginate(perPage: $perPage) + ->through(function ($punishment) { + return $punishment->makeHidden('ip_address'); + }) + ->withQueryString(); + + $countries = Country::select(['id', 'name'])->get()->pluck('name'); + + # Metrics + $metrics = Cache::remember('banwarden.public.metrics', 120, function () { + return [ + 'total_bans' => PlayerPunishment::where('type', 'ban')->count(), + 'total_active_bans' => PlayerPunishment::where('type', 'ban')->status('active')->count(), + 'total_mutes' => PlayerPunishment::where('type', 'mute')->count(), + 'total_active_mutes' => PlayerPunishment::where('type', 'mute')->status('active')->count(), + 'total_warns' => PlayerPunishment::where('type', 'warn')->count(), + 'total_active_warns' => PlayerPunishment::where('type', 'warn')->status('active')->count(), + 'total_kicks' => PlayerPunishment::where('type', 'kick')->count(), + ]; + }); + + return Inertia::render('BanWarden/IndexPunishment', [ + 'countries' => $countries, + 'punishments' => $punishments, + 'filters' => request()->all(['perPage', 'sort', 'filter']), + 'metrics' => $metrics, + ]); + } + + public function show(PlayerPunishment $playerPunishment) + { + $playerPunishment->load([ + 'country:id,name,iso_code', + 'victimPlayer:id,uuid,username,skin_texture_id', + 'creatorPlayer:id,uuid,username,skin_texture_id', + 'removerPlayer:id,uuid,username,skin_texture_id', + ]); + + // Generate insights if enabled and not already generated + $insightEnabled = config('minetrax.banwarden_ai_insights_enabled'); + if ($insightEnabled && !$playerPunishment->insights) { + GeneratePunishmentInsightsJob::dispatch($playerPunishment); + } + + // return $responseProps; + $playerPunishment->victimPlayer?->append('render_url'); + return Inertia::render('BanWarden/ShowPunishment', [ + 'punishment' => $playerPunishment, + ]); + } + + public function indexLastPunishments(PlayerPunishment $playerPunishment) + { + $perPage = request()->query('perPage', 10); + if ($perPage > 100) { + $perPage = 100; + } + + if ($playerPunishment->uuid) { + $lastPunishments = PlayerPunishment::with([ + 'country:id,name,iso_code', + 'victimPlayer:id,uuid,username,skin_texture_id', + 'creatorPlayer:id,uuid,username,skin_texture_id', + 'removerPlayer:id,uuid,username,skin_texture_id', + ]) + ->where('uuid', $playerPunishment->uuid) + ->where('id', '!=', $playerPunishment->id) + ->orderByDesc('start_at') + ->simplePaginate($perPage); + } else { + $lastPunishments = PlayerPunishment::with([ + 'country:id,name,iso_code', + 'victimPlayer:id,uuid,username,skin_texture_id', + 'creatorPlayer:id,uuid,username,skin_texture_id', + 'removerPlayer:id,uuid,username,skin_texture_id', + ]) + ->where('ip_address', 'LIKE', $playerPunishment->ip_address) + ->where('id', '!=', $playerPunishment->id) + ->orderByDesc('start_at') + ->simplePaginate($perPage); + } + + return $lastPunishments; + } + + public function indexLastSessions(PlayerPunishment $playerPunishment) + { + $perPage = request()->query('perPage', 5); + if ($perPage > 100) { + $perPage = 100; + } + + if ($playerPunishment->uuid) { + $pastSessions = MinecraftPlayerSession::with(['country:id,name,iso_code', 'server:id,name']) + ->where('player_uuid', $playerPunishment->uuid) + ->where('session_started_at', '<=', $playerPunishment->start_at) + ->orderByDesc('session_started_at') + ->simplePaginate($perPage) + ->through(function ($session) { + return $session->makeVisible('player_ip_address'); + }); + } else { + $pastSessions = MinecraftPlayerSession::with(['country:id,name,iso_code', 'server:id,name']) + ->where('player_ip_address', 'LIKE', $playerPunishment->ip_address) + ->where('session_started_at', '<=', $playerPunishment->start_at) + ->orderByDesc('session_started_at') + ->simplePaginate($perPage) + ->through(function ($session) { + return $session->makeVisible('player_ip_address'); + }); + } + + return $pastSessions; + } + + public function indexAlts(PlayerPunishment $playerPunishment) + { + $perPage = request()->query('perPage', 5); + if ($perPage > 100) { + $perPage = 100; + } + + $firstTwoOctets = explode('.', $playerPunishment->ip_address); + $firstTwoOctets = $firstTwoOctets[0] . '.' . $firstTwoOctets[1] . '.%'; + $altUuids = MinecraftPlayerSession::distinct()->select('player_uuid') + ->where('player_uuid', '!=', $playerPunishment->uuid) + ->where('player_ip_address', 'LIKE', $firstTwoOctets) + ->pluck('player_uuid'); + $players = Player::select(['id', 'uuid', 'username', 'skin_texture_id', 'first_seen_at', 'last_seen_at', 'country_id', 'ip_address', 'play_time']) + ->whereIn('uuid', $altUuids) + ->with('country:id,name,iso_code') + ->withCount('punishments') + ->orderByDesc('last_seen_at') + ->simplePaginate($perPage) + ->through(function ($player) { + return $player->makeVisible('ip_address'); + }); + + return $players; + } +} diff --git a/app/Http/Controllers/CustomPageController.php b/app/Http/Controllers/CustomPageController.php index 8eab1e96d..ecf805f40 100644 --- a/app/Http/Controllers/CustomPageController.php +++ b/app/Http/Controllers/CustomPageController.php @@ -11,7 +11,7 @@ class CustomPageController extends Controller public function show(CustomPage $customPage) { if (!$customPage->is_visible) { - if (!request()->user() || !request()->user()->is_staff) { + if (!request()->user() || !request()->user()->isStaffMember()) { abort(404); } } diff --git a/app/Http/Controllers/PlayerController.php b/app/Http/Controllers/PlayerController.php index bd88661e7..732845d0c 100644 --- a/app/Http/Controllers/PlayerController.php +++ b/app/Http/Controllers/PlayerController.php @@ -133,6 +133,7 @@ public function getAvatarImage(Request $request, $uuid, $username = null, $textu $username = strtolower($username); $useUsernameForSkins = config('minetrax.use_username_for_skins'); $param = $useUsernameForSkins ? $username : $uuid; + $param = $username ?: $uuid; $size = $request->size ?? 100; // If we got invalid uuid, and we are not using username for skins, return alex diff --git a/app/Http/Middleware/AuthenticateApiKey.php b/app/Http/Middleware/AuthenticateApiKey.php index 47e0cf7c1..1c2d4c615 100644 --- a/app/Http/Middleware/AuthenticateApiKey.php +++ b/app/Http/Middleware/AuthenticateApiKey.php @@ -8,12 +8,13 @@ use Illuminate\Http\Request; const REQUEST_MAX_AGE_THRESHOLD_SECONDS = 600; // servers can be out of sync against NTP servers by various minutes so give some buffer . -const VALIDATE_SIGNATURE = true; // For testing purposes, we can disable signature validation. class AuthenticateApiKey { + private bool $VALIDATE_SIGNATURE; public function __construct(public PluginSettings $pluginSettings) { + $this->VALIDATE_SIGNATURE = app()->isLocal() && app()->hasDebugModeEnabled() ? false : true; } /** @@ -59,7 +60,7 @@ public function handle(Request $request, Closure $next) $signaturePayload = $request->getContent(); } $signatureValid = CryptoUtils::validateHmacSignature($signaturePayload, $requestSignature, $this->pluginSettings->plugin_api_secret); - if (! $signatureValid && VALIDATE_SIGNATURE) { + if (! $signatureValid && $this->VALIDATE_SIGNATURE) { return response()->json([ 'status' => 'error', 'type' => 'invalid_signature', @@ -69,7 +70,7 @@ public function handle(Request $request, Closure $next) // Validate Request Age if provided $timestampMs = $request->get('timestamp'); - if ($timestampMs && VALIDATE_SIGNATURE) { + if ($timestampMs && $this->VALIDATE_SIGNATURE) { $timestamp = $timestampMs / 1000; $currentTimestamp = now()->timestamp; $requestAge = abs($currentTimestamp - $timestamp); diff --git a/app/Http/Requests/CreateServerRequest.php b/app/Http/Requests/CreateServerRequest.php index 453c0ccb7..837141fe9 100644 --- a/app/Http/Requests/CreateServerRequest.php +++ b/app/Http/Requests/CreateServerRequest.php @@ -50,7 +50,10 @@ public function rules() 'is_server_intel_enabled' => 'required|boolean', 'is_player_intel_enabled' => 'required|boolean', 'is_ingame_chat_enabled' => 'required|boolean', - 'order' => 'required|numeric', + 'order' => 'nullable|numeric', + 'settings.server_identifier' => 'nullable|alpha_dash', + 'settings.is_skin_change_via_web_allowed' => 'required|boolean', + 'settings.is_banwarden_enabled' => 'required|boolean', ]; } diff --git a/app/Http/Requests/UpdateServerRequest.php b/app/Http/Requests/UpdateServerRequest.php index 95e79f40f..fb8ecb0ee 100644 --- a/app/Http/Requests/UpdateServerRequest.php +++ b/app/Http/Requests/UpdateServerRequest.php @@ -48,6 +48,10 @@ public function rules() 'is_server_intel_enabled' => 'required|boolean', 'is_player_intel_enabled' => 'required|boolean', 'is_ingame_chat_enabled' => 'required|boolean', + 'order' => 'nullable|numeric', + 'settings.server_identifier' => 'nullable|alpha_dash', + 'settings.is_skin_change_via_web_allowed' => 'required|boolean', + 'settings.is_banwarden_enabled' => 'required|boolean', ]; } diff --git a/app/Jobs/GeneratePunishmentInsightsJob.php b/app/Jobs/GeneratePunishmentInsightsJob.php new file mode 100644 index 000000000..c6da7571c --- /dev/null +++ b/app/Jobs/GeneratePunishmentInsightsJob.php @@ -0,0 +1,156 @@ +punishment->insights && in_array($this->punishment->insights['status'], ['generating', 'generated'])) { + return; + } + + // return if ai insights is disabled + if (!config('minetrax.banwarden_ai_insights_enabled')) { + return; + } + + // mark as generating... + $this->punishment->update([ + 'insights' => [ + 'status' => 'generating', + ], + ]); + + $this->punishment + ->makeVisible('ip_address') + ->loadMissing([ + 'country:id,name,iso_code', + 'victimPlayer:id,uuid,username,skin_texture_id', + 'creatorPlayer:id,uuid,username,skin_texture_id', + 'removerPlayer:id,uuid,username,skin_texture_id', + ]); + + // Details + $punishmentJsonString = json_encode($this->punishment); + + // Last Punishments + if ($this->punishment->uuid) { + $lastPunishments = PlayerPunishment::with([ + 'country:id,name,iso_code', + 'victimPlayer:id,uuid,username,skin_texture_id', + 'creatorPlayer:id,uuid,username,skin_texture_id', + 'removerPlayer:id,uuid,username,skin_texture_id', + ]) + ->where('uuid', $this->punishment->uuid) + ->where('id', '!=', $this->punishment->id) + ->orderByDesc('start_at') + ->limit(10) + ->get() + ->makeVisible('ip_address'); + } else { + $lastPunishments = PlayerPunishment::with([ + 'country:id,name,iso_code', + 'victimPlayer:id,uuid,username,skin_texture_id', + 'creatorPlayer:id,uuid,username,skin_texture_id', + 'removerPlayer:id,uuid,username,skin_texture_id', + ]) + ->where('ip_address', 'LIKE', $this->punishment->ip_address) + ->where('id', '!=', $this->punishment->id) + ->orderByDesc('start_at') + ->limit(10) + ->get() + ->makeVisible('ip_address'); + } + $lastPunishmentsJsonString = json_encode($lastPunishments); + + // Last Sessions + if ($this->punishment->uuid) { + $pastSessions = MinecraftPlayerSession::with(['country:id,name,iso_code', 'server:id,name']) + ->where('player_uuid', $this->punishment->uuid) + ->where('session_started_at', '<=', $this->punishment->start_at) + ->orderByDesc('session_started_at') + ->limit(10) + ->get() + ->makeVisible('player_ip_address'); + } else { + $pastSessions = MinecraftPlayerSession::with(['country:id,name,iso_code', 'server:id,name']) + ->where('player_ip_address', 'LIKE', $this->punishment->ip_address) + ->where('session_started_at', '<=', $this->punishment->start_at) + ->orderByDesc('session_started_at') + ->limit(10) + ->get() + ->makeVisible('player_ip_address'); + } + $lastSessionsJsonString = json_encode($pastSessions); + + // Possible Alts + $firstTwoOctets = explode('.', $this->punishment->ip_address); + $firstTwoOctets = $firstTwoOctets[0] . '.' . $firstTwoOctets[1] . '.%'; + $altUuids = MinecraftPlayerSession::distinct()->select('player_uuid') + ->where('player_uuid', '!=', $this->punishment->uuid) + ->where('player_ip_address', 'LIKE', $firstTwoOctets) + ->pluck('player_uuid'); + $players = Player::select(['id', 'uuid', 'username', 'skin_texture_id', 'first_seen_at', 'last_seen_at', 'country_id', 'ip_address', 'play_time']) + ->whereIn('uuid', $altUuids) + ->with('country:id,name,iso_code') + ->withCount('punishments') + ->orderByDesc('last_seen_at') + ->limit(10) + ->get() + ->makeVisible('ip_address'); + $possibleAltsJsonString = json_encode($players); + + $systemPrompt = view('gptprompts.punishment-insights'); + $question = <<simpleChat($systemPrompt, $question, null, 0.3, 1000, 'json_object'); + $responseData = json_decode($response, true); + + // mark as generated... + $this->punishment->update([ + 'insights' => [ + 'status' => 'generated', + ...$responseData, + ], + ]); + } +} diff --git a/app/Models/Player.php b/app/Models/Player.php index 14c563a80..81f78a592 100644 --- a/app/Models/Player.php +++ b/app/Models/Player.php @@ -60,6 +60,11 @@ public function users(): BelongsToMany return $this->belongsToMany(User::class, 'player_user')->withTimestamps(); } + public function punishments(): HasMany + { + return $this->hasMany(PlayerPunishment::class, 'player_id'); + } + public function getAvatarUrlAttribute(): string { // Someone username can be null @@ -67,6 +72,13 @@ public function getAvatarUrlAttribute(): string return route('player.avatar.get', [$this->uuid, $username, $this->skin_texture_id, 'size' => 100]); } + public function getRenderUrlAttribute(): string + { + // Someone username can be null + $username = $this->username ?? $this->uuid; + return route('player.render.get', [$this->uuid, $username, $this->skin_texture_id]); + } + public function getIsActiveAttribute(): bool { $playerSettings = app(PlayerSettings::class); diff --git a/app/Models/PlayerPunishment.php b/app/Models/PlayerPunishment.php new file mode 100644 index 000000000..63284afc5 --- /dev/null +++ b/app/Models/PlayerPunishment.php @@ -0,0 +1,92 @@ + PlayerPunishmentType::class, + 'meta' => 'array', + 'insights' => 'array', + 'start_at' => 'datetime', + 'end_at' => 'datetime', + 'removed_at' => 'datetime', + 'is_ipban' => 'boolean', + ]; + + protected $appends = [ + 'is_active', + 'masked_ip_address', + ]; + + protected $hidden = [ + 'ip_address', + ]; + + public function scopeStatus($query, $status) + { + if ($status === 'active') { + return $query->where(function ($query) { + $query->whereNull('end_at') + ->orWhere('end_at', '>', now()); + }) + ->where('removed_at', null) + ->where('type', '!=', PlayerPunishmentType::KICK); + } + + if ($status === 'inactive') { + return $query->where(function ($query) { + $query->where('type', PlayerPunishmentType::KICK) + ->orWhere('end_at', '<=', now()); + })->orWhere('removed_at', '!=', null); + } + + return $query; + } + + public function getIsActiveAttribute() + { + return $this->type != PlayerPunishmentType::KICK && $this->removed_at === null && ($this->end_at === null || $this->end_at > now()); + } + + public function getMaskedIpAddressAttribute() + { + return preg_replace('/(\d{1,3})\.\d{1,3}\.\d{1,3}\.\d{1,3}/', '$1.xx.xx.xx', $this->ip_address); + } + + public function country() + { + return $this->belongsTo(Country::class); + } + + public function victimPlayer() + { + return $this->belongsTo(Player::class, 'player_id'); + } + + public function creatorPlayer() + { + return $this->belongsTo(Player::class, 'creator_uuid', 'uuid'); + } + + public function removerPlayer() + { + return $this->belongsTo(Player::class, 'remover_uuid', 'uuid'); + } + + public function scopedServer() + { + return $this->belongsTo(Server::class, 'scope_server_id'); + } + + public function originServer() + { + return $this->belongsTo(Server::class, 'origin_server_id'); + } +} diff --git a/app/Services/AskGptService.php b/app/Services/AskGptService.php index 196c92128..217ca69e2 100644 --- a/app/Services/AskGptService.php +++ b/app/Services/AskGptService.php @@ -9,13 +9,12 @@ const MAX_TABLES_BEFORE_PERFORMING_LOOKUP = 1000; const STRICT_MODE = true; -const MAX_COMPLETION_TOKENS = 1000; class AskGptService { protected string $connection; - public function __construct(protected Client $client) + public function __construct(protected OpenAiService $openAiService) { $this->connection = config('database.default'); } @@ -30,7 +29,7 @@ public function askDb(string $question, $userId = null): string $systemPrompt = $this->buildSystemPromptForAskDb('gptprompts.askdb-result', $question, $query, $result); - $answer = $this->queryOpenAi($systemPrompt, $question, null, 0.5); + $answer = $this->openAiService->simpleChat($systemPrompt, $question, null, 0.5); return Str::of($answer) ->trim() @@ -41,7 +40,7 @@ public function getDbQuery(string $question): string { $systemPrompt = $this->buildSystemPromptForAskDb('gptprompts.askdb-query', $question); - $query = $this->queryOpenAi($systemPrompt, $question); + $query = $this->openAiService->simpleChat($systemPrompt, $question); $query = Str::of($query) ->trim() ->trim('"'); @@ -52,31 +51,14 @@ public function getDbQuery(string $question): string return $query; } - public function chatBot(string $message) + public function chatBot(string $message): string { $systemPrompt = $this->buildSystemPromptForChat(); - $answer = $this->queryOpenAi($systemPrompt, $message, null, 0.7); + $answer = $this->openAiService->simpleChat($systemPrompt, $message, null, 0.7); return Str::of($answer)->trim(); } - protected function queryOpenAi(string $systemPrompt, string $userPrompt, string|null $stop = null, float $temperature = 0.0) - { - $askDbAiModel = config('minetrax.askdb_ai_model'); - $completions = $this->client->chat()->create([ - 'model' => $askDbAiModel, - 'messages' => [ - ['role' => 'system', 'content' => $systemPrompt], - ['role' => 'user', 'content' => $userPrompt], - ], - 'temperature' => $temperature, - 'max_tokens' => MAX_COMPLETION_TOKENS, - 'stop' => $stop, - ]); - - return $completions->choices[0]->message->content; - } - protected function buildSystemPromptForAskDb(string $promptView, string $question, string $query = null, string $result = null): string { $tables = $this->getTables($question); @@ -100,7 +82,7 @@ protected function buildSystemPromptForChat() protected function evaluateQuery(string $query) { - $rawQuery =DB::raw($query)->getValue(DB::connection($this->connection)->getQueryGrammar()); + $rawQuery = DB::raw($query)->getValue(DB::connection($this->connection)->getQueryGrammar()); return DB::connection($this->connection)->select($rawQuery) ?? new \stdClass(); } @@ -147,7 +129,7 @@ protected function filterMatchingTables(string $question, array $tables): array ]); $prompt = rtrim($prompt, PHP_EOL); - $matchingTablesResult = $this->queryOpenAi($prompt, 'Relevant Table Names:', "\n"); + $matchingTablesResult = $this->openAiService->simpleChat($prompt, 'Relevant Table Names:', "\n"); $matchingTables = Str::of($matchingTablesResult) ->explode(',') diff --git a/app/Services/OpenAiService.php b/app/Services/OpenAiService.php new file mode 100644 index 000000000..8f6594668 --- /dev/null +++ b/app/Services/OpenAiService.php @@ -0,0 +1,32 @@ +client->chat()->create([ + 'model' => $aiModel, + 'messages' => [ + ['role' => 'system', 'content' => $systemPrompt], + ['role' => 'user', 'content' => $userPrompt], + ], + 'temperature' => $temperature, + 'max_tokens' => $maxTokens, + 'response_format' => [ + 'type' => $responseFormat, + ], + 'stop' => $stop, + ]); + + return $completions->choices[0]->message->content; + } +} diff --git a/composer.lock b/composer.lock index 6f3306271..884da3338 100644 --- a/composer.lock +++ b/composer.lock @@ -13041,16 +13041,16 @@ }, { "name": "tightenco/ziggy", - "version": "v1.8.1", + "version": "v1.8.2", "source": { "type": "git", "url": "https://github.com/tighten/ziggy.git", - "reference": "22dafc51f3f5ae5ed51f7cb6b566e6b9537f6937" + "reference": "939576ad0f3d3e633a9401c8c377bc7bc873ff35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tighten/ziggy/zipball/22dafc51f3f5ae5ed51f7cb6b566e6b9537f6937", - "reference": "22dafc51f3f5ae5ed51f7cb6b566e6b9537f6937", + "url": "https://api.github.com/repos/tighten/ziggy/zipball/939576ad0f3d3e633a9401c8c377bc7bc873ff35", + "reference": "939576ad0f3d3e633a9401c8c377bc7bc873ff35", "shasum": "" }, "require": { @@ -13058,8 +13058,8 @@ "laravel/framework": ">=5.4@dev" }, "require-dev": { - "orchestra/testbench": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", - "phpunit/phpunit": "^6.0 || ^7.0 || ^8.0 || ^9.0" + "orchestra/testbench": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0" }, "type": "library", "extra": { @@ -13102,9 +13102,9 @@ ], "support": { "issues": "https://github.com/tighten/ziggy/issues", - "source": "https://github.com/tighten/ziggy/tree/v1.8.1" + "source": "https://github.com/tighten/ziggy/tree/v1.8.2" }, - "time": "2023-10-12T18:31:26+00:00" + "time": "2024-02-20T19:56:04+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", diff --git a/config/minetrax.php b/config/minetrax.php index 18eecb133..ed47c3d3b 100644 --- a/config/minetrax.php +++ b/config/minetrax.php @@ -263,14 +263,14 @@ /* |-------------------------------------------------------------------------- - | AskDB AI Model + | OpenAI AI Model |-------------------------------------------------------------------------- | - | Name of the AI model to use for AskDB feature. Currently OpenAI models are supported. + | Name of the AI model to use for OpenAI query. Currently OpenAI models are supported. | Eg: gpt-4o, gpt-4o-mini. | */ - 'askdb_ai_model' => env('ASKDB_AI_MODEL', 'gpt-4o-mini'), + 'openai_ai_model' => env('OPENAI_AI_MODEL', 'gpt-4o-mini'), /* |-------------------------------------------------------------------------- @@ -383,4 +383,15 @@ | */ 'hide_player_next_rank' => env('HIDE_PLAYER_NEXT_RANK', false), + + + /* + |-------------------------------------------------------------------------- + | BanWarden AI Insights Enabled + |-------------------------------------------------------------------------- + | + | If enabled, BanWarden will use AI to generate insights for punishments. + | + */ + 'banwarden_ai_insights_enabled' => env('BANWARDEN_AI_INSIGHTS_ENABLED', true) && env('OPENAI_API_KEY'), ]; diff --git a/database/factories/PlayerPunishmentFactory.php b/database/factories/PlayerPunishmentFactory.php new file mode 100644 index 000000000..e9082333f --- /dev/null +++ b/database/factories/PlayerPunishmentFactory.php @@ -0,0 +1,43 @@ + + */ +class PlayerPunishmentFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + 'type' => $this->faker->randomElement(PlayerPunishmentType::toArray()->pluck('value')), + 'plugin_name' => $this->faker->randomElement(['litebans', 'advancedban', 'libertybans']), + 'plugin_punishment_id' => $this->faker->uuid, + 'uuid' => $this->faker->uuid, + 'username' => $this->faker->userName, + 'ip_address' => $this->faker->ipv4, + 'player_id' => null, + + 'start_at' => $this->faker->dateTime, + 'end_at' => $this->faker->dateTime, + + 'reason' => $this->faker->sentence, + 'notes' => $this->faker->paragraph, + 'meta' => null, + 'server_scope' => $this->faker->randomElement(['global', 'local']), + 'origin_server_name' => $this->faker->randomElement(['lobby', 'survival', 'skyblock']), + 'origin_server_id' => null, + + 'creator_uuid' => $this->faker->uuid, + 'creator_username' => $this->faker->userName, + ]; + } +} diff --git a/database/migrations/2024_06_30_084539_create_player_punishments_table.php b/database/migrations/2024_06_30_084539_create_player_punishments_table.php new file mode 100644 index 000000000..754a59be5 --- /dev/null +++ b/database/migrations/2024_06_30_084539_create_player_punishments_table.php @@ -0,0 +1,61 @@ +id(); + $table->string('type'); + $table->string('plugin_punishment_id')->nullable(); + $table->string('plugin_name')->nullable(); + $table->uuid('uuid')->nullable()->index(); + $table->string('ip_address')->nullable(); + $table->foreignId('player_id')->nullable()->constrained('players')->nullOnDelete(); + $table->boolean('is_ipban')->default(false); + $table->foreignId('country_id')->nullable()->constrained()->nullOnDelete(); + + $table->timestamp('start_at')->nullable()->index(); + $table->timestamp('end_at')->nullable()->index(); + + $table->text('reason')->nullable(); + $table->text('notes')->nullable(); + $table->json('meta')->nullable(); + $table->json('insights')->nullable(); // AI insights + $table->string('server_scope')->nullable(); + $table->string('origin_server_name')->nullable(); + $table->foreignId('scope_server_id')->nullable()->constrained('servers')->nullOnDelete(); + $table->foreignId('origin_server_id')->nullable()->constrained('servers')->nullOnDelete(); + + $table->uuid('creator_uuid')->nullable()->index(); + $table->string('creator_username')->nullable(); + $table->uuid('remover_uuid')->nullable()->index(); + $table->string('remover_username')->nullable(); + $table->string('removed_reason')->nullable(); + $table->timestamp('removed_at')->nullable(); + + + // created_by, updated_by, removed_by are only set if action done from web. + $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete(); + $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete(); + $table->foreignId('removed_by')->nullable()->constrained('users')->nullOnDelete(); + + $table->timestamps(); + $table->index(['type', 'plugin_punishment_id', 'plugin_name']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('player_punishments'); + } +}; diff --git a/database/seeders/PermissionSeeder.php b/database/seeders/PermissionSeeder.php index 57c4302af..2292f1689 100644 --- a/database/seeders/PermissionSeeder.php +++ b/database/seeders/PermissionSeeder.php @@ -126,5 +126,11 @@ public function run() Permission::findOrCreate('link any_players'); Permission::findOrCreate('unlink any_players'); + + Permission::findOrCreate('view banwarden_punishments'); + Permission::findOrCreate('view banwarden_punishments_critical'); + Permission::findOrCreate('create banwarden_punishments'); + Permission::findOrCreate('update banwarden_punishments'); + Permission::findOrCreate('delete banwarden_punishments'); } } diff --git a/public/build/default/assets/ActionMessage-a5631c0e.js b/public/build/default/assets/ActionMessage-0a173c09.js similarity index 85% rename from public/build/default/assets/ActionMessage-a5631c0e.js rename to public/build/default/assets/ActionMessage-0a173c09.js index c61c30afe..6d4fff5bc 100644 --- a/public/build/default/assets/ActionMessage-a5631c0e.js +++ b/public/build/default/assets/ActionMessage-0a173c09.js @@ -1 +1 @@ -import{o as s,d as t,b as o,w as n,j as c,m as i,a as r,R as l,V as d}from"./app-10f1fbb6.js";const _={class:"text-sm text-gray-600"},v={__name:"ActionMessage",props:{on:Boolean},setup(e){return(a,m)=>(s(),t("div",null,[o(d,{"leave-active-class":"transition duration-1000 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:n(()=>[c(r("div",_,[l(a.$slots,"default")],512),[[i,e.on]])]),_:3})]))}};export{v as _}; +import{o as s,d as t,b as o,w as n,j as c,m as i,a as r,R as l,V as d}from"./app-d03084a3.js";const _={class:"text-sm text-gray-600"},v={__name:"ActionMessage",props:{on:Boolean},setup(e){return(a,m)=>(s(),t("div",null,[o(d,{"leave-active-class":"transition duration-1000 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:n(()=>[c(r("div",_,[l(a.$slots,"default")],512),[[i,e.on]])]),_:3})]))}};export{v as _}; diff --git a/public/build/default/assets/ActionSection-b7dccb9b.js b/public/build/default/assets/ActionSection-47b16d51.js similarity index 75% rename from public/build/default/assets/ActionSection-b7dccb9b.js rename to public/build/default/assets/ActionSection-47b16d51.js index ee7190746..955d0ddb3 100644 --- a/public/build/default/assets/ActionSection-b7dccb9b.js +++ b/public/build/default/assets/ActionSection-47b16d51.js @@ -1 +1 @@ -import{J as a}from"./SectionTitle-e6aedb5c.js";import{o as d,d as i,b as c,w as o,R as t,a as e}from"./app-10f1fbb6.js";const r={class:"md:grid md:grid-cols-3 md:gap-6"},n={class:"mt-5 md:mt-0 md:col-span-2"},l={class:"px-4 py-5 sm:p-6 bg-white dark:bg-cool-gray-800 shadow sm:rounded-lg"},h={__name:"ActionSection",setup(m){return(s,p)=>(d(),i("div",r,[c(a,null,{title:o(()=>[t(s.$slots,"title")]),description:o(()=>[t(s.$slots,"description")]),_:3}),e("div",n,[e("div",l,[t(s.$slots,"content")])])]))}};export{h as _}; +import{J as a}from"./SectionTitle-06c20b1f.js";import{o as d,d as i,b as c,w as o,R as t,a as e}from"./app-d03084a3.js";const r={class:"md:grid md:grid-cols-3 md:gap-6"},n={class:"mt-5 md:mt-0 md:col-span-2"},l={class:"px-4 py-5 sm:p-6 bg-white dark:bg-cool-gray-800 shadow sm:rounded-lg"},h={__name:"ActionSection",setup(m){return(s,p)=>(d(),i("div",r,[c(a,null,{title:o(()=>[t(s.$slots,"title")]),description:o(()=>[t(s.$slots,"description")]),_:3}),e("div",n,[e("div",l,[t(s.$slots,"content")])])]))}};export{h as _}; diff --git a/public/build/default/assets/AdminLayout-56ec59aa.js b/public/build/default/assets/AdminLayout-2ffdcf09.js similarity index 98% rename from public/build/default/assets/AdminLayout-56ec59aa.js rename to public/build/default/assets/AdminLayout-2ffdcf09.js index 8d46756c1..0f506e0ff 100644 --- a/public/build/default/assets/AdminLayout-56ec59aa.js +++ b/public/build/default/assets/AdminLayout-2ffdcf09.js @@ -1 +1 @@ -import{A as W}from"./AppLayout-e973448b.js";import{o as n,d as o,a,z as $,r as b,y as O,x as y,A as I,B as L,s as G,C as E,l as J,c as v,w as k,M as D,n as h,e as f,t as _,u as p,Z as X,b as S,F as q,g as N,i as Y,R as Z}from"./app-10f1fbb6.js";import{t as V,u as P,o as w,H as j,b as Q,N as H,a as x}from"./use-resolve-button-type-5343a0d4.js";import{c as ee,l as B,p as re}from"./open-closed-98ce9e0e.js";import{u as te}from"./useAuthorizable-a9d4f38f.js";import{r as ne}from"./CloudArrowDownIcon-01098e33.js";import{u as le}from"./index-886e100a.js";function ie(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.26 10.147a60.436 60.436 0 00-.491 6.347A48.627 48.627 0 0112 20.904a48.627 48.627 0 018.232-4.41 60.46 60.46 0 00-.491-6.347m-15.482 0a50.57 50.57 0 00-2.658-.813A59.905 59.905 0 0112 3.493a59.902 59.902 0 0110.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.697 50.697 0 0112 13.489a50.702 50.702 0 017.74-3.342M6.75 15a.75.75 0 100-1.5.75.75 0 000 1.5zm0 0v-3.675A55.378 55.378 0 0112 8.443m-7.007 11.55A5.981 5.981 0 006.75 15.75v-1.5"})])}function ae(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 12.75c1.148 0 2.278.08 3.383.237 1.037.146 1.866.966 1.866 2.013 0 3.728-2.35 6.75-5.25 6.75S6.75 18.728 6.75 15c0-1.046.83-1.867 1.866-2.013A24.204 24.204 0 0112 12.75zm0 0c2.883 0 5.647.508 8.207 1.44a23.91 23.91 0 01-1.152 6.06M12 12.75c-2.883 0-5.647.508-8.208 1.44.125 2.104.52 4.136 1.153 6.06M12 12.75a2.25 2.25 0 002.248-2.354M12 12.75a2.25 2.25 0 01-2.248-2.354M12 8.25c.995 0 1.971-.08 2.922-.236.403-.066.74-.358.795-.762a3.778 3.778 0 00-.399-2.25M12 8.25c-.995 0-1.97-.08-2.922-.236-.402-.066-.74-.358-.795-.762a3.734 3.734 0 01.4-2.253M12 8.25a2.25 2.25 0 00-2.248 2.146M12 8.25a2.25 2.25 0 012.248 2.146M8.683 5a6.032 6.032 0 01-1.155-1.002c.07-.63.27-1.222.574-1.747m.581 2.749A3.75 3.75 0 0115.318 5m0 0c.427-.283.815-.62 1.155-.999a4.471 4.471 0 00-.575-1.752M4.921 6a24.048 24.048 0 00-.392 3.314c1.668.546 3.416.914 5.223 1.082M19.08 6c.205 1.08.337 2.187.392 3.314a23.882 23.882 0 01-5.223 1.082"})])}function oe(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6a7.5 7.5 0 107.5 7.5h-7.5V6z"}),a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 10.5H21A7.5 7.5 0 0013.5 3v7.5z"})])}function se(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5"})])}function ce(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})])}function ue(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z"})])}function de(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 011.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 01-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.397.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 01-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.505-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.107-1.204l-.527-.738a1.125 1.125 0 01.12-1.45l.773-.773a1.125 1.125 0 011.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894z"}),a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})])}function me(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0021 18V6a2.25 2.25 0 00-2.25-2.25H5.25A2.25 2.25 0 003 6v12a2.25 2.25 0 002.25 2.25z"})])}function he(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})])}function ve(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})])}function fe(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V18a2.25 2.25 0 002.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5M6 7.5h3v3H6v-3z"})])}function pe(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 3v11.25A2.25 2.25 0 006 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0118 16.5h-2.25m-7.5 0h7.5m-7.5 0l-1 3m8.5-3l1 3m0 0l.5 1.5m-.5-1.5h-9.5m0 0l-.5 1.5m.75-9l3-3 2.148 2.148A12.061 12.061 0 0116.5 7.605"})])}function ge(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5.25 14.25h13.5m-13.5 0a3 3 0 01-3-3m3 3a3 3 0 100 6h13.5a3 3 0 100-6m-16.5-3a3 3 0 013-3h13.5a3 3 0 013 3m-19.5 0a4.5 4.5 0 01.9-2.7L5.737 5.1a3.375 3.375 0 012.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 01.9 2.7m0 0a3 3 0 01-3 3m0 3h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008zm-3 6h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008z"})])}function be(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.5 18.75h-9m9 0a3 3 0 013 3h-15a3 3 0 013-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 01-.982-3.172M9.497 14.25a7.454 7.454 0 00.981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 007.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 002.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 012.916.52 6.003 6.003 0 01-5.395 4.972m0 0a6.726 6.726 0 01-2.749 1.35m0 0a6.772 6.772 0 01-3.044 0"})])}function we(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"})])}var xe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(xe||{});let R=Symbol("DisclosureContext");function z(e){let r=E(R,null);if(r===null){let u=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(u,z),u}return r}let T=Symbol("DisclosurePanelContext");function ke(){return E(T,null)}let ye=$({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:r,attrs:u}){let l=b(e.defaultOpen?0:1),t=b(null),c=b(null),s={buttonId:b(`headlessui-disclosure-button-${V()}`),panelId:b(`headlessui-disclosure-panel-${V()}`),disclosureState:l,panel:t,button:c,toggleDisclosure(){l.value=P(l.value,{0:1,1:0})},closeDisclosure(){l.value!==1&&(l.value=1)},close(i){s.closeDisclosure();let m=(()=>i?i instanceof HTMLElement?i:i.value instanceof HTMLElement?w(i):w(s.button):w(s.button))();m==null||m.focus()}};return O(R,s),ee(y(()=>P(l.value,{0:B.Open,1:B.Closed}))),()=>{let{defaultOpen:i,...m}=e,g={open:l.value===0,close:s.close};return j({theirProps:m,ourProps:{},slot:g,slots:r,attrs:u,name:"Disclosure"})}}}),Me=$({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:r,slots:u,expose:l}){let t=z("DisclosureButton"),c=ke(),s=y(()=>c===null?!1:c.value===t.panelId.value);I(()=>{s.value||e.id!==null&&(t.buttonId.value=e.id)}),L(()=>{s.value||(t.buttonId.value=null)});let i=b(null);l({el:i,$el:i}),s.value||G(()=>{t.button.value=i.value});let m=Q(y(()=>({as:e.as,type:r.type})),i);function g(){var d;e.disabled||(s.value?(t.toggleDisclosure(),(d=w(t.button))==null||d.focus()):t.toggleDisclosure())}function M(d){var C;if(!e.disabled)if(s.value)switch(d.key){case x.Space:case x.Enter:d.preventDefault(),d.stopPropagation(),t.toggleDisclosure(),(C=w(t.button))==null||C.focus();break}else switch(d.key){case x.Space:case x.Enter:d.preventDefault(),d.stopPropagation(),t.toggleDisclosure();break}}function A(d){switch(d.key){case x.Space:d.preventDefault();break}}return()=>{var d;let C={open:t.disclosureState.value===0},{id:F,...U}=e,K=s.value?{ref:i,type:m.value,onClick:g,onKeydown:M}:{id:(d=t.buttonId.value)!=null?d:F,ref:i,type:m.value,"aria-expanded":t.disclosureState.value===0,"aria-controls":t.disclosureState.value===0||w(t.panel)?t.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:g,onKeydown:M,onKeyup:A};return j({ourProps:K,theirProps:U,slot:C,attrs:r,slots:u,name:"DisclosureButton"})}}}),Ce=$({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:r,slots:u,expose:l}){let t=z("DisclosurePanel");I(()=>{e.id!==null&&(t.panelId.value=e.id)}),L(()=>{t.panelId.value=null}),l({el:t.panel,$el:t.panel}),O(T,t.panelId);let c=re(),s=y(()=>c!==null?(c.value&B.Open)===B.Open:t.disclosureState.value===0);return()=>{var i;let m={open:t.disclosureState.value===0,close:t.close},{id:g,...M}=e,A={id:(i=t.panelId.value)!=null?i:g,ref:t.panel};return j({ourProps:A,theirProps:M,slot:m,attrs:r,slots:u,features:H.RenderStrategy|H.Static,visible:s.value,name:"DisclosurePanel"})}}});function _e(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[a("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z","clip-rule":"evenodd"})])}const Se={key:1},Be={key:1,class:"flex-1"},Ae={__name:"SideNavItem",props:{item:Object,collapsed:Boolean},setup(e){const r=e,u=y(()=>{function l(t){return t.some(c=>c.active||l(c.children))}return l(r.item.children)});return(l,t)=>{const c=J("SideNavItem",!0);return!e.item.children.length&&e.item.visible?(n(),v(D(e.item.newtab?"a":p(X)),{key:0,class:h(["group flex w-full items-center rounded-md py-2 px-3 text-sm font-medium","hover:bg-gray-100 dark:hover:bg-gray-900",e.item.active?"text-gray-800 font-semibold dark:text-gray-200":"text-gray-600 dark:text-gray-400 font-medium"]),href:e.item.href,target:e.item.newtab?"_blank":null},{default:k(()=>[e.item.icon?(n(),v(D(e.item.icon),{key:0,class:h(["w-6 h-6 shrink-0 mr-2 group-hover:text-gray-600 dark:group-hover:text-gray-400",e.item.active?"text-gray-600 dark:text-gray-400":"text-gray-400 dark:text-gray-600"])},null,8,["class"])):f("",!0),e.collapsed?f("",!0):(n(),o("span",Se,_(l.__(e.item.label)),1))]),_:1},8,["class","href","target"])):e.item.children.length&&e.item.visible?(n(),v(p(ye),{key:1,"default-open":u.value},{default:k(({open:s})=>[S(p(Me),{class:h(["group text-left flex w-full items-center rounded-md py-2 px-3 text-sm","hover:bg-gray-100 dark:hover:bg-gray-900",s?"font-semibold text-gray-800 dark:text-gray-200":"text-gray-600 dark:text-gray-400 font-medium"])},{default:k(()=>[e.item.icon?(n(),v(D(e.item.icon),{key:0,class:h(["w-6 h-6 shrink-0 mr-2 group-hover:text-gray-600 dark:group-hover:text-gray-400",s?"text-gray-600 dark:text-gray-400":"text-gray-400 dark:text-gray-600"])},null,8,["class"])):f("",!0),e.collapsed?f("",!0):(n(),o("span",Be,_(l.__(e.item.label)),1)),e.collapsed?f("",!0):(n(),v(p(_e),{key:2,class:h(["w-6 h-6 shrink-0",s?"-rotate-180 text-gray-600 dark:text-gray-400":"text-gray-400 dark:text-gray-600"])},null,8,["class"]))]),_:2},1032,["class"]),e.collapsed?f("",!0):(n(),v(p(Ce),{key:0,class:"ml-4"},{default:k(()=>[(n(!0),o(q,null,N(e.item.children,i=>(n(),v(c,{key:i.label,item:i},null,8,["item"]))),128))]),_:1}))]),_:1},8,["default-open"])):f("",!0)}}},De={class:"h-screen overflow-y-auto"},$e={class:"mt-2 px-2"},je={key:0,class:"mt-10 text-xs text-center text-gray-600 dark:text-gray-500"},ze={__name:"AdminSideMenu",props:{collapsed:Boolean},emits:["toggleCollapse"],setup(e){const{canWild:r,hasRole:u,can:l}=te(),t=[{label:"Dashboard",href:route("admin.dashboard"),active:route().current("admin.dashboard"),children:[],icon:ve,visible:!0},{label:"Servers",href:route("admin.server.index"),active:route().current("admin.server.*"),children:[],icon:ge,visible:r("servers")},{label:"Server Analytics",href:"#",active:route().current("admin.intel.server.*"),children:[{label:"Overview",href:route("admin.intel.server.index"),active:route().current("admin.intel.server.index"),children:[],icon:null,visible:r("server_intel")},{label:"Performance",href:route("admin.intel.server.performance"),active:route().current("admin.intel.server.performance"),children:[],icon:null,visible:r("server_intel")},{label:"Playerbase",href:route("admin.intel.server.playerbase"),active:route().current("admin.intel.server.playerbase"),children:[],icon:null,visible:r("server_intel")},{label:"Chatlog",href:route("admin.intel.server.chatlog"),active:route().current("admin.intel.server.chatlog"),children:[],icon:null,visible:r("server_intel")},{label:"Consolelog",href:route("admin.intel.server.consolelog"),active:route().current("admin.intel.server.consolelog"),children:[],icon:null,visible:r("server_intel")}],icon:pe,visible:r("server_intel")},{label:"Players",href:"#",active:route().current("admin.intel.player.*")||route().current("admin.rank.*"),children:[{label:"List Players",href:route("admin.intel.player.list"),active:route().current("admin.intel.player.list"),children:[],icon:null,visible:r("player_intel_critical")},{label:"Player Ranks",href:route("admin.rank.index"),active:route().current("admin.rank.*"),children:[],icon:null,visible:r("ranks")}],icon:be,visible:r("player_intel_critical")||r("ranks")},{label:"Users",href:"#",active:!1,children:[{label:"List Users",href:route("admin.user.index"),active:route().current("admin.user.*"),children:[],icon:null,visible:r("users")},{label:"Roles & Permissions",href:route("admin.role.index"),active:route().current("admin.role.*"),children:[],icon:null,visible:r("roles")},{label:"User Badges",href:route("admin.badge.index"),active:route().current("admin.badge.*"),children:[],icon:null,visible:r("badges")},{label:"Online Users",href:route("admin.session.index"),active:route().current("admin.session.*"),children:[],icon:null,visible:r("sessions")}],icon:we,visible:!0},{label:"News",href:route("admin.news.index"),active:route().current("admin.news.*"),children:[],icon:fe,visible:r("news")},{label:"Polls",href:route("admin.poll.index"),active:route().current("admin.poll.*"),children:[],icon:oe,visible:r("polls")},{label:"Downloads",href:route("admin.download.index"),active:route().current("admin.download.*"),children:[],icon:ne,visible:r("downloads")},{label:"Custom Pages",href:route("admin.custom-page.index"),active:route().current("admin.custom-page.*"),children:[],icon:he,visible:r("custom_pages")},{label:"Ask DB",href:route("admin.ask-db.index"),active:route().current("admin.ask-db.*"),children:[],icon:ce,visible:r("ask_db")},{label:"Applicatons",active:!1,children:[{label:"List Application Forms",href:route("admin.recruitment.index"),active:route().current("admin.recruitment.index"),children:[],icon:null,visible:l("read recruitments")},{label:"Open Requests",href:route("admin.recruitment-submission.index-open"),active:route().current("admin.recruitment-submission.index-open"),children:[],icon:null,visible:l("read recruitment_submissions")},{label:"Closed Requests",href:route("admin.recruitment-submission.index-closed"),active:route().current("admin.recruitment-submission.index-closed"),children:[],icon:null,visible:l("read recruitment_submissions")}],icon:ie,visible:r("recruitments")},{label:"Custom Forms",active:!1,children:[{label:"List Forms",href:route("admin.custom-form.index"),active:route().current("admin.custom-form.index"),children:[],icon:null,visible:l("read custom_forms")},{label:"Submissions",href:route("admin.custom-form-submission.index"),active:route().current("admin.custom-form-submission.index"),children:[],icon:null,visible:l("read custom_form_submissions")},{label:"Archived Submissions",href:route("admin.custom-form-submission.index-archived"),active:route().current("admin.custom-form-submission.index-archived"),children:[],icon:null,visible:l("read custom_form_submissions")}],icon:ue,visible:r("custom_forms")},{label:"Commands",active:!1,children:[{label:"Run Command",href:route("admin.command-queue.create"),active:route().current("admin.command-queue.create"),children:[],icon:null,visible:l("create command_queues")},{label:"Command History",href:route("admin.command-queue.index"),active:route().current("admin.command-queue.index"),children:[],icon:null,visible:l("read command_queues")}],icon:me,visible:r("command_queues")},{label:"Settings",href:"#",active:!1,children:[{label:"General",href:route("admin.setting.general.show"),active:route().current("admin.setting.general.show"),children:[],icon:null,visible:!0},{label:"Theme",href:route("admin.setting.theme.show"),active:route().current("admin.setting.theme.show"),children:[],icon:null,visible:!0},{label:"Plugin",href:route("admin.setting.plugin.show"),active:route().current("admin.setting.plugin.show"),children:[],icon:null,visible:!0},{label:"Player",href:route("admin.setting.player.show"),active:route().current("admin.setting.player.show"),children:[],icon:null,visible:!0},{label:"Navigation",href:route("admin.setting.navigation.show"),active:route().current("admin.setting.navigation.show"),children:[],icon:null,visible:!0},{label:"SEO",href:route("admin.setting.seo.show"),active:route().current("admin.setting.seo.show"),children:[],icon:null,visible:!0},{label:"Dangerzone",href:route("admin.setting.danger.show"),active:route().current("admin.setting.danger.show"),children:[],icon:null,visible:u("superadmin")}],icon:de,visible:r("settings")},{label:"Debug",href:"#",active:!1,children:[{label:"Failed Jobs",href:route("admin.failed-job.index"),active:route().current("admin.failed-job.index"),children:[],icon:null,visible:l("read failed_jobs")},{label:"Pulse",href:"/admin/pulse",active:!1,children:[],icon:null,visible:!0,newtab:!0},{label:"Telescope",href:"/telescope",active:!1,children:[],icon:null,visible:!0,newtab:!0}],icon:ae,visible:u("superadmin")}];return(c,s)=>(n(),o("div",{class:h(["min-h-screen fixed bg-white shadow dark:bg-cool-gray-800 z-10 duration-300",e.collapsed?"w-16":"w-64"])},[a("div",De,[a("div",{class:h(["px-4 mt-2 flex",e.collapsed?"justify-center":"justify-end"])},[a("button",{onClick:s[0]||(s[0]=Y(i=>c.$emit("toggleCollapse"),["prevent"]))},[S(p(se),{class:h(["h-6 w-6 p-0.5 text-gray-400 hover:text-gray-600 dark:text-gray-600 dark:hover:text-gray-400",e.collapsed?"-rotate-180":""])},null,8,["class"])])],2),a("nav",$e,[(n(),o(q,null,N(t,i=>S(Ae,{key:i.label,item:i,collapsed:e.collapsed},null,8,["item","collapsed"])),64))]),e.collapsed?f("",!0):(n(),o("div",je,_(c.__("Web Version:"))+" "+_(c.$page.props.webVersion||"unknown"),1))])],2))}},qe={__name:"AdminLayout",setup(e){let r=le("is-admin-sidebar-menu-collapsed",!1);function u(){r.value=!r.value}return(l,t)=>(n(),v(W,null,{default:k(()=>[S(ze,{collapsed:p(r),onToggleCollapse:u},null,8,["collapsed"]),a("main",{class:h([p(r)?"ml-16":"ml-64"])},[Z(l.$slots,"default")],2)]),_:3}))}};export{qe as _,ge as a,we as r}; +import{A as W}from"./AppLayout-180f66c1.js";import{o as n,d as o,a,z as $,r as b,y as O,x as y,A as I,B as L,s as G,C as E,l as J,c as v,w as k,M as D,n as h,e as f,t as _,u as p,Z as X,b as S,F as q,g as N,i as Y,R as Z}from"./app-d03084a3.js";import{t as V,u as P,o as w,H as j,b as Q,N as H,a as x}from"./use-resolve-button-type-d5bb55c5.js";import{c as ee,l as B,p as re}from"./open-closed-db295aa4.js";import{u as te}from"./useAuthorizable-db63a772.js";import{r as ne}from"./CloudArrowDownIcon-c01292c4.js";import{u as le}from"./index-dedae3a2.js";function ie(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.26 10.147a60.436 60.436 0 00-.491 6.347A48.627 48.627 0 0112 20.904a48.627 48.627 0 018.232-4.41 60.46 60.46 0 00-.491-6.347m-15.482 0a50.57 50.57 0 00-2.658-.813A59.905 59.905 0 0112 3.493a59.902 59.902 0 0110.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.697 50.697 0 0112 13.489a50.702 50.702 0 017.74-3.342M6.75 15a.75.75 0 100-1.5.75.75 0 000 1.5zm0 0v-3.675A55.378 55.378 0 0112 8.443m-7.007 11.55A5.981 5.981 0 006.75 15.75v-1.5"})])}function ae(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 12.75c1.148 0 2.278.08 3.383.237 1.037.146 1.866.966 1.866 2.013 0 3.728-2.35 6.75-5.25 6.75S6.75 18.728 6.75 15c0-1.046.83-1.867 1.866-2.013A24.204 24.204 0 0112 12.75zm0 0c2.883 0 5.647.508 8.207 1.44a23.91 23.91 0 01-1.152 6.06M12 12.75c-2.883 0-5.647.508-8.208 1.44.125 2.104.52 4.136 1.153 6.06M12 12.75a2.25 2.25 0 002.248-2.354M12 12.75a2.25 2.25 0 01-2.248-2.354M12 8.25c.995 0 1.971-.08 2.922-.236.403-.066.74-.358.795-.762a3.778 3.778 0 00-.399-2.25M12 8.25c-.995 0-1.97-.08-2.922-.236-.402-.066-.74-.358-.795-.762a3.734 3.734 0 01.4-2.253M12 8.25a2.25 2.25 0 00-2.248 2.146M12 8.25a2.25 2.25 0 012.248 2.146M8.683 5a6.032 6.032 0 01-1.155-1.002c.07-.63.27-1.222.574-1.747m.581 2.749A3.75 3.75 0 0115.318 5m0 0c.427-.283.815-.62 1.155-.999a4.471 4.471 0 00-.575-1.752M4.921 6a24.048 24.048 0 00-.392 3.314c1.668.546 3.416.914 5.223 1.082M19.08 6c.205 1.08.337 2.187.392 3.314a23.882 23.882 0 01-5.223 1.082"})])}function oe(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6a7.5 7.5 0 107.5 7.5h-7.5V6z"}),a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 10.5H21A7.5 7.5 0 0013.5 3v7.5z"})])}function se(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5"})])}function ce(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})])}function ue(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z"})])}function de(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 011.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 01-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.397.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 01-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.505-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.107-1.204l-.527-.738a1.125 1.125 0 01.12-1.45l.773-.773a1.125 1.125 0 011.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894z"}),a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})])}function me(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0021 18V6a2.25 2.25 0 00-2.25-2.25H5.25A2.25 2.25 0 003 6v12a2.25 2.25 0 002.25 2.25z"})])}function he(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})])}function ve(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})])}function fe(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V18a2.25 2.25 0 002.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5M6 7.5h3v3H6v-3z"})])}function pe(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 3v11.25A2.25 2.25 0 006 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0118 16.5h-2.25m-7.5 0h7.5m-7.5 0l-1 3m8.5-3l1 3m0 0l.5 1.5m-.5-1.5h-9.5m0 0l-.5 1.5m.75-9l3-3 2.148 2.148A12.061 12.061 0 0116.5 7.605"})])}function ge(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5.25 14.25h13.5m-13.5 0a3 3 0 01-3-3m3 3a3 3 0 100 6h13.5a3 3 0 100-6m-16.5-3a3 3 0 013-3h13.5a3 3 0 013 3m-19.5 0a4.5 4.5 0 01.9-2.7L5.737 5.1a3.375 3.375 0 012.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 01.9 2.7m0 0a3 3 0 01-3 3m0 3h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008zm-3 6h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008z"})])}function be(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.5 18.75h-9m9 0a3 3 0 013 3h-15a3 3 0 013-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 01-.982-3.172M9.497 14.25a7.454 7.454 0 00.981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 007.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 002.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 012.916.52 6.003 6.003 0 01-5.395 4.972m0 0a6.726 6.726 0 01-2.749 1.35m0 0a6.772 6.772 0 01-3.044 0"})])}function we(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"})])}var xe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(xe||{});let R=Symbol("DisclosureContext");function z(e){let r=E(R,null);if(r===null){let u=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(u,z),u}return r}let T=Symbol("DisclosurePanelContext");function ke(){return E(T,null)}let ye=$({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:r,attrs:u}){let l=b(e.defaultOpen?0:1),t=b(null),c=b(null),s={buttonId:b(`headlessui-disclosure-button-${V()}`),panelId:b(`headlessui-disclosure-panel-${V()}`),disclosureState:l,panel:t,button:c,toggleDisclosure(){l.value=P(l.value,{0:1,1:0})},closeDisclosure(){l.value!==1&&(l.value=1)},close(i){s.closeDisclosure();let m=(()=>i?i instanceof HTMLElement?i:i.value instanceof HTMLElement?w(i):w(s.button):w(s.button))();m==null||m.focus()}};return O(R,s),ee(y(()=>P(l.value,{0:B.Open,1:B.Closed}))),()=>{let{defaultOpen:i,...m}=e,g={open:l.value===0,close:s.close};return j({theirProps:m,ourProps:{},slot:g,slots:r,attrs:u,name:"Disclosure"})}}}),Me=$({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:r,slots:u,expose:l}){let t=z("DisclosureButton"),c=ke(),s=y(()=>c===null?!1:c.value===t.panelId.value);I(()=>{s.value||e.id!==null&&(t.buttonId.value=e.id)}),L(()=>{s.value||(t.buttonId.value=null)});let i=b(null);l({el:i,$el:i}),s.value||G(()=>{t.button.value=i.value});let m=Q(y(()=>({as:e.as,type:r.type})),i);function g(){var d;e.disabled||(s.value?(t.toggleDisclosure(),(d=w(t.button))==null||d.focus()):t.toggleDisclosure())}function M(d){var C;if(!e.disabled)if(s.value)switch(d.key){case x.Space:case x.Enter:d.preventDefault(),d.stopPropagation(),t.toggleDisclosure(),(C=w(t.button))==null||C.focus();break}else switch(d.key){case x.Space:case x.Enter:d.preventDefault(),d.stopPropagation(),t.toggleDisclosure();break}}function A(d){switch(d.key){case x.Space:d.preventDefault();break}}return()=>{var d;let C={open:t.disclosureState.value===0},{id:F,...U}=e,K=s.value?{ref:i,type:m.value,onClick:g,onKeydown:M}:{id:(d=t.buttonId.value)!=null?d:F,ref:i,type:m.value,"aria-expanded":t.disclosureState.value===0,"aria-controls":t.disclosureState.value===0||w(t.panel)?t.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:g,onKeydown:M,onKeyup:A};return j({ourProps:K,theirProps:U,slot:C,attrs:r,slots:u,name:"DisclosureButton"})}}}),Ce=$({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:r,slots:u,expose:l}){let t=z("DisclosurePanel");I(()=>{e.id!==null&&(t.panelId.value=e.id)}),L(()=>{t.panelId.value=null}),l({el:t.panel,$el:t.panel}),O(T,t.panelId);let c=re(),s=y(()=>c!==null?(c.value&B.Open)===B.Open:t.disclosureState.value===0);return()=>{var i;let m={open:t.disclosureState.value===0,close:t.close},{id:g,...M}=e,A={id:(i=t.panelId.value)!=null?i:g,ref:t.panel};return j({ourProps:A,theirProps:M,slot:m,attrs:r,slots:u,features:H.RenderStrategy|H.Static,visible:s.value,name:"DisclosurePanel"})}}});function _e(e,r){return n(),o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[a("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z","clip-rule":"evenodd"})])}const Se={key:1},Be={key:1,class:"flex-1"},Ae={__name:"SideNavItem",props:{item:Object,collapsed:Boolean},setup(e){const r=e,u=y(()=>{function l(t){return t.some(c=>c.active||l(c.children))}return l(r.item.children)});return(l,t)=>{const c=J("SideNavItem",!0);return!e.item.children.length&&e.item.visible?(n(),v(D(e.item.newtab?"a":p(X)),{key:0,class:h(["group flex w-full items-center rounded-md py-2 px-3 text-sm font-medium","hover:bg-gray-100 dark:hover:bg-gray-900",e.item.active?"text-gray-800 font-semibold dark:text-gray-200":"text-gray-600 dark:text-gray-400 font-medium"]),href:e.item.href,target:e.item.newtab?"_blank":null},{default:k(()=>[e.item.icon?(n(),v(D(e.item.icon),{key:0,class:h(["w-6 h-6 shrink-0 mr-2 group-hover:text-gray-600 dark:group-hover:text-gray-400",e.item.active?"text-gray-600 dark:text-gray-400":"text-gray-400 dark:text-gray-600"])},null,8,["class"])):f("",!0),e.collapsed?f("",!0):(n(),o("span",Se,_(l.__(e.item.label)),1))]),_:1},8,["class","href","target"])):e.item.children.length&&e.item.visible?(n(),v(p(ye),{key:1,"default-open":u.value},{default:k(({open:s})=>[S(p(Me),{class:h(["group text-left flex w-full items-center rounded-md py-2 px-3 text-sm","hover:bg-gray-100 dark:hover:bg-gray-900",s?"font-semibold text-gray-800 dark:text-gray-200":"text-gray-600 dark:text-gray-400 font-medium"])},{default:k(()=>[e.item.icon?(n(),v(D(e.item.icon),{key:0,class:h(["w-6 h-6 shrink-0 mr-2 group-hover:text-gray-600 dark:group-hover:text-gray-400",s?"text-gray-600 dark:text-gray-400":"text-gray-400 dark:text-gray-600"])},null,8,["class"])):f("",!0),e.collapsed?f("",!0):(n(),o("span",Be,_(l.__(e.item.label)),1)),e.collapsed?f("",!0):(n(),v(p(_e),{key:2,class:h(["w-6 h-6 shrink-0",s?"-rotate-180 text-gray-600 dark:text-gray-400":"text-gray-400 dark:text-gray-600"])},null,8,["class"]))]),_:2},1032,["class"]),e.collapsed?f("",!0):(n(),v(p(Ce),{key:0,class:"ml-4"},{default:k(()=>[(n(!0),o(q,null,N(e.item.children,i=>(n(),v(c,{key:i.label,item:i},null,8,["item"]))),128))]),_:1}))]),_:1},8,["default-open"])):f("",!0)}}},De={class:"h-screen overflow-y-auto"},$e={class:"mt-2 px-2"},je={key:0,class:"mt-10 text-xs text-center text-gray-600 dark:text-gray-500"},ze={__name:"AdminSideMenu",props:{collapsed:Boolean},emits:["toggleCollapse"],setup(e){const{canWild:r,hasRole:u,can:l}=te(),t=[{label:"Dashboard",href:route("admin.dashboard"),active:route().current("admin.dashboard"),children:[],icon:ve,visible:!0},{label:"Servers",href:route("admin.server.index"),active:route().current("admin.server.*"),children:[],icon:ge,visible:r("servers")},{label:"Server Analytics",href:"#",active:route().current("admin.intel.server.*"),children:[{label:"Overview",href:route("admin.intel.server.index"),active:route().current("admin.intel.server.index"),children:[],icon:null,visible:r("server_intel")},{label:"Performance",href:route("admin.intel.server.performance"),active:route().current("admin.intel.server.performance"),children:[],icon:null,visible:r("server_intel")},{label:"Playerbase",href:route("admin.intel.server.playerbase"),active:route().current("admin.intel.server.playerbase"),children:[],icon:null,visible:r("server_intel")},{label:"Chatlog",href:route("admin.intel.server.chatlog"),active:route().current("admin.intel.server.chatlog"),children:[],icon:null,visible:r("server_intel")},{label:"Consolelog",href:route("admin.intel.server.consolelog"),active:route().current("admin.intel.server.consolelog"),children:[],icon:null,visible:r("server_intel")}],icon:pe,visible:r("server_intel")},{label:"Players",href:"#",active:route().current("admin.intel.player.*")||route().current("admin.rank.*"),children:[{label:"List Players",href:route("admin.intel.player.list"),active:route().current("admin.intel.player.list"),children:[],icon:null,visible:r("player_intel_critical")},{label:"Player Ranks",href:route("admin.rank.index"),active:route().current("admin.rank.*"),children:[],icon:null,visible:r("ranks")}],icon:be,visible:r("player_intel_critical")||r("ranks")},{label:"Users",href:"#",active:!1,children:[{label:"List Users",href:route("admin.user.index"),active:route().current("admin.user.*"),children:[],icon:null,visible:r("users")},{label:"Roles & Permissions",href:route("admin.role.index"),active:route().current("admin.role.*"),children:[],icon:null,visible:r("roles")},{label:"User Badges",href:route("admin.badge.index"),active:route().current("admin.badge.*"),children:[],icon:null,visible:r("badges")},{label:"Online Users",href:route("admin.session.index"),active:route().current("admin.session.*"),children:[],icon:null,visible:r("sessions")}],icon:we,visible:!0},{label:"News",href:route("admin.news.index"),active:route().current("admin.news.*"),children:[],icon:fe,visible:r("news")},{label:"Polls",href:route("admin.poll.index"),active:route().current("admin.poll.*"),children:[],icon:oe,visible:r("polls")},{label:"Downloads",href:route("admin.download.index"),active:route().current("admin.download.*"),children:[],icon:ne,visible:r("downloads")},{label:"Custom Pages",href:route("admin.custom-page.index"),active:route().current("admin.custom-page.*"),children:[],icon:he,visible:r("custom_pages")},{label:"Ask DB",href:route("admin.ask-db.index"),active:route().current("admin.ask-db.*"),children:[],icon:ce,visible:r("ask_db")},{label:"Applicatons",active:!1,children:[{label:"List Application Forms",href:route("admin.recruitment.index"),active:route().current("admin.recruitment.index"),children:[],icon:null,visible:l("read recruitments")},{label:"Open Requests",href:route("admin.recruitment-submission.index-open"),active:route().current("admin.recruitment-submission.index-open"),children:[],icon:null,visible:l("read recruitment_submissions")},{label:"Closed Requests",href:route("admin.recruitment-submission.index-closed"),active:route().current("admin.recruitment-submission.index-closed"),children:[],icon:null,visible:l("read recruitment_submissions")}],icon:ie,visible:r("recruitments")},{label:"Custom Forms",active:!1,children:[{label:"List Forms",href:route("admin.custom-form.index"),active:route().current("admin.custom-form.index"),children:[],icon:null,visible:l("read custom_forms")},{label:"Submissions",href:route("admin.custom-form-submission.index"),active:route().current("admin.custom-form-submission.index"),children:[],icon:null,visible:l("read custom_form_submissions")},{label:"Archived Submissions",href:route("admin.custom-form-submission.index-archived"),active:route().current("admin.custom-form-submission.index-archived"),children:[],icon:null,visible:l("read custom_form_submissions")}],icon:ue,visible:r("custom_forms")},{label:"Commands",active:!1,children:[{label:"Run Command",href:route("admin.command-queue.create"),active:route().current("admin.command-queue.create"),children:[],icon:null,visible:l("create command_queues")},{label:"Command History",href:route("admin.command-queue.index"),active:route().current("admin.command-queue.index"),children:[],icon:null,visible:l("read command_queues")}],icon:me,visible:r("command_queues")},{label:"Settings",href:"#",active:!1,children:[{label:"General",href:route("admin.setting.general.show"),active:route().current("admin.setting.general.show"),children:[],icon:null,visible:!0},{label:"Theme",href:route("admin.setting.theme.show"),active:route().current("admin.setting.theme.show"),children:[],icon:null,visible:!0},{label:"Plugin",href:route("admin.setting.plugin.show"),active:route().current("admin.setting.plugin.show"),children:[],icon:null,visible:!0},{label:"Player",href:route("admin.setting.player.show"),active:route().current("admin.setting.player.show"),children:[],icon:null,visible:!0},{label:"Navigation",href:route("admin.setting.navigation.show"),active:route().current("admin.setting.navigation.show"),children:[],icon:null,visible:!0},{label:"SEO",href:route("admin.setting.seo.show"),active:route().current("admin.setting.seo.show"),children:[],icon:null,visible:!0},{label:"Dangerzone",href:route("admin.setting.danger.show"),active:route().current("admin.setting.danger.show"),children:[],icon:null,visible:u("superadmin")}],icon:de,visible:r("settings")},{label:"Debug",href:"#",active:!1,children:[{label:"Failed Jobs",href:route("admin.failed-job.index"),active:route().current("admin.failed-job.index"),children:[],icon:null,visible:l("read failed_jobs")},{label:"Pulse",href:"/admin/pulse",active:!1,children:[],icon:null,visible:!0,newtab:!0},{label:"Telescope",href:"/telescope",active:!1,children:[],icon:null,visible:!0,newtab:!0}],icon:ae,visible:u("superadmin")}];return(c,s)=>(n(),o("div",{class:h(["min-h-screen fixed bg-white shadow dark:bg-cool-gray-800 z-10 duration-300",e.collapsed?"w-16":"w-64"])},[a("div",De,[a("div",{class:h(["px-4 mt-2 flex",e.collapsed?"justify-center":"justify-end"])},[a("button",{onClick:s[0]||(s[0]=Y(i=>c.$emit("toggleCollapse"),["prevent"]))},[S(p(se),{class:h(["h-6 w-6 p-0.5 text-gray-400 hover:text-gray-600 dark:text-gray-600 dark:hover:text-gray-400",e.collapsed?"-rotate-180":""])},null,8,["class"])])],2),a("nav",$e,[(n(),o(q,null,N(t,i=>S(Ae,{key:i.label,item:i,collapsed:e.collapsed},null,8,["item","collapsed"])),64))]),e.collapsed?f("",!0):(n(),o("div",je,_(c.__("Web Version:"))+" "+_(c.$page.props.webVersion||"unknown"),1))])],2))}},qe={__name:"AdminLayout",setup(e){let r=le("is-admin-sidebar-menu-collapsed",!1);function u(){r.value=!r.value}return(l,t)=>(n(),v(W,null,{default:k(()=>[S(ze,{collapsed:p(r),onToggleCollapse:u},null,8,["collapsed"]),a("main",{class:h([p(r)?"ml-16":"ml-64"])},[Z(l.$slots,"default")],2)]),_:3}))}};export{qe as _,ge as a,we as r}; diff --git a/public/build/default/assets/AfterCreateSteps-4d324ca2.js b/public/build/default/assets/AfterCreateSteps-ee88a425.js similarity index 86% rename from public/build/default/assets/AfterCreateSteps-4d324ca2.js rename to public/build/default/assets/AfterCreateSteps-ee88a425.js index 8de62c18d..755c88fa8 100644 --- a/public/build/default/assets/AfterCreateSteps-4d324ca2.js +++ b/public/build/default/assets/AfterCreateSteps-ee88a425.js @@ -1,4 +1,4 @@ -import{_ as p}from"./AdminLayout-56ec59aa.js";import{o as l,d as c,a as e,l as n,c as h,w as i,b as a,u as _,t,f as s}from"./app-10f1fbb6.js";import"./AppLayout-e973448b.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Icon-07002ff2.js";import"./useAuthorizable-a9d4f38f.js";import"./use-resolve-button-type-5343a0d4.js";import"./open-closed-98ce9e0e.js";import"./CloudArrowDownIcon-01098e33.js";import"./index-886e100a.js";function f(o,r){return l(),c("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])}const g={class:"py-12 px-10 max-w-4xl mx-auto"},m={class:"bg-white shadow rounded p-6 dark:bg-gray-800"},y={class:"flex flex-col items-center justify-center"},v={class:"text-2xl font-bold text-green-500"},w={class:"uppercase font-bold mt-3 dark:text-gray-200 text-gray-800"},b={class:"flex flex-col space-y-4 mt-6 prose-lg prose dark:prose-dark"},x={target:"_blank",class:"text-light-blue-400 hover:text-light-blue-600 whitespace-nowrap",href:"https://github.com/MineTrax/plugin/releases/latest"},k=e("kbd",null,"plugins/Minetrax/config.yml",-1),S=e("br",null,null,-1),q={class:"dark:bg-gray-900"},C={class:"flex justify-end mt-4"},K={__name:"AfterCreateSteps",props:{server:{type:Object,required:!0},apiKey:{type:String,required:!0},apiSecret:{type:String,required:!0},apiHost:{type:String,required:!0}},setup(o){return(r,j)=>{const d=n("app-head"),u=n("InertiaLink");return l(),h(p,null,{default:i(()=>[a(d,{title:r.__("Server Created Successfully!")},null,8,["title"]),e("div",g,[e("div",m,[e("div",y,[a(_(f),{class:"h-32 text-green-500","aria-hidden":"true"}),e("h1",v,t(r.__("Server Added Successfully!")),1),e("h1",w,t(r.__("Follow below steps to add the Plugin!")),1)]),e("div",b,[e("p",null,[s(t(r.__("Download latest version of the MineTrax.jar Plugin and upload it into 'plugins' folder of your server."))+" ",1),e("a",x,t(r.__("Click here to Download")),1)]),e("p",null,[s(t(r.__("Restart your server once so that the plugin can generate the config file inside"))+" ",1),k,s(". ")]),S,e("p",null,[s(t(r.__("Open the config file and update the following details in it as provided below"))+": ",1),e("pre",q,`enabled: true +import{_ as p}from"./AdminLayout-2ffdcf09.js";import{o as l,d as c,a as e,l as n,c as h,w as i,b as a,u as _,t,f as s}from"./app-d03084a3.js";import"./AppLayout-180f66c1.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Icon-09cf2959.js";import"./useAuthorizable-db63a772.js";import"./use-resolve-button-type-d5bb55c5.js";import"./open-closed-db295aa4.js";import"./CloudArrowDownIcon-c01292c4.js";import"./index-dedae3a2.js";function f(o,r){return l(),c("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])}const g={class:"py-12 px-10 max-w-4xl mx-auto"},m={class:"bg-white shadow rounded p-6 dark:bg-gray-800"},y={class:"flex flex-col items-center justify-center"},v={class:"text-2xl font-bold text-green-500"},w={class:"uppercase font-bold mt-3 dark:text-gray-200 text-gray-800"},b={class:"flex flex-col space-y-4 mt-6 prose-lg prose dark:prose-dark"},x={target:"_blank",class:"text-light-blue-400 hover:text-light-blue-600 whitespace-nowrap",href:"https://github.com/MineTrax/plugin/releases/latest"},k=e("kbd",null,"plugins/Minetrax/config.yml",-1),S=e("br",null,null,-1),q={class:"dark:bg-gray-900"},C={class:"flex justify-end mt-4"},K={__name:"AfterCreateSteps",props:{server:{type:Object,required:!0},apiKey:{type:String,required:!0},apiSecret:{type:String,required:!0},apiHost:{type:String,required:!0}},setup(o){return(r,j)=>{const d=n("app-head"),u=n("InertiaLink");return l(),h(p,null,{default:i(()=>[a(d,{title:r.__("Server Created Successfully!")},null,8,["title"]),e("div",g,[e("div",m,[e("div",y,[a(_(f),{class:"h-32 text-green-500","aria-hidden":"true"}),e("h1",v,t(r.__("Server Added Successfully!")),1),e("h1",w,t(r.__("Follow below steps to add the Plugin!")),1)]),e("div",b,[e("p",null,[s(t(r.__("Download latest version of the MineTrax.jar Plugin and upload it into 'plugins' folder of your server."))+" ",1),e("a",x,t(r.__("Click here to Download")),1)]),e("p",null,[s(t(r.__("Restart your server once so that the plugin can generate the config file inside"))+" ",1),k,s(". ")]),S,e("p",null,[s(t(r.__("Open the config file and update the following details in it as provided below"))+": ",1),e("pre",q,`enabled: true api-host: `+t(o.apiHost)+` api-key: `+t(o.apiKey)+` api-secret: `+t(o.apiSecret)+` diff --git a/public/build/default/assets/AlertCard-abdcd361.js b/public/build/default/assets/AlertCard-9ecef095.js similarity index 90% rename from public/build/default/assets/AlertCard-abdcd361.js rename to public/build/default/assets/AlertCard-9ecef095.js index ea74255c9..f02018409 100644 --- a/public/build/default/assets/AlertCard-abdcd361.js +++ b/public/build/default/assets/AlertCard-9ecef095.js @@ -1 +1 @@ -import{r as n}from"./XMarkIcon-25f2033f.js";import{o as s,d as r,a as e,R as l,n as a,b as i,u as c,e as g}from"./app-10f1fbb6.js";const u={class:"flex"},b={class:"py-1"},m=e("path",{d:"M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 11V9h2v6H9v-4zm0-6h2v2H9V5z"},null,-1),h=[m],v={class:"font-bold"},f={class:"text-sm"},w={__name:"AlertCard",props:{borderColor:{type:String,default:"border-green-500"},textColor:{type:String,default:"text-green-500"},titleClass:{type:String,default:""},closeButton:{type:Boolean,default:!1}},emits:["close"],setup(t){return(o,d)=>(s(),r("div",{class:a(`mb-4 bg-white dark:bg-cool-gray-800 border-t-4 ${t.borderColor} rounded-b ${t.textColor} px-4 py-3 shadow relative`),role:"alert"},[e("div",u,[e("div",b,[l(o.$slots,"icon",{},()=>[(s(),r("svg",{class:a(`fill-current h-6 w-6 ${t.textColor} mr-4`),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},h,2))])]),e("div",{class:a(t.titleClass)},[e("div",v,[l(o.$slots,"default")]),e("div",f,[l(o.$slots,"body")])],2)]),t.closeButton?(s(),r("button",{key:0,class:"absolute rounded-full bg-white dark:bg-gray-800 border dark:border-gray-900 dark:hover:bg-gray-700 hover:bg-gray-100 p-1 -top-5 -right-3",onClick:d[0]||(d[0]=y=>o.$emit("close"))},[i(c(n),{class:"h-5 w-5"})])):g("",!0)],2))}};export{w as _}; +import{r as n}from"./XMarkIcon-63f73fcf.js";import{o as s,d as r,a as e,R as l,n as a,b as i,u as c,e as g}from"./app-d03084a3.js";const u={class:"flex"},b={class:"py-1"},m=e("path",{d:"M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 11V9h2v6H9v-4zm0-6h2v2H9V5z"},null,-1),h=[m],v={class:"font-bold"},f={class:"text-sm"},w={__name:"AlertCard",props:{borderColor:{type:String,default:"border-green-500"},textColor:{type:String,default:"text-green-500"},titleClass:{type:String,default:""},closeButton:{type:Boolean,default:!1}},emits:["close"],setup(t){return(o,d)=>(s(),r("div",{class:a(`mb-4 bg-white dark:bg-cool-gray-800 border-t-4 ${t.borderColor} rounded-b ${t.textColor} px-4 py-3 shadow relative`),role:"alert"},[e("div",u,[e("div",b,[l(o.$slots,"icon",{},()=>[(s(),r("svg",{class:a(`fill-current h-6 w-6 ${t.textColor} mr-4`),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},h,2))])]),e("div",{class:a(t.titleClass)},[e("div",v,[l(o.$slots,"default")]),e("div",f,[l(o.$slots,"body")])],2)]),t.closeButton?(s(),r("button",{key:0,class:"absolute rounded-full bg-white dark:bg-gray-800 border dark:border-gray-900 dark:hover:bg-gray-700 hover:bg-gray-100 p-1 -top-5 -right-3",onClick:d[0]||(d[0]=y=>o.$emit("close"))},[i(c(n),{class:"h-5 w-5"})])):g("",!0)],2))}};export{w as _}; diff --git a/public/build/default/assets/ApiTokenManager-1e60c14b.js b/public/build/default/assets/ApiTokenManager-c54b3194.js similarity index 85% rename from public/build/default/assets/ApiTokenManager-1e60c14b.js rename to public/build/default/assets/ApiTokenManager-c54b3194.js index e57e1467c..c15a64900 100644 --- a/public/build/default/assets/ApiTokenManager-1e60c14b.js +++ b/public/build/default/assets/ApiTokenManager-c54b3194.js @@ -1 +1 @@ -import{T as h,r as b,o as i,d as r,b as t,w as e,a,e as v,f as n,u as l,F as $,g as x,n as A,t as k}from"./app-10f1fbb6.js";import{_ as N}from"./ActionMessage-a5631c0e.js";import{_ as j}from"./ActionSection-b7dccb9b.js";import{_ as P}from"./Button-4bd25e7c.js";import{_ as U}from"./ConfirmationModal-cfc294c1.js";import{_ as J}from"./DangerButton-7d762419.js";import{_ as T}from"./DialogModal-977775f6.js";import{_ as L}from"./FormSection-f13c96c5.js";import{_ as M}from"./Input-dd4c1472.js";import{_ as w}from"./Checkbox-53958c8e.js";import{_ as z}from"./InputError-60a04532.js";import{_ as S}from"./Label-b3ad0293.js";import{_ as C}from"./SecondaryButton-e6d47922.js";import{J as E}from"./SectionBorder-55204df8.js";import"./SectionTitle-e6aedb5c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Modal-1b568ea2.js";const Y={class:"col-span-6 sm:col-span-4"},q={key:0,class:"col-span-6"},G={class:"mt-2 grid grid-cols-1 md:grid-cols-2 gap-4"},H={class:"flex items-center"},K={class:"ml-2 text-sm text-gray-600"},O={key:0},Q={class:"mt-10 sm:mt-0"},R={class:"space-y-6"},W={class:"flex items-center"},X={key:0,class:"text-sm text-gray-400"},Z=["onClick"],ee=["onClick"],se=a("div",null," Please copy your new API token. For your security, it won't be shown again. ",-1),te={key:0,class:"mt-4 bg-gray-100 px-4 py-2 rounded font-mono text-sm text-gray-500"},oe={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},ne={class:"flex items-center"},le={class:"ml-2 text-sm text-gray-600"},Ae={__name:"ApiTokenManager",props:{tokens:Array,availablePermissions:Array,defaultPermissions:Array},setup(c){const m=h({name:"",permissions:c.defaultPermissions}),d=h({permissions:[]}),y=h({}),g=b(!1),p=b(null),f=b(null),I=()=>{m.post(route("api-tokens.store"),{preserveScroll:!0,onSuccess:()=>{g.value=!0,m.reset()}})},F=u=>{d.permissions=u.abilities,p.value=u},V=()=>{d.put(route("api-tokens.update",p.value),{preserveScroll:!0,preserveState:!0,onSuccess:()=>p.value=null})},D=u=>{f.value=u},B=()=>{y.delete(route("api-tokens.destroy",f.value),{preserveScroll:!0,preserveState:!0,onSuccess:()=>f.value=null})};return(u,o)=>(i(),r("div",null,[t(L,{onSubmitted:I},{title:e(()=>[n(" Create API Token ")]),description:e(()=>[n(" API tokens allow third-party services to authenticate with our application on your behalf. ")]),form:e(()=>[a("div",Y,[t(S,{for:"name",value:"Name"}),t(M,{id:"name",modelValue:l(m).name,"onUpdate:modelValue":o[0]||(o[0]=s=>l(m).name=s),type:"text",class:"mt-1 block w-full",autofocus:""},null,8,["modelValue"]),t(z,{message:l(m).errors.name,class:"mt-2"},null,8,["message"])]),c.availablePermissions.length>0?(i(),r("div",q,[t(S,{for:"permissions",value:"Permissions"}),a("div",G,[(i(!0),r($,null,x(c.availablePermissions,s=>(i(),r("div",{key:s},[a("label",H,[t(w,{checked:l(m).permissions,"onUpdate:checked":o[1]||(o[1]=_=>l(m).permissions=_),value:s},null,8,["checked","value"]),a("span",K,k(s),1)])]))),128))])])):v("",!0)]),actions:e(()=>[t(N,{on:l(m).recentlySuccessful,class:"mr-3"},{default:e(()=>[n(" Created. ")]),_:1},8,["on"]),t(P,{class:A({"opacity-25":l(m).processing}),disabled:l(m).processing},{default:e(()=>[n(" Create ")]),_:1},8,["class","disabled"])]),_:1}),c.tokens.length>0?(i(),r("div",O,[t(E),a("div",Q,[t(j,null,{title:e(()=>[n(" Manage API Tokens ")]),description:e(()=>[n(" You may delete any of your existing tokens if they are no longer needed. ")]),content:e(()=>[a("div",R,[(i(!0),r($,null,x(c.tokens,s=>(i(),r("div",{key:s.id,class:"flex items-center justify-between"},[a("div",null,k(s.name),1),a("div",W,[s.last_used_ago?(i(),r("div",X," Last used "+k(s.last_used_ago),1)):v("",!0),c.availablePermissions.length>0?(i(),r("button",{key:1,class:"cursor-pointer ml-6 text-sm text-gray-400 underline",onClick:_=>F(s)}," Permissions ",8,Z)):v("",!0),a("button",{class:"cursor-pointer ml-6 text-sm text-red-500",onClick:_=>D(s)}," Delete ",8,ee)])]))),128))])]),_:1})])])):v("",!0),t(T,{show:g.value,onClose:o[3]||(o[3]=s=>g.value=!1)},{title:e(()=>[n(" API Token ")]),content:e(()=>[se,u.$page.props.jetstream.flash.token?(i(),r("div",te,k(u.$page.props.jetstream.flash.token),1)):v("",!0)]),footer:e(()=>[t(C,{onClick:o[2]||(o[2]=s=>g.value=!1)},{default:e(()=>[n(" Close ")]),_:1})]),_:1},8,["show"]),t(T,{show:p.value!=null,onClose:o[6]||(o[6]=s=>p.value=null)},{title:e(()=>[n(" API Token Permissions ")]),content:e(()=>[a("div",oe,[(i(!0),r($,null,x(c.availablePermissions,s=>(i(),r("div",{key:s},[a("label",ne,[t(w,{checked:l(d).permissions,"onUpdate:checked":o[4]||(o[4]=_=>l(d).permissions=_),value:s},null,8,["checked","value"]),a("span",le,k(s),1)])]))),128))])]),footer:e(()=>[t(C,{onClick:o[5]||(o[5]=s=>p.value=null)},{default:e(()=>[n(" Cancel ")]),_:1}),t(P,{class:A(["ml-3",{"opacity-25":l(d).processing}]),disabled:l(d).processing,onClick:V},{default:e(()=>[n(" Save ")]),_:1},8,["class","disabled"])]),_:1},8,["show"]),t(U,{show:f.value!=null,onClose:o[8]||(o[8]=s=>f.value=null)},{title:e(()=>[n(" Delete API Token ")]),content:e(()=>[n(" Are you sure you would like to delete this API token? ")]),footer:e(()=>[t(C,{onClick:o[7]||(o[7]=s=>f.value=null)},{default:e(()=>[n(" Cancel ")]),_:1}),t(J,{class:A(["ml-3",{"opacity-25":l(y).processing}]),disabled:l(y).processing,onClick:B},{default:e(()=>[n(" Delete ")]),_:1},8,["class","disabled"])]),_:1},8,["show"])]))}};export{Ae as default}; +import{T as h,r as b,o as i,d as r,b as t,w as e,a,e as v,f as n,u as l,F as $,g as x,n as A,t as k}from"./app-d03084a3.js";import{_ as N}from"./ActionMessage-0a173c09.js";import{_ as j}from"./ActionSection-47b16d51.js";import{_ as P}from"./Button-2e00e3fc.js";import{_ as U}from"./ConfirmationModal-ba520607.js";import{_ as J}from"./DangerButton-71c955e8.js";import{_ as T}from"./DialogModal-0c8e3b2a.js";import{_ as L}from"./FormSection-b7abaf65.js";import{_ as M}from"./Input-5e60fc33.js";import{_ as w}from"./Checkbox-6f533c3f.js";import{_ as z}from"./InputError-5a44e724.js";import{_ as S}from"./Label-11e35a17.js";import{_ as C}from"./SecondaryButton-f2a3fd51.js";import{J as E}from"./SectionBorder-5743bf69.js";import"./SectionTitle-06c20b1f.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Modal-97271be4.js";const Y={class:"col-span-6 sm:col-span-4"},q={key:0,class:"col-span-6"},G={class:"mt-2 grid grid-cols-1 md:grid-cols-2 gap-4"},H={class:"flex items-center"},K={class:"ml-2 text-sm text-gray-600"},O={key:0},Q={class:"mt-10 sm:mt-0"},R={class:"space-y-6"},W={class:"flex items-center"},X={key:0,class:"text-sm text-gray-400"},Z=["onClick"],ee=["onClick"],se=a("div",null," Please copy your new API token. For your security, it won't be shown again. ",-1),te={key:0,class:"mt-4 bg-gray-100 px-4 py-2 rounded font-mono text-sm text-gray-500"},oe={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},ne={class:"flex items-center"},le={class:"ml-2 text-sm text-gray-600"},Ae={__name:"ApiTokenManager",props:{tokens:Array,availablePermissions:Array,defaultPermissions:Array},setup(c){const m=h({name:"",permissions:c.defaultPermissions}),d=h({permissions:[]}),y=h({}),g=b(!1),p=b(null),f=b(null),I=()=>{m.post(route("api-tokens.store"),{preserveScroll:!0,onSuccess:()=>{g.value=!0,m.reset()}})},F=u=>{d.permissions=u.abilities,p.value=u},V=()=>{d.put(route("api-tokens.update",p.value),{preserveScroll:!0,preserveState:!0,onSuccess:()=>p.value=null})},D=u=>{f.value=u},B=()=>{y.delete(route("api-tokens.destroy",f.value),{preserveScroll:!0,preserveState:!0,onSuccess:()=>f.value=null})};return(u,o)=>(i(),r("div",null,[t(L,{onSubmitted:I},{title:e(()=>[n(" Create API Token ")]),description:e(()=>[n(" API tokens allow third-party services to authenticate with our application on your behalf. ")]),form:e(()=>[a("div",Y,[t(S,{for:"name",value:"Name"}),t(M,{id:"name",modelValue:l(m).name,"onUpdate:modelValue":o[0]||(o[0]=s=>l(m).name=s),type:"text",class:"mt-1 block w-full",autofocus:""},null,8,["modelValue"]),t(z,{message:l(m).errors.name,class:"mt-2"},null,8,["message"])]),c.availablePermissions.length>0?(i(),r("div",q,[t(S,{for:"permissions",value:"Permissions"}),a("div",G,[(i(!0),r($,null,x(c.availablePermissions,s=>(i(),r("div",{key:s},[a("label",H,[t(w,{checked:l(m).permissions,"onUpdate:checked":o[1]||(o[1]=_=>l(m).permissions=_),value:s},null,8,["checked","value"]),a("span",K,k(s),1)])]))),128))])])):v("",!0)]),actions:e(()=>[t(N,{on:l(m).recentlySuccessful,class:"mr-3"},{default:e(()=>[n(" Created. ")]),_:1},8,["on"]),t(P,{class:A({"opacity-25":l(m).processing}),disabled:l(m).processing},{default:e(()=>[n(" Create ")]),_:1},8,["class","disabled"])]),_:1}),c.tokens.length>0?(i(),r("div",O,[t(E),a("div",Q,[t(j,null,{title:e(()=>[n(" Manage API Tokens ")]),description:e(()=>[n(" You may delete any of your existing tokens if they are no longer needed. ")]),content:e(()=>[a("div",R,[(i(!0),r($,null,x(c.tokens,s=>(i(),r("div",{key:s.id,class:"flex items-center justify-between"},[a("div",null,k(s.name),1),a("div",W,[s.last_used_ago?(i(),r("div",X," Last used "+k(s.last_used_ago),1)):v("",!0),c.availablePermissions.length>0?(i(),r("button",{key:1,class:"cursor-pointer ml-6 text-sm text-gray-400 underline",onClick:_=>F(s)}," Permissions ",8,Z)):v("",!0),a("button",{class:"cursor-pointer ml-6 text-sm text-red-500",onClick:_=>D(s)}," Delete ",8,ee)])]))),128))])]),_:1})])])):v("",!0),t(T,{show:g.value,onClose:o[3]||(o[3]=s=>g.value=!1)},{title:e(()=>[n(" API Token ")]),content:e(()=>[se,u.$page.props.jetstream.flash.token?(i(),r("div",te,k(u.$page.props.jetstream.flash.token),1)):v("",!0)]),footer:e(()=>[t(C,{onClick:o[2]||(o[2]=s=>g.value=!1)},{default:e(()=>[n(" Close ")]),_:1})]),_:1},8,["show"]),t(T,{show:p.value!=null,onClose:o[6]||(o[6]=s=>p.value=null)},{title:e(()=>[n(" API Token Permissions ")]),content:e(()=>[a("div",oe,[(i(!0),r($,null,x(c.availablePermissions,s=>(i(),r("div",{key:s},[a("label",ne,[t(w,{checked:l(d).permissions,"onUpdate:checked":o[4]||(o[4]=_=>l(d).permissions=_),value:s},null,8,["checked","value"]),a("span",le,k(s),1)])]))),128))])]),footer:e(()=>[t(C,{onClick:o[5]||(o[5]=s=>p.value=null)},{default:e(()=>[n(" Cancel ")]),_:1}),t(P,{class:A(["ml-3",{"opacity-25":l(d).processing}]),disabled:l(d).processing,onClick:V},{default:e(()=>[n(" Save ")]),_:1},8,["class","disabled"])]),_:1},8,["show"]),t(U,{show:f.value!=null,onClose:o[8]||(o[8]=s=>f.value=null)},{title:e(()=>[n(" Delete API Token ")]),content:e(()=>[n(" Are you sure you would like to delete this API token? ")]),footer:e(()=>[t(C,{onClick:o[7]||(o[7]=s=>f.value=null)},{default:e(()=>[n(" Cancel ")]),_:1}),t(J,{class:A(["ml-3",{"opacity-25":l(y).processing}]),disabled:l(y).processing,onClick:B},{default:e(()=>[n(" Delete ")]),_:1},8,["class","disabled"])]),_:1},8,["show"])]))}};export{Ae as default}; diff --git a/public/build/default/assets/AppLayout-e973448b.js b/public/build/default/assets/AppLayout-180f66c1.js similarity index 99% rename from public/build/default/assets/AppLayout-e973448b.js rename to public/build/default/assets/AppLayout-180f66c1.js index e2b6667ce..2956276e5 100644 --- a/public/build/default/assets/AppLayout-e973448b.js +++ b/public/build/default/assets/AppLayout-180f66c1.js @@ -1,4 +1,4 @@ -import{r as jr,x as je,S as Xe,E as uu,o as p,d as y,n as te,a as f,e as W,t as k,i as Xa,l as X,R as Ce,c as B,w as F,U as it,q as Ba,j as De,v as du,b as x,F as ue,g as we,m as pt,A as _o,B as lu,J as Dn,u as _,V as mu,f as I,T as cu,_ as hu}from"./app-10f1fbb6.js";import{_ as Se}from"./_plugin-vue_export-helper-c27b6911.js";import{I as q}from"./Icon-07002ff2.js";import{u as fu}from"./useAuthorizable-a9d4f38f.js";const vu={class:"max-w-screen-xl mx-auto py-2 px-3 sm:px-6 lg:px-8"},gu={class:"flex items-center justify-between flex-wrap"},pu={class:"w-0 flex-1 flex items-center min-w-0"},bu={key:0,class:"h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},yu=f("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1),wu=[yu],$u={key:1,class:"h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Pu=f("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},null,-1),ku=[Pu],Mu={class:"ml-3 font-medium text-sm text-white truncate"},Wu={class:"shrink-0 sm:ml-3"},xu=f("svg",{class:"h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),_u=[xu],Du={__name:"Banner",setup(a){const e=jr(!0),t=je(()=>{var n;return((n=Xe().props.jetstream.flash)==null?void 0:n.bannerStyle)||"success"}),r=je(()=>{var n;return((n=Xe().props.jetstream.flash)==null?void 0:n.banner)||""});return uu(r,async()=>{e.value=!0}),(n,i)=>(p(),y("div",null,[e.value&&r.value?(p(),y("div",{key:0,class:te({"bg-indigo-500":t.value=="success","bg-red-700":t.value=="danger"})},[f("div",vu,[f("div",gu,[f("div",pu,[f("span",{class:te(["flex p-2 rounded-lg",{"bg-indigo-600":t.value=="success","bg-red-600":t.value=="danger"}])},[t.value=="success"?(p(),y("svg",bu,wu)):W("",!0),t.value=="danger"?(p(),y("svg",$u,ku)):W("",!0)],2),f("p",Mu,k(r.value),1)]),f("div",Wu,[f("button",{type:"button",class:te(["-mr-1 flex p-2 rounded-md focus:outline-none sm:-mr-2 transition",{"hover:bg-indigo-600 focus:bg-indigo-600":t.value=="success","hover:bg-red-600 focus:bg-red-600":t.value=="danger"}]),"aria-label":"Dismiss",onClick:i[0]||(i[0]=Xa(u=>e.value=!1,["prevent"]))},_u,2)])])])],2)):W("",!0)]))}},Cu={props:{toast:Object,popstate:String},data(){return{milliseconds:this.toast&&this.toast.milliseconds?this.toast.milliseconds:3e3,id:null}},watch:{toast:{deep:!0,handler(a,e){this.fireToast()}}},mounted(){this.fireToast()},methods:{fireToast(){if(!this.toast||sessionStorage.getItem("toast-"+this.popstate))return;this.milliseconds=this.toast.milliseconds??3e3;const a=this.toast.type==="danger"?"error":this.toast.type;Toast.fire({icon:a,title:this.toast.title,text:this.toast.body,timer:this.milliseconds}),sessionStorage.setItem("toast-"+this.popstate,"1")}}};function Tu(a,e,t,r,n,i){return null}const ju=Se(Cu,[["render",Tu]]),Au=["href"],Do={__name:"ResponsiveNavLink",props:{active:Boolean,href:String,as:String,openInNewTab:{type:Boolean,default:!1}},setup(a){const e=a,t=je(()=>e.active?"block pl-3 pr-4 py-2 border-l-4 border-light-blue-400 text-base font-medium text-light-blue-700 bg-light-blue-50 dark:bg-cool-gray-900 focus:outline-none focus:text-light-blue-800 focus:bg-light-blue-100 dark:focus:bg-cool-gray-900 focus:border-light-blue-700 transition duration-150 ease-in-out":"block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-50 dark:hover:bg-cool-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-800 dark:focus:text-gray-200 focus:bg-gray-50 dark:focus:bg-cool-gray-900 focus:border-gray-300 transition duration-150 ease-in-out");return(r,n)=>{const i=X("InertiaLink");return p(),y("div",null,[a.as=="button"?(p(),y("button",{key:0,class:te([t.value,"w-full text-left"])},[Ce(r.$slots,"default")],2)):a.as!="button"&&!a.openInNewTab?(p(),B(i,{key:1,href:a.href,class:te(t.value)},{default:F(()=>[Ce(r.$slots,"default")]),_:3},8,["href","class"])):(p(),y("a",{key:2,target:"_blank",href:a.href,class:te(t.value)},[Ce(r.$slots,"default")],10,Au))])}}};var Su=/\s/;function zu(a){for(var e=a.length;e--&&Su.test(a.charAt(e)););return e}var Eu=zu,Nu=Eu,Fu=/^\s+/;function Ru(a){return a&&a.slice(0,Nu(a)+1).replace(Fu,"")}var Lu=Ru;function Hu(a){var e=typeof a;return a!=null&&(e=="object"||e=="function")}var Ze=Hu,Ou=typeof it=="object"&&it&&it.Object===Object&&it,Co=Ou,Vu=Co,Iu=typeof self=="object"&&self&&self.Object===Object&&self,Xu=Vu||Iu||Function("return this")(),xe=Xu,Bu=xe,Gu=Bu.Symbol,Ga=Gu,Cn=Ga,To=Object.prototype,qu=To.hasOwnProperty,Yu=To.toString,za=Cn?Cn.toStringTag:void 0;function Uu(a){var e=qu.call(a,za),t=a[za];try{a[za]=void 0;var r=!0}catch{}var n=Yu.call(a);return r&&(e?a[za]=t:delete a[za]),n}var Qu=Uu,Ku=Object.prototype,Ju=Ku.toString;function Zu(a){return Ju.call(a)}var ed=Zu,Tn=Ga,ad=Qu,td=ed,rd="[object Null]",nd="[object Undefined]",jn=Tn?Tn.toStringTag:void 0;function id(a){return a==null?a===void 0?nd:rd:jn&&jn in Object(a)?ad(a):td(a)}var qa=id;function od(a){return a!=null&&typeof a=="object"}var Pa=od,sd=qa,ud=Pa,dd="[object Symbol]";function ld(a){return typeof a=="symbol"||ud(a)&&sd(a)==dd}var Dt=ld,md=Lu,An=Ze,cd=Dt,Sn=0/0,hd=/^[-+]0x[0-9a-f]+$/i,fd=/^0b[01]+$/i,vd=/^0o[0-7]+$/i,gd=parseInt;function pd(a){if(typeof a=="number")return a;if(cd(a))return Sn;if(An(a)){var e=typeof a.valueOf=="function"?a.valueOf():a;a=An(e)?e+"":e}if(typeof a!="string")return a===0?a:+a;a=md(a);var t=fd.test(a);return t||vd.test(a)?gd(a.slice(2),t?2:8):hd.test(a)?Sn:+a}var Ar=pd,bd=Ar,zn=1/0,yd=17976931348623157e292;function wd(a){if(!a)return a===0?a:0;if(a=bd(a),a===zn||a===-zn){var e=a<0?-1:1;return e*yd}return a===a?a:0}var $d=wd,Pd=$d;function kd(a){var e=Pd(a),t=e%1;return e===e?t?e-t:e:0}var Ya=kd,Md=Ya,Wd="Expected a function";function xd(a,e){if(typeof e!="function")throw new TypeError(Wd);return a=Md(a),function(){if(--a<1)return e.apply(this,arguments)}}var _d=xd;function Dd(a){return a}var Ua=Dd,Cd=qa,Td=Ze,jd="[object AsyncFunction]",Ad="[object Function]",Sd="[object GeneratorFunction]",zd="[object Proxy]";function Ed(a){if(!Td(a))return!1;var e=Cd(a);return e==Ad||e==Sd||e==jd||e==zd}var jo=Ed,Nd=xe,Fd=Nd["__core-js_shared__"],Rd=Fd,Ut=Rd,En=function(){var a=/[^.]+$/.exec(Ut&&Ut.keys&&Ut.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function Ld(a){return!!En&&En in a}var Hd=Ld,Od=Function.prototype,Vd=Od.toString;function Id(a){if(a!=null){try{return Vd.call(a)}catch{}try{return a+""}catch{}}return""}var Ao=Id,Xd=jo,Bd=Hd,Gd=Ze,qd=Ao,Yd=/[\\^$.*+?()[\]{}|]/g,Ud=/^\[object .+?Constructor\]$/,Qd=Function.prototype,Kd=Object.prototype,Jd=Qd.toString,Zd=Kd.hasOwnProperty,el=RegExp("^"+Jd.call(Zd).replace(Yd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function al(a){if(!Gd(a)||Bd(a))return!1;var e=Xd(a)?el:Ud;return e.test(qd(a))}var tl=al;function rl(a,e){return a==null?void 0:a[e]}var nl=rl,il=tl,ol=nl;function sl(a,e){var t=ol(a,e);return il(t)?t:void 0}var ma=sl,ul=ma,dl=xe,ll=ul(dl,"WeakMap"),So=ll,Nn=So,ml=Nn&&new Nn,zo=ml,cl=Ua,Fn=zo,hl=Fn?function(a,e){return Fn.set(a,e),a}:cl,Eo=hl,fl=Ze,Rn=Object.create,vl=function(){function a(){}return function(e){if(!fl(e))return{};if(Rn)return Rn(e);a.prototype=e;var t=new a;return a.prototype=void 0,t}}(),Sr=vl,gl=Sr,pl=Ze;function bl(a){return function(){var e=arguments;switch(e.length){case 0:return new a;case 1:return new a(e[0]);case 2:return new a(e[0],e[1]);case 3:return new a(e[0],e[1],e[2]);case 4:return new a(e[0],e[1],e[2],e[3]);case 5:return new a(e[0],e[1],e[2],e[3],e[4]);case 6:return new a(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new a(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var t=gl(a.prototype),r=a.apply(t,e);return pl(r)?r:t}}var Ct=bl,yl=Ct,wl=xe,$l=1;function Pl(a,e,t){var r=e&$l,n=yl(a);function i(){var u=this&&this!==wl&&this instanceof i?n:a;return u.apply(r?t:this,arguments)}return i}var kl=Pl;function Ml(a,e,t){switch(t.length){case 0:return a.call(e);case 1:return a.call(e,t[0]);case 2:return a.call(e,t[0],t[1]);case 3:return a.call(e,t[0],t[1],t[2])}return a.apply(e,t)}var Qa=Ml,Wl=Math.max;function xl(a,e,t,r){for(var n=-1,i=a.length,u=t.length,l=-1,m=e.length,c=Wl(i-u,0),h=Array(m+c),b=!r;++l0){if(++e>=fm)return arguments[0]}else e=0;return a.apply(void 0,arguments)}}var Oo=pm,bm=Eo,ym=Oo,wm=ym(bm),Vo=wm,$m=/\{\n\/\* \[wrapped with (.+)\] \*/,Pm=/,? & /;function km(a){var e=a.match($m);return e?e[1].split(Pm):[]}var Mm=km,Wm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function xm(a,e){var t=e.length;if(!t)return a;var r=t-1;return e[r]=(t>1?"& ":"")+e[r],e=e.join(t>2?", ":" "),a.replace(Wm,`{ +import{r as jr,x as je,S as Xe,E as uu,o as p,d as y,n as te,a as f,e as W,t as k,i as Xa,l as X,R as Ce,c as B,w as F,U as it,q as Ba,j as De,v as du,b as x,F as ue,g as we,m as pt,A as _o,B as lu,J as Dn,u as _,V as mu,f as I,T as cu,_ as hu}from"./app-d03084a3.js";import{_ as Se}from"./_plugin-vue_export-helper-c27b6911.js";import{I as q}from"./Icon-09cf2959.js";import{u as fu}from"./useAuthorizable-db63a772.js";const vu={class:"max-w-screen-xl mx-auto py-2 px-3 sm:px-6 lg:px-8"},gu={class:"flex items-center justify-between flex-wrap"},pu={class:"w-0 flex-1 flex items-center min-w-0"},bu={key:0,class:"h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},yu=f("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1),wu=[yu],$u={key:1,class:"h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Pu=f("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},null,-1),ku=[Pu],Mu={class:"ml-3 font-medium text-sm text-white truncate"},Wu={class:"shrink-0 sm:ml-3"},xu=f("svg",{class:"h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),_u=[xu],Du={__name:"Banner",setup(a){const e=jr(!0),t=je(()=>{var n;return((n=Xe().props.jetstream.flash)==null?void 0:n.bannerStyle)||"success"}),r=je(()=>{var n;return((n=Xe().props.jetstream.flash)==null?void 0:n.banner)||""});return uu(r,async()=>{e.value=!0}),(n,i)=>(p(),y("div",null,[e.value&&r.value?(p(),y("div",{key:0,class:te({"bg-indigo-500":t.value=="success","bg-red-700":t.value=="danger"})},[f("div",vu,[f("div",gu,[f("div",pu,[f("span",{class:te(["flex p-2 rounded-lg",{"bg-indigo-600":t.value=="success","bg-red-600":t.value=="danger"}])},[t.value=="success"?(p(),y("svg",bu,wu)):W("",!0),t.value=="danger"?(p(),y("svg",$u,ku)):W("",!0)],2),f("p",Mu,k(r.value),1)]),f("div",Wu,[f("button",{type:"button",class:te(["-mr-1 flex p-2 rounded-md focus:outline-none sm:-mr-2 transition",{"hover:bg-indigo-600 focus:bg-indigo-600":t.value=="success","hover:bg-red-600 focus:bg-red-600":t.value=="danger"}]),"aria-label":"Dismiss",onClick:i[0]||(i[0]=Xa(u=>e.value=!1,["prevent"]))},_u,2)])])])],2)):W("",!0)]))}},Cu={props:{toast:Object,popstate:String},data(){return{milliseconds:this.toast&&this.toast.milliseconds?this.toast.milliseconds:3e3,id:null}},watch:{toast:{deep:!0,handler(a,e){this.fireToast()}}},mounted(){this.fireToast()},methods:{fireToast(){if(!this.toast||sessionStorage.getItem("toast-"+this.popstate))return;this.milliseconds=this.toast.milliseconds??3e3;const a=this.toast.type==="danger"?"error":this.toast.type;Toast.fire({icon:a,title:this.toast.title,text:this.toast.body,timer:this.milliseconds}),sessionStorage.setItem("toast-"+this.popstate,"1")}}};function Tu(a,e,t,r,n,i){return null}const ju=Se(Cu,[["render",Tu]]),Au=["href"],Do={__name:"ResponsiveNavLink",props:{active:Boolean,href:String,as:String,openInNewTab:{type:Boolean,default:!1}},setup(a){const e=a,t=je(()=>e.active?"block pl-3 pr-4 py-2 border-l-4 border-light-blue-400 text-base font-medium text-light-blue-700 bg-light-blue-50 dark:bg-cool-gray-900 focus:outline-none focus:text-light-blue-800 focus:bg-light-blue-100 dark:focus:bg-cool-gray-900 focus:border-light-blue-700 transition duration-150 ease-in-out":"block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-50 dark:hover:bg-cool-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-800 dark:focus:text-gray-200 focus:bg-gray-50 dark:focus:bg-cool-gray-900 focus:border-gray-300 transition duration-150 ease-in-out");return(r,n)=>{const i=X("InertiaLink");return p(),y("div",null,[a.as=="button"?(p(),y("button",{key:0,class:te([t.value,"w-full text-left"])},[Ce(r.$slots,"default")],2)):a.as!="button"&&!a.openInNewTab?(p(),B(i,{key:1,href:a.href,class:te(t.value)},{default:F(()=>[Ce(r.$slots,"default")]),_:3},8,["href","class"])):(p(),y("a",{key:2,target:"_blank",href:a.href,class:te(t.value)},[Ce(r.$slots,"default")],10,Au))])}}};var Su=/\s/;function zu(a){for(var e=a.length;e--&&Su.test(a.charAt(e)););return e}var Eu=zu,Nu=Eu,Fu=/^\s+/;function Ru(a){return a&&a.slice(0,Nu(a)+1).replace(Fu,"")}var Lu=Ru;function Hu(a){var e=typeof a;return a!=null&&(e=="object"||e=="function")}var Ze=Hu,Ou=typeof it=="object"&&it&&it.Object===Object&&it,Co=Ou,Vu=Co,Iu=typeof self=="object"&&self&&self.Object===Object&&self,Xu=Vu||Iu||Function("return this")(),xe=Xu,Bu=xe,Gu=Bu.Symbol,Ga=Gu,Cn=Ga,To=Object.prototype,qu=To.hasOwnProperty,Yu=To.toString,za=Cn?Cn.toStringTag:void 0;function Uu(a){var e=qu.call(a,za),t=a[za];try{a[za]=void 0;var r=!0}catch{}var n=Yu.call(a);return r&&(e?a[za]=t:delete a[za]),n}var Qu=Uu,Ku=Object.prototype,Ju=Ku.toString;function Zu(a){return Ju.call(a)}var ed=Zu,Tn=Ga,ad=Qu,td=ed,rd="[object Null]",nd="[object Undefined]",jn=Tn?Tn.toStringTag:void 0;function id(a){return a==null?a===void 0?nd:rd:jn&&jn in Object(a)?ad(a):td(a)}var qa=id;function od(a){return a!=null&&typeof a=="object"}var Pa=od,sd=qa,ud=Pa,dd="[object Symbol]";function ld(a){return typeof a=="symbol"||ud(a)&&sd(a)==dd}var Dt=ld,md=Lu,An=Ze,cd=Dt,Sn=0/0,hd=/^[-+]0x[0-9a-f]+$/i,fd=/^0b[01]+$/i,vd=/^0o[0-7]+$/i,gd=parseInt;function pd(a){if(typeof a=="number")return a;if(cd(a))return Sn;if(An(a)){var e=typeof a.valueOf=="function"?a.valueOf():a;a=An(e)?e+"":e}if(typeof a!="string")return a===0?a:+a;a=md(a);var t=fd.test(a);return t||vd.test(a)?gd(a.slice(2),t?2:8):hd.test(a)?Sn:+a}var Ar=pd,bd=Ar,zn=1/0,yd=17976931348623157e292;function wd(a){if(!a)return a===0?a:0;if(a=bd(a),a===zn||a===-zn){var e=a<0?-1:1;return e*yd}return a===a?a:0}var $d=wd,Pd=$d;function kd(a){var e=Pd(a),t=e%1;return e===e?t?e-t:e:0}var Ya=kd,Md=Ya,Wd="Expected a function";function xd(a,e){if(typeof e!="function")throw new TypeError(Wd);return a=Md(a),function(){if(--a<1)return e.apply(this,arguments)}}var _d=xd;function Dd(a){return a}var Ua=Dd,Cd=qa,Td=Ze,jd="[object AsyncFunction]",Ad="[object Function]",Sd="[object GeneratorFunction]",zd="[object Proxy]";function Ed(a){if(!Td(a))return!1;var e=Cd(a);return e==Ad||e==Sd||e==jd||e==zd}var jo=Ed,Nd=xe,Fd=Nd["__core-js_shared__"],Rd=Fd,Ut=Rd,En=function(){var a=/[^.]+$/.exec(Ut&&Ut.keys&&Ut.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();function Ld(a){return!!En&&En in a}var Hd=Ld,Od=Function.prototype,Vd=Od.toString;function Id(a){if(a!=null){try{return Vd.call(a)}catch{}try{return a+""}catch{}}return""}var Ao=Id,Xd=jo,Bd=Hd,Gd=Ze,qd=Ao,Yd=/[\\^$.*+?()[\]{}|]/g,Ud=/^\[object .+?Constructor\]$/,Qd=Function.prototype,Kd=Object.prototype,Jd=Qd.toString,Zd=Kd.hasOwnProperty,el=RegExp("^"+Jd.call(Zd).replace(Yd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function al(a){if(!Gd(a)||Bd(a))return!1;var e=Xd(a)?el:Ud;return e.test(qd(a))}var tl=al;function rl(a,e){return a==null?void 0:a[e]}var nl=rl,il=tl,ol=nl;function sl(a,e){var t=ol(a,e);return il(t)?t:void 0}var ma=sl,ul=ma,dl=xe,ll=ul(dl,"WeakMap"),So=ll,Nn=So,ml=Nn&&new Nn,zo=ml,cl=Ua,Fn=zo,hl=Fn?function(a,e){return Fn.set(a,e),a}:cl,Eo=hl,fl=Ze,Rn=Object.create,vl=function(){function a(){}return function(e){if(!fl(e))return{};if(Rn)return Rn(e);a.prototype=e;var t=new a;return a.prototype=void 0,t}}(),Sr=vl,gl=Sr,pl=Ze;function bl(a){return function(){var e=arguments;switch(e.length){case 0:return new a;case 1:return new a(e[0]);case 2:return new a(e[0],e[1]);case 3:return new a(e[0],e[1],e[2]);case 4:return new a(e[0],e[1],e[2],e[3]);case 5:return new a(e[0],e[1],e[2],e[3],e[4]);case 6:return new a(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new a(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var t=gl(a.prototype),r=a.apply(t,e);return pl(r)?r:t}}var Ct=bl,yl=Ct,wl=xe,$l=1;function Pl(a,e,t){var r=e&$l,n=yl(a);function i(){var u=this&&this!==wl&&this instanceof i?n:a;return u.apply(r?t:this,arguments)}return i}var kl=Pl;function Ml(a,e,t){switch(t.length){case 0:return a.call(e);case 1:return a.call(e,t[0]);case 2:return a.call(e,t[0],t[1]);case 3:return a.call(e,t[0],t[1],t[2])}return a.apply(e,t)}var Qa=Ml,Wl=Math.max;function xl(a,e,t,r){for(var n=-1,i=a.length,u=t.length,l=-1,m=e.length,c=Wl(i-u,0),h=Array(m+c),b=!r;++l0){if(++e>=fm)return arguments[0]}else e=0;return a.apply(void 0,arguments)}}var Oo=pm,bm=Eo,ym=Oo,wm=ym(bm),Vo=wm,$m=/\{\n\/\* \[wrapped with (.+)\] \*/,Pm=/,? & /;function km(a){var e=a.match($m);return e?e[1].split(Pm):[]}var Mm=km,Wm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function xm(a,e){var t=e.length;if(!t)return a;var r=t-1;return e[r]=(t>1?"& ":"")+e[r],e=e.join(t>2?", ":" "),a.replace(Wm,`{ /* [wrapped with `+e+`] */ `)}var _m=xm;function Dm(a){return function(){return a}}var Cm=Dm,Tm=ma,jm=function(){try{var a=Tm(Object,"defineProperty");return a({},"",{}),a}catch{}}(),Am=jm,Sm=Cm,Vn=Am,zm=Ua,Em=Vn?function(a,e){return Vn(a,"toString",{configurable:!0,enumerable:!1,value:Sm(e),writable:!0})}:zm,Nm=Em,Fm=Nm,Rm=Oo,Lm=Rm(Fm),Nr=Lm;function Hm(a,e){for(var t=-1,r=a==null?0:a.length;++t-1}var ac=ec,tc=Om,rc=ac,nc=1,ic=2,oc=8,sc=16,uc=32,dc=64,lc=128,mc=256,cc=512,hc=[["ary",lc],["bind",nc],["bindKey",ic],["curry",oc],["curryRight",sc],["flip",cc],["partial",uc],["partialRight",dc],["rearg",mc]];function fc(a,e){return tc(hc,function(t){var r="_."+t[0];e&t[1]&&!rc(a,r)&&a.push(r)}),a.sort()}var vc=fc,gc=Mm,pc=_m,bc=Nr,yc=vc;function wc(a,e,t){var r=e+"";return bc(a,pc(r,yc(gc(r),t)))}var Io=wc,$c=hm,Pc=Vo,kc=Io,Mc=1,Wc=2,xc=4,_c=8,In=32,Xn=64;function Dc(a,e,t,r,n,i,u,l,m,c){var h=e&_c,b=h?u:void 0,g=h?void 0:u,w=h?i:void 0,T=h?void 0:i;e|=h?In:Xn,e&=~(h?Xn:In),e&xc||(e&=~(Mc|Wc));var R=[a,e,n,w,b,T,g,l,m,c],H=t.apply(void 0,R);return $c(a)&&Pc(H,R),H.placeholder=r,kc(H,a,e)}var Xo=Dc;function Cc(a){var e=a;return e.placeholder}var ka=Cc,Tc=9007199254740991,jc=/^(?:0|[1-9]\d*)$/;function Ac(a,e){var t=typeof a;return e=e??Tc,!!e&&(t=="number"||t!="symbol"&&jc.test(a))&&a>-1&&a%1==0&&a1&&C.reverse(),h&&m0&&(t=e.apply(this,arguments)),a<=1&&(e=void 0),t}}var Yo=Rh,Lh=Qa,ai=Math.max;function Hh(a,e,t){return e=ai(e===void 0?a.length-1:e,0),function(){for(var r=arguments,n=-1,i=ai(r.length-e,0),u=Array(i);++n=e||O<0||b&&G>=i}function E(){var j=er();if(H(j))return C(j);l=setTimeout(E,R(j))}function C(j){return l=void 0,g&&r?w(j):(r=n=void 0,u)}function S(){l!==void 0&&clearTimeout(l),c=0,r=m=n=l=void 0}function N(){return l===void 0?u:C(er())}function L(){var j=er(),O=H(j);if(r=arguments,n=this,m=j,O){if(l===void 0)return T(m);if(b)return clearTimeout(l),l=setTimeout(E,e),w(m)}return l===void 0&&(l=setTimeout(E,e)),u}return L.cancel=S,L.flush=N,L}var Qo=wf,$f="Expected a function";function Pf(a,e,t){if(typeof a!="function")throw new TypeError($f);return setTimeout(function(){a.apply(void 0,t)},e)}var Ko=Pf,kf=Ko,Mf=Le,Wf=Mf(function(a,e){return kf(a,1,e)}),xf=Wf,_f=Ko,Df=Le,Cf=Ar,Tf=Df(function(a,e,t){return _f(a,Cf(e)||0,t)}),jf=Tf,Af=Be,Sf=512;function zf(a){return Af(a,Sf)}var Ef=zf,Nf=ma,Ff=Nf(Object,"create"),Tt=Ff,ri=Tt;function Rf(){this.__data__=ri?ri(null):{},this.size=0}var Lf=Rf;function Hf(a){var e=this.has(a)&&delete this.__data__[a];return this.size-=e?1:0,e}var Of=Hf,Vf=Tt,If="__lodash_hash_undefined__",Xf=Object.prototype,Bf=Xf.hasOwnProperty;function Gf(a){var e=this.__data__;if(Vf){var t=e[a];return t===If?void 0:t}return Bf.call(e,a)?e[a]:void 0}var qf=Gf,Yf=Tt,Uf=Object.prototype,Qf=Uf.hasOwnProperty;function Kf(a){var e=this.__data__;return Yf?e[a]!==void 0:Qf.call(e,a)}var Jf=Kf,Zf=Tt,ev="__lodash_hash_undefined__";function av(a,e){var t=this.__data__;return this.size+=this.has(a)?0:1,t[a]=Zf&&e===void 0?ev:e,this}var tv=av,rv=Lf,nv=Of,iv=qf,ov=Jf,sv=tv;function Ma(a){var e=-1,t=a==null?0:a.length;for(this.clear();++e-1}var Mv=kv,Wv=jt;function xv(a,e){var t=this.__data__,r=Wv(t,a);return r<0?(++this.size,t.push([a,e])):t[r][1]=e,this}var _v=xv,Dv=lv,Cv=bv,Tv=$v,jv=Mv,Av=_v;function Wa(a){var e=-1,t=a==null?0:a.length;for(this.clear();++e0&&t(l)?e>1?rs(l,e-1,t,r,n):Cg(n,l):r||(n[n.length]=l)}return n}var ns=rs,jg=At;function Ag(){this.__data__=new jg,this.size=0}var Sg=Ag;function zg(a){var e=this.__data__,t=e.delete(a);return this.size=e.size,t}var Eg=zg;function Ng(a){return this.__data__.get(a)}var Fg=Ng;function Rg(a){return this.__data__.has(a)}var Lg=Rg,Hg=At,Og=Vr,Vg=Ir,Ig=200;function Xg(a,e){var t=this.__data__;if(t instanceof Hg){var r=t.__data__;if(!Og||r.lengthl))return!1;var c=i.get(a),h=i.get(e);if(c&&h)return c==e&&h==a;var b=-1,g=!0,w=t&vp?new mp:void 0;for(i.set(a,e),i.set(e,a);++b-1&&a%1==0&&a<=sb}var qr=ub,db=qa,lb=qr,mb=Pa,cb="[object Arguments]",hb="[object Array]",fb="[object Boolean]",vb="[object Date]",gb="[object Error]",pb="[object Function]",bb="[object Map]",yb="[object Number]",wb="[object Object]",$b="[object RegExp]",Pb="[object Set]",kb="[object String]",Mb="[object WeakMap]",Wb="[object ArrayBuffer]",xb="[object DataView]",_b="[object Float32Array]",Db="[object Float64Array]",Cb="[object Int8Array]",Tb="[object Int16Array]",jb="[object Int32Array]",Ab="[object Uint8Array]",Sb="[object Uint8ClampedArray]",zb="[object Uint16Array]",Eb="[object Uint32Array]",K={};K[_b]=K[Db]=K[Cb]=K[Tb]=K[jb]=K[Ab]=K[Sb]=K[zb]=K[Eb]=!0;K[cb]=K[hb]=K[Wb]=K[fb]=K[xb]=K[vb]=K[gb]=K[pb]=K[bb]=K[yb]=K[wb]=K[$b]=K[Pb]=K[kb]=K[Mb]=!1;function Nb(a){return mb(a)&&lb(a.length)&&!!K[db(a)]}var Fb=Nb;function Rb(a){return function(e){return a(e)}}var us=Rb,kt={exports:{}};kt.exports;(function(a,e){var t=Co,r=e&&!e.nodeType&&e,n=r&&!0&&a&&!a.nodeType&&a,i=n&&n.exports===r,u=i&&t.process,l=function(){try{var m=n&&n.require&&n.require("util").types;return m||u&&u.binding&&u.binding("util")}catch{}}();a.exports=l})(kt,kt.exports);var Lb=kt.exports,Hb=Fb,Ob=us,ci=Lb,hi=ci&&ci.isTypedArray,Vb=hi?Ob(hi):Hb,ds=Vb,Ib=nb,Xb=Gr,Bb=ze,Gb=ss,qb=Fr,Yb=ds,Ub=Object.prototype,Qb=Ub.hasOwnProperty;function Kb(a,e){var t=Bb(a),r=!t&&Xb(a),n=!t&&!r&&Gb(a),i=!t&&!r&&!n&&Yb(a),u=t||r||n||i,l=u?Ib(a.length,String):[],m=l.length;for(var c in a)(e||Qb.call(a,c))&&!(u&&(c=="length"||n&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||qb(c,m)))&&l.push(c);return l}var Jb=Kb,Zb=Object.prototype;function ey(a){var e=a&&a.constructor,t=typeof e=="function"&&e.prototype||Zb;return a===t}var ay=ey;function ty(a,e){return function(t){return a(e(t))}}var ry=ty,ny=ry,iy=ny(Object.keys,Object),oy=iy,sy=ay,uy=oy,dy=Object.prototype,ly=dy.hasOwnProperty;function my(a){if(!sy(a))return uy(a);var e=[];for(var t in Object(a))ly.call(a,t)&&t!="constructor"&&e.push(t);return e}var cy=my,hy=jo,fy=qr;function vy(a){return a!=null&&fy(a.length)&&!hy(a)}var gy=vy,py=Jb,by=cy,yy=gy;function wy(a){return yy(a)?py(a):by(a)}var ls=wy,$y=Gp,Py=tb,ky=ls;function My(a){return $y(a,ky,Py)}var Wy=My,fi=Wy,xy=1,_y=Object.prototype,Dy=_y.hasOwnProperty;function Cy(a,e,t,r,n,i){var u=t&xy,l=fi(a),m=l.length,c=fi(e),h=c.length;if(m!=h&&!u)return!1;for(var b=m;b--;){var g=l[b];if(!(u?g in e:Dy.call(e,g)))return!1}var w=i.get(a),T=i.get(e);if(w&&T)return w==e&&T==a;var R=!0;i.set(a,e),i.set(e,a);for(var H=u;++bn?0:n+e),t=t>n?n:t,t<0&&(t+=n),n=e>t?0:t-e>>>0,e>>>=0;for(var i=Array(n);++r=r?a:N$(a,e,t)}var R$=F$,L$=Qa,H$=Br,O$=Le,V$=R$,I$=Ya,X$="Expected a function",B$=Math.max;function G$(a,e){if(typeof a!="function")throw new TypeError(X$);return e=e==null?0:B$(I$(e),0),O$(function(t){var r=t[e],n=V$(t,0,e);return r&&H$(n,r),L$(a,this,n)})}var q$=G$,Y$=Qo,U$=Ze,Q$="Expected a function";function K$(a,e,t){var r=!0,n=!0;if(typeof a!="function")throw new TypeError(Q$);return U$(t)&&(r="leading"in t?!!t.leading:r,n="trailing"in t?!!t.trailing:n),Y$(a,e,{leading:r,maxWait:e,trailing:n})}var J$=K$,Z$=qo;function eP(a){return Z$(a,1)}var aP=eP,tP=Ua;function rP(a){return typeof a=="function"?a:tP}var nP=rP,iP=nP,oP=ys;function sP(a,e){return oP(iP(e),a)}var uP=sP,dP={after:_d,ary:qo,before:Yo,bind:Kh,bindKey:of,curry:df,curryRight:cf,debounce:Qo,defer:xf,delay:jf,flip:Ef,memoize:es,negate:lg,once:hg,overArgs:n$,partial:ys,partialRight:v$,rearg:D$,rest:S$,spread:q$,throttle:J$,unary:aP,wrap:uP};function lP(a,e){return p(),y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"})])}function mP(a,e){return p(),y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})])}function cP(a,e){return p(),y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"})])}function hP(a,e){return p(),y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z"})])}const fP={name:"Search",components:{Icon:q,MagnifyingGlassIcon:mP},data(){return{showResults:!1,loading:!1,searchString:"",usersList:[],playersList:[]}},created:function(){window.addEventListener("click",a=>{this.$el.contains(a.target)||(this.showResults=!1,this.searchString="")})},methods:{performSearch:dP.debounce(function(){this.searchString&&(this.showResults=!0,this.loading=!0,axios.get(route("search",{q:this.searchString})).then(a=>{this.usersList=a.data.users,this.playersList=a.data.players}).finally(()=>{this.loading=!1}))},200)}},vP={class:"relative mx-auto text-gray-600 dark:text-gray-400"},gP=["placeholder"],pP={type:"submit",class:"absolute right-0 top-0 mt-3 mr-4"},bP={key:0,id:"results",class:"absolute bg-white dark:bg-cool-gray-800 px-3 py-1 w-full rounded-md shadow-lg z-50"},yP={key:0,id:"loading",class:"text-center p-2"},wP={key:1,id:"users"},$P={class:"text-xs text-gray-400 dark:text-gray-300 font-extrabold"},PP={class:"flex flex-col"},kP={class:"flex"},MP=["src"],WP={class:"text-sm"},xP={class:"text-gray-700 dark:text-gray-300 font-bold"},_P={class:"text-gray-500 dark:text-gray-500"},DP={class:"flex"},CP=["title","src"],TP={key:0,id:"emptyusers",class:"italic"},jP={key:2,id:"players",class:"mt-5 pb-4"},AP={class:"text-xs text-gray-400 dark:text-gray-300 font-extrabold"},SP={class:"flex flex-col"},zP={class:"flex items-center"},EP=["src"],NP={class:"text-sm"},FP={class:"text-gray-700 dark:text-gray-300 font-bold"},RP={class:"flex space-x-2"},LP=["src","alt","title"],HP=["title","src"],OP={key:0,id:"emptyplayers",class:"italic"};function VP(a,e,t,r,n,i){const u=X("MagnifyingGlassIcon"),l=X("inertia-link"),m=X("icon"),c=Ba("tippy");return p(),y("div",vP,[f("form",{onSubmit:e[2]||(e[2]=Xa((...h)=>i.performSearch&&i.performSearch(...h),["prevent"]))},[De(f("input",{"onUpdate:modelValue":e[0]||(e[0]=h=>n.searchString=h),"aria-label":"search",class:te(["border-none bg-gray-200 dark:bg-cool-gray-900 h-10 px-5 pr-10 focus:w-80 rounded-full text-sm focus:outline-none focus:ring-0",{"w-80":n.showResults}]),type:"search",name:"search",placeholder:a.__("Search")+"..",autocomplete:"off",onInput:e[1]||(e[1]=(...h)=>i.performSearch&&i.performSearch(...h))},null,42,gP),[[du,n.searchString]]),f("button",pP,[x(u,{class:"text-gray-400 dark:text-gray-600 h-4 w-4 stroke-2"})])],32),n.showResults&&n.searchString?(p(),y("div",bP,[n.loading?(p(),y("div",yP,k(a.__("Loading"))+"... ",1)):W("",!0),n.loading?W("",!0):(p(),y("div",wP,[f("span",$P,k(a.__("USERS")),1),f("div",PP,[(p(!0),y(ue,null,we(n.usersList,h=>(p(),B(l,{id:"user",key:h.username,as:"div",href:a.route("user.public.get",h.username),class:"flex px-2 py-1 justify-between hover:bg-light-blue-100 dark:hover:bg-cool-gray-900 rounded cursor-pointer"},{default:F(()=>[f("div",kP,[f("img",{class:"mr-3 w-10 h-10 rounded-full",src:h.profile_photo_url,alt:"Image"},null,8,MP),f("div",WP,[f("p",xP,k(h.title),1),f("p",_P," @"+k(h.username),1)])]),f("div",DP,[De(f("img",{title:h.country.name,src:h.country.photo_path,alt:"",class:"h-8 w-8 -mt-0.5 focus:outline-none"},null,8,CP),[[c]])])]),_:2},1032,["href"]))),128))]),!n.usersList||n.usersList.length<=0?(p(),y("div",TP,k(a.__("No users found.")),1)):W("",!0)])),n.loading?W("",!0):(p(),y("div",jP,[f("span",AP,k(a.__("PLAYERS")),1),f("div",SP,[(p(!0),y(ue,null,we(n.playersList,h=>(p(),B(l,{id:"player",key:h.uuid,as:"div",href:a.route("player.show",h.uuid),class:"flex justify-between px-2 py-1 hover:bg-light-blue-100 dark:hover:bg-cool-gray-900 rounded cursor-pointer"},{default:F(()=>[f("div",zP,[f("img",{class:"mr-3 w-8 h-8",src:h.avatar_url,alt:"Avatar"},null,8,EP),f("div",NP,[f("p",FP,k(h.title),1)])]),f("div",RP,[De(x(m,{class:"w-8 h-8 focus:outline-none",name:`rating-${h.rating}`,content:h.rating},null,8,["name","content"]),[[pt,h.rating!=null],[c]]),De(f("img",{src:h.rank.photo_path,alt:h.rank.name,title:h.rank.name,class:"h-8 w-8 focus:outline-none"},null,8,LP),[[pt,h.rank.photo_path],[c]]),De(f("img",{title:h.country.name,src:h.country.photo_path,alt:"",class:"h-8 w-8 -mt-0.5 focus:outline-none"},null,8,HP),[[c]])])]),_:2},1032,["href"]))),128))]),!n.playersList||n.playersList.length<=0?(p(),y("div",OP,k(a.__("No players found.")),1)):W("",!0)]))])):W("",!0)])}const ws=Se(fP,[["render",VP]]),IP={name:"ColorThemeToggle",components:{MoonIcon:cP,SunIcon:hP},data(){return{colorMode:window.colorMode}},methods:{toggleTheme(){this.colorMode==="dark"?(this.colorMode="light",window.colorMode="light",localStorage.theme="light",document.documentElement.classList.add("light"),document.documentElement.classList.remove("dark")):(this.colorMode="dark",window.colorMode="dark",localStorage.theme="dark",document.documentElement.classList.add("dark"),document.documentElement.classList.remove("light")),window.location.reload()}}},XP=["title"],BP=["title"];function GP(a,e,t,r,n,i){const u=X("MoonIcon"),l=X("SunIcon"),m=Ba("tippy");return p(),y("div",null,[f("button",{onClick:e[0]||(e[0]=(...c)=>i.toggleTheme&&i.toggleTheme(...c))},[n.colorMode==="dark"?De((p(),y("span",{key:0,title:a.__("Use Light Theme")},[x(u,{class:"w-5 h-5 text-gray-400 focus:outline-none stroke-2"})],8,XP)),[[m]]):De((p(),y("span",{key:1,title:a.__("Use Dark Theme")},[x(l,{class:"w-6 h-6 text-gray-400 focus:outline-none stroke-2"})],8,BP)),[[m]])])])}const $s=Se(IP,[["render",GP]]),qP={computed:{logo(){return window.colorMode==="light"?this.$page.props.generalSettings.site_header_logo_path_light:this.$page.props.generalSettings.site_header_logo_path_dark}}},YP=["src"];function UP(a,e,t,r,n,i){return p(),y("img",{src:i.logo,alt:"Site Header Logo",class:"logo"},null,8,YP)}const $r=Se(qP,[["render",UP]]),QP={class:"flex items-center flex-shrink-0"},KP={__name:"AppLogoMark",props:{canShowAdminSidebar:{type:Boolean,default:!1}},setup(a){return(e,t)=>{const r=X("InertiaLink"),n=Ba("tippy");return p(),y("div",QP,[x(r,{href:e.route("home")},{default:F(()=>[x($r,{class:"block w-auto h-9"})]),_:1},8,["href"]),a.canShowAdminSidebar&&!e.route().current("admin.*")?De((p(),B(r,{key:0,title:e.__("Administration Section"),"aria-label":"Open Menu",class:"ml-2 focus:outline-none",href:e.route("admin.dashboard")},{default:F(()=>[x(q,{name:"cog",class:"w-6 h-6 text-gray-400 dark:text-gray-500 hover:animate-spin"})]),_:1},8,["title","href"])),[[n]]):W("",!0)])}}},JP=["href"],Si={__name:"NavLink",props:{href:String,active:Boolean,openInNewTab:{type:Boolean,default:!1}},setup(a){const e=a,t=je(()=>e.active?"inline-flex items-center px-1 pt-1 border-b-2 border-light-blue-400 text-sm leading-5 text-gray-900 dark:text-gray-200 focus:outline-none focus:border-light-blue-700 transition duration-150 ease-in-out":"inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm leading-5 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 hover:border-gray-300 focus:outline-none focus:text-gray-700 dark:focus:text-gray-300 focus:border-gray-300 transition duration-150 ease-in-out");return(r,n)=>{const i=X("InertiaLink");return a.openInNewTab?(p(),y("a",{key:1,target:"_blank",href:a.href,class:te(t.value)},[Ce(r.$slots,"default")],10,JP)):(p(),B(i,{key:0,href:a.href,class:te(t.value)},{default:F(()=>[Ce(r.$slots,"default")]),_:3},8,["href","class"]))}}},ZP={class:"relative"},Et={__name:"Dropdown",props:{align:{type:String,default:"right"},width:{type:String,default:"48"},contentClasses:{type:Array,default:()=>["py-1","bg-white"]}},setup(a){const e=a;let t=jr(!1);const r=u=>{t.value&&u.key==="Escape"&&(t.value=!1)};_o(()=>document.addEventListener("keydown",r)),lu(()=>document.removeEventListener("keydown",r));const n=je(()=>({48:"w-48"})[e.width.toString()]),i=je(()=>e.align==="left"?"origin-top-left left-0":e.align==="right"?"origin-top-right right-0":"origin-top");return(u,l)=>(p(),y("div",ZP,[f("div",{onClick:l[0]||(l[0]=m=>Dn(t)?t.value=!_(t):t=!_(t))},[Ce(u.$slots,"trigger")]),De(f("div",{class:"fixed inset-0 z-40",onClick:l[1]||(l[1]=m=>Dn(t)?t.value=!1:t=!1)},null,512),[[pt,_(t)]]),x(mu,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:F(()=>[De(f("div",{class:te(["absolute z-50 mt-2 rounded-md shadow-lg",[n.value,i.value]]),style:{display:"none"}},[f("div",{class:te(["rounded-md ring-1 ring-black ring-opacity-5 dark:bg-gray-800",a.contentClasses])},[Ce(u.$slots,"content")],2)],2),[[pt,_(t)]])]),_:3})]))}},ek=["href"],Qe={__name:"DropdownLink",props:{href:String,as:String,btnClass:String,openInNewTab:{type:Boolean,default:!1}},setup(a){return(e,t)=>{const r=X("InertiaLink");return p(),y("div",null,[a.as=="button"?(p(),y("button",{key:0,type:"submit",class:te(["block w-full px-4 py-2 text-sm leading-5 text-gray-700 dark:text-gray-400 text-left hover:bg-cool-gray-100 dark:hover:bg-cool-gray-900 focus:outline-none focus:bg-cool-gray-100 dark:focus:bg-cool-gray-900 transition duration-150 ease-in-out",a.btnClass])},[Ce(e.$slots,"default")],2)):a.as!="button"&&!a.openInNewTab?(p(),B(r,{key:1,href:a.href,class:te(["block px-4 py-2 text-sm leading-5 text-gray-700 dark:text-gray-400 hover:bg-cool-gray-100 dark:hover:bg-cool-gray-900 focus:outline-none focus:bg-cool-gray-100 dark:focus:bg-cool-gray-900 transition duration-150 ease-in-out",a.btnClass])},{default:F(()=>[Ce(e.$slots,"default")]),_:3},8,["href","class"])):(p(),y("a",{key:2,target:"_blank",href:a.href,class:te(["block px-4 py-2 text-sm leading-5 text-gray-700 dark:text-gray-400 hover:bg-cool-gray-100 dark:hover:bg-cool-gray-900 focus:outline-none focus:bg-cool-gray-100 dark:focus:bg-cool-gray-900 transition duration-150 ease-in-out",a.btnClass])},[Ce(e.$slots,"default")],10,ek))])}}},ak={components:{JetDropdown:Et,JetDropdownLink:Qe},props:{title:{type:String,required:!0},items:{type:Array,required:!0}}},tk={class:"inline-flex items-center px-1 pt-1 text-sm leading-5 text-gray-500 transition duration-150 ease-in-out border-b-2 border-transparent hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300"},rk={class:"inline-flex rounded-md"},nk={type:"button",class:"inline-flex items-center py-2 text-sm font-semibold leading-4 text-gray-500 transition duration-150 ease-in-out border border-transparent rounded-md dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 focus:outline-none"},ik=f("svg",{class:"ml-2 -mr-0.5 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[f("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1);function ok(a,e,t,r,n,i){const u=X("jet-dropdown-link"),l=X("jet-dropdown");return p(),y("div",tk,[x(l,{align:"right",width:"48"},{trigger:F(()=>[f("span",rk,[f("button",nk,[I(k(a.__(t.title))+" ",1),ik])])]),content:F(()=>[(p(!0),y(ue,null,we(t.items,m=>(p(),B(u,{key:m.key,class:"text-sm",href:a.route(m.route,m.route_params??null),"open-in-new-tab":m.is_open_in_new_tab},{default:F(()=>[I(k(a.__(m.title)),1)]),_:2},1032,["href","open-in-new-tab"]))),128))]),_:1})])}const sk=Se(ak,[["render",ok]]);function uk(a,e){for(var t in e)e.hasOwnProperty(t)&&a[t]===void 0&&(a[t]=e[t]);return a}function dk(a,e,t){var r;return a.length>e&&(t==null?(t="…",r=3):r=t.length,a=a.substring(0,e-r)+t),a}function zi(a,e){if(Array.prototype.indexOf)return a.indexOf(e);for(var t=0,r=a.length;t=0;t--)e(a[t])===!0&&a.splice(t,1)}function lk(a,e){if(!e.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var t=[],r=0,n;n=e.exec(a);)t.push(a.substring(r,n.index)),t.push(n[0]),r=n.index+n[0].length;return t.push(a.substring(r)),t}function Ps(a){throw new Error("Unhandled case for value: '".concat(a,"'"))}var Pr=function(){function a(e){e===void 0&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return a.prototype.setTagName=function(e){return this.tagName=e,this},a.prototype.getTagName=function(){return this.tagName||""},a.prototype.setAttr=function(e,t){var r=this.getAttrs();return r[e]=t,this},a.prototype.getAttr=function(e){return this.getAttrs()[e]},a.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},a.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},a.prototype.setClass=function(e){return this.setAttr("class",e)},a.prototype.addClass=function(e){for(var t=this.getClass(),r=this.whitespaceRegex,n=t?t.split(r):[],i=e.split(r),u;u=i.shift();)zi(n,u)===-1&&n.push(u);return this.getAttrs().class=n.join(" "),this},a.prototype.removeClass=function(e){for(var t=this.getClass(),r=this.whitespaceRegex,n=t?t.split(r):[],i=e.split(r),u;n.length&&(u=i.shift());){var l=zi(n,u);l!==-1&&n.splice(l,1)}return this.getAttrs().class=n.join(" "),this},a.prototype.getClass=function(){return this.getAttrs().class||""},a.prototype.hasClass=function(e){return(" "+this.getClass()+" ").indexOf(" "+e+" ")!==-1},a.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},a.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},a.prototype.getInnerHTML=function(){return this.innerHTML||""},a.prototype.getInnerHtml=function(){return this.getInnerHTML()},a.prototype.toAnchorString=function(){var e=this.getTagName(),t=this.buildAttrsStr();return t=t?" "+t:"",["<",e,t,">",this.getInnerHtml(),""].join("")},a.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r+'="'+e[r]+'"');return t.join(" ")},a}();function mk(a,e,t){var r,n;t==null?(t="…",n=3,r=8):(n=t.length,r=t.length);var i=function(C){var S={},N=C,L=N.match(/^([a-z]+):\/\//i);return L&&(S.scheme=L[1],N=N.substr(L[0].length)),L=N.match(/^(.*?)(?=(\?|#|\/|$))/i),L&&(S.host=L[1],N=N.substr(L[0].length)),L=N.match(/^\/(.*?)(?=(\?|#|$))/i),L&&(S.path=L[1],N=N.substr(L[0].length)),L=N.match(/^\?(.*?)(?=(#|$))/i),L&&(S.query=L[1],N=N.substr(L[0].length)),L=N.match(/^#(.*?)$/i),L&&(S.fragment=L[1]),S},u=function(C){var S="";return C.scheme&&C.host&&(S+=C.scheme+"://"),C.host&&(S+=C.host),C.path&&(S+="/"+C.path),C.query&&(S+="?"+C.query),C.fragment&&(S+="#"+C.fragment),S},l=function(C,S){var N=S/2,L=Math.ceil(N),j=-1*Math.floor(N),O="";return j<0&&(O=C.substr(j)),C.substr(0,L)+t+O};if(a.length<=e)return a;var m=e-n,c=i(a);if(c.query){var h=c.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);h&&(c.query=c.query.substr(0,h[1].length),a=u(c))}if(a.length<=e||(c.host&&(c.host=c.host.replace(/^www\./,""),a=u(c)),a.length<=e))return a;var b="";if(c.host&&(b+=c.host),b.length>=m)return c.host.length==e?(c.host.substr(0,e-n)+t).substr(0,m+r):l(b,m).substr(0,m+r);var g="";if(c.path&&(g+="/"+c.path),c.query&&(g+="?"+c.query),g)if((b+g).length>=m){if((b+g).length==e)return(b+g).substr(0,e);var w=m-b.length;return(b+l(g,w)).substr(0,m+r)}else b+=g;if(c.fragment){var T="#"+c.fragment;if((b+T).length>=m){if((b+T).length==e)return(b+T).substr(0,e);var R=m-b.length;return(b+l(T,R)).substr(0,m+r)}else b+=T}if(c.scheme&&c.host){var H=c.scheme+"://";if((b+H).length0&&(E=b.substr(-1*Math.floor(m/2))),(b.substr(0,Math.ceil(m/2))+t+E).substr(0,m+r)}function ck(a,e,t){if(a.length<=e)return a;var r,n;t==null?(t="…",r=8,n=3):(r=t.length,n=t.length);var i=e-n,u="";return i>0&&(u=a.substr(-1*Math.floor(i/2))),(a.substr(0,Math.ceil(i/2))+t+u).substr(0,i+r)}function hk(a,e,t){return dk(a,e,t)}var Ei=function(){function a(e){e===void 0&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return a.prototype.build=function(e){return new Pr({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},a.prototype.createAttrs=function(e){var t={href:e.getAnchorHref()},r=this.createCssClass(e);return r&&(t.class=r),this.newWindow&&(t.target="_blank",t.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length[c]),_:1})}const p=o(r,[["render",l]]);export{p as J}; +import{_ as o}from"./_plugin-vue_export-helper-c27b6911.js";import{l as n,o as a,c as s,w as i,a as t}from"./app-d03084a3.js";const r={},c=t("svg",{class:"w-16 h-16",viewBox:"0 0 586 630",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M391 68C391 30.4446 421.445 0 459 0H516C554.66 0 586 31.3401 586 70V135C586 168.137 559.137 195 526 195H391V68Z",fill:"#39B9F1"}),t("path",{d:"M0 70C0 31.3401 31.3401 0 70 0H125C163.66 0 195 31.3401 195 70V195H60C26.8629 195 0 168.137 0 135V70Z",fill:"#39B9F1"}),t("path",{d:"M49 319C49 291.386 71.3858 269 99 269H212V580C212 607.614 189.614 630 162 630H99C71.3858 630 49 607.614 49 580V319Z",fill:"#39B9F1"}),t("path",{d:"M375 269H484C511.614 269 534 291.386 534 319V580C534 607.614 511.614 630 484 630H425C397.386 630 375 607.614 375 580V269Z",fill:"#39B9F1"}),t("rect",{x:"195",y:"195",width:"196",height:"279",fill:"#39B9F1"})],-1);function l(C,f){const e=n("InertiaLink");return a(),s(e,{href:"/"},{default:i(()=>[c]),_:1})}const p=o(r,[["render",l]]);export{p as J}; diff --git a/public/build/default/assets/Button-4bd25e7c.js b/public/build/default/assets/Button-2e00e3fc.js similarity index 94% rename from public/build/default/assets/Button-4bd25e7c.js rename to public/build/default/assets/Button-2e00e3fc.js index 90ab2d522..bbe769856 100644 --- a/public/build/default/assets/Button-4bd25e7c.js +++ b/public/build/default/assets/Button-2e00e3fc.js @@ -1 +1 @@ -import{o as t,d as o,e as a,R as n,a as r}from"./app-10f1fbb6.js";const l=["type"],c={key:0,class:"animate-spin -ml-1 mr-3 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},i=r("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),d=r("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1),u=[i,d],y={__name:"Button",props:{type:{type:String,default:"submit"},loading:{type:Boolean,default:!1}},setup(e){return(s,p)=>(t(),o("button",{type:e.type,class:"inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:border-gray-900 focus:shadow-outline-gray transition ease-in-out duration-150 dark:bg-cool-gray-700 dark:hover:bg-cool-gray-600"},[e.loading?(t(),o("svg",c,u)):a("",!0),n(s.$slots,"default")],8,l))}};export{y as _}; +import{o as t,d as o,e as a,R as n,a as r}from"./app-d03084a3.js";const l=["type"],c={key:0,class:"animate-spin -ml-1 mr-3 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},i=r("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),d=r("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1),u=[i,d],y={__name:"Button",props:{type:{type:String,default:"submit"},loading:{type:Boolean,default:!1}},setup(e){return(s,p)=>(t(),o("button",{type:e.type,class:"inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:border-gray-900 focus:shadow-outline-gray transition ease-in-out duration-150 dark:bg-cool-gray-700 dark:hover:bg-cool-gray-600"},[e.loading?(t(),o("svg",c,u)):a("",!0),n(s.$slots,"default")],8,l))}};export{y as _}; diff --git a/public/build/default/assets/ChangeSkin-5379fe69.js b/public/build/default/assets/ChangeSkin-bac80215.js similarity index 96% rename from public/build/default/assets/ChangeSkin-5379fe69.js rename to public/build/default/assets/ChangeSkin-bac80215.js index d57827186..a4f2df152 100644 --- a/public/build/default/assets/ChangeSkin-5379fe69.js +++ b/public/build/default/assets/ChangeSkin-bac80215.js @@ -1 +1 @@ -import{z as O,r as I,G as H,x,y as ee,A as J,E as ce,s as pe,F as K,B as ne,C as Q,T as me,l as fe,o as C,c as D,w as b,b as v,a as l,u as d,d as B,t as n,J as ge,e as N,f as $,g as te,i as q,j as ae,bF as le,n as be}from"./app-10f1fbb6.js";import{s as ye}from"./vue-multiselect.esm-2340c4fe.js";import{X as se}from"./XInput-5de78b04.js";import{A as ve}from"./AppLayout-e973448b.js";import{L as M}from"./LoadingButton-48824f65.js";import{_ as Y}from"./AlertCard-abdcd361.js";import{o as h,H as R,T as he,t as oe,N as re,u as z,b as _e,a as A}from"./use-resolve-button-type-5343a0d4.js";import{a as xe,f as ie,O as j,T as G,m as ke,P as E,N as U}from"./hidden-f2d5170c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Icon-07002ff2.js";import"./useAuthorizable-a9d4f38f.js";import"./XMarkIcon-25f2033f.js";function we(a){typeof queueMicrotask=="function"?queueMicrotask(a):Promise.resolve().then(a).catch(p=>setTimeout(()=>{throw p}))}let Se=O({props:{onFocus:{type:Function,required:!0}},setup(a){let p=I(!0);return()=>p.value?H(ie,{as:"button",type:"button",features:xe.Focusable,onFocus(i){i.preventDefault();let f,c=50;function o(){var t;if(c--<=0){f&&cancelAnimationFrame(f);return}if((t=a.onFocus)!=null&&t.call(a)){p.value=!1,cancelAnimationFrame(f);return}f=requestAnimationFrame(o)}f=requestAnimationFrame(o)}}):null}});var Pe=(a=>(a[a.Forwards=0]="Forwards",a[a.Backwards=1]="Backwards",a))(Pe||{}),Ie=(a=>(a[a.Less=-1]="Less",a[a.Equal=0]="Equal",a[a.Greater=1]="Greater",a))(Ie||{});let ue=Symbol("TabsContext");function V(a){let p=Q(ue,null);if(p===null){let i=new Error(`<${a} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,V),i}return p}let Z=Symbol("TabsSSRContext"),Te=O({name:"TabGroup",emits:{change:a=>!0},props:{as:{type:[Object,String],default:"template"},selectedIndex:{type:[Number],default:null},defaultIndex:{type:[Number],default:0},vertical:{type:[Boolean],default:!1},manual:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(a,{slots:p,attrs:i,emit:f}){var c;let o=I((c=a.selectedIndex)!=null?c:a.defaultIndex),t=I([]),w=I([]),S=x(()=>a.selectedIndex!==null),k=x(()=>S.value?a.selectedIndex:o.value);function g(r){var e;let u=j(m.tabs.value,h),_=j(m.panels.value,h),L=u.filter(T=>{var F;return!((F=h(T))!=null&&F.hasAttribute("disabled"))});if(r<0||r>u.length-1){let T=z(o.value===null?0:Math.sign(r-o.value),{[-1]:()=>1,0:()=>z(Math.sign(r),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),F=z(T,{0:()=>u.indexOf(L[0]),1:()=>u.indexOf(L[L.length-1])});F!==-1&&(o.value=F),m.tabs.value=u,m.panels.value=_}else{let T=u.slice(0,r),F=[...u.slice(r),...T].find(de=>L.includes(de));if(!F)return;let X=(e=u.indexOf(F))!=null?e:m.selectedIndex.value;X===-1&&(X=m.selectedIndex.value),o.value=X,m.tabs.value=u,m.panels.value=_}}let m={selectedIndex:x(()=>{var r,e;return(e=(r=o.value)!=null?r:a.defaultIndex)!=null?e:null}),orientation:x(()=>a.vertical?"vertical":"horizontal"),activation:x(()=>a.manual?"manual":"auto"),tabs:t,panels:w,setSelectedIndex(r){k.value!==r&&f("change",r),S.value||g(r)},registerTab(r){var e;if(t.value.includes(r))return;let u=t.value[o.value];t.value.push(r),t.value=j(t.value,h);let _=(e=t.value.indexOf(u))!=null?e:o.value;_!==-1&&(o.value=_)},unregisterTab(r){let e=t.value.indexOf(r);e!==-1&&t.value.splice(e,1)},registerPanel(r){w.value.includes(r)||(w.value.push(r),w.value=j(w.value,h))},unregisterPanel(r){let e=w.value.indexOf(r);e!==-1&&w.value.splice(e,1)}};ee(ue,m);let P=I({tabs:[],panels:[]}),s=I(!1);J(()=>{s.value=!0}),ee(Z,x(()=>s.value?null:P.value));let y=x(()=>a.selectedIndex);return J(()=>{ce([y],()=>{var r;return g((r=a.selectedIndex)!=null?r:a.defaultIndex)},{immediate:!0})}),pe(()=>{if(!S.value||k.value==null||m.tabs.value.length<=0)return;let r=j(m.tabs.value,h);r.some((e,u)=>h(m.tabs.value[u])!==h(e))&&m.setSelectedIndex(r.findIndex(e=>h(e)===h(m.tabs.value[k.value])))}),()=>{let r={selectedIndex:o.value};return H(K,[t.value.length<=0&&H(Se,{onFocus:()=>{for(let e of t.value){let u=h(e);if((u==null?void 0:u.tabIndex)===0)return u.focus(),!0}return!1}}),R({theirProps:{...i,...he(a,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:r,slots:p,attrs:i,name:"TabGroup"})])}}}),Fe=O({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(a,{attrs:p,slots:i}){let f=V("TabList");return()=>{let c={selectedIndex:f.selectedIndex.value},o={role:"tablist","aria-orientation":f.orientation.value};return R({ourProps:o,theirProps:a,slot:c,attrs:p,slots:i,name:"TabList"})}}}),Ce=O({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`headlessui-tabs-tab-${oe()}`}},setup(a,{attrs:p,slots:i,expose:f}){let c=V("Tab"),o=I(null);f({el:o,$el:o}),J(()=>c.registerTab(o)),ne(()=>c.unregisterTab(o));let t=Q(Z),w=x(()=>{if(t.value){let e=t.value.tabs.indexOf(a.id);return e===-1?t.value.tabs.push(a.id)-1:e}return-1}),S=x(()=>{let e=c.tabs.value.indexOf(o);return e===-1?w.value:e}),k=x(()=>S.value===c.selectedIndex.value);function g(e){var u;let _=e();if(_===G.Success&&c.activation.value==="auto"){let L=(u=ke(o))==null?void 0:u.activeElement,T=c.tabs.value.findIndex(F=>h(F)===L);T!==-1&&c.setSelectedIndex(T)}return _}function m(e){let u=c.tabs.value.map(_=>h(_)).filter(Boolean);if(e.key===A.Space||e.key===A.Enter){e.preventDefault(),e.stopPropagation(),c.setSelectedIndex(S.value);return}switch(e.key){case A.Home:case A.PageUp:return e.preventDefault(),e.stopPropagation(),g(()=>E(u,U.First));case A.End:case A.PageDown:return e.preventDefault(),e.stopPropagation(),g(()=>E(u,U.Last))}if(g(()=>z(c.orientation.value,{vertical(){return e.key===A.ArrowUp?E(u,U.Previous|U.WrapAround):e.key===A.ArrowDown?E(u,U.Next|U.WrapAround):G.Error},horizontal(){return e.key===A.ArrowLeft?E(u,U.Previous|U.WrapAround):e.key===A.ArrowRight?E(u,U.Next|U.WrapAround):G.Error}}))===G.Success)return e.preventDefault()}let P=I(!1);function s(){var e;P.value||(P.value=!0,!a.disabled&&((e=h(o))==null||e.focus({preventScroll:!0}),c.setSelectedIndex(S.value),we(()=>{P.value=!1})))}function y(e){e.preventDefault()}let r=_e(x(()=>({as:a.as,type:p.type})),o);return()=>{var e;let u={selected:k.value},{id:_,...L}=a,T={ref:o,onKeydown:m,onMousedown:y,onClick:s,id:_,role:"tab",type:r.value,"aria-controls":(e=h(c.panels.value[S.value]))==null?void 0:e.id,"aria-selected":k.value,tabIndex:k.value?0:-1,disabled:a.disabled?!0:void 0};return R({ourProps:T,theirProps:L,slot:u,attrs:p,slots:i,name:"Tab"})}}}),Ae=O({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(a,{slots:p,attrs:i}){let f=V("TabPanels");return()=>{let c={selectedIndex:f.selectedIndex.value};return R({theirProps:a,ourProps:{},slot:c,attrs:i,slots:p,name:"TabPanels"})}}}),W=O({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`headlessui-tabs-panel-${oe()}`},tabIndex:{type:Number,default:0}},setup(a,{attrs:p,slots:i,expose:f}){let c=V("TabPanel"),o=I(null);f({el:o,$el:o}),J(()=>c.registerPanel(o)),ne(()=>c.unregisterPanel(o));let t=Q(Z),w=x(()=>{if(t.value){let g=t.value.panels.indexOf(a.id);return g===-1?t.value.panels.push(a.id)-1:g}return-1}),S=x(()=>{let g=c.panels.value.indexOf(o);return g===-1?w.value:g}),k=x(()=>S.value===c.selectedIndex.value);return()=>{var g;let m={selected:k.value},{id:P,tabIndex:s,...y}=a,r={ref:o,id:P,role:"tabpanel","aria-labelledby":(g=h(c.tabs.value[S.value]))==null?void 0:g.id,tabIndex:k.value?s:-1};return!k.value&&a.unmount&&!a.static?H(ie,{as:"span",...r}):R({ourProps:r,theirProps:y,slot:m,attrs:p,slots:i,features:re.Static|re.RenderStrategy,visible:k.value,name:"TabPanel"})}}});const Ue={class:"max-w-6xl px-2 py-3 mx-auto space-y-4 md:py-12 md:px-10"},$e={class:"flex flex-col md:flex-row md:items-center md:justify-between"},Le={key:0,class:"text-lg mb-2 md:mb-0 md:text-2xl font-bold text-gray-700 dark:text-gray-200"},Be={key:1,class:"text-lg italic mb-2 md:mb-0 md:text-2xl font-bold text-gray-500 dark:text-gray-500"},Ee={key:0,class:"text-xs text-gray-500 dark:text-gray-500"},Oe={class:"text-sm"},Ne={class:"text-gray-500 dark:text-gray-400"},je={class:"text-sm text-gray-500 dark:text-gray-400"},Re={class:"mb-2 text-lg font-bold text-gray-900 dark:text-white"},Ve={class:"flex flex-col md:flex-row justify-between pr-4"},De={class:"mb-2 text-sm"},qe={class:"text-sm"},Me=l("br",null,null,-1),Ge=l("a",{class:"text-blue-500 dark:text-blue-400 hover:underline",href:"https://mc-heads.net/skin/xinecraft.png",target:"_blank"},"https://mc-heads.net/skin/xinecraft.png",-1),We=l("img",{src:"/images/valid-skin-format.png",alt:"Skin Sample",class:"w48 h-40"},null,-1),ze=["onSubmit"],He={class:"col-span-6 sm:col-span-6 pt-4 space-y-3"},Je={class:"text-sm text-gray-700 font-bold dark:text-gray-300"},Xe={class:"flex gap-6"},Ye={class:"flex"},Ke={class:"flex items-center h-5"},Qe={class:"ml-2 text-sm"},Ze={for:"skin_type_steve",class:"font-medium text-gray-900 dark:text-gray-300"},et={class:"flex"},tt={class:"flex items-center h-5"},at={class:"ml-2 text-sm"},lt={for:"skin_type_alex",class:"font-medium text-gray-900 dark:text-gray-300"},st={class:"col-span-6 sm:col-span-6 pt-4 space-y-3"},rt={class:"text-sm text-gray-700 font-bold dark:text-gray-300"},nt={class:"flex gap-6"},ot={key:0,class:"text-xs text-red-500"},it={class:"mt-6"},ut={class:"mb-2 text-lg font-bold text-gray-900 dark:text-white"},dt={class:"text-sm"},ct={class:"mb-2"},pt={class:"list-disc list-inside"},mt=["onSubmit"],ft={class:"col-span-6 sm:col-span-6"},gt={class:"mt-6"},bt={class:"mb-2 text-lg font-bold text-gray-900 dark:text-white"},yt={class:"mb-2 text-sm"},vt={class:"text-sm"},ht=["onSubmit"],_t={class:"col-span-6 sm:col-span-6"},xt={class:"mt-6"},kt={class:"mb-2 text-lg font-bold text-gray-900 dark:text-white"},wt={class:"mb-2 text-sm"},St=["onSubmit"],Pt={class:"mt-6"},jt={__name:"ChangeSkin",props:{uuid:{type:String,required:!1},players:{type:Array,required:!0},hasServersWithFeature:{type:Boolean,required:!0},cooldown:{type:Number}},setup(a){const p=a;let i=I(p.players[0]);const f=p.players.find(s=>s.uuid===p.uuid);f&&(i.value=f);const c=["Upload Skin","From URL","From Username","Reset"],o=I(null),t=me({action_type:"upload",player_uuid:null,skin_type:"steve",file:null,username:"",url:""}),w=()=>{t.action_type="upload",t.file=o.value.files[0],t.player_uuid=i.value.uuid,t.post(route("change-player-skin.update"),{onSuccess:()=>{t.reset()}})},S=()=>{t.action_type="url",t.username=null,t.player_uuid=i.value.uuid,t.post(route("change-player-skin.update"),{onSuccess:()=>{t.reset()}})},k=()=>{t.action_type="username",t.url=null,t.player_uuid=i.value.uuid,t.post(route("change-player-skin.update"),{onSuccess:()=>{t.reset()}})},g=()=>{t.action_type="reset",t.url=null,t.username=null,t.player_uuid=i.value.uuid,t.post(route("change-player-skin.update"),{onSuccess:()=>{t.reset()}})},m=["https://namemc.com/skin/a569a3e7aad87b3a","https://minesk.in/7a8d3a710c5b440a875d9b6fb4d7d9a3","http://novask.in/6673493202.png","http://textures.minecraft.net/texture/63741c4509672cc31e43750d5223d4b3099f851e8039651550e98719692dd028"],P=x(()=>!p.hasServersWithFeature||t.processing||!i.value);return(s,y)=>{const r=fe("AppHead");return C(),D(ve,null,{default:b(()=>[v(r,{title:s.__("Change Player Skin")},null,8,["title"]),l("div",Ue,[l("div",$e,[d(i)?(C(),B("h2",Le,n(s.__("Change skin for :username",{username:d(i).username})),1)):(C(),B("h2",Be,n(s.__("No Linked Players")),1)),v(d(ye),{id:"country",modelValue:d(i),"onUpdate:modelValue":y[0]||(y[0]=e=>ge(i)?i.value=e:i=e),class:"w-full md:w-1/3 bg-gray-300 border-gray-300 rounded-md shadow-sm focus:ring-light-blue-500 focus:border-light-blue-500 sm:text-sm dark:bg-gray-900",options:a.players,multiple:!1,placeholder:s.__("Search")+"...",label:"username","allow-empty":!1,"deselect-label":s.__("Can't remove"),"track-by":"id"},null,8,["modelValue","options","placeholder","deselect-label"])]),d(i)?(C(),B("p",Ee,n(s.__("Player Uuid"))+": "+n(d(i).uuid),1)):N("",!0),a.hasServersWithFeature?N("",!0):(C(),D(Y,{key:1,"text-color":"text-red-800 dark:text-red-500","border-color":"border-red-500"},{body:b(()=>[l("p",Ne,n(s.__("This feature is not enabled in any of the servers. Below form will be disabled. ")),1),l("p",je,n(s.__("Please check back later or contact the server administrator.")),1)]),default:b(()=>[l("p",Oe,n(s.__("Oh Jeez! No server support changing of skin yet!")),1)]),_:1})),a.cooldown?(C(),D(Y,{key:2,"text-color":"text-yellow-800 dark:text-yellow-500","border-color":"border-yellow-500"},{default:b(()=>[$(n(s.__("You are on a cooldown! Please wait for :cooldown seconds before you can try again.",{cooldown:a.cooldown})),1)]),_:1})):N("",!0),d(i)?N("",!0):(C(),D(Y,{key:3,"text-color":"text-red-800 dark:text-red-500","border-color":"border-red-500"},{default:b(()=>[$(n(s.__("No linked players found. Please link a player to your account.")),1)]),_:1})),v(d(Te),{as:"div",class:"md:flex"},{default:b(()=>[v(d(Fe),{as:"ul",class:"mb-4 space-y-4 text-sm font-medium text-gray-500 flex-column space-y dark:text-gray-400 md:me-4 md:mb-0"},{default:b(()=>[(C(),B(K,null,te(c,(e,u)=>v(d(Ce),{key:u,as:"li",class:"focus:outline-none whitespace-nowrap"},{default:b(({selected:_})=>[l("a",{href:"#",class:be({"inline-flex items-center w-full px-4 py-3 rounded-lg hover:text-gray-900 bg-gray-50 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700 dark:hover:text-white":!_,"inline-flex items-center w-full px-4 py-3 text-white bg-gray-500 rounded-lg active dark:bg-gray-600":_}),"aria-current":"page"},n(e),3)]),_:2},1024)),64))]),_:1}),v(d(Ae),{as:"div",class:"w-full"},{default:b(()=>[v(d(W),{as:"div",class:"w-full p-6 text-gray-500 rounded-lg bg-gray-50 text-medium dark:text-gray-400 dark:bg-gray-800"},{default:b(()=>[l("h3",Re,n(s.__("Change Skin"))+" - "+n(s.__("Upload Skin")),1),l("div",Ve,[l("div",null,[l("p",De,n(s.__("Please upload a valid skin image. ⚠️")),1),l("p",qe,[$(n(s.__("Refer to the provided sample guide image to understand which image should be upload."))+" ",1),Me,$(" "+n(s.__("A valid skin image should look like this: "))+" ",1),Ge])]),We]),l("form",{class:"w-full border-t mt-4 border-gray-300 dark:border-gray-700",onSubmit:q(w,["prevent"])},[l("div",He,[l("p",Je,n(s.__("Skin Type")),1),l("div",Xe,[l("div",Ye,[l("div",Ke,[ae(l("input",{id:"skin_type_steve","onUpdate:modelValue":y[1]||(y[1]=e=>d(t).skin_type=e),type:"radio",value:"steve",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600",name:"skin_type"},null,512),[[le,d(t).skin_type]])]),l("div",Qe,[l("label",Ze,n(s.__("Steve")),1)])]),l("div",et,[l("div",tt,[ae(l("input",{id:"skin_type_alex","onUpdate:modelValue":y[2]||(y[2]=e=>d(t).skin_type=e),type:"radio",value:"alex",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600",name:"skin_type"},null,512),[[le,d(t).skin_type]])]),l("div",at,[l("label",lt,n(s.__("Alex")),1)])])])]),l("div",st,[l("p",rt,n(s.__("Skin File")),1),l("div",nt,[l("input",{id:"file",ref_key:"file",ref:o,accept:".png",type:"file",class:"block p-2 w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400",required:""},null,512)]),d(t).errors.file?(C(),B("p",ot,n(d(t).errors.file),1)):N("",!0)]),l("div",it,[v(M,{loading:d(t).processing,class:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-light-blue-500 hover:bg-light-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-light-blue-500 disabled:opacity-50",disabled:P.value,type:"submit"},{default:b(()=>[$(n(s.__("Change Skin")),1)]),_:1},8,["loading","disabled"])])],40,ze)]),_:1}),v(d(W),{as:"div",class:"w-full p-6 text-gray-500 rounded-lg bg-gray-50 text-medium dark:text-gray-400 dark:bg-gray-800"},{default:b(()=>[l("h3",ut,n(s.__("Change Skin"))+" - "+n(s.__("From URL")),1),l("div",dt,[l("p",ct,n(s.__("Change your skin by providing a valid skin URL. You can find skin from namemc.com, mineskin.org and other skin websites.")),1),l("p",null,[$(n(s.__("Here are some examples of valid skin url:"))+" ",1),l("ul",pt,[(C(),B(K,null,te(m,e=>l("li",{key:e,class:"list-item break-all"},n(e),1)),64))])])]),l("form",{class:"w-full mt-4",onSubmit:q(S,["prevent"])},[l("div",ft,[v(se,{id:"url",modelValue:d(t).url,"onUpdate:modelValue":y[3]||(y[3]=e=>d(t).url=e),label:s.__("Skin URL"),error:d(t).errors.url,type:"text",name:"url","help-error-flex":"flex-row"},null,8,["modelValue","label","error"])]),l("div",gt,[v(M,{loading:d(t).processing,class:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-light-blue-500 hover:bg-light-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-light-blue-500 disabled:opacity-50",disabled:P.value,type:"submit"},{default:b(()=>[$(n(s.__("Change Skin")),1)]),_:1},8,["loading","disabled"])])],40,mt)]),_:1}),v(d(W),{as:"div",class:"w-full p-6 text-gray-500 rounded-lg bg-gray-50 text-medium dark:text-gray-400 dark:bg-gray-800"},{default:b(()=>[l("h3",bt,n(s.__("Change Skin"))+" - "+n(s.__("From Username")),1),l("p",yt,n(s.__("Change your skin by providing a valid Minecraft username (Premium account).")),1),l("p",vt,n(s.__("The skin will be fetched from Mojang server.")),1),l("form",{class:"w-full mt-4",onSubmit:q(k,["prevent"])},[l("div",_t,[v(se,{id:"username",modelValue:d(t).username,"onUpdate:modelValue":y[4]||(y[4]=e=>d(t).username=e),label:s.__("Eg: xinecraft"),error:d(t).errors.username,type:"text",name:"username","help-error-flex":"flex-row"},null,8,["modelValue","label","error"])]),l("div",xt,[v(M,{loading:d(t).processing,class:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-light-blue-500 hover:bg-light-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-light-blue-500 disabled:opacity-50",disabled:P.value,type:"submit"},{default:b(()=>[$(n(s.__("Change Skin")),1)]),_:1},8,["loading","disabled"])])],40,ht)]),_:1}),v(d(W),{as:"div",class:"w-full p-6 text-gray-500 rounded-lg bg-gray-50 text-medium dark:text-gray-400 dark:bg-gray-800"},{default:b(()=>[l("h3",kt,n(s.__("Change Skin"))+" - "+n(s.__("Reset")),1),l("p",wt,n(s.__("Reset your skin to default Minecraft skin. If you have premium minecraft account it will reset to your premium skin.")),1),l("form",{class:"w-full mt-4",onSubmit:q(g,["prevent"])},[l("div",Pt,[v(M,{loading:d(t).processing,class:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-red-500 hover:bg-red-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 disabled:opacity-50",disabled:P.value,type:"submit"},{default:b(()=>[$(n(s.__("Reset to Default Skin")),1)]),_:1},8,["loading","disabled"])])],40,St)]),_:1})]),_:1})]),_:1})])]),_:1})}}};export{jt as default}; +import{z as O,r as I,G as H,x,y as ee,A as J,E as ce,s as pe,F as K,B as ne,C as Q,T as me,l as fe,o as C,c as D,w as b,b as v,a as l,u as d,d as B,t as n,J as ge,e as N,f as $,g as te,i as q,j as ae,bF as le,n as be}from"./app-d03084a3.js";import{s as ye}from"./vue-multiselect.esm-733a639e.js";import{X as se}from"./XInput-4d223784.js";import{A as ve}from"./AppLayout-180f66c1.js";import{L as M}from"./LoadingButton-e7934cd8.js";import{_ as Y}from"./AlertCard-9ecef095.js";import{o as h,H as R,T as he,t as oe,N as re,u as z,b as _e,a as A}from"./use-resolve-button-type-d5bb55c5.js";import{a as xe,f as ie,O as j,T as G,m as ke,P as E,N as U}from"./hidden-44eecd86.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Icon-09cf2959.js";import"./useAuthorizable-db63a772.js";import"./XMarkIcon-63f73fcf.js";function we(a){typeof queueMicrotask=="function"?queueMicrotask(a):Promise.resolve().then(a).catch(p=>setTimeout(()=>{throw p}))}let Se=O({props:{onFocus:{type:Function,required:!0}},setup(a){let p=I(!0);return()=>p.value?H(ie,{as:"button",type:"button",features:xe.Focusable,onFocus(i){i.preventDefault();let f,c=50;function o(){var t;if(c--<=0){f&&cancelAnimationFrame(f);return}if((t=a.onFocus)!=null&&t.call(a)){p.value=!1,cancelAnimationFrame(f);return}f=requestAnimationFrame(o)}f=requestAnimationFrame(o)}}):null}});var Pe=(a=>(a[a.Forwards=0]="Forwards",a[a.Backwards=1]="Backwards",a))(Pe||{}),Ie=(a=>(a[a.Less=-1]="Less",a[a.Equal=0]="Equal",a[a.Greater=1]="Greater",a))(Ie||{});let ue=Symbol("TabsContext");function V(a){let p=Q(ue,null);if(p===null){let i=new Error(`<${a} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,V),i}return p}let Z=Symbol("TabsSSRContext"),Te=O({name:"TabGroup",emits:{change:a=>!0},props:{as:{type:[Object,String],default:"template"},selectedIndex:{type:[Number],default:null},defaultIndex:{type:[Number],default:0},vertical:{type:[Boolean],default:!1},manual:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(a,{slots:p,attrs:i,emit:f}){var c;let o=I((c=a.selectedIndex)!=null?c:a.defaultIndex),t=I([]),w=I([]),S=x(()=>a.selectedIndex!==null),k=x(()=>S.value?a.selectedIndex:o.value);function g(r){var e;let u=j(m.tabs.value,h),_=j(m.panels.value,h),L=u.filter(T=>{var F;return!((F=h(T))!=null&&F.hasAttribute("disabled"))});if(r<0||r>u.length-1){let T=z(o.value===null?0:Math.sign(r-o.value),{[-1]:()=>1,0:()=>z(Math.sign(r),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),F=z(T,{0:()=>u.indexOf(L[0]),1:()=>u.indexOf(L[L.length-1])});F!==-1&&(o.value=F),m.tabs.value=u,m.panels.value=_}else{let T=u.slice(0,r),F=[...u.slice(r),...T].find(de=>L.includes(de));if(!F)return;let X=(e=u.indexOf(F))!=null?e:m.selectedIndex.value;X===-1&&(X=m.selectedIndex.value),o.value=X,m.tabs.value=u,m.panels.value=_}}let m={selectedIndex:x(()=>{var r,e;return(e=(r=o.value)!=null?r:a.defaultIndex)!=null?e:null}),orientation:x(()=>a.vertical?"vertical":"horizontal"),activation:x(()=>a.manual?"manual":"auto"),tabs:t,panels:w,setSelectedIndex(r){k.value!==r&&f("change",r),S.value||g(r)},registerTab(r){var e;if(t.value.includes(r))return;let u=t.value[o.value];t.value.push(r),t.value=j(t.value,h);let _=(e=t.value.indexOf(u))!=null?e:o.value;_!==-1&&(o.value=_)},unregisterTab(r){let e=t.value.indexOf(r);e!==-1&&t.value.splice(e,1)},registerPanel(r){w.value.includes(r)||(w.value.push(r),w.value=j(w.value,h))},unregisterPanel(r){let e=w.value.indexOf(r);e!==-1&&w.value.splice(e,1)}};ee(ue,m);let P=I({tabs:[],panels:[]}),s=I(!1);J(()=>{s.value=!0}),ee(Z,x(()=>s.value?null:P.value));let y=x(()=>a.selectedIndex);return J(()=>{ce([y],()=>{var r;return g((r=a.selectedIndex)!=null?r:a.defaultIndex)},{immediate:!0})}),pe(()=>{if(!S.value||k.value==null||m.tabs.value.length<=0)return;let r=j(m.tabs.value,h);r.some((e,u)=>h(m.tabs.value[u])!==h(e))&&m.setSelectedIndex(r.findIndex(e=>h(e)===h(m.tabs.value[k.value])))}),()=>{let r={selectedIndex:o.value};return H(K,[t.value.length<=0&&H(Se,{onFocus:()=>{for(let e of t.value){let u=h(e);if((u==null?void 0:u.tabIndex)===0)return u.focus(),!0}return!1}}),R({theirProps:{...i,...he(a,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:r,slots:p,attrs:i,name:"TabGroup"})])}}}),Fe=O({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(a,{attrs:p,slots:i}){let f=V("TabList");return()=>{let c={selectedIndex:f.selectedIndex.value},o={role:"tablist","aria-orientation":f.orientation.value};return R({ourProps:o,theirProps:a,slot:c,attrs:p,slots:i,name:"TabList"})}}}),Ce=O({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`headlessui-tabs-tab-${oe()}`}},setup(a,{attrs:p,slots:i,expose:f}){let c=V("Tab"),o=I(null);f({el:o,$el:o}),J(()=>c.registerTab(o)),ne(()=>c.unregisterTab(o));let t=Q(Z),w=x(()=>{if(t.value){let e=t.value.tabs.indexOf(a.id);return e===-1?t.value.tabs.push(a.id)-1:e}return-1}),S=x(()=>{let e=c.tabs.value.indexOf(o);return e===-1?w.value:e}),k=x(()=>S.value===c.selectedIndex.value);function g(e){var u;let _=e();if(_===G.Success&&c.activation.value==="auto"){let L=(u=ke(o))==null?void 0:u.activeElement,T=c.tabs.value.findIndex(F=>h(F)===L);T!==-1&&c.setSelectedIndex(T)}return _}function m(e){let u=c.tabs.value.map(_=>h(_)).filter(Boolean);if(e.key===A.Space||e.key===A.Enter){e.preventDefault(),e.stopPropagation(),c.setSelectedIndex(S.value);return}switch(e.key){case A.Home:case A.PageUp:return e.preventDefault(),e.stopPropagation(),g(()=>E(u,U.First));case A.End:case A.PageDown:return e.preventDefault(),e.stopPropagation(),g(()=>E(u,U.Last))}if(g(()=>z(c.orientation.value,{vertical(){return e.key===A.ArrowUp?E(u,U.Previous|U.WrapAround):e.key===A.ArrowDown?E(u,U.Next|U.WrapAround):G.Error},horizontal(){return e.key===A.ArrowLeft?E(u,U.Previous|U.WrapAround):e.key===A.ArrowRight?E(u,U.Next|U.WrapAround):G.Error}}))===G.Success)return e.preventDefault()}let P=I(!1);function s(){var e;P.value||(P.value=!0,!a.disabled&&((e=h(o))==null||e.focus({preventScroll:!0}),c.setSelectedIndex(S.value),we(()=>{P.value=!1})))}function y(e){e.preventDefault()}let r=_e(x(()=>({as:a.as,type:p.type})),o);return()=>{var e;let u={selected:k.value},{id:_,...L}=a,T={ref:o,onKeydown:m,onMousedown:y,onClick:s,id:_,role:"tab",type:r.value,"aria-controls":(e=h(c.panels.value[S.value]))==null?void 0:e.id,"aria-selected":k.value,tabIndex:k.value?0:-1,disabled:a.disabled?!0:void 0};return R({ourProps:T,theirProps:L,slot:u,attrs:p,slots:i,name:"Tab"})}}}),Ae=O({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(a,{slots:p,attrs:i}){let f=V("TabPanels");return()=>{let c={selectedIndex:f.selectedIndex.value};return R({theirProps:a,ourProps:{},slot:c,attrs:i,slots:p,name:"TabPanels"})}}}),W=O({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`headlessui-tabs-panel-${oe()}`},tabIndex:{type:Number,default:0}},setup(a,{attrs:p,slots:i,expose:f}){let c=V("TabPanel"),o=I(null);f({el:o,$el:o}),J(()=>c.registerPanel(o)),ne(()=>c.unregisterPanel(o));let t=Q(Z),w=x(()=>{if(t.value){let g=t.value.panels.indexOf(a.id);return g===-1?t.value.panels.push(a.id)-1:g}return-1}),S=x(()=>{let g=c.panels.value.indexOf(o);return g===-1?w.value:g}),k=x(()=>S.value===c.selectedIndex.value);return()=>{var g;let m={selected:k.value},{id:P,tabIndex:s,...y}=a,r={ref:o,id:P,role:"tabpanel","aria-labelledby":(g=h(c.tabs.value[S.value]))==null?void 0:g.id,tabIndex:k.value?s:-1};return!k.value&&a.unmount&&!a.static?H(ie,{as:"span",...r}):R({ourProps:r,theirProps:y,slot:m,attrs:p,slots:i,features:re.Static|re.RenderStrategy,visible:k.value,name:"TabPanel"})}}});const Ue={class:"max-w-6xl px-2 py-3 mx-auto space-y-4 md:py-12 md:px-10"},$e={class:"flex flex-col md:flex-row md:items-center md:justify-between"},Le={key:0,class:"text-lg mb-2 md:mb-0 md:text-2xl font-bold text-gray-700 dark:text-gray-200"},Be={key:1,class:"text-lg italic mb-2 md:mb-0 md:text-2xl font-bold text-gray-500 dark:text-gray-500"},Ee={key:0,class:"text-xs text-gray-500 dark:text-gray-500"},Oe={class:"text-sm"},Ne={class:"text-gray-500 dark:text-gray-400"},je={class:"text-sm text-gray-500 dark:text-gray-400"},Re={class:"mb-2 text-lg font-bold text-gray-900 dark:text-white"},Ve={class:"flex flex-col md:flex-row justify-between pr-4"},De={class:"mb-2 text-sm"},qe={class:"text-sm"},Me=l("br",null,null,-1),Ge=l("a",{class:"text-blue-500 dark:text-blue-400 hover:underline",href:"https://mc-heads.net/skin/xinecraft.png",target:"_blank"},"https://mc-heads.net/skin/xinecraft.png",-1),We=l("img",{src:"/images/valid-skin-format.png",alt:"Skin Sample",class:"w48 h-40"},null,-1),ze=["onSubmit"],He={class:"col-span-6 sm:col-span-6 pt-4 space-y-3"},Je={class:"text-sm text-gray-700 font-bold dark:text-gray-300"},Xe={class:"flex gap-6"},Ye={class:"flex"},Ke={class:"flex items-center h-5"},Qe={class:"ml-2 text-sm"},Ze={for:"skin_type_steve",class:"font-medium text-gray-900 dark:text-gray-300"},et={class:"flex"},tt={class:"flex items-center h-5"},at={class:"ml-2 text-sm"},lt={for:"skin_type_alex",class:"font-medium text-gray-900 dark:text-gray-300"},st={class:"col-span-6 sm:col-span-6 pt-4 space-y-3"},rt={class:"text-sm text-gray-700 font-bold dark:text-gray-300"},nt={class:"flex gap-6"},ot={key:0,class:"text-xs text-red-500"},it={class:"mt-6"},ut={class:"mb-2 text-lg font-bold text-gray-900 dark:text-white"},dt={class:"text-sm"},ct={class:"mb-2"},pt={class:"list-disc list-inside"},mt=["onSubmit"],ft={class:"col-span-6 sm:col-span-6"},gt={class:"mt-6"},bt={class:"mb-2 text-lg font-bold text-gray-900 dark:text-white"},yt={class:"mb-2 text-sm"},vt={class:"text-sm"},ht=["onSubmit"],_t={class:"col-span-6 sm:col-span-6"},xt={class:"mt-6"},kt={class:"mb-2 text-lg font-bold text-gray-900 dark:text-white"},wt={class:"mb-2 text-sm"},St=["onSubmit"],Pt={class:"mt-6"},jt={__name:"ChangeSkin",props:{uuid:{type:String,required:!1},players:{type:Array,required:!0},hasServersWithFeature:{type:Boolean,required:!0},cooldown:{type:Number}},setup(a){const p=a;let i=I(p.players[0]);const f=p.players.find(s=>s.uuid===p.uuid);f&&(i.value=f);const c=["Upload Skin","From URL","From Username","Reset"],o=I(null),t=me({action_type:"upload",player_uuid:null,skin_type:"steve",file:null,username:"",url:""}),w=()=>{t.action_type="upload",t.file=o.value.files[0],t.player_uuid=i.value.uuid,t.post(route("change-player-skin.update"),{onSuccess:()=>{t.reset()}})},S=()=>{t.action_type="url",t.username=null,t.player_uuid=i.value.uuid,t.post(route("change-player-skin.update"),{onSuccess:()=>{t.reset()}})},k=()=>{t.action_type="username",t.url=null,t.player_uuid=i.value.uuid,t.post(route("change-player-skin.update"),{onSuccess:()=>{t.reset()}})},g=()=>{t.action_type="reset",t.url=null,t.username=null,t.player_uuid=i.value.uuid,t.post(route("change-player-skin.update"),{onSuccess:()=>{t.reset()}})},m=["https://namemc.com/skin/a569a3e7aad87b3a","https://minesk.in/7a8d3a710c5b440a875d9b6fb4d7d9a3","http://novask.in/6673493202.png","http://textures.minecraft.net/texture/63741c4509672cc31e43750d5223d4b3099f851e8039651550e98719692dd028"],P=x(()=>!p.hasServersWithFeature||t.processing||!i.value);return(s,y)=>{const r=fe("AppHead");return C(),D(ve,null,{default:b(()=>[v(r,{title:s.__("Change Player Skin")},null,8,["title"]),l("div",Ue,[l("div",$e,[d(i)?(C(),B("h2",Le,n(s.__("Change skin for :username",{username:d(i).username})),1)):(C(),B("h2",Be,n(s.__("No Linked Players")),1)),v(d(ye),{id:"country",modelValue:d(i),"onUpdate:modelValue":y[0]||(y[0]=e=>ge(i)?i.value=e:i=e),class:"w-full md:w-1/3 bg-gray-300 border-gray-300 rounded-md shadow-sm focus:ring-light-blue-500 focus:border-light-blue-500 sm:text-sm dark:bg-gray-900",options:a.players,multiple:!1,placeholder:s.__("Search")+"...",label:"username","allow-empty":!1,"deselect-label":s.__("Can't remove"),"track-by":"id"},null,8,["modelValue","options","placeholder","deselect-label"])]),d(i)?(C(),B("p",Ee,n(s.__("Player Uuid"))+": "+n(d(i).uuid),1)):N("",!0),a.hasServersWithFeature?N("",!0):(C(),D(Y,{key:1,"text-color":"text-red-800 dark:text-red-500","border-color":"border-red-500"},{body:b(()=>[l("p",Ne,n(s.__("This feature is not enabled in any of the servers. Below form will be disabled. ")),1),l("p",je,n(s.__("Please check back later or contact the server administrator.")),1)]),default:b(()=>[l("p",Oe,n(s.__("Oh Jeez! No server support changing of skin yet!")),1)]),_:1})),a.cooldown?(C(),D(Y,{key:2,"text-color":"text-yellow-800 dark:text-yellow-500","border-color":"border-yellow-500"},{default:b(()=>[$(n(s.__("You are on a cooldown! Please wait for :cooldown seconds before you can try again.",{cooldown:a.cooldown})),1)]),_:1})):N("",!0),d(i)?N("",!0):(C(),D(Y,{key:3,"text-color":"text-red-800 dark:text-red-500","border-color":"border-red-500"},{default:b(()=>[$(n(s.__("No linked players found. Please link a player to your account.")),1)]),_:1})),v(d(Te),{as:"div",class:"md:flex"},{default:b(()=>[v(d(Fe),{as:"ul",class:"mb-4 space-y-4 text-sm font-medium text-gray-500 flex-column space-y dark:text-gray-400 md:me-4 md:mb-0"},{default:b(()=>[(C(),B(K,null,te(c,(e,u)=>v(d(Ce),{key:u,as:"li",class:"focus:outline-none whitespace-nowrap"},{default:b(({selected:_})=>[l("a",{href:"#",class:be({"inline-flex items-center w-full px-4 py-3 rounded-lg hover:text-gray-900 bg-gray-50 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700 dark:hover:text-white":!_,"inline-flex items-center w-full px-4 py-3 text-white bg-gray-500 rounded-lg active dark:bg-gray-600":_}),"aria-current":"page"},n(e),3)]),_:2},1024)),64))]),_:1}),v(d(Ae),{as:"div",class:"w-full"},{default:b(()=>[v(d(W),{as:"div",class:"w-full p-6 text-gray-500 rounded-lg bg-gray-50 text-medium dark:text-gray-400 dark:bg-gray-800"},{default:b(()=>[l("h3",Re,n(s.__("Change Skin"))+" - "+n(s.__("Upload Skin")),1),l("div",Ve,[l("div",null,[l("p",De,n(s.__("Please upload a valid skin image. ⚠️")),1),l("p",qe,[$(n(s.__("Refer to the provided sample guide image to understand which image should be upload."))+" ",1),Me,$(" "+n(s.__("A valid skin image should look like this: "))+" ",1),Ge])]),We]),l("form",{class:"w-full border-t mt-4 border-gray-300 dark:border-gray-700",onSubmit:q(w,["prevent"])},[l("div",He,[l("p",Je,n(s.__("Skin Type")),1),l("div",Xe,[l("div",Ye,[l("div",Ke,[ae(l("input",{id:"skin_type_steve","onUpdate:modelValue":y[1]||(y[1]=e=>d(t).skin_type=e),type:"radio",value:"steve",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600",name:"skin_type"},null,512),[[le,d(t).skin_type]])]),l("div",Qe,[l("label",Ze,n(s.__("Steve")),1)])]),l("div",et,[l("div",tt,[ae(l("input",{id:"skin_type_alex","onUpdate:modelValue":y[2]||(y[2]=e=>d(t).skin_type=e),type:"radio",value:"alex",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600",name:"skin_type"},null,512),[[le,d(t).skin_type]])]),l("div",at,[l("label",lt,n(s.__("Alex")),1)])])])]),l("div",st,[l("p",rt,n(s.__("Skin File")),1),l("div",nt,[l("input",{id:"file",ref_key:"file",ref:o,accept:".png",type:"file",class:"block p-2 w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400",required:""},null,512)]),d(t).errors.file?(C(),B("p",ot,n(d(t).errors.file),1)):N("",!0)]),l("div",it,[v(M,{loading:d(t).processing,class:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-light-blue-500 hover:bg-light-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-light-blue-500 disabled:opacity-50",disabled:P.value,type:"submit"},{default:b(()=>[$(n(s.__("Change Skin")),1)]),_:1},8,["loading","disabled"])])],40,ze)]),_:1}),v(d(W),{as:"div",class:"w-full p-6 text-gray-500 rounded-lg bg-gray-50 text-medium dark:text-gray-400 dark:bg-gray-800"},{default:b(()=>[l("h3",ut,n(s.__("Change Skin"))+" - "+n(s.__("From URL")),1),l("div",dt,[l("p",ct,n(s.__("Change your skin by providing a valid skin URL. You can find skin from namemc.com, mineskin.org and other skin websites.")),1),l("p",null,[$(n(s.__("Here are some examples of valid skin url:"))+" ",1),l("ul",pt,[(C(),B(K,null,te(m,e=>l("li",{key:e,class:"list-item break-all"},n(e),1)),64))])])]),l("form",{class:"w-full mt-4",onSubmit:q(S,["prevent"])},[l("div",ft,[v(se,{id:"url",modelValue:d(t).url,"onUpdate:modelValue":y[3]||(y[3]=e=>d(t).url=e),label:s.__("Skin URL"),error:d(t).errors.url,type:"text",name:"url","help-error-flex":"flex-row"},null,8,["modelValue","label","error"])]),l("div",gt,[v(M,{loading:d(t).processing,class:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-light-blue-500 hover:bg-light-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-light-blue-500 disabled:opacity-50",disabled:P.value,type:"submit"},{default:b(()=>[$(n(s.__("Change Skin")),1)]),_:1},8,["loading","disabled"])])],40,mt)]),_:1}),v(d(W),{as:"div",class:"w-full p-6 text-gray-500 rounded-lg bg-gray-50 text-medium dark:text-gray-400 dark:bg-gray-800"},{default:b(()=>[l("h3",bt,n(s.__("Change Skin"))+" - "+n(s.__("From Username")),1),l("p",yt,n(s.__("Change your skin by providing a valid Minecraft username (Premium account).")),1),l("p",vt,n(s.__("The skin will be fetched from Mojang server.")),1),l("form",{class:"w-full mt-4",onSubmit:q(k,["prevent"])},[l("div",_t,[v(se,{id:"username",modelValue:d(t).username,"onUpdate:modelValue":y[4]||(y[4]=e=>d(t).username=e),label:s.__("Eg: xinecraft"),error:d(t).errors.username,type:"text",name:"username","help-error-flex":"flex-row"},null,8,["modelValue","label","error"])]),l("div",xt,[v(M,{loading:d(t).processing,class:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-light-blue-500 hover:bg-light-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-light-blue-500 disabled:opacity-50",disabled:P.value,type:"submit"},{default:b(()=>[$(n(s.__("Change Skin")),1)]),_:1},8,["loading","disabled"])])],40,ht)]),_:1}),v(d(W),{as:"div",class:"w-full p-6 text-gray-500 rounded-lg bg-gray-50 text-medium dark:text-gray-400 dark:bg-gray-800"},{default:b(()=>[l("h3",kt,n(s.__("Change Skin"))+" - "+n(s.__("Reset")),1),l("p",wt,n(s.__("Reset your skin to default Minecraft skin. If you have premium minecraft account it will reset to your premium skin.")),1),l("form",{class:"w-full mt-4",onSubmit:q(g,["prevent"])},[l("div",Pt,[v(M,{loading:d(t).processing,class:"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-red-500 hover:bg-red-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 disabled:opacity-50",disabled:P.value,type:"submit"},{default:b(()=>[$(n(s.__("Reset to Default Skin")),1)]),_:1},8,["loading","disabled"])])],40,St)]),_:1})]),_:1})]),_:1})])]),_:1})}}};export{jt as default}; diff --git a/public/build/default/assets/Chart-99140012.js b/public/build/default/assets/Chart-f075141f.js similarity index 99% rename from public/build/default/assets/Chart-99140012.js rename to public/build/default/assets/Chart-f075141f.js index e6ad209c5..1bad6aed6 100644 --- a/public/build/default/assets/Chart-99140012.js +++ b/public/build/default/assets/Chart-f075141f.js @@ -1,4 +1,4 @@ -import{_ as k}from"./AppLayout-e973448b.js";import{z as Ib,K as Hn,C as A4,ab as Pb,x as d1,a3 as Rb,E as M4,s as pl,A as Eb,L as kb,G as Nb,a2 as Ob,u as md,y as Bb,o as Vb,c as zb,p as Gb}from"./app-10f1fbb6.js";var Fb=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),Hb=function(){function r(){this.browser=new Fb,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),A5=new Hb;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(A5.wxa=!0,A5.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?A5.worker=!0:typeof navigator>"u"?(A5.node=!0,A5.svgSupported=!0):Wb(navigator.userAgent,A5);function Wb(r,e){var t=e.browser,a=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(t.firefox=!0,t.version=a[1]),n&&(t.ie=!0,t.version=n[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}const w0=A5;var eo=12,_d="sans-serif",W9=eo+"px "+_d,$b=20,Ub=100,Yb="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Zb(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",n[u]+":0",a[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function gw(r,e,t){for(var a=t?"invTrans":"trans",n=e[a],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,v=f.left,c=f.top;o.push(v,c),l=l&&i&&v===i[h]&&c===i[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(e.srcCoords=o,e[a]=t?ml(s,o):ml(o,s))}function Ad(r){return r.nodeName.toUpperCase()==="CANVAS"}var yw=/([&<>"'])/g,mw={"&":"&","<":"<",">":">",'"':""","'":"'"};function Lt(r){return r==null?"":(r+"").replace(yw,function(e,t){return mw[t]})}var _w=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$n=[],Sw=w0.browser.firefox&&+w0.browser.version.split(".")[0]<39;function S6(r,e,t,a){return t=t||{},a?Sl(r,e,t):Sw&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):Sl(r,e,t),t}function Sl(r,e,t){if(w0.domSupported&&r.getBoundingClientRect){var a=e.clientX,n=e.clientY;if(Ad(r)){var i=r.getBoundingClientRect();t.zrX=a-i.left,t.zrY=n-i.top;return}else if(_6($n,r,a,n)){t.zrX=$n[0],t.zrY=$n[1];return}}t.zrX=t.zrY=0}function lo(r){return r||window.event}function Zt(r,e,t){if(e=lo(e),e.zrX!=null)return e;var a=e.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&S6(r,o,e,t)}else{S6(r,e,e,t);var i=xw(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&_w.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function xw(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,a=r.deltaY;if(t==null||a==null)return e;var n=Math.abs(a!==0?a:t),i=a>0?-1:a<0?1:t>0?-1:1;return 3*n*i}function x6(r,e,t,a){r.addEventListener(e,t,a)}function bw(r,e,t,a){r.removeEventListener(e,t,a)}var s9=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function xl(r){return r.which===2||r.which===3}var ww=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,a){return this._doTrack(e,t,a),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,a){var n=e.touches;if(n){for(var i={points:[],touches:[],target:t,event:e},o=0,s=n.length;o1&&a&&a.length>1){var i=bl(a)/bl(n);!isFinite(i)&&(i=1),e.pinchScale=i;var o=Tw(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function ae(){return[1,0,0,1,0,0]}function rn(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function uo(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function a9(r,e,t){var a=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Ve(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function u1(r,e,t){var a=e[0],n=e[2],i=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(t),f=Math.cos(t);return r[0]=a*f+o*u,r[1]=-a*u+o*f,r[2]=n*f+s*u,r[3]=-n*u+f*s,r[4]=f*i+u*l,r[5]=f*l-u*i,r}function fo(r,e,t){var a=t[0],n=t[1];return r[0]=e[0]*a,r[1]=e[1]*n,r[2]=e[2]*a,r[3]=e[3]*n,r[4]=e[4]*a,r[5]=e[5]*n,r}function l2(r,e){var t=e[0],a=e[2],n=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=t*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-t*s)*l,r):null}function Cw(r){var e=ae();return uo(e,r),e}var Aw=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,a=this.y-e.y;return Math.sqrt(t*t+a*a)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,a=this.y-e.y;return t*t+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,a=this.y;return this.x=e[0]*t+e[2]*a+e[4],this.y=e[1]*t+e[3]*a+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,a){e.x=t,e.y=a},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,a){e.x=t.x+a.x,e.y=t.y+a.y},r.sub=function(e,t,a){e.x=t.x-a.x,e.y=t.y-a.y},r.scale=function(e,t,a){e.x=t.x*a,e.y=t.y*a},r.scaleAndAdd=function(e,t,a,n){e.x=t.x+a.x*n,e.y=t.y+a.y*n},r.lerp=function(e,t,a,n){var i=1-n;e.x=i*t.x+n*a.x,e.y=i*t.y+n*a.y},r}();const s0=Aw;var L4=Math.min,I4=Math.max,e5=new s0,r5=new s0,a5=new s0,n5=new s0,w2=new s0,T2=new s0,Mw=function(){function r(e,t,a,n){a<0&&(e=e+a,a=-a),n<0&&(t=t+n,n=-n),this.x=e,this.y=t,this.width=a,this.height=n}return r.prototype.union=function(e){var t=L4(e.x,this.x),a=L4(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=I4(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=I4(e.y+e.height,this.y+this.height)-a:this.height=e.height,this.x=t,this.y=a},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,a=e.width/t.width,n=e.height/t.height,i=ae();return Ve(i,i,[-t.x,-t.y]),fo(i,i,[a,n]),Ve(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var a=this,n=a.x,i=a.x+a.width,o=a.y,s=a.y+a.height,l=e.x,u=e.x+e.width,f=e.y,h=e.y+e.height,v=!(ip&&(p=_,dp&&(p=S,y=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,a){if(!a){e!==t&&r.copy(e,t);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var n=a[0],i=a[3],o=a[4],s=a[5];e.x=t.x*n+o,e.y=t.y*i+s,e.width=t.width*n,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}e5.x=a5.x=t.x,e5.y=n5.y=t.y,r5.x=n5.x=t.x+t.width,r5.y=a5.y=t.y+t.height,e5.transform(a),n5.transform(a),r5.transform(a),a5.transform(a),e.x=L4(e5.x,r5.x,a5.x,n5.x),e.y=L4(e5.y,r5.y,a5.y,n5.y);var l=I4(e5.x,r5.x,a5.x,n5.x),u=I4(e5.y,r5.y,a5.y,n5.y);e.width=l-e.x,e.height=u-e.y},r}();const f0=Mw;var Md="silent";function Dw(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:Lw}}function Lw(){s9(this.event)}var Iw=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(ie),C2=function(){function r(e,t){this.x=e,this.y=t}return r}(),Pw=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Yn=new f0(0,0,0,0),Dd=function(r){k(e,r);function e(t,a,n,i,o){var s=r.call(this)||this;return s._hovered=new C2(0,0),s.storage=t,s.painter=a,s.painterRoot=i,s._pointerSize=o,n=n||new Iw,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new hw(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(M(Pw,function(a){t.on&&t.on(a,this[a],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var a=t.zrX,n=t.zrY,i=Ld(this,a,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new C2(a,n):this.findHover(a,n),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var a=t.zrEventControl;a!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),a!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new C2(0,0)},e.prototype.dispatch=function(t,a){var n=this[t];n&&n.call(this,a)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var a=this.proxy;a.setCursor&&a.setCursor(t)},e.prototype.dispatchToElement=function(t,a,n){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+a,s=Dw(a,t,n);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(a,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(a,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(a,s)}))}},e.prototype.findHover=function(t,a,n){var i=this.storage.getDisplayList(),o=new C2(t,a);if(wl(i,o,t,a,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new f0(t-u,a-u,l,l),h=i.length-1;h>=0;h--){var v=i[h];v!==n&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(Yn.copy(v.getBoundingRect()),v.transform&&Yn.applyTransform(v.transform),Yn.intersect(f)&&s.push(v))}if(s.length)for(var c=4,p=Math.PI/12,d=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function Rw(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var a=r,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(e,t))return!1;a.silent&&(n=!0)}var s=a.__hostTarget;a=s||a.parent}return n?Md:!0}return!1}function wl(r,e,t,a,n){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==n&&!o.ignore&&(s=Rw(o,t,a))&&(!e.topTarget&&(e.topTarget=o),s!==Md)){e.target=o;break}}}function Ld(r,e,t){var a=r.painter;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}const Ew=Dd;var Id=32,A2=7;function kw(r){for(var e=0;r>=Id;)e|=r&1,r>>=1;return r+e}function Tl(r,e,t,a){var n=e+1;if(n===t)return 1;if(a(r[n++],r[e])<0){for(;n=0;)n++;return n-e}function Nw(r,e,t){for(t--;e>>1,n(i,r[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function Zn(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+n])>0){for(s=a-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);i(r,e[t+f])>0?o=f+1:l=f}return l}function Xn(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=a-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);i(r,e[t+f])<0?l=f:o=f+1}return l}function Ow(r,e){var t=A2,a,n,i=0;r.length;var o=[];a=[],n=[];function s(c,p){a[i]=c,n[i]=p,i+=1}function l(){for(;i>1;){var c=i-2;if(c>=1&&n[c-1]<=n[c]+n[c+1]||c>=2&&n[c-2]<=n[c]+n[c-1])n[c-1]n[c+1])break;f(c)}}function u(){for(;i>1;){var c=i-2;c>0&&n[c-1]=A2||w>=A2);if(T)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),p===1){for(y=0;y=0;y--)r[x+y]=r[b+y];r[S]=o[_];return}for(var w=t;;){var T=0,C=0,A=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--p===0){A=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){A=!0;break}while((T|C)=0;y--)r[x+y]=r[b+y];if(p===0){A=!0;break}}if(r[S--]=o[_--],--g===1){A=!0;break}if(C=g-Zn(r[m],o,0,g,g-1,e),C!==0){for(S-=C,_-=C,g-=C,x=S+1,b=_+1,y=0;y=A2||C>=A2);if(A)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),g===1){for(S-=p,m-=p,x=S+1,b=m+1,y=p-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_]}else{if(g===0)throw new Error;for(b=S-(g-1),y=0;ys&&(l=s),Cl(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),n-=i,t+=i}while(n!==0);o.forceMergeRuns()}}var Vt=1,tr=2,B1=4,Al=!1;function qn(){Al||(Al=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Ml(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var Bw=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Ml}return r.prototype.traverse=function(e,t){for(var a=0;a0&&(f.__clipPaths=[]),isNaN(f.z)&&(qn(),f.z=0),isNaN(f.z2)&&(qn(),f.z2=0),isNaN(f.zlevel)&&(qn(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,t,a);var v=e.getTextGuideLine();v&&this._updateAndAddDisplayable(v,t,a);var c=e.getTextContent();c&&this._updateAndAddDisplayable(c,t,a)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,a=e.length;t=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}();const Vw=Bw;var Pd;Pd=w0.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};const b6=Pd;var V7={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)))},elasticOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-V7.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?V7.bounceIn(r*2)*.5:V7.bounceOut(r*2-1)*.5+.5}};const Rd=V7;var P4=Math.pow,z9=Math.sqrt,na=1e-8,Ed=1e-4,Dl=z9(3),R4=1/3,Ie=l1(),jt=l1(),Y1=l1();function E9(r){return r>-na&&rna||r<-na}function J0(r,e,t,a,n){var i=1-n;return i*i*(i*r+3*n*e)+n*n*(n*a+3*i*t)}function Ll(r,e,t,a,n){var i=1-n;return 3*(((e-r)*i+2*(t-e)*n)*i+(a-t)*n*n)}function ia(r,e,t,a,n,i){var o=a+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-n,f=s*s-3*o*l,h=s*l-9*o*u,v=l*l-3*s*u,c=0;if(E9(f)&&E9(h))if(E9(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[c++]=p)}else{var d=h*h-4*f*v;if(E9(d)){var g=h/f,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(i[c++]=p),y>=0&&y<=1&&(i[c++]=y)}else if(d>0){var m=z9(d),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-P4(-_,R4):_=P4(_,R4),S<0?S=-P4(-S,R4):S=P4(S,R4);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(i[c++]=p)}else{var b=(2*f*s-3*o*h)/(2*z9(f*f*f)),x=Math.acos(b)/3,w=z9(f),T=Math.cos(x),p=(-s-2*w*T)/(3*o),y=(-s+w*(T+Dl*Math.sin(x)))/(3*o),C=(-s+w*(T-Dl*Math.sin(x)))/(3*o);p>=0&&p<=1&&(i[c++]=p),y>=0&&y<=1&&(i[c++]=y),C>=0&&C<=1&&(i[c++]=C)}}return c}function Nd(r,e,t,a,n){var i=6*t-12*e+6*r,o=9*e+3*a-3*r-9*t,s=3*e-3*r,l=0;if(E9(o)){if(kd(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var f=i*i-4*o*s;if(E9(f))n[0]=-i/(2*o);else if(f>0){var h=z9(f),u=(-i+h)/(2*o),v=(-i-h)/(2*o);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function U9(r,e,t,a,n,i){var o=(e-r)*n+r,s=(t-e)*n+e,l=(a-t)*n+t,u=(s-o)*n+o,f=(l-s)*n+s,h=(f-u)*n+u;i[0]=r,i[1]=o,i[2]=u,i[3]=h,i[4]=h,i[5]=f,i[6]=l,i[7]=a}function Od(r,e,t,a,n,i,o,s,l,u,f){var h,v=.005,c=1/0,p,d,g,y;Ie[0]=l,Ie[1]=u;for(var m=0;m<1;m+=.05)jt[0]=J0(r,t,n,o,m),jt[1]=J0(e,a,i,s,m),g=U5(Ie,jt),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*i*s;if(E9(f)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var h=z9(f),u=(-o+h)/(2*i),v=(-o-h)/(2*i);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function Bd(r,e,t){var a=r+t-2*e;return a===0?.5:(r-e)/a}function Ir(r,e,t,a,n){var i=(e-r)*a+r,o=(t-e)*a+e,s=(o-i)*a+i;n[0]=r,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=t}function Vd(r,e,t,a,n,i,o,s,l){var u,f=.005,h=1/0;Ie[0]=o,Ie[1]=s;for(var v=0;v<1;v+=.05){jt[0]=at(r,t,n,v),jt[1]=at(e,a,i,v);var c=U5(Ie,jt);c=0&&c=1?1:ia(0,a,i,1,l,s)&&J0(0,n,o,1,s[0])}}}var Ww=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Y0,this.ondestroy=e.ondestroy||Y0,this.onrestart=e.onrestart||Y0,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var a=this._life,n=e-this._startTime-this._pausedTime,i=n/a;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=n%a;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=K(e)?e:Rd[e]||ho(e)},r}();const $w=Ww;var zd=function(){function r(e){this.value=e}return r}(),Uw=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new zd(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,a=e.next;t?t.next=a:this.head=a,a?a.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),Yw=function(){function r(e){this._list=new Uw,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var a=this._list,n=this._map,i=null;if(n[e]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete n[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new zd(t),s.key=e,a.insertEntry(s),n[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],a=this._list;if(t!=null)return t!==a.tail&&(a.remove(t),a.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}();const a4=Yw;var Il={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ge(r){return r=Math.round(r),r<0?0:r>255?255:r}function Zw(r){return r=Math.round(r),r<0?0:r>360?360:r}function Pr(r){return r<0?0:r>1?1:r}function Kn(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?ge(parseFloat(e)/100*255):ge(parseInt(e,10))}function Y5(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Pr(parseFloat(e)/100):Pr(parseFloat(e))}function jn(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function k9(r,e,t){return r+(e-r)*t}function Yt(r,e,t,a,n){return r[0]=e,r[1]=t,r[2]=a,r[3]=n,r}function T6(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var Gd=new a4(20),E4=null;function y1(r,e){E4&&T6(E4,e),E4=Gd.put(r,E4||e.slice())}function zt(r,e){if(r){e=e||[];var t=Gd.get(r);if(t)return T6(e,t);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in Il)return T6(e,Il[a]),y1(r,e),e;var n=a.length;if(a.charAt(0)==="#"){if(n===4||n===5){var i=parseInt(a.slice(1,4),16);if(!(i>=0&&i<=4095)){Yt(e,0,0,0,1);return}return Yt(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,n===5?parseInt(a.slice(4),16)/15:1),y1(r,e),e}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){Yt(e,0,0,0,1);return}return Yt(e,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),y1(r,e),e}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===n){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Yt(e,+u[0],+u[1],+u[2],1):Yt(e,0,0,0,1);f=Y5(u.pop());case"rgb":if(u.length>=3)return Yt(e,Kn(u[0]),Kn(u[1]),Kn(u[2]),u.length===3?f:Y5(u[3])),y1(r,e),e;Yt(e,0,0,0,1);return;case"hsla":if(u.length!==4){Yt(e,0,0,0,1);return}return u[3]=Y5(u[3]),C6(u,e),y1(r,e),e;case"hsl":if(u.length!==3){Yt(e,0,0,0,1);return}return C6(u,e),y1(r,e),e;default:return}}Yt(e,0,0,0,1)}}function C6(r,e){var t=(parseFloat(r[0])%360+360)%360/360,a=Y5(r[1]),n=Y5(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return e=e||[],Yt(e,ge(jn(o,i,t+1/3)*255),ge(jn(o,i,t)*255),ge(jn(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function Xw(r){if(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n=Math.min(e,t,a),i=Math.max(e,t,a),o=i-n,s=(i+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+n):u=o/(2-i-n);var f=((i-e)/6+o/2)/o,h=((i-t)/6+o/2)/o,v=((i-a)/6+o/2)/o;e===i?l=v-h:t===i?l=1/3+f-v:a===i&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var c=[l*360,u,s];return r[3]!=null&&c.push(r[3]),c}}function A6(r,e){var t=zt(r);if(t){for(var a=0;a<3;a++)e<0?t[a]=t[a]*(1-e)|0:t[a]=(255-t[a])*e+t[a]|0,t[a]>255?t[a]=255:t[a]<0&&(t[a]=0);return n9(t,t.length===4?"rgba":"rgb")}}function Qn(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=e[n],s=e[i],l=a-n;return t[0]=ge(k9(o[0],s[0],l)),t[1]=ge(k9(o[1],s[1],l)),t[2]=ge(k9(o[2],s[2],l)),t[3]=Pr(k9(o[3],s[3],l)),t}}function qw(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=zt(e[n]),s=zt(e[i]),l=a-n,u=n9([ge(k9(o[0],s[0],l)),ge(k9(o[1],s[1],l)),ge(k9(o[2],s[2],l)),Pr(k9(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}function cr(r,e,t,a){var n=zt(r);if(r)return n=Xw(n),e!=null&&(n[0]=Zw(e)),t!=null&&(n[1]=Y5(t)),a!=null&&(n[2]=Y5(a)),n9(C6(n),"rgba")}function oa(r,e){var t=zt(r);if(t&&e!=null)return t[3]=Pr(e),n9(t,"rgba")}function n9(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function sa(r,e){var t=zt(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var la=Math.round;function Rr(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=zt(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var Pl=1e-4;function N9(r){return r-Pl}function k4(r){return la(r*1e3)/1e3}function M6(r){return la(r*1e4)/1e4}function Kw(r){return"matrix("+k4(r[0])+","+k4(r[1])+","+k4(r[2])+","+k4(r[3])+","+M6(r[4])+","+M6(r[5])+")"}var jw={left:"start",right:"end",center:"middle",middle:"middle"};function Qw(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function Jw(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function tT(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function Fd(r){return r&&!!r.image}function eT(r){return r&&!!r.svgElement}function vo(r){return Fd(r)||eT(r)}function Hd(r){return r.type==="linear"}function Wd(r){return r.type==="radial"}function $d(r){return r&&(r.type==="linear"||r.type==="radial")}function an(r){return"url(#"+r+")"}function Ud(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function Yd(r){var e=r.x||0,t=r.y||0,a=(r.rotation||0)*k7,n=l0(r.scaleX,1),i=l0(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),a&&l.push("rotate("+a+")"),(n!==1||i!==1)&&l.push("scale("+n+","+i+")"),(o||s)&&l.push("skew("+la(o*k7)+"deg, "+la(s*k7)+"deg)"),l.join(" ")}var rT=function(){return w0.hasGlobalWindow&&K(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),D6=Array.prototype.slice;function qe(r,e,t){return(e-r)*t+r}function Jn(r,e,t,a){for(var n=e.length,i=0;ia?e:r,i=Math.min(t,a),o=n[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)a.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=El,l=t;if(gt(t)){var u=oT(t);s=u,(u===1&&!C0(t[0])||u===2&&!C0(t[0][0]))&&(o=!0)}else if(C0(t)&&!Lr(t))s=O4;else if($(t))if(!isNaN(+t))s=O4;else{var f=zt(t);f&&(l=f,s=er)}else if(tn(t)){var h=B({},l);h.colorStops=G(t.colorStops,function(c){return{offset:c.offset,color:zt(c.color)}}),Hd(t)?s=L6:Wd(t)&&(s=I6),l=h}i===0?this.valType=s:(s!==this.valType||s===El)&&(o=!0),this.discrete=this.discrete||o;var v={time:e,value:l,rawValue:t,percent:0};return a&&(v.easing=a,v.easingFunc=K(a)?a:Rd[a]||ho(a)),n.push(v),v},r.prototype.prepare=function(e,t){var a=this.keyframes;this._needsSort&&a.sort(function(d,g){return d.time-g.time});for(var n=this.valType,i=a.length,o=a[i-1],s=this.discrete,l=B4(n),u=kl(n),f=0;f=0&&!(o[f].percent<=t);f--);f=v(f,s-2)}else{for(f=h;ft);f++);f=v(f-1,s-2)}p=o[f+1],c=o[f]}if(c&&p){this._lastFr=f,this._lastFrP=t;var g=p.percent-c.percent,y=g===0?1:v((t-c.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=a?this._additiveValue:u?M2:e[l];if((B4(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?c.rawValue:p.rawValue;else if(B4(i))i===G7?Jn(m,c[n],p[n],y):aT(m,c[n],p[n],y);else if(kl(i)){var _=c[n],S=p[n],b=i===L6;e[l]={type:b?"linear":"radial",x:qe(_.x,S.x,y),y:qe(_.y,S.y,y),colorStops:G(_.colorStops,function(w,T){var C=S.colorStops[T];return{offset:qe(w.offset,C.offset,y),color:z7(Jn([],w.color,C.color,y))}}),global:S.global},b?(e[l].x2=qe(_.x2,S.x2,y),e[l].y2=qe(_.y2,S.y2,y)):e[l].r=qe(_.r,S.r,y)}else if(u)Jn(m,c[n],p[n],y),a||(e[l]=z7(m));else{var x=qe(c[n],p[n],y);a?this._additiveValue=x:e[l]=x}a&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,a=this.propName,n=this._additiveValue;t===O4?e[a]=e[a]+n:t===er?(zt(e[a],M2),N4(M2,M2,n,1),e[a]=z7(M2)):t===G7?N4(e[a],e[a],n,1):t===Zd&&Rl(e[a],e[a],n,1)},r}(),co=function(){function r(e,t,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n){no("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,a){return this.whenWithKeys(e,t,m0(t),a)},r.prototype.whenWithKeys=function(e,t,a,n){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,pr(u),n),this._trackKeys.push(s)}l.addKeyframe(e,pr(t[s]),n)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,a=0;a0)){this._started=1;for(var t=this,a=[],n=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,e[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}();function H1(){return new Date().getTime()}var lT=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,t=t||{},a.stage=t.stage||{},a}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var a=t.getClip();a&&this.addClip(a)},e.prototype.removeClip=function(t){if(t.animation){var a=t.prev,n=t.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var a=t.getClip();a&&this.removeClip(a),t.animation=null},e.prototype.update=function(t){for(var a=H1()-this._pausedTime,n=a-this._time,i=this._head;i;){var o=i.next,s=i.step(a,n);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=a,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function a(){t._running&&(b6(a),!t._paused&&t.update())}b6(a)},e.prototype.start=function(){this._running||(this._time=H1(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=H1(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=H1()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var a=t.next;t.prev=t.next=t.animation=null,t=a}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,a){a=a||{},this.start();var n=new co(t,a.loop);return this.addAnimator(n),n},e}(ie);const uT=lT;var fT=300,ti=w0.domSupported,ei=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=G(r,function(n){var i=n.replace("mouse","pointer");return t.hasOwnProperty(i)?i:n});return{mouse:r,touch:e,pointer:a}}(),Nl={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Ol=!1;function P6(r){var e=r.pointerType;return e==="pen"||e==="touch"}function hT(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function ri(r){r&&(r.zrByTouch=!0)}function vT(r,e){return Zt(r.dom,new cT(r,e),!0)}function Xd(r,e){for(var t=e,a=!1;t&&t.nodeType!==9&&!(a=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return a}var cT=function(){function r(e,t){this.stopPropagation=Y0,this.stopImmediatePropagation=Y0,this.preventDefault=Y0,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),he={mousedown:function(r){r=Zt(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Zt(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Zt(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Zt(this.dom,r);var e=r.toElement||r.relatedTarget;Xd(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Ol=!0,r=Zt(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Ol||(r=Zt(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Zt(this.dom,r),ri(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),he.mousemove.call(this,r),he.mousedown.call(this,r)},touchmove:function(r){r=Zt(this.dom,r),ri(r),this.handler.processGesture(r,"change"),he.mousemove.call(this,r)},touchend:function(r){r=Zt(this.dom,r),ri(r),this.handler.processGesture(r,"end"),he.mouseup.call(this,r),+new Date-+this.__lastTouchMomentzl||r<-zl}var o5=[],m1=[],ni=ae(),ii=Math.abs,_T=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return i5(this.rotation)||i5(this.x)||i5(this.y)||i5(this.scaleX-1)||i5(this.scaleY-1)||i5(this.skewX)||i5(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),a=this.transform;if(!(t||e)){a&&Vl(a);return}a=a||ae(),t?this.getLocalTransform(a):Vl(a),e&&(t?a9(a,e,a):uo(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(o5);var a=o5[0]<0?-1:1,n=o5[1]<0?-1:1,i=((o5[0]-a)*t+a)/o5[0]||0,o=((o5[1]-n)*t+n)/o5[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||ae(),l2(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),i=Math.PI/2+n-Math.atan2(e[3],e[2]);a=Math.sqrt(a)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(a9(m1,e.invTransform,t),t=m1);var a=this.originX,n=this.originY;(a||n)&&(ni[4]=a,ni[5]=n,a9(m1,t,ni),m1[4]-=a,m1[5]-=n,t=m1),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var a=[e,t],n=this.invTransform;return n&&st(a,a,n),a},r.prototype.transformCoordToGlobal=function(e,t){var a=[e,t],n=this.transform;return n&&st(a,a,n),a},r.prototype.getLineScale=function(){var e=this.transform;return e&&ii(e[0]-1)>1e-10&&ii(e[3]-1)>1e-10?Math.sqrt(ii(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){Kd(this,e)},r.getLocalTransform=function(e,t){t=t||[];var a=e.originX||0,n=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,h=e.y,v=e.skewX?Math.tan(e.skewX):0,c=e.skewY?Math.tan(-e.skewY):0;if(a||n||s||l){var p=a+s,d=n+l;t[4]=-p*i-v*d*o,t[5]=-d*o-c*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=c*i,t[2]=v*o,u&&u1(t,t,u),t[4]+=a+f,t[5]+=n+h,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),ze=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Kd(r,e){for(var t=0;t"u"&&typeof self<"u"?A5.worker=!0:typeof navigator>"u"?(A5.node=!0,A5.svgSupported=!0):Wb(navigator.userAgent,A5);function Wb(r,e){var t=e.browser,a=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(t.firefox=!0,t.version=a[1]),n&&(t.ie=!0,t.version=n[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}const w0=A5;var eo=12,_d="sans-serif",W9=eo+"px "+_d,$b=20,Ub=100,Yb="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Zb(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",n[u]+":0",a[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function gw(r,e,t){for(var a=t?"invTrans":"trans",n=e[a],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,v=f.left,c=f.top;o.push(v,c),l=l&&i&&v===i[h]&&c===i[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(e.srcCoords=o,e[a]=t?ml(s,o):ml(o,s))}function Ad(r){return r.nodeName.toUpperCase()==="CANVAS"}var yw=/([&<>"'])/g,mw={"&":"&","<":"<",">":">",'"':""","'":"'"};function Lt(r){return r==null?"":(r+"").replace(yw,function(e,t){return mw[t]})}var _w=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$n=[],Sw=w0.browser.firefox&&+w0.browser.version.split(".")[0]<39;function S6(r,e,t,a){return t=t||{},a?Sl(r,e,t):Sw&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):Sl(r,e,t),t}function Sl(r,e,t){if(w0.domSupported&&r.getBoundingClientRect){var a=e.clientX,n=e.clientY;if(Ad(r)){var i=r.getBoundingClientRect();t.zrX=a-i.left,t.zrY=n-i.top;return}else if(_6($n,r,a,n)){t.zrX=$n[0],t.zrY=$n[1];return}}t.zrX=t.zrY=0}function lo(r){return r||window.event}function Zt(r,e,t){if(e=lo(e),e.zrX!=null)return e;var a=e.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&S6(r,o,e,t)}else{S6(r,e,e,t);var i=xw(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&_w.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function xw(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,a=r.deltaY;if(t==null||a==null)return e;var n=Math.abs(a!==0?a:t),i=a>0?-1:a<0?1:t>0?-1:1;return 3*n*i}function x6(r,e,t,a){r.addEventListener(e,t,a)}function bw(r,e,t,a){r.removeEventListener(e,t,a)}var s9=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function xl(r){return r.which===2||r.which===3}var ww=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,a){return this._doTrack(e,t,a),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,a){var n=e.touches;if(n){for(var i={points:[],touches:[],target:t,event:e},o=0,s=n.length;o1&&a&&a.length>1){var i=bl(a)/bl(n);!isFinite(i)&&(i=1),e.pinchScale=i;var o=Tw(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function ae(){return[1,0,0,1,0,0]}function rn(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function uo(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function a9(r,e,t){var a=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Ve(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function u1(r,e,t){var a=e[0],n=e[2],i=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(t),f=Math.cos(t);return r[0]=a*f+o*u,r[1]=-a*u+o*f,r[2]=n*f+s*u,r[3]=-n*u+f*s,r[4]=f*i+u*l,r[5]=f*l-u*i,r}function fo(r,e,t){var a=t[0],n=t[1];return r[0]=e[0]*a,r[1]=e[1]*n,r[2]=e[2]*a,r[3]=e[3]*n,r[4]=e[4]*a,r[5]=e[5]*n,r}function l2(r,e){var t=e[0],a=e[2],n=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=t*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-t*s)*l,r):null}function Cw(r){var e=ae();return uo(e,r),e}var Aw=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,a=this.y-e.y;return Math.sqrt(t*t+a*a)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,a=this.y-e.y;return t*t+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,a=this.y;return this.x=e[0]*t+e[2]*a+e[4],this.y=e[1]*t+e[3]*a+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,a){e.x=t,e.y=a},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,a){e.x=t.x+a.x,e.y=t.y+a.y},r.sub=function(e,t,a){e.x=t.x-a.x,e.y=t.y-a.y},r.scale=function(e,t,a){e.x=t.x*a,e.y=t.y*a},r.scaleAndAdd=function(e,t,a,n){e.x=t.x+a.x*n,e.y=t.y+a.y*n},r.lerp=function(e,t,a,n){var i=1-n;e.x=i*t.x+n*a.x,e.y=i*t.y+n*a.y},r}();const s0=Aw;var L4=Math.min,I4=Math.max,e5=new s0,r5=new s0,a5=new s0,n5=new s0,w2=new s0,T2=new s0,Mw=function(){function r(e,t,a,n){a<0&&(e=e+a,a=-a),n<0&&(t=t+n,n=-n),this.x=e,this.y=t,this.width=a,this.height=n}return r.prototype.union=function(e){var t=L4(e.x,this.x),a=L4(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=I4(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=I4(e.y+e.height,this.y+this.height)-a:this.height=e.height,this.x=t,this.y=a},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,a=e.width/t.width,n=e.height/t.height,i=ae();return Ve(i,i,[-t.x,-t.y]),fo(i,i,[a,n]),Ve(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var a=this,n=a.x,i=a.x+a.width,o=a.y,s=a.y+a.height,l=e.x,u=e.x+e.width,f=e.y,h=e.y+e.height,v=!(ip&&(p=_,dp&&(p=S,y=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,a){if(!a){e!==t&&r.copy(e,t);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var n=a[0],i=a[3],o=a[4],s=a[5];e.x=t.x*n+o,e.y=t.y*i+s,e.width=t.width*n,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}e5.x=a5.x=t.x,e5.y=n5.y=t.y,r5.x=n5.x=t.x+t.width,r5.y=a5.y=t.y+t.height,e5.transform(a),n5.transform(a),r5.transform(a),a5.transform(a),e.x=L4(e5.x,r5.x,a5.x,n5.x),e.y=L4(e5.y,r5.y,a5.y,n5.y);var l=I4(e5.x,r5.x,a5.x,n5.x),u=I4(e5.y,r5.y,a5.y,n5.y);e.width=l-e.x,e.height=u-e.y},r}();const f0=Mw;var Md="silent";function Dw(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:Lw}}function Lw(){s9(this.event)}var Iw=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(ie),C2=function(){function r(e,t){this.x=e,this.y=t}return r}(),Pw=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Yn=new f0(0,0,0,0),Dd=function(r){k(e,r);function e(t,a,n,i,o){var s=r.call(this)||this;return s._hovered=new C2(0,0),s.storage=t,s.painter=a,s.painterRoot=i,s._pointerSize=o,n=n||new Iw,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new hw(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(M(Pw,function(a){t.on&&t.on(a,this[a],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var a=t.zrX,n=t.zrY,i=Ld(this,a,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new C2(a,n):this.findHover(a,n),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var a=t.zrEventControl;a!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),a!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new C2(0,0)},e.prototype.dispatch=function(t,a){var n=this[t];n&&n.call(this,a)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var a=this.proxy;a.setCursor&&a.setCursor(t)},e.prototype.dispatchToElement=function(t,a,n){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+a,s=Dw(a,t,n);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(a,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(a,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(a,s)}))}},e.prototype.findHover=function(t,a,n){var i=this.storage.getDisplayList(),o=new C2(t,a);if(wl(i,o,t,a,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new f0(t-u,a-u,l,l),h=i.length-1;h>=0;h--){var v=i[h];v!==n&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(Yn.copy(v.getBoundingRect()),v.transform&&Yn.applyTransform(v.transform),Yn.intersect(f)&&s.push(v))}if(s.length)for(var c=4,p=Math.PI/12,d=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function Rw(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var a=r,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(e,t))return!1;a.silent&&(n=!0)}var s=a.__hostTarget;a=s||a.parent}return n?Md:!0}return!1}function wl(r,e,t,a,n){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==n&&!o.ignore&&(s=Rw(o,t,a))&&(!e.topTarget&&(e.topTarget=o),s!==Md)){e.target=o;break}}}function Ld(r,e,t){var a=r.painter;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}const Ew=Dd;var Id=32,A2=7;function kw(r){for(var e=0;r>=Id;)e|=r&1,r>>=1;return r+e}function Tl(r,e,t,a){var n=e+1;if(n===t)return 1;if(a(r[n++],r[e])<0){for(;n=0;)n++;return n-e}function Nw(r,e,t){for(t--;e>>1,n(i,r[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function Zn(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+n])>0){for(s=a-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);i(r,e[t+f])>0?o=f+1:l=f}return l}function Xn(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=a-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);i(r,e[t+f])<0?l=f:o=f+1}return l}function Ow(r,e){var t=A2,a,n,i=0;r.length;var o=[];a=[],n=[];function s(c,p){a[i]=c,n[i]=p,i+=1}function l(){for(;i>1;){var c=i-2;if(c>=1&&n[c-1]<=n[c]+n[c+1]||c>=2&&n[c-2]<=n[c]+n[c-1])n[c-1]n[c+1])break;f(c)}}function u(){for(;i>1;){var c=i-2;c>0&&n[c-1]=A2||w>=A2);if(T)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),p===1){for(y=0;y=0;y--)r[x+y]=r[b+y];r[S]=o[_];return}for(var w=t;;){var T=0,C=0,A=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--p===0){A=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){A=!0;break}while((T|C)=0;y--)r[x+y]=r[b+y];if(p===0){A=!0;break}}if(r[S--]=o[_--],--g===1){A=!0;break}if(C=g-Zn(r[m],o,0,g,g-1,e),C!==0){for(S-=C,_-=C,g-=C,x=S+1,b=_+1,y=0;y=A2||C>=A2);if(A)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),g===1){for(S-=p,m-=p,x=S+1,b=m+1,y=p-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_]}else{if(g===0)throw new Error;for(b=S-(g-1),y=0;ys&&(l=s),Cl(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),n-=i,t+=i}while(n!==0);o.forceMergeRuns()}}var Vt=1,tr=2,B1=4,Al=!1;function qn(){Al||(Al=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Ml(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var Bw=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Ml}return r.prototype.traverse=function(e,t){for(var a=0;a0&&(f.__clipPaths=[]),isNaN(f.z)&&(qn(),f.z=0),isNaN(f.z2)&&(qn(),f.z2=0),isNaN(f.zlevel)&&(qn(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,t,a);var v=e.getTextGuideLine();v&&this._updateAndAddDisplayable(v,t,a);var c=e.getTextContent();c&&this._updateAndAddDisplayable(c,t,a)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,a=e.length;t=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}();const Vw=Bw;var Pd;Pd=w0.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};const b6=Pd;var V7={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)))},elasticOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-V7.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?V7.bounceIn(r*2)*.5:V7.bounceOut(r*2-1)*.5+.5}};const Rd=V7;var P4=Math.pow,z9=Math.sqrt,na=1e-8,Ed=1e-4,Dl=z9(3),R4=1/3,Ie=l1(),jt=l1(),Y1=l1();function E9(r){return r>-na&&rna||r<-na}function J0(r,e,t,a,n){var i=1-n;return i*i*(i*r+3*n*e)+n*n*(n*a+3*i*t)}function Ll(r,e,t,a,n){var i=1-n;return 3*(((e-r)*i+2*(t-e)*n)*i+(a-t)*n*n)}function ia(r,e,t,a,n,i){var o=a+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-n,f=s*s-3*o*l,h=s*l-9*o*u,v=l*l-3*s*u,c=0;if(E9(f)&&E9(h))if(E9(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[c++]=p)}else{var d=h*h-4*f*v;if(E9(d)){var g=h/f,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(i[c++]=p),y>=0&&y<=1&&(i[c++]=y)}else if(d>0){var m=z9(d),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-P4(-_,R4):_=P4(_,R4),S<0?S=-P4(-S,R4):S=P4(S,R4);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(i[c++]=p)}else{var b=(2*f*s-3*o*h)/(2*z9(f*f*f)),x=Math.acos(b)/3,w=z9(f),T=Math.cos(x),p=(-s-2*w*T)/(3*o),y=(-s+w*(T+Dl*Math.sin(x)))/(3*o),C=(-s+w*(T-Dl*Math.sin(x)))/(3*o);p>=0&&p<=1&&(i[c++]=p),y>=0&&y<=1&&(i[c++]=y),C>=0&&C<=1&&(i[c++]=C)}}return c}function Nd(r,e,t,a,n){var i=6*t-12*e+6*r,o=9*e+3*a-3*r-9*t,s=3*e-3*r,l=0;if(E9(o)){if(kd(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var f=i*i-4*o*s;if(E9(f))n[0]=-i/(2*o);else if(f>0){var h=z9(f),u=(-i+h)/(2*o),v=(-i-h)/(2*o);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function U9(r,e,t,a,n,i){var o=(e-r)*n+r,s=(t-e)*n+e,l=(a-t)*n+t,u=(s-o)*n+o,f=(l-s)*n+s,h=(f-u)*n+u;i[0]=r,i[1]=o,i[2]=u,i[3]=h,i[4]=h,i[5]=f,i[6]=l,i[7]=a}function Od(r,e,t,a,n,i,o,s,l,u,f){var h,v=.005,c=1/0,p,d,g,y;Ie[0]=l,Ie[1]=u;for(var m=0;m<1;m+=.05)jt[0]=J0(r,t,n,o,m),jt[1]=J0(e,a,i,s,m),g=U5(Ie,jt),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*i*s;if(E9(f)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var h=z9(f),u=(-o+h)/(2*i),v=(-o-h)/(2*i);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function Bd(r,e,t){var a=r+t-2*e;return a===0?.5:(r-e)/a}function Ir(r,e,t,a,n){var i=(e-r)*a+r,o=(t-e)*a+e,s=(o-i)*a+i;n[0]=r,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=t}function Vd(r,e,t,a,n,i,o,s,l){var u,f=.005,h=1/0;Ie[0]=o,Ie[1]=s;for(var v=0;v<1;v+=.05){jt[0]=at(r,t,n,v),jt[1]=at(e,a,i,v);var c=U5(Ie,jt);c=0&&c=1?1:ia(0,a,i,1,l,s)&&J0(0,n,o,1,s[0])}}}var Ww=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Y0,this.ondestroy=e.ondestroy||Y0,this.onrestart=e.onrestart||Y0,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var a=this._life,n=e-this._startTime-this._pausedTime,i=n/a;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=n%a;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=K(e)?e:Rd[e]||ho(e)},r}();const $w=Ww;var zd=function(){function r(e){this.value=e}return r}(),Uw=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new zd(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,a=e.next;t?t.next=a:this.head=a,a?a.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),Yw=function(){function r(e){this._list=new Uw,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var a=this._list,n=this._map,i=null;if(n[e]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete n[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new zd(t),s.key=e,a.insertEntry(s),n[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],a=this._list;if(t!=null)return t!==a.tail&&(a.remove(t),a.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}();const a4=Yw;var Il={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ge(r){return r=Math.round(r),r<0?0:r>255?255:r}function Zw(r){return r=Math.round(r),r<0?0:r>360?360:r}function Pr(r){return r<0?0:r>1?1:r}function Kn(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?ge(parseFloat(e)/100*255):ge(parseInt(e,10))}function Y5(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Pr(parseFloat(e)/100):Pr(parseFloat(e))}function jn(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function k9(r,e,t){return r+(e-r)*t}function Yt(r,e,t,a,n){return r[0]=e,r[1]=t,r[2]=a,r[3]=n,r}function T6(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var Gd=new a4(20),E4=null;function y1(r,e){E4&&T6(E4,e),E4=Gd.put(r,E4||e.slice())}function zt(r,e){if(r){e=e||[];var t=Gd.get(r);if(t)return T6(e,t);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in Il)return T6(e,Il[a]),y1(r,e),e;var n=a.length;if(a.charAt(0)==="#"){if(n===4||n===5){var i=parseInt(a.slice(1,4),16);if(!(i>=0&&i<=4095)){Yt(e,0,0,0,1);return}return Yt(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,n===5?parseInt(a.slice(4),16)/15:1),y1(r,e),e}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){Yt(e,0,0,0,1);return}return Yt(e,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),y1(r,e),e}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===n){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Yt(e,+u[0],+u[1],+u[2],1):Yt(e,0,0,0,1);f=Y5(u.pop());case"rgb":if(u.length>=3)return Yt(e,Kn(u[0]),Kn(u[1]),Kn(u[2]),u.length===3?f:Y5(u[3])),y1(r,e),e;Yt(e,0,0,0,1);return;case"hsla":if(u.length!==4){Yt(e,0,0,0,1);return}return u[3]=Y5(u[3]),C6(u,e),y1(r,e),e;case"hsl":if(u.length!==3){Yt(e,0,0,0,1);return}return C6(u,e),y1(r,e),e;default:return}}Yt(e,0,0,0,1)}}function C6(r,e){var t=(parseFloat(r[0])%360+360)%360/360,a=Y5(r[1]),n=Y5(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return e=e||[],Yt(e,ge(jn(o,i,t+1/3)*255),ge(jn(o,i,t)*255),ge(jn(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function Xw(r){if(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n=Math.min(e,t,a),i=Math.max(e,t,a),o=i-n,s=(i+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+n):u=o/(2-i-n);var f=((i-e)/6+o/2)/o,h=((i-t)/6+o/2)/o,v=((i-a)/6+o/2)/o;e===i?l=v-h:t===i?l=1/3+f-v:a===i&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var c=[l*360,u,s];return r[3]!=null&&c.push(r[3]),c}}function A6(r,e){var t=zt(r);if(t){for(var a=0;a<3;a++)e<0?t[a]=t[a]*(1-e)|0:t[a]=(255-t[a])*e+t[a]|0,t[a]>255?t[a]=255:t[a]<0&&(t[a]=0);return n9(t,t.length===4?"rgba":"rgb")}}function Qn(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=e[n],s=e[i],l=a-n;return t[0]=ge(k9(o[0],s[0],l)),t[1]=ge(k9(o[1],s[1],l)),t[2]=ge(k9(o[2],s[2],l)),t[3]=Pr(k9(o[3],s[3],l)),t}}function qw(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=zt(e[n]),s=zt(e[i]),l=a-n,u=n9([ge(k9(o[0],s[0],l)),ge(k9(o[1],s[1],l)),ge(k9(o[2],s[2],l)),Pr(k9(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}function cr(r,e,t,a){var n=zt(r);if(r)return n=Xw(n),e!=null&&(n[0]=Zw(e)),t!=null&&(n[1]=Y5(t)),a!=null&&(n[2]=Y5(a)),n9(C6(n),"rgba")}function oa(r,e){var t=zt(r);if(t&&e!=null)return t[3]=Pr(e),n9(t,"rgba")}function n9(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function sa(r,e){var t=zt(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var la=Math.round;function Rr(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=zt(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var Pl=1e-4;function N9(r){return r-Pl}function k4(r){return la(r*1e3)/1e3}function M6(r){return la(r*1e4)/1e4}function Kw(r){return"matrix("+k4(r[0])+","+k4(r[1])+","+k4(r[2])+","+k4(r[3])+","+M6(r[4])+","+M6(r[5])+")"}var jw={left:"start",right:"end",center:"middle",middle:"middle"};function Qw(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function Jw(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function tT(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function Fd(r){return r&&!!r.image}function eT(r){return r&&!!r.svgElement}function vo(r){return Fd(r)||eT(r)}function Hd(r){return r.type==="linear"}function Wd(r){return r.type==="radial"}function $d(r){return r&&(r.type==="linear"||r.type==="radial")}function an(r){return"url(#"+r+")"}function Ud(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function Yd(r){var e=r.x||0,t=r.y||0,a=(r.rotation||0)*k7,n=l0(r.scaleX,1),i=l0(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),a&&l.push("rotate("+a+")"),(n!==1||i!==1)&&l.push("scale("+n+","+i+")"),(o||s)&&l.push("skew("+la(o*k7)+"deg, "+la(s*k7)+"deg)"),l.join(" ")}var rT=function(){return w0.hasGlobalWindow&&K(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),D6=Array.prototype.slice;function qe(r,e,t){return(e-r)*t+r}function Jn(r,e,t,a){for(var n=e.length,i=0;ia?e:r,i=Math.min(t,a),o=n[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)a.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=El,l=t;if(gt(t)){var u=oT(t);s=u,(u===1&&!C0(t[0])||u===2&&!C0(t[0][0]))&&(o=!0)}else if(C0(t)&&!Lr(t))s=O4;else if($(t))if(!isNaN(+t))s=O4;else{var f=zt(t);f&&(l=f,s=er)}else if(tn(t)){var h=B({},l);h.colorStops=G(t.colorStops,function(c){return{offset:c.offset,color:zt(c.color)}}),Hd(t)?s=L6:Wd(t)&&(s=I6),l=h}i===0?this.valType=s:(s!==this.valType||s===El)&&(o=!0),this.discrete=this.discrete||o;var v={time:e,value:l,rawValue:t,percent:0};return a&&(v.easing=a,v.easingFunc=K(a)?a:Rd[a]||ho(a)),n.push(v),v},r.prototype.prepare=function(e,t){var a=this.keyframes;this._needsSort&&a.sort(function(d,g){return d.time-g.time});for(var n=this.valType,i=a.length,o=a[i-1],s=this.discrete,l=B4(n),u=kl(n),f=0;f=0&&!(o[f].percent<=t);f--);f=v(f,s-2)}else{for(f=h;ft);f++);f=v(f-1,s-2)}p=o[f+1],c=o[f]}if(c&&p){this._lastFr=f,this._lastFrP=t;var g=p.percent-c.percent,y=g===0?1:v((t-c.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=a?this._additiveValue:u?M2:e[l];if((B4(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?c.rawValue:p.rawValue;else if(B4(i))i===G7?Jn(m,c[n],p[n],y):aT(m,c[n],p[n],y);else if(kl(i)){var _=c[n],S=p[n],b=i===L6;e[l]={type:b?"linear":"radial",x:qe(_.x,S.x,y),y:qe(_.y,S.y,y),colorStops:G(_.colorStops,function(w,T){var C=S.colorStops[T];return{offset:qe(w.offset,C.offset,y),color:z7(Jn([],w.color,C.color,y))}}),global:S.global},b?(e[l].x2=qe(_.x2,S.x2,y),e[l].y2=qe(_.y2,S.y2,y)):e[l].r=qe(_.r,S.r,y)}else if(u)Jn(m,c[n],p[n],y),a||(e[l]=z7(m));else{var x=qe(c[n],p[n],y);a?this._additiveValue=x:e[l]=x}a&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,a=this.propName,n=this._additiveValue;t===O4?e[a]=e[a]+n:t===er?(zt(e[a],M2),N4(M2,M2,n,1),e[a]=z7(M2)):t===G7?N4(e[a],e[a],n,1):t===Zd&&Rl(e[a],e[a],n,1)},r}(),co=function(){function r(e,t,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n){no("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,a){return this.whenWithKeys(e,t,m0(t),a)},r.prototype.whenWithKeys=function(e,t,a,n){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,pr(u),n),this._trackKeys.push(s)}l.addKeyframe(e,pr(t[s]),n)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,a=0;a0)){this._started=1;for(var t=this,a=[],n=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,e[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}();function H1(){return new Date().getTime()}var lT=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,t=t||{},a.stage=t.stage||{},a}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var a=t.getClip();a&&this.addClip(a)},e.prototype.removeClip=function(t){if(t.animation){var a=t.prev,n=t.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var a=t.getClip();a&&this.removeClip(a),t.animation=null},e.prototype.update=function(t){for(var a=H1()-this._pausedTime,n=a-this._time,i=this._head;i;){var o=i.next,s=i.step(a,n);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=a,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function a(){t._running&&(b6(a),!t._paused&&t.update())}b6(a)},e.prototype.start=function(){this._running||(this._time=H1(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=H1(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=H1()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var a=t.next;t.prev=t.next=t.animation=null,t=a}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,a){a=a||{},this.start();var n=new co(t,a.loop);return this.addAnimator(n),n},e}(ie);const uT=lT;var fT=300,ti=w0.domSupported,ei=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=G(r,function(n){var i=n.replace("mouse","pointer");return t.hasOwnProperty(i)?i:n});return{mouse:r,touch:e,pointer:a}}(),Nl={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Ol=!1;function P6(r){var e=r.pointerType;return e==="pen"||e==="touch"}function hT(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function ri(r){r&&(r.zrByTouch=!0)}function vT(r,e){return Zt(r.dom,new cT(r,e),!0)}function Xd(r,e){for(var t=e,a=!1;t&&t.nodeType!==9&&!(a=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return a}var cT=function(){function r(e,t){this.stopPropagation=Y0,this.stopImmediatePropagation=Y0,this.preventDefault=Y0,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),he={mousedown:function(r){r=Zt(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Zt(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Zt(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Zt(this.dom,r);var e=r.toElement||r.relatedTarget;Xd(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Ol=!0,r=Zt(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Ol||(r=Zt(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Zt(this.dom,r),ri(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),he.mousemove.call(this,r),he.mousedown.call(this,r)},touchmove:function(r){r=Zt(this.dom,r),ri(r),this.handler.processGesture(r,"change"),he.mousemove.call(this,r)},touchend:function(r){r=Zt(this.dom,r),ri(r),this.handler.processGesture(r,"end"),he.mouseup.call(this,r),+new Date-+this.__lastTouchMomentzl||r<-zl}var o5=[],m1=[],ni=ae(),ii=Math.abs,_T=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return i5(this.rotation)||i5(this.x)||i5(this.y)||i5(this.scaleX-1)||i5(this.scaleY-1)||i5(this.skewX)||i5(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),a=this.transform;if(!(t||e)){a&&Vl(a);return}a=a||ae(),t?this.getLocalTransform(a):Vl(a),e&&(t?a9(a,e,a):uo(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(o5);var a=o5[0]<0?-1:1,n=o5[1]<0?-1:1,i=((o5[0]-a)*t+a)/o5[0]||0,o=((o5[1]-n)*t+n)/o5[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||ae(),l2(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),i=Math.PI/2+n-Math.atan2(e[3],e[2]);a=Math.sqrt(a)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(a9(m1,e.invTransform,t),t=m1);var a=this.originX,n=this.originY;(a||n)&&(ni[4]=a,ni[5]=n,a9(m1,t,ni),m1[4]-=a,m1[5]-=n,t=m1),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var a=[e,t],n=this.invTransform;return n&&st(a,a,n),a},r.prototype.transformCoordToGlobal=function(e,t){var a=[e,t],n=this.transform;return n&&st(a,a,n),a},r.prototype.getLineScale=function(){var e=this.transform;return e&&ii(e[0]-1)>1e-10&&ii(e[3]-1)>1e-10?Math.sqrt(ii(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){Kd(this,e)},r.getLocalTransform=function(e,t){t=t||[];var a=e.originX||0,n=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,h=e.y,v=e.skewX?Math.tan(e.skewX):0,c=e.skewY?Math.tan(-e.skewY):0;if(a||n||s||l){var p=a+s,d=n+l;t[4]=-p*i-v*d*o,t[5]=-d*o-c*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=c*i,t[2]=v*o,u&&u1(t,t,u),t[4]+=a+f,t[5]+=n+h,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),ze=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Kd(r,e){for(var t=0;t=0?parseFloat(r)/100*e:parseFloat(r):r}function fa(r,e,t){var a=e.position||"inside",n=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,f="left",h="top";if(a instanceof Array)l+=me(a[0],t.width),u+=me(a[1],t.height),f=null,h=null;else switch(a){case"left":l-=n,u+=s,f="right",h="middle";break;case"right":l+=n+o,u+=s,h="middle";break;case"top":l+=o/2,u-=n,f="center",h="bottom";break;case"bottom":l+=o/2,u+=i+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=n,u+=s,h="middle";break;case"insideRight":l+=o-n,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=i-n,f="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=i-n,h="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var oi="__zr_normal__",si=ze.concat(["ignore"]),ST=Be(ze,function(r,e){return r[e]=!0,r},{ignore:!1}),_1={},xT=new f0(0,0,0,0),po=function(){function r(e){this.id=bd(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,a){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;if(i.copyTransform(t),a.position!=null){var f=xT;a.layoutRect?f.copy(a.layoutRect):f.copy(this.getBoundingRect()),n||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(_1,a,f):fa(_1,a,f),i.x=_1.x,i.y=_1.y,o=_1.align,s=_1.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var v=void 0,c=void 0;h==="center"?(v=f.width*.5,c=f.height*.5):(v=me(h[0],f.width),c=me(h[1],f.height)),u=!0,i.originX=-i.x+v+(n?0:f.x),i.originY=-i.y+c+(n?0:f.y)}}a.rotation!=null&&(i.rotation=a.rotation);var p=a.offset;p&&(i.x+=p[0],i.y+=p[1],u||(i.originX=-p[0],i.originY=-p[1]));var d=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;d&&this.canBeInsideText()?(y=a.insideFill,m=a.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=a.outsideFill,m=a.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=Vt,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?N6:k6},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),a=typeof t=="string"&&zt(t);a||(a=[255,255,255,1]);for(var n=a[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*n+(i?0:255)*(1-n);return a[3]=1,n9(a,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},B(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(t0(e))for(var a=e,n=m0(a),i=0;i0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(oi,!1,e)},r.prototype.useState=function(e,t,a,n){var i=e===oi,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(v0(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){no("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!a&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,v=this._textGuide;return h&&h.useState(e,t,a,f),v&&v.useState(e,t,a,f),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Vt),u}}},r.prototype.useStates=function(e,t,a){if(!e.length)this.clearStates();else{var n=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l0,p);var d=this._textContent,g=this._textGuide;d&&d.useStates(e,t,v),g&&g.useStates(e,t,v),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Vt)}},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var a=this.currentStates.slice();a.splice(t,1),this.useStates(a)}},r.prototype.replaceState=function(e,t,a){var n=this.currentStates.slice(),i=v0(n,e),o=v0(n,t)>=0;i>=0?o?n.splice(i,1):n[i]=t:a&&!o&&n.push(t),this.useStates(n)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},a,n=0;n=0&&i.splice(o,1)}),this.animators.push(e),a&&a.animation.addAnimator(e),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var a=this.animators,n=a.length,i=[],o=0;o0&&t.during&&i[0].during(function(p,d){t.during(d)});for(var v=0;v0||n.force&&!o.length){var T=void 0,C=void 0,A=void 0;if(s){C={},v&&(T={});for(var S=0;S<_;S++){var y=d[S];C[y]=t[y],v?T[y]=a[y]:t[y]=a[y]}}else if(v){A={};for(var S=0;S<_;S++){var y=d[S];A[y]=pr(t[y]),wT(t,a,y)}}var b=new co(t,!1,!1,h?I0(p,function(L){return L.targetName===e}):null);b.targetName=e,n.scope&&(b.scope=n.scope),v&&T&&b.whenWithKeys(0,T,d),A&&b.whenWithKeys(0,A,d),b.whenWithKeys(u??500,s?C:a,d).delay(f||0),r.addAnimator(b,e),o.push(b)}}const Qd=po;var Jd=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var a=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,a){var n=v0(this._children,t);return n>=0&&this.replaceAt(a,n),this},e.prototype.replaceAt=function(t,a){var n=this._children,i=n[a];if(t&&t!==this&&t.parent!==this&&t!==i){n[a]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var a=this.__zr;a&&a!==t.__zr&&t.addSelfToZr(a),a&&a.refresh()},e.prototype.remove=function(t){var a=this.__zr,n=this._children,i=v0(n,t);return i<0?this:(n.splice(i,1),t.parent=null,a&&t.removeSelfFromZr(a),a&&a.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,a=this.__zr,n=0;n{const p=h("tippy");return c(),v(w,null,{default:l(()=>[r(x,{title:o(t)("Chatlog - ServerIntel")},null,8,["title"]),s("div",C,[r(D,{title:o(t)("Chatlog"),"server-list":i.serverList,filters:i.filters},null,8,["title","server-list","filters"]),s("div",null,[r(T,{class:"bg-white rounded shadow dark:bg-gray-800",header:y,data:i.chatHistory,filters:i.filters},{default:l(({item:e})=>[s("td",j,a(e.id),1),s("td",H,[s("div",N,[s("p",{innerHTML:e.data},null,8,S),e.causer_uuid?(c(),n("p",$,a(o(t)("Causer"))+": "+a(e.causer_uuid)+" ("+a(e.causer_username)+") ",1)):g("",!0)])]),r(_,null,{default:l(()=>[d(a(e.type),1)]),_:2},1024),r(_,null,{default:l(()=>[u((c(),n("span",{title:`Server ID: ${e.server.id}`},[d(a(e.server.name),1)],8,B)),[[p]])]),_:2},1024),r(_,null,{default:l(()=>[u((c(),n("span",{title:o(f)(e.created_at)},[d(a(o(m)(e.created_at)),1)],8,I)),[[p]])]),_:2},1024)]),_:1},8,["data","filters"])])])]),_:1})}}};export{Y as default}; +import{q as h,o as c,c as v,w as l,k as b,b as r,u as o,_ as x,a as s,t as a,d as n,e as g,f as d,j as u}from"./app-d03084a3.js";import{u as k}from"./AppLayout-180f66c1.js";import{_ as w}from"./AdminLayout-2ffdcf09.js";import{_ as D}from"./ServerIntelServerSelector-f57127e6.js";import{D as _,_ as T}from"./DtRowItem-d6e395fe.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Icon-09cf2959.js";import"./useAuthorizable-db63a772.js";import"./use-resolve-button-type-d5bb55c5.js";import"./open-closed-db295aa4.js";import"./CloudArrowDownIcon-c01292c4.js";import"./index-dedae3a2.js";import"./XSelect-e6b58960.js";import"./vue-multiselect.esm-733a639e.js";import"./XMarkIcon-63f73fcf.js";import"./hidden-44eecd86.js";const C={class:"p-4 mx-auto space-y-4 px-10"},j={class:"px-4 py-4 text-sm font-medium text-gray-800 whitespace-nowrap dark:text-gray-200"},H={class:"px-4 invert dark:invert-0"},N={class:"text-sm text-gray-200"},S=["innerHTML"],$={key:0,class:"text-xs text-gray-500 italic"},B=["title"],I=["title"],Y={__name:"Chatlog",props:{serverList:{type:Object},filters:{type:Object},chatHistory:{type:Object}},setup(i){const{__:t}=b(),{formatTimeAgoToNow:m,formatToDayDateString:f}=k(),y=[{key:"id",label:t("ID"),sortable:!0,class:"text-left"},{key:"data",label:t("Data"),sortable:!1},{key:"type",label:t("Type"),sortable:!0,filterable:{type:"multiselect",options:["player-leave","server-broadcast","join-join","player-chat"]}},{key:"server_id",label:t("Server"),sortable:!0},{key:"created_at",label:t("Created"),sortable:!0}];return(L,V)=>{const p=h("tippy");return c(),v(w,null,{default:l(()=>[r(x,{title:o(t)("Chatlog - ServerIntel")},null,8,["title"]),s("div",C,[r(D,{title:o(t)("Chatlog"),"server-list":i.serverList,filters:i.filters},null,8,["title","server-list","filters"]),s("div",null,[r(T,{class:"bg-white rounded shadow dark:bg-gray-800",header:y,data:i.chatHistory,filters:i.filters},{default:l(({item:e})=>[s("td",j,a(e.id),1),s("td",H,[s("div",N,[s("p",{innerHTML:e.data},null,8,S),e.causer_uuid?(c(),n("p",$,a(o(t)("Causer"))+": "+a(e.causer_uuid)+" ("+a(e.causer_username)+") ",1)):g("",!0)])]),r(_,null,{default:l(()=>[d(a(e.type),1)]),_:2},1024),r(_,null,{default:l(()=>[u((c(),n("span",{title:`Server ID: ${e.server.id}`},[d(a(e.server.name),1)],8,B)),[[p]])]),_:2},1024),r(_,null,{default:l(()=>[u((c(),n("span",{title:o(f)(e.created_at)},[d(a(o(m)(e.created_at)),1)],8,I)),[[p]])]),_:2},1024)]),_:1},8,["data","filters"])])])]),_:1})}}};export{Y as default}; diff --git a/public/build/default/assets/Checkbox-53958c8e.js b/public/build/default/assets/Checkbox-6f533c3f.js similarity index 89% rename from public/build/default/assets/Checkbox-53958c8e.js rename to public/build/default/assets/Checkbox-6f533c3f.js index bf0269ee3..cfeb0ad26 100644 --- a/public/build/default/assets/Checkbox-53958c8e.js +++ b/public/build/default/assets/Checkbox-6f533c3f.js @@ -1 +1 @@ -import{x as s,j as r,Q as n,o as d,d as i}from"./app-10f1fbb6.js";const p=["value"],k={__name:"Checkbox",props:{checked:{type:[Array,Boolean],default:!1},value:{type:String,default:null}},emits:["update:checked"],setup(e,{emit:a}){const l=e,t=s({get(){return l.checked},set(o){a("update:checked",o)}});return(o,c)=>r((d(),i("input",{"onUpdate:modelValue":c[0]||(c[0]=u=>t.value=u),type:"checkbox",value:e.value,class:"rounded border-gray-300 text-light-blue-500 shadow-sm focus:border-light-blue-300 focus:ring focus:ring-light-blue-200 focus:ring-opacity-50"},null,8,p)),[[n,t.value]])}};export{k as _}; +import{x as s,j as r,Q as n,o as d,d as i}from"./app-d03084a3.js";const p=["value"],k={__name:"Checkbox",props:{checked:{type:[Array,Boolean],default:!1},value:{type:String,default:null}},emits:["update:checked"],setup(e,{emit:a}){const l=e,t=s({get(){return l.checked},set(o){a("update:checked",o)}});return(o,c)=>r((d(),i("input",{"onUpdate:modelValue":c[0]||(c[0]=u=>t.value=u),type:"checkbox",value:e.value,class:"rounded border-gray-300 text-light-blue-500 shadow-sm focus:border-light-blue-300 focus:ring focus:ring-light-blue-200 focus:ring-opacity-50"},null,8,p)),[[n,t.value]])}};export{k as _}; diff --git a/public/build/default/assets/CloudArrowDownIcon-01098e33.js b/public/build/default/assets/CloudArrowDownIcon-c01292c4.js similarity index 85% rename from public/build/default/assets/CloudArrowDownIcon-01098e33.js rename to public/build/default/assets/CloudArrowDownIcon-c01292c4.js index f8cba2195..db7c433a4 100644 --- a/public/build/default/assets/CloudArrowDownIcon-01098e33.js +++ b/public/build/default/assets/CloudArrowDownIcon-c01292c4.js @@ -1 +1 @@ -import{o as e,d as r,a as o}from"./app-10f1fbb6.js";function s(t,n){return e(),r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9.75v6.75m0 0l-3-3m3 3l3-3m-8.25 6a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})])}export{s as r}; +import{o as e,d as r,a as o}from"./app-d03084a3.js";function s(t,n){return e(),r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9.75v6.75m0 0l-3-3m3 3l3-3m-8.25 6a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})])}export{s as r}; diff --git a/public/build/default/assets/Comments-0a69730d.js b/public/build/default/assets/Comments-dbad18a7.js similarity index 96% rename from public/build/default/assets/Comments-0a69730d.js rename to public/build/default/assets/Comments-dbad18a7.js index 7523f3018..0810f24b3 100644 --- a/public/build/default/assets/Comments-0a69730d.js +++ b/public/build/default/assets/Comments-dbad18a7.js @@ -1 +1 @@ -import{I as v}from"./Icon-07002ff2.js";import{_ as w}from"./UserDisplayname-74c196f9.js";import{u as C}from"./AppLayout-e973448b.js";import{l as h,q as g,o as r,d as a,e as i,j as d,m as M,a as s,t as c,F as T,g as B,n as D,b as f,w as y,f as L,c as N,i as V,v as A,a6 as S}from"./app-10f1fbb6.js";import{_ as j}from"./_plugin-vue_export-helper-c27b6911.js";const H={components:{Icon:v,UserDisplayname:w},props:{commentable:Object,commentableType:String},setup(){const{purifyAndLinkifyText:e,formatTimeAgoToNow:n,formatToDayDateString:m}=C();return{purifyAndLinkifyText:e,formatTimeAgoToNow:n,formatToDayDateString:m}},data(){return{comments:null,loading:!0,loadingMore:!1,commentBody:"",submitting:!1,bodyerror:null,showLoadMoreCommentsButton:!0}},created(){axios.get(route(`${this.commentableType}.comment.index`,this.commentable.id)).then(e=>{this.comments=e.data,this.comments.data.reverse()}).finally(()=>{this.loading=!1})},methods:{loadMoreComments(){return this.comments.next_page_url?(this.loadingMore=!0,axios(this.comments.next_page_url).then(e=>{this.comments={...e.data,data:[...e.data.data.reverse(),...this.comments.data]}}).finally(()=>this.loadingMore=!1)):(this.showLoadMoreCommentsButton=!1,Promise.resolve())},submitComment(){this.submitting||(this.submitting=!0,this.bodyerror=null,axios.post(route(`${this.commentableType}.comment.store`,this.commentable.id),{comment:this.commentBody}).then(e=>{e.status===200&&(this.comments.data.push(e.data.data),this.commentBody="")}).catch(e=>{e.response.status===422?this.bodyerror=e.response.data.errors.comment[0]:this.bodyerror=e.response.data.message}).finally(()=>{this.submitting=!1,this.$nextTick(()=>{this.$refs.comment.focus()})}))}}},z={class:"flex flex-col"},F={key:0,class:"mt-0.5 dark:border-cool-gray-700"},I={key:1,class:"flex justify-center p-4"},K=s("svg",{class:"w-5 h-5 mr-3 -ml-1 animate-spin text-light-blue-600 dark:text-light-blue-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[s("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),s("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),U=[K],q={class:"flex mt-3"},E={key:2,class:"flex justify-center pt-4 text-gray-500 dark:text-gray-400 text-sm"},O={key:3,class:"flex flex-col mt-3 space-y-2"},P={class:"items-start order-2 max-w-lg mx-2 space-y-2 text-sm"},W=["title"],G=["innerHTML"],J=["src"],Q={key:4,class:"flex mt-1"},R=["src"],X={class:"flex-grow order-2 mx-2 text-sm"},Y=["disabled","placeholder"],Z={key:0,class:"ml-2 text-xs text-red-500"};function $(e,n,m,u,t,l){const _=h("user-displayname"),p=h("inertia-link"),b=h("icon"),x=g("tippy"),k=g("confirm");return r(),a("div",z,[m.commentableType=="post"?(r(),a("hr",F)):i("",!0),t.loading||t.loadingMore?(r(),a("div",I,U)):i("",!0),d(s("div",q,[s("button",{class:"text-sm font-semibold text-gray-500 dark:text-gray-400 focus:outline-none hover:underline",onClick:n[0]||(n[0]=(...o)=>l.loadMoreComments&&l.loadMoreComments(...o))},c(e.__("View previous comments")),1)],512),[[M,!t.loadingMore&&!t.loading&&t.showLoadMoreCommentsButton&&t.comments&&t.comments.next_page_url]]),!t.loading&&t.comments&&t.comments.data.length===0?(r(),a("div",E,c(e.__("No comments yet")),1)):i("",!0),!t.loading&&t.comments?(r(),a("div",O,[(r(!0),a(T,null,B(t.comments.data,o=>(r(),a("div",{key:o.id,class:"flex"},[s("div",P,[s("div",{class:D(["flex flex-col px-4 py-2 text-gray-700 bg-gray-100 rounded-tl-lg rounded-2xl dark:bg-cool-gray-600 dark:bg-opacity-25 dark:text-gray-200",{"border border-gray-300 dark:border-gray-700":e.$page.props.auth.user&&e.$page.props.auth.user.id===o.user_id}])},[f(p,{as:"div",class:"hover:cursor-pointer hover:underline",href:e.route("user.public.get",o.commentator.username)},{default:y(()=>[f(_,{user:o.commentator,"show-username":!0,"text-class":"font-sm"},{default:y(()=>[d((r(),a("span",{class:"inline ml-1 text-xs text-gray-500 dark:text-gray-400 focus:outline-none",title:u.formatToDayDateString(o.created_at)},[L(c(u.formatTimeAgoToNow(o.created_at)),1)],8,W)),[[x]])]),_:2},1032,["user"])]),_:2},1032,["href"]),s("span",{innerHTML:u.purifyAndLinkifyText(o.comment)},null,8,G)],2)]),s("img",{src:o.commentator.profile_photo_url,alt:"My profile",class:"order-1 w-8 h-8 mt-2 rounded-full"},null,8,J),e.$page.props.auth.user&&o.permissions.delete?d((r(),N(p,{key:0,"preserve-scroll":!0,"preserve-state":!1,as:"button",method:"delete",href:e.route(`${m.commentableType}.comment.delete`,[m.commentable.id,o.id]),class:"order-3 focus:outline-none"},{default:y(()=>[f(b,{name:"trash",class:"w-4 h-4 text-gray-200 hover:text-red-400 dark:text-gray-500 dark:hover:text-red-500"})]),_:2},1032,["href"])),[[k,{message:e.__("Are you sure you want to delete this comment?")}]]):i("",!0)]))),128))])):i("",!0),e.$page.props.auth.user?(r(),a("div",Q,[s("img",{src:e.$page.props.auth.user.profile_photo_url,alt:"My profile",class:"order-1 w-8 h-8 mt-2 rounded-full"},null,8,R),s("div",X,[s("form",{onSubmit:n[3]||(n[3]=V((...o)=>l.submitComment&&l.submitComment(...o),["prevent"]))},[d(s("input",{ref:"comment","onUpdate:modelValue":n[1]||(n[1]=o=>t.commentBody=o),disabled:t.submitting,placeholder:e.__("Write a comment..."),"aria-label":"comment",type:"text",class:"block w-full mt-1 bg-gray-100 border border-gray-100 rounded-full dark:bg-cool-gray-900 focus:border-gray-300 dark:border-gray-800 dark:focus:border-gray-700 dark:text-gray-200 focus:ring-0 sm:text-sm disabled:opacity-50",onKeypress:n[2]||(n[2]=S((...o)=>l.submitComment&&l.submitComment(...o),["enter"]))},null,40,Y),[[A,t.commentBody]])],32),t.bodyerror?(r(),a("span",Z,c(t.bodyerror),1)):i("",!0)])])):i("",!0)])}const ne=j(H,[["render",$]]);export{ne as C}; +import{I as v}from"./Icon-09cf2959.js";import{_ as w}from"./UserDisplayname-e8f15ed7.js";import{u as C}from"./AppLayout-180f66c1.js";import{l as h,q as g,o as r,d as a,e as i,j as d,m as M,a as s,t as c,F as T,g as B,n as D,b as f,w as y,f as L,c as N,i as V,v as A,a6 as S}from"./app-d03084a3.js";import{_ as j}from"./_plugin-vue_export-helper-c27b6911.js";const H={components:{Icon:v,UserDisplayname:w},props:{commentable:Object,commentableType:String},setup(){const{purifyAndLinkifyText:e,formatTimeAgoToNow:n,formatToDayDateString:m}=C();return{purifyAndLinkifyText:e,formatTimeAgoToNow:n,formatToDayDateString:m}},data(){return{comments:null,loading:!0,loadingMore:!1,commentBody:"",submitting:!1,bodyerror:null,showLoadMoreCommentsButton:!0}},created(){axios.get(route(`${this.commentableType}.comment.index`,this.commentable.id)).then(e=>{this.comments=e.data,this.comments.data.reverse()}).finally(()=>{this.loading=!1})},methods:{loadMoreComments(){return this.comments.next_page_url?(this.loadingMore=!0,axios(this.comments.next_page_url).then(e=>{this.comments={...e.data,data:[...e.data.data.reverse(),...this.comments.data]}}).finally(()=>this.loadingMore=!1)):(this.showLoadMoreCommentsButton=!1,Promise.resolve())},submitComment(){this.submitting||(this.submitting=!0,this.bodyerror=null,axios.post(route(`${this.commentableType}.comment.store`,this.commentable.id),{comment:this.commentBody}).then(e=>{e.status===200&&(this.comments.data.push(e.data.data),this.commentBody="")}).catch(e=>{e.response.status===422?this.bodyerror=e.response.data.errors.comment[0]:this.bodyerror=e.response.data.message}).finally(()=>{this.submitting=!1,this.$nextTick(()=>{this.$refs.comment.focus()})}))}}},z={class:"flex flex-col"},F={key:0,class:"mt-0.5 dark:border-cool-gray-700"},I={key:1,class:"flex justify-center p-4"},K=s("svg",{class:"w-5 h-5 mr-3 -ml-1 animate-spin text-light-blue-600 dark:text-light-blue-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[s("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),s("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),U=[K],q={class:"flex mt-3"},E={key:2,class:"flex justify-center pt-4 text-gray-500 dark:text-gray-400 text-sm"},O={key:3,class:"flex flex-col mt-3 space-y-2"},P={class:"items-start order-2 max-w-lg mx-2 space-y-2 text-sm"},W=["title"],G=["innerHTML"],J=["src"],Q={key:4,class:"flex mt-1"},R=["src"],X={class:"flex-grow order-2 mx-2 text-sm"},Y=["disabled","placeholder"],Z={key:0,class:"ml-2 text-xs text-red-500"};function $(e,n,m,u,t,l){const _=h("user-displayname"),p=h("inertia-link"),b=h("icon"),x=g("tippy"),k=g("confirm");return r(),a("div",z,[m.commentableType=="post"?(r(),a("hr",F)):i("",!0),t.loading||t.loadingMore?(r(),a("div",I,U)):i("",!0),d(s("div",q,[s("button",{class:"text-sm font-semibold text-gray-500 dark:text-gray-400 focus:outline-none hover:underline",onClick:n[0]||(n[0]=(...o)=>l.loadMoreComments&&l.loadMoreComments(...o))},c(e.__("View previous comments")),1)],512),[[M,!t.loadingMore&&!t.loading&&t.showLoadMoreCommentsButton&&t.comments&&t.comments.next_page_url]]),!t.loading&&t.comments&&t.comments.data.length===0?(r(),a("div",E,c(e.__("No comments yet")),1)):i("",!0),!t.loading&&t.comments?(r(),a("div",O,[(r(!0),a(T,null,B(t.comments.data,o=>(r(),a("div",{key:o.id,class:"flex"},[s("div",P,[s("div",{class:D(["flex flex-col px-4 py-2 text-gray-700 bg-gray-100 rounded-tl-lg rounded-2xl dark:bg-cool-gray-600 dark:bg-opacity-25 dark:text-gray-200",{"border border-gray-300 dark:border-gray-700":e.$page.props.auth.user&&e.$page.props.auth.user.id===o.user_id}])},[f(p,{as:"div",class:"hover:cursor-pointer hover:underline",href:e.route("user.public.get",o.commentator.username)},{default:y(()=>[f(_,{user:o.commentator,"show-username":!0,"text-class":"font-sm"},{default:y(()=>[d((r(),a("span",{class:"inline ml-1 text-xs text-gray-500 dark:text-gray-400 focus:outline-none",title:u.formatToDayDateString(o.created_at)},[L(c(u.formatTimeAgoToNow(o.created_at)),1)],8,W)),[[x]])]),_:2},1032,["user"])]),_:2},1032,["href"]),s("span",{innerHTML:u.purifyAndLinkifyText(o.comment)},null,8,G)],2)]),s("img",{src:o.commentator.profile_photo_url,alt:"My profile",class:"order-1 w-8 h-8 mt-2 rounded-full"},null,8,J),e.$page.props.auth.user&&o.permissions.delete?d((r(),N(p,{key:0,"preserve-scroll":!0,"preserve-state":!1,as:"button",method:"delete",href:e.route(`${m.commentableType}.comment.delete`,[m.commentable.id,o.id]),class:"order-3 focus:outline-none"},{default:y(()=>[f(b,{name:"trash",class:"w-4 h-4 text-gray-200 hover:text-red-400 dark:text-gray-500 dark:hover:text-red-500"})]),_:2},1032,["href"])),[[k,{message:e.__("Are you sure you want to delete this comment?")}]]):i("",!0)]))),128))])):i("",!0),e.$page.props.auth.user?(r(),a("div",Q,[s("img",{src:e.$page.props.auth.user.profile_photo_url,alt:"My profile",class:"order-1 w-8 h-8 mt-2 rounded-full"},null,8,R),s("div",X,[s("form",{onSubmit:n[3]||(n[3]=V((...o)=>l.submitComment&&l.submitComment(...o),["prevent"]))},[d(s("input",{ref:"comment","onUpdate:modelValue":n[1]||(n[1]=o=>t.commentBody=o),disabled:t.submitting,placeholder:e.__("Write a comment..."),"aria-label":"comment",type:"text",class:"block w-full mt-1 bg-gray-100 border border-gray-100 rounded-full dark:bg-cool-gray-900 focus:border-gray-300 dark:border-gray-800 dark:focus:border-gray-700 dark:text-gray-200 focus:ring-0 sm:text-sm disabled:opacity-50",onKeypress:n[2]||(n[2]=S((...o)=>l.submitComment&&l.submitComment(...o),["enter"]))},null,40,Y),[[A,t.commentBody]])],32),t.bodyerror?(r(),a("span",Z,c(t.bodyerror),1)):i("",!0)])])):i("",!0)])}const ne=j(H,[["render",$]]);export{ne as C}; diff --git a/public/build/default/assets/CommonStatusBadge-06cee5a1.js b/public/build/default/assets/CommonStatusBadge-61bbdd69.js similarity index 95% rename from public/build/default/assets/CommonStatusBadge-06cee5a1.js rename to public/build/default/assets/CommonStatusBadge-61bbdd69.js index fc4667d87..7eecd0d0e 100644 --- a/public/build/default/assets/CommonStatusBadge-06cee5a1.js +++ b/public/build/default/assets/CommonStatusBadge-61bbdd69.js @@ -1 +1 @@ -import{o as t,d,R as o,n as s,x as n,c,w as l,f as b,t as g,u,I as y}from"./app-10f1fbb6.js";const k={__name:"Badge",props:{colorClass:{type:String,default:"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-300"}},setup(r){return(e,a)=>(t(),d("span",{class:s(["font-medium me-2 px-2.5 py-0.5 rounded-full",r.colorClass])},[o(e.$slots,"default")],2))}},i={__name:"CommonStatusBadge",props:{status:{type:String,required:!0}},setup(r){const e=r,a=n(()=>{switch(e.status){case"pending":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200 border border-yellow-300 dark:border-yellow-700";case"inprogress":case"running":return"bg-cyan-100 text-cyan-800 dark:bg-cyan-900 dark:text-cyan-200 border border-cyan-300 dark:border-cyan-700";case"approved":case"completed":return"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 border border-green-300 dark:border-green-700";case"rejected":case"failed":return"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200 border border-red-300 dark:border-red-700";case"onhold":case"deferred":return"bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-200 border border-amber-300 dark:border-amber-700";default:return"bg-gray-100 text-gray-600 dark:bg-gray-900 dark:text-gray-300 border border-gray-300 dark:border-gray-700"}});return(p,m)=>(t(),c(k,{"color-class":a.value},{default:l(()=>[b(g(u(y.startCase)(r.status)),1)]),_:1},8,["color-class"]))}};export{i as _}; +import{o as t,d,R as o,n as s,x as n,c,w as l,f as b,t as g,u,I as y}from"./app-d03084a3.js";const k={__name:"Badge",props:{colorClass:{type:String,default:"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-300"}},setup(r){return(e,a)=>(t(),d("span",{class:s(["font-medium me-2 px-2.5 py-0.5 rounded-full",r.colorClass])},[o(e.$slots,"default")],2))}},i={__name:"CommonStatusBadge",props:{status:{type:String,required:!0}},setup(r){const e=r,a=n(()=>{switch(e.status){case"pending":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200 border border-yellow-300 dark:border-yellow-700";case"inprogress":case"running":return"bg-cyan-100 text-cyan-800 dark:bg-cyan-900 dark:text-cyan-200 border border-cyan-300 dark:border-cyan-700";case"approved":case"completed":return"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 border border-green-300 dark:border-green-700";case"rejected":case"failed":return"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200 border border-red-300 dark:border-red-700";case"onhold":case"deferred":return"bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-200 border border-amber-300 dark:border-amber-700";default:return"bg-gray-100 text-gray-600 dark:bg-gray-900 dark:text-gray-300 border border-gray-300 dark:border-gray-700"}});return(p,m)=>(t(),c(k,{"color-class":a.value},{default:l(()=>[b(g(u(y.startCase)(r.status)),1)]),_:1},8,["color-class"]))}};export{i as _}; diff --git a/public/build/default/assets/ConfirmPassword-1c1ff45b.js b/public/build/default/assets/ConfirmPassword-3d80cc74.js similarity index 79% rename from public/build/default/assets/ConfirmPassword-1c1ff45b.js rename to public/build/default/assets/ConfirmPassword-3d80cc74.js index e63a01ae4..09016b1c1 100644 --- a/public/build/default/assets/ConfirmPassword-1c1ff45b.js +++ b/public/build/default/assets/ConfirmPassword-3d80cc74.js @@ -1 +1 @@ -import{J as h}from"./AuthenticationCard-8397475e.js";import{L as g}from"./LoadingButton-48824f65.js";import{A as w}from"./AppLayout-e973448b.js";import{X as b}from"./XInput-5de78b04.js";import{I as y}from"./Icon-07002ff2.js";import{T as x,l as o,o as v,c as C,w as a,b as e,a as s,t as l,f as V,i as I}from"./app-10f1fbb6.js";import{_ as j}from"./_plugin-vue_export-helper-c27b6911.js";import"./useAuthorizable-a9d4f38f.js";const B={components:{XInput:b,AppLayout:w,LoadingButton:g,JetAuthenticationCard:h,Icon:y},data(){return{form:x({password:""})}},methods:{submit(){this.form.post(this.route("password.confirm"),{onFinish:()=>this.form.reset()})}}},P={class:"mb-4 text-sm text-gray-600 dark:text-gray-400"},k={class:"text-gray-500 text-xs italic"},A={class:"flex justify-end mt-4"};function L(t,r,N,T,n,p){const u=o("app-head"),m=o("Icon"),d=o("x-input"),c=o("loading-button"),f=o("jet-authentication-card"),_=o("app-layout");return v(),C(_,null,{default:a(()=>[e(u,{title:t.__("Confirm your Password")},null,8,["title"]),e(f,null,{logo:a(()=>[e(m,{name:"finger-print2",class:"w-20 h-20 fill-current text-light-blue-500"})]),default:a(()=>[s("div",P,l(t.__("This is a secure area of the application. Please confirm your password before continuing.")),1),s("form",{onSubmit:r[1]||(r[1]=I((...i)=>p.submit&&p.submit(...i),["prevent"]))},[s("div",null,[e(d,{id:"password",modelValue:n.form.password,"onUpdate:modelValue":r[0]||(r[0]=i=>n.form.password=i),label:t.__("Password"),required:!1,autocomplete:"current-password",error:n.form.errors.password,autofocus:!0,type:"password",name:"password"},null,8,["modelValue","label","error"]),s("span",k,l(t.__("Continue with empty password if you have no password.")),1)]),s("div",A,[e(c,{loading:n.form.processing,class:"inline-flex justify-center px-4 py-2 ml-4 text-sm font-medium text-white border border-transparent rounded-md shadow-sm bg-light-blue-500 hover:bg-light-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-light-blue-500 disabled:opacity-50"},{default:a(()=>[V(l(t.__("Confirm")),1)]),_:1},8,["loading"])])],32)]),_:1})]),_:1})}const z=j(B,[["render",L]]);export{z as default}; +import{J as h}from"./AuthenticationCard-d8c2fc41.js";import{L as g}from"./LoadingButton-e7934cd8.js";import{A as w}from"./AppLayout-180f66c1.js";import{X as b}from"./XInput-4d223784.js";import{I as y}from"./Icon-09cf2959.js";import{T as x,l as o,o as v,c as C,w as a,b as e,a as s,t as l,f as V,i as I}from"./app-d03084a3.js";import{_ as j}from"./_plugin-vue_export-helper-c27b6911.js";import"./useAuthorizable-db63a772.js";const B={components:{XInput:b,AppLayout:w,LoadingButton:g,JetAuthenticationCard:h,Icon:y},data(){return{form:x({password:""})}},methods:{submit(){this.form.post(this.route("password.confirm"),{onFinish:()=>this.form.reset()})}}},P={class:"mb-4 text-sm text-gray-600 dark:text-gray-400"},k={class:"text-gray-500 text-xs italic"},A={class:"flex justify-end mt-4"};function L(t,r,N,T,n,p){const u=o("app-head"),m=o("Icon"),d=o("x-input"),c=o("loading-button"),f=o("jet-authentication-card"),_=o("app-layout");return v(),C(_,null,{default:a(()=>[e(u,{title:t.__("Confirm your Password")},null,8,["title"]),e(f,null,{logo:a(()=>[e(m,{name:"finger-print2",class:"w-20 h-20 fill-current text-light-blue-500"})]),default:a(()=>[s("div",P,l(t.__("This is a secure area of the application. Please confirm your password before continuing.")),1),s("form",{onSubmit:r[1]||(r[1]=I((...i)=>p.submit&&p.submit(...i),["prevent"]))},[s("div",null,[e(d,{id:"password",modelValue:n.form.password,"onUpdate:modelValue":r[0]||(r[0]=i=>n.form.password=i),label:t.__("Password"),required:!1,autocomplete:"current-password",error:n.form.errors.password,autofocus:!0,type:"password",name:"password"},null,8,["modelValue","label","error"]),s("span",k,l(t.__("Continue with empty password if you have no password.")),1)]),s("div",A,[e(c,{loading:n.form.processing,class:"inline-flex justify-center px-4 py-2 ml-4 text-sm font-medium text-white border border-transparent rounded-md shadow-sm bg-light-blue-500 hover:bg-light-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-light-blue-500 disabled:opacity-50"},{default:a(()=>[V(l(t.__("Confirm")),1)]),_:1},8,["loading"])])],32)]),_:1})]),_:1})}const z=j(B,[["render",L]]);export{z as default}; diff --git a/public/build/default/assets/ConfirmationModal-cfc294c1.js b/public/build/default/assets/ConfirmationModal-ba520607.js similarity index 90% rename from public/build/default/assets/ConfirmationModal-cfc294c1.js rename to public/build/default/assets/ConfirmationModal-ba520607.js index 95f287f66..5f7b5cd1f 100644 --- a/public/build/default/assets/ConfirmationModal-cfc294c1.js +++ b/public/build/default/assets/ConfirmationModal-ba520607.js @@ -1 +1 @@ -import{_ as c}from"./Modal-1b568ea2.js";import{o as i,c as n,w as r,a as s,R as o}from"./app-10f1fbb6.js";const d={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},m={class:"sm:flex sm:items-start"},h=s("div",{class:"mx-auto shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"},[s("svg",{class:"h-6 w-6 text-red-600",stroke:"currentColor",fill:"none",viewBox:"0 0 24 24"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})])],-1),f={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},x={class:"text-lg"},_={class:"mt-2"},u={class:"flex flex-row justify-end px-6 py-4 bg-gray-100 text-right"},v={__name:"ConfirmationModal",props:{show:{type:Boolean,default:!1},maxWidth:{type:String,default:"2xl"},closeable:{type:Boolean,default:!0}},emits:["close"],setup(t,{emit:l}){const a=()=>{l("close")};return(e,p)=>(i(),n(c,{show:t.show,"max-width":t.maxWidth,closeable:t.closeable,onClose:a},{default:r(()=>[s("div",d,[s("div",m,[h,s("div",f,[s("h3",x,[o(e.$slots,"title")]),s("div",_,[o(e.$slots,"content")])])])]),s("div",u,[o(e.$slots,"footer")])]),_:3},8,["show","max-width","closeable"]))}};export{v as _}; +import{_ as c}from"./Modal-97271be4.js";import{o as i,c as n,w as r,a as s,R as o}from"./app-d03084a3.js";const d={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},m={class:"sm:flex sm:items-start"},h=s("div",{class:"mx-auto shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"},[s("svg",{class:"h-6 w-6 text-red-600",stroke:"currentColor",fill:"none",viewBox:"0 0 24 24"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})])],-1),f={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},x={class:"text-lg"},_={class:"mt-2"},u={class:"flex flex-row justify-end px-6 py-4 bg-gray-100 text-right"},v={__name:"ConfirmationModal",props:{show:{type:Boolean,default:!1},maxWidth:{type:String,default:"2xl"},closeable:{type:Boolean,default:!0}},emits:["close"],setup(t,{emit:l}){const a=()=>{l("close")};return(e,p)=>(i(),n(c,{show:t.show,"max-width":t.maxWidth,closeable:t.closeable,onClose:a},{default:r(()=>[s("div",d,[s("div",m,[h,s("div",f,[s("h3",x,[o(e.$slots,"title")]),s("div",_,[o(e.$slots,"content")])])])]),s("div",u,[o(e.$slots,"footer")])]),_:3},8,["show","max-width","closeable"]))}};export{v as _}; diff --git a/public/build/default/assets/ConfirmsPassword-3d75e25f.js b/public/build/default/assets/ConfirmsPassword-b4679733.js similarity index 83% rename from public/build/default/assets/ConfirmsPassword-3d75e25f.js rename to public/build/default/assets/ConfirmsPassword-b4679733.js index ce9f83246..73197f8b3 100644 --- a/public/build/default/assets/ConfirmsPassword-3d75e25f.js +++ b/public/build/default/assets/ConfirmsPassword-b4679733.js @@ -1 +1 @@ -import{r as u,h as g,o as y,d as h,a as d,R as C,b as e,w as a,f as t,t as r,a6 as k,n as v,a2 as b}from"./app-10f1fbb6.js";import{_ as x}from"./Button-4bd25e7c.js";import{_ as P}from"./DialogModal-977775f6.js";import{_ as V}from"./Input-dd4c1472.js";import{_ as $}from"./InputError-60a04532.js";import{_ as S}from"./SecondaryButton-e6d47922.js";const B={class:"mt-4"},K={class:"text-gray-500 text-xs italic"},F={__name:"ConfirmsPassword",props:{title:{type:String,default:"Confirm Password"},content:{type:String,default:"For your security, please confirm your password to continue."},button:{type:String,default:"Confirm"}},emits:["confirmed"],setup(n,{emit:p}){const i=u(!1),s=g({password:"",error:"",processing:!1}),l=u(null),w=()=>{axios.get(route("password.confirmation")).then(o=>{o.data.confirmed?p("confirmed"):(i.value=!0,setTimeout(()=>l.value.focus(),250))})},f=()=>{s.processing=!0,axios.post(route("password.confirm"),{password:s.password}).then(()=>{s.processing=!1,c(),b().then(()=>p("confirmed"))}).catch(o=>{s.processing=!1,s.error=o.response.data.errors.password[0],l.value.focus()})},c=()=>{i.value=!1,s.password="",s.error=""};return(o,m)=>(y(),h("span",null,[d("span",{onClick:w},[C(o.$slots,"default")]),e(P,{show:i.value,onClose:c},{title:a(()=>[t(r(n.title),1)]),content:a(()=>[t(r(n.content)+" ",1),d("div",B,[e(V,{ref_key:"passwordInput",ref:l,modelValue:s.password,"onUpdate:modelValue":m[0]||(m[0]=_=>s.password=_),type:"password",class:"mt-1 block w-3/4",placeholder:o.__("Password"),onKeyup:k(f,["enter"])},null,8,["modelValue","placeholder","onKeyup"]),e($,{message:s.error,class:"mt-2"},null,8,["message"])]),d("span",K,r(o.__("Continue with empty password if you have no password.")),1)]),footer:a(()=>[e(S,{onClick:c},{default:a(()=>[t(r(o.__("Cancel")),1)]),_:1}),e(x,{class:v(["ml-3",{"opacity-25":s.processing}]),disabled:s.processing,onClick:f},{default:a(()=>[t(r(n.button),1)]),_:1},8,["class","disabled"])]),_:1},8,["show"])]))}};export{F as _}; +import{r as u,h as g,o as y,d as h,a as d,R as C,b as e,w as a,f as t,t as r,a6 as k,n as v,a2 as b}from"./app-d03084a3.js";import{_ as x}from"./Button-2e00e3fc.js";import{_ as P}from"./DialogModal-0c8e3b2a.js";import{_ as V}from"./Input-5e60fc33.js";import{_ as $}from"./InputError-5a44e724.js";import{_ as S}from"./SecondaryButton-f2a3fd51.js";const B={class:"mt-4"},K={class:"text-gray-500 text-xs italic"},F={__name:"ConfirmsPassword",props:{title:{type:String,default:"Confirm Password"},content:{type:String,default:"For your security, please confirm your password to continue."},button:{type:String,default:"Confirm"}},emits:["confirmed"],setup(n,{emit:p}){const i=u(!1),s=g({password:"",error:"",processing:!1}),l=u(null),w=()=>{axios.get(route("password.confirmation")).then(o=>{o.data.confirmed?p("confirmed"):(i.value=!0,setTimeout(()=>l.value.focus(),250))})},f=()=>{s.processing=!0,axios.post(route("password.confirm"),{password:s.password}).then(()=>{s.processing=!1,c(),b().then(()=>p("confirmed"))}).catch(o=>{s.processing=!1,s.error=o.response.data.errors.password[0],l.value.focus()})},c=()=>{i.value=!1,s.password="",s.error=""};return(o,m)=>(y(),h("span",null,[d("span",{onClick:w},[C(o.$slots,"default")]),e(P,{show:i.value,onClose:c},{title:a(()=>[t(r(n.title),1)]),content:a(()=>[t(r(n.content)+" ",1),d("div",B,[e(V,{ref_key:"passwordInput",ref:l,modelValue:s.password,"onUpdate:modelValue":m[0]||(m[0]=_=>s.password=_),type:"password",class:"mt-1 block w-3/4",placeholder:o.__("Password"),onKeyup:k(f,["enter"])},null,8,["modelValue","placeholder","onKeyup"]),e($,{message:s.error,class:"mt-2"},null,8,["message"])]),d("span",K,r(o.__("Continue with empty password if you have no password.")),1)]),footer:a(()=>[e(S,{onClick:c},{default:a(()=>[t(r(o.__("Cancel")),1)]),_:1}),e(x,{class:v(["ml-3",{"opacity-25":s.processing}]),disabled:s.processing,onClick:f},{default:a(()=>[t(r(n.button),1)]),_:1},8,["class","disabled"])]),_:1},8,["show"])]))}};export{F as _}; diff --git a/public/build/default/assets/Consolelog-74a43a53.js b/public/build/default/assets/Consolelog-25e94885.js similarity index 70% rename from public/build/default/assets/Consolelog-74a43a53.js rename to public/build/default/assets/Consolelog-25e94885.js index 4b5c6ef11..66e9087de 100644 --- a/public/build/default/assets/Consolelog-74a43a53.js +++ b/public/build/default/assets/Consolelog-25e94885.js @@ -1 +1 @@ -import{q as h,o as c,c as v,w as o,k as w,b as a,u as i,_ as x,a as s,t as l,j as d,d as p,f as _}from"./app-10f1fbb6.js";import{u as b}from"./AppLayout-e973448b.js";import{_ as g}from"./AdminLayout-56ec59aa.js";import{_ as k}from"./ServerIntelServerSelector-11fc272b.js";import{D as m,_ as D}from"./DtRowItem-1f3b78b0.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Icon-07002ff2.js";import"./useAuthorizable-a9d4f38f.js";import"./use-resolve-button-type-5343a0d4.js";import"./open-closed-98ce9e0e.js";import"./CloudArrowDownIcon-01098e33.js";import"./index-886e100a.js";import"./XSelect-fa8c7abc.js";import"./vue-multiselect.esm-2340c4fe.js";import"./XMarkIcon-25f2033f.js";import"./hidden-f2d5170c.js";const C={class:"p-4 mx-auto space-y-4 px-10"},S={class:"px-4 py-4 text-sm font-medium text-gray-800 whitespace-nowrap dark:text-gray-200"},T={class:"px-4"},$={class:"text-sm text-gray-800 dark:text-gray-200"},j={class:"whitespace-pre-wrap"},B=["title"],I=["title"],W={__name:"Consolelog",props:{serverList:{type:Object},filters:{type:Object},consoleHistory:{type:Object}},setup(r){const{__:e}=w(),{formatTimeAgoToNow:f,formatToDayDateString:u}=b(),y=[{key:"id",label:e("ID"),sortable:!0,class:"text-left"},{key:"data",label:e("Data"),sortable:!1},{key:"server_id",label:e("Server"),sortable:!0},{key:"created_at",label:e("Created"),sortable:!0}];return(L,N)=>{const n=h("tippy");return c(),v(g,null,{default:o(()=>[a(x,{title:i(e)("ConsoleLog - ServerIntel")},null,8,["title"]),s("div",C,[a(k,{title:i(e)("ConsoleLog"),"server-list":r.serverList,filters:r.filters},null,8,["title","server-list","filters"]),s("div",null,[a(D,{class:"bg-white rounded shadow dark:bg-gray-800",header:y,data:r.consoleHistory,filters:r.filters},{default:o(({item:t})=>[s("td",S,l(t.id),1),s("td",T,[s("div",$,[s("pre",j,l(t.data),1)])]),a(m,null,{default:o(()=>[d((c(),p("span",{class:"whitespace-nowrap",title:`Server ID: ${t.server.id}`},[_(l(t.server.name),1)],8,B)),[[n]])]),_:2},1024),a(m,null,{default:o(()=>[d((c(),p("span",{class:"whitespace-nowrap",title:i(u)(t.created_at)},[_(l(i(f)(t.created_at)),1)],8,I)),[[n]])]),_:2},1024)]),_:1},8,["data","filters"])])])]),_:1})}}};export{W as default}; +import{q as h,o as c,c as v,w as o,k as w,b as a,u as i,_ as x,a as s,t as l,j as d,d as p,f as _}from"./app-d03084a3.js";import{u as b}from"./AppLayout-180f66c1.js";import{_ as g}from"./AdminLayout-2ffdcf09.js";import{_ as k}from"./ServerIntelServerSelector-f57127e6.js";import{D as m,_ as D}from"./DtRowItem-d6e395fe.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Icon-09cf2959.js";import"./useAuthorizable-db63a772.js";import"./use-resolve-button-type-d5bb55c5.js";import"./open-closed-db295aa4.js";import"./CloudArrowDownIcon-c01292c4.js";import"./index-dedae3a2.js";import"./XSelect-e6b58960.js";import"./vue-multiselect.esm-733a639e.js";import"./XMarkIcon-63f73fcf.js";import"./hidden-44eecd86.js";const C={class:"p-4 mx-auto space-y-4 px-10"},S={class:"px-4 py-4 text-sm font-medium text-gray-800 whitespace-nowrap dark:text-gray-200"},T={class:"px-4"},$={class:"text-sm text-gray-800 dark:text-gray-200"},j={class:"whitespace-pre-wrap"},B=["title"],I=["title"],W={__name:"Consolelog",props:{serverList:{type:Object},filters:{type:Object},consoleHistory:{type:Object}},setup(r){const{__:e}=w(),{formatTimeAgoToNow:f,formatToDayDateString:u}=b(),y=[{key:"id",label:e("ID"),sortable:!0,class:"text-left"},{key:"data",label:e("Data"),sortable:!1},{key:"server_id",label:e("Server"),sortable:!0},{key:"created_at",label:e("Created"),sortable:!0}];return(L,N)=>{const n=h("tippy");return c(),v(g,null,{default:o(()=>[a(x,{title:i(e)("ConsoleLog - ServerIntel")},null,8,["title"]),s("div",C,[a(k,{title:i(e)("ConsoleLog"),"server-list":r.serverList,filters:r.filters},null,8,["title","server-list","filters"]),s("div",null,[a(D,{class:"bg-white rounded shadow dark:bg-gray-800",header:y,data:r.consoleHistory,filters:r.filters},{default:o(({item:t})=>[s("td",S,l(t.id),1),s("td",T,[s("div",$,[s("pre",j,l(t.data),1)])]),a(m,null,{default:o(()=>[d((c(),p("span",{class:"whitespace-nowrap",title:`Server ID: ${t.server.id}`},[_(l(t.server.name),1)],8,B)),[[n]])]),_:2},1024),a(m,null,{default:o(()=>[d((c(),p("span",{class:"whitespace-nowrap",title:i(u)(t.created_at)},[_(l(i(f)(t.created_at)),1)],8,I)),[[n]])]),_:2},1024)]),_:1},8,["data","filters"])])])]),_:1})}}};export{W as default}; diff --git a/public/build/default/assets/CreateBadge-beb2c2cd.js b/public/build/default/assets/CreateBadge-d41425c2.js similarity index 89% rename from public/build/default/assets/CreateBadge-beb2c2cd.js rename to public/build/default/assets/CreateBadge-d41425c2.js index b4a01f55a..5db64d07b 100644 --- a/public/build/default/assets/CreateBadge-beb2c2cd.js +++ b/public/build/default/assets/CreateBadge-d41425c2.js @@ -1 +1 @@ -import{_ as v}from"./SecondaryButton-e6d47922.js";import{L as k}from"./LoadingButton-48824f65.js";import{X as w}from"./XInput-5de78b04.js";import{X as x}from"./XCheckbox-da8a8990.js";import{_ as B}from"./InputError-60a04532.js";import{T as V,l as i,o as S,c as P,w as d,b as a,a as e,t as n,f as m,i as p,j as A,m as j,p as C}from"./app-10f1fbb6.js";import{_ as I}from"./AdminLayout-56ec59aa.js";import{_ as N}from"./_plugin-vue_export-helper-c27b6911.js";import"./AppLayout-e973448b.js";import"./Icon-07002ff2.js";import"./useAuthorizable-a9d4f38f.js";import"./use-resolve-button-type-5343a0d4.js";import"./open-closed-98ce9e0e.js";import"./CloudArrowDownIcon-01098e33.js";import"./index-886e100a.js";const U={components:{AdminLayout:I,JetInputError:B,LoadingButton:k,JetSecondaryButton:v,XInput:w,XCheckbox:x},data(){return{form:V({name:"",shortname:"",sort_order:"",is_sticky:!1,photo:null}),photoPreview:null}},methods:{addBadge(){this.$refs.photo&&(this.form.photo=this.$refs.photo.files[0]),this.form.post(route("admin.badge.store"),{preserveScroll:!0})},updatePhotoPreview(){const o=new FileReader;o.onload=s=>{this.photoPreview=s.target.result},o.readAsDataURL(this.$refs.photo.files[0])},selectNewPhoto(){this.$refs.photo.click()}}},L={class:"max-w-6xl px-10 py-12 mx-auto"},E={class:"flex justify-between mb-8"},D={class:"text-3xl font-bold text-gray-500 dark:text-gray-300"},T={class:"mt-10 sm:mt-0"},X={class:"md:grid md:grid-cols-3 md:gap-6"},M={class:"md:col-span-1"},z={class:"px-4 sm:px-0"},J={class:"text-lg font-medium leading-6 text-gray-900 dark:text-gray-400"},O={class:"mt-1 text-sm text-gray-600 dark:text-gray-500"},R=e("br",null,null,-1),q={class:"mt-3 text-sm text-gray-600 dark:text-gray-500"},F={class:"mt-5 md:mt-0 md:col-span-2"},Y={class:"overflow-hidden shadow sm:rounded-md"},G={class:"px-4 py-5 bg-white dark:bg-cool-gray-800 sm:p-6"},H={class:"grid grid-cols-6 gap-6"},K={class:"col-span-6 sm:col-span-4"},Q={class:"col-span-6 sm:col-span-2"},W={class:"col-span-6 sm:col-span-3"},Z={class:"flex items-center col-span-6 sm:col-span-3"},$={class:"col-span-6 sm:col-span-6"},ee={for:"badge_img",class:"block text-sm font-medium text-gray-700 dark:text-gray-400"},oe={class:"mt-2"},te={class:"flex justify-end px-4 py-3 bg-gray-50 dark:bg-cool-gray-800 sm:px-6"};function se(o,s,re,ae,t,l){const _=i("app-head"),u=i("inertia-link"),c=i("x-input"),g=i("x-checkbox"),h=i("jet-secondary-button"),f=i("jet-input-error"),b=i("loading-button"),y=i("AdminLayout");return S(),P(y,null,{default:d(()=>[a(_,{title:o.__("Add User Badge")},null,8,["title"]),e("div",L,[e("div",E,[e("h1",D,n(o.__("Add User Badge")),1),a(u,{href:o.route("admin.badge.index"),class:"inline-flex items-center px-4 py-2 text-xs font-semibold tracking-widest text-white uppercase transition duration-150 ease-in-out bg-gray-400 border border-transparent rounded-md dark:bg-gray-600 hover:bg-gray-500 active:bg-gray-600 focus:outline-none focus:border-gray-500 focus:shadow-outline-gray"},{default:d(()=>[e("span",null,n(o.__("Cancel")),1)]),_:1},8,["href"])]),e("div",T,[e("div",X,[e("div",M,[e("div",z,[e("h3",J,n(o.__("Overview")),1),e("p",O,[m(n(o.__("Badges are something you assign to users for some achievements.")),1),R,m(n(o.__("Eg: You can create a badge for Special User, Top Donator, Most Active etc.")),1)]),e("p",q,n(o.__("By default badges are marked non sticky. Means it will only show when you visit user's profile page. If you want the badge to always display beside username tick the 'Is Sticky' checkbox.")),1)])]),e("div",F,[e("form",{onSubmit:s[5]||(s[5]=p((...r)=>l.addBadge&&l.addBadge(...r),["prevent"]))},[e("div",Y,[e("div",G,[e("div",H,[e("div",K,[a(c,{id:"name",modelValue:t.form.name,"onUpdate:modelValue":s[0]||(s[0]=r=>t.form.name=r),label:o.__("Badge Name"),help:o.__("Eg: Special"),error:t.form.errors.name,type:"text",name:"name"},null,8,["modelValue","label","help","error"])]),e("div",Q,[a(c,{id:"shortname",modelValue:t.form.shortname,"onUpdate:modelValue":s[1]||(s[1]=r=>t.form.shortname=r),label:o.__("Short Name"),help:o.__("Eg: special"),error:t.form.errors.shortname,type:"text",name:"shortname"},null,8,["modelValue","label","help","error"])]),e("div",W,[a(c,{id:"sort_order",modelValue:t.form.sort_order,"onUpdate:modelValue":s[2]||(s[2]=r=>t.form.sort_order=r),label:o.__("Sort Order"),error:t.form.errors.sort_order,type:"number",name:"sort_order"},null,8,["modelValue","label","error"])]),e("div",Z,[a(g,{id:"is_sticky",modelValue:t.form.is_sticky,"onUpdate:modelValue":s[3]||(s[3]=r=>t.form.is_sticky=r),label:o.__("Is Sticky"),help:o.__("Tick if you want this badge to always appear with username"),name:"is_sticky",error:t.form.errors.is_sticky},null,8,["modelValue","label","help","error"])]),e("div",$,[e("input",{id:"badge_img",ref:"photo",type:"file",class:"hidden",onChange:s[4]||(s[4]=(...r)=>l.updatePhotoPreview&&l.updatePhotoPreview(...r))},null,544),e("label",ee,n(o.__("Badge Icon Image (A small square(Eg: 50x50) image is recomended)")),1),A(e("div",oe,[e("span",{class:"block w-20 h-20",style:C("background-size: cover; background-repeat: no-repeat; background-position: center center; background-image: url('"+t.photoPreview+"');")},null,4)],512),[[j,t.photoPreview]]),a(h,{class:"mt-2 mr-2",type:"button",onClick:p(l.selectNewPhoto,["prevent"])},{default:d(()=>[m(n(o.__("Select A New Image")),1)]),_:1},8,["onClick"]),a(f,{message:t.form.errors.photo,class:"mt-2"},null,8,["message"])])])]),e("div",te,[a(b,{loading:t.form.processing,class:"inline-flex justify-center px-4 py-2 text-sm font-medium text-white border border-transparent rounded-md shadow-sm bg-light-blue-600 hover:bg-light-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-light-blue-500 disabled:opacity-50",type:"submit"},{default:d(()=>[m(n(o.__("Add Badge")),1)]),_:1},8,["loading"])])])],32)])])])])]),_:1})}const ke=N(U,[["render",se]]);export{ke as default}; +import{_ as v}from"./SecondaryButton-f2a3fd51.js";import{L as k}from"./LoadingButton-e7934cd8.js";import{X as w}from"./XInput-4d223784.js";import{X as x}from"./XCheckbox-4b4d3718.js";import{_ as B}from"./InputError-5a44e724.js";import{T as V,l as i,o as S,c as P,w as d,b as a,a as e,t as n,f as m,i as p,j as A,m as j,p as C}from"./app-d03084a3.js";import{_ as I}from"./AdminLayout-2ffdcf09.js";import{_ as N}from"./_plugin-vue_export-helper-c27b6911.js";import"./AppLayout-180f66c1.js";import"./Icon-09cf2959.js";import"./useAuthorizable-db63a772.js";import"./use-resolve-button-type-d5bb55c5.js";import"./open-closed-db295aa4.js";import"./CloudArrowDownIcon-c01292c4.js";import"./index-dedae3a2.js";const U={components:{AdminLayout:I,JetInputError:B,LoadingButton:k,JetSecondaryButton:v,XInput:w,XCheckbox:x},data(){return{form:V({name:"",shortname:"",sort_order:"",is_sticky:!1,photo:null}),photoPreview:null}},methods:{addBadge(){this.$refs.photo&&(this.form.photo=this.$refs.photo.files[0]),this.form.post(route("admin.badge.store"),{preserveScroll:!0})},updatePhotoPreview(){const o=new FileReader;o.onload=s=>{this.photoPreview=s.target.result},o.readAsDataURL(this.$refs.photo.files[0])},selectNewPhoto(){this.$refs.photo.click()}}},L={class:"max-w-6xl px-10 py-12 mx-auto"},E={class:"flex justify-between mb-8"},D={class:"text-3xl font-bold text-gray-500 dark:text-gray-300"},T={class:"mt-10 sm:mt-0"},X={class:"md:grid md:grid-cols-3 md:gap-6"},M={class:"md:col-span-1"},z={class:"px-4 sm:px-0"},J={class:"text-lg font-medium leading-6 text-gray-900 dark:text-gray-400"},O={class:"mt-1 text-sm text-gray-600 dark:text-gray-500"},R=e("br",null,null,-1),q={class:"mt-3 text-sm text-gray-600 dark:text-gray-500"},F={class:"mt-5 md:mt-0 md:col-span-2"},Y={class:"overflow-hidden shadow sm:rounded-md"},G={class:"px-4 py-5 bg-white dark:bg-cool-gray-800 sm:p-6"},H={class:"grid grid-cols-6 gap-6"},K={class:"col-span-6 sm:col-span-4"},Q={class:"col-span-6 sm:col-span-2"},W={class:"col-span-6 sm:col-span-3"},Z={class:"flex items-center col-span-6 sm:col-span-3"},$={class:"col-span-6 sm:col-span-6"},ee={for:"badge_img",class:"block text-sm font-medium text-gray-700 dark:text-gray-400"},oe={class:"mt-2"},te={class:"flex justify-end px-4 py-3 bg-gray-50 dark:bg-cool-gray-800 sm:px-6"};function se(o,s,re,ae,t,l){const _=i("app-head"),u=i("inertia-link"),c=i("x-input"),g=i("x-checkbox"),h=i("jet-secondary-button"),f=i("jet-input-error"),b=i("loading-button"),y=i("AdminLayout");return S(),P(y,null,{default:d(()=>[a(_,{title:o.__("Add User Badge")},null,8,["title"]),e("div",L,[e("div",E,[e("h1",D,n(o.__("Add User Badge")),1),a(u,{href:o.route("admin.badge.index"),class:"inline-flex items-center px-4 py-2 text-xs font-semibold tracking-widest text-white uppercase transition duration-150 ease-in-out bg-gray-400 border border-transparent rounded-md dark:bg-gray-600 hover:bg-gray-500 active:bg-gray-600 focus:outline-none focus:border-gray-500 focus:shadow-outline-gray"},{default:d(()=>[e("span",null,n(o.__("Cancel")),1)]),_:1},8,["href"])]),e("div",T,[e("div",X,[e("div",M,[e("div",z,[e("h3",J,n(o.__("Overview")),1),e("p",O,[m(n(o.__("Badges are something you assign to users for some achievements.")),1),R,m(n(o.__("Eg: You can create a badge for Special User, Top Donator, Most Active etc.")),1)]),e("p",q,n(o.__("By default badges are marked non sticky. Means it will only show when you visit user's profile page. If you want the badge to always display beside username tick the 'Is Sticky' checkbox.")),1)])]),e("div",F,[e("form",{onSubmit:s[5]||(s[5]=p((...r)=>l.addBadge&&l.addBadge(...r),["prevent"]))},[e("div",Y,[e("div",G,[e("div",H,[e("div",K,[a(c,{id:"name",modelValue:t.form.name,"onUpdate:modelValue":s[0]||(s[0]=r=>t.form.name=r),label:o.__("Badge Name"),help:o.__("Eg: Special"),error:t.form.errors.name,type:"text",name:"name"},null,8,["modelValue","label","help","error"])]),e("div",Q,[a(c,{id:"shortname",modelValue:t.form.shortname,"onUpdate:modelValue":s[1]||(s[1]=r=>t.form.shortname=r),label:o.__("Short Name"),help:o.__("Eg: special"),error:t.form.errors.shortname,type:"text",name:"shortname"},null,8,["modelValue","label","help","error"])]),e("div",W,[a(c,{id:"sort_order",modelValue:t.form.sort_order,"onUpdate:modelValue":s[2]||(s[2]=r=>t.form.sort_order=r),label:o.__("Sort Order"),error:t.form.errors.sort_order,type:"number",name:"sort_order"},null,8,["modelValue","label","error"])]),e("div",Z,[a(g,{id:"is_sticky",modelValue:t.form.is_sticky,"onUpdate:modelValue":s[3]||(s[3]=r=>t.form.is_sticky=r),label:o.__("Is Sticky"),help:o.__("Tick if you want this badge to always appear with username"),name:"is_sticky",error:t.form.errors.is_sticky},null,8,["modelValue","label","help","error"])]),e("div",$,[e("input",{id:"badge_img",ref:"photo",type:"file",class:"hidden",onChange:s[4]||(s[4]=(...r)=>l.updatePhotoPreview&&l.updatePhotoPreview(...r))},null,544),e("label",ee,n(o.__("Badge Icon Image (A small square(Eg: 50x50) image is recomended)")),1),A(e("div",oe,[e("span",{class:"block w-20 h-20",style:C("background-size: cover; background-repeat: no-repeat; background-position: center center; background-image: url('"+t.photoPreview+"');")},null,4)],512),[[j,t.photoPreview]]),a(h,{class:"mt-2 mr-2",type:"button",onClick:p(l.selectNewPhoto,["prevent"])},{default:d(()=>[m(n(o.__("Select A New Image")),1)]),_:1},8,["onClick"]),a(f,{message:t.form.errors.photo,class:"mt-2"},null,8,["message"])])])]),e("div",te,[a(b,{loading:t.form.processing,class:"inline-flex justify-center px-4 py-2 text-sm font-medium text-white border border-transparent rounded-md shadow-sm bg-light-blue-600 hover:bg-light-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-light-blue-500 disabled:opacity-50",type:"submit"},{default:d(()=>[m(n(o.__("Add Badge")),1)]),_:1},8,["loading"])])])],32)])])])])]),_:1})}const ke=N(U,[["render",se]]);export{ke as default}; diff --git a/public/build/default/assets/CreateCommandQueue-16dfe95f.js b/public/build/default/assets/CreateCommandQueue-d25066b4.js similarity index 94% rename from public/build/default/assets/CreateCommandQueue-16dfe95f.js rename to public/build/default/assets/CreateCommandQueue-d25066b4.js index c1d4cd5d9..f4fee7bb4 100644 --- a/public/build/default/assets/CreateCommandQueue-16dfe95f.js +++ b/public/build/default/assets/CreateCommandQueue-d25066b4.js @@ -1 +1 @@ -import{s as ie,r as R,x as v,y as B,z as D,A as G,B as W,u as r,C as z,D as S,E as de,G as M,F as ue,T as pe,l as ce,o as O,c as me,w as E,b as x,a as n,t as g,i as fe,f as C,n as $,d as A,e as N,k as ye}from"./app-10f1fbb6.js";import{_ as ve}from"./AdminLayout-56ec59aa.js";import{L as ge}from"./LoadingButton-48824f65.js";import{X as be}from"./XInput-5de78b04.js";import{X as he}from"./XSelect-fa8c7abc.js";import{X as xe}from"./XCheckbox-da8a8990.js";import{s as Y}from"./vue-multiselect.esm-2340c4fe.js";import{i as _e}from"./index.es-1e0088c9.js";import{_ as ke}from"./InputError-60a04532.js";import{t as F,H as I,o as P,K as we,T as Se,a as V}from"./use-resolve-button-type-5343a0d4.js";import{m as L,O as Re,f as Ee,a as Ve,P as H,N as T,T as K}from"./hidden-f2d5170c.js";import"./AppLayout-e973448b.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./Icon-07002ff2.js";import"./useAuthorizable-a9d4f38f.js";import"./open-closed-98ce9e0e.js";import"./CloudArrowDownIcon-01098e33.js";import"./index-886e100a.js";function Oe({container:e,accept:a,walk:o,enabled:t}){ie(()=>{let s=e.value;if(!s||t!==void 0&&!t.value)return;let u=L(e);if(!u)return;let d=Object.assign(p=>a(p),{acceptNode:a}),y=u.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,d,!1);for(;y.nextNode();)o(y.currentNode)})}function J(e={},a=null,o=[]){for(let[t,s]of Object.entries(e))Z(o,Q(a,t),s);return o}function Q(e,a){return e?e+"["+a+"]":a}function Z(e,a,o){if(Array.isArray(o))for(let[t,s]of o.entries())Z(e,Q(a,t.toString()),s);else o instanceof Date?e.push([a,o.toISOString()]):typeof o=="boolean"?e.push([a,o?"1":"0"]):typeof o=="string"?e.push([a,o]):typeof o=="number"?e.push([a,`${o}`]):o==null?e.push([a,""]):J(o,a,e)}function Ce(e){var a,o;let t=(a=e==null?void 0:e.form)!=null?a:e.closest("form");if(t){for(let s of t.elements)if(s!==e&&(s.tagName==="INPUT"&&s.type==="submit"||s.tagName==="BUTTON"&&s.type==="submit"||s.nodeName==="INPUT"&&s.type==="image")){s.click();return}(o=t.requestSubmit)==null||o.call(t)}}function $e(e,a,o){let t=R(o==null?void 0:o.value),s=v(()=>e.value!==void 0);return[v(()=>s.value?e.value:t.value),function(u){return s.value||(t.value=u),a==null?void 0:a(u)}]}let Ae=Symbol("DescriptionContext");function ee({slot:e=R({}),name:a="Description",props:o={}}={}){let t=R([]);function s(u){return t.value.push(u),()=>{let d=t.value.indexOf(u);d!==-1&&t.value.splice(d,1)}}return B(Ae,{register:s,slot:e,name:a,props:o}),v(()=>t.value.length>0?t.value.join(" "):void 0)}let te=Symbol("LabelContext");function ae(){let e=z(te,null);if(e===null){let a=new Error("You used a